:root {
    --bg: #f4f5fa;
    --bg-soft: #fafbff;
    --panel: #ffffff;
    --panel-soft: #f8f9fd;
    --sidebar: #1f252c;
    --sidebar-alt: #171c22;
    --line: #dbe2ec;
    --line-strong: #c9d2df;
    --ink: #2f3349;
    --ink-soft: #6b7287;
    --ink-muted: #9aa1b6;
    --accent: #7cbe28;
    --accent-strong: #67a117;
    --accent-dark: var(--accent-strong);
    --accent-soft: #edf7db;
    /* Compatibility aliases used by the unified message-center components. */
    --text: var(--ink);
    --text-muted: var(--ink-soft);
    --surface: var(--panel);
    --surface-soft: var(--panel-soft);
    --border: var(--line);
    --muted: var(--ink-soft);
    --muted-soft: var(--ink-muted);
    --link: #2e5f96;
    --page: var(--bg);
    --shadow: 0 6px 22px rgba(47, 51, 73, 0.08);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --modal-header-background:
        radial-gradient(circle at 84% 0%, rgba(124, 190, 40, 0.18), transparent 34%),
        linear-gradient(135deg, #183f2e 0%, #295b3b 100%);
    --modal-header-border: rgba(255, 255, 255, 0.12);
    --modal-header-shadow: 0 12px 26px -18px rgba(12, 35, 24, 0.9);
    --modal-header-title: #ffffff;
    --modal-header-copy: rgba(241, 249, 244, 0.82);
    --modal-header-muted: #d8efb8;
}

/* Request workflow controls and public-update conversation */
.request-status-form {
    margin: 0;
}

.request-status-form .request-status-dropdown {
    width: 232px;
    max-width: 100%;
}

.request-status-form .request-status-picker {
    width: 100%;
}

.request-status-picker::after {
    transition: transform 0.16s ease;
}

.request-status-picker.is-active::after {
    transform: translateY(-25%) rotate(225deg);
}

.request-status-menu:not([hidden]) {
    transform-origin: top left;
    animation: request-status-menu-in 0.16s ease both;
}

@keyframes request-status-menu-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.request-updates-panel .request-communication-workspace {
    margin-top: 0;
}

.request-communication-workspace {
    display: grid;
    grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.42fr);
    gap: 16px;
    margin-top: 18px;
}

.request-update-composer,
.request-update-timeline-card {
    min-width: 0;
    padding: 19px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 90%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow: 0 8px 22px rgba(47, 51, 73, 0.045);
}

.request-update-timeline-card.is-full {
    grid-column: 1 / -1;
}

.request-update-composer > header,
.request-update-timeline-card > header {
    display: grid;
    gap: 4px;
    margin-bottom: 15px;
}

.request-update-composer > header > span,
.request-update-timeline-card > header > span {
    color: var(--accent-strong);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.request-update-composer h3,
.request-update-timeline-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.04rem;
}

.request-update-composer header p,
.request-update-timeline-card header p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.45;
}

.request-update-composer form,
.request-update-composer label {
    display: grid;
    gap: 8px;
}

.request-update-composer label > span {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 820;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.request-update-composer textarea {
    width: 100%;
    min-height: 126px;
    resize: vertical;
    border-color: color-mix(in srgb, var(--line) 88%, #b9c6d7);
    border-radius: 13px;
    background: var(--panel);
}

.request-update-composer-actions {
    display: grid;
    gap: 11px;
}

.request-update-composer-actions small {
    color: var(--ink-muted);
    font-size: 0.73rem;
    line-height: 1.4;
}

.request-update-composer-actions button {
    justify-self: start;
}

.request-update-timeline {
    position: relative;
    display: grid;
    gap: 12px;
    max-height: 420px;
    margin: 0;
    padding: 2px 3px 2px 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-gutter: stable;
}

.request-update-timeline::before {
    content: "";
    position: absolute;
    top: 21px;
    bottom: 21px;
    left: 20px;
    width: 2px;
    background: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.request-update-timeline > li {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
}

.request-update-marker {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(124, 190, 40, 0.3);
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent) 11%, var(--panel));
    color: var(--accent-strong);
    box-shadow: 0 0 0 5px var(--panel);
}

.request-update-marker .icon,
.request-update-marker svg {
    width: 19px;
    height: 19px;
}

.request-update-timeline > li > div {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.request-update-timeline > li.is-requester_reply .request-update-marker {
    border-color: rgba(49, 95, 139, 0.34);
    background: rgba(49, 95, 139, 0.1);
    color: #315f8b;
}

.request-update-timeline > li.is-requester_reply > div {
    border-color: rgba(49, 95, 139, 0.2);
    background: color-mix(in srgb, #eef5fb 76%, var(--panel));
}

.request-update-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}

.request-update-meta strong {
    color: var(--ink);
    font-size: 0.84rem;
}

.request-update-meta time {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.request-update-timeline p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.5;
}

.request-update-photo {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    width: min(100%, 320px);
    margin-top: 11px;
    padding: 7px;
    color: #315f8b;
    background: color-mix(in srgb, var(--panel) 86%, #eef5fb);
    border: 1px solid rgba(49, 95, 139, 0.2);
    border-radius: 11px;
    text-decoration: none;
}

.request-update-photo:hover,
.request-update-photo:focus-visible {
    border-color: #6389ae;
    box-shadow: 0 7px 17px rgba(35, 63, 91, 0.1);
}

.request-update-photo img {
    display: block;
    width: 104px;
    height: 76px;
    object-fit: cover;
    background: var(--bg-soft);
    border-radius: 8px;
}

.request-update-photo > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.request-update-photo strong {
    color: var(--ink);
    font-size: 0.78rem;
}

.request-update-photo small {
    color: var(--ink-muted);
    font-size: 0.68rem;
}

body.theme-dark .request-update-composer,
body.theme-dark .request-update-timeline-card,
body.theme-dark .request-update-marker {
    border-color: var(--line-strong);
    background-color: color-mix(in srgb, var(--panel) 94%, #1b222c);
}

@media (max-width: 900px) {
    .request-communication-workspace {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .request-status-form,
    .request-status-form .request-status-dropdown,
    .request-status-form .request-status-picker {
        width: 100%;
    }

    .request-update-composer,
    .request-update-timeline-card {
        padding: 15px;
        border-radius: 16px;
    }

    .request-update-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .request-update-timeline {
        max-height: none;
    }
}

/* Protected attachment cards and viewer */
.attachment-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.attachment-card-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.attachment-card-copy {
    min-width: 0;
}

.attachment-card-copy strong {
    margin-bottom: 3px;
}

.attachment-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.attachment-file-icon {
    --attachment-icon-color: #64748b;
    position: relative;
    width: 50px;
    height: 58px;
    flex: 0 0 50px;
    display: grid;
    place-items: end center;
    padding: 0 5px 8px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--attachment-icon-color) 50%, white);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--attachment-icon-color) 76%, white), var(--attachment-icon-color));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--attachment-icon-color) 22%, transparent);
}

.attachment-file-icon-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    border-bottom-left-radius: 5px;
    background: rgba(255, 255, 255, 0.72);
}

.attachment-file-icon strong {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 0.69rem;
    line-height: 1;
    letter-spacing: 0.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-file-icon-image { --attachment-icon-color: #3f8f52; }
.attachment-file-icon-pdf { --attachment-icon-color: #c4483f; }
.attachment-file-icon-sheet { --attachment-icon-color: #16856c; }
.attachment-file-icon-slides { --attachment-icon-color: #c46b2d; }
.attachment-file-icon-document { --attachment-icon-color: #3973b9; }

.attachment-viewer-page {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(91, 150, 57, 0.12), transparent 34%),
        linear-gradient(180deg, #f5f7f9 0%, #edf1f4 100%);
}

.attachment-viewer-shell {
    width: min(1480px, calc(100% - 36px));
    min-height: calc(100vh - 36px);
    margin: 18px auto;
    display: grid;
    grid-template-rows: auto minmax(420px, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.attachment-viewer-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 24px;
    align-items: center;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
}

.attachment-viewer-back {
    grid-column: 1 / -1;
    justify-self: start;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
}

.attachment-viewer-back::before {
    content: "\2190";
    margin-right: 7px;
}

.attachment-viewer-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.attachment-viewer-heading h1 {
    max-width: 900px;
    margin: 2px 0 7px;
    overflow-wrap: anywhere;
    font-size: clamp(1.25rem, 2vw, 1.85rem);
    line-height: 1.15;
}

.attachment-viewer-eyebrow {
    color: #4f7f2f;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.attachment-viewer-meta {
    display: flex;
    align-items: center;
    gap: 7px 14px;
    flex-wrap: wrap;
    color: var(--ink-muted);
    font-size: 0.86rem;
}

.attachment-viewer-meta span + span::before {
    content: "\2022";
    margin-right: 14px;
    color: var(--line-strong);
}

.attachment-viewer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.attachment-viewer-stage {
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    overflow: auto;
    background:
        linear-gradient(45deg, rgba(148, 163, 184, 0.09) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.09) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.09) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.09) 75%),
        #e8edf1;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
    background-size: 24px 24px;
}

.attachment-viewer-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 260px);
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
}

.attachment-viewer-frame {
    width: 100%;
    min-height: calc(100vh - 260px);
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.16);
}

.attachment-viewer-text {
    max-width: 1100px;
}

.attachment-viewer-fallback {
    width: min(560px, 100%);
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 44px 32px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.13);
}

.attachment-viewer-fallback .attachment-file-icon {
    width: 76px;
    height: 88px;
    flex-basis: 76px;
    padding-bottom: 12px;
}

.attachment-viewer-fallback .attachment-file-icon strong {
    font-size: 0.88rem;
}

.attachment-viewer-fallback h2 {
    margin: 6px 0 0;
}

.attachment-viewer-fallback p {
    max-width: 450px;
    margin: 0 0 8px;
    color: var(--ink-soft);
}

.attachment-viewer-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 26px;
    border-top: 1px solid var(--line);
    color: var(--ink-muted);
    background: rgba(248, 250, 252, 0.96);
    font-size: 0.82rem;
}

@media (max-width: 760px) {
    .attachment-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .attachment-card-actions,
    .attachment-card-actions .button-ghost {
        width: 100%;
    }

    .attachment-viewer-shell {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .attachment-viewer-header {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .attachment-viewer-actions,
    .attachment-viewer-actions a {
        width: 100%;
    }

    .attachment-viewer-stage {
        padding: 12px;
    }

    .attachment-viewer-frame {
        min-height: 68vh;
    }

    .attachment-viewer-footer {
        flex-direction: column;
        padding: 13px 18px;
    }
}

body.theme-dark {
    --bg: #1c1f25;
    --bg-soft: #252931;
    --panel: #2a2f38;
    --panel-soft: #313741;
    --sidebar: #12161c;
    --sidebar-alt: #181d24;
    --line: #4b525e;
    --line-strong: #5b6472;
    --ink: #f2f4f8;
    --ink-soft: #d0d6df;
    --ink-muted: #a4adba;
    --accent-soft: rgba(124, 190, 40, 0.12);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    --modal-header-background:
        radial-gradient(circle at 84% 0%, rgba(124, 190, 40, 0.16), transparent 34%),
        linear-gradient(135deg, #143426 0%, #234d33 100%);
    --modal-header-border: rgba(255, 255, 255, 0.12);
    --modal-header-shadow: 0 12px 28px -18px rgba(4, 17, 10, 0.96);
    --modal-header-title: #ffffff;
    --modal-header-copy: rgba(241, 249, 244, 0.82);
    --modal-header-muted: #d8efb8;
}

[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Aptos", "IBM Plex Sans", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8f8fc 0%, var(--bg) 100%);
}

body.theme-dark {
    background: linear-gradient(180deg, #181b21 0%, var(--bg) 100%);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #2e5f96;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3,
.brand-copy strong,
.stat-card strong,
.module-stat strong,
.toolbar-chip strong {
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
}

code {
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    background: #eef3f7;
    padding: 2px 6px;
    border-radius: 6px;
}

body.theme-dark code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.page-shell {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 28px 18px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 420px);
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.brand-block-login {
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 22px;
}

.brand-block-sidebar {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brand-logo {
    width: 74px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.brand-logo-large {
    width: 108px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
    color: #0f1a0f;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.brand-block-login .brand-mark {
    width: 56px;
    height: 56px;
    font-size: 1rem;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy strong {
    font-size: 1.18rem;
    line-height: 1.08;
}

.brand-copy span {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
}

.public-brand-block {
    margin-bottom: 18px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 22px;
}

.auth-card.card {
    padding: 28px;
}

.auth-card h1 {
    margin-bottom: 18px;
    text-align: center;
    font-size: 2rem;
}

.page-signup .page-shell {
    width: min(100%, 990px);
    padding: 34px 24px;
}

.page-signup .brand-logo-large {
    width: auto;
    height: 98px;
}

.page-signup .auth-card {
    width: min(100%, 940px);
}

.page-signup .auth-card.card {
    padding: 34px;
}

.page-signup .brand-block-login {
    margin-bottom: 20px;
}

.page-signup .auth-card h1 {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    margin-bottom: 12px;
}

.page-signup .signup-page-intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
}

.page-signup .signup-card > .flash-stack {
    margin-top: 18px;
    text-align: center;
}

.page-signup .lp-pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: stretch;
}

.page-signup .lp-pricing-card {
    min-height: 100%;
}

.page-signup .editor-form {
    max-width: 860px;
    margin-inline: auto;
}

.page-signup .form-actions {
    justify-content: center;
    margin-top: 8px;
}

.page-signup .lp-login-meta {
    margin-top: 18px;
}

.signup-availability-state {
    width: min(100%, 760px);
    margin: 30px auto 0;
    padding: clamp(24px, 4vw, 38px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px 22px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 13%, transparent), transparent 38%),
        var(--panel-soft);
    box-shadow: 0 18px 42px rgba(24, 33, 48, 0.08);
}

.signup-availability-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
    color: var(--accent-strong);
}

.signup-availability-icon svg {
    width: 25px;
    height: 25px;
}

.signup-availability-copy h2 {
    margin: 7px 0 9px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.signup-availability-copy p {
    margin: 0;
    max-width: 620px;
    color: var(--ink-soft);
    line-height: 1.65;
}

.signup-waitlist-form {
    grid-column: 1 / -1;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.signup-waitlist-form > label > span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.signup-waitlist-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.signup-waitlist-row button {
    min-width: 132px;
}

.signup-waitlist-note {
    margin: 9px 0 0;
    color: var(--ink-muted);
    font-size: 0.82rem;
}

.page-signup-activate .settings-kv-list,
.page-signup-activate .stack-list {
    max-width: 860px;
    margin-inline: auto;
}

.page-signup-activate .form-actions {
    justify-content: center;
}

@media (max-width: 620px) {
    .signup-availability-state {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .signup-availability-icon {
        width: 46px;
        height: 46px;
    }

    .signup-waitlist-form {
        grid-column: auto;
    }

    .signup-waitlist-row {
        grid-template-columns: 1fr;
    }

    .signup-waitlist-row button {
        width: 100%;
    }
}

.card-label,
.module-stat .label,
.topbar-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    --sidebar-rail-width: 224px;
    --nav-flyout-width: 298px;
    grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
}

.app-sidebar {
    background:
        linear-gradient(180deg, rgba(124, 190, 40, 0.08), transparent 140px),
        linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-alt) 100%);
    color: #d9e1e8;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 22px 16px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 22px;
}

.app-sidebar .brand-copy strong,
.app-sidebar .brand-copy span {
    color: #f4f7fa;
}

.app-sidebar .brand-logo {
    width: 82px;
}

.app-sidebar .brand-copy strong {
    font-size: 1.2rem;
}

.app-sidebar .brand-copy span {
    color: #b6c2ce;
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .brand-logo {
        width: 64px;
    }

    .brand-logo-large {
        width: 92px;
    }

    .app-sidebar .brand-logo {
        width: 72px;
    }
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    align-content: start;
}

.sidebar-link {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    color: #cfd8e1;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-link:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(124, 190, 40, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(124, 190, 40, 0.16);
}

.nav-token {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.sidebar-link.is-active .nav-token {
    background: var(--accent);
    color: #14200d;
}

.app-main {
    min-width: 0;
    /* A grid item's automatic minimum must not be supplied by a wide register. */
    max-width: 100%;
    padding: 24px;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.topbar-copy h1 {
    margin: 4px 0 0;
    font-size: 2rem;
    line-height: 1.08;
}

.topbar-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.toolbar-chip {
    min-height: 48px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

body.theme-dark .toolbar-chip {
    background: linear-gradient(180deg, rgba(47, 53, 64, 0.94) 0%, rgba(40, 45, 55, 0.94) 100%);
    border-color: var(--line-strong);
}

.toolbar-chip strong {
    font-size: 1rem;
    line-height: 1;
}

.toolbar-chip span {
    font-size: 0.74rem;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.toolbar-chip-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.toolbar-chip .badge {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: inherit;
}

.toolbar-chip-risk {
    gap: 6px;
}

.toolbar-chip-risk.is-excellent {
    border-color: #bfd8b1;
    background: linear-gradient(180deg, #fbfff8 0%, #eef9e5 100%);
}

.toolbar-chip-risk.is-healthy {
    border-color: #c9ddbb;
    background: linear-gradient(180deg, #fbfff9 0%, #f0f8e8 100%);
}

.toolbar-chip-risk.is-watch {
    border-color: #e2d1ad;
    background: linear-gradient(180deg, #fffaf1 0%, #f7edd8 100%);
}

.toolbar-chip-risk.is-concern {
    border-color: #e3c2ae;
    background: linear-gradient(180deg, #fff8f2 0%, #f8e6da 100%);
}

.toolbar-chip-risk.is-critical {
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fff8f8 0%, #fae3e1 100%);
}

body.theme-dark .toolbar-chip-risk.is-excellent,
body.theme-dark .toolbar-chip-risk.is-healthy,
body.theme-dark .toolbar-chip-risk.is-watch,
body.theme-dark .toolbar-chip-risk.is-concern,
body.theme-dark .toolbar-chip-risk.is-critical {
    border-color: var(--line-strong);
}

.toolbar-chip-user strong {
    font-size: 0.92rem;
}

.workspace-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.workspace-shell.single {
    grid-template-columns: minmax(0, 1fr);
}

.primary-column,
.sidebar {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.split-grid,
.card-grid,
.detail-grid,
.module-band,
.workspace-grid {
    display: grid;
    gap: 18px;
}

.split-grid,
.workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.module-band.locations-summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1180px) {
    .module-band.locations-summary-band {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 701px) {
    .assets-register-heading:has(> .assets-summary-strip) {
        display: grid;
        grid-template-columns: minmax(120px, 1fr) minmax(0, max-content) minmax(120px, 1fr);
    }

    .assets-register-heading > .assets-summary-strip {
        justify-content: center;
    }

    .assets-register-heading:has(> .assets-summary-strip) > .page-actions {
        justify-content: flex-end;
    }
}

.assets-register-heading h2 {
    overflow-wrap: anywhere;
}

.assets-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 6px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.assets-summary-item {
    --summary-color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.assets-summary-item:hover,
.assets-summary-item.is-active {
    color: color-mix(in srgb, var(--summary-color) 70%, var(--ink));
    text-decoration: none;
}

.assets-summary-item.is-active {
    background: var(--summary-color);
    color: #ffffff;
}

.assets-summary-item:focus-visible {
    outline: 2px solid var(--summary-color);
    outline-offset: 3px;
}

.assets-summary-item.is-total { --summary-color: #5575e7; }
.assets-summary-item.is-operational { --summary-color: #2ba471; }
.assets-summary-item.is-non_operational { --summary-color: #ed4e61; }
.assets-summary-item.is-reduced_operation { --summary-color: #e5ad37; }
.assets-summary-item.is-critical { --summary-color: #aa75d1; }

.assets-summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.assets-summary-count {
    margin: 0;
    color: inherit;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.assets-summary-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 2px;
    background: var(--summary-color);
}

.assets-summary-item.is-active .assets-summary-dot {
    box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent);
}

@media (max-width: 600px) {
    .assets-summary-strip { gap: 6px 2px; }
    .assets-summary-item { padding-inline: 8px; }
}

.module-stat {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 254, 0.98) 100%);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 11px 16px 10px;
    box-shadow: 0 4px 14px rgba(47, 51, 73, 0.04);
}

.module-stat strong {
    display: block;
    margin-top: 4px;
    font-size: 1.6rem;
    line-height: 1.05;
}

.module-stat p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.32;
}

.section-heading,
.project-header {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card > .section-heading:first-child,
.card > .project-header:first-child {
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.section-heading h2,
.card h2 {
    margin-bottom: 0;
    font-size: 1.28rem;
}

.section-heading > p {
    margin: 0;
    max-width: 38ch;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.stack-list {
    display: grid;
    gap: 10px;
}

.stack-item,
.feature-card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 253, 0.98) 100%);
    padding: 16px;
    box-shadow: 0 3px 12px rgba(47, 51, 73, 0.035);
}

.stack-item.compact {
    padding: 14px 15px;
}

.stack-item p,
.feature-card p {
    color: var(--ink-soft);
    line-height: 1.45;
    margin-bottom: 0;
}

.stack-item p + p,
.feature-card p + p {
    margin-top: 8px;
}

.support-console {
    align-items: start;
}

:is(.support-overview, .user-summary) {
    display: grid;
    grid-template-columns: repeat(var(--summary-columns, 4), minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

:is(.support-stat, .user-summary-stat) {
    position: relative;
    min-width: 0;
    padding: 14px 14px 14px 66px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

:is(.support-stat, .user-summary-stat) dt {
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

:is(.support-stat, .user-summary-stat) dd {
    margin: 4px 0 0;
    font-size: 1.55rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

:is(.support-stat-icon, .user-summary-icon).badge {
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border-radius: var(--radius-md);
}

:is(.support-stat .support-stat-icon, .user-summary-stat .user-summary-icon) {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
}

:is(.support-stat-icon, .user-summary-icon) svg {
    width: 19px;
    height: 19px;
}

.card.support-queue-card {
    --support-queue-gutter: clamp(14px, 2vw, 26px);
    --support-ticket-columns: minmax(0, 1fr) 9.5rem 5.75rem 11rem 0.75rem;
    padding: 0;
}

.user-summary {
    --summary-columns: 3;
}

.card.user-directory,
.card.idea-controls,
.card.task-list-library-hero {
    padding: 0;
}

.user-directory-notice {
    padding: 12px 20px;
    border-block: 1px solid var(--line);
    background: var(--panel-soft);
}

.user-directory-notice p {
    margin: 3px 0 0;
    color: var(--ink-soft);
}

.user-directory .users-table-region {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.user-directory .pagination-bar {
    margin: 0;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}

.user-directory .data-table thead th {
    color: var(--ink-soft);
    background: var(--panel-soft);
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

@media (max-width: 700px) {
    .user-directory .users-table-region {
        padding: 0 14px 14px;
    }

    .user-directory .users-responsive-table tbody {
        gap: 10px;
    }
}

.users-table-primary a {
    color: var(--ink);
    font-weight: 750;
}

.users-table-primary .muted {
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.record-list-heading,
.support-queue-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px var(--support-queue-gutter, clamp(14px, 2vw, 20px));
}

:is(.support-queue-heading, .record-list-heading) h2 {
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.2;
}

:is(.support-queue-heading, .record-list-heading) p {
    margin: 5px 0 0;
    color: var(--ink-soft);
    font-size: 0.875rem;
}

:is(.support-queue-heading, .record-list-heading) .button-primary {
    flex: 0 0 auto;
    white-space: nowrap;
}

.support-submit-meta {
    margin-bottom: 16px;
}

.support-compose-modal {
    max-height: min(88vh, 860px);
    overflow: auto;
}

.support-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 26rem) minmax(9rem, 12rem) auto;
    align-items: end;
    justify-content: start;
    gap: 12px;
    margin: 0;
    padding: 15px var(--support-queue-gutter);
    border-block: 1px solid var(--line);
    background: var(--panel-soft);
}

.support-filter-form label {
    min-width: 0;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.support-filter-form input,
.support-filter-form select {
    min-width: 0;
    font-size: 0.875rem;
}

.support-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.support-filter-actions .button-ghost {
    width: auto;
}

.support-ticket-columns,
.support-ticket-row {
    display: grid;
    grid-template-columns: var(--support-ticket-columns);
    align-items: center;
    justify-items: start;
    gap: 12px;
    padding-inline: var(--support-queue-gutter);
}

.support-ticket-columns {
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 750;
}

.support-ticket-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.support-ticket-list > li + li {
    border-top: 1px solid var(--line);
}

.support-thread {
    display: grid;
    gap: 12px;
}

.modal-card.modal-card-wide.support-ticket-modal {
    width: min(1240px, 100%);
    height: min(90dvh, 940px);
    max-height: min(90dvh, 940px);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    align-content: stretch;
    overflow: hidden;
    gap: 14px;
}

.support-ticket-modal > .modal-header > div {
    min-width: 0;
}

.support-ticket-modal > .modal-header h2,
.support-ticket-modal > .modal-header .modal-subtitle {
    overflow-wrap: anywhere;
}

.support-ticket-modal .support-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: auto;
    margin: 0;
}

.support-ticket-modal .support-modal-badges > * {
    width: auto;
    max-width: none;
}

.support-ticket-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow: 0 7px 20px rgba(47, 51, 73, 0.04);
}

.support-ticket-summary-item {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 13px 16px;
}

.support-ticket-summary-item + .support-ticket-summary-item {
    border-left: 1px solid var(--line);
}

.support-ticket-summary-item dt,
.support-ticket-summary-item dd {
    margin: 0;
    min-width: 0;
}

.support-ticket-summary-item dt {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.support-ticket-summary-item dd {
    display: grid;
    gap: 4px;
    color: var(--ink-soft);
    line-height: 1.35;
}

.support-ticket-summary-item dd strong,
.support-ticket-summary-subvalue {
    overflow-wrap: anywhere;
}

.support-ticket-summary-item dd strong {
    color: var(--ink);
    font-size: 0.91rem;
    font-weight: 800;
}

.support-ticket-summary-subvalue {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

a.support-ticket-summary-subvalue {
    color: color-mix(in srgb, var(--ink) 72%, var(--link));
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent) 54%, transparent);
    text-underline-offset: 2px;
}

a.support-ticket-summary-subvalue:hover {
    color: var(--ink);
    text-decoration-color: var(--accent-strong);
}

.support-conversation-workspace {
    display: grid;
    grid-template-columns: minmax(270px, 35fr) minmax(0, 65fr);
    gap: 16px;
    min-width: 0;
    min-height: 0;
}

.support-reply-panel,
.support-thread-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow: 0 8px 24px rgba(47, 51, 73, 0.055);
}

.support-reply-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: 16px;
    padding: 20px;
    overflow-y: auto;
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 46%),
        color-mix(in srgb, var(--panel) 97%, var(--accent-soft));
}

.support-reply-heading,
.support-reply-form,
.support-reply-field {
    min-width: 0;
}

.support-reply-heading {
    display: grid;
    gap: 6px;
}

.support-reply-heading h3,
.support-reply-heading p,
.support-conversation-heading h3,
.support-conversation-heading p {
    margin: 0;
}

.support-reply-heading > p:last-child {
    color: var(--ink-soft);
    line-height: 1.45;
}

.support-thread-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.support-conversation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 84%, var(--panel));
}

.support-conversation-heading > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.support-conversation-heading h3 {
    color: var(--ink);
}

.support-thread {
    gap: 16px;
    margin: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 18px;
    scroll-padding-block-end: 18px;
}

.support-thread-end {
    display: block;
    width: 100%;
    height: 1px;
}

.support-ticket-row {
    min-height: 66px;
    padding-block: 12px;
    color: var(--ink);
    text-decoration: none;
}

.support-ticket-row:hover,
.support-ticket-row:focus-visible,
.support-ticket-row.is-active {
    background: color-mix(in srgb, var(--accent) 9%, var(--panel));
    text-decoration: none;
}

.support-ticket-row:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: -2px;
}

.support-ticket-list > li:last-child .support-ticket-row {
    border-radius: 0 0 calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px);
}

.support-ticket-row-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.support-ticket-row-copy strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

.support-ticket-row-details {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 12px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.support-ticket-reference,
.support-ticket-updated {
    font-variant-numeric: tabular-nums;
}

.support-ticket-updated,
.support-ticket-arrow {
    color: var(--ink-soft);
}

.support-ticket-arrow {
    width: 7px;
    height: 7px;
    justify-self: end;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
}

@media (max-width: 1000px) {
    .support-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-ticket-columns {
        display: none;
    }

    .support-ticket-row {
        grid-template-columns: auto auto minmax(0, 1fr) 0.75rem;
        gap: 7px 9px;
    }

    .support-ticket-row-copy {
        grid-column: 1 / 4;
    }

    .support-ticket-arrow {
        grid-column: 4;
        grid-row: 1 / 3;
    }
}

@media (max-width: 640px) {
    :is(.support-overview, .user-summary) {
        gap: 8px;
    }

    :is(.support-stat, .user-summary-stat) {
        padding: 10px;
    }

    :is(.support-stat .support-stat-icon, .user-summary-stat .user-summary-icon) {
        display: none;
    }

    :is(.support-queue-heading, .record-list-heading) {
        flex-wrap: wrap;
    }

    .support-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .support-ticket-row {
        grid-template-columns: auto minmax(0, 1fr) 0.75rem;
    }

    .support-ticket-row-copy,
    .support-ticket-updated {
        grid-column: 1 / 3;
    }

    .support-ticket-arrow {
        grid-column: 3;
        grid-row: 1 / 4;
    }
}

.support-thread-message {
    width: min(88%, 70ch);
    padding: 15px 17px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow: 0 3px 12px rgba(47, 51, 73, 0.035);
}

.support-thread-message.is-customer {
    margin-right: auto;
    border-left-width: 4px;
    border-color: color-mix(in srgb, #5ea9ff 28%, var(--line-strong));
    background: color-mix(in srgb, var(--panel) 91%, #eaf4ff);
}

.support-thread-message.is-admin {
    margin-left: auto;
    border-right-width: 4px;
    border-color: color-mix(in srgb, #7bc53b 28%, var(--line-strong));
    background: color-mix(in srgb, var(--panel) 91%, var(--accent-soft));
}

.support-thread-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.support-thread-message p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.6;
}

.support-thread-stamp {
    color: var(--ink-soft);
    white-space: nowrap;
}

.support-reply-form {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    align-content: start;
}

.support-reply-field textarea {
    width: 100%;
    min-height: 180px;
    max-height: 320px;
    resize: vertical;
}

.support-reply-form .support-reply-resolved {
    margin-top: 0;
}

.support-reply-form .support-reply-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    margin: 0;
}

.support-reply-form .support-reply-actions button {
    width: 100%;
}

.support-reply-note {
    margin: -4px 0 0;
}

.support-empty-state {
    padding: 40px var(--support-queue-gutter);
    text-align: center;
}

.support-empty-state h3 {
    margin: 12px 0 5px;
    font-size: 1rem;
}

.support-empty-state p {
    margin: 0;
    color: var(--ink-soft);
}

.support-ticket-backdrop {
    align-items: center;
}

@media (max-width: 900px) {
    .modal-card.modal-card-wide.support-ticket-modal {
        height: calc(100dvh - 28px);
        max-height: calc(100dvh - 28px);
    }

    .support-ticket-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-ticket-summary-item + .support-ticket-summary-item {
        border-left: 0;
    }

    .support-ticket-summary-item:nth-child(even) {
        border-left: 1px solid var(--line);
    }

    .support-ticket-summary-item:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .support-conversation-workspace {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-right: 3px;
    }

    .support-reply-panel {
        overflow: visible;
    }

    .support-thread-panel {
        height: min(52dvh, 520px);
        min-height: 390px;
    }
}

.asset-readiness-card {
    position: relative;
    display: grid;
    gap: 16px;
    align-content: start;
    overflow: hidden;
}

.asset-readiness-card > * {
    position: relative;
    z-index: 1;
}

.asset-readiness-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.95;
}

.asset-readiness-card-top {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.asset-readiness-mark {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(47, 51, 73, 0.08);
}

.asset-readiness-copy {
    min-width: 0;
}

.asset-readiness-label {
    margin: 0 0 6px;
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-readiness-headline {
    margin: 0 0 8px;
    color: var(--ink) !important;
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.08;
}

.asset-readiness-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.asset-readiness-stat {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
    background: rgba(255, 255, 255, 0.72);
}

body.theme-dark .asset-readiness-stat {
    background: rgba(255, 255, 255, 0.04);
}

.asset-readiness-stat strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
}

.asset-readiness-stat span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.asset-readiness-footnote {
    font-size: 0.84rem;
    line-height: 1.4;
}

.asset-readiness-card.is-ready {
    border-color: #bfd8b1;
    background: linear-gradient(180deg, #fbfff8 0%, #eef9e5 100%);
}

.asset-readiness-card.is-ready::after {
    background: radial-gradient(circle at top left, rgba(124, 190, 40, 0.16), transparent 60%);
}

.asset-readiness-card.is-ready .asset-readiness-mark {
    color: #1f6a39;
    border-color: #bfd7ab;
    background: linear-gradient(180deg, #effadb 0%, #dff1cb 100%);
    box-shadow: 0 10px 24px rgba(86, 149, 22, 0.14);
}

.asset-readiness-card.is-risk {
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fff8f8 0%, #fae7e5 100%);
}

.asset-readiness-card.is-risk::after {
    background: radial-gradient(circle at top left, rgba(217, 52, 52, 0.13), transparent 60%);
}

.asset-readiness-card.is-risk .asset-readiness-mark {
    color: #9d3737;
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fdecec 0%, #f7dada 100%);
    box-shadow: 0 10px 24px rgba(157, 55, 55, 0.12);
}

.asset-readiness-card.is-neutral {
    border-color: #cbd4df;
    background: linear-gradient(180deg, #fcfdff 0%, #eef3f8 100%);
}

.asset-readiness-card.is-neutral::after {
    background: radial-gradient(circle at top left, rgba(125, 135, 147, 0.12), transparent 60%);
}

.asset-readiness-card.is-neutral .asset-readiness-mark {
    color: #546270;
    border-color: #cbd4df;
    background: linear-gradient(180deg, #f7f9fc 0%, #e7edf2 100%);
}

.asset-last-inspection-score {
    font-weight: 700;
}

.asset-last-inspection-score.is-good {
    color: #21663a;
}

.asset-last-inspection-score.is-watch {
    color: #8a6a1b;
}

.asset-last-inspection-score.is-poor {
    color: #9b5222;
}

.asset-last-inspection-score.is-bad {
    color: #9d3737;
}

.inspection-history-table th:last-child,
.inspection-history-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.asset-machine-health-card {
    position: relative;
    display: grid;
    gap: 16px;
    align-content: start;
    overflow: hidden;
}

.asset-machine-health-card > * {
    position: relative;
    z-index: 1;
}

.asset-machine-health-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.95;
}

.asset-machine-health-top {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.asset-machine-health-score {
    min-height: 84px;
    padding: 12px 10px;
    border-radius: 22px;
    border: 1px solid transparent;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    box-shadow: 0 10px 24px rgba(47, 51, 73, 0.08);
}

.asset-machine-health-score strong {
    display: block;
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 0.95;
}

.asset-machine-health-score span {
    display: block;
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.asset-machine-health-copy {
    min-width: 0;
}

.asset-machine-health-label {
    margin: 0 0 6px;
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-machine-health-headline {
    margin: 0 0 8px;
    color: var(--ink) !important;
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.08;
}

.asset-machine-health-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.asset-machine-health-stat {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 85%, transparent);
    background: rgba(255, 255, 255, 0.72);
}

body.theme-dark .asset-machine-health-stat {
    background: rgba(255, 255, 255, 0.04);
}

.asset-machine-health-stat strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1;
}

.asset-machine-health-stat span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.asset-machine-health-footnote {
    font-size: 0.84rem;
    line-height: 1.4;
}

.asset-machine-health-card.is-healthy {
    border-color: #bfd8b1;
    background: linear-gradient(180deg, #fbfff8 0%, #eef9e5 100%);
}

.asset-machine-health-card.is-healthy::after {
    background: radial-gradient(circle at top left, rgba(124, 190, 40, 0.16), transparent 60%);
}

.asset-machine-health-card.is-healthy .asset-machine-health-score {
    color: #1f6a39;
    border-color: #bfd7ab;
    background: linear-gradient(180deg, #effadb 0%, #dff1cb 100%);
    box-shadow: 0 10px 24px rgba(86, 149, 22, 0.14);
}

.asset-machine-health-card.is-watch {
    border-color: #e2d1ad;
    background: linear-gradient(180deg, #fffaf1 0%, #f7edd8 100%);
}

.asset-machine-health-card.is-watch::after {
    background: radial-gradient(circle at top left, rgba(220, 166, 27, 0.14), transparent 60%);
}

.asset-machine-health-card.is-watch .asset-machine-health-score {
    color: #8e6510;
    border-color: #e2d1ad;
    background: linear-gradient(180deg, #fff3d8 0%, #f8e4b5 100%);
    box-shadow: 0 10px 24px rgba(220, 166, 27, 0.14);
}

.asset-machine-health-card.is-poor {
    border-color: #e3c2ae;
    background: linear-gradient(180deg, #fff8f2 0%, #f8e6da 100%);
}

.asset-machine-health-card.is-poor::after {
    background: radial-gradient(circle at top left, rgba(240, 138, 20, 0.14), transparent 60%);
}

.asset-machine-health-card.is-poor .asset-machine-health-score {
    color: #9d5a0d;
    border-color: #e3c2ae;
    background: linear-gradient(180deg, #fbe6ce 0%, #f6d2ab 100%);
    box-shadow: 0 10px 24px rgba(240, 138, 20, 0.14);
}

.asset-machine-health-card.is-bad {
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fff8f8 0%, #fae7e5 100%);
}

.asset-machine-health-card.is-bad::after {
    background: radial-gradient(circle at top left, rgba(217, 52, 52, 0.13), transparent 60%);
}

.asset-machine-health-card.is-bad .asset-machine-health-score {
    color: #9d3737;
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fdecec 0%, #f7dada 100%);
    box-shadow: 0 10px 24px rgba(157, 55, 55, 0.12);
}

.asset-machine-health-card.is-neutral {
    border-color: #cbd4df;
    background: linear-gradient(180deg, #fcfdff 0%, #eef3f8 100%);
}

.asset-machine-health-card.is-neutral::after {
    background: radial-gradient(circle at top left, rgba(125, 135, 147, 0.12), transparent 60%);
}

.asset-machine-health-card.is-neutral .asset-machine-health-score {
    color: #546270;
    border-color: #cbd4df;
    background: linear-gradient(180deg, #f7f9fc 0%, #e7edf2 100%);
}

.inspection-template-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}

.inspection-template-field {
    display: grid;
    gap: 6px;
}

.inspection-template-field span {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.inspection-template-actions {
    display: flex;
    align-items: end;
    min-height: 100%;
}

.inspection-template-save {
    justify-self: stretch;
}

.row-handle-cell {
    width: 52px;
    text-align: center;
}

.row-drag-handle {
    min-width: 40px;
    cursor: grab;
}

.row-drag-handle:active {
    cursor: grabbing;
}

[data-asset-inspection-item-rows] tr.is-dragging {
    opacity: 0.48;
}

@media (max-width: 900px) {
    .inspection-template-toolbar {
        grid-template-columns: 1fr;
    }

    .inspection-template-actions {
        min-height: 0;
    }
}

.muted {
    color: var(--ink-soft);
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 210px)) auto;
    gap: 12px;
}

.filter-form.filter-form-simple {
    grid-template-columns: minmax(240px, 1fr) auto;
}

.filter-form.filter-form-parts {
    grid-template-columns: minmax(220px, 1.25fr) repeat(4, minmax(145px, 1fr));
    align-items: end;
}

.filter-form.filter-form-ops {
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, 1fr)) auto;
    align-items: end;
}

.parts-register-toolbar-form,
.register-toolbar-form {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.parts-register-toolbar,
.register-toolbar {
    display: grid;
    gap: 10px;
}

.parts-register-toolbar-main,
.register-toolbar-main {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) minmax(190px, 240px) auto;
    gap: 12px;
    align-items: end;
}

.register-toolbar-main.is-simple {
    grid-template-columns: minmax(280px, 1fr) auto;
}

.work-order-register-toolbar-main {
    grid-template-columns: minmax(260px, 1.5fr) auto minmax(170px, 220px) auto;
}

.register-toolbar-main.entity-scan-toolbar-main {
    grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 220px) auto;
}

.register-toolbar-main.is-simple.entity-scan-toolbar-main {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.work-order-scan-button,
.entity-scan-button {
    gap: 8px;
    white-space: nowrap;
}

.entity-scan-feedback {
    grid-column: 1 / -1;
    min-height: 1.4em;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.filter-form.filter-form-simple.locations-scan-filter {
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
}

.locations-scan-filter .entity-scan-feedback {
    grid-column: 1 / -1;
}

.parts-toolbar-search,
.parts-toolbar-sort,
.parts-filter-grid label,
.register-toolbar-search,
.register-toolbar-sort,
.filter-grid label {
    display: grid;
    align-content: start;
    align-self: start;
    gap: 8px;
    font-weight: 700;
}

.filter-help-text {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ink-soft);
    font-weight: 600;
}

.parts-toolbar-search span,
.parts-toolbar-sort span,
.parts-filter-grid label span,
.register-toolbar-search span,
.register-toolbar-sort span,
.filter-grid label span {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 800;
}

.parts-filter-drawer,
.filter-drawer {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.parts-filter-drawer summary,
.filter-drawer summary {
    list-style: none;
}

.parts-filter-drawer summary::-webkit-details-marker,
.filter-drawer summary::-webkit-details-marker {
    display: none;
}

.parts-filter-summary,
.filter-summary {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 253, 0.96) 100%);
    box-shadow: 0 4px 12px rgba(36, 41, 61, 0.03);
}

.parts-filter-summary,
.filter-summary {
    position: relative;
}

.parts-filter-summary::after,
.filter-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid color-mix(in srgb, var(--ink-soft) 78%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--ink-soft) 78%, transparent);
    transform: rotate(45deg);
    transition: transform 0.16s ease;
}

.parts-filter-drawer[open] .parts-filter-summary::after,
.filter-drawer[open] .filter-summary::after {
    transform: rotate(225deg);
}

.parts-filter-summary-meta,
.filter-summary-meta {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(239, 243, 249, 0.98);
    color: color-mix(in srgb, var(--ink-soft) 86%, #5c6980 14%);
    font-size: 0.8rem;
    font-weight: 700;
}

.parts-filter-drawer-body,
.filter-drawer-body {
    display: grid;
    gap: 14px;
    margin-top: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(248, 250, 253, 0.98) 100%);
    box-shadow: 0 8px 22px rgba(37, 43, 65, 0.035);
}

.parts-filter-grid,
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.parts-filter-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.parts-filter-actions .button-ghost,
.parts-filter-actions button,
.filter-actions .button-ghost,
.filter-actions button {
    width: auto;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.pagination-meta,
.pagination-controls,
.pagination-per-page {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-meta {
    color: var(--ink-soft);
    font-weight: 700;
}

.pagination-meta strong {
    color: var(--ink);
}

.pagination-per-page span,
.pagination-meta span {
    font-size: 0.86rem;
}

.pagination-button {
    min-width: 42px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
}

.pagination-button.is-active {
    background: linear-gradient(180deg, #8ed235, var(--accent));
    border-color: var(--accent-strong);
    color: #14200d;
}

.pagination-button.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.pagination-ellipsis {
    color: var(--ink-soft);
    font-weight: 800;
}

@media (max-width: 1100px) {
    .register-toolbar-main.entity-scan-toolbar-main,
    .register-toolbar-main.is-simple.entity-scan-toolbar-main {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .parts-register-toolbar-main,
    .register-toolbar-main,
    .parts-filter-grid,
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .parts-register-toolbar-main > .button-ghost,
    .register-toolbar-main > .button-ghost {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .register-toolbar-main.entity-scan-toolbar-main,
    .register-toolbar-main.is-simple.entity-scan-toolbar-main {
        grid-template-columns: minmax(0, 1fr);
    }
    .parts-register-toolbar-main,
    .register-toolbar-main,
    .parts-filter-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-form.filter-form-simple.locations-scan-filter {
        grid-template-columns: 1fr;
    }

    .support-thread-message,
    .support-thread-message.is-customer,
    .support-thread-message.is-admin {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .support-thread-meta {
        align-items: start;
    }

    .support-ticket-backdrop {
        align-items: start;
        padding: 6px;
    }

    .modal-card.modal-card-wide.support-ticket-modal {
        --modal-card-padding: 14px;
        --modal-card-radius: 16px;
        width: 100%;
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        padding: var(--modal-card-padding);
        border-radius: var(--modal-card-radius);
        gap: 12px;
    }

    .support-ticket-summary-item {
        gap: 5px;
        padding: 11px 12px;
    }

    .support-conversation-workspace {
        gap: 14px;
    }

    .support-reply-panel,
    .support-thread-panel {
        border-radius: 14px;
    }

    .support-reply-panel {
        gap: 14px;
        padding: 16px;
    }

    .support-reply-field textarea {
        min-height: 130px;
        max-height: 230px;
    }

    .support-conversation-heading {
        padding: 13px 14px;
    }

    .support-thread-panel {
        height: min(54dvh, 480px);
        min-height: 350px;
    }

    .support-thread {
        gap: 12px;
        padding: 13px;
    }

    .support-thread-message {
        padding: 13px 14px;
    }

    .support-thread-stamp {
        white-space: normal;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-meta,
    .pagination-controls,
    .pagination-per-page {
        justify-content: flex-start;
    }
}

.auth-form,
.editor-form {
    display: grid;
    gap: 16px;
}

.auth-form label,
.editor-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.auth-form span,
.editor-form span {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.auth-form input,
.editor-form input,
.editor-form select,
.editor-form textarea,
.filter-form input,
.filter-form select,
.bulk-toolbar-field input[type="text"],
.bulk-toolbar-field input[type="file"],
.bulk-toolbar-field select,
.parts-register-toolbar-form input,
.register-toolbar-form input,
.parts-register-toolbar-form select,
.register-toolbar-form select,
.button-link,
.button-ghost {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 251, 254, 0.99) 100%);
    box-shadow: 0 2px 7px rgba(47, 51, 73, 0.03);
}

body.theme-dark .auth-form input,
body.theme-dark .editor-form input,
body.theme-dark .editor-form select,
body.theme-dark .editor-form textarea,
body.theme-dark .filter-form input,
body.theme-dark .filter-form select,
body.theme-dark .bulk-toolbar-field input[type="text"],
body.theme-dark .bulk-toolbar-field input[type="file"],
body.theme-dark .bulk-toolbar-field select,
body.theme-dark .parts-register-toolbar-form input,
body.theme-dark .register-toolbar-form input,
body.theme-dark .parts-register-toolbar-form select,
body.theme-dark .register-toolbar-form select {
    background: linear-gradient(180deg, rgba(57, 63, 74, 0.98) 0%, rgba(49, 55, 65, 0.98) 100%);
    border-color: var(--line-strong);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .auth-form input::placeholder,
body.theme-dark .editor-form input::placeholder,
body.theme-dark .editor-form textarea::placeholder,
body.theme-dark .filter-form input::placeholder,
body.theme-dark .bulk-toolbar-field input[type="text"]::placeholder,
body.theme-dark .parts-register-toolbar-form input::placeholder,
body.theme-dark .register-toolbar-form input::placeholder {
    color: var(--ink-muted);
}

.parts-register-toolbar-form select[multiple],
.register-toolbar-form select[multiple] {
    height: 190px;
    min-height: 190px;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(248, 250, 254, 0.995) 100%);
    align-self: start;
}

.parts-register-toolbar-form select[multiple] option,
.register-toolbar-form select[multiple] option {
    padding: 8px 10px;
    border-radius: 8px;
}

.editor-form textarea {
    min-height: 112px;
    resize: vertical;
}

.auth-form button,
.editor-form button,
.filter-form button,
.bulk-toolbar button,
.parts-register-toolbar-form button,
.register-toolbar-form button,
.inline-action-row button {
    min-height: 44px;
    border: 1px solid var(--accent-strong);
    border-radius: 10px;
    padding: 0 16px;
    font: inherit;
    font-weight: 800;
    color: #14200d;
    background: linear-gradient(180deg, #8ed235, var(--accent));
    cursor: pointer;
}

.button-link,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 249, 253, 0.99) 100%);
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: 0 2px 8px rgba(47, 51, 73, 0.03);
}

.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--accent-strong);
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    color: #14200d;
    background: linear-gradient(180deg, #8ed235, var(--accent));
    cursor: pointer;
}

.button-ghost.button-ghost-small {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.button-danger-ghost {
    color: #b73f3f;
}

.button-link:hover,
.button-ghost:hover {
    text-decoration: none;
    background: linear-gradient(180deg, rgba(250, 251, 254, 0.99) 0%, rgba(244, 247, 252, 0.99) 100%);
}

body.theme-dark .button-link,
body.theme-dark .button-ghost {
    background: linear-gradient(180deg, rgba(49, 55, 66, 0.98) 0%, rgba(41, 46, 56, 0.98) 100%);
    color: var(--ink);
    border-color: var(--line-strong);
    box-shadow: none;
}

body.theme-dark .parts-filter-drawer,
body.theme-dark .filter-drawer {
    background: transparent;
    border-color: transparent;
}

body.theme-dark .parts-filter-summary,
body.theme-dark .filter-summary {
    background: linear-gradient(180deg, rgba(22, 30, 49, 0.98) 0%, rgba(18, 25, 42, 0.98) 100%);
    border-color: rgba(104, 126, 164, 0.4);
    box-shadow: 0 8px 18px rgba(3, 8, 18, 0.22);
}

body.theme-dark .parts-filter-summary-meta,
body.theme-dark .filter-summary-meta {
    background: rgba(70, 77, 90, 0.96);
    color: rgba(233, 237, 244, 0.9);
}

body.theme-dark .parts-filter-drawer-body,
body.theme-dark .filter-drawer-body {
    background: linear-gradient(180deg, rgba(47, 53, 64, 0.985) 0%, rgba(40, 45, 54, 0.985) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

body.theme-dark .button-link:hover,
body.theme-dark .button-ghost:hover {
    background: linear-gradient(180deg, rgba(57, 63, 75, 0.99) 0%, rgba(47, 52, 62, 0.99) 100%);
}

body.theme-dark .button-danger-ghost {
    color: #ff8e8e;
}

.button-danger {
    color: #991b1b;
    border-color: #f3c4c4;
    background: #fff6f6;
}

.button-danger:hover {
    background: #feeaea;
}

.button-danger-outline {
    color: #c0392b;
    border-color: #efb5af;
    background: transparent;
}

.button-danger-outline:hover {
    background: #fff3f1;
}

.button-link-danger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: #c0392b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-link-danger:hover {
    color: #a5281b;
    text-decoration: underline;
}

body.theme-dark .button-danger-outline {
    color: #ffb4aa;
    border-color: rgba(255, 132, 132, 0.34);
    background: transparent;
}

body.theme-dark .button-danger-outline:hover {
    background: rgba(255, 132, 132, 0.12);
}

body.theme-dark .button-link-danger {
    color: #ffb4aa;
}

body.theme-dark .button-link-danger:hover {
    color: #ffc9c2;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.form-actions,
.inline-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.work-order-delete-button {
    margin-left: auto;
}

.vendor-delete-row {
    justify-content: flex-end;
}

.record-delete-row {
    justify-content: flex-end;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.import-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.import-platform-card {
    align-content: start;
}

.import-platform-meta {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.import-command-center {
    gap: 18px;
}

.import-command-center .dashboard-command-copy {
    max-width: 760px;
}

.import-command-tile {
    min-height: 0;
    gap: 14px;
}

.import-command-tile strong {
    font-size: 1.34rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.import-command-tile > p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.5;
}

.import-command-meta {
    display: grid;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
}

.import-command-meta span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.import-command-meta b {
    font-size: 0.96rem;
    color: var(--ink);
}

.import-overview-card {
    overflow: hidden;
}

.import-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.import-flow-step {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 253, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.import-flow-step-primary {
    border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
    background: linear-gradient(180deg, rgba(241, 248, 238, 0.98) 0%, rgba(250, 252, 249, 0.98) 100%);
}

.import-step-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    width: fit-content;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    background: rgba(255, 255, 255, 0.78);
    color: var(--accent-strong);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.import-flow-step h3 {
    margin: 0;
    font-size: 1.08rem;
}

.import-flow-step p {
    margin: 0;
    color: var(--ink-soft);
}

.import-step-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--ink-soft);
}

.import-step-list li::marker {
    color: var(--accent-strong);
}

.import-flow-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.import-flow-metrics > div {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.74);
}

.import-flow-metrics span,
.import-connection-detail span,
.import-modal-step span {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 700;
}

.import-flow-metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 1.3rem;
    line-height: 1;
}

.import-connection-list {
    display: grid;
    gap: 14px;
}

.import-connection-card {
    gap: 16px;
    padding: 18px 20px 20px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98) 0%, rgba(244, 247, 252, 0.98) 100%);
    border: 1px solid color-mix(in srgb, var(--line) 88%, rgba(195, 209, 231, 0.92));
}

.import-connection-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.import-connection-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--ink);
}

.import-connection-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.import-connection-detail {
    display: grid;
    gap: 6px;
}

.import-connection-card .badge-row,
.import-connection-card .table-actions {
    gap: 10px;
}

.import-stage-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.import-stage-filter-panel {
    align-content: start;
    gap: 12px;
}

.import-filter-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.import-filter-option {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
}

.import-filter-option span {
    font-size: 0.9rem;
    font-weight: 600;
}

.import-mono {
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.import-guidance-card {
    background:
        radial-gradient(circle at top right, rgba(182, 221, 240, 0.18), transparent 44%),
        linear-gradient(180deg, rgba(252, 253, 255, 0.99) 0%, rgba(247, 249, 253, 0.99) 100%);
}

.import-guidance-list,
.import-platform-summary-grid,
.import-modal-guide,
.import-job-stats {
    display: grid;
    gap: 12px;
}

.import-guidance-item,
.import-platform-summary,
.import-modal-step {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
}

.import-guidance-item strong,
.import-platform-summary strong,
.import-modal-step strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
}

.import-guidance-item p,
.import-platform-summary p,
.import-modal-step p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.import-platform-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-empty-state {
    text-align: left;
}

.import-modal-flash-stack {
    margin: 14px 0 0;
}

.import-modal-summary {
    gap: 8px;
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    background:
        radial-gradient(circle at top right, rgba(182, 221, 240, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(246, 249, 253, 0.98) 100%);
}

.import-modal-summary p {
    margin: 0;
}

.import-modal-close {
    color: #c0392b;
    border-color: #efb5af;
    background: rgba(255, 243, 241, 0.92);
}

.import-modal-close:hover {
    background: #fff3f1;
    border-color: #de928b;
    color: #a5281b;
}

body.theme-dark .import-modal-close {
    color: #ffb4aa;
    border-color: rgba(255, 132, 132, 0.34);
    background: rgba(255, 132, 132, 0.12);
}

body.theme-dark .import-modal-close:hover {
    background: rgba(255, 132, 132, 0.2);
    color: #ffd2cb;
}

.import-platform-fixed-url {
    gap: 8px;
}

.import-platform-fixed-url p {
    margin: 0;
}

.import-platform-fixed-url [data-import-fixed-url-value] {
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    font-size: 0.92rem;
    color: var(--ink);
}

.import-advanced-settings {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(246, 249, 253, 0.9);
    padding: 14px 16px;
}

.import-advanced-settings > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
}

.import-advanced-settings > label {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.import-stage-filters-wrap {
    gap: 14px;
}

.import-stage-filter-header {
    display: grid;
    gap: 4px;
}

.import-stage-filter-header p {
    margin: 0;
}

.import-modal-guide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-job-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.theme-dark .import-flow-step {
    background: linear-gradient(180deg, rgba(40, 47, 59, 0.98) 0%, rgba(33, 40, 53, 0.98) 100%);
    border-color: var(--line);
    box-shadow: none;
}

body.theme-dark .import-flow-step-primary {
    background: linear-gradient(180deg, rgba(48, 63, 50, 0.92) 0%, rgba(34, 43, 39, 0.96) 100%);
}

body.theme-dark .import-step-chip,
body.theme-dark .import-flow-metrics > div,
body.theme-dark .import-connection-card,
body.theme-dark .import-guidance-item,
body.theme-dark .import-platform-summary,
body.theme-dark .import-filter-option,
body.theme-dark .import-modal-step,
body.theme-dark .import-advanced-settings {
    background: rgba(24, 31, 43, 0.92);
    border-color: var(--line);
}

body.theme-dark .import-guidance-card {
    background:
        radial-gradient(circle at top right, rgba(92, 150, 189, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(36, 43, 56, 0.98) 0%, rgba(28, 34, 45, 0.98) 100%);
}

body.theme-dark .import-modal-summary {
    background:
        radial-gradient(circle at top right, rgba(92, 150, 189, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(36, 43, 56, 0.98) 0%, rgba(28, 34, 45, 0.98) 100%);
    border-color: var(--line);
}

body.theme-dark .import-command-meta {
    border-top-color: color-mix(in srgb, var(--line) 84%, transparent);
}

body.theme-dark .import-filter-option span {
    color: var(--ink);
}

.code-textarea {
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    font-size: 0.85rem;
    min-height: 220px;
}

.button-theme-toggle {
    min-width: 112px;
}

.permission-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.permission-check {
    padding: 0;
    min-width: 0;
}

.request-action-card {
    margin-top: 18px;
}

.request-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.modal-card.modal-card-compact {
    max-width: 760px;
}

.compact-form textarea {
    min-height: 90px;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    padding-top: 10px;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin: 0;
}

.checkbox-row span {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    color: var(--ink);
    font-weight: 600;
}

.editor-section-label {
    margin: 0 0 10px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 700;
}

.field-note {
    margin: 10px 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

/* Shared live part selector ------------------------------------------------ */
.part-selector {
    display: grid;
    gap: 10px;
    min-width: 0;
    position: relative;
}

.part-selector-label {
    color: var(--text-muted, #667085);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.part-selector-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
    gap: 8px;
    align-items: center;
}

.part-selector-search-wrap {
    min-width: 0;
    position: relative;
}

.part-selector-search-icon {
    color: var(--text-muted, #667085);
    font-size: 1.15rem;
    left: 12px;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.part-selector .part-selector-search {
    min-width: 0;
    padding-left: 36px;
    width: 100%;
}

.part-selector-sort,
.part-selector-stock-filter {
    min-width: 130px;
}

.part-selector label.part-selector-relevance-toggle {
    align-items: center;
    background: var(--surface-soft, #f6f8fb);
    border: 1px solid var(--border, #d6deea);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex !important;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    white-space: nowrap;
}

.part-selector label.part-selector-relevance-toggle input {
    flex: 0 0 auto;
    margin: 0;
    min-height: 0;
    width: auto !important;
}

.part-selector-native {
    height: 1px !important;
    left: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 45px;
    width: 1px !important;
}

.part-selector-results-head {
    align-items: center;
    color: var(--text-muted, #667085);
    display: flex;
    font-size: 0.78rem;
    justify-content: space-between;
    min-height: 24px;
}

.part-selector-clear {
    min-height: 28px !important;
    padding: 3px 9px !important;
}

.part-selector-results {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    max-height: min(390px, 48vh);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 2px;
    scrollbar-gutter: stable;
}

.part-selector-card {
    align-items: stretch;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d6deea);
    border-radius: 13px;
    color: var(--text, #20283a);
    display: grid;
    grid-template-rows: 104px 1fr;
    min-height: 210px;
    overflow: hidden;
    padding: 0;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.part-selector-card:hover,
.part-selector-card:focus-visible {
    border-color: var(--accent, #83c52b);
    box-shadow: 0 8px 24px rgba(38, 54, 76, 0.12);
    transform: translateY(-1px);
}

.part-selector-card.is-selected {
    border-color: var(--accent-strong, #69a51e);
    box-shadow: 0 0 0 2px rgba(126, 199, 39, 0.24);
}

.part-selector-card-media {
    align-items: center;
    background: var(--surface-soft, #f5f7fa);
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.part-selector-card-media img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.part-selector-card-placeholder {
    color: var(--text-muted, #8791a4);
    font-size: 2.2rem;
}

.part-selector-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 11px 11px;
}

.part-selector-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 2px;
}

.part-selector-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.63rem;
    font-weight: 750;
    line-height: 1;
    padding: 5px 7px;
}

.part-selector-badge-status,
.part-selector-badge-stock {
    background: #e5f6dc;
    color: #2e711d;
}

.part-selector-badge-status-inactive {
    background: #e9edf2;
    color: #596575;
}

.part-selector-badge-status-obsolete {
    background: #fff0ce;
    color: #855b12;
}

.part-selector-badge-out {
    background: #fde2e2;
    color: #a32f2f;
}

.part-selector-badge-relevant {
    background: #e6eefc;
    color: #315d9b;
}

.part-selector-card-name {
    display: -webkit-box;
    font-size: 0.82rem;
    line-height: 1.3;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.part-selector-card-number,
.part-selector-card-meta {
    color: var(--text-muted, #667085);
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-selector-card-meta {
    display: flex;
    gap: 8px;
}

.part-selector-card-stock {
    align-items: baseline;
    display: flex;
    margin-top: auto;
}

.part-selector-card-stock strong {
    font-size: 1rem;
}

.part-selector-card-stock span,
.part-selector-card-stock small {
    color: var(--text-muted, #667085);
    font-size: 0.68rem;
}

/* Grid cards share the number/metadata row so longer names do not push stock
   information through the bottom edge of the card. */
.part-selector:where(:not(.is-list-view)) .part-selector-card,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card {
    min-height: 224px;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-body,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 3px 8px;
    padding: 9px 11px 10px;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-badges,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-badges,
.part-selector:where(:not(.is-list-view)) .part-selector-card-name,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-name,
.part-selector:where(:not(.is-list-view)) .part-selector-card-stock,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-stock {
    grid-column: 1 / -1;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-badges,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-badges {
    grid-row: 1;
    margin-bottom: 0;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-name,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-name {
    grid-row: 2;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-number,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-number {
    grid-column: 1;
    grid-row: 3;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-meta,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-meta {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
}

.part-selector:where(:not(.is-list-view)) .part-selector-card-stock,
.part-selector-explorer-layer:where(:not(.is-list-view)) .part-selector-card-stock {
    grid-row: 4;
    margin-top: 1px;
}

.part-selector-card.is-out-of-stock .part-selector-card-stock strong {
    color: #b43c3c;
}

.part-selector.is-list-view .part-selector-results {
    grid-template-columns: 1fr;
}

.part-selector.is-list-view .part-selector-card {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 96px;
}

.part-selector.is-list-view .part-selector-card-media {
    min-height: 94px;
    padding: 9px;
    box-sizing: border-box;
}

.part-selector.is-list-view .part-selector-card-body {
    padding: 10px 14px 11px;
}

.part-selector.is-list-view .part-selector-card-stock {
    margin-top: 2px;
}

.part-selector-more {
    grid-column: 1 / -1;
    justify-self: center;
}

.part-selector-empty {
    align-items: center;
    background: var(--surface-soft, #f6f8fb);
    border: 1px dashed var(--border, #d6deea);
    border-radius: 12px;
    color: var(--text-muted, #667085);
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 22px;
    text-align: center;
}

.part-selector-selection {
    align-items: center;
    background: #eef8e7;
    border: 1px solid #b9dd96;
    border-radius: 11px;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.75rem;
    gap: 5px 12px;
    padding: 9px 11px;
}

.part-selector-selection.is-warning {
    background: #fff3e3;
    border-color: #efba70;
    color: #7d4314;
}

.part-selector-shortage {
    flex-basis: 100%;
    font-weight: 700;
}

.part-selector.part-selector-compact .part-selector-toolbar {
    grid-template-columns: minmax(180px, 1fr) auto auto;
}

.part-selector.part-selector-compact .part-selector-relevance-toggle,
.part-selector.part-selector-compact .part-selector-view-toggle {
    display: none;
}

.part-selector.part-selector-compact .part-selector-results-head,
.part-selector.part-selector-compact .part-selector-results,
.part-selector.part-selector-compact .part-selector-empty {
    display: none;
}

.part-selector.part-selector-compact:focus-within {
    z-index: 20;
}

.part-selector.part-selector-compact:focus-within .part-selector-results-head {
    display: flex;
}

.part-selector.part-selector-compact:focus-within .part-selector-results {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d6deea);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(28, 39, 56, 0.18);
    display: grid;
    left: 0;
    max-height: 320px;
    min-width: min(720px, 80vw);
    padding: 10px;
    position: absolute;
    top: calc(100% - 38px);
}

.part-selector.part-selector-compact:focus-within .part-selector-empty:not([hidden]) {
    display: flex;
}

@media (max-width: 900px) {
    .part-selector-toolbar,
    .part-selector.part-selector-compact .part-selector-toolbar {
        grid-template-columns: minmax(0, 1fr) 1fr;
    }

    .part-selector-search-wrap {
        grid-column: 1 / -1;
    }

    .part-selector-results {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }

    .part-selector.part-selector-compact:focus-within .part-selector-results {
        min-width: min(92vw, 620px);
    }
}

@media (max-width: 560px) {
    .part-selector-results {
        grid-template-columns: 1fr 1fr;
    }

    .part-selector-card {
        grid-template-rows: 88px 1fr;
        min-height: 196px;
    }

    .part-selector-relevance-toggle,
    .part-selector-view-toggle {
        justify-self: stretch;
    }
}

.part-delete-error,
.part-force-delete-form,
.vendor-delete-error,
.vendor-force-delete-form {
    display: grid;
    gap: 14px;
    line-height: 1.5;
}

.part-delete-error p,
.vendor-delete-error p {
    margin: 0;
    font-weight: 400;
}

.part-force-delete-form > button,
.vendor-force-delete-form > button {
    justify-self: start;
}

.vendor-managed-parts-link {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 999px;
    padding: 3px 10px;
    color: var(--accent-dark);
    background: color-mix(in srgb, var(--accent) 9%, var(--surface));
    font-weight: 800;
    text-decoration: none;
}

.vendor-managed-parts-link:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
    transform: translateY(-1px);
}

.vendor-delete-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(16, 24, 20, 0.66);
    backdrop-filter: blur(8px);
}

.vendor-delete-modal {
    width: min(680px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid color-mix(in srgb, #d84b4b 28%, var(--line));
    border-radius: 22px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.vendor-delete-modal-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, #d84b4b 10%, var(--surface)), var(--surface));
}

.vendor-delete-modal-head h2,
.vendor-delete-modal-head p {
    margin: 0;
}

.vendor-delete-modal-head h2 {
    margin-top: 3px;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.vendor-delete-modal-head p:last-child {
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.45;
}

.vendor-delete-modal-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: #c83f3f;
    box-shadow: 0 9px 22px rgba(183, 48, 48, 0.25);
    font-size: 1.35rem;
    font-weight: 900;
}

.vendor-delete-modal-body {
    display: grid;
    gap: 20px;
    padding: 24px;
}

.vendor-delete-impact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.vendor-delete-impact-grid > div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.vendor-delete-impact-grid strong {
    font-size: 1.35rem;
}

.vendor-delete-impact-grid span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
}

.vendor-force-delete-form {
    gap: 18px;
}

.vendor-delete-reassignment-field {
    display: grid;
    gap: 8px;
}

.vendor-delete-reassignment-field > span {
    font-weight: 800;
}

.vendor-delete-reassignment-field select {
    width: 100%;
    min-height: 48px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 0 46px 0 14px;
    color: var(--ink);
    background:
        linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 20px) calc(50% - 3px) / 7px 7px no-repeat,
        linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 14px) calc(50% - 3px) / 7px 7px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 253, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        0 3px 10px rgba(47, 51, 73, 0.05);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.vendor-delete-reassignment-field select:hover {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
}

.vendor-delete-reassignment-field select:focus {
    outline: none;
    border-color: rgba(124, 190, 40, 0.72);
    box-shadow:
        0 0 0 3px rgba(124, 190, 40, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.vendor-delete-reassignment-field select option {
    color: var(--ink);
    background: var(--panel);
}

body.theme-dark .vendor-delete-reassignment-field select {
    border-color: var(--line-strong);
    background:
        linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 20px) calc(50% - 3px) / 7px 7px no-repeat,
        linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 14px) calc(50% - 3px) / 7px 7px no-repeat,
        linear-gradient(180deg, rgba(57, 63, 74, 0.99), rgba(47, 53, 63, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.vendor-delete-reassignment-field small,
.vendor-delete-modal-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.vendor-delete-modal-warning {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, #d84b4b 34%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, #d84b4b 7%, var(--surface));
}

.vendor-delete-modal-warning span {
    color: var(--muted);
    font-weight: 400;
    line-height: 1.45;
}

.vendor-delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}

.vendor-delete-modal-actions > * {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.vendor-delete-modal-actions > .button-danger {
    border: 1px solid #c83f3f;
    color: #fff;
    background: linear-gradient(180deg, #dc5757, #bc3434);
}

.vendor-delete-modal-actions > .button-danger:hover {
    background: linear-gradient(180deg, #c94646, #a92b2b);
}

@media (max-width: 700px) {
    .vendor-delete-modal-backdrop {
        align-items: end;
        padding: 10px;
    }

    .vendor-delete-modal {
        max-height: calc(100vh - 20px);
        border-radius: 20px 20px 14px 14px;
    }

    .vendor-delete-modal-head {
        grid-template-columns: auto minmax(0, 1fr) auto;
        padding: 19px 16px 16px;
    }

    .vendor-delete-modal-body {
        padding: 18px 16px;
    }

    .vendor-delete-impact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vendor-delete-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .vendor-delete-modal-actions > * {
        justify-content: center;
        text-align: center;
    }
}

.flash,
.alert {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
    background: #fff;
}

body.theme-dark .flash,
body.theme-dark .alert {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
    color: var(--ink);
}

.inline-form {
    display: inline-flex;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e7edf3;
}

.data-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--ink-muted) 86%, #5f7388 14%);
    background: linear-gradient(180deg, rgba(245, 247, 251, 0.99) 0%, rgba(240, 244, 249, 0.99) 100%);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    box-shadow: inset 0 -1px 0 rgba(224, 229, 238, 0.98);
}

.data-table thead th.is-sortable {
    cursor: pointer;
}

.compact-stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.compact-stat-chip {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.compact-stat-chip:hover {
    text-decoration: none;
    border-color: #c6d3df;
    transform: translateY(-1px);
}

.compact-stat-chip .label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.compact-stat-chip strong {
    font-size: 1.45rem;
    color: var(--ink);
}

.compact-stat-chip .hint {
    font-size: 0.84rem;
    color: var(--ink-soft);
}

.bulk-parts-form {
    display: grid;
    gap: 14px;
}

.bulk-toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--register-control-height, 36px);
    margin-bottom: 12px;
}

.bulk-parts-form > .bulk-toolbar-row {
    margin-bottom: 0;
}

.bulk-toolbar-row .view-dropdown-options {
    width: max-content;
    max-height: min(55dvh, 25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bulk-selection {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 0.875rem;
    white-space: nowrap;
}

.bulk-selection[hidden],
.bulk-action-settings[hidden] {
    display: none;
}

.bulk-selection > strong {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--ink);
}

.bulk-toolbar-row .bulk-selection > .button-ghost {
    width: auto;
    gap: 0.25em;
    min-height: var(--register-control-height, 36px);
    padding: 0 8px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
}

.bulk-toolbar-row .bulk-selection > .button-ghost:is(:hover, :focus-visible) {
    background: var(--panel-soft);
    color: var(--ink);
}

.bulk-action-settings {
    display: grid;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.bulk-action-settings .bulk-toolbar-actions > :is(.button-primary, .button-ghost) {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
}

@media (max-width: 480px) {
    .bulk-toolbar-row {
        gap: 6px;
    }

    .bulk-selection {
        gap: 2px;
    }

    .bulk-toolbar-row .bulk-selection > .button-ghost {
        padding-inline: 5px;
    }

    .bulk-selection > .button-ghost span {
        display: none;
    }
}

body.theme-dark .module-stat,
body.theme-dark .stack-item,
body.theme-dark .feature-card {
    background: linear-gradient(180deg, rgba(48, 54, 64, 0.985) 0%, rgba(40, 45, 54, 0.985) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

body.theme-dark .card > .section-heading:first-child,
body.theme-dark .card > .project-header:first-child {
    background: transparent;
    border-bottom-color: color-mix(in srgb, var(--line) 92%, transparent);
    box-shadow: none;
}

body.theme-dark .parts-filter-summary,
body.theme-dark .filter-summary {
    background: linear-gradient(180deg, rgba(49, 55, 66, 0.985) 0%, rgba(41, 46, 56, 0.985) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

body.theme-dark .data-table thead th {
    background: linear-gradient(180deg, rgba(53, 59, 70, 0.99) 0%, rgba(45, 50, 60, 0.99) 100%);
    border-bottom-color: var(--line-strong);
    box-shadow: inset 0 -1px 0 rgba(91, 100, 114, 0.52);
}

.bulk-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-toolbar-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bulk-toolbar-tabs .toolbar-pill {
    border-radius: 12px;
    min-width: 0;
}

.bulk-toolbar-tabs .toolbar-pill.is-active {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    color: var(--accent-strong);
}

.bulk-toolbar-panel-group {
    display: grid;
    gap: 10px;
}

.bulk-toolbar-panel[hidden] {
    display: none !important;
}

.bulk-toolbar-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.bulk-toolbar-field {
    min-width: 0;
    flex: 1 1 240px;
    display: grid;
    gap: 6px;
}

.bulk-toolbar-field span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.bulk-toolbar-field input[type="text"],
.bulk-toolbar-field input[type="file"],
.bulk-toolbar-field select {
    width: 100%;
}

.bulk-toolbar-field-target {
    flex: 0 1 220px;
}

.bulk-toolbar-check {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 2px;
    color: var(--ink);
}

.bulk-toolbar-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: auto;
    margin: 0;
}

.bulk-toolbar-note {
    margin: 0;
    max-width: 560px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.parts-table {
    min-width: 980px;
}

.parts-table td:first-child,
.parts-table th:first-child {
    width: 44px;
}

.parts-table td {
    vertical-align: middle;
}

.parts-table td:nth-child(2) {
    min-width: 210px;
}

.parts-metric-cell {
    min-width: 96px;
}

.parts-live-stepper {
    display: inline-grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 164px;
}

.parts-stepper-button {
    min-height: 38px;
    width: 28px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0;
    background: var(--panel-soft);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.parts-stepper-button:hover {
    background: color-mix(in srgb, var(--accent) 10%, var(--panel));
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.parts-stepper-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.parts-inline-field {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 92px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.parts-inline-field-money {
    max-width: 110px;
    gap: 4px;
}

.parts-inline-field > span {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.parts-inline-field .inline-metric-input {
    width: 100%;
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.92rem;
    font-weight: 700;
}

.parts-inline-field .inline-metric-input:focus {
    outline: none;
}

.inline-secondary-text {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.inline-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.parts-inline-save {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
    color: var(--accent-strong);
}

.parts-inline-save.is-busy,
.parts-stepper-button.is-busy {
    pointer-events: none;
}

.parts-inline-feedback {
    min-width: 54px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.parts-inline-feedback[data-tone="success"] {
    color: #4f7a16;
}

.parts-inline-feedback[data-tone="error"] {
    color: #b42318;
}

.part-location-extra {
    display: block;
    margin-top: 4px;
}

.table-check-toggle,
.parts-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: auto;
    margin: 0;
}

.stock-movement-card {
    display: grid;
    gap: 14px;
}

.movement-table {
    min-width: 1120px;
}

.tree-table {
    border-collapse: collapse;
    border-spacing: 0;
}

.tree-table thead th {
    background: #f4f7fb;
    border-bottom: 1px solid #e5ecf3;
}

.tree-table tbody td {
    border-bottom: 1px solid #e5ecf3;
    background: transparent;
}

.tree-table:not(.tree-table-has-selector) tbody td:first-child {
    width: 32%;
}

.tree-table.tree-table-has-selector thead th:first-child,
.tree-table.tree-table-has-selector tbody td:first-child {
    width: 44px;
    min-width: 44px;
}

.tree-table.tree-table-has-selector tbody td:nth-child(2) {
    width: 32%;
}

.tree-table tbody tr:hover td {
    background: #f9fbfd;
}

.tree-link {
    display: block;
    color: var(--ink);
}

.tree-link:hover {
    text-decoration: none;
}

.tree-entry {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-left: calc(var(--tree-depth, 0) * 42px);
    padding: 6px 0;
}

.tree-marker {
    position: relative;
    width: 22px;
    height: 18px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.tree-elbow {
    position: absolute;
    left: 1px;
    top: 0;
    width: 14px;
    height: 14px;
    border-left: 1.5px solid #cfd9e3;
    border-bottom: 1.5px solid #cfd9e3;
    border-bottom-left-radius: 8px;
}

.tree-dot {
    position: relative;
    z-index: 1;
    width: 10px;
    height: 10px;
    margin-top: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8fd33a, var(--accent));
    box-shadow: 0 0 0 4px rgba(124, 190, 40, 0.13);
}

.tree-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.tree-copy strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.tree-meta,
.tree-structure .muted {
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.tree-structure {
    display: grid;
    gap: 4px;
}

.tree-counts {
    display: grid;
    gap: 2px;
}

.tree-counts strong {
    font-size: 1rem;
}

.tree-action-cell {
    white-space: nowrap;
    text-align: right;
}

.tree-mini-map {
    display: grid;
    gap: 8px;
}

.tree-mini-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    padding-left: calc(var(--tree-depth, 0) * 28px + 12px);
    border-bottom: 1px solid #e7edf3;
}

.tree-mini-row a {
    font-weight: 700;
}

.asset-heading,
.asset-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.asset-identity {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.asset-identity-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.asset-name-link {
    color: #2e5f96;
    font-weight: 700;
}

.asset-name-link:hover {
    text-decoration: none;
}

.copy-value {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #365b86;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.copy-value:hover {
    text-decoration: underline;
}

.copy-value.is-copied {
    color: #21663a;
}

.asset-subcopy {
    padding: 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    font-weight: 500;
}

.asset-subcopy:hover {
    color: #2e5f96;
    text-decoration: underline;
}

.copy-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(22, 30, 39, 0.94);
    color: #f8fbff;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

html.has-work-order-workspace .copy-toast,
html.has-request-workspace .copy-toast,
html.has-purchase-order-workspace .copy-toast,
body.has-work-order-workspace .copy-toast,
body.has-request-workspace .copy-toast,
body.has-purchase-order-workspace .copy-toast {
    right: auto;
    left: 50%;
    top: 34px;
    bottom: auto;
    transform: translate(-50%, -10px);
}

html.has-work-order-workspace .copy-toast.is-visible,
html.has-request-workspace .copy-toast.is-visible,
html.has-purchase-order-workspace .copy-toast.is-visible,
body.has-work-order-workspace .copy-toast.is-visible,
body.has-request-workspace .copy-toast.is-visible,
body.has-purchase-order-workspace .copy-toast.is-visible {
    transform: translate(-50%, 0);
}

.status-signal {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 10px;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(124, 190, 40, 0.13);
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--ink);
}

.status-signal.is-green {
    background: linear-gradient(180deg, #8fd33a, var(--accent));
    box-shadow: 0 0 0 4px rgba(124, 190, 40, 0.13);
}

.status-signal.is-amber {
    background: linear-gradient(180deg, #f8d36b, #dca61b);
    box-shadow: 0 0 0 4px rgba(220, 166, 27, 0.16);
}

.status-signal.is-orange {
    background: linear-gradient(180deg, #f8b24a, #f08a14);
    box-shadow: 0 0 0 4px rgba(240, 138, 20, 0.16);
}

.status-signal.is-red {
    background: linear-gradient(180deg, #f06262, #d93434);
    box-shadow: 0 0 0 4px rgba(217, 52, 52, 0.15);
}

.status-signal.is-blue {
    background: linear-gradient(180deg, #4ea0ff, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.status-signal.is-purple {
    background: linear-gradient(180deg, #9c7ff7, #6b42b5);
    box-shadow: 0 0 0 4px rgba(107, 66, 181, 0.14);
}

.status-signal.is-cyan {
    background: linear-gradient(180deg, #6fe2ec, #0f8a94);
    box-shadow: 0 0 0 4px rgba(15, 138, 148, 0.14);
}

.status-signal.is-indigo {
    background: linear-gradient(180deg, #8da3ff, #445bb7);
    box-shadow: 0 0 0 4px rgba(68, 91, 183, 0.14);
}

.status-signal.is-slate {
    background: linear-gradient(180deg, #adb8c4, #7d8793);
    box-shadow: 0 0 0 4px rgba(125, 135, 147, 0.14);
}

.status-signal.is-operational {
    background: linear-gradient(180deg, #8fd33a, var(--accent));
    box-shadow: 0 0 0 4px rgba(124, 190, 40, 0.13);
}

.status-signal.is-caution {
    background: linear-gradient(180deg, #f8b24a, #f08a14);
    box-shadow: 0 0 0 4px rgba(240, 138, 20, 0.16);
}

.status-signal.is-down {
    background: linear-gradient(180deg, #f06262, #d93434);
    box-shadow: 0 0 0 4px rgba(217, 52, 52, 0.15);
}

.status-signal.is-retired {
    background: linear-gradient(180deg, #adb8c4, #7d8793);
    box-shadow: 0 0 0 4px rgba(125, 135, 147, 0.14);
}

.status-signal.is-pulsing {
    animation: status-signal-pulse 1.6s ease-in-out infinite;
}

@keyframes status-signal-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.14);
        opacity: 0.72;
    }
}

@media (max-width: 720px) {
    .copy-toast {
        right: 14px;
        bottom: 14px;
        left: 14px;
        text-align: center;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    cursor: pointer;
}

.table-sort-link:hover {
    text-decoration: none;
    color: var(--ink);
}

.table-sort-link.is-active {
    color: var(--ink);
}

.editor-form .table-sort-link,
.editor-form .table-sort-link:hover,
.editor-form .table-sort-link:focus {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: inherit;
}

.table-sort-indicator {
    min-width: 10px;
    color: var(--accent-strong);
}

.tone-green {
    background: #e4f4dd;
    color: #21663a;
}

.tone-blue {
    background: #e2ecfb;
    color: #2a5f97;
}

.tone-amber {
    background: #f5edd7;
    color: #8a6a1b;
}

.tone-orange {
    background: #f7e3d6;
    color: #9b5222;
}

.tone-purple {
    background: #ebe4fb;
    color: #6b42b5;
}

.tone-cyan {
    background: #dff5f7;
    color: #0f6c74;
}

.tone-indigo {
    background: #e4e8fb;
    color: #445bb7;
}

.tone-red {
    background: #f5dbdb;
    color: #9d3737;
}

.tone-slate {
    background: #e7edf2;
    color: #546270;
}

.project-count {
    font-weight: 800;
    color: var(--ink) !important;
}

.table-chip-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.table-chip {
    display: inline-flex;
    justify-content: center;
    text-align: center;
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 0.76rem;
    font-weight: 800;
    background: #eef3f7;
    color: var(--ink);
}

.flash.tone-green,
.alert.tone-green {
    border-color: #bfe0bd;
}

.flash.tone-red,
.alert.tone-red {
    border-color: #e3bdbd;
}

.flash.tone-orange,
.alert.tone-orange {
    border-color: #e8cfb3;
}

.flash.tone-blue,
.alert.tone-blue {
    border-color: #c7d6eb;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    align-items: start;
    justify-items: center;
    overflow-y: auto;
    padding: 32px 20px 32px calc(var(--sidebar-rail-width, 224px) + 20px);
    background: rgba(18, 24, 31, 0.52);
    backdrop-filter: blur(6px);
}

.modal-backdrop[data-processing-overlay-active="true"] {
    overflow: hidden;
}

.inspection-modal-backdrop {
    z-index: 110;
}

.modal-card {
    --modal-card-padding: 24px;
    --modal-card-radius: 20px;
    display: grid;
    gap: 18px;
    width: min(960px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--modal-card-radius);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
    padding: var(--modal-card-padding);
}

.modal-card.modal-card-narrow {
    width: min(720px, 100%);
}

.modal-card.modal-card-parts {
    width: min(1180px, 100%);
}

.modal-card.modal-card-workspace-size {
    width: min(1180px, 100%);
}

.modal-card.modal-card-wide {
    width: min(1320px, 100%);
}

.save-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(12, 18, 24, 0.30);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.save-processing-overlay[hidden] {
    display: none !important;
}

.save-processing-card {
    width: min(460px, 100%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 28px 30px;
    border: 1px solid rgba(191, 214, 169, 0.42);
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(148, 214, 62, 0.16), transparent 54%),
        rgba(255, 255, 255, 0.92);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
    text-align: center;
}

.save-processing-spinner {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 4px solid rgba(35, 48, 61, 0.14);
    border-top-color: var(--accent);
    animation: save-processing-spin 0.9s linear infinite;
}

.save-processing-eyebrow {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.save-processing-card h3 {
    margin: 0;
    font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.7rem);
}

.save-processing-card p:last-child {
    margin: 0;
    max-width: 30ch;
    color: var(--ink-soft);
}

body.theme-dark .save-processing-overlay {
    background: rgba(4, 8, 12, 0.44);
}

body.theme-dark .save-processing-card {
    border-color: rgba(151, 224, 68, 0.24);
    background:
        radial-gradient(circle at top, rgba(148, 214, 62, 0.14), transparent 54%),
        rgba(22, 28, 35, 0.94);
    box-shadow: 0 30px 76px rgba(0, 0, 0, 0.38);
}

body.theme-dark .save-processing-spinner {
    border-color: rgba(255, 255, 255, 0.10);
    border-top-color: var(--accent);
}

@keyframes save-processing-spin {
    to {
        transform: rotate(360deg);
    }
}

.modal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin: calc(-1 * var(--modal-card-padding)) calc(-1 * var(--modal-card-padding)) 0;
    padding: 20px var(--modal-card-padding);
    border-bottom: 1px solid var(--modal-header-border);
    border-radius: calc(var(--modal-card-radius) - 1px) calc(var(--modal-card-radius) - 1px) 0 0;
    background: var(--modal-header-background);
    box-shadow: var(--modal-header-shadow);
    color: var(--modal-header-title);
}

.modal-header h2 {
    margin: 4px 0 0;
    color: var(--modal-header-title);
}

.modal-header .card-label {
    color: var(--modal-header-muted);
}

.modal-header .modal-subtitle {
    color: var(--modal-header-copy);
}

.modal-header .button-ghost,
.modal-header .wo-workspace-close {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--modal-header-title);
}

.modal-header .button-ghost:hover,
.modal-header .button-ghost:focus-visible,
.modal-header .wo-workspace-close:hover,
.modal-header .wo-workspace-close:focus-visible {
    background: rgba(124, 190, 40, 0.18);
    border-color: rgba(124, 190, 40, 0.5);
    color: #ffffff;
}

.scheduler-work-order-link {
    color: inherit;
    text-decoration: none;
    font-weight: 800;
}

.scheduler-work-order-link:hover,
.scheduler-work-order-link:focus-visible {
    color: var(--accent);
    text-decoration: none;
}

.scheduler-preview-modal {
    width: min(980px, 100%);
    padding: 0;
    overflow: hidden;
}

.scheduler-preview-shell {
    display: grid;
    gap: 0;
}

.scheduler-preview-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px 26px;
    border-bottom: 1px solid var(--modal-header-border);
    background: var(--modal-header-background);
    box-shadow: var(--modal-header-shadow);
    color: var(--modal-header-title);
}

.scheduler-preview-hero-copy {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.scheduler-preview-eyebrow {
    margin: 0;
    color: var(--modal-header-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.scheduler-preview-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.scheduler-preview-code-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--modal-header-title);
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.scheduler-preview-title-row h2 {
    margin: 0;
    max-width: 18ch;
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    line-height: 1.08;
    color: var(--modal-header-title);
}

.scheduler-preview-subtitle {
    margin: 0;
    max-width: 56ch;
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.55;
}

.scheduler-preview-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scheduler-preview-close {
    align-self: start;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--modal-header-title);
}

.scheduler-preview-close:hover,
.scheduler-preview-close:focus-visible {
    background: rgba(124, 190, 40, 0.18);
    border-color: rgba(124, 190, 40, 0.5);
    color: #ffffff;
}

.scheduler-preview-body {
    display: grid;
    grid-template-columns: minmax(0, 1.24fr) minmax(300px, 0.96fr);
    gap: 20px;
    padding: 24px 30px 18px;
}

.scheduler-preview-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.scheduler-preview-panel {
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 253, 0.98) 100%);
    padding: 20px 22px;
    box-shadow: 0 12px 30px rgba(47, 51, 73, 0.06);
}

.scheduler-preview-panel-main {
    min-height: 100%;
}

.scheduler-preview-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.scheduler-preview-panel-label,
.scheduler-preview-metric span,
.scheduler-preview-fact span,
.scheduler-preview-note span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scheduler-preview-panel-note {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.scheduler-preview-scope-copy {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.78;
    white-space: pre-line;
}

.scheduler-preview-note {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
}

.scheduler-preview-note p {
    margin: 0;
    color: var(--ink);
    line-height: 1.55;
}

.scheduler-preview-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.scheduler-preview-metric {
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--panel-soft);
    padding: 16px;
    display: grid;
    gap: 8px;
}

.scheduler-preview-metric strong,
.scheduler-preview-fact strong {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.45;
}

.scheduler-preview-fact-list {
    display: grid;
    gap: 0;
}

.scheduler-preview-fact {
    display: grid;
    gap: 6px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.scheduler-preview-fact:first-child {
    padding-top: 0;
    border-top: 0;
}

.scheduler-preview-fact:last-child {
    padding-bottom: 0;
}

.scheduler-preview-actions {
    justify-content: flex-start;
    padding: 18px 30px 28px;
    border-top: 1px solid var(--line);
}

.scheduler-preview-primary-action {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(36, 98, 180, 0.16);
}

.scheduler-preview-primary-action:hover,
.scheduler-preview-primary-action:focus-visible {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

body.theme-dark .scheduler-preview-hero {
    background: linear-gradient(135deg, rgba(124, 190, 40, 0.16) 0%, rgba(36, 98, 180, 0.12) 44%, rgba(24, 30, 40, 0.98) 100%);
}

body.theme-dark .scheduler-preview-code-pill {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .scheduler-preview-panel {
    background: linear-gradient(180deg, rgba(35, 42, 54, 0.98) 0%, rgba(24, 30, 40, 0.98) 100%);
    box-shadow: none;
}

body.theme-dark .scheduler-preview-metric,
body.theme-dark .scheduler-preview-note,
body.theme-dark .scheduler-preview-panel-note {
    background: rgba(255, 255, 255, 0.04);
}

.table-subcopy {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.modal-subtitle {
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.45;
}

.top-spacer {
    margin-top: 18px;
}

.top-spacer-small {
    margin-top: 12px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

@media (max-width: 900px) {
    .scheduler-preview-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .scheduler-preview-hero,
    .scheduler-preview-body,
    .scheduler-preview-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .scheduler-preview-metric-grid {
        grid-template-columns: 1fr;
    }

    .scheduler-preview-title-row {
        align-items: flex-start;
    }

    .scheduler-preview-close {
        width: 100%;
        justify-content: center;
    }
}

.record-focus-card {
    border-color: var(--line-strong);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.table-wrap-auto {
    padding-bottom: 2px;
}

.compact-table th,
.compact-table td {
    padding: 10px 8px;
}

.media-workspace,
.scheduler-workspace {
    display: grid;
    gap: 18px;
}

.media-workspace {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.scheduler-workspace {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.media-card {
    display: grid;
    gap: 14px;
    align-content: start;
}

.media-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 14px;
}

.media-placeholder {
    min-height: 260px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f9 100%);
    color: var(--ink-muted);
    font-weight: 700;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.gallery-thumb {
    display: block;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    overflow: hidden;
}

.gallery-thumb:hover {
    text-decoration: none;
    border-color: #cfd9e4;
}

.gallery-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.gallery-note {
    margin: -4px 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.editor-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 140px));
    justify-content: start;
    gap: 12px;
}

.editor-image-gallery-small {
    grid-template-columns: repeat(auto-fit, minmax(72px, 88px));
    gap: 10px;
}

.editor-image-field {
    display: grid;
    gap: 10px;
}

.current-media-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 140px));
}

.editor-image-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: default;
}

.editor-image-tile img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s ease, filter 0.18s ease, transform 0.18s ease;
}

.editor-image-tile:hover img {
    transform: scale(1.02);
}

.editor-image-tile-single {
    max-width: 140px;
}

.editor-image-tile-small {
    max-width: 88px;
}

.part-editor-media-advanced .editor-image-tile {
    cursor: default;
}

button.editor-image-delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.96);
    color: #526076;
    font: inherit;
    font-size: 17px;
    font-weight: 650;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    appearance: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    z-index: 2;
}

button.editor-image-delete-button:hover,
button.editor-image-delete-button:focus-visible {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
    box-shadow: 0 4px 11px rgba(220, 38, 38, 0.3);
    transform: scale(1.04);
}

button.editor-image-delete-button:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.part-image-upload-status {
    min-height: 1.25rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.part-image-upload-status.is-success {
    color: #15803d;
}

.part-image-upload-status.is-error {
    color: #b91c1c;
}

.entity-image-status {
    min-height: 1.25rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.entity-image-status.is-success { color: #15803d; }
.entity-image-status.is-error { color: #b91c1c; }

.qr-panel,
.barcode-panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.qr-panel img,
.barcode-panel img {
    width: 100%;
    height: auto;
    display: block;
}

.qr-panel-actions {
    margin-top: 12px;
}

.part-focus-card {
    display: grid;
    gap: 18px;
}

.part-focus-heading {
    align-items: start;
    gap: 18px;
}

.part-focus-heading-main,
.part-focus-heading-side {
    min-width: 0;
}

.part-focus-heading-main {
    display: grid;
    gap: 10px;
}

.part-focus-heading-side {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.part-focus-identity-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.part-focus-code,
.part-focus-chip,
.part-stock-card-meta span,
.part-side-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink-body);
    font-size: 0.84rem;
    font-weight: 800;
}

.part-focus-code {
    font-size: 0.9rem;
}

.part-focus-code,
.part-focus-chip {
    max-width: min(100%, 260px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.part-focus-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.part-focus-kpi-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 249, 252, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.part-focus-kpi-card strong {
    font-size: 1.16rem;
    line-height: 1.2;
    color: var(--ink-body);
}

.part-focus-kpi-note {
    color: var(--ink-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.part-focus-layout {
    display: grid;
    grid-template-columns: minmax(255px, 295px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.part-focus-media-card,
.part-focus-side-card,
.part-stock-card,
.part-focus-panel {
    min-width: 0;
}

.part-focus-media-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.part-focus-media-main {
    display: grid;
    gap: 14px;
}

.part-focus-media-main h3,
.part-movement-head h3,
.part-stock-card-head h3,
.part-focus-panel h3 {
    margin: 0;
}

.part-focus-media-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.part-focus-media-placeholder {
    min-height: 190px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f9 100%);
    color: var(--ink-muted);
    font-weight: 700;
}

.part-focus-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.part-qr-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.part-qr-copy {
    display: grid;
    gap: 8px;
}

.part-qr-copy p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.part-qr-image-link {
    justify-self: start;
    display: block;
}

.part-qr-image {
    width: 104px;
    height: 104px;
    object-fit: contain;
    display: block;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.part-focus-main {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.part-focus-panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.part-focus-panel {
    display: grid;
    gap: 12px;
    align-content: start;
}

.part-focus-fact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.part-focus-fact {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid rgba(190, 199, 211, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
}

.part-focus-fact span {
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.part-focus-fact strong {
    font-size: 1rem;
    color: var(--ink-body);
}

.part-focus-fact small {
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.45;
}

.part-focus-coverage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.part-focus-link-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--link);
    font-weight: 700;
}

.part-focus-link-pill:hover {
    text-decoration: none;
    border-color: var(--accent-strong);
    box-shadow: 0 10px 24px rgba(141, 211, 54, 0.14);
}

.part-focus-empty-copy,
.part-focus-description-block {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.part-focus-supplier-group {
    display: grid;
    gap: 12px;
}

.part-focus-supplier-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.part-focus-inline-count {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.part-focus-supplier-list {
    display: grid;
    gap: 10px;
}

.part-focus-supplier-row {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(190, 199, 211, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.part-focus-supplier-row.is-primary {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.92));
}

.part-focus-supplier-row-main,
.part-focus-supplier-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.part-focus-supplier-row-main {
    justify-content: space-between;
}

.part-focus-supplier-row-main p,
.part-focus-supplier-row-meta span,
.part-focus-supplier-row-meta a {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.part-focus-supplier-row-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.part-focus-mini-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
    color: var(--accent-strong);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.part-stock-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.part-stock-card-head,
.part-movement-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.part-stock-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.part-focus-side-card {
    display: grid;
    gap: 14px;
    align-content: start;
    grid-column: 1 / -1;
}

.part-side-count {
    justify-self: end;
}

.part-movement-list {
    gap: 12px;
}

.part-movement-list .stack-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.part-operations-grid {
    align-items: start;
}

.part-image-cell {
    display: inline-grid;
    gap: 8px;
}

.part-focus-right-column {
    min-width: 0;
    display: grid;
    gap: 16px;
}

.part-focus-sourcing-card {
    display: grid;
    gap: 14px;
    align-content: start;
}

.part-focus-fact-list-compact {
    grid-template-columns: 1fr;
}

.part-focus-panel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.part-focus-panel-sourcing-duplicate,
.part-focus-panel-description-duplicate {
    display: none;
}

.part-focus-panel-details,
.part-focus-panel-coverage {
    min-height: 100%;
}

.part-focus-detail-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.part-focus-detail-list div {
    display: grid;
    gap: 4px;
}

.part-focus-detail-list dt {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.part-focus-detail-list dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.45;
}

.part-focus-description-card {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.part-stock-workbench {
    display: grid;
    gap: 14px;
}

.part-stock-workbench-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.part-stock-summary-item {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 252, 0.98) 100%);
}

.part-stock-summary-item span {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.part-stock-summary-item strong {
    font-size: 0.96rem;
    line-height: 1.35;
    color: var(--ink);
}

.part-stock-workbench-table th:last-child,
.part-stock-workbench-table td:last-child {
    width: 44%;
}

.part-stock-live-row td {
    vertical-align: top;
}

.part-stock-value-cell {
    white-space: nowrap;
}

.part-stock-value-pill,
.part-stock-value-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 800;
    color: var(--ink);
}

.part-stock-value-pill {
    background: #202934;
    border-color: #202934;
    color: #fff;
}

.part-stock-location-cell {
    min-width: 180px;
}

.part-stock-location-cell strong,
.part-stock-location-cell span {
    display: block;
}

.part-stock-location-cell span {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.part-stock-action-cell {
    min-width: 308px;
}

.part-stock-row-form {
    display: block;
}

.part-stock-row-tools {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.part-stock-qty-entry {
    display: grid;
    gap: 6px;
}

.part-stock-qty-entry span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.part-stock-qty-entry input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.part-stock-row-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.part-stock-row-buttons .button-ghost {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.78rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.part-stock-row-buttons .button-ghost:nth-child(5) {
    grid-column: 1 / -1;
}

.part-stock-workbench-note {
    margin-top: -2px;
}

.part-focus-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.part-qr-panel-body {
    display: grid;
    gap: 12px;
    align-items: start;
}

body.theme-dark .part-stock-value-pill {
    background: var(--accent);
    border-color: var(--accent);
    color: #12200c;
}

body.theme-dark .part-stock-value-label,
body.theme-dark .part-stock-qty-entry input,
body.theme-dark .part-stock-summary-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--ink);
}

.editor-form-parts .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.part-editor-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fcfdfd 0%, #f8fbfc 100%);
}

.part-editor-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.part-editor-section-head h3 {
    margin: 2px 0 0;
    font-size: 1.02rem;
}

.part-editor-stock-table th,
.part-editor-stock-table td,
.part-editor-supplier-table th,
.part-editor-supplier-table td {
    vertical-align: top;
}

.part-editor-stock-table select,
.part-editor-stock-table input,
.part-editor-supplier-table select,
.part-editor-supplier-table input {
    min-width: 0;
}

.supplier-primary-cell,
.row-action-cell {
    width: 1%;
    white-space: nowrap;
}

.supplier-primary-cell {
    text-align: center;
}

.button-inline {
    min-height: auto;
    padding: 9px 12px;
}

.media-col,
.media-cell {
    width: 76px;
}

.media-cell {
    white-space: nowrap;
}

.media-thumb-shell {
    position: relative;
    display: inline-flex;
    vertical-align: top;
}

.media-thumb-frame {
    display: inline-flex;
}

.table-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
}

.table-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-style: dashed;
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(180deg, #fbfcfd 0%, #eff4f8 100%);
}

.media-thumb-popup {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    z-index: 35;
    width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.media-thumb-popup img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    background: #fff;
}

.media-thumb-shell:hover .media-thumb-popup {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.record-media-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.record-media-link {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.record-media-link:hover {
    text-decoration: none;
    border-color: #cdd8e2;
}

.record-media-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    display: block;
    padding: 14px;
    background: #fff;
}

.record-media-placeholder {
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f9 100%);
    color: var(--ink-muted);
    font-weight: 700;
    text-align: center;
}

body.theme-dark .table-thumb-empty {
    background: linear-gradient(180deg, rgba(62, 68, 78, 0.98) 0%, rgba(53, 59, 69, 0.98) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

body.theme-dark .record-media-placeholder {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.96) 0%, rgba(50, 56, 66, 0.98) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

body.theme-dark .media-preview,
body.theme-dark .record-media-preview {
    background: linear-gradient(180deg, rgba(61, 67, 77, 0.98) 0%, rgba(53, 58, 68, 0.98) 100%);
    border-color: var(--line-strong);
}

body.theme-dark .media-placeholder {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.96) 0%, rgba(50, 56, 66, 0.98) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

body.theme-dark .gallery-thumb,
body.theme-dark .editor-image-tile,
body.theme-dark .record-media-link {
    background: linear-gradient(180deg, rgba(61, 67, 77, 0.98) 0%, rgba(53, 58, 68, 0.98) 100%);
    border-color: var(--line-strong);
}

body.theme-dark .gallery-thumb:hover,
body.theme-dark .record-media-link:hover {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line-strong));
}

body.theme-dark .media-thumb-popup {
    background: rgba(50, 56, 66, 0.98);
    border-color: var(--line-strong);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

body.theme-dark .media-thumb-popup img {
    background: linear-gradient(180deg, rgba(61, 67, 77, 0.98) 0%, rgba(53, 58, 68, 0.98) 100%);
}

.record-media-hint {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.4;
}

.thumbnail-title-cell,
.thumbnail-inline-cell {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.thumbnail-inline-cell {
    min-width: 0;
}

.thumbnail-inline-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.thumbnail-inline-copy p {
    margin: 0;
}

.vendor-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.vendor-card-head h3 {
    margin: 0;
}

.vendor-card-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.vendor-card-copy p {
    margin: 0;
}

.calendar-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.calendar-day {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--ink);
}

.calendar-day:hover {
    text-decoration: none;
    background: #fff;
}

.calendar-day span,
.calendar-day small {
    color: var(--ink-soft);
}

.calendar-day strong {
    font-size: 1rem;
}

.calendar-day.is-active {
    background: rgba(124, 190, 40, 0.14);
    border-color: rgba(124, 190, 40, 0.38);
}

.scheduler-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.scheduler-backlog-panel.is-drag-target {
    border-color: rgba(124, 190, 40, 0.42);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

.scheduler-backlog-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.scheduler-backlog-link,
.scheduler-picker-link {
    color: inherit;
    text-decoration: none;
}

.scheduler-backlog-link:hover,
.scheduler-backlog-link:focus-visible,
.scheduler-picker-link:hover,
.scheduler-picker-link:focus-visible,
.scheduler-backlog-link:hover *,
.scheduler-backlog-link:focus-visible *,
.scheduler-picker-link:hover *,
.scheduler-picker-link:focus-visible * {
    text-decoration: none;
}

.scheduler-backlog-link {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.scheduler-backlog-link:hover h3,
.scheduler-backlog-link:focus-visible h3,
.scheduler-picker-link:hover h3,
.scheduler-picker-link:focus-visible h3 {
    color: var(--accent);
}

.scheduler-backlog-card[draggable="true"],
.timeline-job[draggable="true"] {
    cursor: grab;
}

.scheduler-backlog-card.is-dragging,
.timeline-job.is-dragging {
    opacity: 0.58;
    cursor: grabbing;
}

.scheduler-backlog-card h3 {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.scheduler-backlog-card p {
    margin-bottom: 0;
    color: var(--ink-soft);
}

.scheduler-code {
    font-family: "IBM Plex Mono", "Cascadia Mono", monospace;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ink);
}

.scheduler-timeline {
    display: grid;
    gap: 14px;
    overflow-x: auto;
}

.timeline-head,
.timeline-row {
    min-width: 980px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
}

.timeline-user-cell {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    display: grid;
    gap: 4px;
    align-content: start;
}

.timeline-user-cell strong {
    font-size: 0.95rem;
}

.timeline-user-cell span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.timeline-user-cell small {
    color: var(--ink-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.timeline-user-action {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
}

.timeline-user-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.timeline-user-actions .timeline-user-action {
    flex: 1 1 auto;
    width: auto;
    margin-top: 0;
}

.timeline-user-action-label-compact {
    display: none;
}

.timeline-user-clear-action {
    flex: 0 0 auto;
    min-width: 58px;
    justify-content: center;
}

.timeline-user-actions > :only-child {
    flex: 1 1 100%;
}

.timeline-user-clear-action[aria-busy="true"] {
    opacity: 0.66;
    cursor: wait;
}

.timeline-user-load {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.timeline-hours {
    position: relative;
    min-height: 42px;
    overflow: visible;
}

.timeline-hour-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.timeline-hour-label.is-start {
    transform: translateX(0);
    text-align: left;
}

.timeline-hour-label.is-end {
    transform: translateX(-100%);
    text-align: right;
}

.timeline-hour-header-tick {
    position: absolute;
    top: 20px;
    bottom: 0;
    width: 0;
    border-left: 1px dashed #d7e0e8;
    transform: translateX(-50%);
    pointer-events: none;
}

.timeline-off-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(148, 163, 184, 0.1) 0 8px,
        rgba(148, 163, 184, 0.18) 8px 16px
    );
    pointer-events: none;
    z-index: 0;
}

.timeline-off-overlay.is-before {
    left: 0;
}

.timeline-off-overlay.is-after {
    right: 0;
}

.timeline-off-overlay.is-full {
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.timeline-track {
    position: relative;
    min-height: 108px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 251, 0.96));
    align-items: stretch;
    align-content: stretch;
    overflow: hidden;
}

.timeline-track.is-drag-target {
    border-color: rgba(124, 190, 40, 0.42);
    box-shadow: inset 0 0 0 3px rgba(124, 190, 40, 0.12);
}

.timeline-track.is-overbooked {
    border-color: rgba(204, 93, 69, 0.34);
}

.timeline-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.timeline-hour-line,
.timeline-half-hour-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed #d7e0e8;
    transform: translateX(-50%);
}

.timeline-hour-line {
    z-index: 0;
}

.timeline-half-hour-line {
    z-index: 0;
    opacity: 0.9;
}

.timeline-job {
    position: absolute;
    top: 10px;
    bottom: 10px;
    z-index: 1;
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: inherit;
    overflow: hidden;
}

.timeline-job:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.timeline-job.is-drop-before::before,
.timeline-job.is-drop-after::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    width: 0;
    border-left: 2px solid rgba(124, 190, 40, 0.75);
    pointer-events: none;
}

.timeline-job.is-drop-before::before {
    left: -8px;
}

.timeline-job.is-drop-after::after {
    right: -8px;
}

.timeline-job strong,
.timeline-job small,
.timeline-job span {
    color: inherit;
}

.timeline-job-open {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.76rem;
    font-weight: 800;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.9;
}

.timeline-job-open:hover {
    opacity: 1;
}

.timeline-job-ribbon {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-height: 16px;
}

.timeline-job-ribbon-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: inherit;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.timeline-job-ribbon-segment.is-break {
    background: rgba(15, 23, 42, 0.18);
    color: rgba(15, 23, 42, 0.88);
    padding: 0 6px;
}

.timeline-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--ink-muted);
    font-size: 0.86rem;
    pointer-events: none;
}

.scheduler-picker-modal {
    max-width: 980px;
}

.scheduler-picker-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.scheduler-picker-filters {
    flex: 1 1 min(520px, 100%);
    display: grid;
    gap: 12px;
    min-width: 0;
}

.scheduler-picker-search {
    flex: 1 1 auto;
    display: grid;
    gap: 8px;
}

.scheduler-picker-toggle {
    padding-top: 0;
}

.scheduler-picker-search span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scheduler-picker-search input {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--ink);
    font: inherit;
}

.scheduler-picker-summary {
    flex: 0 0 auto;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    text-align: right;
    display: grid;
    gap: 4px;
}

.scheduler-picker-summary strong {
    font-size: 1.1rem;
}

.scheduler-picker-summary span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.scheduler-picker-list {
    display: grid;
    gap: 12px;
    max-height: min(60vh, 620px);
    overflow: auto;
    padding-right: 4px;
}

.scheduler-picker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-soft);
}

.scheduler-picker-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.scheduler-picker-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.scheduler-picker-head strong {
    font-size: 0.96rem;
}

.scheduler-picker-copy h3 {
    margin: 0;
    font-size: 1.02rem;
}

.scheduler-picker-copy > p {
    margin: 0;
    color: var(--ink-soft);
}

.scheduler-picker-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--ink-soft);
    font-size: 0.83rem;
}

.scheduler-picker-button {
    min-width: 116px;
}

.scheduler-picker-empty {
    text-align: center;
}

.scheduler-picker-item.is-hidden,
.scheduler-picker-empty.is-hidden {
    display: none;
}

.scheduler-break-grid {
    display: grid;
    gap: 12px;
}

.scheduler-break-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(140px, 1fr);
    gap: 12px;
    align-items: end;
}

.scheduler-break-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.scheduler-break-toggle input {
    margin: 0;
}

body.theme-dark .calendar-day {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

body.theme-dark .calendar-day:hover {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.99) 0%, rgba(49, 54, 64, 0.99) 100%);
}

body.theme-dark .scheduler-backlog-card {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .scheduler-backlog-panel.is-drag-target,
body.theme-dark .timeline-track.is-drag-target {
    border-color: rgba(124, 190, 40, 0.46);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

body.theme-dark .timeline-user-cell {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
}

body.theme-dark .timeline-track {
    background: linear-gradient(180deg, rgba(56, 62, 72, 0.98) 0%, rgba(48, 53, 62, 0.98) 100%);
    border-color: var(--line-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .timeline-hour-line,
body.theme-dark .timeline-half-hour-line {
    border-left-color: rgba(120, 129, 142, 0.38);
}

body.theme-dark .timeline-hour-header-tick {
    border-left-color: rgba(120, 129, 142, 0.38);
}

body.theme-dark .timeline-off-overlay {
    background: repeating-linear-gradient(
        135deg,
        rgba(107, 114, 128, 0.14) 0 8px,
        rgba(107, 114, 128, 0.24) 8px 16px
    );
}

body.theme-dark .timeline-off-overlay.is-full {
    color: rgba(229, 231, 235, 0.8);
}

body.theme-dark .timeline-job {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

body.theme-dark .timeline-job.is-drop-before::before,
body.theme-dark .timeline-job.is-drop-after::after {
    border-left-color: rgba(182, 224, 119, 0.82);
}

body.theme-dark .timeline-job-ribbon-segment {
    background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .timeline-job-ribbon-segment.is-break {
    background: rgba(15, 23, 42, 0.42);
    color: rgba(245, 247, 250, 0.88);
}

body.theme-dark .timeline-empty {
    color: var(--ink-soft);
}

body.theme-dark .scheduler-picker-search input,
body.theme-dark .scheduler-picker-summary,
body.theme-dark .scheduler-picker-item,
body.theme-dark .scheduler-break-toggle {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
}

@media (max-width: 1320px) {
    .workspace-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        grid-template-rows: auto auto auto;
        gap: 16px;
        padding-bottom: 18px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .module-band,
    .compact-stat-row,
    .split-grid,
    .workspace-grid,
    .media-workspace,
    .scheduler-workspace {
        grid-template-columns: 1fr;
    }

    .scheduler-break-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .app-main {
        padding: 18px;
    }

    .scheduler-picker-toolbar {
        align-items: stretch;
    }

    .scheduler-picker-summary {
        min-width: 0;
        width: 100%;
        text-align: left;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        align-items: start;
    }

    .topbar-copy h1 {
        font-size: 1.65rem;
    }

    .topbar-meta,
    .form-grid,
    .detail-grid,
    .card-grid,
    .filter-form,
    .permission-check-grid {
        grid-template-columns: 1fr;
    }

    .editor-form-parts .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        display: grid;
    }

    .topbar-meta {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: flex-start;
    }

    .toolbar-chip {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .toolbar-chip-user,
    .topbar-meta .inline-form {
        grid-column: 1 / -1;
        flex: 1 1 100%;
    }

    .topbar-meta .inline-form .button-link {
        width: 100%;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions > *,
    .page-actions .inline-form {
        flex: 1 1 180px;
        max-width: 100%;
    }

    .page-actions .inline-form .button-link {
        width: 100%;
    }

    .view-toggle-group {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .view-toggle-group .button-ghost {
        width: 100%;
        min-width: 0;
        flex: 1 1 0;
    }

    .bulk-toolbar {
        align-items: stretch;
    }

    .bulk-toolbar-actions {
        width: 100%;
    }

    .bulk-toolbar-actions .button-ghost {
        flex: 1 1 180px;
    }

    .compact-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-span-2 {
        grid-column: auto;
    }

    .auth-card.card {
        padding: 22px;
    }

    .modal-backdrop {
        padding: 18px 12px;
    }

    .modal-card {
        --modal-card-padding: 18px;
        padding: var(--modal-card-padding);
    }

    .table-wrap-auto > .data-table {
        width: max(100%, 720px);
    }

    .table-wrap-auto.is-dense > .data-table {
        width: max(100%, 920px);
    }

    .media-thumb-popup {
        display: none;
    }
}

@media (max-width: 720px) {
    .calendar-strip {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-day {
        flex: 0 0 134px;
        min-width: 134px;
        scroll-snap-align: start;
    }

    .scheduler-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .app-sidebar {
        padding: 16px 12px;
        gap: 14px;
    }

    .sidebar-link {
        min-height: 44px;
        padding: 0 10px;
        gap: 10px;
        font-size: 0.92rem;
    }

    .app-main {
        padding: 14px;
    }

    .card,
    .module-stat,
    .stack-item,
    .feature-card {
        padding: 16px;
    }

    .topbar-copy h1 {
        font-size: 1.45rem;
    }

    .toolbar-chip {
        flex: 1 1 calc(50% - 8px);
    }

    .page-actions,
    .form-actions,
    .inline-action-row,
    .request-action-strip,
    .view-toggle-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .topbar-meta {
        grid-template-columns: 1fr;
    }

    .page-actions > *,
    .form-actions > *,
    .inline-action-row > *,
    .request-action-strip > *,
    .view-toggle-group > * {
        width: 100%;
        max-width: 100%;
    }

    .bulk-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .bulk-toolbar-actions .button-ghost {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .compact-stat-row {
        grid-template-columns: 1fr;
    }

    .table-wrap-auto > .data-table {
        width: max(100%, 620px);
    }

    .table-wrap-auto.is-dense > .data-table {
        width: max(100%, 820px);
    }

    .timeline-head,
    .timeline-row {
        min-width: 760px;
    }

    .modal-backdrop {
        padding: 10px 6px;
    }

    .modal-card,
    .modal-card.modal-card-narrow,
    .modal-card.modal-card-parts {
        --modal-card-padding: 16px;
        --modal-card-radius: 16px;
        width: 100%;
        padding: var(--modal-card-padding);
        border-radius: var(--modal-card-radius);
    }

    .record-media-preview {
        aspect-ratio: 1 / 1;
    }
}

.page-public {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(159, 233, 73, 0.16), transparent 34%),
        radial-gradient(circle at 100% 10%, rgba(132, 211, 58, 0.1), transparent 24%),
        linear-gradient(180deg, #eef6e7 0%, #f8fbf4 100%);
}

.public-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 56px;
}

.public-hero {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.public-hero-copy {
    display: grid;
    gap: 10px;
}

.public-brand-block {
    margin-bottom: 14px;
}

.page-public .brand-logo-large {
    width: auto;
    height: 100px;
}

.public-hero-copy h1 {
    margin: 0;
    color: #10231a;
    font-size: clamp(2.2rem, 4vw, 3.3rem);
    line-height: 1.05;
}

.public-eyebrow,
.public-card-label {
    margin: 0;
    color: #6a844b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.public-lead {
    max-width: 60ch;
}

.public-card h2 {
    margin: 0;
    color: var(--ink);
}

.public-lead,
.public-copy,
.public-side-note p,
.public-note-block p,
.public-empty-state p {
    color: var(--ink-soft);
    line-height: 1.6;
}

.public-card {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, #f8fcf2 100%);
    border: 1px solid #dfe7d1;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.public-card-narrow {
    max-width: 560px;
}

.public-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
    margin-bottom: 14px;
}

.public-status-indicator {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.public-grid,
.public-status-grid {
    display: grid;
    gap: 18px;
}

.public-option-grid {
    grid-template-columns: minmax(0, 1fr);
}

.public-option-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.public-option-actions .button-primary,
.public-option-actions .button-ghost {
    min-width: 210px;
    justify-content: center;
}

.public-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    align-items: start;
}

.public-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.public-status-card {
    border: 1px solid #dfe7d1;
    border-radius: 16px;
    padding: 20px;
    background: #fcfef8;
}

.public-status-card h3,
.public-side-note strong,
.public-note-block strong,
.public-empty-state strong {
    margin: 0;
    color: var(--ink);
}

.public-inline-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.public-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--ink);
}

.public-work-title {
    margin: 10px 0 18px;
    color: var(--ink);
    font-weight: 700;
}

.public-facts {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.public-facts div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
}

.public-facts dt {
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.public-facts dd {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
}

.public-note-block,
.public-image-card,
.public-side-note,
.public-empty-state {
    margin-top: 18px;
    border-radius: 14px;
    padding: 16px 18px;
    background: #f8fcf2;
    border: 1px solid #e1e7d8;
}

.public-note-block-accent {
    background: #edf8df;
    border-color: #cbe79f;
}

.public-image-card img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 16px;
    margin-top: 12px;
    background: #ffffff;
}

.public-status-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    margin-top: 22px;
}

.view-dropdown {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
}

.view-dropdown[open] {
    z-index: 20;
}

.view-dropdown > .view-dropdown-trigger {
    display: flex;
    width: auto;
    min-height: var(--register-control-height, 36px);
    padding: 0 12px;
    font-size: 0.875rem;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.view-dropdown-trigger::-webkit-details-marker {
    display: none;
}

.view-dropdown-trigger svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.view-dropdown-trigger::after {
    content: "";
    width: 6px;
    height: 6px;
    margin: -3px 1px 0 2px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.view-dropdown-options,
.wo-status-menu {
    position: absolute;
    inset-block-start: calc(100% + 5px);
    inset-inline-start: 0;
    display: grid;
    gap: 3px;
    min-width: max(100%, 11rem);
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
    list-style: none;
}

.register-view-toolbar .view-dropdown-options,
.part-selector-view-toggle .view-dropdown-options,
.pm-plan-action-menu > .view-dropdown-options,
.inspection-print-menu > .view-dropdown-options {
    inset-inline: auto 0;
}

.view-dropdown:not([open]) > .view-dropdown-options,
.view-dropdown-mobile {
    display: none;
}

.view-dropdown-options :is(a, button) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.875rem;
    text-decoration: none;
}

.view-dropdown-options button {
    width: 100%;
    font-family: inherit;
    border: 0;
    background: transparent;
    text-align: start;
    cursor: pointer;
}

.view-dropdown-options :is(a, button):hover,
.view-dropdown-options :is(a, button):focus-visible,
.wo-status-menu-item:is(:hover, :focus-visible) {
    background: var(--panel-soft);
}

.view-dropdown-options :is([aria-current="true"], [aria-pressed="true"]),
.wo-status-menu-item.is-selected {
    background: var(--accent-soft);
    font-weight: 700;
}

.view-dropdown-options :is([aria-current="true"], [aria-pressed="true"])::after,
.wo-status-menu-item.is-selected::after {
    content: "";
    width: 6px;
    height: 10px;
    flex: 0 0 auto;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

@media (max-width: 700px) {
    .register-view-toolbar :is(.view-dropdown, .view-dropdown-trigger) {
        width: 100%;
    }

    .register-view-toolbar .view-dropdown-options {
        inset-inline: 0 auto;
    }

    .view-dropdown-options :is(a, button) {
        min-height: 44px;
    }

    .view-dropdown-desktop {
        display: none;
    }

    .view-dropdown-mobile {
        display: list-item;
    }
}

.register-list-heading .register-primary-create {
    flex: 0 0 auto;
    min-height: 42px;
    margin-left: auto;
}

.register-view-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: -6px 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.register-view-toolbar-label {
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.register-view-toolbar .view-toggle-group {
    flex: 0 0 auto;
}

.register-view-utility-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.work-order-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 18px;
    align-items: start;
}

.work-order-board.is-horizontal {
    grid-template-columns: 1fr;
}

.work-order-column {
    display: grid;
    gap: 16px;
    min-height: 0;
    align-content: start;
    align-items: start;
}

.work-order-column.is-horizontal {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    min-height: 0;
}

.work-order-column-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.work-order-column.is-horizontal .work-order-column-head {
    position: sticky;
    top: 0;
    align-self: start;
}

.work-order-card-stack {
    display: grid;
    gap: 12px;
    align-content: start;
    align-items: start;
}

.register-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.register-card-grid.is-horizontal {
    grid-template-columns: 1fr;
}

.register-record-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    align-self: stretch;
    height: 100%;
}

.register-record-card.is-horizontal {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr) auto;
    align-items: start;
}

.register-record-card-top,
.register-record-card-body,
.register-record-card-actions {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.register-record-card.is-horizontal .register-record-card-top,
.register-record-card.is-horizontal .register-record-card-body,
.register-record-card.is-horizontal .register-record-card-actions {
    display: contents;
}

.register-record-card h3,
.register-record-card p {
    margin: 0;
}

.register-record-card h3 {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.register-record-card h3 a {
    color: inherit;
    text-decoration: none;
}

.register-record-card h3 a:hover {
    color: var(--accent-strong);
    text-decoration: none;
}

.register-record-card-top > div:first-child {
    min-width: 0;
}

.register-record-card-top p {
    color: var(--ink-soft);
    margin-top: 3px;
    font-size: 0.94rem;
    line-height: 1.45;
}

.register-record-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.register-record-card-detail {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.register-record-card-detail span {
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.register-record-card-detail strong {
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.3;
}

.register-record-card-actions {
    flex-wrap: wrap;
    margin-top: auto;
}

.register-record-card-actions .button-ghost {
    min-height: 40px;
}

.register-record-card.is-horizontal .register-record-card-top > div:first-child {
    grid-column: 1;
}

.register-record-card.is-horizontal .register-record-card-top .badge-stack {
    grid-column: 3;
    justify-self: end;
}

.register-record-card.is-horizontal .register-record-card-body {
    grid-column: 2;
}

.register-record-card.is-horizontal .register-record-card-actions {
    grid-column: 1 / -1;
}

.register-record-card-empty {
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    padding: 18px;
    color: var(--ink-soft);
    background: #fbfcfd;
    align-self: start;
}

.register-card-grid.is-horizontal .register-record-card-empty {
    min-height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
}

.vendor-classic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.vendor-classic-grid.is-horizontal {
    grid-template-columns: 1fr;
}

.vendor-classic-card {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    align-self: stretch;
    height: 100%;
    min-height: 248px;
}

.vendor-classic-card.is-horizontal {
    min-height: 0;
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
    grid-template-rows: auto;
    align-items: start;
    gap: 18px;
}

.vendor-classic-card h3,
.vendor-classic-card p {
    margin: 0;
}

.vendor-classic-card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
}

.vendor-classic-card h3 a {
    color: inherit;
    text-decoration: none;
}

.vendor-classic-card h3 a:hover {
    color: var(--accent-strong);
}

.vendor-classic-card .vendor-card-copy > p {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.vendor-classic-card-body {
    display: grid;
    grid-template-rows: minmax(2.8em, auto) 1fr;
    gap: 12px;
}

.vendor-classic-aliases {
    color: var(--ink-soft) !important;
    font-size: 0.92rem !important;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-clamp: 2;
}

.vendor-classic-aliases strong {
    font-weight: 600;
}

.vendor-classic-lines {
    display: grid;
    gap: 8px;
    align-content: start;
}

.vendor-classic-lines p {
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.45;
}

.vendor-classic-lines strong {
    color: var(--ink);
    font-weight: 600;
}

.vendor-classic-card.is-horizontal .vendor-classic-card-body {
    grid-template-rows: auto;
    align-content: start;
}

.vendor-classic-empty {
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    padding: 18px;
    color: var(--ink-soft);
    background: #fbfcfd;
    align-self: start;
}

.vendor-classic-grid.is-horizontal .vendor-classic-empty {
    min-height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
}

.work-order-card-stack.is-horizontal {
    grid-template-columns: repeat(auto-fit, minmax(270px, 320px));
    justify-content: start;
    align-items: start;
}

.work-order-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    align-self: start;
}

.work-order-card.is-horizontal {
    min-height: 168px;
    grid-template-rows: auto minmax(2.8em, auto) minmax(1.5em, auto) auto auto;
}

.work-order-card.is-horizontal h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-clamp: 2;
}

.work-order-card.is-horizontal > p:not(.work-order-card-assignee) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    line-clamp: 1;
}

.work-order-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
    border-color: #ccd9a5;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.work-order-card-top,
.work-order-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.work-order-card-top {
    align-items: flex-start;
}

.work-order-card-status {
    min-width: 0;
    max-width: 68%;
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

.work-order-card-status-reason {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.work-order-card h3,
.work-order-card p {
    margin: 0;
}

.work-order-card h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
}

.work-order-card p,
.work-order-card-assignee {
    color: var(--ink-soft);
}

.work-order-card-empty {
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    padding: 18px;
    color: var(--ink-soft);
    background: #fbfcfd;
    align-self: start;
}

.work-order-card-stack.is-horizontal .work-order-card-empty {
    min-height: 170px;
    display: grid;
    place-items: center;
    text-align: center;
}

body.theme-dark .work-order-card {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .work-order-card:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

body.theme-dark .work-order-card-empty {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.72) 0%, rgba(50, 56, 66, 0.92) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

/* Work-order board controls, custom statuses, and live drag/drop. */
.work-order-heading-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
}

.work-order-heading-actions .work-order-heading-view-toolbar {
    border: 0;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.work-order-heading-view-toolbar .button-ghost {
    min-height: 42px;
    padding-inline: 12px;
}

.work-order-card[draggable="true"] {
    cursor: grab;
}

.work-order-card[draggable="true"]:active {
    cursor: grabbing;
}

.work-order-card.is-dragging {
    opacity: 0.42;
    transform: rotate(1deg) scale(0.985);
}

.work-order-card-stack[data-work-order-status-dropzone] {
    border: 1px solid transparent;
    border-radius: 15px;
    min-height: 74px;
    padding: 3px;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.work-order-card-stack.is-drag-over {
    background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
    border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.work-order-card-stack.is-saving {
    opacity: 0.68;
    pointer-events: none;
}

.work-order-status-customizer {
    --wo-status-danger: #a93245;
    position: fixed;
    inset: 0;
    width: min(700px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 24px 72px rgba(10, 20, 27, 0.28);
}

.work-order-status-customizer[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.work-order-status-customizer::backdrop {
    background: rgba(18, 26, 35, 0.48);
    backdrop-filter: blur(3px);
}

body.theme-dark .work-order-status-customizer {
    --wo-status-danger: #ffa7b3;
}

.wo-status-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 13px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.wo-status-header-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.wo-status-header-icon svg {
    width: 23px;
    height: 23px;
}

.wo-status-header-copy h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.3;
}

.wo-status-header-copy p,
.wo-status-toolbar p,
.wo-status-footer p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.4;
}

.wo-status-settings-form {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
}

.wo-status-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 12px 20px 8px;
}

.wo-status-toolbar strong {
    font-size: 0.9rem;
}

.wo-status-toolbar p {
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.wo-status-toolbar .wo-status-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    width: auto;
    padding: 6px 10px;
    border-radius: 9px;
    white-space: nowrap;
}

.wo-status-add svg {
    width: 16px;
    height: 16px;
}

.wo-status-list {
    min-height: 0;
    margin: 0;
    padding: 0 20px 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    list-style: none;
}

.wo-status-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 34px;
    grid-template-areas: "order name visibility remove";
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}

.wo-status-row.is-dragging {
    opacity: 0.48;
    background: var(--accent-soft);
}

.wo-status-order,
.wo-status-arrows {
    display: flex;
    align-items: center;
}

.wo-status-order {
    grid-area: order;
    gap: 3px;
}

.wo-status-grip {
    display: grid;
    place-items: center;
    width: 22px;
    height: 34px;
    color: var(--ink-soft);
    cursor: grab;
}

.wo-status-grip:active {
    cursor: grabbing;
}

.wo-status-grip svg,
.wo-status-icon-button svg {
    width: 17px;
    height: 17px;
    pointer-events: none;
}

.wo-status-arrows {
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel-soft);
}

.work-order-status-customizer .wo-status-icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-soft);
    box-shadow: none;
    cursor: pointer;
}

.wo-status-arrows .wo-status-icon-button {
    width: 30px;
    min-height: 30px;
}

.wo-status-icon-button:hover:not(:disabled) {
    background: var(--panel-soft);
    color: var(--ink);
}

.wo-status-arrows .wo-status-icon-button:hover:not(:disabled) {
    background: var(--panel);
}

.wo-status-icon-button:disabled,
.wo-status-add:disabled,
.wo-status-footer-actions button:disabled,
.wo-status-undo:disabled {
    opacity: 0.45;
    cursor: default;
}

.wo-status-name {
    grid-area: name;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.wo-status-badge {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 650;
    white-space: nowrap;
}

.wo-status-name input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
}

.wo-status-name input[aria-invalid="true"] {
    border-color: var(--wo-status-danger);
}

.wo-status-visibility {
    grid-area: visibility;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.wo-status-visibility input {
    appearance: none;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 20px;
    margin: 0;
    padding: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--panel-soft);
    cursor: pointer;
}

.wo-status-visibility input::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink-muted);
}

.wo-status-visibility input:checked {
    justify-content: flex-end;
    border-color: var(--accent);
    background: var(--accent);
}

.wo-status-visibility input:checked::before {
    background: var(--accent-ink, #182409);
}

.wo-status-remove-slot {
    grid-area: remove;
}

.wo-status-remove:hover:not(:disabled) {
    background: color-mix(in srgb, var(--wo-status-danger) 10%, var(--panel));
    color: var(--wo-status-danger);
}

.work-order-status-customizer :is(button, input):focus-visible {
    outline: 2px solid var(--accent-strong, #548619);
    outline-offset: 2px;
}

.wo-status-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}

.wo-status-footer-copy {
    min-width: 0;
}

.wo-status-footer p {
    margin: 0;
}

.wo-status-footer p.is-error {
    color: var(--wo-status-danger);
    font-weight: 650;
}

.wo-status-footer-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.wo-status-footer-actions button {
    min-height: 40px;
    width: auto;
    padding: 8px 12px;
    border-radius: 9px;
    white-space: nowrap;
}

.work-order-status-customizer .wo-status-undo {
    min-height: 28px;
    margin-top: 3px;
    padding: 0 2px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
}

.work-order-status-customizer [hidden] {
    display: none;
}

@media (pointer: coarse), (max-width: 520px) {
    .wo-status-grip {
        display: none;
    }

    .work-order-status-customizer .wo-status-icon-button {
        width: 40px;
        min-height: 40px;
    }
}

@media (max-width: 520px) {
    .work-order-status-customizer {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 15px;
    }

    .wo-status-header,
    .wo-status-toolbar,
    .wo-status-footer {
        padding-inline: 12px;
    }

    .wo-status-header {
        padding-block: 12px;
        gap: 8px;
    }

    .wo-status-header-icon {
        width: 34px;
        height: 34px;
    }

    .wo-status-list {
        padding-inline: 12px;
        scrollbar-gutter: auto;
    }

    .wo-status-row {
        grid-template-columns: auto minmax(0, 1fr) 40px;
        grid-template-areas: "name name remove" "order visibility visibility";
        gap: 4px 10px;
    }

    .wo-status-name input {
        font-size: 16px;
    }

    .wo-status-visibility {
        justify-self: end;
    }

    .wo-status-footer {
        flex-wrap: wrap;
    }

    .wo-status-footer-actions {
        justify-content: flex-end;
        margin-inline-start: auto;
    }

    .wo-status-footer-actions button {
        min-height: 44px;
    }
}

@media (max-width: 900px) {
    .work-order-heading-actions {
        justify-content: flex-start;
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .work-order-heading-actions,
    .work-order-heading-view-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .work-order-heading-view-toolbar {
        grid-column: 1 / -1;
    }

    .work-order-heading-actions > .register-primary-create {
        width: 100%;
    }
}

body.theme-dark .register-record-card {
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .register-record-card-empty {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.72) 0%, rgba(50, 56, 66, 0.92) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}

body.theme-dark .vendor-classic-card h3,
body.theme-dark .vendor-classic-lines strong {
    color: #f3f6ff;
}

body.theme-dark .vendor-classic-card .vendor-card-copy > p,
body.theme-dark .vendor-classic-lines p {
    color: rgba(237, 243, 255, 0.78);
}

body.theme-dark .vendor-classic-aliases {
    color: rgba(191, 203, 229, 0.72) !important;
}

body.theme-dark .vendor-classic-empty {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.72) 0%, rgba(50, 56, 66, 0.92) 100%);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}
.parts-heading-actions {
    align-items: center;
    justify-content: flex-end;
}

.parts-heading-actions .button-ghost {
    padding-inline: 10px;
}

.parts-display-toolbar,
.parts-register-utilities {
    flex-wrap: wrap;
}

.parts-register-utilities {
    display: flex;
    align-items: center;
    gap: 8px;
}

.parts-image-size-control {
    position: relative;
}

.parts-image-size-control > summary {
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.parts-image-size-control > summary::-webkit-details-marker {
    display: none;
}

.parts-image-size-control > summary::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}

.parts-image-size-control[open] > summary::after {
    transform: translateY(1px) rotate(225deg);
}

.parts-image-size-options {
    position: absolute;
    z-index: 10;
    inset: calc(100% + 4px) 0 auto;
    display: grid;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.parts-image-size-options .button-ghost.is-active {
    background: var(--accent-soft);
    border-color: var(--accent-strong);
    color: var(--ink);
}

@media (min-width: 1180px) {
    .parts-register-utilities {
        border-inline-start: 1px solid var(--line-strong);
        padding-inline-start: 10px;
    }
}

@media (max-width: 700px) {
    .parts-heading-actions > .parts-register-utilities {
        grid-column: 1 / -1;
        border-top: 1px solid var(--line);
        padding-top: 8px;
    }

    .parts-register-utilities > a {
        flex: 1 1 auto;
    }

    .parts-image-size-control > summary {
        width: 100%;
    }
}

/* Parts cards: generous product images with compact supporting information. */
.parts-card-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 14px;
    align-items: start;
}

.parts-card-board.is-horizontal {
    grid-template-columns: 1fr;
}

.part-board-card {
    min-width: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
}

.part-board-card-media {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--panel-soft);
}

.part-board-card-image-link {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: inherit;
    color: var(--ink-soft);
    text-decoration: none;
}

.part-board-card-image-link img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 54px 24px 20px;
    object-fit: contain;
}

.part-board-card-image-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.part-board-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    pointer-events: none;
}

.part-board-card-badges .badge {
    white-space: nowrap;
}

.part-board-card-content {
    min-width: 0;
    padding: 16px 18px 8px;
}

.part-board-card-identity {
    min-width: 0;
    min-height: 66px;
}

.part-board-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none;
}

.part-board-card-title:hover,
.part-board-card-edit:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.part-board-card-number {
    margin: 5px 0 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.4;
}

.part-board-card-stock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    margin-top: 10px;
}

.part-board-card-quantity {
    margin-right: auto;
    white-space: nowrap;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.part-board-card-quantity strong {
    margin-right: 4px;
    color: var(--ink);
    font-size: 1.45rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.part-board-card-location {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-top: 9px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.5;
}

.part-board-card-location svg,
.part-board-card-location-more {
    flex-shrink: 0;
}

.part-board-card-location-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.part-board-card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    margin-top: 14px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

.part-board-card-disclosure {
    min-width: 0;
}

.part-board-card-disclosure summary,
.part-board-card-edit {
    padding: 10px 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.5;
    cursor: pointer;
}

.part-board-card-disclosure summary {
    width: fit-content;
}

.part-board-card-edit {
    padding-left: 12px;
    text-decoration: none;
}

.part-board-card a:focus-visible,
.part-board-card summary:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
    border-radius: 4px;
}

.part-board-card-details {
    display: grid;
    gap: 10px;
    margin: 6px 0 4px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.part-board-card-details dt {
    color: var(--ink-soft);
}

.part-board-card-details dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    color: var(--ink);
}

@media (min-width: 900px) {
    .part-board-card.is-horizontal {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }

    .part-board-card.is-horizontal .part-board-card-media {
        aspect-ratio: auto;
        min-height: 280px;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    }

    .part-board-card.is-horizontal .part-board-card-content {
        align-self: center;
        padding: 24px;
    }

    .part-board-card.is-horizontal .part-board-card-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Medium retains the image-first arrangement with a shallower photo area. */
.part-board-card--medium .part-board-card-media {
    aspect-ratio: 16 / 9;
}

.part-board-card--medium .part-board-card-image-link img {
    padding: 44px 18px 12px;
}

/* Small restores the thumbnail beside the name and compact information below. */
.part-board-card--small {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 18px 18px 8px;
}

.part-board-card--small .part-board-card-media,
.part-board-card--small .part-board-card-content {
    display: contents;
}

.part-board-card--small .part-board-card-image-link {
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 76px;
    height: 76px;
    border-radius: 10px;
    background: var(--panel-soft);
}

.part-board-card--small .part-board-card-image-link img {
    padding: 4px;
}

.part-board-card--small .part-board-card-image-empty {
    gap: 4px;
    font-size: 0.65rem;
}

.part-board-card--small .part-board-card-image-empty svg {
    width: 24px;
    height: 24px;
}

.part-board-card--small .part-board-card-identity {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-height: 0;
}

.part-board-card--small .part-board-card-badges {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
}

.part-board-card--small .part-board-card-stock,
.part-board-card--small .part-board-card-location,
.part-board-card--small .part-board-card-footer {
    grid-column: 1 / -1;
    margin-top: 0;
}

@media (min-width: 900px) {
    .part-board-card--medium.is-horizontal {
        grid-template-columns: minmax(0, 0.65fr) minmax(0, 1fr);
    }

    .part-board-card--medium.is-horizontal .part-board-card-media {
        aspect-ratio: auto;
        min-height: 230px;
    }

    .part-board-card--small.is-horizontal {
        grid-template-columns: 76px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.8fr);
    }

    .part-board-card--small.is-horizontal .part-board-card-stock {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    .part-board-card--small.is-horizontal .part-board-card-location {
        grid-column: 4;
        grid-row: 1;
        align-self: center;
    }
}

.idea-status-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.idea-status-board.is-horizontal {
    grid-template-columns: 1fr;
}

.idea-board-column {
    display: grid;
    gap: 12px;
    align-content: start;
}

.idea-board-column.is-horizontal {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start;
}

.idea-board-column-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.idea-board-column-head h3 {
    margin: 4px 0 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
}

.idea-board-card-stack {
    display: grid;
    gap: 12px;
    align-content: start;
}

.idea-board-card-stack.is-horizontal {
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    align-items: start;
}

@media (max-width: 1080px) {
    .idea-status-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .idea-board-column.is-horizontal {
        grid-template-columns: 1fr;
    }

    .register-record-card.is-horizontal {
        grid-template-columns: 1fr;
    }

    .register-record-card.is-horizontal .register-record-card-top,
    .register-record-card.is-horizontal .register-record-card-body,
    .register-record-card.is-horizontal .register-record-card-actions {
        display: flex;
    }

}

@media (max-width: 720px) {
    .idea-status-board {
        grid-template-columns: 1fr;
    }

    .idea-board-card-stack.is-horizontal {
        grid-template-columns: 1fr;
    }

    .register-card-grid {
        grid-template-columns: 1fr;
    }

    .register-record-card-details {
        grid-template-columns: 1fr;
    }

    .vendor-classic-grid {
        grid-template-columns: 1fr;
    }

    .vendor-classic-card.is-horizontal {
        grid-template-columns: 1fr;
        min-height: 248px;
    }

    .vendor-classic-card.is-horizontal .vendor-classic-card-body {
        grid-template-rows: minmax(2.8em, auto) 1fr;
    }

}

.public-share-link {
    flex: 1 1 360px;
}

.public-share-link span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.public-share-link input,
.public-form input,
.public-form select,
.public-form textarea,
.public-captcha-question {
    width: 100%;
    border: 1px solid #dce7d0;
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

.public-share-link input,
.public-form input,
.public-form select,
.public-captcha-question {
    min-height: 46px;
    padding: 0 14px;
}

.public-form textarea {
    padding: 14px;
    resize: vertical;
}

.public-share-link input:focus,
.public-form input:focus,
.public-form select:focus,
.public-form textarea:focus {
    outline: none;
    border-color: #84d33a;
    box-shadow: 0 0 0 4px rgba(132, 211, 58, 0.16);
}

.public-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.public-form.single-column {
    grid-template-columns: 1fr;
}

.public-form label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 600;
}

.public-form .form-span-2 {
    grid-column: 1 / -1;
}

.public-captcha-question {
    display: flex;
    align-items: center;
    font-weight: 700;
    background: #f8fbf2;
    border-color: #d7e7bc;
}

.public-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 980px) {
    .public-grid,
    .public-status-grid {
        grid-template-columns: 1fr;
    }

    .public-status-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form.filter-form-ops {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-order-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .public-shell {
        width: min(100% - 24px, 1240px);
        padding-top: 24px;
    }

    .page-public .brand-logo-large {
        height: 84px;
    }

    .public-card {
        padding: 20px;
        border-radius: 16px;
    }

    .public-form,
    .public-facts div {
        grid-template-columns: 1fr;
    }

    .filter-form.filter-form-ops,
    .work-order-board {
        grid-template-columns: 1fr;
    }

    .public-status-indicator {
        justify-items: start;
    }
}

.page-marketing {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 0% 0%, rgba(111, 173, 39, 0.22), transparent 28%),
        radial-gradient(circle at 100% 10%, rgba(27, 79, 114, 0.2), transparent 24%),
        linear-gradient(180deg, #071319 0%, #0b161d 34%, #f6f4ef 34.1%, #f3efe7 100%);
    color: #11202a;
}

.page-marketing::before,
.page-marketing::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(12px);
    opacity: 0.42;
    z-index: 0;
}

.page-marketing::before {
    top: 108px;
    right: -90px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(140, 207, 62, 0.42), transparent 68%);
}

.page-marketing::after {
    bottom: 90px;
    left: -70px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(62, 121, 189, 0.26), transparent 68%);
}

.marketing-shell,
.marketing-footer {
    position: relative;
    z-index: 1;
}

.marketing-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 72px;
}

.marketing-topbar {
    position: sticky;
    top: 18px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(7, 18, 24, 0.72);
    box-shadow: 0 18px 45px rgba(4, 11, 16, 0.32);
    backdrop-filter: blur(18px);
}

.marketing-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: #f7fbfd;
}

.marketing-brand:hover,
.marketing-nav a:hover,
.marketing-footer-links a:hover {
    text-decoration: none;
}

.marketing-brand .brand-mark {
    box-shadow: 0 12px 24px rgba(103, 161, 23, 0.28);
}

.marketing-brand-copy {
    display: grid;
    gap: 4px;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    color: rgba(221, 230, 237, 0.72);
}

.marketing-brand-copy strong {
    font-size: 1.14rem;
    line-height: 1.05;
}

.marketing-brand-copy span {
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    color: rgba(221, 230, 237, 0.72);
}

.marketing-nav,
.marketing-topbar-actions,
.marketing-cta-row,
.marketing-inline-note,
.marketing-plan-meta,
.marketing-pricing-note,
.marketing-footer,
.marketing-footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.marketing-nav {
    flex-wrap: wrap;
    justify-content: center;
}

.marketing-nav a,
.marketing-footer-links a {
    color: rgba(237, 243, 247, 0.82);
    font-size: 0.92rem;
    font-weight: 700;
}

.marketing-topbar-actions {
    justify-content: flex-end;
}

.marketing-link-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(223, 233, 241, 0.14);
    border-radius: 999px;
    color: #f5fbff;
    font-size: 0.88rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
}

.marketing-link-chip:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
}

.marketing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.marketing-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.marketing-button-primary {
    color: #14200d;
    border-color: #7ab228;
    background: linear-gradient(180deg, #99dd42 0%, #7cbe28 100%);
    box-shadow: 0 14px 28px rgba(103, 161, 23, 0.22);
}

.marketing-button-primary:hover {
    box-shadow: 0 18px 36px rgba(103, 161, 23, 0.26);
}

.marketing-button-secondary {
    color: #f1f7fb;
    border-color: rgba(223, 233, 241, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.marketing-button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.marketing-hero,
.marketing-bottom-grid,
.marketing-login-pane {
    display: grid;
    gap: 28px;
}

.marketing-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: start;
    margin-bottom: 54px;
}

.marketing-kicker,
.marketing-card-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.marketing-kicker {
    color: rgba(214, 225, 233, 0.78);
}

.marketing-card-kicker {
    color: #6a7a87;
}

.marketing-hero-copy {
    display: grid;
    gap: 18px;
    padding: 18px 0 0;
    color: #f2f6f8;
}

.marketing-hero-title {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(3.2rem, 5.8vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.marketing-hero-lead {
    max-width: 58ch;
    margin: 0;
    color: rgba(226, 236, 242, 0.8);
    font-size: 1.08rem;
    line-height: 1.72;
}

.marketing-inline-note {
    flex-wrap: wrap;
    color: rgba(213, 224, 231, 0.74);
    font-size: 0.95rem;
}

.marketing-inline-note a {
    color: #b4e06c;
    font-weight: 700;
}

.marketing-proof-grid,
.marketing-lane-grid,
.marketing-workflow-grid,
.marketing-pricing-grid,
.marketing-faq-list {
    display: grid;
    gap: 18px;
}

.marketing-proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.marketing-proof-card,
.marketing-lane-card,
.marketing-step-card,
.marketing-faq-card,
.marketing-login-card,
.marketing-plan-card,
.marketing-faq-panel {
    border: 1px solid rgba(17, 32, 42, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.marketing-proof-card,
.marketing-lane-card,
.marketing-faq-card,
.marketing-login-card,
.marketing-plan-card,
.marketing-faq-panel {
    background: rgba(255, 255, 255, 0.92);
}

.marketing-proof-card,
.marketing-lane-card,
.marketing-step-card,
.marketing-faq-card,
.marketing-plan-card,
.marketing-login-card,
.marketing-preview-card,
.marketing-login-intro,
.marketing-faq-panel {
    padding: 24px;
}

.marketing-proof-card h2,
.marketing-lane-card h3,
.marketing-section-head h2,
.marketing-step-card h3,
.marketing-plan-card h3,
.marketing-faq-card h3,
.marketing-login-intro h2,
.marketing-login-card h3,
.marketing-preview-card h2,
.marketing-preview-card h3 {
    margin: 0;
    color: #11202a;
}

.marketing-proof-card h2 {
    font-size: 1.18rem;
    line-height: 1.26;
}

.marketing-proof-card p:last-child,
.marketing-lane-card p,
.marketing-step-card p,
.marketing-faq-card p,
.marketing-plan-description,
.marketing-login-copy,
.marketing-login-intro p {
    margin-bottom: 0;
    color: #607180;
    line-height: 1.68;
}

.marketing-preview {
    position: relative;
    display: grid;
    gap: 18px;
    padding-top: 22px;
}

.marketing-preview-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(171, 192, 206, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #0f2029 0%, #10252f 100%);
    color: #eaf2f6;
    box-shadow: 0 24px 56px rgba(6, 13, 18, 0.34);
}

.marketing-preview-card::before {
    content: "";
    position: absolute;
    inset: auto auto -56px -34px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(124, 190, 40, 0.32), transparent 72%);
}

.marketing-preview-card h2,
.marketing-preview-card h3,
.marketing-preview-card strong,
.marketing-preview-card .marketing-card-kicker,
.marketing-status-pill {
    color: #f5fbff;
}

.marketing-preview-card p,
.marketing-preview-card span,
.marketing-preview-card li {
    color: rgba(224, 235, 242, 0.78);
}

.marketing-preview-card-main {
    z-index: 2;
}

.marketing-preview-card-float {
    width: min(84%, 360px);
    margin-left: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%),
        linear-gradient(180deg, #173444 0%, #132734 100%);
    animation: marketing-float 7s ease-in-out infinite;
}

.marketing-preview-head,
.marketing-plan-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.marketing-status-pill,
.marketing-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marketing-status-pill {
    border: 1px solid rgba(180, 224, 108, 0.22);
    background: rgba(124, 190, 40, 0.16);
}

.marketing-plan-badge {
    border: 1px solid rgba(124, 190, 40, 0.2);
    background: rgba(124, 190, 40, 0.12);
    color: #274217;
}

.marketing-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 22px;
}

.marketing-preview-stats div,
.marketing-plan-meta span {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(220, 231, 239, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.marketing-preview-stats strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.6rem;
    line-height: 1;
}

.marketing-preview-stats span {
    font-size: 0.86rem;
    line-height: 1.5;
}

.marketing-preview-feed {
    display: grid;
    gap: 12px;
}

.marketing-preview-feed article {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 16px 16px 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(220, 231, 239, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.marketing-preview-feed article::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    width: 4px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, #9bdf47 0%, #61a31f 100%);
}

.marketing-preview-feed span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marketing-preview-feed strong {
    font-size: 1rem;
}

.marketing-mini-list,
.marketing-check-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 18px 0 0;
    list-style: none;
}

.marketing-mini-list li,
.marketing-check-list li {
    position: relative;
    padding-left: 24px;
    line-height: 1.6;
}

.marketing-mini-list li::before,
.marketing-check-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
    color: #7cbe28;
}

.marketing-section,
.marketing-bottom-grid {
    scroll-margin-top: 120px;
}

.marketing-section {
    margin-top: 28px;
    padding: 34px 0;
}

.marketing-section-head {
    display: grid;
    gap: 12px;
    max-width: 740px;
    margin-bottom: 24px;
}

.marketing-section-head .marketing-kicker {
    color: #6a7a87;
}

.marketing-section-head h2 {
    font-size: clamp(2rem, 3.2vw, 3.25rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.marketing-section-head p:last-child {
    margin: 0;
    color: #5f6e7b;
    font-size: 1rem;
    line-height: 1.72;
}

.marketing-lane-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-lane-card {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.marketing-lane-card:hover,
.marketing-plan-card:hover,
.marketing-faq-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 190, 40, 0.24);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.1);
}

.marketing-band {
    padding: 30px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(124, 190, 40, 0.18), transparent 30%),
        linear-gradient(180deg, #0e202a 0%, #142d39 100%);
    box-shadow: 0 28px 64px rgba(5, 15, 21, 0.22);
}

.marketing-section-head-light .marketing-kicker,
.marketing-section-head-light h2,
.marketing-section-head-light p:last-child,
.marketing-step-card h3,
.marketing-step-card p {
    color: #f2f8fb;
}

.marketing-workflow-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.marketing-step-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(224, 235, 242, 0.08);
}

.marketing-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(124, 190, 40, 0.16);
    color: #b8e272;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.marketing-section-alt {
    padding-bottom: 22px;
}

.marketing-pricing-note {
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: #677785;
    font-size: 0.9rem;
    font-weight: 700;
}

.marketing-pricing-note span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(17, 32, 42, 0.04);
}

.marketing-pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.marketing-plan-card {
    display: grid;
    gap: 18px;
    align-content: start;
}

.marketing-plan-card.is-featured {
    position: relative;
    border-color: rgba(124, 190, 40, 0.26);
    background:
        linear-gradient(180deg, rgba(124, 190, 40, 0.07), transparent 28%),
        rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 56px rgba(91, 139, 18, 0.14);
}

.marketing-plan-price {
    display: flex;
    align-items: end;
    gap: 10px;
}

.marketing-plan-price strong {
    font-size: clamp(2.6rem, 4vw, 3.4rem);
    line-height: 0.92;
    color: #10202a;
}

.marketing-plan-price span {
    color: #677785;
    font-weight: 700;
}

.marketing-plan-meta {
    flex-wrap: wrap;
}

.marketing-plan-meta span {
    color: #233340;
    font-size: 0.9rem;
    font-weight: 800;
}

.marketing-check-list-tight {
    margin-top: 0;
}

.marketing-plan-card .marketing-button {
    width: 100%;
}

.marketing-plan-card .marketing-button-secondary {
    color: #20303c;
    border-color: rgba(17, 32, 42, 0.1);
    background: #f7fafc;
}

.marketing-plan-card .marketing-button-secondary:hover {
    background: #eef3f7;
}

.marketing-bottom-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    margin-top: 24px;
    align-items: start;
}

.marketing-faq-panel {
    padding: 24px;
}

.marketing-section-head-compact {
    margin-bottom: 18px;
}

.marketing-faq-list {
    grid-template-columns: 1fr;
}

.marketing-login-pane {
    grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.9fr);
    align-items: stretch;
}

.marketing-login-intro {
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(124, 190, 40, 0.16), transparent 32%),
        linear-gradient(180deg, #10202a 0%, #152d39 100%);
    color: #f1f7fb;
    box-shadow: 0 24px 54px rgba(7, 18, 24, 0.26);
}

.marketing-login-intro h2,
.marketing-login-intro .marketing-kicker,
.marketing-login-intro p,
.marketing-check-list-light li {
    color: #f1f7fb;
}

.marketing-login-intro p,
.marketing-check-list-light li {
    color: rgba(227, 236, 241, 0.82);
}

.marketing-check-list-light li::before {
    color: #b7e36f;
}

.marketing-login-card {
    align-self: stretch;
}

.marketing-login-card.is-focused {
    border-color: rgba(124, 190, 40, 0.34);
    box-shadow: 0 26px 56px rgba(91, 139, 18, 0.16);
}

.marketing-login-card h3 {
    margin-top: 18px;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.marketing-login-copy {
    margin-top: 0;
    margin-bottom: 20px;
}

.marketing-auth-form {
    gap: 14px;
}

.marketing-auth-form button {
    width: 100%;
}

.marketing-footer {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 34px;
    justify-content: space-between;
    color: #526270;
}

.marketing-footer p {
    margin: 0;
    font-weight: 700;
}

.marketing-footer-links {
    flex-wrap: wrap;
}

.marketing-footer-links a {
    color: #4a5d6d;
}

.login-standalone-shell {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 32px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(340px, 0.82fr);
    gap: 28px;
    align-items: center;
}

.login-standalone-intro h1 {
    margin: 0;
    color: #f1f7fb;
    font-size: clamp(2.8rem, 5vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.login-standalone-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.page-login-standalone .marketing-login-card {
    width: min(100%, 460px);
    justify-self: end;
}

.page-login-standalone .brand-logo-large {
    width: auto;
    height: 100px;
}

.login-standalone-title {
    margin: 18px 0 10px;
    color: #11202a;
    font-size: 1.9rem;
    line-height: 1.04;
}

.sales-shell,
.sales-footer {
    position: relative;
    z-index: 1;
}

.sales-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 72px;
}

.sales-announcement {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid rgba(187, 214, 233, 0.14);
    border-radius: 18px;
    background: rgba(153, 221, 66, 0.08);
    color: rgba(231, 240, 244, 0.9);
    text-align: center;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sales-topbar {
    position: sticky;
    top: 18px;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 30px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: 0 18px 42px rgba(5, 15, 21, 0.16);
    backdrop-filter: blur(16px);
}

.sales-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #0f1d2d;
}

.sales-brand:hover,
.sales-nav a:hover,
.sales-footer-links a:hover {
    text-decoration: none;
}

.sales-brand-copy {
    display: grid;
    gap: 2px;
}

.sales-brand-copy strong {
    font-size: 1rem;
    line-height: 1;
}

.sales-brand-copy span {
    color: #6e7b87;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sales-nav,
.sales-topbar-actions,
.sales-rating-row,
.sales-hero-actions,
.sales-footer,
.sales-footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sales-nav {
    flex-wrap: wrap;
    justify-content: center;
}

.sales-nav a {
    color: #122234;
    font-weight: 700;
}

.sales-topbar-actions {
    justify-content: flex-end;
}

.sales-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    letter-spacing: 0.01em;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sales-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.sales-button-primary {
    color: #0d1725;
    background: linear-gradient(180deg, #9fe949 0%, #84d33a 100%);
    border-color: #84d33a;
    box-shadow: 0 16px 30px rgba(132, 211, 58, 0.22);
}

.sales-button-secondary {
    color: #f3f8fb;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(231, 240, 244, 0.16);
}

.sales-button-secondary:hover {
    background: rgba(255, 255, 255, 0.13);
}

.sales-button-ghost {
    color: #0f1d2d;
    background: #ffffff;
    border-color: rgba(15, 29, 45, 0.1);
}

.sales-button-ghost:hover {
    background: #f5f8fb;
}

.sales-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.98fr) minmax(380px, 0.92fr);
    gap: 42px;
    align-items: center;
    margin-bottom: 34px;
    padding: 18px 0 12px;
}

.sales-hero-copy {
    display: grid;
    gap: 20px;
    color: #f4f8fb;
}

.sales-rating-row {
    flex-wrap: wrap;
}

.sales-rating-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(153, 221, 66, 0.14);
    color: #b8ee78;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sales-rating-text {
    color: rgba(224, 234, 240, 0.78);
    font-size: 0.95rem;
}

.sales-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: #f7fbfd;
    font-size: clamp(3.25rem, 5.8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.sales-hero-lead {
    max-width: 60ch;
    margin: 0;
    color: rgba(226, 236, 242, 0.82);
    font-size: 1.06rem;
    line-height: 1.78;
}

.sales-signal-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 4px;
}

.sales-signal-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 14px;
    border-radius: 18px;
    border: 1px solid rgba(231, 240, 244, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #f0f6fa;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.sales-hero-visual {
    position: relative;
    min-height: 560px;
}

.sales-console {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #eef5ff 0%, #ffffff 100%);
    box-shadow: 0 34px 80px rgba(5, 15, 21, 0.3);
}

.sales-console-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(180deg, #0d1725 0%, #112238 100%);
    color: #f5fbff;
}

.sales-console-label,
.sales-card-eyebrow,
.sales-eyebrow {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sales-console-label {
    color: #7f91a5;
}

.sales-card-eyebrow,
.sales-eyebrow {
    color: #64717d;
}

.sales-console-top strong {
    display: block;
    margin-top: 4px;
    font-size: 1.02rem;
}

.sales-console-pill,
.sales-card-badge,
.sales-pricing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sales-console-pill {
    background: rgba(153, 221, 66, 0.16);
    color: #b9ee7a;
}

.sales-card-badge {
    background: rgba(44, 107, 255, 0.1);
    color: #2c6bff;
}

.sales-console-body {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 456px;
}

.sales-console-rail {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px 14px;
    background: linear-gradient(180deg, #112238 0%, #162c45 100%);
}

.sales-console-rail span {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #dfe9ef;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.sales-console-main {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.sales-console-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sales-toolbar-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d8e2ed;
    background: #f7fbff;
    color: #304355;
    font-size: 0.82rem;
    font-weight: 700;
}

.sales-toolbar-chip.is-active {
    background: #eaf3ff;
    border-color: #bfceea;
    color: #2154c8;
}

.sales-console-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.82fr));
    gap: 16px;
}

.sales-console-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid #dce7f2;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 24px rgba(23, 41, 60, 0.05);
}

.sales-console-card-large {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.sales-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.sales-card-head strong {
    color: #122334;
    font-size: 1rem;
}

.sales-stat-positive {
    color: #1f7a3f;
    font-size: 1.1rem;
    font-weight: 900;
}

.sales-calendar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.sales-calendar > span {
    color: #71808c;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sales-calendar-task {
    min-height: 72px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #dce7f2;
    background: #f8fbff;
    color: #132334;
    font-weight: 700;
    box-shadow: inset 4px 0 0 #84d33a;
}

.sales-calendar-task.is-accent {
    box-shadow: inset 4px 0 0 #2c6bff;
}

.sales-calendar-task:nth-of-type(1) {
    grid-column: 2;
}

.sales-calendar-task:nth-of-type(2) {
    grid-column: 4;
}

.sales-calendar-task:nth-of-type(3) {
    grid-column: 5;
}

.sales-bar-chart {
    display: flex;
    align-items: end;
    gap: 10px;
    min-height: 140px;
    padding: 18px 12px 8px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
}

.sales-bar-chart span {
    flex: 1 1 0;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #2c6bff 0%, #8bc7ff 100%);
}

.sales-request-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #dce7f2;
}

.sales-request-card strong,
.sales-request-card p {
    margin: 0;
}

.sales-request-card p {
    color: #607180;
    line-height: 1.6;
}

.sales-float-card {
    position: absolute;
    z-index: 3;
    min-width: 180px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 38px rgba(9, 20, 31, 0.22);
    animation: marketing-float 7s ease-in-out infinite;
}

.sales-float-card p,
.sales-float-card span,
.sales-float-card strong {
    display: block;
    margin: 0;
}

.sales-float-card p {
    color: #6d7a86;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sales-float-card strong {
    margin: 6px 0 4px;
    color: #122334;
    font-size: 1.05rem;
}

.sales-float-card span {
    color: #607180;
    font-size: 0.9rem;
}

.sales-float-card-top {
    top: 34px;
    right: -18px;
}

.sales-float-card-bottom {
    left: -12px;
    bottom: 28px;
    animation-delay: 1.2s;
}

.sales-proof-band,
.sales-feature-card,
.sales-story-panel-light,
.sales-pricing-card,
.sales-faq-panel,
.sales-faq-card {
    border: 1px solid rgba(18, 35, 52, 0.08);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.sales-proof-band {
    display: grid;
    gap: 24px;
    margin-top: 24px;
    padding: 28px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.92);
}

.sales-proof-heading {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.sales-proof-heading h2,
.sales-section-head h2,
.sales-story-panel h2,
.sales-pricing-intro h2,
.sales-final-card h2 {
    margin: 0;
    color: #112233;
    font-size: clamp(2rem, 3.1vw, 3.15rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.sales-proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.sales-proof-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f9fbfd 0%, #eff4f9 100%);
}

.sales-proof-card strong {
    color: #112233;
    font-size: 2rem;
    line-height: 1;
}

.sales-proof-card span {
    color: #607180;
    line-height: 1.6;
}

.sales-industry-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sales-industry-row span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f5f8fb;
    color: #223445;
    font-weight: 700;
}

.sales-section {
    padding-top: 58px;
}

.sales-section-head {
    display: grid;
    gap: 12px;
    max-width: 760px;
    margin-bottom: 24px;
}

.sales-section-head p:last-child,
.sales-pricing-intro > p:last-of-type,
.sales-faq-card p,
.sales-feature-card p,
.sales-story-panel p,
.sales-final-card p,
.sales-pricing-description {
    margin: 0;
    color: #607180;
    line-height: 1.72;
}

.sales-section-head-compact {
    margin-bottom: 18px;
}

.sales-feature-grid,
.sales-pricing-grid,
.sales-faq-grid,
.sales-story-grid,
.sales-faq-wrap {
    display: grid;
    gap: 18px;
}

.sales-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sales-feature-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.sales-feature-card:hover,
.sales-pricing-card:hover,
.sales-faq-card:hover {
    transform: translateY(-2px);
    border-color: rgba(44, 107, 255, 0.16);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.1);
}

.sales-feature-card h3,
.sales-faq-card h3,
.sales-pricing-card h3 {
    margin: 0;
    color: #112233;
    font-size: 1.24rem;
    line-height: 1.22;
}

.sales-check-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sales-check-list li {
    position: relative;
    padding-left: 24px;
    color: #223445;
    line-height: 1.6;
}

.sales-check-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: #2c6bff;
    font-weight: 900;
}

.sales-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 58px;
}

.sales-story-panel {
    display: grid;
    gap: 16px;
    padding: 28px;
    border-radius: 32px;
}

.sales-story-panel-dark {
    background:
        radial-gradient(circle at top right, rgba(153, 221, 66, 0.18), transparent 30%),
        linear-gradient(180deg, #101d2f 0%, #15263c 100%);
    color: #f2f8fb;
    box-shadow: 0 28px 60px rgba(5, 15, 21, 0.24);
}

.sales-story-panel-dark .sales-eyebrow,
.sales-story-panel-dark h2,
.sales-story-panel-dark p,
.sales-story-panel-dark span,
.sales-story-panel-dark strong {
    color: #f2f8fb;
}

.sales-story-panel-dark p {
    color: rgba(225, 235, 241, 0.82);
}

.sales-story-panel-light {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 32px;
}

.sales-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.sales-mini-stats div {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
}

.sales-story-panel-light .sales-mini-stats div {
    background: #f6f9fc;
}

.sales-mini-stats strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.5rem;
    line-height: 1;
}

.sales-mini-stats span {
    color: inherit;
    line-height: 1.5;
}

.sales-section-pricing {
    padding-top: 64px;
}

.sales-pricing-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.sales-pricing-intro {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 16px;
}

.sales-pricing-callout {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(180deg, #112238 0%, #152b43 100%);
    box-shadow: 0 20px 46px rgba(5, 15, 21, 0.18);
}

.sales-pricing-callout strong {
    color: #f5fbff;
}

.sales-pricing-callout span {
    color: rgba(224, 235, 242, 0.82);
    line-height: 1.6;
}

.sales-pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sales-pricing-card {
    display: grid;
    gap: 18px;
    align-content: start;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
}

.sales-pricing-card.is-featured {
    position: relative;
    background:
        linear-gradient(180deg, rgba(44, 107, 255, 0.08), transparent 26%),
        rgba(255, 255, 255, 0.98);
    border-color: rgba(44, 107, 255, 0.14);
    box-shadow: 0 28px 56px rgba(44, 107, 255, 0.14);
}

.sales-pricing-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.sales-pricing-badge {
    background: rgba(44, 107, 255, 0.1);
    color: #2c6bff;
}

.sales-price-line {
    display: flex;
    align-items: end;
    gap: 10px;
}

.sales-price-line strong {
    color: #112233;
    font-size: clamp(2.8rem, 4vw, 3.5rem);
    line-height: 0.92;
}

.sales-price-line span {
    color: #607180;
    font-weight: 700;
}

.sales-plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sales-plan-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f8fb;
    color: #203445;
    font-size: 0.88rem;
    font-weight: 800;
}

.sales-check-list-tight {
    gap: 8px;
}

.sales-pricing-card .sales-button {
    width: 100%;
}

.sales-pricing-card .sales-button-secondary {
    color: #1b2e42;
    background: #f5f8fb;
    border-color: #dce7f2;
}

.sales-pricing-card .sales-button-secondary:hover {
    background: #edf3f8;
}

.sales-faq-wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
    padding-top: 58px;
    align-items: start;
}

.sales-faq-panel {
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
}

.sales-faq-grid {
    grid-template-columns: 1fr;
}

.sales-faq-card {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.sales-final-card {
    display: grid;
    gap: 16px;
    padding: 28px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(153, 221, 66, 0.16), transparent 32%),
        linear-gradient(180deg, #0f1b2c 0%, #15273c 100%);
    box-shadow: 0 28px 60px rgba(5, 15, 21, 0.22);
}

.sales-final-card .sales-eyebrow,
.sales-final-card h2,
.sales-final-card p {
    color: #f2f8fb;
}

.sales-final-card p {
    color: rgba(225, 235, 241, 0.82);
}

.sales-footer {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 0 0 34px;
    justify-content: space-between;
    color: #4d6070;
}

.sales-footer p {
    margin: 0;
    font-weight: 700;
}

.sales-footer-links {
    flex-wrap: wrap;
}

.sales-footer-links a {
    color: #506375;
    font-weight: 700;
}

@keyframes marketing-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 1180px) {
    .marketing-hero,
    .marketing-bottom-grid,
    .marketing-login-pane,
    .marketing-lane-grid,
    .marketing-workflow-grid,
    .marketing-pricing-grid,
    .login-standalone-shell,
    .sales-hero,
    .sales-pricing-layout,
    .sales-story-grid,
    .sales-faq-wrap {
        grid-template-columns: 1fr;
    }

    .marketing-proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketing-preview {
        max-width: 760px;
    }

    .marketing-preview-card-float {
        width: min(100%, 420px);
    }

    .page-login-standalone .marketing-login-card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .page-login-standalone .brand-logo-large {
        height: 84px;
    }

    .sales-proof-grid,
    .sales-feature-grid,
    .sales-pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sales-pricing-intro {
        position: static;
    }

    .sales-console {
        max-width: 760px;
        margin: 0 auto;
    }
}

@media (max-width: 860px) {
    .marketing-shell {
        width: min(100% - 24px, 1240px);
        padding-top: 16px;
    }

    .marketing-topbar {
        position: static;
        flex-wrap: wrap;
    }

    .marketing-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .marketing-hero-title {
        max-width: none;
        font-size: clamp(2.7rem, 12vw, 4.2rem);
    }

    .marketing-proof-grid,
    .marketing-preview-stats {
        grid-template-columns: 1fr;
    }

    .marketing-band {
        padding: 22px;
        border-radius: 26px;
    }

    .sales-shell {
        width: min(100% - 24px, 1240px);
        padding-top: 14px;
    }

    .sales-topbar {
        position: static;
        flex-wrap: wrap;
    }

    .sales-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .sales-hero h1 {
        max-width: none;
        font-size: clamp(2.9rem, 12vw, 4.8rem);
    }

    .sales-signal-row,
    .sales-proof-grid,
    .sales-feature-grid,
    .sales-pricing-grid,
    .sales-mini-stats,
    .sales-console-grid {
        grid-template-columns: 1fr;
    }

    .sales-console-card-large {
        grid-column: auto;
        grid-row: auto;
    }

    .sales-console-body {
        grid-template-columns: 1fr;
    }

    .sales-console-rail {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 14px;
    }

    .sales-float-card {
        position: static;
        margin-top: 14px;
    }
}

@media (max-width: 640px) {
    .marketing-nav {
        display: none;
    }

    .marketing-topbar-actions,
    .marketing-cta-row,
    .marketing-inline-note,
    .marketing-plan-meta,
    .marketing-pricing-note,
    .marketing-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .marketing-topbar-actions .marketing-button,
    .marketing-topbar-actions .marketing-link-chip,
    .marketing-cta-row .marketing-button {
        width: 100%;
    }

    .login-standalone-shell {
        width: min(100% - 24px, 1080px);
        padding: 24px 0;
    }

    .login-standalone-links {
        flex-direction: column;
        align-items: stretch;
    }

    .login-standalone-links .marketing-button {
        width: 100%;
    }

    .page-login-standalone .brand-logo-large {
        height: 72px;
    }

    .sales-nav {
        display: none;
    }

    .sales-topbar-actions,
    .sales-hero-actions,
    .sales-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-topbar-actions .sales-button,
    .sales-hero-actions .sales-button {
        width: 100%;
    }

    .sales-announcement {
        font-size: 0.86rem;
    }

    .sales-proof-band,
    .sales-feature-card,
    .sales-story-panel,
    .sales-pricing-card,
    .sales-faq-panel,
    .sales-faq-card,
    .sales-final-card {
        padding: 20px;
        border-radius: 24px;
    }

    .sales-footer {
        width: min(100% - 24px, 1240px);
        gap: 12px;
    }

    .sales-calendar {
        grid-template-columns: 1fr;
    }

    .sales-calendar > span {
        display: none;
    }

    .sales-calendar-task,
    .sales-calendar-task:nth-of-type(1),
    .sales-calendar-task:nth-of-type(2),
    .sales-calendar-task:nth-of-type(3) {
        grid-column: auto;
    }

    .marketing-proof-card,
    .marketing-lane-card,
    .marketing-step-card,
    .marketing-faq-card,
    .marketing-login-card,
    .marketing-plan-card,
    .marketing-preview-card,
    .marketing-login-intro,
    .marketing-faq-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .marketing-login-pane {
        gap: 18px;
    }

    .marketing-footer {
        width: min(100% - 24px, 1240px);
        gap: 12px;
    }
}

.page-lp {
    --lp-accent-rgb: 132, 211, 58;
    --lp-accent: #84d33a;
    --lp-accent-soft: #9fe949;
    --lp-accent-deep: #6da914;
    --lp-accent-text: #214416;
    --lp-surface-soft: #f8fcf2;
    --lp-surface-soft-border: #dfe7d1;
    --lp-dark-top: #102419;
    --lp-dark-bottom: #173223;
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 18%, rgba(var(--lp-accent-rgb), 0.12), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    color: #122233;
}

.lp-main,
.lp-footer {
    position: relative;
    z-index: 1;
}

.lp-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(180deg, rgba(20, 36, 55, 0.98) 0%, rgba(22, 39, 59, 0.96) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(8, 18, 29, 0.14);
    backdrop-filter: blur(16px);
}

.lp-nav-shell,
.lp-main,
.lp-footer {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.lp-nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 94px;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    color: #f4f8fb;
}

.lp-brand:hover,
.lp-nav a:hover,
.lp-footer-links a:hover {
    text-decoration: none;
}

.lp-brand .brand-logo {
    width: auto;
    height: 90px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.lp-nav,
.lp-nav-actions,
.lp-hero-actions,
.lp-footer,
.lp-footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lp-nav {
    flex-wrap: wrap;
    justify-content: center;
}

.lp-nav a,
.lp-footer-links a {
    font-weight: 700;
}

.lp-nav a {
    color: rgba(239, 245, 251, 0.88);
}

.lp-footer-links a {
    color: #132538;
}

.lp-nav-actions {
    justify-content: flex-end;
}

.lp-link-login,
.lp-link-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    color: rgba(239, 245, 251, 0.88);
    font-weight: 700;
}

.lp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.lp-button:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.lp-button-primary {
    color: #15230f;
    background: linear-gradient(180deg, var(--lp-accent-soft) 0%, var(--lp-accent) 100%);
    border-color: var(--lp-accent);
    box-shadow: 0 16px 30px rgba(var(--lp-accent-rgb), 0.22);
}

.lp-button-primary:hover {
    background: linear-gradient(180deg, #a7ef54 0%, #8cdc42 100%);
    border-color: #8cdc42;
    box-shadow: 0 20px 34px rgba(var(--lp-accent-rgb), 0.28);
}

.lp-button-secondary {
    color: #f4f8fb;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
}

.lp-button-outline,
.lp-button-card {
    color: #17324f;
    background: #ffffff;
    border-color: rgba(23, 50, 79, 0.14);
}

.lp-button-outline-light {
    color: #f4f8fb;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
}

.lp-main {
    padding: 28px 0 72px;
}

.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(380px, 0.96fr);
    gap: 52px;
    align-items: center;
    padding: 18px 0 18px;
}

.lp-hero-copy {
    display: grid;
    gap: 18px;
    max-width: 620px;
}

.lp-kicker,
.lp-kicker-dark,
.lp-kicker-light,
.lp-card-kicker,
.lp-ui-label {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lp-kicker {
    color: var(--lp-accent-deep);
}

.lp-kicker-dark,
.lp-card-kicker,
.lp-ui-label {
    color: #687482;
}

.lp-kicker-light {
    color: rgba(226, 236, 242, 0.76);
}

.lp-hero h1 {
    max-width: 12ch;
    margin: 0;
    color: #0f2235;
    font-size: clamp(2.8rem, 4.9vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.lp-hero-lead {
    max-width: 62ch;
    margin: 0;
    color: #536170;
    font-size: 1.04rem;
    line-height: 1.74;
}

.lp-hero-points {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.lp-hero-points li {
    position: relative;
    padding-left: 22px;
    color: #23384a;
    line-height: 1.6;
    font-weight: 700;
}

.lp-hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.56rem;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--lp-accent);
    box-shadow: 0 0 0 5px rgba(var(--lp-accent-rgb), 0.14);
}

.lp-hero-support-note {
    margin: -4px 0 0;
    color: #607180;
    font-size: 0.94rem;
    line-height: 1.6;
}

.lp-hero-support-note a {
    color: #17324f;
    font-weight: 700;
}

.lp-hero-visual {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 500px;
}

.lp-hero-visual::before {
    content: "";
    position: absolute;
    right: -12px;
    top: 72px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--lp-accent-rgb), 0.16), transparent 72%);
}

.lp-ui-frame,
.lp-pillar-card,
.lp-story-panel-light,
.lp-pricing-card,
.lp-faq-panel,
.lp-faq-card,
.lp-contact-card {
    border: 1px solid rgba(18, 34, 51, 0.08);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.lp-ui-frame {
    position: relative;
    z-index: 2;
    overflow: hidden;
    max-width: 620px;
    margin-left: auto;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--lp-surface-soft) 0%, #ffffff 100%);
}

.lp-ui-topbar {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(180deg, var(--lp-dark-top) 0%, var(--lp-dark-bottom) 100%);
    color: #f6fbff;
}

.lp-ui-topbar strong {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
}

.lp-ui-status,
.lp-pricing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp-ui-status {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.lp-ui-body {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
}

.lp-ui-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 16px 14px;
    background: #eef5e8;
}

.lp-ui-sidebar span {
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    color: #244222;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.lp-ui-main {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.lp-ui-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lp-ui-toolbar span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fbfdf8;
    border: 1px solid var(--lp-surface-soft-border);
    color: #486048;
    font-size: 0.82rem;
    font-weight: 700;
}

.lp-ui-toolbar .is-active {
    background: #edf8df;
    border-color: #cbe79f;
    color: #315f15;
}

.lp-ui-calendar {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: #fcfef8;
    border: 1px solid #dfe7d1;
}

.lp-ui-calendar-head {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.lp-ui-calendar-head span {
    color: #6d7b87;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp-ui-calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.lp-ui-task {
    min-height: 74px;
    padding: 12px;
    border-radius: 16px;
    background: var(--lp-surface-soft);
    border: 1px solid #dde7cf;
    color: #132538;
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--lp-accent);
}

.lp-ui-task.is-blue {
    box-shadow: inset 4px 0 0 #568d21;
}

.lp-ui-task:nth-child(1) {
    grid-column: 2;
}

.lp-ui-task:nth-child(2) {
    grid-column: 4;
}

.lp-ui-task:nth-child(3) {
    grid-column: 5;
}

.lp-ui-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.lp-ui-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, var(--lp-surface-soft) 100%);
    border: 1px solid #e0e7d6;
}

.lp-ui-card strong {
    color: #132538;
    font-size: 1.8rem;
    line-height: 1;
}

.lp-ui-card span {
    color: #607180;
    line-height: 1.5;
}

.lp-float-card {
    position: absolute;
    z-index: 3;
    min-width: 200px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(18, 34, 51, 0.08);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    animation: marketing-float 7s ease-in-out infinite;
}

.lp-float-card p,
.lp-float-card strong,
.lp-float-card span {
    display: block;
    margin: 0;
}

.lp-float-card p {
    color: #6b7783;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp-float-card strong {
    margin: 6px 0 4px;
    color: #122233;
    font-size: 1rem;
}

.lp-float-card span {
    color: #607180;
    font-size: 0.88rem;
}

.lp-float-card-top {
    top: 24px;
    right: -8px;
}

.lp-float-card-bottom {
    left: -8px;
    bottom: 24px;
    animation-delay: 1.3s;
}

.lp-trust {
    display: grid;
    gap: 18px;
    margin-top: 12px;
    padding: 24px 28px;
    border-radius: 28px;
    background: var(--lp-surface-soft);
    border: 1px solid #e2e8d8;
}

.lp-trust-title {
    margin: 0;
    color: #102235;
    font-size: 1.02rem;
    font-weight: 800;
}

.lp-industry-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lp-industry-row span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dfe7d1;
    color: #25384a;
    font-weight: 700;
}

.lp-section {
    padding-top: 62px;
    scroll-margin-top: 110px;
}

.lp-section-head {
    display: grid;
    gap: 12px;
    max-width: 760px;
    margin-bottom: 24px;
}

.lp-section-head h2,
.lp-story-panel h2,
.lp-pricing-copy h2,
.lp-cta-card h2 {
    margin: 0;
    color: #102235;
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.lp-section-head p:last-child,
.lp-pillar-card p,
.lp-story-panel p,
.lp-pricing-copy > p:last-of-type,
.lp-pricing-description,
.lp-faq-card p,
.lp-cta-card p {
    margin: 0;
    color: #607180;
    line-height: 1.72;
}

.lp-section-head-compact {
    margin-bottom: 18px;
}

.lp-pillar-grid,
.lp-story-grid,
.lp-pricing-grid,
.lp-faq-layout,
.lp-faq-grid {
    display: grid;
    gap: 18px;
}

.lp-pillar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lp-pillar-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.lp-pillar-card:hover,
.lp-pricing-card:hover,
.lp-faq-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--lp-accent-rgb), 0.2);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.1);
}

.lp-pillar-card h3,
.lp-workflow-card h3,
.lp-pricing-card h3,
.lp-faq-card h3 {
    margin: 0;
    color: #112335;
    font-size: 1.22rem;
    line-height: 1.22;
}

.lp-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 62px;
}

.lp-story-panel {
    display: grid;
    gap: 16px;
    padding: 28px;
    border-radius: 30px;
}

.lp-story-panel-dark,
.lp-cta-card {
    background:
        radial-gradient(circle at top right, rgba(var(--lp-accent-rgb), 0.2), transparent 30%),
        linear-gradient(180deg, #12281b 0%, #183523 100%);
    box-shadow: 0 24px 54px rgba(8, 18, 29, 0.18);
}

.lp-story-panel-dark .lp-kicker-light,
.lp-story-panel-dark h2,
.lp-story-panel-dark p,
.lp-story-panel-dark strong,
.lp-story-panel-dark span,
.lp-cta-card .lp-kicker-light,
.lp-cta-card h2,
.lp-cta-card p {
    color: #f3f8fb;
}

.lp-story-panel-dark p,
.lp-cta-card p {
    color: rgba(226, 236, 242, 0.82);
}

.lp-story-panel-light {
    background: #ffffff;
    border-radius: 30px;
}

.lp-story-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.lp-story-stats div {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.lp-story-stats strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.6rem;
    line-height: 1;
}

.lp-workflow-list {
    display: grid;
    gap: 14px;
}

.lp-workflow-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: var(--lp-surface-soft);
    border: 1px solid #e1e7d8;
}

.lp-check-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.lp-check-list li {
    position: relative;
    padding-left: 24px;
    color: #23384a;
    line-height: 1.6;
}

.lp-check-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--lp-accent-deep);
    font-weight: 900;
}

.lp-pricing-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.4fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lp-pricing-copy {
    position: sticky;
    top: 116px;
    display: grid;
    gap: 16px;
}

.lp-pricing-note {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    background: var(--lp-surface-soft);
    border: 1px solid #dfe7d1;
}

.lp-pricing-note strong {
    color: #102235;
}

.lp-pricing-note span {
    color: #607180;
    line-height: 1.6;
}

.lp-pricing-grid {
    align-items: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lp-pricing-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
}

.lp-pricing-card.is-featured {
    background:
        linear-gradient(180deg, rgba(var(--lp-accent-rgb), 0.08), transparent 24%),
        #ffffff;
    border-color: rgba(var(--lp-accent-rgb), 0.16);
    box-shadow: 0 28px 54px rgba(var(--lp-accent-rgb), 0.16);
}

.lp-pricing-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.lp-pricing-badge {
    background: rgba(var(--lp-accent-rgb), 0.12);
    color: var(--lp-accent-text);
}

.lp-price-row {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 74px;
}

.lp-price-row strong {
    color: #102235;
    font-size: clamp(2.7rem, 4vw, 3.4rem);
    line-height: 0.92;
}

.lp-price-row span {
    color: #607180;
    font-weight: 700;
}

.lp-pricing-card.is-contact-plan {
    background:
        linear-gradient(180deg, rgba(225, 235, 207, 0.38), transparent 28%),
        #ffffff;
}

.lp-pricing-card.is-contact-plan .lp-price-row {
    min-height: 64px;
    align-items: center;
}

.lp-pricing-card.is-contact-plan .lp-price-row strong {
    font-size: clamp(2.35rem, 3.1vw, 2.85rem);
    line-height: 0.98;
}

.lp-plan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lp-plan-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--lp-surface-soft);
    border: 1px solid #e1e7d8;
    color: #1f354a;
    font-size: 0.88rem;
    font-weight: 800;
}

.lp-check-list-tight {
    gap: 8px;
    flex: 1 1 auto;
}

.lp-pricing-card .lp-button {
    width: 100%;
    margin-top: auto;
}

.lp-pricing-card .lp-button-card {
    background: var(--lp-surface-soft);
}

.lp-faq-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
    align-items: start;
}

.lp-faq-panel {
    padding: 24px;
    border-radius: 26px;
    background: #ffffff;
}

.lp-faq-grid {
    grid-template-columns: 1fr;
}

.lp-faq-card {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, var(--lp-surface-soft) 100%);
}

.lp-contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1fr);
    gap: 18px;
    align-items: start;
}

.lp-contact-card {
    display: grid;
    gap: 16px;
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
}

.lp-contact-card h3 {
    margin: 0;
    color: #112335;
    font-size: 1.32rem;
    line-height: 1.2;
}

.lp-contact-routing,
.lp-contact-card p {
    margin: 0;
    color: #607180;
    line-height: 1.7;
}

.lp-contact-routing strong {
    color: #102235;
}

.lp-contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.lp-contact-form label {
    display: grid;
    gap: 8px;
}

.lp-contact-form label span {
    color: #627081;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lp-contact-form input,
.lp-contact-form select,
.lp-contact-form textarea,
.lp-contact-captcha {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #dce7d0;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.lp-contact-form input,
.lp-contact-form select,
.lp-contact-captcha {
    min-height: 50px;
    padding: 0 14px;
}

.lp-contact-form textarea {
    min-height: 156px;
    padding: 14px;
    resize: vertical;
}

.lp-contact-form input:focus,
.lp-contact-form select:focus,
.lp-contact-form textarea:focus {
    outline: none;
    border-color: #84d33a;
    box-shadow:
        0 0 0 4px rgba(132, 211, 58, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.lp-contact-form-full,
.lp-contact-actions {
    grid-column: 1 / -1;
}

.lp-contact-captcha {
    display: flex;
    align-items: center;
    border-style: dashed;
    background: var(--lp-surface-soft);
    color: #17324f;
    font-weight: 800;
}

.lp-contact-actions {
    justify-content: flex-start;
}

.lp-contact-business-name {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lp-cta-card {
    display: grid;
    gap: 16px;
    padding: 28px;
    border-radius: 30px;
}

.lp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 0 0 34px;
    color: #4f6272;
}

.lp-footer p {
    margin: 0;
    font-weight: 700;
}

.lp-footer-links {
    flex-wrap: wrap;
}

.page-login-lp.page-lp {
    background:
        radial-gradient(circle at 18% 18%, rgba(159, 233, 73, 0.16), transparent 22%),
        radial-gradient(circle at 82% 80%, rgba(132, 211, 58, 0.12), transparent 24%),
        linear-gradient(180deg, #0c1412 0%, #12201a 48%, #11241d 100%);
}

.lp-login-main {
    width: min(100% - 24px, 1240px);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.lp-login-shell {
    width: min(100%, 520px);
}

.lp-login-card {
    display: grid;
    gap: 15px;
    align-content: start;
    padding: 34px 32px 28px;
    border-radius: 30px;
    border: 1px solid rgba(132, 211, 58, 0.26);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, #f8fcf2 100%);
    box-shadow:
        0 30px 70px rgba(3, 10, 7, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.82) inset;
    min-height: 0;
}

.lp-login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.page-login-lp .brand-logo-large {
    width: auto;
    height: 100px;
}

.page-login-lp .lp-card-kicker {
    color: #67824c;
    text-align: center;
}

.lp-login-title {
    margin: 0;
    color: #102235;
    font-size: clamp(2rem, 4vw, 2.35rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-align: center;
}

.lp-login-copy {
    margin: 0 auto 4px;
    max-width: 30ch;
    color: #556570;
    line-height: 1.72;
    text-align: center;
}

.lp-auth-form {
    gap: 14px;
}

.lp-auth-form label {
    gap: 8px;
}

.lp-auth-form span {
    color: #627081;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.lp-auth-form input {
    min-height: 50px;
    border-radius: 16px;
    border-color: #dce7d0;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.lp-auth-form input:focus {
    outline: none;
    border-color: #84d33a;
    box-shadow:
        0 0 0 4px rgba(132, 211, 58, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.lp-auth-form button {
    width: 100%;
    min-height: 52px;
    border-color: #84d33a;
    color: #15230f;
    background: linear-gradient(180deg, #9fe949 0%, #84d33a 100%);
    box-shadow: 0 18px 34px rgba(132, 211, 58, 0.24);
}

.lp-auth-form button:hover {
    border-color: #91df46;
    background: linear-gradient(180deg, #a6ef52 0%, #8bda3f 100%);
    box-shadow: 0 22px 36px rgba(132, 211, 58, 0.28);
}

.lp-login-meta {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 2px;
}

.lp-login-meta a {
    color: #52606a;
    font-weight: 700;
    text-decoration: none;
}

.lp-login-meta a:hover {
    color: #214416;
}

@media (max-width: 1180px) {
    .lp-hero,
    .lp-story-grid,
    .lp-pricing-layout,
    .lp-faq-layout,
    .lp-contact-layout {
        grid-template-columns: 1fr;
    }

    .lp-pillar-grid,
    .lp-pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lp-pricing-copy {
        position: static;
    }

}

@media (max-width: 860px) {
    .lp-nav-shell {
        min-height: 78px;
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .lp-brand .brand-logo {
        height: 72px;
    }

    .lp-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .lp-hero h1 {
        max-width: none;
        font-size: clamp(2.6rem, 9.5vw, 4rem);
    }

    .lp-contact-form,
    .lp-pillar-grid,
    .lp-pricing-grid,
    .lp-story-stats,
    .lp-ui-metrics {
        grid-template-columns: 1fr;
    }

    .lp-ui-frame {
        margin-left: 0;
    }

    .lp-ui-body {
        grid-template-columns: 1fr;
    }

    .lp-ui-sidebar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-content: stretch;
    }

    .lp-ui-calendar-head,
    .lp-ui-calendar-grid {
        grid-template-columns: 1fr;
    }

    .lp-ui-task,
    .lp-ui-task:nth-child(1),
    .lp-ui-task:nth-child(2),
    .lp-ui-task:nth-child(3) {
        grid-column: auto;
    }

    .lp-ui-calendar-head span {
        display: none;
    }

    .lp-float-card {
        position: static;
        margin-top: 14px;
    }

    .lp-login-main {
        min-height: 100vh;
        padding: 24px 0;
    }

    .page-login-lp .brand-logo-large {
        height: 84px;
    }
}

@media (max-width: 640px) {
    .lp-nav {
        display: none;
    }

    .lp-nav-shell,
    .lp-main,
    .lp-footer {
        width: min(100% - 24px, 1240px);
    }

    .lp-nav-actions,
    .lp-hero-actions,
    .lp-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .lp-nav-actions .lp-button,
    .lp-hero-actions .lp-button {
        width: 100%;
    }

    .lp-brand .brand-logo {
        height: 62px;
    }

    .page-login-lp .brand-logo-large {
        height: 72px;
    }

    .lp-trust,
    .lp-pillar-card,
    .lp-story-panel,
    .lp-pricing-card,
    .lp-faq-panel,
    .lp-faq-card,
    .lp-cta-card,
    .lp-contact-card,
    .lp-login-card {
        padding: 20px;
        border-radius: 22px;
    }

    .lp-login-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

}

.topbar-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.shell-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.shell-refresh,
.account-flyout {
    position: relative;
}

.shell-refresh {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.shell-icon-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-inline: 14px;
}

.shell-icon {
    width: 18px;
    display: inline-grid;
    place-items: center;
    font-size: 0.98rem;
}

.shell-icon-text {
    font-weight: 700;
}

.shell-refresh-meta {
    display: grid;
    gap: 2px;
    justify-items: start;
}

.shell-refresh-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.shell-refresh-meta strong {
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 0.92rem;
}

.button-ghost.button-ghost-small {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
}

.shell-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    min-width: 240px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 96%, #fff);
    box-shadow: var(--shadow);
}

body.theme-dark .shell-popover {
    background: color-mix(in srgb, var(--panel) 96%, #000);
}

.shell-popover-form,
.account-popover-actions {
    display: grid;
    gap: 6px;
}

.shell-refresh-state {
    padding: 8px 12px 4px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.shell-popover-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.shell-popover-link:hover,
.shell-popover-link.is-active {
    text-decoration: none;
    background: var(--panel-soft);
}

.shell-popover-link-danger {
    color: #b42318;
}

body.theme-dark .shell-popover-link-danger {
    color: #ffb4aa;
}

.account-trigger {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    cursor: pointer;
}

body.theme-dark .account-trigger {
    background: rgba(255, 255, 255, 0.03);
}

.account-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 800;
}

.account-avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 1rem;
}

.account-copy {
    display: grid;
    min-width: 0;
}

.account-copy strong,
.account-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-copy span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.account-popover {
    min-width: 290px;
}

.account-popover-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
}

.account-popover-head p {
    margin: 2px 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.app-shell,
.app-shell.has-nav-flyout {
    --sidebar-rail-width: 224px;
    --nav-flyout-width: 298px;
    grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
    transition: grid-template-columns 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* The saved navigation preference is restored in the document head. Keep its
   first layout from being mistaken for a user-triggered collapse or expansion. */
html.nav-state-initializing .app-shell,
html.nav-state-initializing .app-sidebar,
html.nav-state-initializing .brand-block-sidebar,
html.nav-state-initializing .app-sidebar .brand-logo,
html.nav-state-initializing .app-sidebar .brand-logo-collapsed,
html.nav-state-initializing .app-sidebar .brand-copy,
html.nav-state-initializing .sidebar-collapse-toggle,
html.nav-state-initializing .sidebar-collapse-toggle svg,
html.nav-state-initializing .sidebar-collapse-label,
html.nav-state-initializing .sidebar-nav,
html.nav-state-initializing .sidebar-group-chevron,
html.nav-state-initializing .sidebar-group-items,
html.nav-state-initializing .sidebar-link,
html.nav-state-initializing .sidebar-link-label {
    transition: none !important;
}

.app-sidebar {
    padding: 14px 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-self: stretch;
    gap: 12px;
    position: sticky;
    top: 0;
    min-height: 100vh;
    z-index: 40;
    overflow: hidden;
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.05),
        12px 0 28px rgba(6, 12, 20, 0.24);
}

.brand-block-sidebar {
    display: grid !important;
    justify-items: center !important;
    align-content: start;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    max-width: calc(var(--sidebar-rail-width) - 24px);
    margin-inline: auto;
    padding: 0 0 2px !important;
    text-align: center !important;
    transition:
        max-width 380ms cubic-bezier(0.22, 1, 0.36, 1),
        padding 280ms ease,
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-brand-home {
    width: 100%;
    min-height: 56px;
    display: grid;
    place-items: center;
    position: relative;
    color: var(--accent);
    overflow: hidden;
}

.sidebar-brand-home:hover {
    text-decoration: none;
}

.app-sidebar .brand-logo,
.app-sidebar .brand-logo-prominent {
    grid-area: 1 / 1;
    width: 158px !important;
    max-width: 158px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    position: static !important;
    left: auto !important;
    transform: none !important;
    object-fit: contain;
    opacity: 1;
    transition:
        opacity 180ms ease,
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-sidebar .brand-logo-collapsed {
    grid-area: 1 / 1;
    width: 50px;
    max-width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.84);
    transition:
        opacity 180ms ease,
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-sidebar .brand-copy {
    width: 100%;
    justify-items: center;
    text-align: center;
    max-height: 24px;
    overflow: hidden;
    opacity: 1;
    transition:
        max-height 280ms ease,
        opacity 180ms ease,
        transform 280ms ease;
}

.sidebar-collapse-toggle {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 2;
    width: 16px;
    min-width: 16px;
    min-height: 100%;
    display: inline-grid;
    grid-template-columns: 14px 0;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0 1px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.01);
    color: #fff;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 750;
    cursor: pointer;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease;
    box-shadow: none;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus-visible {
    border-color: rgba(124, 190, 40, 0.2);
    background: rgba(124, 190, 40, 0.035);
    color: #fff;
}

.sidebar-collapse-toggle:focus-visible {
    outline: none;
    box-shadow: inset 1px 0 0 rgba(157, 221, 77, 0.52);
}

.sidebar-collapse-toggle:active {
    background: rgba(124, 190, 40, 0.085);
}

.sidebar-collapse-toggle svg {
    position: fixed;
    top: calc((100vh - 14px) / 2);
    left: calc(var(--sidebar-rail-width) - 15px);
    z-index: 3;
    width: 14px;
    height: 14px;
    pointer-events: none;
    transition:
        left 380ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-collapse-label {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition:
        max-width 280ms ease,
        opacity 180ms ease;
}

.app-sidebar .brand-copy strong {
    font-size: 0.96rem;
    line-height: 1.12;
}

.app-sidebar .brand-copy span {
    font-size: 0.72rem;
    line-height: 1.18;
}

.mobile-nav-bar,
.mobile-nav-menu,
.mobile-nav-scrim,
.mobile-account-flyout {
    display: none;
}

@keyframes mobile-nav-menu-enter {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mobile-nav-bar {
    width: 100%;
    align-items: center;
    gap: 12px;
}

.mobile-nav-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.mobile-nav-brand:hover {
    text-decoration: none;
}

.mobile-nav-brand-logo {
    width: 112px;
    max-width: 112px;
    height: auto;
    display: block;
    object-fit: contain;
}

.mobile-nav-toggle {
    min-width: 0;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    color: #f7fbff;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 22px rgba(6, 12, 20, 0.18);
}

.mobile-nav-toggle-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    text-align: left;
}

.mobile-nav-toggle-label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(217, 225, 232, 0.72);
}

.mobile-nav-toggle-current {
    min-width: 0;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    justify-content: start;
    gap: 10px;
    font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: #f7fbff;
}

.mobile-nav-toggle-current span:last-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-nav-toggle-current .nav-token {
    width: 30px;
    height: 30px;
    background: rgba(124, 190, 40, 0.18);
    color: var(--accent);
}

.mobile-nav-toggle-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(247, 251, 255, 0.8);
    border-bottom: 2px solid rgba(247, 251, 255, 0.8);
    transform: rotate(45deg);
    transition: transform 180ms ease;
}

.app-sidebar.is-mobile-nav-open .mobile-nav-toggle-chevron {
    transform: rotate(-135deg);
}

.mobile-account-flyout {
    position: relative;
}

.mobile-account-trigger {
    width: 56px;
    min-width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 22px rgba(6, 12, 20, 0.18);
}

.mobile-account-trigger .account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 0.84rem;
}

.mobile-account-flyout .account-popover {
    right: 0;
    left: auto;
    min-width: min(280px, calc(100vw - 28px));
}

.mobile-nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 75;
    border: 0;
    background: rgba(9, 14, 20, 0.34);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.mobile-nav-scrim[hidden] {
    display: none !important;
}

.mobile-nav-scrim.is-open {
    opacity: 1;
    pointer-events: auto;
    touch-action: none;
}

.sidebar-nav {
    width: 100%;
    max-width: calc(var(--sidebar-rail-width) - 24px);
    min-width: 0;
    box-sizing: border-box;
    margin-inline: auto;
    padding-right: 20px;
    gap: 5px;
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-nav-primary,
.sidebar-group-items-inner {
    display: grid;
    gap: 4px;
}

.sidebar-nav-primary {
    padding-bottom: 3px;
}

.sidebar-nav-primary .sidebar-link:not(.is-active) {
    background: rgba(255, 255, 255, 0.055);
    color: #e9eef3;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.sidebar-nav-primary .sidebar-link:not(.is-active):hover,
.sidebar-nav-primary .sidebar-link:not(.is-active):focus-visible {
    background: rgba(255, 255, 255, 0.065);
    color: #b9e980;
    box-shadow: inset 0 0 0 1px rgba(124, 190, 40, 0.16);
    transform: none;
}

.sidebar-nav-primary .sidebar-link:not(.is-active):hover .nav-token,
.sidebar-nav-primary .sidebar-link:not(.is-active):focus-visible .nav-token {
    background: rgba(124, 190, 40, 0.12);
    color: #9ddd4d;
}

.sidebar-nav-group {
    min-width: 0;
    display: grid;
}

.sidebar-group-toggle {
    width: 100%;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(222, 230, 237, 0.76);
    font: inherit;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle:focus-visible,
.sidebar-nav-group.is-open .sidebar-group-toggle {
    background: rgba(255, 255, 255, 0.05);
    color: #f4f7fa;
}

.sidebar-group-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-nav-group.is-open .sidebar-group-chevron {
    transform: rotate(-135deg) translate(-1px, -1px);
}

.sidebar-group-items {
    min-width: 0;
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease;
}

.sidebar-nav-group.is-open .sidebar-group-items {
    grid-template-rows: 1fr;
    opacity: 1;
}

.sidebar-group-items-inner {
    min-height: 0;
    overflow: hidden;
    padding-top: 2px;
}

.sidebar-link {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
    min-height: 44px;
    padding: 0 9px;
    border-radius: 12px;
    text-align: left;
    font-size: 0.84rem;
    line-height: 1.15;
    transition:
        grid-template-columns 380ms cubic-bezier(0.22, 1, 0.36, 1),
        gap 280ms ease,
        padding 280ms ease,
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.sidebar-link-label {
    max-width: 130px;
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition:
        max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease,
        transform 280ms ease;
}

.nav-token {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.72rem;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: block;
    vector-effect: non-scaling-stroke;
}

@media (min-width: 981px) {
    html.nav-pref-collapsed .app-shell,
    html.nav-pref-collapsed .app-shell.has-nav-flyout {
        --sidebar-rail-width: 94px;
    }

    html.nav-pref-collapsed .app-sidebar {
        padding-inline: 10px;
        gap: 8px;
    }

    html.nav-pref-collapsed .brand-block-sidebar {
        max-width: 60px;
        transform: translateX(-7.5px);
    }

    html.nav-pref-collapsed .sidebar-nav {
        max-width: 52px;
        padding-right: 12px;
    }

    html.nav-pref-collapsed .app-sidebar .brand-logo {
        opacity: 0;
        width: 60px !important;
        max-width: 60px !important;
        transform: scale(0.86) !important;
    }

    html.nav-pref-collapsed .app-sidebar .brand-logo-collapsed {
        opacity: 1;
        transform: scale(1);
    }

    html.nav-pref-collapsed .app-sidebar .brand-copy {
        max-height: 0;
        opacity: 0;
        transform: translateY(-4px);
    }

    html.nav-pref-collapsed .sidebar-collapse-toggle {
        grid-template-columns: 14px 0;
        gap: 0;
        width: 16px;
        padding-inline: 1px;
    }

    html.nav-pref-collapsed .sidebar-collapse-toggle svg {
        transform: rotate(180deg);
    }

    html.nav-pref-collapsed .sidebar-collapse-label {
        max-width: 0;
        opacity: 0;
    }

    html.nav-pref-collapsed .sidebar-link {
        grid-template-columns: 34px 0;
        justify-content: center;
        justify-items: center;
        gap: 0;
        padding-inline: 0;
    }

    html.nav-pref-collapsed .sidebar-link-label {
        max-width: 0;
        opacity: 0;
        transform: translateX(-5px);
    }

    html.nav-pref-collapsed .sidebar-group-toggle {
        display: none;
    }

    html.nav-pref-collapsed .sidebar-group-items {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    html.nav-pref-collapsed .sidebar-nav-group + .sidebar-nav-group {
        padding-top: 3px;
        border-top: 1px solid rgba(255, 255, 255, 0.055);
    }
}

@media (min-width: 861px) {
    .app-sidebar,
    .sidebar-nav,
    .sidebar-link {
        overflow: visible;
    }

    .sidebar-link {
        position: relative;
    }

    .sidebar-link::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 12px);
        top: 50%;
        z-index: 100;
        padding: 8px 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 9px;
        background: #171c22;
        color: #f7fbff;
        box-shadow: 0 10px 24px rgba(6, 12, 20, 0.28);
        font-size: 0.76rem;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transform: translate(5px, -50%) scale(0.96);
        transform-origin: left center;
        transition:
            opacity 140ms ease,
            transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    html.nav-pref-collapsed .sidebar-link:hover::after,
    html.nav-pref-collapsed .sidebar-link:focus-visible::after {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }

    html.nav-pref-collapsed .app-shell.has-nav-flyout .sidebar-link::after {
        opacity: 0;
    }
}

@media (min-width: 861px) and (max-width: 980px) {
    .sidebar-collapse-toggle {
        display: none;
    }

    .app-sidebar .brand-logo,
    .app-sidebar .brand-logo-prominent {
        width: 62px !important;
        max-width: 62px !important;
        opacity: 0;
        transform: scale(0.86) !important;
    }

    .app-sidebar .brand-logo-collapsed {
        opacity: 1;
        transform: scale(1);
    }

    .sidebar-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-group-toggle {
        display: none;
    }

    .sidebar-group-items {
        grid-template-rows: 1fr;
        opacity: 1;
    }

    .sidebar-nav-group + .sidebar-nav-group {
        padding-top: 3px;
        border-top: 1px solid rgba(255, 255, 255, 0.055);
    }

    .sidebar-link:hover::after,
    .sidebar-link:focus-visible::after {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }

    .app-shell.has-nav-flyout .sidebar-link::after {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell,
    .app-sidebar,
    .brand-block-sidebar,
    .app-sidebar .brand-logo,
    .app-sidebar .brand-logo-collapsed,
    .app-sidebar .brand-copy,
    .sidebar-collapse-toggle,
    .sidebar-collapse-toggle svg,
    .sidebar-collapse-label,
    .sidebar-nav,
    .sidebar-group-chevron,
    .sidebar-group-items,
    .sidebar-link,
    .sidebar-link-label,
    .sidebar-link::after,
    .mobile-nav-section,
    .mobile-nav-section-chevron,
    .mobile-nav-link {
        transition-duration: 1ms !important;
    }

    .mobile-nav-menu {
        animation-duration: 1ms !important;
    }
}

@media (min-width: 861px) and (max-height: 860px) {
    .app-sidebar {
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }

    .sidebar-nav {
        max-height: calc(100vh - 110px);
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 20px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    }
}

.app-main {
    padding: 20px 24px 24px;
}

.topbar {
    margin-bottom: 20px;
    padding: 2px 0 16px;
    border-bottom: 1px solid var(--line);
}

.topbar-copy {
    display: grid;
    gap: 4px;
}

.topbar-copy h1 {
    margin-top: 0;
    font-size: 1.88rem;
    line-height: 1.04;
}

.topbar-meta {
    align-items: flex-start;
    gap: 12px;
}

.topbar-chip-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(96px, auto);
    gap: 10px;
    overflow: auto;
    padding-bottom: 2px;
}

.toolbar-chip {
    min-width: 96px;
    border-radius: 14px;
    background: var(--panel);
}

.shell-controls {
    align-items: flex-start;
}

@media (min-width: 861px) {
    .app-main > .topbar {
        max-width: none;
        margin: -20px -24px 20px;
        padding: 0 0 0 24px;
        align-items: stretch;
        row-gap: 0;
    }

    .topbar .topbar-copy,
    .topbar .topbar-chip-row {
        padding-block: 20px 16px;
    }

    .topbar .topbar-meta {
        flex-grow: 1;
        align-items: stretch;
        row-gap: 0;
    }

    .topbar .shell-controls {
        flex-grow: 1;
        align-items: center;
        align-content: center;
        gap: 6px;
        padding: 20px 24px 16px 8px;
        background: color-mix(in srgb, var(--bg) 99%, var(--ink));
        box-shadow: inset 3px 3px 10px rgba(0, 0, 0, 0.09);
    }

    body.theme-dark .topbar .shell-controls {
        background: color-mix(in srgb, var(--bg) 88%, var(--ink));
    }

    /* Hide inline controls before the dropdown is initialized on page load. */
    html.shell-controls-pref-collapsed .topbar .shell-controls > :is(.shell-refresh, .inline-form, .notification-flyout) {
        display: none;
    }

    html.shell-controls-pref-collapsed .topbar .shell-controls {
        flex-grow: 0;
        margin-inline-start: auto;
    }

    .shell-controls-toggle {
        display: inline-grid;
        place-items: center;
        flex: 0 0 24px;
        margin-inline-end: auto;
        height: 36px;
        padding: 0;
        border: 1px solid transparent;
        border-radius: 8px;
        background: transparent;
        color: var(--ink-soft);
        cursor: pointer;
    }

    .shell-controls-toggle:hover,
    .shell-controls-toggle:focus-visible {
        border-color: var(--line-strong);
        background: var(--panel);
        color: var(--ink);
    }

    html.shell-controls-pref-collapsed .shell-controls .shell-controls-toggle svg {
        transform: rotate(180deg);
    }

    .shell-controls > .account-flyout > .account-trigger {
        min-width: 210px;
    }

    html.shell-controls-pref-collapsed .shell-controls .account-trigger {
        min-width: 0;
        padding-inline: 10px;
    }

    html.shell-controls-pref-collapsed .shell-controls .account-trigger .account-copy {
        display: none;
    }

    html.shell-controls-pref-collapsed .shell-controls .account-popover {
        width: min(430px, calc(100vw - 48px));
        max-height: 65vh;
        overflow-y: auto;
    }

    .shell-compact-tools:not([hidden]) {
        display: grid;
        gap: 8px;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line);
    }

    .shell-compact-tools .shell-refresh {
        flex-wrap: wrap;
    }

    .shell-compact-tools .shell-popover {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 6px;
        box-shadow: none;
    }
}

@media (max-width: 860px) {
    .shell-controls-toggle {
        display: none;
    }
}

.nav-flyout {
    --flyout-panel-width: var(--nav-flyout-width);
    position: fixed;
    top: 0;
    left: calc(var(--sidebar-rail-width) - var(--flyout-panel-width));
    width: var(--flyout-panel-width);
    height: 100vh;
    z-index: 30;
    padding: 18px 16px 20px;
    border-left: none;
    border-right: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 0 22px 22px 0;
    background:
        linear-gradient(180deg, rgba(124, 190, 40, 0.06), transparent 140px),
        color-mix(in srgb, var(--panel) 90%, var(--bg-soft));
    backdrop-filter: blur(10px);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.24),
        14px 0 28px rgba(15, 23, 42, 0.14);
    min-width: 0;
    transform: translateX(0);
    transform-origin: right center;
    transition:
        transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
        background 400ms ease,
        box-shadow 400ms ease;
    will-change: transform;
}

.nav-flyout.is-open {
    transform: translateX(var(--flyout-panel-width));
}

.nav-flyout:not(.is-open) {
    pointer-events: none;
}

body.theme-dark .nav-flyout {
    background:
        linear-gradient(180deg, rgba(124, 190, 40, 0.08), transparent 180px),
        color-mix(in srgb, var(--panel) 88%, #1a1e25);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.04),
        16px 0 32px rgba(2, 6, 23, 0.42);
}

.nav-flyout-locations {
    --flyout-panel-width: min(248px, calc(100vw - var(--sidebar-rail-width) - 12px));
    padding: 10px 10px 14px;
    background: #f7f9fb;
    border-right: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.78),
        12px 0 24px rgba(15, 23, 42, 0.08);
}

body.theme-dark .nav-flyout-locations {
    background: linear-gradient(180deg, rgba(45, 50, 59, 0.99) 0%, rgba(38, 43, 51, 0.99) 100%);
    border-right-color: rgba(112, 120, 133, 0.4);
}

.nav-flyout-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.nav-flyout-head h2 {
    margin: 2px 0 0;
    font-size: 1.2rem;
}

.nav-flyout-locations .nav-flyout-head {
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 6px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-flyout-locations .nav-flyout-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.nav-flyout-manage-link {
    color: var(--link);
    font-size: 0.84rem;
    font-weight: 700;
}

.nav-flyout-manage-link:hover {
    text-decoration: none;
}

.nav-flyout-search input {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
}

.nav-flyout-body {
    margin-top: 12px;
    max-height: calc(100vh - 176px);
    overflow: auto;
    padding-right: 4px;
}

.nav-flyout-locations .nav-flyout-body {
    margin-top: 0;
    max-height: calc(100vh - 76px);
    padding-right: 2px;
}

.flyout-menu-grid {
    display: grid;
    gap: 12px;
}

.flyout-menu-card {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.flyout-menu-card strong {
    font-size: 0.96rem;
}

.flyout-menu-card span {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.flyout-menu-card:hover,
.flyout-menu-card.is-active {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}

.sidebar-link:hover {
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.sidebar-link:hover .nav-token,
.sidebar-link.is-active .nav-token {
    transform: scale(1.04);
}

.location-workspace-list {
    display: grid;
    gap: 8px;
}

.location-workspace-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: none;
}

body.theme-dark .location-workspace-card {
    background: linear-gradient(180deg, rgba(54, 60, 70, 0.98) 0%, rgba(46, 51, 60, 0.98) 100%);
    border-color: var(--line-strong);
}

body.theme-dark .location-workspace-summary {
    background: rgba(70, 77, 88, 0.92);
}

body.theme-dark .location-workspace-card[open] .location-workspace-summary {
    background: rgba(78, 86, 98, 0.94);
}

body.theme-dark .location-workspace-summary-icon,
body.theme-dark .location-workspace-summary-chevron {
    color: #d8dde6;
    border-color: currentColor;
}

body.theme-dark .location-workspace-menu-link {
    color: var(--ink);
}

body.theme-dark .location-workspace-menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .location-workspace-menu-link.is-active {
    background: rgba(124, 190, 40, 0.16);
    color: #f2f7e7;
}

.location-workspace-summary {
    list-style: none;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    cursor: pointer;
    background: #eef2f6;
    transition: background 150ms ease;
}

.location-workspace-summary::-webkit-details-marker {
    display: none;
}

.location-workspace-summary-name {
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.location-workspace-summary-icon {
    width: 12px;
    height: 10px;
    display: block;
    border: 2px solid currentColor;
    border-bottom-width: 4px;
    border-radius: 2px 2px 1px 1px;
    color: #4b5563;
}

.location-workspace-summary-chevron {
    width: 8px;
    height: 8px;
    display: block;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    transition: transform 150ms ease;
}

.location-workspace-card[open] .location-workspace-summary {
    background: #e7ebef;
}

.location-workspace-card[open] .location-workspace-summary-chevron {
    transform: rotate(-135deg);
}

.location-workspace-action-group {
    display: grid;
    gap: 8px;
    padding: 8px 10px 10px;
}

.location-workspace-section-band {
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 6px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 84%, #5a9620), color-mix(in srgb, var(--accent) 66%, #46761a));
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.location-workspace-section-band:hover {
    text-decoration: none;
}

.location-workspace-context {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.location-workspace-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.location-workspace-menu li + li {
    margin-top: 2px;
}

.location-workspace-menu-link {
    min-height: 28px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    border-radius: 6px;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 600;
}

.location-workspace-menu-link:hover {
    text-decoration: none;
    background: rgba(148, 163, 184, 0.12);
}

.location-workspace-menu-link.is-active {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: color-mix(in srgb, var(--accent) 64%, #1f2937);
}

.location-workspace-menu-bullet {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 2px;
    background: #111827;
    opacity: 0.78;
}

body.theme-dark .location-workspace-menu-bullet {
    background: #e5e7eb;
}

.location-workspace-tree-disclosure {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.location-workspace-tree-toggle {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.location-workspace-tree-toggle [data-location-tree-label] {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #9aa6b5;
}

.location-workspace-tree-toggle:hover {
    background: rgba(148, 163, 184, 0.08);
}

.location-workspace-tree-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 170ms ease;
}

.location-workspace-tree-toggle[aria-expanded="true"] .location-workspace-tree-chevron {
    transform: rotate(-135deg);
}

.location-workspace-tree-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        max-height 190ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 150ms ease,
        transform 190ms ease;
}

.location-workspace-tree-panel.is-open {
    opacity: 1;
    transform: translateY(0);
}

.location-workspace-tree {
    padding: 0 10px 10px;
    background: transparent;
}

body.theme-dark .location-workspace-tree {
    background: transparent;
}

body.theme-dark .location-workspace-tree-toggle [data-location-tree-label] {
    color: #93a0b3;
}

body.theme-dark .location-workspace-tree-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.location-workspace-section-label {
    margin: 0 0 8px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.location-workspace-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-workspace-node + .location-workspace-node {
    margin-top: 6px;
}

.location-workspace-node {
    position: relative;
}

.location-workspace-node .location-workspace-children {
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(148, 163, 184, 0.28);
}

.location-workspace-tree-link {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 8px;
    border-radius: 6px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 600;
}

body.theme-dark .location-workspace-tree-link {
    background: transparent;
}

.location-workspace-tree-link:hover {
    text-decoration: none;
    background: rgba(148, 163, 184, 0.08);
}

.location-workspace-tree-link small {
    color: var(--ink-soft);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toolbar-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 700;
}

.toolbar-pill:hover {
    text-decoration: none;
    background: var(--panel-soft);
}

.dashboard-console {
    display: grid;
    gap: 18px;
}

.dashboard-command-center,
.dashboard-panel {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.dashboard-command-center {
    display: grid;
    gap: 22px;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(124, 190, 40, 0.18), transparent 30%),
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white) 0%, var(--panel) 100%);
}

.dashboard-command-main,
.dashboard-panel-head,
.dashboard-subpanel-head,
.dashboard-stream-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.dashboard-command-copy {
    display: grid;
    gap: 10px;
    max-width: 700px;
}

.dashboard-command-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.dashboard-command-copytext {
    max-width: 64ch;
    color: var(--ink-soft);
    font-size: 1rem;
}

.dashboard-command-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.dashboard-command-tile {
    min-height: 132px;
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line));
    background: rgba(255, 255, 255, 0.74);
}

.dashboard-command-tile strong {
    font-size: clamp(1.4rem, 2vw, 2rem);
    letter-spacing: -0.04em;
}

.dashboard-command-tile p:last-child {
    color: var(--ink-soft);
}

.dashboard-site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.dashboard-site-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(124, 190, 40, 0.1), transparent 36%),
        var(--panel-soft);
}

.dashboard-site-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.dashboard-site-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.dashboard-site-card-head strong {
    font-size: 1.04rem;
}

.dashboard-site-card-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
}

.dashboard-site-card-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.dashboard-site-card-ratios,
.dashboard-site-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-site-card-meta {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.status-inline-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.status-inline-pill.tone-green {
    background: #ecf8d8;
    color: #48740f;
}

.status-inline-pill.tone-orange {
    background: #fff0e2;
    color: #a55814;
}

.dashboard-ops-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.dashboard-primary-column,
.dashboard-secondary-column {
    display: grid;
    gap: 18px;
}

.dashboard-panel {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.dashboard-panel-head h2,
.dashboard-subpanel-head h3,
.dashboard-stream-head h3 {
    margin: 0;
}

.dashboard-signal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-signal-card {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, var(--panel-soft) 100%);
}

.dashboard-signal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-signal-token {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, white);
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-signal-top strong {
    font-size: 1.8rem;
    letter-spacing: -0.05em;
}

.dashboard-signal-card h3 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-signal-card p {
    color: var(--ink-soft);
}

.dashboard-stream-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-stream {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.dashboard-stream-list,
.dashboard-watch-list,
.dashboard-activity-list,
.dashboard-knowledge-list {
    display: grid;
    gap: 10px;
}

.dashboard-stream-link,
.dashboard-watch-item,
.dashboard-knowledge-item {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    background: rgba(255, 255, 255, 0.76);
}

.dashboard-stream-link:hover,
.dashboard-watch-item:hover,
.dashboard-knowledge-item:hover {
    text-decoration: none;
    background: var(--panel);
}

.dashboard-stream-title {
    display: grid;
    gap: 4px;
}

.dashboard-stream-title strong {
    font-size: 0.95rem;
    line-height: 1.35;
}

.dashboard-stream-code {
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-stream-meta,
.dashboard-watch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.dashboard-stream-empty {
    padding: 14px;
    border-radius: 14px;
    background: var(--panel);
    color: var(--ink-soft);
}

.dashboard-risk-panel {
    gap: 16px;
}

.dashboard-risk-score-row {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, var(--panel-soft) 100%);
}

.dashboard-risk-score-row.is-excellent {
    border-color: #bfd8b1;
    background: linear-gradient(180deg, #fbfff8 0%, #eef9e5 100%);
}

.dashboard-risk-score-row.is-healthy {
    border-color: #c9ddbb;
    background: linear-gradient(180deg, #fbfff9 0%, #f0f8e8 100%);
}

.dashboard-risk-score-row.is-watch {
    border-color: #e2d1ad;
    background: linear-gradient(180deg, #fffaf1 0%, #f7edd8 100%);
}

.dashboard-risk-score-row.is-concern {
    border-color: #e3c2ae;
    background: linear-gradient(180deg, #fff8f2 0%, #f8e6da 100%);
}

.dashboard-risk-score-row.is-critical {
    border-color: #e1bbb7;
    background: linear-gradient(180deg, #fff8f8 0%, #fae3e1 100%);
}

.dashboard-risk-score-value {
    display: flex;
    align-items: end;
    gap: 8px;
}

.dashboard-risk-score-value strong {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 0.92;
    letter-spacing: -0.07em;
}

.dashboard-risk-score-value span {
    padding-bottom: 6px;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.dashboard-risk-summary {
    margin: 0;
    max-width: 34ch;
    color: var(--ink-soft);
}

.dashboard-risk-trend {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    background: rgba(255, 255, 255, 0.76);
}

.dashboard-risk-trend-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}

.dashboard-risk-trend-head strong {
    font-size: 0.95rem;
}

.dashboard-risk-trend-note {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.45;
}

.dashboard-risk-trend-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    min-height: 136px;
}

.dashboard-risk-trend-column {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.dashboard-risk-trend-bar {
    display: flex;
    align-items: end;
    width: 100%;
    min-width: 34px;
    height: 108px;
    padding: 4px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.12);
}

.dashboard-risk-trend-fill {
    display: block;
    width: 100%;
    min-height: 6px;
    border-radius: 8px;
}

.dashboard-risk-trend-bar.is-excellent .dashboard-risk-trend-fill {
    background: linear-gradient(180deg, #a6df62 0%, #6da31f 100%);
}

.dashboard-risk-trend-bar.is-healthy .dashboard-risk-trend-fill {
    background: linear-gradient(180deg, #b8dd72 0%, #7ead30 100%);
}

.dashboard-risk-trend-bar.is-watch .dashboard-risk-trend-fill {
    background: linear-gradient(180deg, #f0d98f 0%, #d3a52d 100%);
}

.dashboard-risk-trend-bar.is-concern .dashboard-risk-trend-fill {
    background: linear-gradient(180deg, #f8c07b 0%, #ea8a25 100%);
}

.dashboard-risk-trend-bar.is-critical .dashboard-risk-trend-fill {
    background: linear-gradient(180deg, #ef8a8a 0%, #d33b3b 100%);
}

.dashboard-risk-trend-label {
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-risk-trend-empty {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.5;
}

.dashboard-risk-breakdown {
    display: grid;
    gap: 10px;
}

.dashboard-risk-factor {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    background: rgba(255, 255, 255, 0.76);
}

.dashboard-risk-factor-head,
.dashboard-risk-factor-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}

.dashboard-risk-factor-head strong {
    font-size: 0.95rem;
}

.dashboard-risk-factor-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
}

.dashboard-risk-factor-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.dashboard-risk-factor-bar > span.tone-green {
    background: linear-gradient(90deg, #8fd33a 0%, #67a117 100%);
}

.dashboard-risk-factor-bar > span.tone-amber {
    background: linear-gradient(90deg, #f2cf74 0%, #dca61b 100%);
}

.dashboard-risk-factor-bar > span.tone-orange {
    background: linear-gradient(90deg, #f8b24a 0%, #f08a14 100%);
}

.dashboard-risk-factor-bar > span.tone-red {
    background: linear-gradient(90deg, #f06262 0%, #d93434 100%);
}

.dashboard-risk-factor-meta {
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.dashboard-risk-footnote {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-cost-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-cost-tile {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(124, 190, 40, 0.1), transparent 34%),
        var(--panel-soft);
}

.dashboard-cost-tile strong {
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

.dashboard-cost-tile p:last-child {
    color: var(--ink-soft);
}

.dashboard-finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 14px;
}

.dashboard-subpanel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.dashboard-watch-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-watch-head strong {
    font-size: 0.95rem;
}

.dashboard-activity-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 14px;
    background: var(--panel-soft);
}

.dashboard-activity-item p,
.dashboard-activity-item span {
    color: var(--ink-soft);
}

.dashboard-activity-item span {
    font-size: 0.76rem;
}

.dashboard-knowledge-item {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
}

.dashboard-knowledge-thumb .media-thumb-shell,
.dashboard-knowledge-thumb .media-thumb-frame {
    width: 100%;
}

.dashboard-knowledge-copy {
    display: grid;
    gap: 6px;
}

.dashboard-knowledge-copy strong {
    font-size: 0.94rem;
    line-height: 1.35;
}

.dashboard-knowledge-copy p,
.dashboard-knowledge-copy span {
    color: var(--ink-soft);
}

.dashboard-knowledge-copy span {
    font-size: 0.76rem;
}

.dashboard-card-grid,
.dashboard-work-grid,
.settings-layout,
.settings-card-stack,
.teams-layout,
.settings-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card-stack {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
}

.settings-panel-card,
.settings-role-card {
    height: 100%;
}

.settings-hero-card {
    padding: 20px 22px;
}

.settings-tab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.settings-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.72);
}

.settings-tab:hover,
.settings-tab.is-active {
    text-decoration: none;
}

.settings-tab.is-active {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    color: var(--accent-strong);
}

.settings-kv-list {
    display: grid;
    gap: 12px;
}

.settings-kv-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel-soft);
}

.settings-kv-row span {
    color: var(--ink-soft);
}

.settings-kv-row strong {
    text-align: right;
    max-width: 62%;
    overflow-wrap: anywhere;
}

.settings-action-stack {
    align-items: center;
}

.settings-billing-portal-button {
    min-width: 190px;
    box-shadow: 0 16px 28px rgba(116, 181, 34, 0.22);
}

.settings-billing-portal-button:hover {
    box-shadow: 0 18px 34px rgba(116, 181, 34, 0.28);
}

.settings-panel-card .settings-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-panel-card .settings-inline-form .settings-billing-portal-button,
.settings-panel-card .settings-action-stack > .button-ghost {
    width: auto;
    min-width: 180px;
    justify-content: center;
}

.settings-panel-card .settings-inline-form select,
.settings-panel-card .settings-inline-form input:not([type="hidden"]),
.settings-panel-card .settings-control-form input,
.settings-panel-card .settings-control-form select,
.settings-panel-card .settings-control-form textarea,
.settings-readonly-field input {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(249, 250, 254, 0.99) 100%);
    box-shadow: 0 2px 8px rgba(47, 51, 73, 0.03);
}

.settings-panel-card .settings-inline-form select {
    width: auto;
    min-width: 260px;
}

.settings-panel-card .settings-control-form {
    display: grid;
    gap: 14px;
}

.settings-panel-card .settings-control-form label,
.settings-readonly-field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.settings-panel-card .settings-control-form label span,
.settings-readonly-field span {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.settings-copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.settings-readonly-field input {
    color: var(--ink-soft);
}

.settings-panel-card .settings-control-form .form-actions {
    margin-top: 2px;
}

body.theme-dark .settings-panel-card .settings-inline-form select,
body.theme-dark .settings-panel-card .settings-inline-form input:not([type="hidden"]),
body.theme-dark .settings-panel-card .settings-control-form input,
body.theme-dark .settings-panel-card .settings-control-form select,
body.theme-dark .settings-panel-card .settings-control-form textarea,
body.theme-dark .settings-readonly-field input {
    background: linear-gradient(180deg, rgba(34, 42, 57, 0.98) 0%, rgba(28, 35, 49, 0.98) 100%);
    border-color: var(--line);
    color: var(--ink);
    box-shadow: none;
}

.part-category-editor {
    display: grid;
    gap: 20px;
}

.part-category-feedback {
    min-height: 22px;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.part-category-feedback:empty {
    display: none;
}

.part-category-feedback.is-success {
    color: var(--success, #27754a);
}

.part-category-feedback.is-error {
    color: var(--danger, #b43a3a);
}

.part-category-add-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-soft);
}

.part-category-add-form label {
    display: grid;
    gap: 7px;
}

.part-category-add-form label > span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.part-category-add-form input,
.part-category-row input {
    min-height: 44px;
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--panel);
    font: inherit;
}

.part-category-list {
    display: grid;
    gap: 9px;
}

.part-category-row {
    display: grid;
    grid-template-columns: 42px minmax(220px, 1fr) minmax(84px, auto) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 5px 16px rgba(35, 42, 65, 0.04);
    transition: border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.part-category-row:hover {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    box-shadow: 0 8px 22px rgba(35, 42, 65, 0.08);
}

.part-category-row.is-dragging {
    opacity: 0.55;
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(35, 42, 65, 0.16);
}

.part-category-drag-handle {
    min-width: 42px;
    width: 42px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    cursor: grab;
    font-size: 1.05rem;
    letter-spacing: -0.22em;
}

.part-category-drag-handle:active {
    cursor: grabbing;
}

.part-category-usage {
    color: var(--ink-soft);
    font-size: 0.82rem;
    white-space: nowrap;
}

.part-category-row-actions {
    display: flex;
    gap: 8px;
}

.part-category-delete-button {
    color: var(--danger, #b43a3a);
}

.part-category-empty {
    padding: 28px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--ink-soft);
    text-align: center;
}

.part-category-editor-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding-top: 4px;
}

.part-category-editor-footer p {
    max-width: 760px;
    color: var(--ink-soft);
}

.part-category-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.part-category-manager.is-saving,
.part-category-editor.is-saving {
    cursor: progress;
}

body.theme-dark .part-category-add-form input,
body.theme-dark .part-category-row input {
    background: rgba(28, 35, 49, 0.98);
    border-color: var(--line);
}

@media (max-width: 780px) {
    .part-category-add-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-category-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .part-category-usage {
        grid-column: 2;
    }

    .part-category-row-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .part-category-editor-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .part-category-footer-actions {
        justify-content: stretch;
    }

    .part-category-footer-actions > button {
        flex: 1 1 210px;
    }
}

.settings-role-card {
    display: grid;
    gap: 14px;
}

.settings-role-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.team-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.team-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--team-color, var(--accent)) 24%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--team-color, var(--accent)) 8%, var(--panel)) 0%, var(--panel) 100%);
}

.team-card:hover {
    text-decoration: none;
}

.team-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-dot,
.team-chip::before {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--team-color, var(--accent));
    content: "";
}

.team-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--team-color, var(--accent)) 10%, var(--panel));
    color: color-mix(in srgb, var(--team-color, var(--accent)) 50%, var(--ink));
    font-size: 0.82rem;
    font-weight: 700;
}

.map-marker {
    background: transparent;
    border: 0;
}

.map-marker span {
    width: 18px;
    height: 18px;
    display: block;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

.map-marker-site span {
    background: #7cbe28;
}

.map-marker-location span {
    background: #2e5f96;
}

.maps-console {
    display: grid;
    gap: 16px;
}

.maps-console-branches {
    gap: 0;
}

.maps-console-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.maps-stage {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.maps-stage-branches {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
}

.maps-stage-sidebar {
    display: grid;
    gap: 16px;
}

.maps-panel-card,
.maps-canvas-shell {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.maps-panel-card {
    padding: 16px;
}

.maps-panel-card-compact {
    padding: 14px;
    border-radius: 18px;
}

.maps-panel-head {
    margin-bottom: 12px;
}

.maps-panel-head h3,
.maps-panel-card h3 {
    margin: 2px 0 0;
    font-size: 1.04rem;
}

.maps-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.maps-stat-tile {
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 14px;
    background: var(--panel-soft);
}

.maps-stat-tile strong {
    font-size: 1.2rem;
}

.maps-stat-tile span {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.maps-directory-list,
.maps-missing-list {
    display: grid;
    gap: 10px;
}

.maps-branch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.maps-branch-summary span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.maps-branch-summary strong,
.maps-canvas-meta strong {
    color: inherit;
    font: inherit;
}

.maps-directory-item,
.maps-missing-item {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border-radius: 14px;
    background: var(--panel-soft);
    border: 1px solid transparent;
}

.maps-directory-item strong,
.maps-missing-item strong {
    font-size: 0.92rem;
}

.maps-directory-item span,
.maps-missing-item span,
.maps-directory-item small,
.maps-missing-item small {
    color: var(--ink-soft);
}

.maps-directory-item em {
    width: fit-content;
    margin-top: 3px;
    padding: 3px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 60%, transparent);
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 750;
    line-height: 1.2;
}

.maps-directory-item[data-map-state="address"] em {
    background: rgba(62, 123, 255, 0.1);
    color: #3565bc;
}

.maps-directory-item[data-map-state="address-resolved"] em {
    background: rgba(124, 190, 40, 0.14);
    color: #4f7f17;
}

.maps-directory-item[data-map-state="address-failed"] em,
.maps-directory-item[data-map-state="address-unavailable"] em,
.maps-directory-item[data-map-state="missing"] em {
    background: rgba(201, 78, 78, 0.1);
    color: #a23d3d;
}

.maps-directory-item:hover,
.maps-directory-item.is-active {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.maps-directory-empty {
    padding: 12px 0 4px;
    color: var(--ink-soft);
}

.maps-canvas-shell {
    padding: 12px;
}

.maps-canvas-shell-branches {
    min-height: calc(100vh - 170px);
}

.maps-canvas-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 6px 12px;
}

.maps-canvas-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.maps-canvas-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.location-map-console {
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: 720px;
    border-radius: 18px;
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--panel-soft);
}

.location-map-branches {
    min-height: calc(100vh - 240px);
}

.map-popup strong {
    display: block;
    margin-bottom: 6px;
}

.map-popup p {
    margin: 0 0 8px;
    color: #475569;
}

.idea-board-shell {
    display: grid;
    gap: 18px;
}

.idea-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.idea-status-tab {
    position: relative;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
    color: var(--ink-soft);
    font-weight: 700;
}

.idea-status-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -13px;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}

.idea-status-tab:hover,
.idea-status-tab.is-active {
    text-decoration: none;
}

.idea-status-tab.is-active {
    color: var(--ink);
}

.idea-status-tab.is-active::after {
    background: var(--accent);
}

.idea-status-count {
    min-width: 22px;
    min-height: 22px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--panel-soft);
    font-size: 0.72rem;
}

.idea-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.idea-category-column {
    display: grid;
    gap: 12px;
    align-content: start;
}

.idea-category-title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.idea-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.idea-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.idea-card-top,
.idea-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.idea-card-top strong {
    font-size: 0.95rem;
}

.idea-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.idea-card-meta {
    color: var(--ink-muted);
    font-size: 0.8rem;
}

.public-status-indicator {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.public-idea-shell {
    margin-top: 24px;
}

.public-idea-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 18px;
}

.public-idea-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.public-idea-column {
    display: grid;
    gap: 12px;
}

.public-idea-column h3 {
    margin: 0;
    font-size: 1rem;
}

.public-idea-link {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.public-idea-link:hover {
    text-decoration: none;
    background: var(--panel);
}

.public-idea-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-muted);
    font-size: 0.8rem;
}

.public-idea-detail {
    display: grid;
    gap: 14px;
}

.public-comment-stack {
    display: grid;
    gap: 10px;
}

.public-comment {
    padding: 12px;
    border-radius: 14px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.public-comment p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1420px) {
    .app-shell.has-nav-flyout {
        grid-template-columns: 224px minmax(0, 1fr);
    }
}

@media (max-width: 1180px) {
    .dashboard-command-grid,
    .dashboard-signal-grid,
    .dashboard-cost-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-ops-layout,
    .dashboard-finance-grid,
    .dashboard-stream-grid,
    .dashboard-work-grid,
    .settings-layout,
    .teams-layout,
    .maps-stage,
    .public-idea-grid {
        grid-template-columns: 1fr;
    }

    .idea-category-grid,
    .public-idea-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-focus-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-focus-layout {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    }

    .part-focus-media-card {
        position: static;
    }
}

@media (max-width: 980px) {
    .app-shell,
    .app-shell.has-nav-flyout {
        --sidebar-rail-width: 90px;
        --nav-flyout-width: min(294px, calc(100vw - var(--sidebar-rail-width) - 14px));
        grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
    }

    .nav-flyout {
        position: fixed;
        top: 0;
        left: calc(var(--sidebar-rail-width) - var(--nav-flyout-width));
        width: var(--nav-flyout-width);
        height: 100vh;
        z-index: 80;
        box-shadow: var(--shadow);
    }

    .app-sidebar .brand-copy,
    .sidebar-link span:last-child {
        display: none;
    }

    .sidebar-link {
        grid-template-columns: 1fr;
        justify-items: center;
        padding-inline: 8px;
    }

    .nav-token {
        width: 34px;
        height: 34px;
    }

    .import-flow-grid,
    .import-platform-summary-grid,
    .import-modal-guide,
    .import-stage-filter-grid,
    .import-filter-check-grid {
        grid-template-columns: 1fr;
    }

    .import-job-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .compact-stat-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .module-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .module-band > .module-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .compact-stat-chip {
        min-width: 0;
        padding: 12px 14px;
    }

    .compact-stat-chip strong {
        font-size: 1.28rem;
    }

    .compact-stat-chip .hint {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .module-stat {
        min-width: 0;
        padding: 12px 14px;
    }

    .module-stat strong {
        font-size: 1.34rem;
    }

    .module-stat p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .import-connection-details,
    .import-flow-metrics {
        grid-template-columns: 1fr;
    }

    .import-job-stats,
    .import-platform-summary-grid {
        grid-template-columns: 1fr;
    }

    .app-main {
        padding: 16px 14px 24px;
    }

    .topbar {
        display: grid;
        gap: 14px;
        margin-bottom: 16px;
        padding: 4px 0 14px;
        align-items: stretch;
    }

    .topbar-copy {
        gap: 6px;
    }

    .topbar-copy h1 {
        margin-top: 2px;
        font-size: clamp(1.9rem, 7vw, 2.25rem);
        line-height: 1;
    }

    .topbar-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .topbar-meta,
    .topbar-chip-row,
    .shell-controls {
        justify-content: stretch;
    }

    .topbar-chip-row,
    .shell-controls,
    .dashboard-command-grid,
    .dashboard-site-grid,
    .dashboard-signal-grid,
    .dashboard-cost-band,
    .dashboard-card-grid,
    .settings-role-grid,
    .idea-board,
    .public-idea-board {
        grid-template-columns: 1fr;
    }

    .topbar-chip-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        overflow: visible;
        padding-bottom: 0;
    }

    .topbar-chip-row .toolbar-chip:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .toolbar-chip {
        min-width: 0;
        min-height: 68px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .toolbar-chip strong {
        font-size: 1.08rem;
    }

    .toolbar-chip span {
        font-size: 0.7rem;
        letter-spacing: 0.06em;
    }

    .account-trigger {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .shell-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        align-items: stretch;
    }

    .shell-controls > .inline-form,
    .shell-refresh,
    .account-flyout {
        width: 100%;
        min-width: 0;
    }

    .account-flyout {
        grid-column: 1 / -1;
    }

    .dashboard-command-main,
    .dashboard-panel-head,
    .dashboard-subpanel-head,
    .dashboard-stream-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-command-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .shell-refresh {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: color-mix(in srgb, var(--panel) 95%, #fff);
    }

    body.theme-dark .shell-refresh {
        background: color-mix(in srgb, var(--panel) 94%, rgba(255, 255, 255, 0.02));
        border-color: var(--line-strong);
    }

    .shell-refresh .shell-icon-button,
    .shell-controls > .inline-form .shell-icon-button {
        width: 100%;
        justify-content: center;
    }

    .shell-refresh .shell-icon-button {
        padding-inline: 10px;
    }

    .shell-refresh-meta {
        min-width: 0;
        justify-items: end;
        text-align: right;
    }

    .shell-refresh-label {
        font-size: 0.64rem;
        letter-spacing: 0.1em;
    }

    .shell-refresh-meta strong {
        font-size: 0.84rem;
    }

    .shell-popover,
    .account-popover {
        left: 0;
        right: auto;
        width: 100%;
        min-width: 0;
    }

    .nav-flyout {
        display: none;
    }

    .app-shell,
    .app-shell.has-nav-flyout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        gap: 0;
        padding: 10px 12px;
        width: 100%;
        max-width: none;
        position: sticky;
        top: 0;
        z-index: 90;
        min-height: auto;
        overflow: visible;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }

    .app-sidebar.has-mobile-nav .mobile-nav-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-brand {
        grid-column: 1 / -1;
        justify-self: center;
        margin-bottom: 4px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-brand-logo {
        width: 160px;
        max-width: 160px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        height: auto;
        min-height: 56px;
        gap: 10px;
        padding: 8px 12px;
        border-radius: 16px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle-copy {
        gap: 3px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle-label {
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle-current {
        gap: 8px;
        font-size: 0.9rem;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle-current .nav-token {
        width: 28px;
        height: 28px;
        border-radius: 9px;
        font-size: 0.68rem;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle-chevron {
        width: 10px;
        height: 10px;
    }

    .app-sidebar.has-mobile-nav .mobile-account-trigger {
        grid-column: 2;
        justify-self: end;
        width: 56px;
        min-width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .app-sidebar.has-mobile-nav .mobile-account-trigger .account-avatar {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 0.74rem;
    }

    .app-sidebar.has-mobile-nav .brand-block-sidebar {
        display: none !important;
    }

    .app-sidebar.has-mobile-nav .sidebar-collapse-toggle {
        display: none !important;
    }

    .app-sidebar.has-mobile-nav .mobile-account-flyout {
        grid-column: 2;
        grid-row: 2;
        display: block;
        width: auto;
        min-width: auto;
        justify-self: end;
        align-self: center;
    }

    .app-sidebar.has-mobile-nav .sidebar-nav {
        max-width: none;
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 12px;
        right: 12px;
        margin: 0;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        background:
            linear-gradient(180deg, rgba(31, 37, 44, 0.98) 0%, rgba(18, 22, 28, 0.98) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.06),
            0 22px 42px rgba(6, 12, 20, 0.34);
        z-index: 95;
    }

    .app-sidebar.has-mobile-nav.is-mobile-nav-open .sidebar-nav {
        display: grid;
    }

    .mobile-nav-scrim {
        display: block;
    }

    .sidebar-link span:last-child {
        display: inline;
    }

    .sidebar-link {
        grid-template-columns: 34px minmax(0, 1fr);
        justify-items: start;
        min-height: 48px;
    }

    .part-focus-kpi-grid,
    .part-focus-panel-grid,
    .part-focus-layout {
        grid-template-columns: 1fr;
    }

    .part-focus-fact-list {
        grid-template-columns: 1fr;
    }

    .part-focus-heading-side {
        justify-items: stretch;
    }

    .part-qr-strip {
        grid-template-columns: 1fr;
    }

    .part-qr-image-link {
        justify-self: start;
    }

    .part-stock-card-head,
    .part-movement-head {
        flex-direction: column;
        align-items: stretch;
    }

    .part-stock-card-meta {
        justify-content: start;
    }

    .location-map {
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .public-idea-board {
        grid-template-columns: 1fr;
    }

    .dashboard-command-center,
    .dashboard-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .dashboard-command-actions,
    .dashboard-ops-layout,
    .dashboard-primary-column,
    .dashboard-secondary-column,
    .dashboard-stream-grid,
    .dashboard-finance-grid,
    .dashboard-knowledge-item,
    .settings-tab-strip {
        display: grid;
        grid-template-columns: 1fr;
    }

    .toolbar-pill,
    .settings-tab {
        justify-content: center;
    }

    .shell-refresh {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.theme-dark .shell-refresh {
        background: transparent;
        border-color: transparent;
    }

    .shell-refresh-meta {
        display: none;
    }

}

.button-ghost.button-ghost-sm,
.button-ghost.button-ghost-small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
}

.wo-workspace-backdrop {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 20px 20px 20px calc(var(--sidebar-rail-width, 224px) + 20px);
    background: rgba(21, 26, 37, 0.28);
    backdrop-filter: blur(6px);
    overscroll-behavior: contain;
}

.wo-workspace-card {
    width: min(1180px, 100%);
    height: min(92vh, 980px);
    min-height: min(92vh, 980px);
    max-height: min(92vh, 980px);
    display: grid;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(248, 250, 255, 0.985) 100%);
    border: 1px solid rgba(171, 182, 205, 0.62);
    border-radius: 28px;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.22);
}

.po-workspace-card {
    width: min(1240px, 100%);
    height: min(96vh, 1040px);
    min-height: min(96vh, 1040px);
    max-height: min(96vh, 1040px);
}

.po-workspace-backdrop {
    padding: 12px 12px 12px calc(var(--sidebar-rail-width, 224px) + 12px);
}

.wo-workspace-card:focus,
.wo-workspace-card:focus-visible {
    outline: none;
}

body.theme-dark .wo-workspace-card {
    background: linear-gradient(180deg, rgba(46, 52, 62, 0.995) 0%, rgba(39, 44, 53, 0.99) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 36px 96px rgba(0, 0, 0, 0.44);
}

.wo-workspace-head,
.wo-workspace-toolbar,
.wo-workspace-tabs,
.wo-summary-strip,
.wo-alert-stack {
    padding-inline: 26px;
}

.wo-inline-panel-stack {
    position: fixed;
    inset: 0;
    display: none;
    padding: 0;
    background: transparent;
    z-index: 180;
    pointer-events: none;
}

.wo-inline-panel-stack.has-open-panel {
    display: block;
}

.wo-workspace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.78);
}

.wo-workspace-card > .wo-workspace-head {
    background: var(--workspace-header-background, var(--modal-header-background));
    border-bottom-color: var(--modal-header-border);
    box-shadow: var(--modal-header-shadow);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.workspace-kind-work-order {
    --workspace-accent: #8bd637;
    --workspace-header-background: linear-gradient(118deg, #123f2e 0%, #2b693c 100%);
}

.workspace-kind-asset {
    --workspace-accent: #e2ad39;
    --workspace-header-background: linear-gradient(118deg, #493913 0%, #765b21 100%);
}

.workspace-kind-part {
    --workspace-accent: #62b7df;
    --workspace-header-background: linear-gradient(118deg, #14384e 0%, #28627e 100%);
}

.workspace-kind-request {
    --workspace-accent: #f0a15a;
    --workspace-header-background: linear-gradient(118deg, #51301a 0%, #7a4927 100%);
}

.workspace-kind-purchase-order {
    --workspace-accent: #b99be8;
    --workspace-header-background: linear-gradient(118deg, #342750 0%, #5c4381 100%);
}

.workspace-kind-pm {
    --workspace-accent: #65cbc8;
    --workspace-header-background: linear-gradient(118deg, #153d40 0%, #286367 100%);
}

.workspace-kind-location {
    --workspace-accent: #75b7d6;
    --workspace-header-background: linear-gradient(118deg, #263b4d 0%, #3f6078 100%);
}

.workspace-kind-vendor {
    --workspace-accent: #d39a64;
    --workspace-header-background: linear-gradient(118deg, #493326 0%, #70503a 100%);
}

.workspace-kind-knowledge {
    --workspace-accent: #879ee8;
    --workspace-header-background: linear-gradient(118deg, #293657 0%, #465b8c 100%);
}

.workspace-kind-idea {
    --workspace-accent: #dc90bd;
    --workspace-header-background: linear-gradient(118deg, #4c2940 0%, #74415f 100%);
}

.workspace-kind-team {
    --workspace-accent: #78c994;
    --workspace-header-background: linear-gradient(118deg, #1d4437 0%, #356c55 100%);
}

.workspace-kind-user {
    --workspace-accent: #a7b2c5;
    --workspace-header-background: linear-gradient(118deg, #303a4a 0%, #4e5c70 100%);
}

.wo-workspace-card > .wo-workspace-head .wo-workspace-code {
    color: var(--modal-header-muted);
}

.wo-workspace-card > .wo-workspace-head .wo-workspace-head-copy h2 {
    color: var(--modal-header-title);
}

.wo-workspace-card > .wo-workspace-head .wo-workspace-head-copy p {
    color: var(--modal-header-copy);
}

.wo-workspace-card > .wo-workspace-head .wo-workspace-close {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--modal-header-title);
}

.wo-workspace-card > .wo-workspace-head .wo-workspace-close:hover,
.wo-workspace-card > .wo-workspace-head .wo-workspace-close:focus-visible {
    background: rgba(124, 190, 40, 0.18);
    border-color: rgba(124, 190, 40, 0.5);
    color: #ffffff;
}

body.theme-dark .wo-workspace-card > .wo-workspace-head {
    border-bottom-color: var(--modal-header-border);
}

.wo-workspace-head-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.wo-workspace-head-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 0;
}

.wo-workspace-entity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.wo-workspace-entity-badge .icon,
.wo-workspace-return-context .icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.wo-workspace-entity-badge .icon svg,
.wo-workspace-return-context .icon svg {
    width: 100%;
    height: 100%;
}

.wo-workspace-code {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.wo-workspace-head-copy h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.wo-workspace-head-copy p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 1rem;
}

.wo-workspace-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink-soft);
    flex: 0 0 auto;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.record-focus-card.has-modal-close,
.card.has-modal-close,
.modal-card.has-modal-close {
    position: relative;
}

.record-focus-card.has-modal-close .section-heading,
.card.has-modal-close .section-heading,
.modal-card.has-modal-close .modal-header {
    padding-right: 64px;
}

.workspace-card-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
}

.wo-workspace-close .icon,
.wo-quick-action .icon,
.wo-more-menu-link .icon,
.wo-timer-form .icon,
.wo-tab-panel-head .button-ghost .icon,
.wo-inline-actions .button-ghost .icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.wo-workspace-close .icon svg,
.wo-quick-action .icon svg,
.wo-more-menu-link .icon svg,
.wo-timer-form .icon svg,
.wo-tab-panel-head .button-ghost .icon svg,
.wo-inline-actions .button-ghost .icon svg {
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
}

.wo-workspace-close:hover {
    text-decoration: none;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--line-strong);
    color: var(--ink);
}

body.theme-dark .wo-workspace-close {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink-soft);
    border-color: var(--line-strong);
}

.module-workspace-modal {
    padding: 0;
    overflow: hidden;
}

.module-workspace-modal > .record-focus-card {
    padding: 22px;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
}

.module-workspace-modal > .record-focus-card > .section-heading:first-child {
    align-items: flex-start;
    margin: -22px -22px 22px;
    padding: 22px;
    border-bottom: 1px solid var(--modal-header-border);
    border-radius: calc(var(--modal-card-radius) - 1px) calc(var(--modal-card-radius) - 1px) 0 0;
    background: var(--modal-header-background);
    box-shadow: var(--modal-header-shadow);
    color: var(--modal-header-title);
}

.module-workspace-modal > .record-focus-card.has-modal-close > .section-heading:first-child {
    padding-right: 72px;
}

.module-workspace-modal > .record-focus-card > .section-heading:first-child h2 {
    color: var(--modal-header-title);
}

.module-workspace-modal > .record-focus-card > .section-heading:first-child .card-label {
    color: var(--modal-header-muted);
}

.module-workspace-modal > .record-focus-card > .section-heading:first-child .button-ghost,
.module-workspace-modal > .record-focus-card > .section-heading:first-child .wo-workspace-close {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--modal-header-title);
}

.module-workspace-modal > .record-focus-card > .section-heading:first-child .button-ghost:hover,
.module-workspace-modal > .record-focus-card > .section-heading:first-child .button-ghost:focus-visible,
.module-workspace-modal > .record-focus-card > .section-heading:first-child .wo-workspace-close:hover,
.module-workspace-modal > .record-focus-card > .section-heading:first-child .wo-workspace-close:focus-visible {
    background: rgba(124, 190, 40, 0.18);
    border-color: rgba(124, 190, 40, 0.5);
    color: #ffffff;
}

.wo-workspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

body.theme-dark .wo-workspace-toolbar {
    border-bottom-color: var(--line-strong);
}

.wo-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
}

.wo-status-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wo-status-dropdown {
    position: relative;
}

.wo-status-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--register-control-height, 36px);
    padding: 0 36px 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
    line-height: 1.2;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wo-status-picker:hover {
    border-color: color-mix(in srgb, var(--ink-soft) 60%, var(--line-strong));
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
}

.wo-status-picker:disabled {
    opacity: 0.72;
    cursor: default;
}

.wo-status-picker-value {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ink);
    font-weight: 650;
    font-size: 0.9rem;
    white-space: nowrap;
}

.wo-status-picker:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--accent-strong) 62%, var(--line-strong));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.wo-status-menu {
    width: max-content;
    z-index: 30;
}

.wo-status-menu[hidden] {
    display: none !important;
}

.wo-status-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 620;
    line-height: 1.15;
    transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.wo-status-menu-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-strong) 55%, transparent);
    outline-offset: -2px;
}

.wo-status-menu-item.is-selected::after {
    margin-inline-start: auto;
}

.wo-status-picker::after {
    content: "";
    position: absolute;
    right: 13px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-60%) rotate(45deg);
    color: var(--ink-soft);
    pointer-events: none;
}

.wo-status-picker[aria-expanded="true"]::after {
    transform: translateY(-25%) rotate(225deg);
}

.wo-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    flex: 0 0 auto;
}

.wo-status-dropdown .status-signal {
    width: 8px;
    height: 8px;
    flex-basis: 8px;
    box-shadow: none;
}

.wo-status-dropdown .status-signal.is-slate { background: #8793a1; }
.wo-status-dropdown .status-signal.is-purple { background: #7660b5; }
.wo-status-dropdown .status-signal.is-orange { background: #d9822b; }
.wo-status-dropdown .status-signal.is-cyan { background: #279ba3; }
.wo-status-dropdown .status-signal.is-amber { background: #c49a2c; }
.wo-status-dropdown .status-signal.is-blue { background: #3d78c5; }
.wo-status-dropdown .status-signal.is-indigo { background: #5c6eb5; }
.wo-status-dropdown .status-signal.is-green { background: #5c9f36; }
.wo-status-dropdown .status-signal.is-red { background: #c84c4c; }

.wo-status-dropdown .status-signal.is-pulsing {
    animation: none;
}

.wo-status-reason-input {
    min-width: 260px;
    max-width: 340px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wo-status-reason-input::placeholder {
    color: var(--ink-muted);
}

.wo-status-reason-input:focus {
    outline: none;
    border-color: rgba(124, 190, 40, 0.48);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

body.theme-dark .wo-status-reason-input {
    background: rgba(58, 64, 74, 0.94);
    border-color: var(--line-strong);
    color: #f4f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .wo-status-reason-input::placeholder {
    color: rgba(217, 224, 243, 0.56);
}

.request-approve-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.request-approve-select {
    min-width: 170px;
    height: 44px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background:
        linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 18px) calc(50% - 3px) / 8px 8px no-repeat,
        linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 12px) calc(50% - 3px) / 8px 8px no-repeat,
        rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.request-approve-select:focus {
    outline: none;
    border-color: rgba(124, 190, 40, 0.48);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

.request-approve-button {
    min-width: 98px;
}

body.theme-dark .request-approve-select {
    background:
        linear-gradient(45deg, transparent 50%, rgba(217, 224, 243, 0.72) 50%) calc(100% - 18px) calc(50% - 3px) / 8px 8px no-repeat,
        linear-gradient(135deg, rgba(217, 224, 243, 0.72) 50%, transparent 50%) calc(100% - 12px) calc(50% - 3px) / 8px 8px no-repeat,
        rgba(58, 64, 74, 0.94);
    border-color: var(--line-strong);
    color: #f4f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.wo-quick-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wo-quick-action {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 82%, var(--bg-soft));
    color: color-mix(in srgb, var(--ink) 76%, var(--ink-soft));
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.wo-quick-action .icon,
.wo-quick-action .icon svg {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.wo-quick-action::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1b222c;
    color: #f8fafc;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -3px) scale(0.96);
    transform-origin: top center;
    transition: opacity 140ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.wo-quick-action:last-child::after {
    right: 0;
    left: auto;
    transform: translate(0, -3px) scale(0.96);
    transform-origin: top right;
}

.wo-quick-action:hover::after,
.wo-quick-action:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.wo-quick-action:last-child:hover::after,
.wo-quick-action:last-child:focus-visible::after {
    transform: translate(0, 0) scale(1);
}

.wo-quick-action:hover,
.wo-quick-action:focus-visible,
.wo-quick-action.is-active {
    transform: translateY(-1px);
    background: rgba(124, 190, 40, 0.11);
    border-color: rgba(124, 190, 40, 0.34);
    color: var(--ink);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 5px 14px rgba(15, 23, 42, 0.08);
}

body.theme-dark .wo-quick-action:hover,
body.theme-dark .wo-quick-action:focus-visible,
body.theme-dark .wo-quick-action.is-active {
    background: rgba(124, 190, 40, 0.14);
    color: #eef8dc;
}

body.theme-dark .wo-quick-action {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.wo-toolbar-more {
    position: relative;
}

.wo-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 228px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    z-index: 6;
}

.wo-more-menu[hidden] {
    display: none !important;
}

body.theme-dark .wo-more-menu {
    background: rgba(48, 53, 62, 0.985);
    border-color: var(--line-strong);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.wo-more-menu-link {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.wo-more-menu-link:hover {
    text-decoration: none;
    background: var(--panel-soft);
}

.wo-timer-form {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    margin-left: auto;
}

.wo-toolbar-helper {
    font-size: 0.83rem;
    color: var(--ink-muted);
    white-space: nowrap;
}

.wo-workspace-tabs {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

body.theme-dark .wo-workspace-tabs {
    border-bottom-color: var(--line-strong);
}

.wo-workspace-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 12px 0 14px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-weight: 700;
    line-height: 22px;
    white-space: nowrap;
    cursor: pointer;
}

.wo-workspace-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
    transition: background 0.18s ease;
}

.wo-workspace-tab:hover,
.wo-workspace-tab.is-active {
    color: var(--ink);
}

.wo-workspace-tab.is-active::after {
    background: #3e7bff;
}

.wo-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

body.theme-dark .wo-summary-strip {
    border-bottom-color: var(--line-strong);
}

.wo-summary-metric {
    display: grid;
    gap: 4px;
    padding: 14px 18px 16px;
    border-right: 1px solid rgba(201, 210, 223, 0.72);
}

.wo-summary-metric:last-child {
    border-right: 0;
}

.wo-summary-metric span {
    font-size: 0.78rem;
    color: var(--ink-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
}

.wo-summary-metric strong {
    font-size: 1.05rem;
    line-height: 1.15;
}

.wo-alert-stack {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 0;
}

.wo-alert {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
    background: var(--panel-soft);
}

.wo-alert strong {
    display: block;
    margin-bottom: 4px;
}

.wo-alert p {
    margin: 0;
    color: var(--ink-soft);
}

.wo-alert.is-warning {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(255, 246, 223, 0.96);
}

.wo-alert.is-info {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(239, 246, 255, 0.96);
}

body.theme-dark .wo-alert.is-warning {
    background: rgba(94, 61, 13, 0.42);
}

body.theme-dark .wo-alert.is-info {
    background: rgba(22, 53, 95, 0.32);
}

.wo-inline-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: calc(50% + (var(--sidebar-rail-width, 224px) / 2));
    width: min(760px, calc(100vw - 48px));
    max-height: calc(100vh - 120px);
    margin: 0;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(248, 250, 254, 0.99) 100%);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.28),
        0 10px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.wo-inline-panel.is-visible {
    display: block;
}

body.theme-dark .wo-inline-panel {
    background: linear-gradient(180deg, rgba(50, 56, 66, 0.99) 0%, rgba(43, 48, 58, 0.99) 100%);
    border-color: var(--line-strong);
}

.wo-inline-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

body.theme-dark .wo-inline-panel-head {
    border-bottom-color: var(--line-strong);
}

.wo-inline-panel-head strong {
    font-size: 1.12rem;
}

.wo-inline-panel-close {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-soft);
    cursor: pointer;
}

.wo-inline-panel-close:hover,
.wo-inline-panel-close:focus-visible {
    border-color: var(--line-strong);
    color: var(--ink);
}

body.theme-dark .wo-inline-panel-close {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line-strong);
    color: #d7def2;
}

.wo-inline-panel-close .icon {
    width: 16px;
    height: 16px;
}

.wo-inline-panel-close .icon svg {
    width: 16px;
    height: 16px;
}

.wo-inline-panel-form {
    padding: 22px 22px 24px;
}

.wo-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.wo-inline-grid > .span-2 {
    grid-column: span 2;
}

.wo-inline-grid > .span-3 {
    grid-column: 1 / -1;
}

.wo-inline-grid > label,
.wo-inline-pair > label {
    display: grid;
    gap: 7px;
}

.wo-inline-grid > label > span,
.wo-inline-pair > label > span {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--ink-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wo-inline-panel-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.wo-inline-panel-form select,
.wo-inline-panel-form textarea {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wo-inline-panel-form select {
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%),
        linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.wo-inline-panel-form textarea {
    min-height: 108px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.wo-inline-panel-form input[type="file"] {
    width: 100%;
    min-height: 46px;
    padding: 5px 10px 5px 5px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wo-inline-panel-form input[type="file"]::file-selector-button,
.wo-inline-panel-form input[type="file"]::-webkit-file-upload-button {
    min-height: 34px;
    margin: 0 12px 0 0;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 78%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--panel) 82%, var(--bg-soft));
    color: var(--ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wo-inline-panel-form input[type="file"]:hover::file-selector-button,
.wo-inline-panel-form input[type="file"]:hover::-webkit-file-upload-button {
    border-color: rgba(124, 190, 40, 0.38);
    background: rgba(124, 190, 40, 0.1);
    color: color-mix(in srgb, var(--ink) 88%, var(--accent-dark));
}

body.theme-dark .wo-inline-panel-form input[type="file"] {
    background: rgba(58, 64, 74, 0.94);
    border-color: var(--line-strong);
    color: var(--ink-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark .wo-inline-panel-form input[type="file"]::file-selector-button,
body.theme-dark .wo-inline-panel-form input[type="file"]::-webkit-file-upload-button {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: #f4f7ff;
}

.wo-inline-panel-form input:focus,
.wo-inline-panel-form select:focus,
.wo-inline-panel-form textarea:focus {
    outline: none;
    border-color: rgba(124, 190, 40, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

body.theme-dark .wo-inline-panel-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.theme-dark .wo-inline-panel-form select,
body.theme-dark .wo-inline-panel-form textarea {
    background: rgba(58, 64, 74, 0.94);
    border-color: var(--line-strong);
    color: #f4f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.wo-inline-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.wo-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.wo-inline-actions button {
    min-width: 140px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(103, 161, 23, 0.8);
    border-radius: 12px;
    background: linear-gradient(180deg, #9fe949 0%, #84d33a 100%);
    color: #16230f;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(124, 190, 40, 0.2);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.wo-inline-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(124, 190, 40, 0.24);
}

.wo-inline-actions button:disabled {
    opacity: 0.56;
    cursor: default;
    transform: none;
    box-shadow: none;
}

body.theme-dark .wo-inline-actions button {
    border-color: rgba(131, 204, 49, 0.78);
    color: #13200e;
}

.wo-task-panel-body {
    max-height: calc(100vh - 190px);
    padding: 18px 22px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.wo-task-panel-tabs {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin: 0 2px 16px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.78);
    overflow-x: auto;
    overflow-y: hidden;
}

.wo-task-panel-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 0 12px;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 750;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.18s ease;
}

.wo-task-panel-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: transparent;
    transition: background 0.18s ease, transform 0.18s ease;
    transform: scaleX(0.55);
}

.wo-task-panel-tab:hover,
.wo-task-panel-tab.is-active {
    color: var(--ink);
}

.wo-task-panel-tab.is-active::after {
    background: #3e7bff;
    transform: scaleX(1);
}

.wo-task-panel-section {
    display: none;
    padding: 16px;
    border: 1px solid rgba(201, 210, 223, 0.78);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66);
}

.wo-task-panel-section.is-active {
    display: block;
    animation: wo-task-panel-enter 0.2s ease both;
}

@keyframes wo-task-panel-enter {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wo-task-panel-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.wo-task-panel-section-head strong {
    font-size: 0.98rem;
}

.wo-task-panel-section-head span,
.wo-task-list-empty {
    color: var(--ink-muted);
    font-size: 0.82rem;
}

.wo-task-list-empty {
    margin: 10px 0 0;
    line-height: 1.45;
}

.wo-task-list-form.wo-inline-panel-form {
    padding: 14px 0 0;
}

.wo-task-list-form .wo-inline-actions {
    margin-top: 12px;
}

.wo-task-list-form .wo-inline-actions button {
    min-height: 40px;
}

.wo-task-list-library-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--ink-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.wo-task-list-library-link:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wo-inline-actions .button-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink-soft);
    box-shadow: none;
}

.wo-inline-actions .button-ghost:hover {
    border-color: var(--line-strong);
    background: var(--panel);
    color: var(--ink);
    box-shadow: none;
}

.wo-task-reusable-option {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 11px !important;
    padding: 12px 13px;
    border: 1px solid rgba(201, 210, 223, 0.78);
    border-radius: 12px;
    background: rgba(247, 249, 252, 0.78);
    cursor: pointer;
}

.wo-task-reusable-option input {
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    accent-color: #79c82f;
    flex: 0 0 auto;
}

.wo-task-reusable-option > span {
    display: grid;
    gap: 3px;
    color: var(--ink) !important;
    font-size: 0.9rem !important;
    font-weight: 700;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.wo-task-reusable-option small {
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
}

body.theme-dark .wo-task-panel-section {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--line-strong);
}

body.theme-dark .wo-task-panel-tabs {
    border-bottom-color: var(--line-strong);
}

body.theme-dark .wo-inline-actions .button-ghost,
body.theme-dark .wo-task-reusable-option {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
}

@media (prefers-reduced-motion: reduce) {
    .wo-task-panel-section.is-active {
        animation: none;
    }
}

@media (max-width: 680px) {
    .wo-task-panel-body {
        padding: 14px;
    }

    .wo-task-panel-section-head {
        display: grid;
        gap: 4px;
    }
}

.task-list-library-hero {
    margin-bottom: 18px;
}

.template-library-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background: var(--panel-soft);
}

.template-library-tab {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--panel);
    color: var(--ink-soft);
    text-decoration: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.template-library-tab:hover {
    border-color: rgba(121, 200, 47, 0.42);
    background: var(--panel);
    color: var(--ink);
}

.template-library-tab.is-active {
    border-color: rgba(121, 200, 47, 0.55);
    background: rgba(121, 200, 47, 0.11);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(121, 200, 47, 0.08);
}

.template-library-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(100, 112, 132, 0.1);
    color: var(--ink-muted);
}

.template-library-tab.is-active .template-library-tab-icon {
    background: #79c82f;
    color: #17210f;
}

.template-library-tab-icon svg {
    width: 20px;
    height: 20px;
}

.template-library-tab strong {
    font-size: 0.875rem;
}

.template-library-tab em {
    min-width: 26px;
    padding: 5px 7px;
    border-radius: 999px;
    background: rgba(100, 112, 132, 0.1);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}

.template-library-tab.is-active em {
    background: rgba(121, 200, 47, 0.18);
    color: #4e9212;
}

.task-list-library-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.8fr);
    align-items: start;
    gap: 18px;
}

.task-list-library-layout.is-view-only {
    grid-template-columns: minmax(0, 1fr);
}

.template-library-panel:not([hidden]) {
    animation: template-library-panel-enter 0.2s ease both;
}

@keyframes template-library-panel-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-list-card-heading,
.task-list-library-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-list-card-heading h2,
.task-list-library-card h3 {
    margin: 0;
}

.task-list-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(121, 200, 47, 0.28);
    border-radius: 12px;
    background: rgba(121, 200, 47, 0.12);
    color: #5cae16;
}

.task-list-card-icon svg {
    width: 22px;
    height: 22px;
}

.task-list-card-copy {
    margin: 14px 0 18px;
    color: var(--ink-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.task-list-library-form {
    display: grid;
    gap: 14px;
}

.task-list-library-form label {
    display: grid;
    gap: 7px;
}

.task-list-library-form label > span {
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.task-list-library-form label small {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.task-list-library-form input,
.task-list-library-form select,
.task-list-library-form textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.task-list-library-form input,
.task-list-library-form select {
    min-height: 44px;
    padding: 0 12px;
}

.task-list-library-form textarea {
    min-height: 132px;
    padding: 11px 12px;
}

.task-list-library-form input:focus,
.task-list-library-form select:focus,
.task-list-library-form textarea:focus {
    border-color: rgba(121, 200, 47, 0.72);
    box-shadow: 0 0 0 3px rgba(121, 200, 47, 0.13);
}

.task-list-library-form button[type="submit"] {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #64b817;
    border-radius: 11px;
    background: linear-gradient(180deg, #92e33e, #7bd02d);
    color: #14200d;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(91, 166, 24, 0.14);
}

.task-list-library-form button[type="submit"]:hover {
    background: linear-gradient(180deg, #9bea49, #83d735);
    transform: translateY(-1px);
}

.task-list-library-form textarea {
    resize: vertical;
    line-height: 1.45;
}

.task-list-library-form .form-actions,
.task-list-library-form-actions {
    display: flex;
    justify-content: flex-end;
}

.task-list-library-collection {
    min-width: 0;
}

.task-list-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.task-list-library-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px;
}

.task-list-library-card-head > div:last-child {
    min-width: 0;
}

.task-list-library-card h3 {
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.task-list-library-card-head p,
.task-list-library-description,
.task-list-library-more {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.task-list-library-card-head p {
    margin: 4px 0 0;
}

.task-list-library-description {
    margin: 14px 0 0;
    line-height: 1.45;
}

.task-list-library-preview {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding-left: 22px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.4;
}

.task-list-library-preview li::marker {
    color: #79c82f;
    font-weight: 800;
}

.task-list-library-more {
    margin: 9px 0 0 22px;
}

.task-list-library-editor {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.task-list-library-editor summary {
    padding: 0 2px;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
    list-style-position: inside;
}

.task-list-library-editor[open] summary {
    margin-bottom: 15px;
    color: var(--ink);
}

.template-library-create-modal {
    gap: 14px;
}

.template-library-modal-backdrop:not([hidden]) {
    animation: template-library-backdrop-enter 0.18s ease both;
}

.template-library-modal-backdrop:not([hidden]) .template-library-create-modal {
    animation: template-library-modal-enter 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.has-template-library-modal {
    overflow: hidden;
}

@keyframes template-library-backdrop-enter {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes template-library-modal-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.template-library-create-modal .modal-header {
    align-items: center;
    margin-bottom: 16px;
}

.template-library-create-modal .modal-header .button-ghost {
    flex: 0 0 auto;
}

.template-library-create-modal .modal-subtitle {
    max-width: 610px;
    margin: -2px 0 4px;
    color: var(--ink-muted);
    line-height: 1.5;
}

.template-library-modal-form {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.template-library-modal-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(160px, 0.8fr);
    gap: 12px;
}

.template-library-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.template-library-modal-actions .button-ghost {
    min-height: 42px;
}

.task-list-delete-form {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.task-list-delete-form .button-danger {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(190, 62, 62, 0.3);
    border-radius: 10px;
    background: rgba(190, 62, 62, 0.06);
    color: #ad3838;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.task-list-library-empty {
    display: grid;
    justify-items: center;
    min-height: 270px;
    place-content: center;
    text-align: center;
}

.task-list-library-empty h3 {
    margin: 14px 0 6px;
}

.task-list-library-empty p {
    max-width: 430px;
    margin: 0;
    color: var(--ink-muted);
    line-height: 1.5;
}

body.theme-dark .task-list-card-icon {
    border-color: rgba(121, 200, 47, 0.34);
    background: rgba(121, 200, 47, 0.1);
}

body.theme-dark .template-library-tab {
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .template-library-tab.is-active {
    background: rgba(121, 200, 47, 0.1);
}

body.theme-dark .task-list-library-form input,
body.theme-dark .task-list-library-form select,
body.theme-dark .task-list-library-form textarea {
    background: rgba(255, 255, 255, 0.045);
}

@media (max-width: 1100px) {
    .task-list-library-layout {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 760px) {
    .template-library-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-list-library-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .template-library-modal-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Purchasing workspaces and editor: one operational flow from order setup through receiving. */
.po-workspace-card {
    width: min(1320px, 100%);
}

.po-workspace-card .wo-workspace-toolbar {
    min-height: 76px;
}

.po-workspace-card .wo-toolbar-left {
    width: 100%;
}

.po-workspace-card .wo-toolbar-helper {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.po-workspace-card .wo-summary-strip {
    border-bottom: 1px solid var(--line);
}

.po-workspace-card .wo-workspace-tabs {
    border-top: 0;
}

.po-workspace-card .wo-workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.po-workspace-card .wo-workspace-tab-count {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 84%, var(--line));
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease;
}

.po-workspace-card .wo-workspace-tab.is-active .wo-workspace-tab-count {
    background: rgba(124, 190, 40, 0.16);
    color: #4e7f14;
}

.po-panel-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, #b6c5d6);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
}

.po-receive-form {
    gap: 0;
}

.po-receive-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.72fr);
    gap: 16px;
    align-items: start;
}

.po-receive-table-shell {
    min-width: 0;
    margin: 0;
}

.po-receive-table-shell .data-table {
    min-width: 690px;
}

.po-receive-table-shell th:last-child,
.po-receive-table-shell td:last-child {
    width: 150px;
}

.po-receive-quantity {
    width: 112px;
    min-width: 92px;
    text-align: right;
    font-weight: 750;
}

.po-quantity-pill {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(124, 190, 40, 0.13);
    color: #4e7f14;
    font-weight: 800;
}

.po-receive-support {
    display: grid;
    gap: 12px;
}

.po-support-card,
.po-upload-workbench {
    min-width: 0;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #b7c3d3);
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 98%, #fff) 0%, color-mix(in srgb, var(--panel-soft) 94%, #fff) 100%);
    box-shadow: 0 8px 22px rgba(47, 51, 73, 0.055);
}

.po-support-card-head,
.po-file-upload-intro {
    display: flex;
    align-items: center;
    gap: 12px;
}

.po-support-card-head > div,
.po-file-upload-intro > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.po-support-card-head strong,
.po-file-upload-intro strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.editor-form .po-support-card-head span:not(.po-support-card-icon),
.po-file-upload-intro p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 550;
    letter-spacing: normal;
    line-height: 1.35;
    text-transform: none;
}

.po-support-card-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 38px;
    border: 1px solid rgba(124, 190, 40, 0.28);
    border-radius: 12px;
    background: rgba(124, 190, 40, 0.12);
    color: #5f961c;
}

.po-support-card-icon .icon,
.po-support-card-icon svg {
    width: 20px;
    height: 20px;
}

.po-support-card label {
    display: grid;
    gap: 7px;
}

.po-support-card textarea {
    min-height: 112px;
    resize: vertical;
}

.po-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.po-panel-footer p {
    margin: 0 auto 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.po-upload-workbench {
    grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
    align-items: center;
    margin-bottom: 20px;
}

.po-upload-workbench .po-file-upload-fields {
    grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1.48fr);
    align-items: end;
}

.po-file-upload-row {
    flex-wrap: nowrap;
}

.po-file-upload-row input[type="file"],
.po-support-card input[type="file"],
.purchase-order-editor-form input[type="file"] {
    min-height: 46px;
    padding: 5px 6px;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.po-file-upload-row input[type="file"]::file-selector-button,
.po-support-card input[type="file"]::file-selector-button,
.purchase-order-editor-form input[type="file"]::file-selector-button {
    min-height: 34px;
    margin-right: 10px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.purchase-order-editor-modal {
    width: min(1520px, 100%);
}

.purchase-order-editor-core-fields {
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.72fr) minmax(260px, 0.9fr) minmax(220px, 0.72fr);
}

.purchase-order-editor-title-field {
    min-width: 0;
}

.purchase-order-editor-lines-section {
    /*
     * This section lives in the editor's constrained grid scroller. Hiding its
     * overflow gives the grid permission to shrink the line-item cards out of
     * view, leaving only the section heading reachable. Keep it content-sized
     * so the parent .wo-editor-scroll owns the scrolling.
     */
    min-height: min-content;
    overflow: visible;
}

.purchase-order-editor-lines-head {
    align-items: center;
}

.purchase-order-editor-lines-head > div {
    flex: 1 1 auto;
}

.purchase-order-editor-lines-head > .button-ghost {
    flex: 0 0 auto;
    align-self: center;
}

.purchase-order-editor-lines-summary {
    flex: 0 0 auto;
    display: grid;
    justify-items: end;
    gap: 9px;
}

.purchase-order-editor-lines-summary > span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 650;
}

.purchase-order-editor-lines-summary > span strong {
    margin-left: 5px;
    color: var(--ink);
    font-size: 0.94rem;
}

.purchase-order-editor-lines-summary .button-ghost {
    min-width: 116px;
}

.purchase-order-editor-form .purchase-order-line-list {
    gap: 18px;
    margin-top: 0;
}

.purchase-order-editor-form .purchase-order-line-card {
    min-width: 0;
    gap: 18px;
    padding: 18px;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--line) 82%, #a9bdd3);
    background:
        linear-gradient(135deg, rgba(124, 190, 40, 0.055), transparent 40%),
        linear-gradient(180deg, color-mix(in srgb, var(--panel) 98%, #fff) 0%, color-mix(in srgb, var(--panel-soft) 96%, #fff) 100%);
    box-shadow: 0 9px 24px rgba(47, 51, 73, 0.055);
}

.purchase-order-editor-form .purchase-order-line-card.is-collapsed {
    gap: 0;
    padding-block: 14px;
    border-color: color-mix(in srgb, var(--line-strong) 86%, #9fb5ca);
    border-left-width: 3px;
    border-left-color: color-mix(in srgb, var(--accent) 42%, var(--line-strong));
    background:
        linear-gradient(90deg, rgba(124, 190, 40, 0.07), transparent 22%),
        color-mix(in srgb, var(--panel) 98%, var(--bg-soft));
    box-shadow: 0 5px 15px rgba(47, 51, 73, 0.045);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.purchase-order-editor-form .purchase-order-line-card.is-collapsed:hover {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line-strong));
    box-shadow: 0 8px 20px rgba(47, 51, 73, 0.065);
    transform: translateY(-1px);
}

.purchase-order-editor-form .purchase-order-line-head {
    align-items: center;
}

.purchase-order-line-editor-body {
    display: grid;
    gap: 18px;
}

.purchase-order-line-editor-body[hidden] {
    display: none;
}

.purchase-order-line-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.purchase-order-line-identity-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.purchase-order-line-identity-copy strong,
.purchase-order-line-identity-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-order-line-identity-copy strong {
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 720;
}

.purchase-order-line-identity-copy span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    letter-spacing: normal;
    text-transform: none;
}

.purchase-order-line-head-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.purchase-order-editor-form .purchase-order-line-expand {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--line-strong) 86%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
    color: var(--ink-soft);
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.purchase-order-editor-form .purchase-order-line-expand:hover {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line-strong));
    background: color-mix(in srgb, rgba(124, 190, 40, 0.1) 72%, var(--panel));
    color: var(--ink);
}

.purchase-order-editor-form .purchase-order-line-expand svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: rotate 0.2s ease;
}

.purchase-order-editor-form .purchase-order-line-expand[aria-expanded="true"] svg {
    rotate: 180deg;
}

.purchase-order-line-total {
    min-width: 104px;
    display: grid;
    justify-items: end;
    gap: 1px;
}

.purchase-order-line-total span {
    color: var(--ink-muted);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.purchase-order-line-total strong {
    color: var(--ink);
    font-size: 1.04rem;
}

.purchase-order-editor-form .purchase-order-line-remove {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(185, 52, 52, 0.22);
    border-radius: 10px;
    background: color-mix(in srgb, #fff7f7 88%, var(--panel));
    color: #a22b2b;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 750;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.purchase-order-editor-form .purchase-order-line-remove svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.purchase-order-editor-form .purchase-order-line-remove span {
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.purchase-order-editor-form .purchase-order-line-remove:hover {
    border-color: rgba(185, 52, 52, 0.4);
    background: #ffeded;
    color: #861f1f;
    transform: translateY(-1px);
}

.purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove {
    width: 36px;
    min-width: 36px;
    padding: 0;
    opacity: 0.7;
}

.purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove span {
    display: none;
}

.purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove:hover,
.purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove:focus-visible {
    opacity: 1;
}

.purchase-order-line-primary-grid {
    display: grid;
    grid-template-columns:
        minmax(250px, 1.25fr)
        minmax(230px, 1.1fr)
        minmax(90px, 0.36fr)
        minmax(120px, 0.46fr);
    gap: 14px;
    align-items: end;
}

.purchase-order-editor-form .purchase-order-line-card input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.purchase-order-editor-form .purchase-order-line-card select,
.purchase-order-editor-form .purchase-order-line-card textarea {
    font-weight: 580;
}

.purchase-order-line-field > span small {
    margin-left: 4px;
    color: var(--ink-muted);
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: normal;
    text-transform: none;
}

.purchase-order-line-part-search {
    min-height: 38px !important;
    padding-block: 7px !important;
    border-radius: 12px 12px 0 0 !important;
    font-size: 0.8rem !important;
}

.purchase-order-line-part-field > select {
    margin-top: -1px;
    border-radius: 0 0 12px 12px;
    font-weight: 620;
}

.purchase-order-editor-form .purchase-order-line-description-field textarea {
    min-height: 91px;
    padding-block: 11px;
    font-weight: 580;
}

.purchase-order-line-money-input {
    position: relative;
}

.purchase-order-line-money-input > span {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    translate: 0 -50%;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 800;
    pointer-events: none;
}

.purchase-order-editor-form .purchase-order-line-money-input input {
    padding-left: 28px;
}

.purchase-order-line-details {
    margin: 0 -18px -18px;
    border-top: 1px solid color-mix(in srgb, var(--line) 84%, #a9bdd3);
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
}

.purchase-order-line-details > summary {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    list-style: none;
    cursor: pointer;
    transition: background 0.16s ease;
}

.purchase-order-line-details > summary::-webkit-details-marker {
    display: none;
}

.purchase-order-line-details > summary:hover {
    background: color-mix(in srgb, var(--panel-soft) 74%, rgba(124, 190, 40, 0.08));
}

.purchase-order-editor-form .purchase-order-line-details-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
    letter-spacing: normal;
    text-transform: none;
}

.purchase-order-line-details-copy strong {
    color: var(--ink);
    font-size: 0.84rem;
}

.purchase-order-line-details-copy small {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 550;
    letter-spacing: normal;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.purchase-order-line-details-state {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 56%, transparent);
    color: var(--ink-soft);
    font-size: 0.66rem;
    font-weight: 750;
}

.purchase-order-line-details > summary > svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--ink-soft);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: rotate 0.2s ease;
}

.purchase-order-line-details[open] > summary > svg {
    rotate: 180deg;
}

.purchase-order-line-details-body {
    display: grid;
    gap: 18px;
    padding: 2px 18px 18px;
}

.purchase-order-line-context-grid,
.purchase-order-line-support-grid {
    display: grid;
    gap: 14px;
}

.purchase-order-line-context-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.purchase-order-line-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.purchase-order-editor-form .purchase-order-line-notes-field textarea {
    min-height: 116px;
}

.purchase-order-editor-form .purchase-order-line-create-panel {
    margin: 0;
    padding: 14px;
    border: 1px solid color-mix(in srgb, #7cbe28 28%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, rgba(124, 190, 40, 0.08) 74%, var(--panel));
    box-shadow: none;
}

.purchase-order-line-empty {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 30px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: 15px;
    color: var(--ink-soft);
    text-align: center;
}

.purchase-order-line-empty[hidden] {
    display: none;
}

.purchase-order-line-empty strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.purchase-order-line-empty span {
    font-size: 0.78rem;
    letter-spacing: normal;
    text-transform: none;
}

.purchase-order-editor-form .purchase-order-line-grid-top {
    grid-template-columns:
        minmax(190px, 1.42fr)
        minmax(160px, 0.88fr)
        minmax(150px, 0.86fr)
        minmax(92px, 0.48fr)
        minmax(92px, 0.48fr)
        minmax(108px, 0.58fr)
        auto;
}

.purchase-order-editor-form .purchase-order-line-grid-bottom {
    grid-template-columns: minmax(200px, 1.15fr) minmax(200px, 1fr) minmax(210px, 0.78fr) minmax(230px, 0.9fr);
}

.purchase-order-editor-form .purchase-order-line-create-panel {
    margin: 0;
    padding: 14px;
    border: 1px solid color-mix(in srgb, #7cbe28 28%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, rgba(124, 190, 40, 0.08) 74%, var(--panel));
    box-shadow: none;
}

.purchase-order-editor-form .purchase-order-line-footer-actions {
    margin-top: 0;
}

body.theme-dark .po-workspace-card .wo-workspace-tab-count {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .po-workspace-card .wo-workspace-tab.is-active .wo-workspace-tab-count {
    background: rgba(124, 190, 40, 0.16);
    color: #c7e99f;
}

body.theme-dark .po-panel-status,
body.theme-dark .po-panel-footer,
body.theme-dark .po-support-card,
body.theme-dark .po-upload-workbench {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(51, 57, 67, 0.98) 0%, rgba(44, 49, 59, 0.98) 100%);
}

body.theme-dark .po-quantity-pill {
    background: rgba(124, 190, 40, 0.14);
    color: #c7e99f;
}

body.theme-dark .po-support-card-icon {
    color: #c7e99f;
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-card {
    border-color: var(--line-strong);
    background:
        linear-gradient(135deg, rgba(124, 190, 40, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(51, 57, 67, 0.99) 0%, rgba(44, 49, 59, 0.99) 100%);
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-card.is-collapsed {
    border-color: color-mix(in srgb, var(--line-strong) 86%, #6f8296);
    border-left-color: rgba(124, 190, 40, 0.44);
    background:
        linear-gradient(90deg, rgba(124, 190, 40, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(51, 57, 67, 0.99) 0%, rgba(44, 49, 59, 0.99) 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-card.is-collapsed:hover {
    border-color: rgba(124, 190, 40, 0.34);
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.2);
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-remove {
    border-color: rgba(255, 132, 132, 0.3);
    background: rgba(135, 35, 35, 0.13);
    color: #ffaaa3;
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-remove:hover {
    border-color: rgba(255, 132, 132, 0.46);
    background: rgba(156, 43, 43, 0.22);
    color: #ffc5c0;
}

body.theme-dark .purchase-order-line-details {
    border-top-color: var(--line-strong);
    background: rgba(22, 27, 34, 0.22);
}

body.theme-dark .purchase-order-line-details-state {
    background: rgba(255, 255, 255, 0.065);
}

body.theme-dark .purchase-order-editor-form .purchase-order-line-create-panel {
    border-color: rgba(124, 190, 40, 0.24);
    background: rgba(124, 190, 40, 0.07);
}

body.theme-dark .po-file-upload-row input[type="file"]::file-selector-button,
body.theme-dark .po-support-card input[type="file"]::file-selector-button,
body.theme-dark .purchase-order-editor-form input[type="file"]::file-selector-button {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
}

/*
 * The modal is centered in the work area beside the navigation rail, so its
 * usable width is smaller than the viewport. Reflow line fields before their
 * desktop minimums can force a horizontal scrollbar.
 */
@media (min-width: 1241px) and (max-width: 1500px) {
    .purchase-order-editor-form .purchase-order-line-grid-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .purchase-order-editor-form .purchase-order-line-field-action {
        grid-column: span 3;
    }

    .purchase-order-editor-form .purchase-order-line-grid-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-line-primary-grid,
    .purchase-order-line-context-grid,
    .purchase-order-line-support-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1240px) {
    .po-receive-workbench,
    .po-upload-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .po-receive-support {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-editor-core-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-editor-form .purchase-order-line-grid-top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .purchase-order-editor-form .purchase-order-line-field-action {
        grid-column: span 3;
    }

    .purchase-order-editor-form .purchase-order-line-grid-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-line-primary-grid,
    .purchase-order-line-context-grid,
    .purchase-order-line-support-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .po-receive-support,
    .po-upload-workbench .po-file-upload-fields,
    .purchase-order-editor-core-fields,
    .purchase-order-editor-form .purchase-order-line-grid-top,
    .purchase-order-editor-form .purchase-order-line-grid-bottom,
    .purchase-order-editor-form .purchase-order-line-create-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-order-editor-form .purchase-order-line-field-action {
        grid-column: auto;
    }

    .purchase-order-line-primary-grid,
    .purchase-order-line-context-grid,
    .purchase-order-line-support-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-order-editor-form .purchase-order-line-head {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-order-line-head-actions {
        justify-content: space-between;
    }

    .purchase-order-line-total {
        justify-items: start;
    }

    .purchase-order-line-details-state {
        display: none;
    }

    .purchase-order-line-details-copy small {
        white-space: normal;
    }

    .po-panel-footer,
    .purchase-order-editor-lines-head {
        align-items: stretch;
        flex-direction: column;
    }

    .po-panel-footer button,
    .purchase-order-editor-lines-head > .button-ghost,
    .purchase-order-editor-lines-summary .button-ghost {
        width: 100%;
    }

    .purchase-order-editor-lines-summary {
        width: 100%;
        justify-items: start;
    }

    .po-file-upload-row {
        align-items: stretch;
        flex-direction: column;
    }

    .po-file-upload-row input[type="file"] {
        flex-basis: auto;
        width: 100%;
    }
}

@media (max-width: 620px) {
    .po-workspace-card .wo-toolbar-left {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .po-workspace-card .wo-status-form,
    .po-workspace-card .wo-toolbar-helper {
        grid-column: 1 / -1;
    }

    .po-workspace-card .wo-quick-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .po-workspace-card .wo-workspace-tabs {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .po-workspace-card .wo-workspace-tab {
        flex: 0 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .template-library-panel:not([hidden]),
    .template-library-modal-backdrop:not([hidden]),
    .template-library-modal-backdrop:not([hidden]) .template-library-create-modal {
        animation: none;
    }
}

.wo-workspace-body {
    min-height: 0;
    height: 100%;
    overflow: auto;
    padding: 22px 26px 26px;
    background: linear-gradient(180deg, rgba(249, 250, 253, 0.7) 0%, rgba(245, 247, 252, 0.9) 100%);
    overscroll-behavior: contain;
}

body.theme-dark .wo-workspace-body {
    background: linear-gradient(180deg, rgba(42, 47, 56, 0.52) 0%, rgba(34, 39, 47, 0.2) 100%);
}

.po-workspace-card .wo-workspace-head {
    padding-top: 20px;
    padding-bottom: 16px;
}

.po-workspace-card .wo-workspace-toolbar {
    padding-top: 14px;
    padding-bottom: 14px;
}

.po-workspace-body {
    padding: 18px 22px 22px;
    overflow-x: hidden;
}

.po-workspace-card .wo-summary-strip > * {
    display: grid;
    gap: 4px;
    padding: 12px 18px 14px;
    border-right: 1px solid rgba(201, 210, 223, 0.72);
}

.po-workspace-card .wo-summary-strip > *:last-child {
    border-right: 0;
}

.po-workspace-card .wo-summary-strip span {
    font-size: 0.78rem;
    color: var(--ink-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 700;
}

.po-workspace-card .wo-summary-strip strong {
    font-size: 1rem;
    line-height: 1.15;
    font-weight: 500;
    color: color-mix(in srgb, var(--ink-soft) 76%, var(--ink) 24%);
}

.po-workspace-card .wo-tab-panel-head {
    margin-bottom: 14px;
}

.po-workspace-card .wo-workspace-head-copy h2 {
    font-weight: 500;
    color: color-mix(in srgb, var(--ink-soft) 58%, var(--ink) 42%);
}

.po-workspace-card .wo-tab-panel-head h3 {
    font-size: 1.24rem;
    font-weight: 500;
    color: color-mix(in srgb, var(--ink-soft) 62%, var(--ink) 38%);
}

.po-file-upload-form {
    display: grid;
    gap: 18px;
    margin-bottom: 20px;
}

.po-file-upload-fields {
    display: grid;
    gap: 14px;
}

.po-file-upload-field {
    display: grid;
    gap: 8px;
    max-width: 620px;
}

.po-file-upload-field > span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.po-file-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.po-file-upload-row input[type="file"] {
    flex: 1 1 420px;
    min-width: 0;
}

.po-file-upload-row button {
    flex: 0 0 auto;
}

.po-workspace-card .wo-file-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.po-workspace-card .wo-file-card {
    padding: 14px 16px;
}

.po-workspace-card .wo-table-shell {
    overflow-x: auto;
    overflow-y: hidden;
}

.wo-workspace-panel {
    display: none;
}

.wo-workspace-panel.is-active {
    display: block;
    min-height: 100%;
}

html.has-work-order-workspace,
body.has-work-order-workspace,
html.has-request-workspace,
body.has-request-workspace,
html.has-purchase-order-workspace,
body.has-purchase-order-workspace {
    overflow: hidden;
}

.wo-tab-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.wo-tab-panel-head h3 {
    margin: 0 0 6px;
    font-size: 1.34rem;
}

.wo-tab-panel-head p {
    margin: 0;
    color: var(--ink-soft);
}

.wo-empty-state {
    min-height: 260px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.98) 100%);
    padding: 26px;
}

body.theme-dark .wo-empty-state {
    background: linear-gradient(180deg, rgba(58, 64, 74, 0.64) 0%, rgba(51, 57, 67, 0.9) 100%);
    border-color: var(--line-strong);
}

.wo-empty-state strong {
    font-size: 1.08rem;
}

.wo-empty-state p {
    margin: 0;
    max-width: 420px;
    color: var(--ink-soft);
}

.wo-table-shell {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
}

body.theme-dark .wo-table-shell {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(48, 53, 62, 0.99) 0%, rgba(41, 46, 55, 0.99) 100%);
}

.wo-table-shell + .wo-table-shell {
    margin-top: 14px;
}

.wo-table {
    width: 100%;
    border-collapse: collapse;
}

.wo-table th,
.wo-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.68);
    text-align: left;
    vertical-align: top;
}

.wo-table th {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    background: rgba(247, 249, 252, 0.96);
}

body.theme-dark .wo-table th {
    background: rgba(58, 64, 74, 0.82);
}

.wo-table tbody tr:last-child td {
    border-bottom: 0;
}

.wo-table td strong,
.wo-file-card strong,
.wo-link-card strong,
.wo-knowledge-card strong {
    display: block;
    margin-bottom: 4px;
}

.wo-table td small,
.wo-file-card small {
    color: var(--ink-muted);
}

.wo-table-note-row td {
    color: var(--ink-soft);
    background: rgba(248, 250, 252, 0.8);
    font-size: 0.92rem;
}

body.theme-dark .wo-table-note-row td {
    background: rgba(58, 64, 74, 0.42);
}

.wo-inline-action-form {
    margin-top: 8px;
}

.wo-entry-admin-actions {
    width: 1%;
    min-width: 132px;
    text-align: right;
    white-space: nowrap;
}

.wo-entry-admin-actions .wo-inline-action-form {
    display: inline-block;
    margin: 0 0 0 6px;
}

.wo-entry-edit-row[hidden] {
    display: none !important;
}

.wo-entry-edit-row > td {
    padding: 0;
    background: color-mix(in srgb, var(--accent-soft) 26%, var(--panel));
}

.wo-entry-edit-form {
    display: grid;
    gap: 14px;
    padding: 18px;
    text-align: left;
}

.wo-entry-edit-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.wo-entry-edit-grid > label {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.wo-entry-edit-grid > label > span {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wo-entry-edit-grid .span-2 {
    grid-column: span 2;
}

.wo-entry-edit-grid .span-full {
    grid-column: 1 / -1;
}

.wo-entry-edit-grid input:not([type="hidden"]),
.wo-entry-edit-grid select,
.wo-entry-edit-grid textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    padding: 9px 11px;
}

.wo-entry-edit-grid textarea {
    min-height: 72px;
    resize: vertical;
}

.wo-entry-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

body.theme-dark .wo-entry-edit-row > td {
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--panel));
}

.wo-parts-row-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.wo-parts-row-actions .wo-inline-action-form {
    margin-top: 0;
}

.wo-task-list,
.wo-file-list,
.wo-link-grid,
.wo-knowledge-grid,
.wo-activity-list {
    display: grid;
    gap: 12px;
}

.wo-task-card,
.wo-file-card,
.wo-link-card,
.wo-knowledge-card,
.wo-activity-item,
.wo-inline-link-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.wo-task-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
}

.wo-task-toggle-form,
.wo-task-delete-form {
    margin: 0;
}

.wo-task-delete-form {
    align-self: center;
}

.wo-task-card.is-complete {
    background: linear-gradient(180deg, rgba(246, 251, 242, 0.98) 0%, rgba(242, 248, 240, 0.98) 100%);
}

body.theme-dark .wo-task-card.is-complete {
    background: linear-gradient(180deg, rgba(33, 60, 38, 0.32) 0%, rgba(30, 53, 34, 0.38) 100%);
}

.wo-task-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 2px;
}

.wo-task-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wo-task-toggle span {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid var(--line-strong);
    background: #fff;
    display: block;
}

.wo-task-card.is-complete .wo-task-toggle span {
    border-color: #72b622;
    background: radial-gradient(circle at center, #72b622 0 45%, transparent 46%);
}

.wo-task-copy {
    display: grid;
    gap: 8px;
}

.wo-task-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wo-task-copy p,
.wo-activity-item p,
.wo-file-card p,
.wo-link-card p,
.wo-knowledge-card p {
    margin: 0;
    color: var(--ink-soft);
}

.wo-file-list,
.wo-link-grid,
.wo-knowledge-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.wo-file-card,
.wo-link-card,
.wo-knowledge-card,
.wo-inline-link-card {
    color: inherit;
}

.wo-file-card strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wo-file-card:hover,
.wo-link-card:hover,
.wo-knowledge-card:hover,
.wo-inline-link-card:hover {
    text-decoration: none;
    border-color: var(--line-strong);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.wo-link-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.wo-inline-link-card {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
}

.wo-activity-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.wo-activity-scope {
    grid-column: 1 / -1;
    border-left: 4px solid var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 36%, var(--panel));
}

.wo-activity-scope p {
    max-width: 92ch;
    color: var(--ink);
    line-height: 1.6;
}

body.theme-dark .wo-activity-scope {
    background: color-mix(in srgb, var(--accent-soft) 18%, var(--panel));
}

.wo-activity-item strong {
    display: block;
    margin-bottom: 6px;
}

.wo-activity-item small {
    color: var(--ink-muted);
}

.wo-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.92fr);
    gap: 18px;
}

.po-overview-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.88fr);
    gap: 16px;
}

.po-overview-layout,
.po-overview-side,
.po-overview-primary {
    min-width: 0;
}

.po-workspace-card .po-overview-layout + .wo-table-shell {
    margin-top: 22px;
}

.wo-overview-primary,
.wo-overview-side {
    display: grid;
    gap: 16px;
    align-content: start;
}

.wo-overview-card,
.wo-side-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 251, 254, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.po-overview-card,
.po-side-card {
    padding: 16px 18px;
}

body.theme-dark .wo-overview-card,
body.theme-dark .wo-side-card {
    background: linear-gradient(180deg, rgba(50, 56, 66, 0.98) 0%, rgba(43, 48, 58, 0.98) 100%);
    border-color: var(--line-strong);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.26);
}

.wo-overview-header {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

.po-workspace-card .wo-overview-header {
    padding-bottom: 12px;
    margin-bottom: 12px;
}

body.theme-dark .wo-overview-header {
    border-bottom-color: var(--line-strong);
}

.wo-overview-header h3,
.wo-side-card-head h3 {
    margin: 0;
    font-size: 1.24rem;
}

.wo-overview-header p {
    margin: 10px 0 0;
    color: var(--ink-soft);
}

.wo-overview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.po-workspace-card .wo-overview-meta {
    gap: 10px 14px;
}

.po-workspace-card .wo-overview-header h3,
.po-workspace-card .wo-side-card-head h3 {
    font-weight: 500;
    color: color-mix(in srgb, var(--ink-soft) 62%, var(--ink) 38%);
}

.po-workspace-card .wo-overview-meta > div strong {
    font-weight: 500;
    line-height: 1.35;
    color: color-mix(in srgb, var(--ink-soft) 80%, var(--ink) 20%);
}

[data-live-search-root],
[data-parts-live-region] {
    transition: opacity 0.16s ease;
}

[data-live-search-root] > :is(section, form, [data-live-search-body])
~ :is(section, form, [data-live-search-body]) {
    margin-top: 18px;
}

[data-live-search-root][data-loading="1"],
[data-parts-live-region][data-loading="1"] {
    opacity: 0.62;
}

.wo-overview-meta > div {
    display: grid;
    gap: 4px;
}

.wo-overview-meta span {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.wo-side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.po-workspace-card .wo-side-card-head {
    margin-bottom: 10px;
}

.wo-side-card p {
    margin: 0 0 10px;
}

.po-workspace-card .wo-side-card p {
    margin-bottom: 8px;
    color: color-mix(in srgb, var(--ink-soft) 88%, var(--ink) 12%);
    font-weight: 500;
}

.po-workspace-card .wo-side-card p strong {
    color: color-mix(in srgb, var(--ink-soft) 78%, var(--ink) 22%);
    font-weight: 500;
}

.po-workspace-card .wo-status-picker-value {
    font-weight: 500;
    color: color-mix(in srgb, var(--ink-soft) 68%, var(--ink) 32%);
}

.po-workspace-card .badge {
    font-weight: 600;
}

.wo-side-card p:last-child {
    margin-bottom: 0;
}

.po-workspace-card .data-table tbody td {
    color: color-mix(in srgb, var(--ink-soft) 88%, var(--ink) 12%);
}

.po-workspace-card .data-table tbody td strong {
    color: color-mix(in srgb, var(--ink-soft) 72%, var(--ink) 28%);
    font-weight: 500;
}

.wo-side-file-list {
    display: grid;
    gap: 10px;
}

.wo-side-file-link {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: inherit;
}

.wo-side-file-link,
.wo-side-file-link strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wo-side-file-link:hover {
    text-decoration: none;
    border-color: var(--line-strong);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.purchase-order-line-list {
    display: grid;
    gap: 40px;
    margin-top: 16px;
}

.purchase-order-line-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 82%, rgba(36, 98, 180, 0.18));
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(166, 205, 116, 0.18) 0%, rgba(166, 205, 116, 0.08) 74%, rgba(255, 255, 255, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 28px rgba(15, 23, 42, 0.07);
}

body.theme-dark .purchase-order-line-card {
    background: linear-gradient(180deg, rgba(109, 142, 73, 0.66) 0%, rgba(90, 116, 63, 0.56) 74%, rgba(49, 55, 65, 0.98) 100%);
    border-color: color-mix(in srgb, var(--line-strong) 78%, rgba(78, 160, 255, 0.26));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.24);
}

.purchase-order-line-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.purchase-order-line-number {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(78, 160, 255, 0.24);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(78, 160, 255, 0.18) 0%, rgba(36, 98, 180, 0.12) 100%);
    color: #2457a0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.theme-dark .purchase-order-line-number {
    border-color: rgba(110, 177, 255, 0.26);
    background: linear-gradient(180deg, rgba(78, 160, 255, 0.18) 0%, rgba(36, 98, 180, 0.2) 100%);
    color: #cfe3ff;
}

.purchase-order-line-grid {
    display: grid;
    gap: 10px 14px;
}

.purchase-order-line-grid-top {
    grid-template-columns:
        minmax(190px, 1.4fr)
        minmax(160px, 1fr)
        minmax(156px, 0.92fr)
        minmax(104px, 0.62fr)
        minmax(104px, 0.62fr)
        minmax(116px, 0.72fr)
        auto;
    align-items: end;
}

.purchase-order-line-grid-bottom {
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(0, 1.05fr)
        minmax(190px, 0.72fr)
        minmax(240px, 0.92fr);
    align-items: start;
}

.purchase-order-line-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.purchase-order-line-field > span,
.purchase-order-line-mode-field > span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.purchase-order-line-field textarea {
    min-height: 84px;
    resize: vertical;
}

.purchase-order-line-field-action {
    align-self: end;
}

.purchase-order-line-field-action .button-ghost {
    min-height: 46px;
    width: 100%;
}

.purchase-order-line-field-wide {
    min-width: 0;
}

.purchase-order-line-field-create {
    display: grid;
    gap: 10px;
    align-content: start;
    width: 100%;
}

.purchase-order-line-image-field input[type="file"] {
    width: 100%;
}

.purchase-order-line-image-gallery {
    margin-top: 2px;
}

.purchase-order-line-create-panel {
    display: grid;
    gap: 10px;
    margin: 0 -16px -16px;
    padding: 12px 16px 16px;
    width: auto;
    justify-self: auto;
    align-self: end;
    border: 1px solid rgba(145, 153, 167, 0.34);
    border-radius: 0 0 20px 20px;
    background: #6b6b6b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body.theme-dark .purchase-order-line-create-panel {
    border-color: rgba(148, 163, 184, 0.26);
    background: #6b6b6b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.purchase-order-line-create-panel .purchase-order-line-create-label,
.purchase-order-line-create-panel .purchase-order-line-mode-field > span {
    color: rgba(245, 247, 250, 0.9);
}

.purchase-order-line-create-panel .purchase-order-line-helper {
    color: rgba(241, 245, 249, 0.88);
}

.purchase-order-line-create-panel .purchase-order-line-inventory-note {
    margin: 0;
    color: rgba(241, 245, 249, 0.88);
    line-height: 1.45;
}

.purchase-order-line-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    width: 100%;
    gap: 12px 18px;
    align-items: start;
}

.purchase-order-line-create-label,
.purchase-order-line-mode-field > span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.purchase-order-line-create-tools {
    display: grid;
    gap: 10px;
    min-width: 0;
    align-content: start;
}

.purchase-order-line-create-tools.is-disabled {
    opacity: 0.62;
}

.editor-form .purchase-order-line-toggle {
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
}

.editor-form .purchase-order-line-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    align-self: center;
    accent-color: #7cbe28;
}

.editor-form .purchase-order-line-toggle span {
    display: block;
    flex: 1 1 auto;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    text-transform: none;
    letter-spacing: 0;
}

.purchase-order-line-mode-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    width: 100%;
    align-content: start;
}

.purchase-order-line-mode-field.is-disabled {
    opacity: 0.62;
}

.purchase-order-line-helper {
    margin: 0;
}

.purchase-order-line-helper.is-disabled {
    opacity: 0.68;
}

.purchase-order-line-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.purchase-order-line-footer-actions .button-ghost {
    min-width: 148px;
}

.bulk-toolbar-note {
    color: var(--ink-soft);
}

.bulk-toolbar-note p {
    margin: 0;
}

.wo-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 18px;
}

.wo-overview-panel,
.wo-overview-side-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 251, 254, 0.98) 100%);
    padding: 20px;
}

body.theme-dark .wo-overview-panel,
body.theme-dark .wo-overview-side-card {
    background: linear-gradient(180deg, rgba(50, 56, 66, 0.98) 0%, rgba(43, 48, 58, 0.98) 100%);
    border-color: var(--line-strong);
}

.wo-overview-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 18px;
    align-items: start;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(201, 210, 223, 0.72);
}

body.theme-dark .wo-overview-head {
    border-bottom-color: var(--line-strong);
}

.wo-overview-head strong {
    font-size: 1.18rem;
}

.wo-overview-head p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.wo-overview-image,
.wo-overview-image-placeholder {
    width: 112px;
    height: 112px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    overflow: hidden;
}

.wo-overview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wo-overview-image-placeholder {
    display: grid;
    place-items: center;
    color: var(--ink-muted);
    font-size: 0.88rem;
}

.wo-overview-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 0;
}

.wo-overview-facts div {
    display: grid;
    gap: 5px;
}

.wo-overview-facts dt {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.wo-overview-facts dd {
    margin: 0;
    color: var(--ink);
}

.wo-overview-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--panel-soft);
}

.wo-overview-note span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.wo-overview-note p {
    margin: 0;
    color: var(--ink-soft);
}

.wo-overview-side {
    display: grid;
    gap: 14px;
    align-content: start;
}

.wo-overview-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.wo-overview-side-head span {
    min-width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(124, 190, 40, 0.1);
    color: #365813;
    font-size: 0.82rem;
    font-weight: 800;
}

body.theme-dark .wo-overview-side-head span {
    color: #d8efb8;
}

.wo-muted-copy {
    margin: 0;
    color: var(--ink-soft);
}

@media (max-width: 1180px) {
    .wo-workspace-card {
        width: min(1040px, 100%);
    }

    .po-overview-layout {
        grid-template-columns: 1fr;
    }

    .wo-workspace-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .wo-toolbar-left,
    .wo-timer-form {
        width: 100%;
    }

    .wo-timer-form {
        justify-content: space-between;
    }

    .wo-overview-grid {
        grid-template-columns: 1fr;
    }

    .purchase-order-line-grid-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-line-grid-bottom {
        grid-template-columns: 1fr;
    }

    .purchase-order-line-create-grid {
        grid-template-columns: 1fr;
    }

    .po-workspace-card .wo-file-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .wo-workspace-backdrop {
        padding: 14px;
    }

    .wo-inline-panel {
        left: 50%;
    }

    .wo-workspace-card {
        height: 94vh;
        max-height: 94vh;
        border-radius: 24px;
    }

    .wo-workspace-head,
    .wo-workspace-toolbar,
    .wo-workspace-tabs,
    .wo-summary-strip,
    .wo-alert-stack,
    .wo-workspace-body {
        padding-inline: 18px;
    }

    .wo-workspace-head {
        padding-top: 18px;
    }

    .wo-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .po-workspace-card .wo-summary-strip > *:nth-child(2n) {
        border-right: 0;
    }

    .wo-summary-metric:nth-child(2n) {
        border-right: 0;
    }

    .wo-inline-grid,
    .wo-overview-facts {
        grid-template-columns: 1fr;
    }

    .wo-inline-grid > .span-2,
    .wo-inline-grid > .span-3 {
        grid-column: auto;
    }

    .wo-overview-head {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .wo-workspace-backdrop {
        padding: 8px;
    }

    .wo-workspace-card {
        width: 100%;
        height: calc(100vh - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 20px;
    }

    .wo-workspace-head {
        gap: 12px;
        padding-bottom: 14px;
    }

    .wo-workspace-head-copy h2 {
        font-size: 1.55rem;
    }

    .wo-status-form,
    .wo-toolbar-left,
    .wo-quick-actions,
    .wo-timer-form,
    .wo-tab-panel-head,
    .wo-inline-actions {
        width: 100%;
    }

    .wo-status-form,
    .wo-toolbar-left,
    .wo-timer-form,
    .wo-tab-panel-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wo-status-picker,
    .wo-status-reason-input,
    .request-approve-select,
    .request-approve-button,
    .wo-inline-actions button,
    .wo-timer-form .button-ghost {
        width: 100%;
        max-width: 100%;
    }

    .wo-quick-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        display: grid;
    }

    .wo-summary-strip {
        grid-template-columns: 1fr;
    }

    .po-workspace-card .wo-summary-strip > * {
        border-right: 0;
        border-bottom: 1px solid rgba(201, 210, 223, 0.72);
    }

    .po-workspace-card .wo-summary-strip > *:last-child {
        border-bottom: 0;
    }

    .wo-summary-metric {
        border-right: 0;
        border-bottom: 1px solid rgba(201, 210, 223, 0.72);
    }

    .wo-summary-metric:last-child {
        border-bottom: 0;
    }

    .po-file-upload-row {
        align-items: stretch;
    }

    .po-file-upload-row input[type="file"],
    .po-file-upload-row button {
        width: 100%;
        flex: 1 1 100%;
    }

    .wo-file-list,
    .wo-link-grid,
    .wo-knowledge-grid,
    .wo-activity-list {
        grid-template-columns: 1fr;
    }

    .purchase-order-line-card {
        padding: 14px;
    }

    .purchase-order-line-grid-top {
        grid-template-columns: 1fr;
    }

    .purchase-order-line-footer-actions,
    .purchase-order-line-footer-actions .button-ghost {
        width: 100%;
    }
}

/* Final mobile safety overrides: keep these at the end so later feature styles win. */
@media (max-width: 860px) {
    body.page:not(.page-dashboard) .topbar {
        display: none;
    }

    .topbar-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        overflow: hidden;
        padding-bottom: 0;
        align-items: stretch;
    }

    .topbar-chip-row > * {
        min-width: 0;
        flex: 1 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .topbar-chip-row .toolbar-chip:last-child:nth-child(odd) {
        flex-basis: 100%;
        max-width: 100%;
    }

    .toolbar-chip {
        width: 100%;
        min-width: 0;
    }

    .shell-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        align-items: stretch;
    }

    .shell-controls > * {
        min-width: 0;
        flex: 1 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }

    .shell-controls > .account-flyout {
        flex-basis: 100%;
        max-width: 100%;
    }

    .app-main,
    .app-main > *,
    .card,
    .card > *,
    .module-stat,
    .workspace-grid,
    .detail-grid,
    .stack-list,
    .stack-item,
    .bulk-toolbar,
    .bulk-toolbar-actions,
    .section-heading,
    .project-header,
    .dashboard-command-main,
    .dashboard-panel-head,
    .dashboard-subpanel-head,
    .dashboard-stream-head,
    .page-actions,
    .page-actions > *,
    .page-actions .inline-form,
    .view-toggle-group,
    .view-toggle-group > *,
    .topbar-meta,
    .topbar-meta > * {
        min-width: 0;
    }

    .module-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .module-band > .module-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .section-heading,
    .project-header,
    .dashboard-command-main,
    .dashboard-panel-head,
    .dashboard-subpanel-head,
    .dashboard-stream-head {
        align-items: stretch;
    }

    .section-heading > :first-child,
    .section-heading > :last-child,
    .project-header > :first-child,
    .project-header > :last-child,
    .dashboard-command-main > :first-child,
    .dashboard-command-main > :last-child,
    .dashboard-panel-head > :first-child,
    .dashboard-panel-head > :last-child,
    .dashboard-subpanel-head > :first-child,
    .dashboard-subpanel-head > :last-child,
    .dashboard-stream-head > :first-child,
    .dashboard-stream-head > :last-child {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        align-items: stretch;
    }

    .page-actions > *,
    .page-actions .inline-form,
    .page-actions .button-link,
    .page-actions .button-ghost,
    .page-actions .button-primary {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .view-toggle-group {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .view-toggle-group > * {
        width: 100%;
        min-width: 0;
    }

    .module-stat p,
    .card p,
    .stack-item p,
    .section-heading h2,
    .page-actions .button-link,
    .page-actions .button-ghost,
    .page-actions .button-primary {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .table-wrap,
    .table-wrap-auto,
    .scheduler-timeline,
    .stock-movement-card {
        max-width: 100%;
    }

    .part-focus-panel-grid,
    .part-stock-workbench-summary,
    .part-focus-detail-list {
        grid-template-columns: 1fr 1fr;
    }

    .part-stock-row-tools {
        grid-template-columns: 1fr;
    }

    .part-stock-action-cell {
        min-width: 300px;
    }
}

@media (max-width: 640px) {
    .app-main {
        overflow-x: hidden;
    }

    .page-actions,
    .form-actions,
    .inline-action-row,
    .request-action-strip,
    .bulk-toolbar-actions,
    .view-toggle-group {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .page-actions > *,
    .form-actions > *,
    .inline-action-row > *,
    .request-action-strip > *,
    .bulk-toolbar-actions > *,
    .view-toggle-group > * {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .page-actions .button-link,
    .page-actions .button-ghost,
    .page-actions .button-primary,
    .bulk-toolbar-actions .button-ghost,
    .bulk-toolbar-actions .button-primary {
        width: 100%;
        min-width: 0;
        padding-inline: 12px;
    }

    .filter-form.filter-form-ops,
    .bulk-toolbar,
    .topbar-meta,
    .workspace-grid,
    .detail-grid,
    .stack-list,
    .work-order-board,
    .dashboard-command-grid,
    .dashboard-site-grid,
    .dashboard-signal-grid,
    .dashboard-cost-band,
    .dashboard-stream-grid,
    .dashboard-finance-grid,
    .dashboard-ops-layout,
    .dashboard-primary-column,
    .dashboard-secondary-column {
        grid-template-columns: 1fr;
    }

    .module-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .module-stat {
        min-width: 0;
        padding: 11px 12px;
    }

    .module-stat .label {
        color: var(--ink-soft);
        font-size: 0.64rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .module-stat strong {
        margin-top: 3px;
        font-size: 1.24rem;
        overflow-wrap: anywhere;
    }

    .module-stat p {
        display: -webkit-box;
        margin-top: 3px;
        overflow: hidden;
        font-size: 0.73rem;
        line-height: 1.3;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .part-focus-detail-list,
    .part-stock-workbench-summary {
        grid-template-columns: 1fr;
    }

    .part-stock-workbench-table th:last-child,
    .part-stock-workbench-table td:last-child,
    .part-stock-action-cell {
        width: auto;
        min-width: 240px;
    }
}

/* Keep the work-order command area intentionally structured as controls + actions. */
.wo-workspace-backdrop[data-work-order-workspace] .wo-workspace-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "status timer"
        "actions actions";
    align-items: center;
    column-gap: 24px;
    row-gap: 12px;
    padding-top: 16px;
    padding-bottom: 14px;
}

.wo-workspace-backdrop[data-work-order-workspace] .wo-toolbar-left {
    display: contents;
}

.wo-workspace-backdrop[data-work-order-workspace] .wo-status-form {
    grid-area: status;
    min-width: 0;
}

.wo-workspace-backdrop[data-work-order-workspace] .wo-timer-form {
    grid-area: timer;
    width: auto;
    margin-left: 0;
    justify-self: end;
}

.wo-workspace-backdrop[data-work-order-workspace] .wo-quick-actions {
    grid-area: actions;
    width: 100%;
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

body.theme-dark .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-actions {
    border-top-color: rgba(255, 255, 255, 0.075);
}

@media (max-width: 920px) {
    .wo-workspace-backdrop[data-work-order-workspace] .wo-workspace-toolbar {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "status"
            "timer"
            "actions";
        align-items: stretch;
        row-gap: 12px;
    }

    .wo-workspace-backdrop[data-work-order-workspace] .wo-timer-form {
        width: 100%;
        justify-self: stretch;
        justify-content: space-between;
    }
}

/* Work-order editor: prioritize essentials, then progressively disclose supporting detail. */
.wo-editor-modal {
    width: min(1420px, 100%);
    height: min(94vh, 1040px);
    height: min(94dvh, 1040px);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    padding-bottom: 0;
    overflow: hidden;
}

.wo-editor-modal-heading {
    min-width: 0;
    max-width: 980px;
}

.part-editor-modal-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.part-editor-modal-thumbnail {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    padding: 5px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: #fff;
}

.wo-editor-modal-heading h2 {
    font-size: clamp(1.45rem, 1.15rem + 0.9vw, 2rem);
    line-height: 1.12;
}

.wo-editor-form {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    margin: 0 calc(-1 * var(--modal-card-padding));
    overflow: hidden;
}

.wo-editor-scroll {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 2px var(--modal-card-padding) 28px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.wo-editor-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.wo-editor-section,
.wo-editor-advanced {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #afbdd0);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 253, 0.98) 100%);
    box-shadow: 0 10px 28px rgba(47, 51, 73, 0.055);
}

.wo-editor-section {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px;
}

.wo-editor-section-core {
    border-color: color-mix(in srgb, #a9bfd8 66%, var(--line));
    background:
        linear-gradient(135deg, rgba(74, 111, 151, 0.065), transparent 46%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(247, 250, 253, 0.99) 100%);
    box-shadow: 0 14px 34px rgba(35, 58, 83, 0.075);
}

.wo-editor-section-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}

.editor-form .wo-editor-section-index {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 36px;
    border: 1px solid rgba(75, 111, 151, 0.22);
    border-radius: 11px;
    background: rgba(57, 89, 125, 0.085);
    color: #385776;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    line-height: 1;
}

.wo-editor-section-core .wo-editor-section-index {
    border-color: rgba(124, 190, 40, 0.34);
    background: rgba(124, 190, 40, 0.14);
    color: #4e7f14;
}

.wo-editor-section-head > div {
    min-width: 0;
}

.wo-editor-section-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.editor-form .wo-editor-section-kicker > span:first-child {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.editor-form .wo-editor-section-chip {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 88%, #fff);
    color: var(--ink-muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.editor-form .wo-editor-section-chip.is-required {
    border-color: rgba(124, 190, 40, 0.34);
    background: rgba(124, 190, 40, 0.12);
    color: #4f7f17;
}

.wo-editor-section-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.25;
}

.wo-editor-section-head p {
    margin: 5px 0 0;
    max-width: 66ch;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.48;
}

.wo-editor-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.wo-editor-core-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wo-editor-field-full {
    grid-column: 1 / -1;
}

.wo-editor-field-compact {
    max-width: 440px;
}

.wo-editor-fields > label,
.wo-editor-scope-fields > label {
    min-width: 0;
}

.editor-form .wo-editor-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wo-editor-field-label small {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(124, 190, 40, 0.13);
    color: #4f7f17;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wo-editor-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.wo-editor-form select,
.wo-editor-form textarea {
    border-color: color-mix(in srgb, var(--line) 88%, #b9c6d7);
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        0 2px 7px rgba(47, 51, 73, 0.025);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wo-editor-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.wo-editor-form select:focus,
.wo-editor-form textarea:focus {
    outline: none;
    border-color: rgba(86, 126, 172, 0.72);
    background: var(--panel);
    box-shadow:
        0 0 0 3px rgba(72, 112, 158, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.wo-editor-scope-fields {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.35fr);
    gap: 16px;
}

.wo-editor-scope-fields textarea {
    height: 100%;
    min-height: 150px;
}

.wo-editor-task-plan {
    border-color: color-mix(in srgb, #9fbccf 60%, var(--line));
    background:
        linear-gradient(135deg, rgba(68, 112, 148, 0.045), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(247, 250, 253, 0.99) 100%);
}

.wo-editor-task-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wo-editor-task-mode-card {
    min-width: 0;
    min-height: 86px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 15px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #b7c5d4);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 94%, var(--bg-soft));
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(47, 51, 73, 0.035);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wo-editor-task-mode-card:hover {
    border-color: color-mix(in srgb, #6f91b1 55%, var(--line));
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(47, 70, 94, 0.075);
    transform: translateY(-1px);
}

.wo-editor-task-mode-card.is-active {
    border-color: rgba(112, 177, 38, 0.58);
    background:
        linear-gradient(135deg, rgba(124, 190, 40, 0.14), rgba(124, 190, 40, 0.045)),
        var(--panel);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.085), 0 8px 20px rgba(65, 103, 27, 0.07);
}

.wo-editor-task-mode-card.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.wo-editor-task-mode-card > input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: #72b822;
}

.wo-editor-task-mode-card > input:focus-visible {
    outline: none;
}

.wo-editor-task-mode-card:has(> input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(92, 137, 178, 0.16), 0 8px 20px rgba(47, 70, 94, 0.075);
}

.editor-form .wo-editor-task-mode-card > span {
    min-width: 0;
    display: grid;
    gap: 5px;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.wo-editor-task-mode-card strong {
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.25;
}

.wo-editor-task-mode-card small {
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 550;
    line-height: 1.4;
}

.wo-editor-task-mode-panels {
    min-width: 0;
}

.wo-editor-task-mode-panel {
    min-width: 0;
    padding: 17px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #b7c5d4);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.wo-editor-task-mode-panel[hidden] {
    display: none;
}

.wo-editor-task-empty-state {
    min-height: 62px;
    display: grid;
    place-content: center;
    gap: 4px;
    padding: 12px;
    text-align: center;
}

.wo-editor-task-empty-state strong {
    color: var(--ink);
    font-size: 0.88rem;
}

.wo-editor-task-empty-state span,
.editor-form .wo-editor-task-field-note {
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 550;
    line-height: 1.42;
}

.editor-form .wo-editor-task-field-note {
    display: block;
    margin-top: 7px;
    letter-spacing: normal;
    text-transform: none;
}

.wo-editor-fields > .wo-editor-task-reusable-option {
    min-height: 68px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid rgba(124, 190, 40, 0.3);
    border-radius: 13px;
    background: rgba(124, 190, 40, 0.075);
    cursor: pointer;
}

.wo-editor-task-reusable-option > input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: #72b822;
}

.editor-form .wo-editor-task-reusable-option > span {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.wo-editor-task-reusable-option strong {
    color: var(--ink);
    font-size: 0.86rem;
    line-height: 1.3;
}

.wo-editor-task-reusable-option small {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 550;
    line-height: 1.4;
}

.wo-editor-task-permission-note {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.45;
}

.wo-editor-advanced {
    overflow: hidden;
}

.wo-editor-advanced > summary {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.wo-editor-advanced > summary::-webkit-details-marker {
    display: none;
}

.wo-editor-advanced > summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-left: auto;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.wo-editor-advanced[open] > summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.editor-form .wo-editor-advanced-summary-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: 1rem;
    letter-spacing: normal;
    line-height: 1.25;
    text-transform: none;
}

.wo-editor-advanced-summary-copy strong {
    font-size: 1rem;
}

.wo-editor-advanced-summary-copy small {
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 550;
    line-height: 1.4;
}

.wo-editor-advanced-body {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 64%, transparent);
}

.wo-editor-media-block {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px dashed color-mix(in srgb, var(--line-strong) 86%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 88%, var(--bg-soft));
}

.wo-editor-media-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}

.wo-editor-media-head strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.editor-form .wo-editor-media-head > span {
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.po-attachment-upload-rows {
    display: grid;
    gap: 16px;
}

.purchase-order-editor-existing-files {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 92%, var(--bg-soft));
}

.purchase-order-editor-existing-files-head > div {
    display: grid;
    gap: 4px;
}

.purchase-order-editor-existing-files-head strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.purchase-order-editor-existing-files-head span {
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.po-attachment-upload-card {
    position: relative;
}

.po-attachment-upload-card-head {
    align-items: flex-start;
}

.po-attachment-upload-card-head > div {
    display: grid;
    gap: 4px;
}

.editor-form .po-attachment-upload-card-head > div > span {
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.po-attachment-upload-remove {
    min-height: 34px;
    padding: 6px 11px;
}

.po-upload-workbench .po-file-upload-fields.po-attachment-upload-card {
    grid-template-columns: minmax(180px, 0.52fr) minmax(0, 1.48fr) auto;
    max-width: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 90%, var(--bg-soft));
}

.po-file-upload-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 820px) {
    .po-upload-workbench .po-file-upload-fields.po-attachment-upload-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .po-attachment-upload-remove {
        justify-self: end;
    }
}

.wo-editor-media-grid {
    gap: 12px 16px;
}

.wo-editor-media-grid .field-note {
    margin-top: 0;
}

.wo-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px var(--modal-card-padding);
    border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    box-shadow: 0 -12px 28px rgba(47, 51, 73, 0.065);
}

.wo-editor-footer-copy {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
}

.wo-editor-footer-copy > strong {
    color: var(--ink);
    font-size: 0.88rem;
}

.editor-form .wo-editor-footer-copy > span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 550;
    letter-spacing: normal;
    line-height: 1.35;
    text-transform: none;
}

.wo-editor-footer .work-order-delete-button {
    width: fit-content;
    min-height: 36px;
    margin-left: 0;
    padding-inline: 11px;
    font-size: 0.78rem;
    color: #a52a2a;
    border-color: rgba(185, 52, 52, 0.28);
    background: #fff7f7;
    box-shadow: none;
}

.wo-editor-footer .work-order-delete-button:hover {
    color: #861f1f;
    border-color: rgba(185, 52, 52, 0.42);
    background: #ffeded;
}

.wo-editor-footer-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.wo-editor-footer-actions > * {
    min-width: 132px;
}

.wo-editor-form[data-stepped-editor] button[data-stepped-editor-next] {
    color: #49310a;
    border-color: #c48a19;
    background: linear-gradient(180deg, #ffdc7a 0%, #e8ad35 100%);
    box-shadow: 0 5px 14px rgba(190, 126, 16, 0.2);
}

.wo-editor-form[data-stepped-editor] button[data-stepped-editor-next]:hover {
    color: #3d2806;
    border-color: #ad7410;
    background: linear-gradient(180deg, #ffd364 0%, #dc9d25 100%);
    box-shadow: 0 7px 18px rgba(174, 111, 9, 0.26);
}

.wo-editor-form[data-stepped-editor] button[data-stepped-editor-next]:focus-visible {
    outline: 3px solid rgba(224, 161, 38, 0.32);
    outline-offset: 2px;
}

body.theme-dark .wo-editor-form[data-stepped-editor] button[data-stepped-editor-next] {
    color: #352304;
    border-color: #d0992a;
    background: linear-gradient(180deg, #f6cf6a 0%, #d99b28 100%);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
}

body.theme-dark .wo-editor-form[data-stepped-editor] button[data-stepped-editor-next]:hover {
    background: linear-gradient(180deg, #ffda78 0%, #e4a932 100%);
}

body.theme-dark .wo-editor-section,
body.theme-dark .wo-editor-advanced {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(51, 57, 67, 0.99) 0%, rgba(44, 49, 59, 0.99) 100%);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

body.theme-dark .wo-editor-section-core {
    border-color: rgba(112, 147, 184, 0.42);
    background:
        linear-gradient(135deg, rgba(80, 119, 159, 0.11), transparent 48%),
        linear-gradient(180deg, rgba(51, 58, 69, 0.99) 0%, rgba(43, 49, 59, 0.99) 100%);
}

body.theme-dark .wo-editor-task-plan {
    border-color: rgba(112, 147, 184, 0.35);
    background:
        linear-gradient(135deg, rgba(80, 119, 159, 0.09), transparent 48%),
        linear-gradient(180deg, rgba(51, 58, 69, 0.99) 0%, rgba(43, 49, 59, 0.99) 100%);
}

body.theme-dark .wo-editor-task-mode-card,
body.theme-dark .wo-editor-task-mode-panel {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .wo-editor-task-mode-card:hover {
    border-color: rgba(166, 190, 216, 0.36);
    background: rgba(255, 255, 255, 0.055);
}

body.theme-dark .wo-editor-task-mode-card.is-active {
    border-color: rgba(151, 224, 68, 0.42);
    background: rgba(124, 190, 40, 0.11);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.06);
}

body.theme-dark .wo-editor-fields > .wo-editor-task-reusable-option {
    border-color: rgba(151, 224, 68, 0.24);
    background: rgba(124, 190, 40, 0.08);
}

body.theme-dark .wo-editor-task-permission-note {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .editor-form .wo-editor-section-index {
    border-color: rgba(160, 184, 211, 0.2);
    background: rgba(122, 153, 188, 0.1);
    color: #c5d4e6;
}

body.theme-dark .wo-editor-section-core .wo-editor-section-index {
    border-color: rgba(151, 224, 68, 0.28);
    background: rgba(124, 190, 40, 0.12);
    color: #c7e99f;
}

body.theme-dark .editor-form .wo-editor-section-chip,
body.theme-dark .wo-editor-media-block {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.045);
}

body.theme-dark .editor-form .wo-editor-section-chip.is-required,
body.theme-dark .wo-editor-field-label small {
    border-color: rgba(151, 224, 68, 0.24);
    background: rgba(124, 190, 40, 0.12);
    color: #c7e99f;
}

body.theme-dark .wo-editor-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.theme-dark .wo-editor-form select,
body.theme-dark .wo-editor-form textarea {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(57, 63, 74, 0.98) 0%, rgba(49, 55, 65, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

body.theme-dark .wo-editor-advanced-body,
body.theme-dark .wo-editor-footer {
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--panel) 92%, rgba(255, 255, 255, 0.02));
}

body.theme-dark .wo-editor-footer .work-order-delete-button {
    color: #ffaaa3;
    border-color: rgba(255, 132, 132, 0.34);
    background: rgba(135, 35, 35, 0.13);
}

body.theme-dark .wo-editor-footer .work-order-delete-button:hover {
    color: #ffc5c0;
    border-color: rgba(255, 132, 132, 0.48);
    background: rgba(156, 43, 43, 0.22);
}

body.theme-dark .wo-editor-footer {
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.18);
}

@media (max-width: 1180px) {
    .wo-editor-section-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wo-editor-core-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .wo-editor-backdrop {
        padding: 20px;
    }

    .wo-editor-modal {
        width: 100%;
        height: calc(100vh - 40px);
        height: calc(100dvh - 40px);
        max-height: none;
    }

    .wo-editor-task-mode-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .wo-editor-modal {
        gap: 14px;
    }

    .wo-editor-modal > .modal-header {
        position: relative;
        display: block;
        padding-right: 104px;
    }

    .wo-editor-modal > .modal-header > .button-ghost {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
    }

    .wo-editor-fields,
    .wo-editor-core-fields,
    .wo-editor-scope-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .wo-editor-section {
        padding: 16px;
    }

    .wo-editor-advanced > summary,
    .wo-editor-advanced-body {
        padding: 16px;
    }

    .wo-editor-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .wo-editor-footer-copy {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .wo-editor-footer-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .wo-editor-footer-actions > * {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .wo-editor-backdrop {
        padding: 8px;
    }

    .wo-editor-modal {
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
        border-radius: 16px;
    }

    .wo-editor-scroll {
        padding-bottom: 20px;
    }
}

/* Request queue and workspace: keep operational work first and secondary portal tools quiet. */
.request-access-card {
    padding: 0;
    overflow: hidden;
}

.request-access-details > summary {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 72px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
    transition: background 0.18s ease;
}

.request-access-details > summary::-webkit-details-marker {
    display: none;
}

.request-access-details > summary:hover,
.request-access-details > summary:focus-visible {
    background: color-mix(in srgb, var(--panel-soft) 76%, transparent);
}

.request-access-details > summary:focus-visible {
    outline: 3px solid rgba(124, 190, 40, 0.18);
    outline-offset: -3px;
}

.request-access-details > summary::after {
    content: "";
    width: 9px;
    height: 9px;
    margin-left: 2px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.request-access-details[open] > summary::after {
    transform: rotate(225deg) translate(-2px, -2px);
}

.request-access-summary-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.request-access-summary-copy strong {
    color: var(--ink);
    font-size: 1rem;
}

.request-access-summary-note {
    margin-left: auto;
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 650;
}

.request-access-body {
    display: grid;
    gap: 16px;
    padding: 20px 22px 22px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 56%, transparent);
}

.request-access-body .section-heading {
    margin-bottom: 0;
}

.request-access-body .section-heading p {
    margin: 6px 0 0;
    color: var(--ink-soft);
}

.public-link-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.public-link-copy-row input {
    min-width: 0;
}

.wo-workspace-backdrop[data-request-workspace] .wo-workspace-card {
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.wo-workspace-backdrop[data-request-workspace] .wo-workspace-toolbar {
    padding-top: 18px;
    padding-bottom: 18px;
    border-bottom: 0;
}

.request-workspace-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    padding-top: 6px;
    padding-bottom: 6px;
    border-top: 1px solid rgba(201, 210, 223, 0.72);
    background: color-mix(in srgb, var(--panel-soft) 56%, transparent);
}

.request-workspace-summary .wo-summary-metric {
    padding-top: 12px;
    padding-bottom: 12px;
}

.request-workspace-edit-action {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
}

.request-overview-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.request-overview-card {
    grid-column: span 4;
    min-width: 0;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 90%, transparent);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow: 0 8px 22px rgba(47, 51, 73, 0.045);
}

.request-overview-description {
    grid-column: span 6;
}

.request-overview-contact,
.request-overview-status {
    grid-column: span 3;
}

.request-overview-card-head {
    display: grid;
    gap: 4px;
    margin: 0 0 14px;
}

.request-overview-card-head > span {
    color: var(--accent-strong);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.075em;
    line-height: 1.2;
    text-transform: uppercase;
}

.request-overview-card-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1.04rem;
    line-height: 1.25;
}

.request-overview-card > p,
.request-description-copy p,
.request-overview-status-note p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.55;
}

.request-description-layout {
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.request-overview-description.has-image .request-description-layout {
    grid-template-columns: minmax(0, 1fr) 176px;
}

.request-description-copy {
    min-width: 0;
    align-self: start;
}

.request-image-compact {
    position: relative;
    min-width: 0;
    min-height: 112px;
    display: block;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
    border-radius: 14px;
    background:
        linear-gradient(45deg, rgba(31, 52, 44, 0.035) 25%, transparent 25%, transparent 75%, rgba(31, 52, 44, 0.035) 75%),
        linear-gradient(45deg, rgba(31, 52, 44, 0.035) 25%, #fff 25%, #fff 75%, rgba(31, 52, 44, 0.035) 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
}

.request-image-compact:hover,
.request-image-compact:focus-visible {
    text-decoration: none;
    border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
    box-shadow: 0 10px 24px rgba(28, 59, 47, 0.14);
}

.request-image-compact:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
    outline-offset: 2px;
}

.request-image-compact img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    display: block;
    object-fit: contain;
    transition: transform 180ms ease;
}

.request-image-compact:hover img {
    transform: scale(1.025);
}

.request-image-compact > span {
    position: absolute;
    inset: auto 8px 8px;
    display: grid;
    gap: 1px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 10px;
    background: rgba(20, 36, 30, 0.84);
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 20, 0.18);
    backdrop-filter: blur(8px);
}

.request-image-compact > span strong {
    font-size: 0.76rem;
    line-height: 1.2;
}

.request-image-compact > span small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.65rem;
    font-weight: 700;
}

.request-image-compact .icon,
.request-image-compact .icon svg,
.request-overview-action .icon,
.request-overview-action .icon svg {
    width: 13px;
    height: 13px;
}

.request-fact-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.request-fact-list > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.request-fact-list dt {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 820;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.request-fact-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.4;
}

.request-overview-status-value {
    margin-bottom: 10px;
}

.request-overview-status-note:empty {
    display: none;
}

.request-overview-status-note .field-note {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.request-overview-action {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 14px;
    color: var(--accent-strong);
    font-size: 0.84rem;
    font-weight: 820;
}

.request-editor-core-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-editor-description textarea {
    min-height: 138px;
}

body.theme-dark .request-access-details > summary:hover,
body.theme-dark .request-access-details > summary:focus-visible,
body.theme-dark .request-access-body,
body.theme-dark .request-workspace-summary {
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .request-overview-card {
    border-color: var(--line-strong);
    background: linear-gradient(155deg, rgba(51, 57, 67, 0.99) 0%, rgba(43, 48, 57, 0.99) 100%);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

body.theme-dark .request-image-compact {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line-strong));
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, rgba(38, 43, 51, 1) 25%, rgba(38, 43, 51, 1) 75%, rgba(255, 255, 255, 0.025) 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
}

body.theme-dark .request-access-body,
body.theme-dark .request-workspace-summary {
    border-color: var(--line-strong);
}

@media (max-width: 1100px) {
    .request-overview-description {
        grid-column: span 12;
    }

    .request-overview-card:not(.request-overview-description) {
        grid-column: span 6;
    }
}

@media (max-width: 980px) {
    .wo-workspace-backdrop[data-request-workspace] .wo-workspace-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .wo-workspace-backdrop[data-request-workspace] .wo-workspace-toolbar > .page-actions,
    .wo-workspace-backdrop[data-request-workspace] .request-approve-form {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .request-access-details > summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .request-access-summary-note {
        width: calc(100% - 28px);
        margin-left: 0;
    }

    .request-access-details > summary::after {
        margin-left: auto;
    }

    .request-access-body .section-heading {
        align-items: stretch;
    }

    .public-link-copy-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .request-approve-select {
        flex: 1 1 180px;
    }

    .request-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .request-workspace-summary .wo-summary-metric:nth-child(2n) {
        border-right: 0;
    }

    .request-overview-card,
    .request-overview-card:not(.request-overview-description) {
        grid-column: span 12;
    }

    .request-overview-description.has-image .request-description-layout {
        grid-template-columns: minmax(0, 1fr) 150px;
    }

    .request-overview-card {
        min-height: 0;
    }

    .request-editor-core-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .request-overview-description.has-image .request-description-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .request-image-compact,
    .request-image-compact img {
        min-height: 176px;
        height: 176px;
    }
}

/* Scheduler daily-planner refinements */
.scheduler-header-actions {
    align-items: center;
    justify-content: flex-end;
}

.scheduler-auto-schedule-form {
    margin: 0;
}

.scheduler-auto-schedule-option {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

.scheduler-auto-schedule-option:hover,
.scheduler-auto-schedule-option:focus-within {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    color: var(--ink);
    box-shadow: 0 7px 18px rgba(28, 46, 72, 0.08);
}

.scheduler-auto-schedule-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
    background: color-mix(in srgb, var(--accent) 9%, var(--panel));
    color: var(--ink);
}

.scheduler-auto-schedule-option input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.scheduler-auto-schedule-option input:disabled {
    cursor: wait;
}

.scheduler-date-navigation {
    display: inline-grid;
    grid-template-columns: repeat(3, auto);
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
}

.scheduler-date-navigation .button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding-inline: 12px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    line-height: 1;
    white-space: nowrap;
}

.scheduler-date-navigation .button-ghost:hover,
.scheduler-date-navigation .button-ghost:focus-visible {
    border-color: var(--line);
    background: var(--panel);
}

.scheduler-panel-intro {
    margin: -4px 0 14px;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}

.scheduler-backlog-search {
    display: grid;
    gap: 7px;
    margin-bottom: 7px;
}

.scheduler-backlog-search > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scheduler-backlog-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--panel-soft);
    color: var(--ink);
    font: inherit;
    font-size: 0.88rem;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.scheduler-backlog-search input::placeholder {
    color: var(--ink-muted);
}

.scheduler-backlog-search input:hover {
    border-color: var(--line-strong);
}

.scheduler-backlog-search input:focus {
    border-color: color-mix(in srgb, var(--accent) 62%, var(--line-strong));
    background: var(--panel);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.scheduler-backlog-result-count {
    min-height: 24px;
    margin-bottom: 7px;
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-align: right;
}

.scheduler-backlog-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scheduler-backlog-card {
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.scheduler-backlog-card:hover,
.scheduler-backlog-card:focus-within {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line-strong));
    box-shadow: 0 10px 24px rgba(47, 51, 73, 0.08);
    transform: translateY(-1px);
}

.scheduler-backlog-panel {
    position: sticky;
    top: 18px;
    align-self: start;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
}

.scheduler-backlog-panel .scheduler-card-grid {
    min-height: 0;
    max-height: calc(100vh - 314px);
    max-height: calc(100dvh - 314px);
    padding: 2px 5px 4px 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.scheduler-day-heading {
    align-items: flex-end;
}

.scheduler-day-controls {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.scheduler-day-controls > p {
    max-width: 56ch;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: right;
}

.scheduler-scale-control {
    display: flex;
    align-items: center;
    gap: 9px;
}

.scheduler-scale-control > span {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.scheduler-scale-control > div {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
}

.scheduler-scale-control .button-ghost {
    min-height: 29px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.scheduler-scale-control .button-ghost:hover,
.scheduler-scale-control .button-ghost:focus-visible {
    border-color: var(--line);
    background: var(--panel);
}

.scheduler-scale-control .button-ghost.is-active,
.scheduler-scale-control .button-ghost[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    background: var(--accent-soft);
    color: color-mix(in srgb, var(--accent-strong) 76%, var(--ink));
}

.scheduler-notice-stack {
    margin-bottom: 12px;
}

.scheduler-timeline {
    --scheduler-user-column-width: 220px;
    --scheduler-track-min-width: 1320px;
    position: relative;
    padding: 2px 0 8px;
    overscroll-behavior-x: contain;
    scroll-padding-left: calc(var(--scheduler-user-column-width) + 12px);
    scrollbar-gutter: stable;
}

.scheduler-timeline[data-scale="overview"] {
    --scheduler-user-column-width: 206px;
    --scheduler-track-min-width: 840px;
}

.scheduler-timeline[data-scale="comfortable"] {
    --scheduler-track-min-width: 1320px;
}

.scheduler-timeline[data-scale="detailed"] {
    --scheduler-track-min-width: 2160px;
}

.scheduler-timeline .timeline-head,
.scheduler-timeline .timeline-row {
    min-width: calc(var(--scheduler-user-column-width) + 12px + var(--scheduler-track-min-width));
    grid-template-columns: var(--scheduler-user-column-width) minmax(var(--scheduler-track-min-width), 1fr);
}

.scheduler-timeline .timeline-user-cell {
    position: sticky;
    left: 0;
    z-index: 6;
    box-shadow:
        10px 0 16px -16px rgba(32, 42, 57, 0.72),
        0 3px 10px rgba(47, 51, 73, 0.035);
}

.scheduler-timeline .timeline-track {
    overflow: visible;
}

.scheduler-timeline .timeline-head .timeline-user-cell {
    z-index: 8;
    min-height: 42px;
    align-content: center;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline-break-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    min-width: 2px;
    border-inline: 1px solid rgba(184, 128, 32, 0.18);
    background:
        repeating-linear-gradient(
            135deg,
            rgba(238, 181, 71, 0.08) 0 6px,
            rgba(238, 181, 71, 0.18) 6px 12px
        );
    color: #835914;
    pointer-events: none;
    overflow: hidden;
}

.timeline-break-overlay > span {
    max-width: calc(100% - 6px);
    margin-top: 6px;
    overflow: hidden;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-overflow: clip;
    text-transform: uppercase;
    white-space: nowrap;
}

.timeline-job {
    z-index: 3;
    min-width: 0;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        filter 150ms ease;
}

.timeline-job:hover,
.timeline-job:focus,
.timeline-job:focus-within {
    z-index: 20;
}

.timeline-job:focus {
    outline: none;
}

.timeline-job:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 72%, #ffffff);
    outline-offset: 2px;
}

.timeline-job-code,
.timeline-job-time {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-job-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.timeline-job-short-label,
.timeline-job-popover {
    display: none;
}

.timeline-job.is-compact {
    top: 17px;
    bottom: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 8px;
    overflow: visible;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.48),
        0 6px 14px rgba(15, 23, 42, 0.14);
}

.timeline-job.is-compact > :not(.timeline-job-short-label, .timeline-job-popover) {
    display: none;
}

.timeline-job.is-compact .timeline-job-short-label {
    display: block;
    width: 100%;
    padding: 0 2px;
    overflow: hidden;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
}

.timeline-job.is-micro .timeline-job-short-label {
    display: none;
}

.timeline-job.is-micro::after {
    width: min(3px, 45%);
    height: 24px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    opacity: 0.62;
}

.timeline-job.is-compact .timeline-job-popover {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    z-index: 30;
    width: 262px;
    max-width: 262px;
    max-height: 100px;
    padding: 9px 11px;
    transform: translateY(-50%);
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 34px rgba(25, 35, 51, 0.2);
    color: var(--ink);
    gap: 2px;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
}

.timeline-job.is-compact.is-popover-left .timeline-job-popover {
    right: calc(100% + 8px);
    left: auto;
}

.scheduler-timeline[data-scale="overview"] .timeline-job.is-compact .timeline-job-popover {
    width: 226px;
    max-width: 226px;
}

.timeline-job.is-compact:hover .timeline-job-popover,
.timeline-job.is-compact:focus .timeline-job-popover,
.timeline-job.is-compact:focus-within .timeline-job-popover {
    display: grid;
}

.timeline-job-popover > strong,
.timeline-job-popover > span,
.timeline-job-popover > small {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-job-popover > strong {
    font-size: 0.78rem;
}

.timeline-job-popover > span {
    font-size: 0.75rem;
}

.timeline-job-popover > small,
.timeline-job-popover-time {
    color: var(--ink-soft) !important;
    font-size: 0.68rem;
}

.timeline-job-popover > a {
    width: fit-content;
    color: #2e5f96;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.theme-dark .scheduler-date-navigation,
body.theme-dark .scheduler-auto-schedule-option,
body.theme-dark .scheduler-scale-control > div {
    border-color: var(--line-strong);
    background: rgba(25, 30, 38, 0.5);
}

body.theme-dark .scheduler-date-navigation .button-ghost:hover,
body.theme-dark .scheduler-date-navigation .button-ghost:focus-visible,
body.theme-dark .scheduler-scale-control .button-ghost:hover,
body.theme-dark .scheduler-scale-control .button-ghost:focus-visible {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .scheduler-backlog-search input {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(52, 58, 68, 0.99) 0%, rgba(44, 49, 58, 0.99) 100%);
}

body.theme-dark .scheduler-backlog-search input:focus {
    border-color: color-mix(in srgb, var(--accent) 56%, var(--line-strong));
    background: rgba(48, 54, 64, 0.99);
}

body.theme-dark .scheduler-backlog-card:hover,
body.theme-dark .scheduler-backlog-card:focus-within {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

body.theme-dark .scheduler-timeline .timeline-user-cell {
    box-shadow:
        12px 0 18px -16px rgba(0, 0, 0, 0.9),
        0 3px 10px rgba(0, 0, 0, 0.16);
}

body.theme-dark .timeline-break-overlay {
    border-inline-color: rgba(240, 185, 79, 0.2);
    background:
        repeating-linear-gradient(
            135deg,
            rgba(240, 185, 79, 0.08) 0 6px,
            rgba(240, 185, 79, 0.16) 6px 12px
        );
    color: #efc36a;
}

body.theme-dark .timeline-job.is-compact .timeline-job-popover {
    border-color: var(--line-strong);
    background: rgba(42, 47, 56, 0.99);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

body.theme-dark .timeline-job-popover > strong,
body.theme-dark .timeline-job-popover > span {
    color: var(--ink);
}

body.theme-dark .timeline-job-popover > a {
    color: #a9cdf5;
}

@media (max-width: 1180px) {
    .scheduler-day-panel {
        order: -1;
    }

    .scheduler-backlog-panel {
        position: static;
        max-height: none;
    }

    .scheduler-backlog-panel .scheduler-card-grid {
        max-height: min(46vh, 440px);
        max-height: min(46dvh, 440px);
        padding-right: 5px;
        overflow-y: auto;
    }
}

@media (max-width: 860px) {
    .scheduler-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .scheduler-day-heading {
        align-items: stretch;
    }

    .scheduler-day-controls {
        width: 100%;
        justify-items: stretch;
    }

    .scheduler-day-controls > p {
        max-width: none;
        text-align: left;
    }

    .scheduler-scale-control {
        justify-content: space-between;
    }

    .scheduler-timeline {
        --scheduler-user-column-width: 190px;
    }

    .scheduler-timeline[data-scale="overview"] {
        --scheduler-user-column-width: 190px;
        --scheduler-track-min-width: 760px;
    }

    .scheduler-timeline[data-scale="comfortable"] {
        --scheduler-track-min-width: 1160px;
    }

    .scheduler-timeline[data-scale="detailed"] {
        --scheduler-track-min-width: 1900px;
    }
}

@media (max-width: 720px) {
    .scheduler-header-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .scheduler-date-navigation {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scheduler-date-navigation .button-ghost {
        height: 44px;
        min-height: 44px;
        padding: 0 6px;
        font-size: 0.82rem;
        overflow-wrap: normal;
        word-break: normal;
    }

    .scheduler-header-actions > .inline-form,
    .scheduler-header-actions > .inline-form .button-ghost {
        width: 100%;
    }

    .scheduler-auto-schedule-option {
        width: 100%;
        justify-content: center;
    }

    .scheduler-scale-control {
        align-items: stretch;
        flex-direction: column;
    }

    .scheduler-scale-control > div {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .scheduler-scale-control .button-ghost {
        width: 100%;
        min-width: 0;
        padding-inline: 6px;
    }

    .scheduler-timeline {
        --scheduler-user-column-width: 156px;
    }

    .scheduler-backlog-panel .scheduler-card-grid {
        max-height: min(42vh, 360px);
        max-height: min(42dvh, 360px);
    }

    .scheduler-timeline[data-scale="overview"] {
        --scheduler-user-column-width: 0px;
        --scheduler-track-min-width: 0px;
        gap: 12px;
        padding: 0;
        overflow-x: visible;
        scrollbar-gutter: auto;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-head {
        display: none;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-row {
        display: grid;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: var(--panel);
        box-shadow: 0 7px 18px rgba(28, 46, 72, 0.055);
    }

    .scheduler-timeline[data-scale="overview"] .timeline-user-cell {
        position: static;
        left: auto;
        z-index: auto;
        display: grid;
        min-width: 0;
        padding: 12px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 3px 10px;
        border: 0;
        border-radius: 0;
        background: color-mix(in srgb, var(--panel-soft) 82%, var(--panel));
        box-shadow: none;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-user-cell > strong,
    .scheduler-timeline[data-scale="overview"] .timeline-user-cell > span,
    .scheduler-timeline[data-scale="overview"] .timeline-user-cell > small {
        min-width: 0;
        grid-column: 1;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-user-cell > small {
        overflow-wrap: anywhere;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-user-load {
        justify-content: flex-end;
        margin: 0;
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-user-actions {
        flex-direction: row;
        grid-column: 1 / -1;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-track {
        display: grid;
        min-width: 0;
        min-height: 68px;
        padding: 10px;
        gap: 8px;
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        overflow: visible;
        background: var(--panel);
    }

    .scheduler-timeline[data-scale="overview"] .timeline-grid-lines,
    .scheduler-timeline[data-scale="overview"] .timeline-off-overlay,
    .scheduler-timeline[data-scale="overview"] .timeline-break-overlay,
    .scheduler-timeline[data-scale="overview"] .timeline-job-ribbon,
    .scheduler-timeline[data-scale="overview"] .timeline-job-short-label,
    .scheduler-timeline[data-scale="overview"] .timeline-job-popover {
        display: none !important;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job,
    .scheduler-timeline[data-scale="overview"] .timeline-job.is-compact,
    .scheduler-timeline[data-scale="overview"] .timeline-job.is-micro {
        position: relative;
        inset: auto;
        left: auto !important;
        display: grid;
        width: 100% !important;
        min-width: 0;
        min-height: 72px;
        padding: 10px 12px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
        align-content: center;
        align-items: center;
        border-radius: 12px;
        overflow: hidden;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job.is-compact > .timeline-job-code,
    .scheduler-timeline[data-scale="overview"] .timeline-job.is-compact > .timeline-job-title,
    .scheduler-timeline[data-scale="overview"] .timeline-job.is-compact > .timeline-job-time,
    .scheduler-timeline[data-scale="overview"] .timeline-job.is-compact > .timeline-job-open {
        display: block;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job-code {
        min-width: 0;
        grid-column: 1;
        grid-row: 1;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job-time {
        min-width: 0;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        font-size: 0.7rem;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job-title {
        grid-column: 1 / -1;
        grid-row: 2;
        -webkit-line-clamp: 2;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job-open {
        margin-top: 2px;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-job.is-micro::after {
        display: none;
    }

    .scheduler-timeline[data-scale="overview"] .timeline-empty {
        position: static;
        min-height: 48px;
        padding: 10px;
        text-align: center;
    }

    .scheduler-timeline[data-scale="comfortable"] {
        --scheduler-track-min-width: 1040px;
    }

    .scheduler-timeline[data-scale="detailed"] {
        --scheduler-track-min-width: 1740px;
    }

    .scheduler-timeline .timeline-user-cell {
        padding: 11px;
    }

    .timeline-user-actions {
        flex-direction: column;
        gap: 6px;
    }

    .timeline-user-actions .timeline-user-action,
    .timeline-user-clear-action {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .timeline-user-action-label-wide {
        display: none;
    }

    .timeline-user-action-label-compact {
        display: inline;
    }

    .timeline-job.is-compact .timeline-job-popover {
        width: 184px;
        max-width: 184px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scheduler-backlog-search input,
    .scheduler-backlog-card,
    .timeline-job {
        transition: none;
    }
}

/* Preventive-maintenance planning workspace */
.pm-workspace-card {
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.pm-workspace-toolbar {
    padding-block: 14px;
    border-bottom: 0;
}

.pm-status-display {
    min-width: 190px;
}

.pm-workspace-actions {
    flex-wrap: nowrap;
}

.pm-workspace-summary {
    padding-block: 7px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
}

.pm-workspace-summary .wo-summary-metric {
    min-height: 60px;
}

.wo-workspace-tab [data-pm-checklist-count],
.wo-workspace-tab .pm-tab-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 76%, transparent);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.wo-workspace-tab.is-active [data-pm-checklist-count],
.wo-workspace-tab.is-active .pm-tab-count {
    background: rgba(62, 123, 255, 0.12);
    color: #2f63ce;
}

.pm-overview-grid {
    grid-template-columns: minmax(260px, 0.9fr) repeat(2, minmax(0, 1fr));
}

.pm-overview-grid > :first-child {
    grid-row: span 2;
}

.pm-overview-grid .stack-item {
    min-height: 132px;
}

.pm-plan-checklist-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pm-plan-checklist-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-height: 84px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    box-shadow: 0 7px 18px rgba(47, 51, 73, 0.04);
}

.pm-plan-checklist-index {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(124, 190, 40, 0.32);
    border-radius: 10px;
    background: rgba(124, 190, 40, 0.11);
    color: #4f7f17;
    font-size: 0.76rem;
    font-weight: 850;
}

.pm-plan-checklist-copy {
    min-width: 0;
}

.pm-plan-checklist-copy strong {
    display: block;
    color: var(--ink);
    line-height: 1.35;
}

.pm-plan-checklist-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.pm-plan-checklist-copy p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.42;
}

.pm-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pm-history-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    box-shadow: 0 7px 18px rgba(47, 51, 73, 0.04);
}

.pm-history-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(124, 190, 40, 0.13);
    color: #4f7f17;
}

.pm-history-icon .icon,
.pm-history-icon svg {
    width: 19px;
    height: 19px;
}

.pm-history-item > div {
    min-width: 0;
}

.pm-history-item strong,
.pm-history-item span,
.pm-history-item p {
    display: block;
}

.pm-history-item strong {
    margin-bottom: 3px;
    color: var(--ink);
}

.pm-history-item > div > span {
    color: var(--ink-muted);
    font-size: 0.78rem;
}

.pm-history-item p {
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.42;
}

.wo-inline-panel-stack.has-open-panel {
    pointer-events: auto;
}

.wo-inline-panel-stack.has-open-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(16, 23, 34, 0.28);
    backdrop-filter: blur(2px);
}

.pm-checklist-panel {
    width: min(860px, calc(100vw - 48px));
}

.wo-inline-panel-stack.has-open-panel .wo-inline-panel {
    z-index: 1;
}

.pm-completion-panel {
    width: min(760px, calc(100vw - 48px));
}

.pm-checklist-source-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.pm-checklist-source-option {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.pm-checklist-source-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pm-checklist-source-option > span {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 11px;
    min-height: 70px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pm-checklist-source-option .icon {
    grid-row: 1 / span 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    align-self: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--line) 74%, transparent);
    color: var(--ink-soft);
}

.pm-checklist-source-option .icon svg {
    width: 20px;
    height: 20px;
}

.pm-checklist-source-option strong {
    align-self: end;
    color: var(--ink);
    font-size: 0.9rem;
}

.pm-checklist-source-option small {
    align-self: start;
    color: var(--ink-muted);
    font-size: 0.77rem;
    line-height: 1.25;
}

.pm-checklist-source-option:hover > span {
    border-color: var(--line-strong);
    background: var(--panel);
}

.pm-checklist-source-option.is-selected > span {
    border-color: rgba(124, 190, 40, 0.48);
    background: rgba(124, 190, 40, 0.1);
    box-shadow: inset 0 0 0 1px rgba(124, 190, 40, 0.08);
}

.pm-checklist-source-option.is-selected .icon {
    background: #79c82f;
    color: #16230f;
}

.pm-checklist-panel .wo-inline-actions {
    align-items: center;
}

.pm-checklist-panel .wo-task-list-library-link {
    margin: 0 auto 0 0;
}

.pm-checklist-panel select:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.pm-editor-core-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pm-editor-description textarea {
    min-height: 164px;
}

.pm-editor-checklist-setup {
    gap: 16px;
}

.pm-editor-checklist-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #b9c6d7);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.pm-editor-checklist-tab {
    min-width: 0;
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.pm-editor-checklist-tab:hover,
.pm-editor-checklist-tab:focus-visible {
    color: var(--ink);
}

.pm-editor-checklist-tab:focus-visible {
    outline: 3px solid color-mix(in srgb, #3e7bff 22%, transparent);
    outline-offset: 1px;
}

.pm-editor-checklist-tab.is-active {
    border-color: color-mix(in srgb, var(--line) 76%, #9cafc5);
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 5px 15px rgba(47, 51, 73, 0.07);
}

.pm-editor-checklist-panel {
    display: none;
    min-width: 0;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #b9c6d7);
    border-radius: 15px;
    background: color-mix(in srgb, var(--panel-soft) 62%, transparent);
}

.pm-editor-checklist-panel.is-active {
    display: grid;
    gap: 16px;
    animation: wo-task-panel-enter 0.2s ease both;
}

.pm-editor-checklist-panel[hidden] {
    display: none !important;
}

.pm-editor-checklist-panel[data-pm-editor-checklist-panel="none"].is-active {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
}

.pm-editor-checklist-panel-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: rgba(124, 190, 40, 0.13);
    color: #568d18;
}

.pm-editor-checklist-panel-icon .icon,
.pm-editor-checklist-panel-icon svg {
    width: 21px;
    height: 21px;
}

.pm-editor-checklist-panel strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.pm-editor-checklist-panel p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.81rem;
    line-height: 1.45;
}

.pm-editor-checklist-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.pm-editor-checklist-panel-head > div {
    min-width: 0;
}

.pm-editor-checklist-panel-head > a {
    flex: 0 0 auto;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.pm-editor-checklist-panel-head > a:hover,
.pm-editor-checklist-panel-head > a:focus-visible {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pm-editor-checklist-panel .pm-checklist-source-options {
    margin-bottom: 0;
}

.pm-editor-checklist-fields,
.pm-editor-new-list-fields {
    padding-top: 2px;
}

.pm-editor-checklist-fields label > small {
    display: block;
    margin-top: 7px;
    color: var(--ink-muted);
    font-size: 0.76rem;
    font-weight: 550;
    line-height: 1.4;
}

.pm-editor-new-list-fields textarea {
    min-height: 132px;
}

.pm-editor-checklist-permission-note {
    padding: 11px 13px;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 11px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: var(--ink-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

body.theme-dark .pm-workspace-summary {
    background: rgba(255, 255, 255, 0.025);
    border-color: var(--line-strong);
}

body.theme-dark .pm-plan-checklist-item,
body.theme-dark .pm-history-item,
body.theme-dark .pm-plan-checklist-index {
    color: #c7e99f;
}

body.theme-dark .pm-checklist-source-option > span {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .pm-checklist-source-option.is-selected > span {
    border-color: rgba(151, 224, 68, 0.34);
    background: rgba(124, 190, 40, 0.1);
}

body.theme-dark .pm-editor-checklist-tabs,
body.theme-dark .pm-editor-checklist-panel,
body.theme-dark .pm-editor-checklist-permission-note {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .pm-editor-checklist-tab.is-active {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.075);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

body.theme-dark .pm-editor-checklist-panel-icon {
    background: rgba(124, 190, 40, 0.13);
    color: #c7e99f;
}

@media (max-width: 980px) {
    .pm-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-overview-grid > :first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .pm-workspace-toolbar {
        align-items: stretch;
    }

    .pm-workspace-toolbar .wo-toolbar-left,
    .pm-workspace-actions {
        width: 100%;
    }

    .pm-workspace-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .pm-workspace-card {
        grid-template-rows: auto auto auto auto minmax(0, 1fr);
    }

    .pm-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-workspace-summary .wo-summary-metric:nth-child(2) {
        border-right: 0;
    }

    .pm-overview-grid,
    .pm-plan-checklist-list,
    .pm-history-list,
    .pm-checklist-source-options,
    .pm-editor-core-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .pm-editor-checklist-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .pm-editor-checklist-panel-head {
        display: grid;
        gap: 8px;
    }

    .pm-workspace-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pm-workspace-actions > .button-primary {
        width: 100%;
    }

    .pm-plan-action-menu-popover {
        right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pm-checklist-source-option > span,
    .pm-editor-checklist-tab {
        transition: none;
    }

    .pm-editor-checklist-panel.is-active {
        animation: none;
    }
}

/* Asset workspace and editor */
.asset-workspace-card {
    width: min(1240px, 100%);
    height: min(94vh, 1020px);
    min-height: min(94vh, 1020px);
    max-height: min(94vh, 1020px);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.asset-workspace-toolbar {
    padding-block: 14px;
    border-bottom: 0;
}

.asset-status-form {
    flex: 0 0 auto;
}

.asset-status-picker {
    min-width: 214px;
}

.asset-status-picker.is-static {
    padding-right: 14px;
    cursor: default;
}

.asset-status-picker.is-static::after {
    display: none;
}

.asset-status-picker .status-signal {
    flex: 0 0 auto;
}

.asset-workspace-actions {
    flex-wrap: nowrap;
}

.asset-workspace-tabs {
    scrollbar-width: none;
}

.asset-workspace-tabs::-webkit-scrollbar {
    display: none;
}

.asset-workspace-summary {
    padding-block: 7px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
}

.asset-workspace-summary .wo-summary-metric {
    min-height: 60px;
}

.asset-tab-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 76%, transparent);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.wo-workspace-tab.is-active .asset-tab-count {
    background: rgba(62, 123, 255, 0.12);
    color: #2f63ce;
}

.asset-workspace-body {
    overflow-x: hidden;
}

.asset-workspace-panel-stack {
    display: contents;
}

.asset-workspace-panel.card {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.asset-overview-grid {
    grid-template-columns: minmax(300px, 1.15fr) repeat(2, minmax(220px, 0.85fr));
    align-items: stretch;
}

.asset-overview-grid > :first-child {
    grid-row: auto;
}

.asset-description-card {
    grid-column: 1 / -1;
    min-height: 0 !important;
}

.asset-description-copy {
    max-width: 100ch;
    margin-bottom: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.asset-workspace-card .asset-overview-contextual {
    display: none;
}

.asset-activity-heading,
.asset-pm-heading {
    align-items: flex-end;
    margin-bottom: 18px;
}

.asset-activity-heading h2,
.asset-pm-heading h2 {
    margin-bottom: 4px;
}

.asset-activity-filter {
    position: relative;
    display: grid;
    min-width: 270px;
    gap: 6px;
}

.asset-activity-filter > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.asset-activity-filter select {
    width: 100%;
    min-height: 46px;
    padding: 0 44px 0 14px;
    appearance: none;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 94%, var(--accent-soft));
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.2;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.asset-activity-filter::after {
    content: '';
    position: absolute;
    right: 17px;
    bottom: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg);
    pointer-events: none;
}

.asset-activity-filter select:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
    background: var(--panel);
}

.asset-activity-filter select:focus-visible {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent), 0 7px 18px rgba(15, 23, 42, 0.08);
}

.asset-activity-list {
    grid-template-columns: minmax(0, 1fr);
}

.asset-activity-item {
    display: grid;
    gap: 7px;
}

.asset-activity-item[hidden] {
    display: none;
}

.asset-activity-item-head,
.asset-pm-plan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.asset-activity-item-head .badge {
    min-height: 25px;
    padding-inline: 10px;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    font-size: 0.72rem;
    letter-spacing: 0.025em;
}

.asset-activity-item h3,
.asset-pm-plan-card h3 {
    margin: 0;
    font-size: 1rem;
}

.asset-activity-item h3 a {
    color: var(--ink);
}

.asset-activity-item h3 > span {
    color: var(--ink);
}

.asset-activity-meta {
    color: var(--ink-muted) !important;
    font-size: 0.8rem;
}

.asset-activity-related a {
    color: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
}

.asset-activity-related a:hover,
.asset-activity-related a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tone-gold {
    color: #8a5700;
    background: #fff1c6;
}

.financial-page {
    display: grid;
    gap: 18px;
}

.financial-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 28px;
    border-color: var(--line);
    background: var(--panel);
}

.financial-hero-copy {
    max-width: 760px;
}

.financial-hero-copy h2 {
    margin: 2px 0 7px;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.financial-hero-copy p:last-child {
    color: var(--ink-soft);
}

.financial-lifetime-metric {
    display: grid;
    min-width: 290px;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 94%, #edf6e3);
    box-shadow: none;
}

.financial-lifetime-metric > span {
    color: color-mix(in srgb, var(--accent) 74%, #28401c);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.financial-lifetime-metric strong {
    color: var(--ink);
    font-size: clamp(1.55rem, 2.5vw, 2.2rem);
    line-height: 1.05;
}

.financial-lifetime-metric small {
    color: var(--ink-soft);
}

.financial-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 0.75fr)) minmax(220px, 1.2fr) auto auto;
    align-items: end;
    gap: 12px;
    padding: 17px 20px;
}

.financial-filter label {
    display: grid;
    gap: 6px;
}

.financial-filter label > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.financial-filter input,
.financial-filter select,
.financial-filter button,
.financial-filter .button-ghost {
    min-height: 44px;
}

.financial-filter input,
.financial-filter select {
    width: 100%;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.financial-filter input:hover,
.financial-filter select:hover {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line-strong));
    background: var(--panel);
}

.financial-filter input:focus,
.financial-filter select:focus {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 17%, transparent), 0 6px 16px rgba(15, 23, 42, 0.06);
}

.financial-filter button,
.financial-filter .button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 18px;
    border-radius: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.financial-tabs {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 94%, var(--panel-soft));
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
    scrollbar-width: thin;
}

.financial-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.financial-tab:hover,
.financial-tab:focus-visible {
    color: var(--ink);
    background: var(--panel);
}

.financial-tab.is-active {
    color: #264b08;
    background: color-mix(in srgb, var(--accent-soft) 54%, var(--panel));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, var(--line)), 0 5px 14px rgba(75, 125, 24, 0.1);
}

.financial-tab.is-active::after {
    position: absolute;
    right: 16px;
    bottom: 5px;
    left: 16px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
    content: '';
}

.financial-overview-note {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    max-width: none;
}

.financial-tab-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, var(--accent-soft)), var(--panel));
}

.financial-tab-intro h2 {
    margin: 2px 0 4px;
}

.financial-tab-intro p:last-child {
    color: var(--ink-soft);
}

.financial-tab-kpi {
    display: grid;
    min-width: 220px;
    gap: 4px;
    padding: 14px 17px;
    border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
    border-radius: 14px;
    background: var(--panel);
}

.financial-tab-kpi span,
.financial-tab-summary span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.financial-tab-kpi strong {
    font-size: 1.6rem;
}

.financial-tab-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.financial-tab-summary article {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--panel);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.financial-tab-summary article.is-warning {
    border-color: color-mix(in srgb, #d18b0e 35%, var(--line));
    background: color-mix(in srgb, #fff3cc 36%, var(--panel));
}

.financial-tab-summary strong {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.financial-tab-summary small {
    color: var(--ink-soft);
}

.financial-detail-panel {
    padding: 22px;
}

.financial-detail-panel .section-heading {
    margin-bottom: 16px;
}

.financial-table-empty {
    padding: 22px;
    color: var(--ink-soft);
    text-align: center;
}

.financial-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.financial-service-grid > div {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 94%, var(--panel-soft));
}

.financial-service-grid span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.financial-service-grid strong {
    font-size: 1.18rem;
}

.financial-service-grid small {
    color: var(--ink-muted);
}

.financial-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.financial-chart-card {
    min-width: 0;
    padding: 22px;
}

.financial-chart-card .section-heading {
    margin-bottom: 18px;
}

.financial-prediction-panel {
    padding: 22px;
}

.financial-prediction-panel .section-heading {
    margin-bottom: 18px;
}

.financial-prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 13px;
}

.financial-prediction-card {
    --prediction-color: #5aa61d;
    display: grid;
    min-width: 0;
    gap: 15px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--panel) 95%, var(--panel-soft));
}

.financial-prediction-card.is-purchases { --prediction-color: #cc921e; }
.financial-prediction-card.is-labor { --prediction-color: #2f8ab2; }
.financial-prediction-card.is-parts { --prediction-color: #287f9f; }
.financial-prediction-card.is-services { --prediction-color: #805bc1; }

.financial-prediction-card > div:first-child {
    display: grid;
    gap: 3px;
}

.financial-prediction-card > div:first-child > span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 820;
}

.financial-prediction-card > div:first-child > strong {
    font-size: 1.22rem;
    font-variant-numeric: tabular-nums;
}

.financial-prediction-card > div:first-child > small {
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.financial-prediction-chart {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 100px;
}

.financial-prediction-chart > div {
    display: grid;
    flex: 1 1 0;
    gap: 4px;
    min-width: 0;
    text-align: center;
}

.financial-prediction-chart > div > span {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 76px;
    border-bottom: 1px solid var(--line);
}

.financial-prediction-chart i {
    width: min(16px, 72%);
    height: max(3px, var(--bar-height));
    max-height: 100%;
    border-radius: 5px 5px 2px 2px;
    background: var(--prediction-color);
}

.financial-prediction-chart .is-forecast i {
    border: 1px solid var(--prediction-color);
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--prediction-color) 22%, transparent) 0 4px, var(--prediction-color) 4px 7px);
}

.financial-prediction-chart small {
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 0.64rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-prediction-key {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 12px;
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 760;
}

.financial-prediction-key span::before {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 3px;
    background: var(--accent);
    content: '';
}

.financial-prediction-key .is-forecast::before {
    border: 1px solid var(--accent);
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent) 0 3px, var(--accent) 3px 5px);
}

.financial-annual-prediction {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.financial-annual-prediction-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 13px;
}

.financial-annual-prediction-heading p,
.financial-annual-prediction-heading h3 {
    margin: 0;
}

.financial-annual-prediction-heading h3 {
    margin-top: 2px;
    color: var(--ink);
    font-size: 1rem;
}

.financial-annual-prediction-heading > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
}

.financial-annual-prediction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr));
    gap: 11px;
}

.financial-annual-prediction-card {
    --prediction-color: #5aa61d;
    display: grid;
    min-width: 0;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

.financial-annual-prediction-card.is-purchases { --prediction-color: #cc921e; }
.financial-annual-prediction-card.is-labor { --prediction-color: #2f8ab2; }
.financial-annual-prediction-card.is-parts { --prediction-color: #287f9f; }
.financial-annual-prediction-card.is-services { --prediction-color: #805bc1; }

.financial-annual-prediction-value {
    display: grid;
    gap: 2px;
}

.financial-annual-prediction-value > span {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 820;
}

.financial-annual-prediction-value > strong {
    color: var(--ink);
    font-size: 1.18rem;
    font-variant-numeric: tabular-nums;
}

.financial-annual-prediction-value > small {
    color: var(--ink-muted);
    font-size: 0.68rem;
}

.financial-annual-prediction-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 72px;
    padding-top: 4px;
    border-bottom: 1px solid var(--line);
}

.financial-annual-prediction-bars > span {
    display: flex;
    position: relative;
    flex: 1 1 0;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    height: 100%;
}

.financial-annual-prediction-bars i {
    width: min(12px, 78%);
    height: max(3px, var(--bar-height));
    max-height: 100%;
    border-radius: 4px 4px 1px 1px;
    background: var(--prediction-color);
}

.financial-annual-prediction-bars .is-forecast i {
    border: 1px solid var(--prediction-color);
    background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--prediction-color) 20%, transparent) 0 3px, var(--prediction-color) 3px 5px);
}

.financial-annual-prediction-bars small {
    position: absolute;
    right: 0;
    bottom: -14px;
    left: 0;
    overflow: hidden;
    color: var(--ink-muted);
    font-size: 0.52rem;
    font-style: normal;
    text-align: center;
}

.financial-annual-prediction-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    color: var(--ink-muted);
    font-size: 0.64rem;
}

.financial-annual-prediction-meta b {
    color: var(--ink-soft);
    font-weight: 800;
    text-align: right;
}

.financial-bar-chart {
    display: grid;
    gap: 13px;
}

.financial-chart-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 1.55fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.financial-chart-row > span {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-chart-row > div {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 86%, var(--line));
}

.financial-chart-row i {
    display: block;
    width: max(3px, var(--bar-width));
    max-width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 72%, #ffffff), var(--accent));
}

.financial-bar-chart.is-gold .financial-chart-row i {
    background: linear-gradient(90deg, #f4c75e, #c88a12);
}

.financial-bar-chart.is-blue .financial-chart-row i {
    background: linear-gradient(90deg, #6cc6e8, #2d7aa0);
}

.financial-bar-chart.is-purple .financial-chart-row i {
    background: linear-gradient(90deg, #b49aee, #7551bb);
}

.financial-chart-row strong {
    color: var(--ink);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.financial-column-chart {
    display: flex;
    align-items: end;
    gap: 10px;
    min-height: 225px;
    overflow-x: auto;
    padding: 12px 2px 3px;
}

.financial-column-chart > div {
    display: grid;
    flex: 1 0 58px;
    gap: 6px;
    min-width: 0;
    color: var(--ink-muted);
    text-align: center;
}

.financial-column-chart > div > span {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 148px;
    border-bottom: 1px solid var(--line);
}

.financial-column-chart i {
    width: min(34px, 72%);
    height: max(3px, var(--bar-height));
    max-height: 100%;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 68%, #ffffff), var(--accent));
}

.financial-column-chart.is-gold i {
    background: linear-gradient(180deg, #f6d77e, #c88a12);
}

.financial-column-chart.is-purple i {
    background: linear-gradient(180deg, #c6b6ef, #7551bb);
}

.financial-column-chart strong,
.financial-column-chart small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-column-chart strong {
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.financial-column-chart small {
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

.financial-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.financial-stat {
    display: grid;
    min-width: 0;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--panel);
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.055);
}

.financial-stat > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.financial-stat strong {
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1.1;
}

.financial-stat small {
    color: var(--ink-soft);
    line-height: 1.35;
}

.financial-stat.is-primary {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 34%, var(--panel)), var(--panel));
}

.financial-stat.is-accounted {
    border-color: color-mix(in srgb, #2d7aa0 34%, var(--line));
    background: linear-gradient(145deg, color-mix(in srgb, #dff4fc 54%, var(--panel)), var(--panel));
}

.financial-stat.is-procurement {
    border-color: color-mix(in srgb, #c18a19 38%, var(--line));
    background: linear-gradient(145deg, color-mix(in srgb, #fff1bf 55%, var(--panel)), var(--panel));
}

.financial-stat.is-warning {
    border-color: color-mix(in srgb, #d97706 30%, var(--line));
}

.financial-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(310px, 0.8fr);
    gap: 18px;
}

.financial-trend-panel,
.financial-mix-panel,
.financial-ranking-panel,
.financial-table-grid > .panel {
    padding: 22px;
}

.financial-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 750;
}

.financial-legend span::before {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 99px;
    content: '';
}

.financial-legend .is-maintenance::before,
.financial-bar.is-maintenance,
.financial-legend .is-labor::before,
.financial-bar.is-labor {
    background: linear-gradient(90deg, #54a416, #86d52a);
}

.financial-legend .is-procurement::before,
.financial-bar.is-procurement {
    background: linear-gradient(90deg, #c18111, #f3bd41);
}

.financial-legend .is-services::before,
.financial-bar.is-services {
    background: linear-gradient(90deg, #7551bb, #b49aee);
}

.financial-month-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.financial-month-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.financial-month-row > strong {
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.financial-month-bars {
    display: grid;
    gap: 5px;
}

.financial-month-bars > div {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    align-items: center;
    gap: 9px;
    min-height: 11px;
}

.financial-month-bars > div::before {
    position: absolute;
    inset: 2px 101px 2px 0;
    border-radius: 99px;
    background: var(--panel-soft);
    content: '';
}

.financial-bar {
    z-index: 1;
    width: max(2px, var(--bar-width));
    height: 7px;
    border-radius: 99px;
}

.financial-month-bars em {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-style: normal;
    text-align: right;
}

.financial-mix-panel {
    display: grid;
    align-content: start;
}

.financial-donut {
    position: relative;
    display: grid;
    width: min(190px, 65vw);
    aspect-ratio: 1;
    place-items: center;
    margin: 8px auto 20px;
    border-radius: 50%;
    background: conic-gradient(#63ad20 0 calc(var(--labor-share) * 1%), #3289c7 calc(var(--labor-share) * 1%) calc((var(--labor-share) + var(--parts-share)) * 1%), #a884cf calc((var(--labor-share) + var(--parts-share)) * 1%) 100%);
}

.financial-donut::after {
    position: absolute;
    width: 68%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    content: '';
}

.financial-donut > span {
    z-index: 1;
    display: grid;
    gap: 2px;
    text-align: center;
}

.financial-donut strong {
    font-size: 1.2rem;
}

.financial-donut small {
    color: var(--ink-muted);
}

.financial-mix-list {
    display: grid;
    gap: 9px;
}

.financial-mix-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 45px;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
}

.financial-mix-list span::before {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border-radius: 99px;
    content: '';
}

.financial-mix-list .is-labor::before { background: #63ad20; }
.financial-mix-list .is-parts::before { background: #3289c7; }
.financial-mix-list .is-other::before { background: #a884cf; }
.financial-mix-list small { color: var(--ink-muted); text-align: right; }

.financial-ranking-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.financial-ranking-list {
    display: grid;
    gap: 13px;
    margin-top: 15px;
}

.financial-ranking-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
}

.financial-ranking-row > div {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.financial-ranking-row strong {
    overflow: hidden;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-ranking-row small {
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.financial-ranking-row span {
    overflow: hidden;
    height: 5px;
    border-radius: 99px;
    background: var(--panel-soft);
}

.financial-ranking-row i {
    display: block;
    width: max(2px, var(--bar-width));
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #f5c446));
}

.financial-ranking-row b {
    font-size: 0.78rem;
    white-space: nowrap;
}

.financial-table-grid {
    display: grid;
    gap: 18px;
}

.financial-table td small,
.financial-table td strong + small {
    display: block;
    margin-top: 3px;
    color: var(--ink-muted);
}

.financial-report-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 4px 2px;
}

.financial-report-intro h2 {
    margin: 3px 0 5px;
    color: var(--ink);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.financial-report-intro p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--ink-muted);
}

.financial-report-intro-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    max-width: 430px;
}

.financial-report-intro-points span {
    padding: 7px 10px;
    border: 1px solid #d7e1ee;
    border-radius: 999px;
    background: #fff;
    color: #4c5870;
    font-size: 0.72rem;
    font-weight: 800;
}

.financial-report-builder {
    padding: 24px;
}

.financial-report-builder > .section-heading {
    align-items: flex-end;
    margin-bottom: 20px;
}

.financial-report-builder > .section-heading > span {
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.financial-report-fields {
    display: grid;
    grid-template-columns: minmax(200px, 1.15fr) minmax(220px, 1.2fr) minmax(190px, 1fr) minmax(130px, 0.62fr) minmax(180px, 0.85fr);
    gap: 14px;
}

.financial-report-fields label,
.financial-report-notes-field {
    display: grid;
    gap: 7px;
}

.financial-report-fields label > span,
.financial-report-notes-field > span,
.financial-report-sections legend {
    color: #8793aa;
    font-size: 0.71rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.financial-report-fields label > span small,
.financial-report-notes-field > span small {
    color: #a9b2c3;
    font-size: 0.64rem;
    letter-spacing: 0;
    text-transform: none;
}

.financial-report-fields input,
.financial-report-fields select,
.financial-report-notes-field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #ccd8e8;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.financial-report-fields input,
.financial-report-fields select {
    padding: 0 13px;
}

.financial-report-notes-field textarea {
    min-height: 88px;
    padding: 12px 13px;
    resize: vertical;
}

.financial-report-fields input:focus,
.financial-report-fields select:focus,
.financial-report-notes-field textarea:focus {
    border-color: #78b927;
    outline: 3px solid rgba(120, 185, 39, 0.14);
}

.financial-report-sections {
    margin: 20px 0;
    padding: 0;
    border: 0;
}

.financial-report-sections legend {
    margin-bottom: 9px;
}

.financial-report-sections > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.financial-report-sections label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 68px;
    padding: 12px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #f9fbfe;
    cursor: pointer;
}

.financial-report-sections label:has(input:checked) {
    border-color: #a7d36f;
    background: #f4faec;
    box-shadow: inset 3px 0 #7ec528;
}

.financial-report-sections input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: #73b722;
}

.financial-report-sections label span {
    display: grid;
    gap: 3px;
}

.financial-report-sections label strong {
    color: var(--ink);
    font-size: 0.83rem;
}

.financial-report-sections label small {
    color: var(--ink-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.financial-report-builder-actions,
.financial-report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}

.financial-report-builder-actions > div,
.financial-report-toolbar > div:last-child {
    display: flex;
    gap: 9px;
}

.financial-report-builder-actions button,
.financial-report-toolbar button,
.financial-report-toolbar a {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
}

.financial-report-toolbar {
    padding: 14px 17px;
    border: 1px solid #b8d991;
    border-radius: 14px;
    background: linear-gradient(135deg, #f6fbef, #eef8e4);
}

.financial-report-toolbar > div:first-child {
    display: grid;
    gap: 2px;
}

.financial-report-toolbar strong {
    color: #24401d;
    font-size: 0.86rem;
}

.financial-report-toolbar span {
    color: #607257;
    font-size: 0.74rem;
}

.financial-report-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 150px;
    padding: 26px;
    border: 1px dashed #bdcadd;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(246, 249, 253, 0.94), rgba(255, 255, 255, 0.96));
}

.financial-report-empty > span {
    display: grid;
    place-items: center;
    width: 70px;
    height: 82px;
    border: 1px solid #b8c7da;
    border-radius: 8px 8px 16px 8px;
    background: #fff;
    color: #69a91d;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    box-shadow: 0 12px 26px rgba(43, 59, 83, 0.1);
}

.financial-report-empty h3 {
    margin: 0 0 5px;
}

.financial-report-empty p {
    max-width: 700px;
    margin: 0;
    color: var(--ink-muted);
}

.financial-report-preview {
    overflow: hidden;
    border: 1px solid #cbd7e7;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(31, 46, 70, 0.11);
}

.financial-report-cover {
    position: relative;
    overflow: hidden;
    padding: 34px 38px 30px;
    background: linear-gradient(125deg, #173f31 0%, #245c3d 58%, #47792e 100%);
    color: #fff;
}

.financial-report-cover::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 330px;
    height: 330px;
    border: 54px solid rgba(174, 223, 75, 0.12);
    border-radius: 50%;
}

.financial-report-cover-mark {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 34px;
}

.financial-report-cover-mark span {
    color: #d9f3aa;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.financial-report-cover-mark small {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.financial-report-cover > p {
    position: relative;
    z-index: 1;
    margin: 0 0 7px;
    color: #d2eea6;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.financial-report-cover h1 {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    line-height: 1.03;
}

.financial-report-cover-meta {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 36px;
}

.financial-report-cover-meta span {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.financial-report-cover-meta small {
    color: rgba(255, 255, 255, 0.63);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.financial-report-cover-meta strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-report-section {
    padding: 32px 38px;
    border-bottom: 1px solid #dce4ef;
}

.financial-report-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 22px;
}

.financial-report-section-heading > span {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #eaf5dd;
    color: #568e18;
    font-size: 0.72rem;
    font-weight: 900;
}

.financial-report-section-heading p,
.financial-report-section-heading h2 {
    margin: 0;
}

.financial-report-section-heading p {
    color: #8390a6;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.financial-report-section-heading h2 {
    margin-top: 2px;
    color: #202b3e;
    font-size: 1.35rem;
}

.financial-report-context {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-left: 4px solid #79ba29;
    border-radius: 0 10px 10px 0;
    background: #f6faef;
}

.financial-report-context strong {
    color: #496e24;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.financial-report-context p {
    margin: 4px 0 0;
    color: #445068;
    font-size: 0.82rem;
    line-height: 1.5;
}

.financial-report-kpis,
.financial-report-mini-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.financial-report-kpis article,
.financial-report-mini-kpis article,
.financial-report-mix article {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f9fbfd;
}

.financial-report-kpis span,
.financial-report-mini-kpis span,
.financial-report-mix span {
    color: #7d899f;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.financial-report-kpis strong,
.financial-report-mini-kpis strong,
.financial-report-mix strong {
    overflow: hidden;
    color: #253148;
    font-size: 1.15rem;
    text-overflow: ellipsis;
}

.financial-report-kpis small,
.financial-report-mini-kpis small {
    color: #7c889e;
    font-size: 0.7rem;
}

.financial-report-insights {
    margin-top: 16px;
    padding: 17px 19px;
    border-radius: 13px;
    background: linear-gradient(135deg, #1e4c38, #30643e);
    color: #fff;
}

.financial-report-comparison {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #d8e1ec;
    border-radius: 13px;
    background: #fff;
}

.financial-report-comparison-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 11px;
}

.financial-report-comparison-heading > div {
    display: grid;
    gap: 2px;
}

.financial-report-comparison-heading strong {
    color: #354057;
    font-size: 0.78rem;
}

.financial-report-comparison-heading span,
.financial-report-comparison-heading small {
    color: #8792a5;
    font-size: 0.68rem;
}

.financial-report-comparison > div:last-child {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.financial-report-comparison article {
    display: grid;
    gap: 3px;
    padding: 10px;
    border-radius: 9px;
    background: #f4f7fa;
}

.financial-report-comparison article span,
.financial-report-comparison article small {
    color: #7b879b;
    font-size: 0.65rem;
}

.financial-report-comparison article strong {
    color: #334057;
    font-size: 1rem;
}

.financial-report-insights h3 {
    margin: 0 0 10px;
    color: #d6f0ae;
    font-size: 0.76rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.financial-report-insights ol {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 20px;
}

.financial-report-insights li {
    padding-left: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.79rem;
    line-height: 1.4;
}

.financial-report-trend-key {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin: -8px 0 13px;
}

.financial-report-trend-key span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #67738a;
    font-size: 0.69rem;
    font-weight: 800;
}

.financial-report-trend-key span::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: #64a92c;
}

.financial-report-trend-key .is-purchases::before { background: #d29c2d; }
.financial-report-trend-key .is-services::before { background: #8865ba; }

.financial-report-trend {
    display: grid;
    gap: 9px;
}

.financial-report-trend > div {
    display: grid;
    grid-template-columns: 88px minmax(120px, 1fr) 96px;
    align-items: center;
    gap: 12px;
}

.financial-report-trend > div > strong,
.financial-report-trend > div > b {
    color: #5f6b81;
    font-size: 0.73rem;
}

.financial-report-trend > div > b {
    text-align: right;
}

.financial-report-trend > div > span {
    display: flex;
    overflow: hidden;
    height: 13px;
    border-radius: 999px;
    background: #eef2f7;
}

.financial-report-trend i {
    width: var(--segment);
    height: 100%;
    background: #64a92c;
}

.financial-report-trend i.is-purchases { background: #d29c2d; }
.financial-report-trend i.is-services { background: #8865ba; }

.financial-report-mix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.financial-report-mix article {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.financial-report-forecast-section .financial-prediction-panel {
    margin: 0;
    border: 0;
    box-shadow: none;
}

.financial-report-callout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe2b8;
    border-radius: 11px;
    background: #f5faef;
}

.financial-report-callout span {
    color: #6e7b65;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.financial-report-callout strong {
    color: #314525;
    font-size: 0.82rem;
}

.financial-report-callout b {
    color: #4f831a;
}

.financial-report-table {
    font-size: 0.76rem;
}

.financial-report-table th {
    white-space: nowrap;
}

.financial-report-table td small {
    display: block;
    max-width: 260px;
    margin-top: 3px;
    color: #8994a8;
}

.financial-report-subheading,
.financial-report-two-column h3 {
    margin: 20px 0 10px;
    color: #374258;
    font-size: 0.87rem;
}

.financial-report-rankings {
    display: grid;
    gap: 7px;
}

.financial-report-rankings > div {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid #e0e7f0;
    border-radius: 9px;
    background: #fafbfd;
}

.financial-report-rankings > div > span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: #e9f4dc;
    color: #5a941b;
    font-size: 0.67rem;
    font-weight: 900;
}

.financial-report-rankings strong {
    overflow: hidden;
    color: #344057;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.financial-report-rankings small {
    color: #8590a4;
    font-size: 0.68rem;
}

.financial-report-rankings b {
    color: #27334a;
    font-size: 0.76rem;
}

.financial-report-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.financial-report-two-column h3 {
    margin-top: 0;
}

.financial-report-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px 38px;
    background: #f3f6fa;
    color: #8a95a8;
    font-size: 0.65rem;
}

.financial-report-footer span:nth-child(2) {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .financial-stat-grid,
    .financial-ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .financial-visual-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .financial-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .financial-filter {
        grid-template-columns: repeat(2, minmax(150px, 1fr)) minmax(220px, 1.2fr);
    }
    .financial-filter button,
    .financial-filter .button-ghost {
        grid-row: 2;
    }
    .financial-report-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .financial-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }
    .financial-lifetime-metric {
        min-width: 0;
    }
    .financial-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .financial-filter-site,
    .financial-filter button,
    .financial-filter .button-ghost {
        grid-column: 1 / -1;
    }
    .financial-stat-grid,
    .financial-ranking-grid,
    .financial-tab-summary,
    .financial-service-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .financial-tab-intro {
        align-items: stretch;
        flex-direction: column;
    }
    .financial-tab-kpi {
        min-width: 0;
    }
    .financial-overview-note {
        grid-template-columns: minmax(0, 1fr);
    }
    .financial-month-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
    }
    .financial-trend-panel,
    .financial-mix-panel,
    .financial-ranking-panel,
    .financial-table-grid > .panel,
    .financial-chart-card,
    .financial-prediction-panel {
        padding: 17px;
    }
    .financial-chart-row {
        grid-template-columns: minmax(88px, 0.75fr) minmax(90px, 1.3fr) auto;
        gap: 8px;
    }
    .financial-column-chart {
        min-height: 208px;
    }
    .financial-column-chart > div > span {
        height: 132px;
    }
    .financial-annual-prediction-heading,
    .financial-annual-prediction-meta {
        align-items: flex-start;
        flex-direction: column;
    }
    .financial-annual-prediction-meta b {
        text-align: left;
    }
    .financial-report-intro,
    .financial-report-builder-actions,
    .financial-report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .financial-report-intro-points {
        justify-content: flex-start;
        max-width: none;
    }
    .financial-report-fields,
    .financial-report-sections > div,
    .financial-report-kpis,
    .financial-report-mini-kpis,
    .financial-report-mix,
    .financial-report-two-column,
    .financial-report-comparison > div:last-child {
        grid-template-columns: minmax(0, 1fr);
    }
    .financial-report-comparison-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .financial-report-builder {
        padding: 17px;
    }
    .financial-report-builder-actions > div,
    .financial-report-toolbar > div:last-child {
        flex-wrap: wrap;
    }
    .financial-report-toolbar button,
    .financial-report-toolbar a {
        flex: 1 1 auto;
        justify-content: center;
    }
    .financial-report-cover,
    .financial-report-section {
        padding: 24px 18px;
    }
    .financial-report-cover-mark {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 24px;
    }
    .financial-report-cover-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .financial-report-trend > div {
        grid-template-columns: 65px minmax(70px, 1fr) 78px;
        gap: 7px;
    }
    .financial-report-callout {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .financial-report-callout span {
        grid-column: 1 / -1;
    }
    .financial-report-rankings > div {
        grid-template-columns: 26px minmax(0, 1fr) auto;
    }
    .financial-report-rankings small {
        display: none;
    }
    .financial-report-footer {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px 18px;
        text-align: center;
    }
}

@media print {
    @page {
        size: landscape;
        margin: 10mm;
    }
    body * {
        visibility: hidden !important;
    }
    .financial-report-preview,
    .financial-report-preview * {
        visibility: visible !important;
    }
    .financial-report-preview {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .financial-report-cover {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .financial-report-section {
        break-inside: avoid;
        padding: 8mm 6mm;
    }
    .financial-report-section:has(.financial-report-table tbody tr:nth-child(8)) {
        break-inside: auto;
    }
    .financial-report-table tr,
    .financial-report-kpis article,
    .financial-report-mini-kpis article,
    .financial-report-rankings > div {
        break-inside: avoid;
    }
    .financial-report-forecast-section .financial-prediction-panel,
    .financial-report-insights,
    .financial-report-trend i,
    .financial-report-section-heading > span,
    .financial-report-rankings > div > span {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.asset-financial-heading {
    margin-bottom: 18px;
}

.asset-financial-heading h2 {
    margin-bottom: 4px;
}

.asset-financial-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.asset-financial-stat {
    display: grid;
    min-width: 0;
    gap: 6px;
    padding: 16px 17px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 94%, var(--panel-soft));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.asset-financial-stat.is-total {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 34%, var(--panel));
}

.asset-financial-stat > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.asset-financial-stat > strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    line-height: 1.05;
}

.asset-financial-stat > small {
    color: var(--ink-soft);
    line-height: 1.35;
}

.asset-financial-table-region {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.asset-financial-table {
    margin: 0;
}

.asset-financial-table td:first-child a {
    display: grid;
    min-width: 210px;
    gap: 3px;
    color: var(--ink);
    text-decoration: none;
}

.asset-financial-table td:first-child a:hover strong,
.asset-financial-table td:first-child a:focus-visible strong {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.asset-financial-table td:first-child span {
    color: var(--ink-muted);
    font-size: 0.78rem;
}

.asset-financial-total {
    font-weight: 850;
}

@media (max-width: 980px) {
    .asset-financial-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .asset-financial-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .asset-financial-stat {
        padding: 14px 15px;
    }
}

.asset-activity-empty,
.asset-pm-empty {
    grid-column: 1 / -1;
}

.asset-pm-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.asset-pm-plan-card {
    display: grid;
    min-width: 0;
    padding: 16px;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    color: inherit;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.asset-pm-plan-card:hover,
.asset-pm-plan-card:focus-visible {
    border-color: var(--line-strong);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.asset-pm-plan-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    gap: 10px;
}

.asset-pm-plan-details div {
    min-width: 0;
}

.asset-pm-plan-details dt {
    margin-bottom: 3px;
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.asset-pm-plan-details dd {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 700;
}

.asset-labels-panel {
    min-height: 100%;
}

.asset-labels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.asset-label-card {
    display: flex;
    min-height: 400px;
    padding: 20px;
    flex-direction: column;
    gap: 18px;
}

.asset-label-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.asset-label-card-heading h3 {
    margin: 3px 0 0;
}

.asset-label-code {
    display: inline-flex;
    min-height: 30px;
    padding: 0 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.asset-label-preview {
    display: grid;
    min-height: 230px;
    padding: 18px;
    flex: 1 1 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.asset-label-preview img {
    width: min(100%, 520px);
    max-height: 260px;
    object-fit: contain;
}

.asset-label-actions {
    margin-top: auto;
}

.asset-overview-grid > .stack-item,
.asset-overview-grid > .qr-panel,
.asset-overview-grid > .barcode-panel {
    min-height: 142px;
}

html.has-asset-workspace,
body.has-asset-workspace {
    overflow: hidden;
}

.asset-submodal-backdrop {
    z-index: 190;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 24px;
    background: rgba(16, 23, 34, 0.34);
    backdrop-filter: blur(3px);
}

.asset-submodal-card {
    width: min(980px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.asset-inspection-modal {
    overflow-x: hidden;
}

.asset-submodal-card > .modal-header {
    margin-bottom: 2px;
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--panel) 97%, var(--panel-soft));
    box-shadow: 0 8px 22px rgba(47, 51, 73, 0.055);
    color: var(--ink);
}

.asset-submodal-card > .modal-header h2 {
    color: var(--ink);
}

.asset-submodal-card > .modal-header .card-label,
.asset-submodal-card > .modal-header .modal-subtitle {
    color: var(--ink-muted);
}

.asset-submodal-card > .modal-header .button-ghost {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink-soft);
}

.asset-submodal-card > .modal-header .button-ghost:hover,
.asset-submodal-card > .modal-header .button-ghost:focus-visible {
    border-color: rgba(124, 190, 40, 0.42);
    background: rgba(124, 190, 40, 0.09);
    color: var(--ink);
}

.asset-inspection-modal > .modal-header {
    margin-bottom: 16px;
    border-bottom-color: rgba(255, 255, 255, 0.12);
    background: var(--modal-header-background);
    box-shadow: var(--modal-header-shadow);
    color: #f7fbf8;
}

.asset-inspection-modal > .modal-header h2 {
    color: #ffffff;
}

.asset-inspection-modal > .modal-header .card-label {
    color: #d8efb8;
}

.asset-inspection-modal > .modal-header .inspection-asset-meta {
    color: rgba(233, 244, 236, 0.72);
}

.asset-inspection-modal > .modal-header .inspection-asset-meta span + span::before {
    color: rgba(255, 255, 255, 0.34);
}

.asset-inspection-modal > .modal-header .button-ghost {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.asset-inspection-modal > .modal-header .button-ghost:hover,
.asset-inspection-modal > .modal-header .button-ghost:focus-visible {
    border-color: rgba(194, 234, 137, 0.68);
    background: rgba(124, 190, 40, 0.2);
    color: #ffffff;
}

.inspection-modal-header-actions {
    display: grid;
    grid-template-columns: auto auto;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-items: end;
    gap: 8px;
}

.inspection-modal-close {
    grid-column: 1;
    grid-row: 1;
}

.inspection-modal-header-actions > .inspection-print-menu {
    grid-column: 2;
    grid-row: 1;
}

.inspection-modal-identity > .inspection-asset-thumbnail {
    width: 64px;
    height: 64px;
    justify-self: start;
    border-color: rgba(255, 255, 255, 0.48);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 9px 22px rgba(4, 22, 13, 0.24);
}

.inspection-modal-identity {
    display: grid;
    flex: 1 1 0;
    min-width: 0;
    gap: 14px;
}

.inspection-modal-heading-copy {
    min-width: 0;
}

.inspection-asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin: 6px 0 0;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.inspection-asset-meta span + span::before {
    content: "\00b7";
    margin-right: 10px;
    color: var(--line-strong);
}

.inspection-asset-thumbnail {
    display: grid;
    width: 64px;
    height: 64px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    background: color-mix(in srgb, var(--accent) 9%, var(--panel-soft));
    box-shadow: 0 8px 20px rgba(31, 42, 58, 0.09);
    color: var(--accent-strong);
}

.inspection-asset-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspection-asset-thumbnail .icon {
    width: 27px;
    height: 27px;
}

.asset-inspection-modal .inspection-entry-number {
    display: inline-grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: color-mix(in srgb, var(--accent) 15%, var(--panel-soft));
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 900;
}

.asset-inspection-modal .inspection-entry-label {
    min-width: 0;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 750;
    letter-spacing: normal;
    line-height: 1.4;
    text-transform: none;
}

.inspection-checkpoint-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: var(--panel-soft);
}

.inspection-checkpoint-heading .card-label,
.inspection-checkpoint-heading h3 {
    margin: 0;
}

.inspection-checkpoint-heading h3 {
    margin-top: 3px;
    font-size: 1rem;
}

.inspection-checkpoint-heading > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    color: var(--accent-strong);
    font-size: 0.73rem;
    font-weight: 850;
}

.inspection-entry-table tbody tr:focus-within {
    background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}

.asset-submodal-table-wrap,
.asset-editor-table-wrap {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.asset-submodal-table-wrap .data-table,
.asset-editor-table-wrap .data-table {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.asset-submodal-table-wrap .data-table {
    min-width: 700px;
}

.asset-editor-core-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-editor-description textarea {
    min-height: 132px;
}

.asset-editor-resource-section {
    gap: 16px;
}

.asset-editor-section-with-action > div {
    flex: 1 1 auto;
}

.asset-editor-section-with-action > .button-ghost {
    flex: 0 0 auto;
    margin-left: auto;
}

.asset-editor-template-toolbar {
    margin-top: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 70%, transparent);
}

.asset-editor-resource-section .field-note {
    margin: 0;
}

.asset-editor-table-wrap .data-table {
    min-width: 680px;
}

body.theme-dark .asset-workspace-summary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
}

body.theme-dark .asset-submodal-card > .modal-header,
body.theme-dark .asset-editor-template-toolbar {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .asset-submodal-card > .modal-header .button-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink-soft);
}

body.theme-dark .asset-inspection-modal > .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    background: var(--modal-header-background);
    box-shadow: var(--modal-header-shadow);
}

body.theme-dark .asset-inspection-modal > .modal-header .button-ghost {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

body.theme-dark .asset-inspection-modal > .modal-header .inspection-asset-thumbnail {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.9);
}

body.theme-dark .asset-submodal-table-wrap,
body.theme-dark .asset-editor-table-wrap {
    border-color: var(--line-strong);
}

body.theme-dark .inspection-print-popover {
    border-color: var(--line-strong);
    background: var(--panel);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

body.theme-dark .inspection-asset-thumbnail {
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--accent) 12%, var(--panel-soft));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1040px) {
    .asset-editor-modal > .modal-header {
        position: relative;
        display: block;
        padding-right: 112px;
    }

    .asset-editor-modal > .modal-header > .button-ghost {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
    }

    .asset-submodal-card > .modal-header {
        position: relative;
        display: block;
        padding-right: 112px;
    }

    .asset-submodal-card > .modal-header > .button-ghost {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
    }

    .asset-inspection-modal > .modal-header {
        padding-right: 230px;
    }

    .asset-inspection-modal .inspection-modal-header-actions {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
        display: grid;
        justify-items: end;
        gap: 7px;
    }

    .asset-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-overview-grid > :first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .asset-workspace-toolbar {
        align-items: stretch;
    }

    .asset-workspace-toolbar .wo-toolbar-left,
    .asset-workspace-actions {
        width: 100%;
    }

    .asset-workspace-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .asset-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-workspace-summary .wo-summary-metric:nth-child(2) {
        border-right: 0;
    }

    .asset-overview-grid,
    .asset-labels-grid,
    .asset-pm-plan-grid,
    .asset-editor-core-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .asset-activity-heading,
    .asset-pm-heading {
        align-items: stretch;
    }

    .asset-activity-filter {
        width: 100%;
        min-width: 0;
    }

    .asset-pm-heading .button-primary {
        width: 100%;
    }

    .asset-pm-plan-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .asset-workspace-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .asset-workspace-toolbar .wo-toolbar-left {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .asset-workspace-toolbar .asset-status-form,
    .asset-workspace-toolbar .asset-status-picker {
        grid-column: 1 / -1;
        width: 100%;
    }

    .asset-workspace-toolbar .wo-toolbar-left > span {
        min-width: 0;
    }

    .asset-workspace-toolbar .wo-toolbar-left > .wo-quick-actions {
        width: auto;
        justify-self: end;
    }

    .asset-workspace-actions > .button-primary {
        width: 100%;
    }

    .asset-editor-section-with-action {
        flex-wrap: wrap;
    }

    .asset-editor-section-with-action > .button-ghost {
        width: 100%;
        margin-left: 49px;
    }

    .asset-submodal-backdrop {
        padding: 14px;
    }

    .asset-submodal-card {
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
    }

    .asset-inspection-modal > .modal-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding: 18px;
        align-items: start;
    }

    .asset-inspection-modal .inspection-modal-identity {
        grid-column: 1;
        grid-row: 1;
    }

    .asset-inspection-modal .inspection-asset-thumbnail {
        width: 56px;
        height: 56px;
        border-radius: 13px;
    }

    .asset-inspection-modal > .modal-header .card-label {
        margin: 0;
    }

    .asset-inspection-modal > .modal-header h2 {
        margin: 3px 0 0;
        font-size: clamp(1.28rem, 6.4vw, 1.6rem);
        line-height: 1.08;
    }

    .asset-inspection-modal .inspection-asset-meta {
        gap: 3px 7px;
        margin-top: 5px;
        font-size: 0.72rem;
    }

    .asset-inspection-modal .inspection-asset-meta span + span::before {
        margin-right: 7px;
    }

    .asset-inspection-modal .inspection-modal-header-actions {
        position: static;
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    .asset-inspection-modal .inspection-modal-close,
    .asset-inspection-modal .inspection-modal-header-actions > .inspection-print-menu {
        grid-column: 1;
    }

    .asset-inspection-modal .inspection-modal-close {
        grid-row: 1;
    }

    .asset-inspection-modal .inspection-modal-header-actions > .inspection-print-menu {
        grid-row: 2;
    }

    .asset-inspection-modal .inspection-modal-close {
        min-width: 64px;
        min-height: 42px;
        padding-inline: 12px;
    }

    .asset-inspection-modal .inspection-print-trigger {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
    }

    .asset-inspection-modal .inspection-print-trigger > span:not(.icon) {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .asset-inspection-modal .inspection-print-popover {
        width: min(232px, calc(100vw - 56px));
    }

    .asset-inspection-modal .inspection-entry-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .asset-inspection-modal .inspection-checkpoint-heading {
        margin-top: 24px;
        padding: 13px 14px;
        border-bottom: 1px solid var(--line-strong);
        border-radius: 14px;
    }

    .asset-inspection-modal .inspection-entry-table {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0;
        background: transparent;
    }

    .asset-inspection-modal .inspection-entry-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .asset-inspection-modal .inspection-entry-table tbody {
        display: grid;
        width: 100%;
        gap: 18px;
        padding-block: 2px 8px;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        width: 100%;
        padding: 16px;
        border: 1px solid var(--line-strong);
        border-left: 4px solid color-mix(in srgb, var(--accent) 66%, var(--line-strong));
        border-radius: 16px;
        background: color-mix(in srgb, var(--panel) 95%, var(--panel-soft));
        box-shadow: 0 9px 24px rgba(20, 32, 48, 0.085);
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-row:focus-within {
        border-color: color-mix(in srgb, var(--accent) 62%, var(--line-strong));
        border-left-color: var(--accent);
        box-shadow: 0 11px 28px rgba(77, 125, 25, 0.14);
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-row > td {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-row > td::before {
        content: attr(data-label);
        display: block;
        color: var(--ink-muted);
        font-size: 0.65rem;
        font-weight: 850;
        letter-spacing: 0.07em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-item {
        display: flex;
        grid-template-columns: none;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 10px !important;
        border-bottom: 1px solid var(--line) !important;
        color: var(--ink);
        font-size: 0.92rem;
        font-weight: 750;
        line-height: 1.4;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-item::before {
        display: none;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-label {
        padding-top: 3px;
    }

    .asset-inspection-modal .inspection-entry-table .inspection-entry-rating,
    .asset-inspection-modal .inspection-entry-table .inspection-entry-comments {
        padding: 11px !important;
        border: 1px solid var(--line) !important;
        border-radius: 12px;
        background: var(--panel);
    }

    .asset-inspection-modal .inspection-entry-table select,
    .asset-inspection-modal .inspection-entry-table input {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }
}

/* Part workspace and editor */
.part-workspace-card {
    width: min(1280px, 100%);
    height: min(94vh, 1020px);
    min-height: min(94vh, 1020px);
    max-height: min(94vh, 1020px);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.part-workspace-toolbar {
    padding-block: 14px;
    border-bottom: 0;
}

.part-workspace-toolbar .badge-stack {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.part-workspace-actions {
    flex-wrap: nowrap;
}

.part-workspace-tabs {
    scrollbar-width: none;
}

.part-workspace-tabs::-webkit-scrollbar {
    display: none;
}

.part-workspace-summary {
    padding-block: 7px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
}

.part-workspace-summary .wo-summary-metric {
    min-height: 60px;
}

.part-tab-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 76%, transparent);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.wo-workspace-tab.is-active .part-tab-count {
    background: rgba(62, 123, 255, 0.12);
    color: #2f63ce;
}

.part-workspace-body {
    overflow-x: hidden;
}

.part-workspace-panel > .wo-tab-panel-head {
    margin-bottom: 18px;
}

.part-workspace-card .part-overview-stock-table-preview,
.part-workspace-card .part-overview-purchasing-preview {
    display: none;
}

.part-workspace-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.part-workspace-content-grid > .card {
    min-width: 0;
}

.part-purchasing-stack {
    grid-template-columns: minmax(0, 1fr);
}

.part-purchasing-stack .data-table th {
    padding: 11px 16px;
}

.part-purchasing-stack .data-table td {
    padding: 14px 16px;
    line-height: 1.45;
}

.part-workspace-table-wrap {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.part-workspace-table-wrap .data-table {
    min-width: 720px;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.part-stock-workbench {
    margin-bottom: 18px;
}

.part-stock-workbench .section-heading {
    margin-bottom: 14px;
}

.part-issue-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.part-movement-stack {
    max-height: 330px;
    overflow-y: auto;
    padding-right: 4px;
}

.part-asset-coverage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.part-asset-coverage-card {
    min-height: 126px;
    align-content: start;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.part-asset-coverage-card:hover,
.part-asset-coverage-card:focus-visible {
    border-color: rgba(124, 190, 40, 0.48);
    box-shadow: 0 12px 28px rgba(47, 51, 73, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.part-asset-coverage-card > span:last-child {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

html.has-part-workspace,
body.has-part-workspace {
    overflow: hidden;
}

.part-workspace-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.part-workspace-thumbnail {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    padding: 6px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: #fff;
}

.part-workspace-identity .wo-workspace-head-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .part-workspace-identity {
        gap: 12px;
    }

    .part-workspace-thumbnail {
        width: 60px;
        height: 60px;
        padding: 4px;
    }
}

.part-editor-core-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.part-editor-stock-summary-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.part-editor-resource-section {
    gap: 16px;
}

.part-editor-resource-section > .part-editor-section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.part-editor-resource-section .table-wrap {
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.part-editor-resource-section .data-table {
    min-width: 720px;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.part-editor-section-with-action > div {
    flex: 1 1 auto;
}

.part-editor-section-with-action > .button-ghost {
    flex: 0 0 auto;
    margin-left: auto;
}

.part-editor-section-with-action > .part-editor-sourcing-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.part-inline-vendor {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 5%, var(--panel));
}

.part-inline-vendor[hidden] {
    display: none;
}

.part-inline-vendor-head,
.part-inline-vendor-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.part-inline-vendor-actions {
    justify-content: flex-end;
}

.editor-form .part-inline-vendor-head .button-ghost {
    min-height: 36px;
    padding: 0 12px;
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--panel);
}

.part-inline-vendor-head > div {
    display: grid;
    gap: 3px;
}

.part-inline-vendor-head span,
.part-inline-vendor-feedback {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.part-inline-vendor-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.part-inline-vendor-feedback:empty {
    display: none;
}

.part-inline-vendor-feedback.is-error {
    color: #b32626;
    font-weight: 700;
}

.part-editor-media-advanced .wo-editor-advanced-body {
    gap: 16px;
}

.part-editor-media-advanced input[type="file"] {
    width: 100%;
}

.part-editor-primary-asset-links {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 15px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-soft) 30%, var(--panel));
}

.part-editor-primary-asset-links-head {
    display: grid;
    gap: 3px;
}

.part-editor-primary-asset-links-head strong {
    color: var(--ink);
    font-size: 0.92rem;
}

.part-editor-primary-asset-links-head span {
    color: var(--ink-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.part-editor-coverage-fields {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.part-editor-coverage-fields select,
.part-editor-coverage-fields textarea {
    min-height: 190px;
}

body.theme-dark .part-workspace-summary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
}

body.theme-dark .part-workspace-table-wrap,
body.theme-dark .part-editor-resource-section .table-wrap {
    border-color: var(--line-strong);
}

@media (max-width: 1120px) {
    .part-workspace-content-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-asset-coverage-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-editor-core-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-editor-stock-summary-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .part-editor-modal > .modal-header {
        position: relative;
        display: block;
        padding-right: 112px;
    }

    .part-editor-modal > .modal-header > .button-ghost {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
    }

    .part-workspace-toolbar {
        align-items: stretch;
    }

    .part-workspace-toolbar .wo-toolbar-left,
    .part-workspace-actions {
        width: 100%;
    }

    .part-workspace-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        justify-content: flex-end;
    }

    .part-workspace-actions .button-primary,
    .part-workspace-actions .button-ghost,
    .part-workspace-actions summary {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .part-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-workspace-summary .wo-summary-metric:nth-child(2) {
        border-right: 0;
    }

    .part-workspace-toolbar .wo-toolbar-left {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .part-workspace-toolbar .badge-stack {
        min-width: 0;
    }

    .part-workspace-toolbar .wo-quick-actions {
        width: auto;
        justify-self: end;
    }

    .part-workspace-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-workspace-actions > details {
        grid-column: 1 / -1;
    }

    .part-workspace-actions .button-primary,
    .part-workspace-actions .button-ghost,
    .part-workspace-actions summary {
        width: 100%;
    }

    .part-asset-coverage-grid,
    .part-editor-core-fields,
    .part-editor-stock-summary-fields,
    .part-editor-coverage-fields,
    .part-issue-form .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-editor-form .form-span-2 {
        grid-column: 1 / -1;
    }

    .part-editor-section-with-action {
        flex-wrap: wrap;
    }

    .part-editor-section-with-action > .button-ghost {
        width: 100%;
        margin-left: 0;
    }
}

/* Public sales page: maintenance intelligence positioning */
.page-lp {
    --lp-accent-rgb: 144, 218, 50;
    --lp-accent: #90da32;
    --lp-accent-soft: #a7eb54;
    --lp-accent-deep: #4f8118;
    --lp-ink: #102238;
    --lp-ink-soft: #526274;
    --lp-dark: #11271b;
    --lp-dark-deep: #0b1b13;
    --lp-dark-blue: #12243a;
    --lp-line: rgba(16, 34, 56, 0.1);
    --lp-paper: #ffffff;
    --lp-mist: #f4f8ef;
    --lp-warm: #f8f6ef;
    background:
        radial-gradient(circle at 8% 4%, rgba(144, 218, 50, 0.11), transparent 24rem),
        linear-gradient(180deg, #ffffff 0%, #fbfcfa 100%);
    color: var(--lp-ink);
}

.page-lp *,
.page-lp *::before,
.page-lp *::after {
    box-sizing: border-box;
}

.lp-skip-link {
    position: fixed;
    z-index: 200;
    top: 10px;
    left: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #0b1b13;
    background: var(--lp-accent-soft);
    font-weight: 900;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.lp-skip-link:focus {
    transform: translateY(0);
}

.page-lp a:focus-visible,
.page-lp button:focus-visible,
.page-lp summary:focus-visible,
.page-lp input:focus-visible,
.page-lp select:focus-visible,
.page-lp textarea:focus-visible {
    outline: 3px solid #75b924;
    outline-offset: 3px;
}

.page-lp .lp-header {
    background: rgba(13, 29, 20, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(7, 18, 12, 0.2);
}

.page-lp .lp-nav-shell {
    min-height: 82px;
}

.page-lp .lp-brand .brand-logo {
    height: 68px;
    margin: 4px 0;
}

.page-lp .lp-nav {
    gap: 22px;
}

.page-lp .lp-nav a {
    position: relative;
    color: rgba(245, 249, 246, 0.83);
    font-size: 0.92rem;
}

.page-lp .lp-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    border-radius: 99px;
    background: var(--lp-accent);
    transform: scaleX(0);
    transition: transform 160ms ease;
}

.page-lp .lp-nav a:hover::after {
    transform: scaleX(1);
}

.page-lp .lp-link-login {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(245, 249, 246, 0.86);
    font-size: 0.92rem;
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.page-lp .lp-link-login:hover {
    border-color: rgba(152, 224, 57, 0.55);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.page-lp .lp-button {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 850;
}

.page-lp .lp-button-large {
    min-height: 54px;
    padding-inline: 22px;
}

.page-lp .lp-button-primary {
    color: #13240c;
    background: linear-gradient(180deg, var(--lp-accent-soft) 0%, var(--lp-accent) 100%);
    border-color: #8bd12f;
    box-shadow: 0 16px 34px rgba(144, 218, 50, 0.24);
}

.page-lp .lp-button-primary:hover {
    color: #0e1c08;
    background: linear-gradient(180deg, #b6f36b 0%, #98e039 100%);
    border-color: #98e039;
}

.page-lp .lp-button-outline {
    color: var(--lp-ink);
    border-color: rgba(16, 34, 56, 0.16);
    box-shadow: 0 12px 28px rgba(16, 34, 56, 0.06);
}

.page-lp .lp-main {
    padding: 42px 0 84px;
}

.page-lp .lp-hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(430px, 0.98fr);
    gap: 58px;
    min-height: 650px;
    padding: 28px 0 38px;
}

.page-lp .lp-hero-copy {
    gap: 20px;
    max-width: 690px;
}

.page-lp .lp-kicker,
.page-lp .lp-kicker-dark,
.page-lp .lp-kicker-light,
.page-lp .lp-card-kicker,
.lp-command-eyebrow {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    line-height: 1.45;
    text-transform: uppercase;
}

.page-lp .lp-kicker,
.page-lp .lp-kicker-dark {
    color: #487318;
}

.page-lp .lp-kicker-light {
    color: #a6e85a;
}

.page-lp .lp-hero h1 {
    max-width: 13ch;
    color: #0d2136;
    font-size: clamp(3.1rem, 5.25vw, 5.4rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.page-lp .lp-hero-lead {
    max-width: 65ch;
    color: #4f6071;
    font-size: clamp(1.06rem, 1.4vw, 1.2rem);
    line-height: 1.7;
}

.page-lp .lp-hero-lead strong {
    color: var(--lp-ink);
}

.page-lp .lp-hero-points {
    gap: 11px;
}

.page-lp .lp-hero-points li {
    padding-left: 27px;
    color: #23384c;
    font-size: 0.98rem;
    line-height: 1.55;
}

.page-lp .lp-hero-points li::before {
    top: 0.42rem;
    width: 10px;
    height: 10px;
    background: var(--lp-accent);
    box-shadow: 0 0 0 5px rgba(144, 218, 50, 0.14);
}

.page-lp .lp-hero-actions {
    flex-wrap: wrap;
    gap: 12px;
}

.page-lp .lp-hero-support-note {
    max-width: 64ch;
    color: #617080;
    font-size: 0.9rem;
}

.page-lp .lp-hero-support-note strong {
    color: #365415;
}

.lp-command-center {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 590px;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background:
        radial-gradient(circle at 88% 4%, rgba(144, 218, 50, 0.18), transparent 17rem),
        linear-gradient(155deg, #132b1d 0%, #0d2016 62%, #10293a 100%);
    box-shadow: 0 34px 70px rgba(10, 28, 19, 0.25);
    color: #f6faf7;
    transform: none;
}

.lp-command-center::after {
    content: "";
    position: absolute;
    inset: auto -70px -90px auto;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(144, 218, 50, 0.16);
    border-radius: 50%;
}

.lp-command-topbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lp-command-topbar > div {
    display: grid;
    gap: 4px;
}

.lp-command-eyebrow {
    color: rgba(233, 243, 235, 0.58);
}

.lp-command-topbar strong {
    font-size: 1.08rem;
}

.lp-sample-badge,
.lp-health-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.lp-sample-badge {
    color: rgba(246, 250, 247, 0.76);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lp-command-body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
    padding: 26px;
}

.lp-score-summary {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}

.lp-score-ring {
    position: relative;
    display: grid;
    width: 154px;
    height: 154px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--lp-accent) 0 83%, rgba(255, 255, 255, 0.1) 83% 100%);
}

.lp-score-ring::after {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: #10271a;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

.lp-score-ring span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    gap: 3px;
}

.lp-score-ring strong {
    color: #ffffff;
    font-size: 3.25rem;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.lp-score-ring small {
    color: rgba(240, 247, 242, 0.58);
    font-size: 0.9rem;
}

.lp-score-copy {
    display: grid;
    gap: 9px;
}

.lp-health-state {
    width: max-content;
    color: #173209;
    background: var(--lp-accent-soft);
}

.lp-score-copy > strong {
    font-size: 1.28rem;
    line-height: 1.25;
}

.lp-score-copy p {
    margin: 0;
    color: rgba(236, 244, 238, 0.67);
    line-height: 1.58;
}

.lp-signal-list {
    display: grid;
    gap: 14px;
    padding: 19px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lp-signal-row {
    display: grid;
    gap: 7px;
}

.lp-signal-row > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(240, 247, 242, 0.76);
    font-size: 0.86rem;
}

.lp-signal-row > div strong {
    color: #ffffff;
}

.lp-signal-track {
    overflow: hidden;
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
}

.lp-signal-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--lp-accent);
}

.lp-signal-track i.is-watch {
    background: #efbd45;
}

.lp-command-alerts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lp-command-alerts article {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    border-radius: 17px;
    color: var(--lp-ink);
    background: rgba(255, 255, 255, 0.94);
}

.lp-command-alerts span {
    color: #6b7783;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.lp-command-alerts strong {
    font-size: 0.94rem;
    line-height: 1.35;
}

.lp-buyer-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 4px 0 0;
    border: 1px solid #dfe7d8;
    border-radius: 22px;
    background: var(--lp-mist);
}

.lp-buyer-strip > div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 18px 22px;
    border-right: 1px solid #dfe7d8;
}

.lp-buyer-strip > div:last-child {
    border-right: 0;
}

.lp-buyer-strip span {
    color: #70806d;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lp-buyer-strip strong {
    color: #1b3423;
    font-size: 0.94rem;
}

.lp-positioning {
    display: grid;
    justify-items: center;
    gap: 13px;
    max-width: 990px;
    margin: 88px auto 12px;
    text-align: center;
}

.lp-positioning > p {
    margin: 0;
    color: #617080;
    font-size: 1.05rem;
}

.lp-positioning h2 {
    max-width: 19ch;
    margin: 0;
    color: var(--lp-ink);
    font-size: clamp(2.45rem, 4.5vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.lp-positioning-outcomes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-top: 7px;
}

.lp-positioning-outcomes span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dce5d5;
    border-radius: 999px;
    color: #375327;
    background: #f7fbf3;
    font-size: 0.85rem;
    font-weight: 800;
}

.page-lp .lp-section {
    padding-top: 92px;
    scroll-margin-top: 96px;
}

.page-lp .lp-section-head {
    gap: 14px;
    margin-bottom: 34px;
}

.page-lp .lp-section-head-wide {
    max-width: 920px;
}

.page-lp .lp-section-head h2,
.page-lp .lp-pricing-copy h2,
.page-lp .lp-contact-copy h2 {
    color: var(--lp-ink);
    font-size: clamp(2.35rem, 4vw, 4.15rem);
    line-height: 1;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.page-lp .lp-section-head p:last-child,
.page-lp .lp-pricing-copy > p:last-of-type {
    max-width: 76ch;
    color: #5c6c7c;
    font-size: 1.02rem;
    line-height: 1.75;
}

.lp-intelligence-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lp-intelligence-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--lp-line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(16, 34, 56, 0.07);
}

.lp-intelligence-card.is-featured {
    color: #f5faf6;
    background:
        radial-gradient(circle at 90% 8%, rgba(144, 218, 50, 0.2), transparent 14rem),
        linear-gradient(150deg, #173222 0%, #0e2317 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 56px rgba(12, 30, 20, 0.18);
}

.lp-intelligence-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lp-card-number {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #35591b;
    background: #eef8e5;
    font-size: 0.78rem;
    font-weight: 950;
}

.lp-intelligence-card.is-featured .lp-card-number {
    color: #18340b;
    background: var(--lp-accent-soft);
}

.lp-intelligence-card .lp-card-kicker {
    color: #5d741f;
    text-align: right;
}

.lp-intelligence-card.is-featured .lp-card-kicker {
    color: #a7e95c;
}

.lp-intelligence-card h3 {
    margin: 0;
    color: var(--lp-ink);
    font-size: clamp(1.45rem, 2vw, 1.82rem);
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.lp-intelligence-card > p {
    margin: 0;
    color: #5c6b79;
    line-height: 1.7;
}

.lp-intelligence-card.is-featured h3 {
    color: #ffffff;
}

.lp-intelligence-card.is-featured > p {
    color: rgba(239, 247, 241, 0.72);
}

.lp-intelligence-metric {
    display: flex;
    align-items: end;
    gap: 12px;
    padding: 17px 0;
    border-top: 1px solid rgba(16, 34, 56, 0.1);
    border-bottom: 1px solid rgba(16, 34, 56, 0.1);
}

.lp-intelligence-card.is-featured .lp-intelligence-metric {
    border-color: rgba(255, 255, 255, 0.12);
}

.lp-intelligence-metric strong {
    color: #315d15;
    font-size: 2.5rem;
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.lp-intelligence-card.is-featured .lp-intelligence-metric strong {
    color: var(--lp-accent-soft);
}

.lp-intelligence-metric span {
    max-width: 15ch;
    color: #657383;
    font-size: 0.8rem;
    line-height: 1.35;
}

.lp-intelligence-card.is-featured .lp-intelligence-metric span {
    color: rgba(240, 247, 242, 0.65);
}

.lp-intelligence-card .lp-check-list {
    gap: 9px;
}

.lp-intelligence-card .lp-check-list li {
    color: #34485a;
    font-size: 0.9rem;
}

.lp-intelligence-card.is-featured .lp-check-list li {
    color: rgba(244, 249, 245, 0.82);
}

.page-lp .lp-check-list li::before {
    content: "";
    top: 0.58rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lp-accent);
}

.lp-workflow-section {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
    gap: 42px;
    margin-top: 96px;
    padding: 54px !important;
    border-radius: 34px;
    background:
        radial-gradient(circle at 98% 8%, rgba(144, 218, 50, 0.18), transparent 25rem),
        linear-gradient(145deg, #10261a 0%, #0c1f15 52%, #11273c 100%);
    box-shadow: 0 28px 66px rgba(10, 26, 17, 0.19);
}

.lp-workflow-intro {
    display: grid;
    align-content: center;
    gap: 17px;
}

.lp-workflow-intro h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.15rem, 3.3vw, 3.55rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.lp-workflow-intro > p:not(.lp-kicker-light) {
    margin: 0;
    color: rgba(236, 244, 238, 0.7);
    line-height: 1.72;
}

.lp-text-link-light {
    width: max-content;
    color: #b4ee70;
    font-weight: 900;
    text-decoration: none;
}

.lp-text-link-light:hover {
    color: #ffffff;
    text-decoration: none;
}

.lp-action-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lp-action-step {
    position: relative;
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
}

.lp-step-index {
    position: absolute;
    top: 16px;
    right: 18px;
    color: rgba(255, 255, 255, 0.18);
    font-size: 1.45rem;
    font-weight: 950;
}

.lp-action-step .lp-card-kicker {
    color: #a4e45b;
}

.lp-action-step h3 {
    max-width: calc(100% - 42px);
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
}

.lp-action-step > p:last-child {
    margin: 0;
    color: rgba(236, 244, 238, 0.68);
    font-size: 0.9rem;
    line-height: 1.6;
}

.lp-platform-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.lp-platform-card {
    display: grid;
    align-content: start;
    gap: 13px;
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--lp-line);
    border-radius: 22px;
    background: #ffffff;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.lp-platform-card:hover {
    border-color: rgba(108, 169, 20, 0.28);
    box-shadow: 0 20px 42px rgba(16, 34, 56, 0.08);
    transform: translateY(-2px);
}

.lp-platform-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lp-feature-token {
    display: inline-grid;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    place-items: center;
    border-radius: 12px;
    color: #244711;
    background: linear-gradient(150deg, #e8f6db 0%, #f4faef 100%);
    border: 1px solid #d6e9c3;
    font-size: 0.76rem;
    font-weight: 950;
    letter-spacing: 0.05em;
}

.lp-feature-tag {
    color: #69805c;
    font-size: 0.7rem;
    font-weight: 850;
    text-align: right;
}

.lp-platform-card h3 {
    margin: 0;
    color: var(--lp-ink);
    font-size: 1.2rem;
    line-height: 1.25;
}

.lp-platform-card p {
    margin: 0;
    color: #5c6d7d;
    font-size: 0.92rem;
    line-height: 1.65;
}

.lp-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.lp-role-card {
    display: grid;
    align-content: start;
    gap: 17px;
    min-width: 0;
    padding: 34px;
    border-radius: 28px;
    color: #f4f9f5;
    background:
        radial-gradient(circle at 92% 7%, rgba(144, 218, 50, 0.2), transparent 16rem),
        linear-gradient(145deg, #142d1f 0%, #0f2418 100%);
    box-shadow: 0 22px 48px rgba(12, 30, 20, 0.13);
}

.lp-role-card.is-ci {
    color: var(--lp-ink);
    background:
        radial-gradient(circle at 92% 7%, rgba(144, 218, 50, 0.18), transparent 16rem),
        linear-gradient(145deg, #f4f8ed 0%, #ffffff 100%);
    border: 1px solid #dfe8d7;
    box-shadow: 0 20px 46px rgba(16, 34, 56, 0.07);
}

.lp-role-card.is-floor {
    background:
        radial-gradient(circle at 92% 7%, rgba(144, 218, 50, 0.15), transparent 16rem),
        linear-gradient(145deg, #152d44 0%, #102437 100%);
    box-shadow: 0 22px 48px rgba(12, 29, 45, 0.14);
}

.lp-role-card h3 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.7rem, 2.5vw, 2.3rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.lp-role-card > p:not([class]) {
    margin: 0;
    color: rgba(239, 247, 241, 0.72);
    line-height: 1.7;
}

.lp-role-card.is-ci > p:not([class]) {
    color: #5c6d7c;
}

.lp-role-card .lp-check-list {
    gap: 10px;
}

.lp-role-card .lp-check-list li {
    color: rgba(247, 251, 248, 0.86);
}

.lp-role-card.is-ci .lp-check-list li {
    color: #344a5c;
}

.lp-request-band {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 42px;
    align-items: center;
    margin-top: 92px;
    padding: 42px 46px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 96% 20%, rgba(144, 218, 50, 0.17), transparent 18rem),
        linear-gradient(130deg, #13273d 0%, #10271b 100%);
    box-shadow: 0 24px 54px rgba(13, 31, 44, 0.15);
}

.lp-request-band h2 {
    max-width: 22ch;
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(1.9rem, 3vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.lp-request-band-points {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.lp-request-band-points span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(247, 251, 248, 0.86);
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.83rem;
    font-weight: 800;
}

.page-lp .lp-pricing-section {
    padding-top: 110px;
}

.page-lp .lp-pricing-layout {
    grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
    gap: 30px;
}

.page-lp .lp-pricing-copy {
    top: 112px;
}

.page-lp .lp-pricing-note {
    margin-top: 28px;
    background: #f2f8eb;
    border-color: #dce9cf;
}

.page-lp .lp-pricing-note span {
    line-height: 1.65;
}

.page-lp .lp-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.page-lp .lp-pricing-card {
    border-radius: 23px;
    box-shadow: 0 17px 40px rgba(16, 34, 56, 0.07);
}

.page-lp .lp-pricing-card.is-featured {
    border-color: #86ca33;
    box-shadow: 0 22px 50px rgba(113, 172, 32, 0.16);
}

.page-lp .lp-pricing-badge {
    color: #17320c;
    background: #a9eb5c;
}

.page-lp .lp-plan-meta span {
    background: #f2f7ed;
    border-color: #dce6d3;
}

.page-lp .lp-pricing-card .lp-check-list li {
    font-size: 0.88rem;
}

.page-lp .lp-faq-layout {
    grid-template-columns: minmax(270px, 0.38fr) minmax(0, 0.62fr);
    gap: 48px;
    align-items: start;
}

.page-lp .lp-faq-grid {
    gap: 10px;
}

.page-lp .lp-faq-card {
    display: block;
    padding: 0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 13px 34px rgba(16, 34, 56, 0.055);
}

.page-lp .lp-faq-card:hover {
    transform: none;
}

.lp-faq-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 70px;
    padding: 18px 20px;
    color: var(--lp-ink);
    cursor: pointer;
    font-weight: 850;
    list-style: none;
}

.lp-faq-card summary::-webkit-details-marker {
    display: none;
}

.lp-faq-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #315b19;
    background: #edf6e5;
    transition: transform 160ms ease;
}

.lp-faq-card[open] .lp-faq-icon {
    transform: rotate(45deg);
}

.page-lp .lp-faq-card p {
    padding: 0 20px 21px;
    color: #5b6b7a;
    line-height: 1.72;
}

.page-lp .lp-contact-section {
    margin-top: 100px;
    padding: 56px !important;
    border-radius: 34px;
    background:
        radial-gradient(circle at 4% 92%, rgba(144, 218, 50, 0.15), transparent 24rem),
        linear-gradient(145deg, #10261a 0%, #0c1e14 52%, #10273a 100%);
    box-shadow: 0 28px 66px rgba(10, 26, 17, 0.19);
}

.page-lp .lp-contact-layout {
    grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
    gap: 50px;
    align-items: start;
}

.lp-contact-copy {
    display: grid;
    align-content: center;
    gap: 17px;
    min-height: 100%;
}

.page-lp .lp-contact-copy h2 {
    margin: 0;
    color: #ffffff;
}

.lp-contact-copy > p:not(.lp-kicker-light):not(.lp-contact-direct) {
    margin: 0;
    color: rgba(237, 245, 239, 0.72);
    line-height: 1.72;
}

.lp-contact-proof {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 4px 0 0;
    list-style: none;
}

.lp-contact-proof li {
    position: relative;
    padding-left: 25px;
    color: rgba(247, 251, 248, 0.88);
    line-height: 1.55;
}

.lp-contact-proof li::before {
    content: "";
    position: absolute;
    top: 0.52rem;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--lp-accent);
    box-shadow: 0 0 0 4px rgba(144, 218, 50, 0.13);
}

.lp-contact-direct {
    margin: 8px 0 0;
    color: rgba(237, 245, 239, 0.66);
}

.lp-contact-direct a {
    color: #b3ef6e;
    font-weight: 850;
}

.page-lp .lp-contact-card {
    padding: 30px;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.16);
}

.page-lp .lp-contact-card h3 {
    font-size: 1.65rem;
    letter-spacing: -0.025em;
}

.page-lp .lp-contact-form label > span {
    color: #3f5264;
}

.page-lp .lp-contact-form input,
.page-lp .lp-contact-form select,
.page-lp .lp-contact-form textarea {
    border-color: #d9e1e7;
    background: #fbfcfd;
}

.page-lp .lp-contact-form input:focus,
.page-lp .lp-contact-form select:focus,
.page-lp .lp-contact-form textarea:focus {
    border-color: #82c62e;
    box-shadow: 0 0 0 4px rgba(144, 218, 50, 0.13);
}

.page-lp .lp-contact-captcha {
    background: #f1f6ed;
    border-color: #d9e6ce;
}

.page-lp .lp-footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 28px;
    padding: 30px 0 44px;
    border-top: 1px solid rgba(16, 34, 56, 0.1);
}

.lp-footer-brand {
    display: grid;
    gap: 2px;
}

.lp-footer-brand strong {
    color: var(--lp-ink);
}

.lp-footer-brand span,
.lp-footer-copy {
    color: #6a7988;
    font-size: 0.82rem;
}

.page-lp .lp-footer-links {
    justify-content: center;
    flex-wrap: wrap;
}

.page-lp .lp-footer-links a {
    color: #3a5064;
    font-size: 0.86rem;
}

.lp-footer-copy {
    margin: 0;
    text-align: right;
}

@media (max-width: 1180px) {
    .page-lp .lp-hero {
        grid-template-columns: minmax(0, 1fr) minmax(390px, 0.92fr);
        gap: 36px;
    }

    .page-lp .lp-hero h1 {
        font-size: clamp(3rem, 6vw, 4.7rem);
    }

    .lp-intelligence-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lp-intelligence-card.is-featured {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }

    .lp-intelligence-card.is-featured .lp-intelligence-card-head,
    .lp-intelligence-card.is-featured h3,
    .lp-intelligence-card.is-featured > p {
        grid-column: 1;
    }

    .lp-intelligence-card.is-featured .lp-intelligence-metric,
    .lp-intelligence-card.is-featured .lp-check-list {
        grid-column: 2;
    }

    .lp-intelligence-card.is-featured .lp-intelligence-metric {
        grid-row: 1 / span 2;
        align-self: end;
    }

    .lp-intelligence-card.is-featured .lp-check-list {
        grid-row: 3 / span 2;
    }

    .lp-platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-lp .lp-pricing-layout,
    .page-lp .lp-faq-layout,
    .page-lp .lp-contact-layout {
        grid-template-columns: 1fr;
    }

    .page-lp .lp-pricing-copy {
        position: static;
        max-width: 880px;
    }

    .page-lp .lp-contact-copy {
        max-width: 760px;
    }
}

@media (max-width: 960px) {
    .page-lp .lp-nav-shell {
        flex-wrap: wrap;
        padding: 10px 0 13px;
    }

    .page-lp .lp-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
    }

    .page-lp .lp-nav a {
        white-space: nowrap;
    }

    .page-lp .lp-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 42px;
    }

    .page-lp .lp-hero-copy {
        max-width: 820px;
    }

    .page-lp .lp-hero h1 {
        max-width: 14ch;
    }

    .lp-command-center {
        max-width: 760px;
        margin: 10px auto 0;
        transform: none;
    }

    .lp-buyer-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lp-buyer-strip > div:nth-child(2) {
        border-right: 0;
    }

    .lp-buyer-strip > div:nth-child(-n + 2) {
        border-bottom: 1px solid #dfe7d8;
    }

    .lp-workflow-section {
        grid-template-columns: 1fr;
        padding: 42px !important;
    }

    .lp-request-band {
        grid-template-columns: 1fr;
    }

    .lp-role-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .page-lp .lp-nav-shell,
    .page-lp .lp-main,
    .page-lp .lp-footer {
        width: min(100% - 24px, 1240px);
    }

    .page-lp .lp-nav-shell {
        min-height: 72px;
        flex-wrap: nowrap;
        padding: 8px 0;
    }

    .page-lp .lp-brand .brand-logo {
        height: 56px;
    }

    .page-lp .lp-nav {
        display: none;
    }

    .page-lp .lp-nav-actions {
        flex-direction: row;
        align-items: center;
        gap: 7px;
    }

    .page-lp .lp-link-login {
        min-height: 40px;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    .page-lp .lp-nav-actions .lp-button {
        width: auto;
        min-height: 42px;
        padding: 0 13px;
        font-size: 0.82rem;
    }

    .page-lp .lp-main {
        padding-top: 20px;
    }

    .page-lp .lp-hero {
        gap: 32px;
        padding-top: 26px;
    }

    .page-lp .lp-hero h1 {
        font-size: clamp(2.65rem, 13vw, 4rem);
        line-height: 0.98;
    }

    .page-lp .lp-hero-lead {
        font-size: 1rem;
    }

    .page-lp .lp-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-lp .lp-hero-actions .lp-button {
        width: 100%;
    }

    .lp-command-topbar,
    .lp-command-body {
        padding: 18px;
    }

    .lp-command-center {
        border-radius: 23px;
    }

    .lp-score-summary {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 15px;
    }

    .lp-score-ring {
        width: 112px;
        height: 112px;
    }

    .lp-score-ring::after {
        inset: 10px;
    }

    .lp-score-ring strong {
        font-size: 2.4rem;
    }

    .lp-score-copy > strong {
        font-size: 1.02rem;
    }

    .lp-score-copy p {
        font-size: 0.82rem;
    }

    .lp-command-alerts,
    .lp-buyer-strip,
    .lp-intelligence-grid,
    .lp-action-flow,
    .lp-platform-grid,
    .page-lp .lp-pricing-grid {
        grid-template-columns: 1fr;
    }

    .lp-buyer-strip > div,
    .lp-buyer-strip > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #dfe7d8;
    }

    .lp-buyer-strip > div:last-child {
        border-bottom: 0;
    }

    .lp-positioning {
        margin-top: 66px;
    }

    .lp-positioning h2 {
        font-size: clamp(2.25rem, 10.5vw, 3.5rem);
    }

    .page-lp .lp-section {
        padding-top: 72px;
        scroll-margin-top: 82px;
    }

    .page-lp .lp-section-head h2,
    .page-lp .lp-pricing-copy h2,
    .page-lp .lp-contact-copy h2 {
        font-size: clamp(2.2rem, 10vw, 3.3rem);
    }

    .lp-intelligence-card,
    .lp-intelligence-card.is-featured {
        display: grid;
        grid-template-columns: 1fr;
        grid-column: auto;
        padding: 22px;
    }

    .lp-intelligence-card.is-featured .lp-intelligence-card-head,
    .lp-intelligence-card.is-featured h3,
    .lp-intelligence-card.is-featured > p,
    .lp-intelligence-card.is-featured .lp-intelligence-metric,
    .lp-intelligence-card.is-featured .lp-check-list {
        grid-column: auto;
        grid-row: auto;
    }

    .lp-workflow-section,
    .page-lp .lp-contact-section {
        margin-right: -4px;
        margin-left: -4px;
        padding: 28px 20px !important;
        border-radius: 25px;
    }

    .lp-request-band {
        gap: 27px;
        padding: 30px 22px;
        border-radius: 24px;
    }

    .lp-role-card {
        padding: 25px 22px;
        border-radius: 23px;
    }

    .page-lp .lp-pricing-section {
        padding-top: 82px;
    }

    .page-lp .lp-pricing-card,
    .page-lp .lp-faq-card,
    .page-lp .lp-contact-card {
        padding: 20px;
        border-radius: 20px;
    }

    .page-lp .lp-faq-card {
        padding: 0;
    }

    .page-lp .lp-contact-card {
        padding: 20px;
    }

    .page-lp .lp-contact-form {
        grid-template-columns: 1fr;
    }

    .page-lp .lp-contact-form-full,
    .page-lp .lp-contact-actions {
        grid-column: auto;
    }

    .page-lp .lp-contact-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .page-lp .lp-footer {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 18px;
    }

    .page-lp .lp-footer-links {
        justify-content: flex-start;
    }

    .lp-footer-copy {
        text-align: left;
    }
}

@media (max-width: 420px) {
    .page-lp .lp-nav-shell {
        gap: clamp(6px, 2vw, 10px);
    }

    .page-lp .lp-brand .brand-logo {
        height: clamp(40px, 12.5vw, 49px);
    }

    .page-lp .lp-link-login {
        min-height: 38px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .page-lp .lp-nav-actions {
        gap: 5px;
    }

    .page-lp .lp-nav-actions .lp-button {
        min-height: 40px;
        padding-inline: 10px;
        font-size: 0.76rem;
        white-space: nowrap;
    }

    .lp-command-topbar {
        align-items: flex-start;
    }

    .lp-sample-badge {
        min-height: 28px;
        padding: 0 9px;
        font-size: 0.62rem;
    }

    .lp-score-summary {
        grid-template-columns: 1fr;
    }

    .lp-score-ring {
        width: 126px;
        height: 126px;
        margin: 0 auto;
    }
}

@media (max-width: 340px) {
    .page-lp .lp-nav-shell {
        gap: 5px;
    }

    .page-lp .lp-brand .brand-logo {
        height: 36px;
    }

    .page-lp .lp-nav-actions {
        gap: 4px;
    }

    .page-lp .lp-link-login {
        padding-inline: 6px;
        font-size: 0.68rem;
    }

    .page-lp .lp-nav-actions .lp-button {
        padding-inline: 8px;
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-lp {
        scroll-behavior: auto;
    }

    .page-lp *,
    .page-lp *::before,
    .page-lp *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Location record workspace and editor */
.location-record-workspace-card {
    width: min(1240px, 100%);
    height: min(94vh, 1020px);
    min-height: min(94vh, 1020px);
    max-height: min(94vh, 1020px);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.location-workspace-toolbar {
    padding-block: 14px;
    border-bottom: 0;
}

.location-status-picker {
    min-width: 196px;
    padding-right: 14px;
    cursor: default;
}

.location-status-picker::after {
    display: none;
}

.location-status-picker .status-inline {
    gap: 10px;
    color: var(--ink);
    font-size: 0.94rem;
    font-weight: 750;
}

.location-workspace-actions {
    flex-wrap: nowrap;
}

.location-workspace-tabs {
    scrollbar-width: none;
}

.location-workspace-tabs::-webkit-scrollbar {
    display: none;
}

.location-record-workspace-summary {
    padding-block: 7px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
}

.location-record-workspace-summary .wo-summary-metric {
    min-height: 60px;
}

.location-tab-count {
    display: inline-grid;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 76%, transparent);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.wo-workspace-tab.is-active .location-tab-count {
    background: rgba(62, 123, 255, 0.12);
    color: #2f63ce;
}

.location-workspace-body {
    overflow-x: hidden;
}

.location-workspace-panel > .wo-tab-panel-head {
    margin-bottom: 18px;
}

.location-overview-grid {
    grid-template-columns: minmax(300px, 1.12fr) repeat(2, minmax(220px, 0.88fr));
    align-items: stretch;
}

.location-overview-grid > :first-child {
    grid-row: 1 / span 2;
}

.location-description-card {
    grid-column: 2 / -1;
}

.location-hierarchy-grid,
.location-contents-grid,
.location-labels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.location-hierarchy-grid {
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
}

.location-hierarchy-grid > .stack-item,
.location-contents-grid > .stack-item {
    min-height: 240px;
}

.location-nested-map-card {
    min-width: 0;
}

.location-nested-map-card .tree-mini-map {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 5px;
    overscroll-behavior: contain;
}

.location-content-card {
    display: grid;
    align-content: start;
    gap: 14px;
}

.location-content-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.location-content-card-head h3 {
    margin: 0;
}

.location-content-card-head > span {
    display: inline-grid;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    place-items: center;
    border-radius: 999px;
    background: rgba(124, 190, 40, 0.13);
    color: #4d7f14;
    font-size: 0.78rem;
    font-weight: 850;
}

.location-content-list {
    display: grid;
    gap: 9px;
}

.location-content-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 94%, var(--panel-soft));
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.location-content-list > a:hover,
.location-content-list > a:focus-visible {
    border-color: rgba(124, 190, 40, 0.48);
    background: color-mix(in srgb, var(--panel) 90%, var(--accent-soft));
    transform: translateY(-1px);
    text-decoration: none;
}

.location-content-list > a > span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.location-content-list strong,
.location-content-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-content-list small {
    color: var(--ink-muted);
    font-size: 0.76rem;
}

.location-content-list em {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.location-label-card {
    display: flex;
    min-height: 400px;
    padding: 20px;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(47, 51, 73, 0.055);
}

.location-label-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.location-label-card-heading > div > span {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.location-label-card-heading h3 {
    margin: 4px 0 0;
}

.location-label-card-heading > strong {
    display: inline-flex;
    min-height: 30px;
    padding: 0 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.location-label-preview {
    display: grid;
    min-height: 230px;
    padding: 18px;
    flex: 1 1 auto;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.location-label-preview img {
    width: min(100%, 520px);
    max-height: 260px;
    object-fit: contain;
}

.location-label-preview p {
    max-width: 28ch;
    margin: 0;
    color: var(--ink-soft);
    text-align: center;
}

.location-label-actions {
    margin-top: auto;
}

html.has-location-record-workspace,
body.has-location-record-workspace {
    overflow: hidden;
}

.location-editor-core-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.location-editor-address-fields,
.location-editor-context-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.location-editor-description textarea {
    min-height: 188px;
}

body.theme-dark .location-record-workspace-summary {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.025);
}

body.theme-dark .location-label-card,
body.theme-dark .location-content-list > a {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.035);
}

body.theme-dark .location-label-card-heading > strong {
    border-color: var(--line-strong);
}

body.theme-dark .location-content-card-head > span {
    background: rgba(124, 190, 40, 0.13);
    color: #c7e99f;
}

@media (max-width: 1040px) {
    .location-editor-modal > .modal-header {
        position: relative;
        display: block;
        padding-right: 112px;
    }

    .location-editor-modal > .modal-header > .button-ghost {
        position: absolute;
        top: 20px;
        right: var(--modal-card-padding);
    }

    .location-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .location-overview-grid > :first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .location-description-card {
        grid-column: 1 / -1;
    }

    .location-workspace-toolbar {
        align-items: stretch;
    }

    .location-workspace-toolbar .wo-toolbar-left,
    .location-workspace-actions {
        width: 100%;
    }

    .location-workspace-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 760px) {
    .location-record-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .location-record-workspace-summary .wo-summary-metric:nth-child(2) {
        border-right: 0;
    }

    .location-overview-grid,
    .location-hierarchy-grid,
    .location-contents-grid,
    .location-labels-grid,
    .location-editor-core-fields,
    .location-editor-address-fields,
    .location-editor-context-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-description-card {
        grid-column: auto;
    }

    .location-workspace-toolbar .wo-toolbar-left {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    .location-status-picker {
        grid-column: 1 / -1;
        width: 100%;
    }

    .location-workspace-toolbar .wo-quick-actions {
        width: auto;
        justify-self: end;
    }

    .location-workspace-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .location-workspace-actions .button-primary,
    .location-workspace-actions .button-ghost,
    .location-workspace-actions summary {
        width: 100%;
    }
}

/* Purchasing specificity guards: keep the audited layout authoritative over shared modal defaults. */
.wo-editor-modal.purchase-order-editor-modal {
    width: min(1520px, 100%);
}

.purchase-order-editor-form .wo-editor-fields.purchase-order-editor-core-fields {
    grid-template-columns: minmax(0, 1.7fr) minmax(210px, 0.72fr) minmax(250px, 0.9fr) minmax(210px, 0.72fr);
}

.po-upload-workbench .po-file-upload-row {
    flex-wrap: nowrap;
}

@media (max-width: 1500px) {
    .purchase-order-editor-form .wo-editor-fields.purchase-order-editor-core-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .purchase-order-editor-form .wo-editor-fields.purchase-order-editor-core-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .po-upload-workbench .po-file-upload-row {
        flex-wrap: wrap;
    }
}

html:has(.purchase-order-editor-modal),
body:has(.purchase-order-editor-modal) {
    overflow: hidden;
}

.purchase-order-editor-form .wo-editor-scroll {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink-muted) 58%, transparent) transparent;
}

.purchase-order-editor-form .wo-editor-scroll::-webkit-scrollbar {
    width: 10px;
}

.purchase-order-editor-form .wo-editor-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.purchase-order-editor-form .wo-editor-scroll::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink-muted) 56%, transparent);
    background-clip: padding-box;
}

/* Shared administrative record workspaces: vendors, knowledge, ideas, users, and teams. */
.admin-record-workspace-backdrop {
    padding: 20px 20px 20px calc(var(--sidebar-rail-width, 224px) + 20px);
}

.admin-record-workspace {
    width: min(1240px, 100%);
    height: min(92dvh, 940px);
    min-height: 0;
    max-height: min(92dvh, 940px);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.admin-record-workspace .wo-workspace-head {
    padding-top: 22px;
    padding-bottom: 17px;
}

.admin-record-workspace-toolbar {
    min-height: 70px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.admin-record-workspace-toolbar .wo-toolbar-left {
    width: 100%;
}

.admin-record-workspace-toolbar .wo-quick-actions {
    margin-left: auto;
}

.admin-record-workspace-summary {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.admin-record-workspace-summary .wo-summary-stat {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 68px;
    padding: 12px 18px 14px;
    border-right: 1px solid rgba(201, 210, 223, 0.72);
}

.admin-record-workspace-summary .wo-summary-stat:last-child {
    border-right: 0;
}

.admin-record-workspace-summary .wo-summary-stat span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.admin-record-workspace-summary .wo-summary-stat strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-record-workspace .wo-workspace-tabs {
    min-height: 58px;
}

.admin-record-workspace .wo-workspace-tab {
    gap: 8px;
}

.admin-record-workspace .wo-workspace-tab-count {
    min-width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 58%, transparent);
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.admin-record-workspace .wo-workspace-tab.is-active .wo-workspace-tab-count {
    background: rgba(62, 123, 255, 0.12);
    color: #2e63d4;
}

.admin-record-workspace .wo-workspace-body {
    min-height: 0;
    height: auto;
    padding: 20px 24px 26px;
}

.admin-record-overview-grid,
.admin-access-grid,
.knowledge-guidance-grid,
.idea-workspace-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.admin-record-overview-grid-compact,
.idea-workspace-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-guidance-grid {
    grid-template-columns: minmax(240px, 7fr) minmax(0, 13fr);
}

.admin-record-overview-grid > *,
.admin-access-grid > *,
.knowledge-guidance-grid > *,
.idea-workspace-overview > * {
    min-width: 0;
    margin: 0;
}

.admin-record-notes-card p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.knowledge-rich-text {
    min-width: 0;
    max-width: 100%;
    color: var(--ink-soft);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.knowledge-rich-text > :first-child {
    margin-top: 0;
}

.knowledge-rich-text > :last-child {
    margin-bottom: 0;
}

.knowledge-rich-text p,
.knowledge-rich-text ul,
.knowledge-rich-text ol,
.knowledge-rich-text blockquote,
.knowledge-rich-text pre,
.knowledge-rich-text table {
    margin: 0 0 14px;
}

.knowledge-rich-text ul,
.knowledge-rich-text ol {
    padding-left: 24px;
}

.knowledge-rich-text li + li {
    margin-top: 5px;
}

.knowledge-rich-text h2,
.knowledge-rich-text h3,
.knowledge-rich-text h4,
.knowledge-rich-text h5,
.knowledge-rich-text h6 {
    margin: 18px 0 8px;
    color: var(--ink);
    line-height: 1.25;
}

.knowledge-rich-text table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.9rem;
}

.knowledge-rich-text caption {
    padding: 0 0 8px;
    color: var(--ink-soft);
    font-weight: 800;
    text-align: left;
}

.knowledge-rich-text th,
.knowledge-rich-text td {
    padding: 9px 11px;
    border: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: left;
}

.knowledge-rich-text th {
    background: var(--panel-soft);
    color: var(--ink);
    font-weight: 800;
}

.knowledge-rich-text tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--panel-soft) 55%, transparent);
}

.knowledge-rich-text blockquote {
    padding: 10px 14px;
    border-left: 3px solid var(--accent);
    background: var(--panel-soft);
}

.knowledge-rich-text pre {
    max-width: 100%;
    padding: 12px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    white-space: pre-wrap;
}

.knowledge-rich-text a {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.knowledge-rich-text span[data-mm2-size="small"] {
    font-size: 0.82em;
}

.knowledge-rich-text span[data-mm2-size="normal"] {
    font-size: 1em;
}

.knowledge-rich-text span[data-mm2-size="large"] {
    font-size: 1.24em;
}

.knowledge-rich-text span[data-mm2-size="x-large"] {
    font-size: 1.56em;
    line-height: 1.25;
}

.knowledge-rich-text :is(p, h2, h3, h4, h5, h6, blockquote, li, th, td)[data-mm2-text-align="left"] {
    text-align: left;
}

.knowledge-rich-text :is(p, h2, h3, h4, h5, h6, blockquote, li, th, td)[data-mm2-text-align="center"] {
    text-align: center;
}

.knowledge-rich-text :is(p, h2, h3, h4, h5, h6, blockquote, li, th, td)[data-mm2-text-align="right"] {
    text-align: right;
}

.knowledge-rich-text :is(p, h2, h3, h4, h5, h6, blockquote, li, th, td)[data-mm2-text-align="justify"] {
    text-align: justify;
    text-justify: inter-word;
}

.knowledge-rich-text figure {
    display: grid;
    justify-items: start;
    width: 100%;
    margin: 18px 0;
}

.knowledge-rich-text figure[data-mm2-align="left"] {
    justify-items: start;
}

.knowledge-rich-text figure[data-mm2-align="center"] {
    justify-items: center;
}

.knowledge-rich-text figure[data-mm2-align="right"] {
    justify-items: end;
}

.knowledge-rich-text figure img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    box-shadow: 0 8px 22px rgba(32, 44, 61, 0.09);
}

.knowledge-rich-text figure img[data-mm2-image-size="small"] {
    max-width: min(100%, 260px);
}

.knowledge-rich-text figure img[data-mm2-image-size="medium"] {
    max-width: min(100%, 480px);
}

.knowledge-rich-text figure img[data-mm2-image-size="large"] {
    max-width: min(100%, 760px);
}

.knowledge-rich-text figure img[data-mm2-image-size="full"] {
    width: 100%;
}

.knowledge-rich-text figcaption {
    margin-top: 8px;
    color: var(--ink-muted);
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: left;
}

.knowledge-rich-text figure[data-mm2-align="center"] figcaption {
    text-align: center;
}

.knowledge-rich-text figure[data-mm2-align="right"] figcaption {
    text-align: right;
}

.knowledge-editor-form {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.knowledge-editor-tabs {
    flex: 0 0 auto;
    gap: 24px;
    padding: 0 var(--modal-card-padding);
    background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    scrollbar-width: none;
}

.knowledge-editor-tabs::-webkit-scrollbar {
    display: none;
}

.knowledge-editor-tabs .wo-workspace-tab.is-active::after {
    background: var(--accent);
}

.knowledge-editor-form .knowledge-editor-tabs .wo-workspace-tab {
    min-height: 0;
    padding: 12px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
}

.knowledge-editor-form .knowledge-editor-tabs .wo-workspace-tab:hover,
.knowledge-editor-form .knowledge-editor-tabs .wo-workspace-tab:focus-visible,
.knowledge-editor-form .knowledge-editor-tabs .wo-workspace-tab.is-active {
    border: 0;
    background: transparent;
    color: var(--ink);
    outline: none;
}

.knowledge-editor-scroll {
    padding-top: 18px;
}

.knowledge-editor-panel.is-active {
    display: grid;
    align-content: start;
    grid-auto-rows: max-content;
    gap: 18px;
    min-height: 0;
}

.knowledge-editor-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.knowledge-editor-guidance-section {
    padding: 22px;
}

.knowledge-editor-guidance-stack {
    display: grid;
    gap: 24px;
}

.knowledge-rich-editor {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: visible;
    border: 1px solid color-mix(in srgb, var(--line-strong) 72%, var(--accent));
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(34, 51, 72, 0.07);
}

.knowledge-rich-editor.has-open-menu {
    z-index: 20;
}

.knowledge-rich-editor:focus-within {
    border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent), 0 14px 34px rgba(34, 51, 72, 0.1);
}

.knowledge-rich-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--panel));
    border-radius: 15px 15px 0 0;
}

.knowledge-rich-editor-heading .card-label {
    margin: 0 0 3px;
    color: var(--ink);
    font-size: 0.78rem;
}

.knowledge-rich-editor-heading p:last-child {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.knowledge-rich-editor-meter {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

.knowledge-rich-editor-meter.is-near-limit {
    background: #fff1cc;
    color: #8b5a00;
}

.knowledge-rich-editor-meter.is-over-limit {
    background: #ffe0e0;
    color: #a51f1f;
}

.knowledge-rte-toolbar {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 58%, var(--panel));
}

.knowledge-rte-toolbar[hidden],
.knowledge-rte-surface[hidden],
.knowledge-rte-fallback[hidden] {
    display: none !important;
}

.knowledge-rte-tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding-right: 7px;
    border-right: 1px solid var(--line);
}

.knowledge-rte-tool-group:last-child {
    padding-right: 0;
    border-right: 0;
}

.knowledge-rte-view-tools {
    margin-left: auto;
}

.knowledge-rte-align-tools [data-rte-align-text-only][hidden] {
    display: none !important;
}

.knowledge-rte-context-label {
    padding-inline: 3px;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.knowledge-rte-align-tools .knowledge-rte-tool.is-active {
    border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
    background: var(--accent-soft);
    color: var(--accent-strong);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}

.knowledge-rte-fullscreen-toggle {
    gap: 7px;
    white-space: nowrap;
}

.knowledge-rte-fullscreen-toggle > span:first-child {
    font-size: 1rem;
    line-height: 0;
}

.knowledge-rte-tool,
.knowledge-rte-select,
.knowledge-rte-color {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 780;
    line-height: 1;
    cursor: pointer;
}

.knowledge-rte-tool {
    padding: 8px 10px;
}

.knowledge-editor-form button.knowledge-rte-tool {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
    box-shadow: none;
    color: var(--ink);
    font-size: 0.78rem;
    line-height: 1;
}

.knowledge-rte-tool:hover,
.knowledge-rte-tool:focus-visible,
.knowledge-rte-select:hover,
.knowledge-rte-select:focus-visible,
.knowledge-rte-color:hover,
.knowledge-rte-color:focus-within {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
    outline: none;
}

.knowledge-editor-form button.knowledge-rte-tool:hover,
.knowledge-editor-form button.knowledge-rte-tool:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel));
    color: var(--ink);
}

.wo-editor-form .knowledge-rte-select {
    width: auto;
    min-height: 38px;
    padding: 7px 28px 7px 9px;
    box-shadow: none;
}

.knowledge-rte-size-select {
    max-width: 112px;
}

.knowledge-rte-color {
    width: 40px;
    padding: 5px;
}

.wo-editor-form .knowledge-rte-color input[type="color"] {
    width: 28px;
    min-width: 28px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.knowledge-rte-menu {
    position: relative;
}

.knowledge-rte-menu > summary {
    list-style: none;
}

.knowledge-rte-menu > summary::-webkit-details-marker {
    display: none;
}

.knowledge-rte-menu[open] > summary {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    background: var(--accent-soft);
}

.knowledge-rte-popover {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 12;
    width: min(340px, calc(100vw - 54px));
    display: grid;
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.knowledge-rich-editor.is-fullscreen {
    position: fixed;
    inset: 18px;
    z-index: 320;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(8, 18, 29, 0.38);
}

.knowledge-rich-editor.is-fullscreen .knowledge-rich-editor-heading {
    padding: 16px 18px 14px;
}

.knowledge-rich-editor.is-fullscreen .knowledge-rte-toolbar {
    padding: 11px 14px;
}

.knowledge-rich-editor.is-fullscreen .knowledge-rte-surface,
.knowledge-rich-editor.is-fullscreen[data-field-name="resolution"] .knowledge-rte-surface {
    min-height: 0;
    max-height: none;
    height: 100%;
    padding: 24px clamp(18px, 4vw, 64px);
}

.knowledge-rich-editor.is-fullscreen .knowledge-rte-popover {
    max-height: calc(100dvh - 170px);
    overflow-y: auto;
}

.knowledge-editor-modal:has(.knowledge-rich-editor.is-fullscreen),
.knowledge-editor-form:has(.knowledge-rich-editor.is-fullscreen),
.knowledge-editor-scroll:has(.knowledge-rich-editor.is-fullscreen) {
    overflow: visible;
}

html.has-knowledge-rte-fullscreen,
body.has-knowledge-rte-fullscreen {
    overflow: hidden;
}

.knowledge-rte-popover > strong {
    color: var(--ink);
    font-size: 0.94rem;
}

.knowledge-rte-popover > p:not(.knowledge-rte-message) {
    margin: -4px 0 0;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.45;
}

.knowledge-rte-popover label {
    display: grid;
    gap: 6px;
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.knowledge-rte-popover label.checkbox-row {
    display: flex;
    color: var(--ink-soft);
    font-size: 0.76rem;
    letter-spacing: 0;
    text-transform: none;
}

.knowledge-rte-popover-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.knowledge-rte-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.knowledge-editor-form .knowledge-editor-panel-actions .button-ghost,
.knowledge-editor-form .knowledge-rte-popover-actions .button-ghost {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink-soft);
}

.knowledge-editor-form .knowledge-editor-panel-actions .button-ghost:hover,
.knowledge-editor-form .knowledge-editor-panel-actions .button-ghost:focus-visible,
.knowledge-editor-form .knowledge-rte-popover-actions .button-ghost:hover,
.knowledge-editor-form .knowledge-rte-popover-actions .button-ghost:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
    background: var(--accent-soft);
    color: var(--ink);
}

.knowledge-rte-message,
.knowledge-rte-status {
    min-height: 18px;
    margin: 0;
    color: #a43a32;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.4;
}

.knowledge-rte-status {
    padding: 0 16px 10px;
}

.knowledge-rte-status.is-success {
    color: #3f7417;
}

.knowledge-rte-surface {
    min-height: 260px;
    max-height: 560px;
    padding: 18px;
    overflow: auto;
    background: var(--panel);
    color: var(--ink);
    outline: none;
    scrollbar-gutter: stable;
}

.knowledge-rich-editor[data-field-name="resolution"] .knowledge-rte-surface {
    min-height: 340px;
}

.knowledge-rte-surface:empty::before {
    content: attr(data-placeholder);
    color: var(--ink-muted);
    pointer-events: none;
}

.knowledge-rte-surface table {
    cursor: text;
}

.knowledge-rte-surface th,
.knowledge-rte-surface td {
    min-width: 90px;
}

.knowledge-rte-surface figure.is-selected img {
    outline: 3px solid color-mix(in srgb, var(--accent) 74%, #4f7c22);
    outline-offset: 4px;
}

.knowledge-editor-context-grid {
    align-items: stretch;
}

body.theme-dark .knowledge-rich-editor,
body.theme-dark .knowledge-rte-popover {
    background: var(--panel);
}

body.theme-dark .knowledge-rich-text figure img {
    background: color-mix(in srgb, var(--panel-soft) 86%, #10161f);
}

@media (max-width: 760px) {
    .knowledge-editor-modal {
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .knowledge-editor-tabs {
        gap: 18px;
        padding-inline: 16px;
        scroll-snap-type: x proximity;
    }

    .knowledge-editor-tabs .wo-workspace-tab {
        min-height: 46px;
        padding-block: 10px 12px;
        scroll-snap-align: start;
    }

    .knowledge-editor-scroll {
        padding: 14px 14px 24px;
    }

    .knowledge-editor-guidance-section,
    .knowledge-editor-panel .wo-editor-section {
        padding: 15px;
    }

    .knowledge-editor-context-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .knowledge-rich-editor-heading {
        display: grid;
        gap: 8px;
        padding: 13px;
    }

    .knowledge-rich-editor-meter {
        justify-self: start;
    }

    .knowledge-rte-toolbar {
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
    }

    .knowledge-rte-tool-group {
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        padding: 0 0 7px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        scrollbar-width: none;
    }

    .knowledge-rte-tool-group::-webkit-scrollbar {
        display: none;
    }

    .knowledge-rte-insert-tools {
        width: 100%;
        flex-wrap: wrap;
        overflow: visible;
        border-bottom: 0;
    }

    .knowledge-rte-tool,
    .knowledge-rte-select,
    .knowledge-rte-color {
        min-height: 42px;
    }

    .knowledge-rte-menu[open] {
        width: 100%;
    }

    .knowledge-rte-menu[open] > summary {
        width: max-content;
    }

    .knowledge-rte-popover {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: 0 10px 28px rgba(22, 34, 50, 0.14);
    }

    .knowledge-rte-surface,
    .knowledge-rich-editor[data-field-name="resolution"] .knowledge-rte-surface {
        min-height: 280px;
        max-height: none;
        padding: 15px;
    }

    .knowledge-editor-panel-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .knowledge-editor-panel-actions > * {
        width: 100%;
    }
}

/* Knowledge diagnostic tree */
.knowledge-tree-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    box-shadow: 0 12px 30px rgba(28, 47, 67, 0.07);
}

.knowledge-tree-renderer {
    min-width: 0;
}

.knowledge-tree-renderer > textarea[hidden] {
    display: none;
}

.knowledge-tree-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-deep) 94%, #10281e), color-mix(in srgb, var(--accent) 28%, var(--accent-deep)));
    color: #fff;
}

.knowledge-tree-preview-heading span {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.72;
}

.knowledge-tree-preview-heading strong {
    font-size: 0.92rem;
    text-align: right;
}

.knowledge-tree-preview-viewport {
    max-height: 540px;
    overflow: auto;
    background-color: color-mix(in srgb, var(--panel) 97%, var(--panel-soft));
    background-image: radial-gradient(circle, color-mix(in srgb, var(--line-strong) 40%, transparent) 1px, transparent 1px);
    background-size: 20px 20px;
    scrollbar-color: color-mix(in srgb, var(--line-strong) 72%, transparent) transparent;
}

.knowledge-tree-preview-canvas,
.knowledge-tree-canvas-grid {
    position: relative;
    isolation: isolate;
}

.knowledge-tree-edges,
.knowledge-tree-nodes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.knowledge-tree-edges {
    z-index: 1;
    overflow: visible;
    pointer-events: none;
}

.knowledge-tree-nodes {
    z-index: 2;
    pointer-events: none;
}

.knowledge-tree-edge > path:not(.knowledge-tree-edge-hit) {
    fill: none;
    stroke: #235d46;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 1;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
    vector-effect: non-scaling-stroke;
}

.knowledge-tree-edge marker path,
.knowledge-tree-edges marker path {
    fill: #235d46;
}

.knowledge-tree-edge-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 18;
    pointer-events: stroke;
    cursor: pointer;
}

.knowledge-tree-edge.is-selected > path:not(.knowledge-tree-edge-hit) {
    stroke: #d28a00;
    stroke-width: 3.5;
}

.knowledge-tree-edge.is-selected path[marker-end] {
    filter: drop-shadow(0 1px 1px rgba(210, 138, 0, 0.26));
}

.knowledge-tree-edge-label {
    fill: var(--ink);
    stroke: var(--panel);
    stroke-width: 5px;
    paint-order: stroke fill;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    pointer-events: auto;
    cursor: pointer;
}

.knowledge-tree-node {
    position: absolute;
    min-height: 88px;
    height: auto;
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: center;
    justify-items: center;
    gap: 5px;
    padding: 12px 16px;
    overflow: visible;
    border: 1px solid #1d6048;
    border-radius: 14px;
    background: #e8f8ec;
    color: #193f31;
    text-align: center;
    box-shadow: 0 9px 20px rgba(26, 55, 43, 0.1);
    pointer-events: auto;
}

button.knowledge-tree-node {
    min-height: 0;
    font: inherit;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button.knowledge-tree-node:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(26, 55, 43, 0.16);
}

button.knowledge-tree-node:active {
    cursor: grabbing;
}

.knowledge-tree-node-type {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(25, 63, 49, 0.09);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.knowledge-tree-node-label {
    max-width: 100%;
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.24;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.knowledge-tree-node.is-measuring {
    position: fixed;
    z-index: -1;
    top: 0;
    left: -10000px;
    visibility: hidden;
    pointer-events: none;
}

.knowledge-tree-node-port {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: var(--panel);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.knowledge-tree-node-port.is-top { top: -6px; left: 50%; transform: translateX(-50%); }
.knowledge-tree-node-port.is-right { top: 50%; right: -6px; transform: translateY(-50%); }
.knowledge-tree-node-port.is-bottom { bottom: -6px; left: 50%; transform: translateX(-50%); }
.knowledge-tree-node-port.is-left { top: 50%; left: -6px; transform: translateY(-50%); }
.knowledge-tree-node:hover .knowledge-tree-node-port,
.knowledge-tree-node.is-selected .knowledge-tree-node-port,
.knowledge-tree-node.is-connect-source .knowledge-tree-node-port,
.knowledge-tree-node.is-edge-endpoint .knowledge-tree-node-port { opacity: 1; }

.knowledge-tree-node-port.is-active {
    width: 12px;
    height: 12px;
    border-color: #d28a00;
    background: #ffd66f;
    box-shadow: 0 0 0 4px rgba(210, 138, 0, 0.18);
}

.knowledge-tree-node.is-start {
    border-color: #17573e;
    border-radius: 999px;
    background: linear-gradient(135deg, #27714f, #4eb980);
    color: #fff;
}

.knowledge-tree-node.is-start .knowledge-tree-node-type,
.knowledge-tree-node.is-result .knowledge-tree-node-type,
.knowledge-tree-node.is-warning .knowledge-tree-node-type {
    background: rgba(255, 255, 255, 0.18);
}

.knowledge-tree-node.is-question {
    border-color: #1e644f;
    background: #f4fff6;
}

.knowledge-tree-node.is-action {
    border-color: #3d719c;
    background: #eef7ff;
    color: #244a6c;
}

.knowledge-tree-node.is-result {
    border-color: #79580b;
    background: linear-gradient(135deg, #f9c54d, #e7a91f);
    color: #352700;
}

.knowledge-tree-node.is-warning {
    border-color: #8e3338;
    background: linear-gradient(135deg, #ef6a67, #dc4c52);
    color: #fff;
}

.knowledge-tree-node.is-readonly {
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 9px 20px rgba(26, 55, 43, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.knowledge-tree-node.is-selected {
    border-color: #d9950c;
    box-shadow: 0 0 0 4px rgba(244, 177, 43, 0.2), 0 13px 28px rgba(26, 55, 43, 0.16);
}

.knowledge-tree-node.is-connect-source {
    border-color: #246f9c;
    box-shadow: 0 0 0 5px rgba(55, 145, 199, 0.18), 0 13px 28px rgba(26, 55, 43, 0.16);
}

.knowledge-tree-empty {
    min-height: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 6px;
    padding: 32px;
    color: var(--ink-muted);
    text-align: center;
    background-image: radial-gradient(circle, color-mix(in srgb, var(--line-strong) 35%, transparent) 1px, transparent 1px);
    background-size: 20px 20px;
}

.knowledge-tree-empty > span {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 14%, var(--panel));
    color: var(--accent-deep);
    font-size: 1.7rem;
}

.knowledge-tree-empty strong { color: var(--ink); font-size: 1rem; }
.knowledge-tree-empty p { max-width: 390px; margin: 0; font-size: 0.82rem; }

.knowledge-tree-step {
    overflow: hidden;
}

.knowledge-tree-step-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.knowledge-tree-step-toolbar > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.knowledge-tree-step-toolbar strong { color: var(--ink); }
.knowledge-tree-step-toolbar span { color: var(--ink-muted); font-size: 0.78rem; }
.knowledge-tree-step-preview .knowledge-tree-preview-viewport { max-height: 390px; }

.knowledge-tree-reader-heading {
    align-items: center;
    gap: 18px;
}

.knowledge-tree-reader-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.knowledge-tree-reader-actions .button-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
}

.knowledge-tree-reader-layer {
    position: fixed;
    inset: 0;
    z-index: 3800;
    display: grid;
    padding: 12px;
    background: rgba(13, 24, 33, 0.78);
    backdrop-filter: blur(14px);
}

.knowledge-tree-reader-shell {
    width: min(100%, 1760px);
    height: calc(100dvh - 24px);
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    justify-self: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 36px 90px rgba(7, 17, 25, 0.42);
}

.knowledge-tree-reader-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px;
    background: linear-gradient(115deg, #164734, #2d7048);
    color: #fff;
}

.knowledge-tree-reader-head p { margin: 0 0 3px; color: #d7efc1; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.knowledge-tree-reader-head h2 { margin: 0; color: #fff; font-size: clamp(1.1rem, 2vw, 1.5rem); }
.knowledge-tree-reader-head > div:last-child { display: flex; gap: 8px; }
.knowledge-tree-reader-head .button-ghost { border-color: rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.1); color: #fff; }

.knowledge-tree-print-page {
    min-width: 0;
    margin: 0;
    background: #fff;
    color: #193f31;
}

.knowledge-tree-print-toolbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 20px;
    border-bottom: 1px solid #d8e0e7;
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 44, 34, 0.08);
}

.knowledge-tree-print-toolbar > div { display: flex; align-items: center; gap: 10px; }
.knowledge-tree-print-toolbar > div:first-child { display: grid; gap: 2px; }
.knowledge-tree-print-toolbar span { color: #648071; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.knowledge-tree-print-toolbar strong { color: #193f31; }
.knowledge-tree-print-actions { flex-wrap: wrap; justify-content: flex-end; }
.knowledge-tree-print-orientation { display: grid; gap: 3px; }
.knowledge-tree-print-orientation > span { font-size: 0.53rem; }
.knowledge-tree-print-orientation select {
    min-height: 40px;
    padding: 7px 34px 7px 11px;
    border: 1px solid #c7d4dc;
    border-radius: 11px;
    background-color: #fff;
    color: #25354a;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}
.knowledge-tree-print-actions > small { color: #648071; font-size: 0.67rem; font-weight: 750; white-space: nowrap; }
.knowledge-tree-print-toolbar button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border: 1px solid #c7d4dc;
    border-radius: 11px;
    background: #fff;
    color: #25354a;
    font: inherit;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.knowledge-tree-print-toolbar .knowledge-tree-print-primary {
    border-color: #5cae16;
    background: linear-gradient(180deg, #8bdc2b, #70bd19);
    color: #132b09;
    box-shadow: 0 6px 14px rgba(74, 140, 15, 0.2);
}
.knowledge-tree-print-toolbar .knowledge-tree-print-primary:hover {
    border-color: #4a9910;
    background: linear-gradient(180deg, #94e733, #78c91c);
}
.knowledge-tree-print-sheet { padding: 14px 22px 22px; }
.knowledge-tree-print-document-head {
    display: grid;
    grid-template-columns: auto minmax(210px, 1fr) auto;
    align-items: center;
    gap: 12px;
    max-width: 1500px;
    min-height: 46px;
    margin: 0 auto 10px;
    padding: 7px 12px;
    border: 1px solid rgba(183, 207, 194, 0.72);
    border-radius: 10px;
    background: rgba(244, 249, 246, 0.72);
    box-shadow: 0 5px 16px rgba(25, 73, 51, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.knowledge-tree-print-brand { display: flex; align-items: center; }
.knowledge-tree-print-brand img { display: block; width: 82px; height: auto; border-radius: 3px; }
.knowledge-tree-print-brand strong { color: #1b5138; font-size: 0.86rem; }
.knowledge-tree-print-identity { min-width: 0; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.knowledge-tree-print-identity > span { color: #4f8069; font-size: 0.55rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.knowledge-tree-print-identity h1 { min-width: 0; margin: 0; overflow: hidden; color: #173f30; font-size: clamp(0.92rem, 1.25vw, 1.08rem); line-height: 1.1; text-overflow: ellipsis; }
.knowledge-tree-print-identity p { margin: 0; color: #698075; font-size: 0.61rem; font-weight: 700; }
.knowledge-tree-print-identity p::before { content: "\00b7"; margin-right: 7px; color: #93aa9f; }
.knowledge-tree-print-meta { display: flex; align-items: center; justify-content: flex-end; gap: 0; margin: 0; white-space: nowrap; }
.knowledge-tree-print-meta div { min-width: 0; display: flex; align-items: baseline; gap: 3px; padding-inline: 8px; border-left: 1px solid rgba(177, 201, 188, 0.72); }
.knowledge-tree-print-meta div:first-child { border-left: 0; }
.knowledge-tree-print-meta div:last-child { padding-right: 0; }
.knowledge-tree-print-meta dt { margin: 0; color: #789084; font-size: 0.5rem; font-weight: 900; letter-spacing: 0.065em; text-transform: uppercase; }
.knowledge-tree-print-meta dd { margin: 0; color: #28483a; font-size: 0.59rem; font-weight: 750; line-height: 1.15; white-space: nowrap; }
.knowledge-tree-print-document-foot { display: flex; justify-content: space-between; gap: 16px; max-width: 1500px; margin: 12px auto 0; padding: 8px 2px 0; border-top: 1px solid #dce8e1; color: #789084; font-size: 0.61rem; font-weight: 700; letter-spacing: 0.04em; }
.knowledge-tree-print-slices { display: grid; gap: 18px; }
.knowledge-tree-print-sheet.is-paginated > [data-tree-print-head-template],
.knowledge-tree-print-sheet.is-paginated > [data-tree-print-foot-template] { display: none; }
.knowledge-tree-print-slice {
    position: relative;
    width: var(--tree-paper-width, 1056px);
    height: var(--tree-paper-height, 816px);
    max-width: 100%;
    margin-inline: auto;
    padding: var(--tree-paper-inset, 36px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
    border: 1px solid #dce8e1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 9px 26px rgba(25, 73, 51, 0.07);
}
.knowledge-tree-print-slice .knowledge-tree-print-document-head { width: 100%; max-width: none; min-height: 0; margin: 0; box-shadow: none; }
.knowledge-tree-print-slice .knowledge-tree-print-document-foot { width: 100%; max-width: none; margin: 0; padding-top: 7px; }
.knowledge-tree-print-slice { grid-template-rows: 52px minmax(0, 1fr) 26px; }
.knowledge-tree-print-slice.is-continuation { grid-template-rows: minmax(0, 1fr) 26px; }
.knowledge-tree-print-slice[data-tree-print-orientation="portrait"] .knowledge-tree-print-identity > span { display: none; }
.knowledge-tree-print-slice[data-tree-print-orientation="portrait"] .knowledge-tree-print-brand img { width: 60px; }
.knowledge-tree-print-slice .knowledge-tree-print-identity { white-space: normal; }
.knowledge-tree-print-slice .knowledge-tree-print-identity h1 { overflow: visible; font-size: 13px; }
.knowledge-tree-print-slice[data-tree-print-orientation="portrait"] .knowledge-tree-print-meta div { padding-inline: 4px; }
.knowledge-tree-print-slice[data-tree-print-orientation="portrait"] .knowledge-tree-print-meta dd { font-size: 7px; }
.knowledge-tree-print-page-chart { position: relative; min-width: 0; min-height: 0; display: grid; justify-items: center; align-content: start; padding-top: 18px; overflow: hidden; }
.knowledge-tree-print-graphic { display: block; overflow: hidden; font-family: inherit; }
.knowledge-tree-print-graphic .knowledge-tree-edge-label { fill: #193f31; stroke: #fff; }
.knowledge-tree-print-graphic marker path { fill: #235d46; }
.knowledge-tree-print-graphic .knowledge-tree-edge-hit { display: none; }
.knowledge-tree-print-graphic .knowledge-tree-edge > path { vector-effect: none; }
.knowledge-tree-print-slice-label { position: absolute; top: 0; right: 0; z-index: 3; color: #789084; font-size: 0.58rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.knowledge-tree-print-slice-viewport { position: relative; max-height: none; overflow: hidden; border: 0 !important; border-radius: 0 !important; }
.knowledge-tree-print-slice-viewport .knowledge-tree-preview-canvas { position: absolute; top: 0; left: 0; margin: 0; transform-origin: 0 0; }
.knowledge-tree-print-sheet .knowledge-tree-preview-viewport { max-height: none; overflow: visible; border: 1px solid #dce8e1; border-radius: 14px; }
.knowledge-tree-print-sheet .knowledge-tree-print-slice-viewport { overflow: hidden; border: 0; border-radius: 0; }
.knowledge-tree-print-sheet .knowledge-tree-preview-canvas { margin-inline: auto; }

@media screen and (max-width: 1000px) {
    .knowledge-tree-print-document-head { grid-template-columns: auto minmax(0, 1fr); }
    .knowledge-tree-print-meta { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding-top: 7px; border-top: 1px solid rgba(183, 207, 194, 0.58); }
    .knowledge-tree-print-meta div:first-child { padding-left: 0; }
}

@page knowledge-tree-landscape { size: 11in 8.5in; margin: 0; }
@page knowledge-tree-portrait { size: 8.5in 11in; margin: 0; }

@media print {
    html,
    body.knowledge-tree-print-page { width: auto; height: auto; min-height: 0; margin: 0; padding: 0; overflow: visible; }
    body.knowledge-tree-print-page,
    body.knowledge-tree-print-page * { visibility: visible !important; }
    .knowledge-tree-print-toolbar { display: none !important; }
    .knowledge-tree-print-sheet { display: block; padding: 0; overflow: visible; }
    .knowledge-tree-print-document-head {
        grid-template-columns: auto minmax(150px, 1fr) auto;
        gap: 3mm;
        max-width: none;
        min-height: 0;
        margin: 0 0 3mm;
        padding: 1.5mm 2.5mm;
        border: 0.25mm solid rgba(183, 207, 194, 0.72);
        border-radius: 2.5mm;
        background: rgba(244, 249, 246, 0.58);
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .knowledge-tree-print-brand img { width: 20mm; }
    .knowledge-tree-print-identity { gap: 1.6mm; }
    .knowledge-tree-print-identity > span { font-size: 5.5pt; }
    .knowledge-tree-print-identity h1 { font-size: 10pt; }
    .knowledge-tree-print-identity p { font-size: 6pt; }
    .knowledge-tree-print-identity p::before { margin-right: 1.6mm; }
    .knowledge-tree-print-meta { gap: 0; }
    .knowledge-tree-print-meta div { gap: 0.7mm; padding-inline: 1.6mm; border-left-width: 0.2mm; }
    .knowledge-tree-print-meta dt { font-size: 4.7pt; }
    .knowledge-tree-print-meta dd { font-size: 5.7pt; }
    .knowledge-tree-print-document-foot { position: static; max-width: none; margin: 0; padding-top: 1.8mm; font-size: 6.5pt; break-inside: avoid; page-break-inside: avoid; }
    .knowledge-tree-print-page .knowledge-tree-renderer { display: block; overflow: visible; }
    .knowledge-tree-print-slices { display: block; }
    .knowledge-tree-print-slice {
        page: knowledge-tree-landscape;
        width: var(--tree-paper-width);
        height: var(--tree-paper-height);
        max-width: none;
        margin: 0 auto;
        padding: 0.375in;
        gap: 0.125in;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        box-sizing: border-box;
        break-after: page;
        page-break-after: always;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .knowledge-tree-print-slice[data-tree-print-orientation="portrait"] { page: knowledge-tree-portrait; }
    .knowledge-tree-print-slice:last-child { break-after: auto; page-break-after: auto; }
    .knowledge-tree-print-slice-label { top: 0; right: 0; font-size: 5.5pt; }
    .knowledge-tree-print-slice-viewport { overflow: hidden !important; }
    .knowledge-tree-print-page .knowledge-tree-card { width: auto !important; height: auto !important; border: 0; border-radius: 0; box-shadow: none; }
    .knowledge-tree-print-page .knowledge-tree-preview-viewport { max-height: none; border: 0; border-radius: 0; box-shadow: none; }
    .knowledge-tree-print-page .knowledge-tree-preview-canvas {
        margin: 0;
        break-inside: auto;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.knowledge-tree-reader-body,
.knowledge-tree-reader-body .knowledge-tree-renderer,
.knowledge-tree-reader-body .knowledge-tree-preview-viewport {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.knowledge-tree-reader-body .knowledge-tree-renderer { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.knowledge-tree-reader-body .knowledge-tree-preview-viewport { max-height: none; }

html.has-knowledge-tree-viewer,
body.has-knowledge-tree-viewer { overflow: hidden; }
body.has-knowledge-tree-viewer .notes-global-launcher { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

.knowledge-tree-editor-layer[hidden] { display: none; }

.knowledge-tree-editor-layer {
    position: fixed;
    inset: 0;
    z-index: 3800;
    display: grid;
    padding: 12px;
    background: rgba(13, 24, 33, 0.76);
    backdrop-filter: blur(14px);
}

html.has-knowledge-tree-editor,
body.has-knowledge-tree-editor {
    overflow: hidden;
}

.knowledge-tree-editor-shell {
    width: min(100%, 1760px);
    height: calc(100dvh - 24px);
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    justify-self: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 36px 90px rgba(7, 17, 25, 0.38);
}

.knowledge-tree-editor-head {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 22px;
    background: linear-gradient(115deg, #164734, #2d7048);
    color: #fff;
}

.knowledge-tree-editor-head .card-label { margin: 0 0 4px; color: #d7efc1; }
.knowledge-tree-editor-head h2 { margin: 0; color: #fff; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.knowledge-tree-editor-head p:last-child { margin: 5px 0 0; color: rgba(255, 255, 255, 0.76); font-size: 0.82rem; }
.knowledge-tree-editor-head .button-ghost { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.1); color: #fff; }

.knowledge-tree-editor-toolbar {
    min-width: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 76%, var(--panel));
}

.knowledge-tree-title-field {
    flex: 1 1 260px;
    max-width: 390px;
    display: grid;
    gap: 4px;
}

.knowledge-tree-title-field span,
.knowledge-tree-add-tools > span {
    color: var(--ink-muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.knowledge-tree-title-field input { min-height: 38px; }

.knowledge-tree-add-tools,
.knowledge-tree-view-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.knowledge-tree-add-tools { flex: 2 1 auto; }
.knowledge-tree-editor-toolbar .button-ghost { min-height: 38px; padding: 7px 11px; font-size: 0.72rem; }

.knowledge-tree-page-guide-control {
    display: grid;
    gap: 3px;
}

.knowledge-tree-page-guide-control > span {
    color: var(--ink-muted);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.knowledge-tree-page-guide-control select { min-height: 38px; padding: 6px 28px 6px 9px; font-size: 0.7rem; }

.knowledge-tree-zoom-tools {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
}

.knowledge-tree-zoom-tools .button-ghost {
    min-width: 36px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
}

.knowledge-tree-zoom-tools .button-ghost + .button-ghost { border-left: 1px solid var(--line); }
.knowledge-tree-zoom-tools .button-ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.knowledge-tree-zoom-tools .knowledge-tree-zoom-level { min-width: 58px; font-size: 0.7rem; }

.knowledge-tree-editor-body {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}

.knowledge-tree-inspector {
    min-width: 0;
    overflow-y: auto;
    padding: 18px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 68%, var(--panel));
}

.knowledge-tree-inspector > div:not([hidden]) {
    display: grid;
    gap: 16px;
}

.knowledge-tree-inspector-empty {
    min-height: 270px;
    place-content: center;
    justify-items: center;
    text-align: center;
    color: var(--ink-muted);
}

.knowledge-tree-inspector-empty strong { color: var(--ink); }
.knowledge-tree-inspector-empty p { margin: 0; font-size: 0.78rem; line-height: 1.5; }
.knowledge-tree-inspector-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent-deep); font-size: 1.4rem; }

.knowledge-tree-inspector-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.knowledge-tree-inspector-heading span { color: var(--ink-muted); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.knowledge-tree-inspector-heading strong { color: var(--ink); }

.knowledge-tree-inspector label {
    display: grid;
    gap: 6px;
}

.knowledge-tree-inspector label > span { color: var(--ink-soft); font-size: 0.72rem; font-weight: 800; }
.knowledge-tree-inspector textarea { resize: vertical; min-height: 112px; }
.knowledge-tree-inspector input[type="range"] { width: 100%; }
.knowledge-tree-inspector-actions { display: grid; gap: 9px; }
.knowledge-tree-inspector-actions button,
.knowledge-tree-inspector > div > button { width: 100%; }
.knowledge-tree-inspector-help { margin: 0; color: var(--ink-muted); font-size: 0.76rem; line-height: 1.5; }

.knowledge-tree-shortcuts {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.knowledge-tree-shortcuts summary {
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 850;
    cursor: pointer;
}

.knowledge-tree-shortcuts dl {
    display: grid;
    gap: 8px;
    margin: 11px 0 0;
}

.knowledge-tree-shortcuts dl > div {
    display: grid;
    grid-template-columns: minmax(94px, auto) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.knowledge-tree-shortcuts dt {
    color: var(--ink);
    font-size: 0.63rem;
    font-weight: 850;
    white-space: nowrap;
}

.knowledge-tree-shortcuts dd {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.63rem;
    line-height: 1.35;
}

.knowledge-tree-port-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.knowledge-tree-port-controls label { min-width: 0; }
.knowledge-tree-port-controls select { width: 100%; min-width: 0; }

.button-danger-subtle {
    border-color: color-mix(in srgb, #c84343 42%, var(--line));
    background: color-mix(in srgb, #c84343 8%, var(--panel));
    color: #a83131;
}

.knowledge-tree-canvas-viewport {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background-color: color-mix(in srgb, var(--panel) 96%, var(--panel-soft));
    background-image: linear-gradient(color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 34%, transparent) 1px, transparent 1px);
    background-size: 20px 20px;
}

.knowledge-tree-canvas-grid { position: relative; }

.knowledge-tree-canvas-surface {
    position: absolute;
    inset: 0 auto auto 0;
    transform-origin: top left;
}

.knowledge-tree-page-guide-layer {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 3600px;
    height: 2600px;
    pointer-events: none;
}

.knowledge-tree-page-guide {
    position: absolute;
    border: 2px dashed rgba(42, 112, 78, 0.42);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 10px rgba(42, 112, 78, 0.025);
}

.knowledge-tree-page-guide > span {
    position: absolute;
    top: 8px;
    left: 10px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(30, 91, 64, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.knowledge-tree-page-guide > i {
    position: absolute;
    inset: 48px;
    border: 1px dotted rgba(42, 112, 78, 0.34);
    border-radius: 4px;
}

.knowledge-tree-canvas-surface .knowledge-tree-nodes { width: 3600px; height: 2600px; }

.knowledge-tree-connect-banner {
    position: sticky;
    z-index: 10;
    left: 50%;
    bottom: 18px;
    width: max-content;
    max-width: calc(100% - 32px);
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 auto 18px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, #24709d 46%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, #24709d 12%, var(--panel));
    box-shadow: 0 12px 30px rgba(20, 48, 68, 0.2);
    color: var(--ink);
    font-size: 0.76rem;
}

.knowledge-tree-connect-banner[hidden] { display: none; }
.knowledge-tree-connect-banner span { color: var(--ink-muted); }

.knowledge-tree-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.knowledge-tree-editor-save-state { min-width: 0; display: grid !important; gap: 2px !important; }
.knowledge-tree-editor-save-state > span { color: var(--ink-muted); font-size: 0.76rem; }
.knowledge-tree-editor-save-state > small { color: #668274; font-size: 0.65rem; font-weight: 750; }
.knowledge-tree-editor-save-state > small[data-tone="error"] { color: #b84b3f; }
.knowledge-tree-editor-footer > div { display: flex; gap: 9px; }
.knowledge-tree-editor-footer [data-tree-save]:disabled,
.knowledge-tree-editor-footer [data-tree-apply]:disabled { cursor: not-allowed; opacity: 0.42; box-shadow: none; }

body.theme-dark .knowledge-tree-node.is-question { background: #193d31; color: #eaf9ef; }
body.theme-dark .knowledge-tree-node.is-action { background: #1d3449; color: #e9f5ff; }
body.theme-dark .knowledge-tree-node.is-result { color: #2c2100; }
body.theme-dark .knowledge-tree-node-port { background: var(--panel); }
body.theme-dark .knowledge-tree-edge > path:not(.knowledge-tree-edge-hit) { stroke: #80d2aa; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.55)); }
body.theme-dark .knowledge-tree-edge marker path,
body.theme-dark .knowledge-tree-edges marker path { fill: #80d2aa; }

body.has-knowledge-tree-editor .notes-global-launcher {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 980px) {
    .knowledge-tree-editor-toolbar { align-items: stretch; flex-wrap: wrap; }
    .knowledge-tree-title-field { max-width: none; flex-basis: 100%; }
    .knowledge-tree-editor-body { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 720px) {
    .knowledge-tree-reader-heading { align-items: stretch; flex-direction: column; }
    .knowledge-tree-reader-actions { width: 100%; }
    .knowledge-tree-reader-actions .button-ghost { flex: 1; justify-content: center; }
    .knowledge-tree-reader-layer { padding: 0; }
    .knowledge-tree-reader-shell { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
    .knowledge-tree-reader-head { padding: 13px; }
    .knowledge-tree-reader-head > div:last-child { flex-shrink: 0; }
    .knowledge-tree-editor-layer { padding: 0; }
    .knowledge-tree-editor-shell { width: 100%; height: 100dvh; border: 0; border-radius: 0; }
    .knowledge-tree-editor-head { padding: 14px; }
    .knowledge-tree-editor-head p:last-child { display: none; }
    .knowledge-tree-editor-toolbar { max-height: 168px; overflow-y: auto; padding: 9px; }
    .knowledge-tree-view-tools { margin-left: auto; }
    .knowledge-tree-editor-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    .knowledge-tree-inspector { grid-row: 2; max-height: 230px; border-top: 1px solid var(--line); border-right: 0; padding: 12px; }
    .knowledge-tree-inspector-empty { min-height: 90px; }
    .knowledge-tree-inspector > div:not([hidden]) { gap: 10px; }
    .knowledge-tree-inspector label textarea { min-height: 70px; }
    .knowledge-tree-port-controls { grid-template-columns: minmax(0, 1fr); }
    .knowledge-tree-inspector-actions { grid-template-columns: 1fr 1fr; }
    .knowledge-tree-step-toolbar { align-items: stretch; flex-direction: column; }
    .knowledge-tree-step-toolbar button { width: 100%; }
    .knowledge-tree-editor-save-state { flex: 1 1 auto; display: grid !important; }
    .knowledge-tree-editor-save-state > span { display: none; }
    .knowledge-tree-editor-footer { justify-content: flex-end; }
}

.admin-record-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.admin-record-chip-list > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-record-link-list,
.admin-record-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-record-link-card {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 96%, var(--bg-soft));
    color: var(--ink);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-record-link-card:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 190, 40, 0.46);
    box-shadow: 0 8px 20px rgba(47, 51, 73, 0.07);
    text-decoration: none;
}

.admin-record-link-card span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.idea-conversation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 18px;
    align-items: start;
}

.idea-conversation-layout > * {
    min-width: 0;
}

.idea-response-form {
    position: sticky;
    top: 0;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(47, 51, 73, 0.055);
}

.idea-response-form-head {
    display: grid;
    gap: 4px;
}

.idea-response-form-head strong {
    color: var(--ink);
    font-size: 0.98rem;
}

.idea-response-form-head span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.4;
    text-transform: none;
}

.team-color-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-color-value i {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--team-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent);
}

/* Library cards stay scannable; all editing happens in the dedicated modal. */
.task-list-library-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
}

.template-library-edit-modal {
    width: min(980px, 100%);
}

/* The shared editor shell remains roomy while each audited module gets a sensible maximum. */
.vendor-editor-modal,
.idea-editor-modal,
.user-editor-modal,
.team-editor-modal,
.template-library-edit-modal {
    height: min(92dvh, 940px);
    max-height: calc(100dvh - 54px);
}

.wo-editor-backdrop:has(.knowledge-editor-modal) {
    padding-top: 16px;
    padding-bottom: 16px;
}

.knowledge-editor-modal {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    max-height: none;
}

@media (max-width: 980px) {
    .wo-editor-backdrop:has(.knowledge-editor-modal) {
        padding: 12px;
    }

    .knowledge-editor-modal {
        height: calc(100vh - 24px);
        height: calc(100dvh - 24px);
    }
}

@media (max-width: 640px) {
    .wo-editor-backdrop:has(.knowledge-editor-modal) {
        padding: 8px;
    }

    .knowledge-editor-modal {
        height: calc(100vh - 16px);
        height: calc(100dvh - 16px);
    }

    .knowledge-rich-editor.is-fullscreen {
        inset: 8px;
        border-radius: 14px;
    }

    .knowledge-rte-fullscreen-toggle {
        width: max-content;
    }
}

.vendor-editor-form .form-grid,
.knowledge-editor-form .form-grid,
.idea-editor-form .form-grid,
.user-editor-form .form-grid,
.team-editor-form .form-grid,
.template-library-edit-modal .form-grid {
    gap: 14px 16px;
}

.wo-editor-section-head > span:first-child:not(.wo-editor-section-kicker) {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 36px;
    border: 1px solid rgba(75, 111, 151, 0.22);
    border-radius: 11px;
    background: rgba(57, 89, 125, 0.085);
    color: #385776;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    line-height: 1;
}

.wo-editor-section-core .wo-editor-section-head > span:first-child:not(.wo-editor-section-kicker) {
    border-color: rgba(124, 190, 40, 0.34);
    background: rgba(124, 190, 40, 0.14);
    color: #4e7f14;
}

.wo-editor-footer {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.wo-editor-footer .button-danger {
    margin-right: auto;
}

/* Settings import dialogs are sub-modals: keep the lighter header while matching spacing and scrolling. */
.settings-modal-backdrop {
    padding: 24px 24px 24px calc(var(--sidebar-rail-width, 224px) + 24px);
}

.settings-modal-card {
    max-height: min(92dvh, 960px);
    padding: 24px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.settings-modal-card > .modal-header {
    align-items: flex-start;
    margin: -4px 0 20px;
    padding: 4px 58px 18px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
}

.settings-modal-card > .modal-header h2 {
    color: var(--ink);
}

.settings-modal-card > .modal-header .card-label,
.settings-modal-card > .modal-header .modal-subtitle {
    color: var(--ink-muted);
}

.settings-modal-card > .modal-header .wo-workspace-close {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink-soft);
}

.settings-modal-card > .modal-header .wo-workspace-close:hover,
.settings-modal-card > .modal-header .wo-workspace-close:focus-visible {
    border-color: rgba(124, 190, 40, 0.42);
    background: rgba(124, 190, 40, 0.09);
    color: var(--ink);
}

html:has(.admin-record-workspace),
body:has(.admin-record-workspace),
html:has(.vendor-editor-modal),
body:has(.vendor-editor-modal),
html:has(.knowledge-editor-modal),
body:has(.knowledge-editor-modal),
html:has(.idea-editor-modal),
body:has(.idea-editor-modal),
html:has(.user-editor-modal),
body:has(.user-editor-modal),
html:has(.team-editor-modal),
body:has(.team-editor-modal),
html:has(.template-library-edit-modal),
body:has(.template-library-edit-modal),
html:has(.settings-modal-card),
body:has(.settings-modal-card) {
    overflow: hidden;
}

body.theme-dark .admin-record-workspace-summary .wo-summary-stat {
    border-right-color: var(--line-strong);
}

body.theme-dark .admin-record-workspace .wo-workspace-tab.is-active .wo-workspace-tab-count {
    background: rgba(108, 149, 255, 0.16);
    color: #b8caff;
}

body.theme-dark .admin-record-link-card,
body.theme-dark .idea-response-form {
    background: color-mix(in srgb, var(--panel) 92%, #111722);
}

body.theme-dark .wo-editor-section-head > span:first-child:not(.wo-editor-section-kicker) {
    border-color: rgba(158, 180, 207, 0.22);
    background: rgba(158, 180, 207, 0.1);
    color: #c3d1df;
}

@media (max-width: 980px) {
    .admin-record-workspace-backdrop,
    .settings-modal-backdrop {
        padding: 12px;
    }

    .admin-record-overview-grid,
    .admin-access-grid,
    .knowledge-guidance-grid,
    .idea-workspace-overview,
    .idea-conversation-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-record-workspace {
        height: calc(100dvh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
    }
}

@media (max-width: 680px) {
    .admin-record-workspace-backdrop {
        padding: 0;
    }

    .admin-record-workspace {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .admin-record-workspace .wo-workspace-head,
    .admin-record-workspace .wo-workspace-toolbar,
    .admin-record-workspace .wo-workspace-tabs,
    .admin-record-workspace .wo-summary-strip {
        padding-inline: 18px;
    }

    .admin-record-workspace-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-record-link-list,
    .admin-record-link-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-modal-backdrop {
        padding: 10px;
    }

    .settings-modal-card {
        max-height: calc(100dvh - 20px);
        padding: 18px;
    }
}

/* Ideas workspace: make intake, review, and follow-up read as one cohesive workflow. */
.idea-heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.idea-heading-actions .register-view-toolbar {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

.idea-toolbar-form {
    display: grid;
    grid-template-columns: minmax(10rem, 24rem) minmax(7rem, 10rem) minmax(9rem, 14rem) auto;
    justify-content: start;
    align-items: end;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background: var(--panel-soft);
}

.idea-toolbar-form label {
    min-width: 0;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.idea-toolbar-form :is(input, select) {
    min-width: 0;
    font-size: 0.875rem;
}

.idea-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.idea-filter-actions .button-ghost {
    width: auto;
}

.idea-clear-filters:not(.is-active) {
    display: none;
}

.idea-toolbar-form:has(input[name="q"]:not(:placeholder-shown)) .idea-clear-filters {
    display: inline;
}

@media (max-width: 1050px) {
    .idea-toolbar-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .idea-search-field,
    .idea-filter-actions {
        grid-column: 1 / -1;
    }
}

.idea-table-card {
    padding: 0;
    overflow: hidden;
}

.idea-table-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 62%, var(--panel));
}

.idea-table-heading h3,
.idea-table-heading p {
    margin: 0;
}

.idea-table-heading > p {
    max-width: 520px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: right;
}

.idea-table-empty {
    display: grid;
    gap: 5px;
    padding: 30px 20px;
    color: var(--ink-soft);
    text-align: center;
}

.idea-table-empty strong {
    color: var(--ink);
}

.idea-status-board:not(.is-horizontal) {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
}

.idea-board-column {
    --idea-stage-color: #7890a8;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 3px solid color-mix(in srgb, var(--idea-stage-color) 76%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 80%, var(--panel-soft));
    box-shadow: 0 8px 24px rgba(47, 51, 73, 0.045);
}

.idea-board-column.is-status-new {
    --idea-stage-color: #d5a72b;
}

.idea-board-column.is-status-planned {
    --idea-stage-color: #4d7fd4;
}

.idea-board-column.is-status-in_development {
    --idea-stage-color: #8468c5;
}

.idea-board-column.is-status-released {
    --idea-stage-color: #6fac2f;
}

.idea-board-column.is-status-archived {
    --idea-stage-color: #84909e;
}

.idea-board-column-head {
    padding: 1px 2px 4px;
}

.idea-board-column-head p {
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-size: 0.77rem;
    line-height: 1.4;
}

.idea-board-column-head .idea-status-count {
    background: color-mix(in srgb, var(--idea-stage-color) 13%, var(--panel));
    color: color-mix(in srgb, var(--idea-stage-color) 76%, var(--ink));
}

.idea-record-card {
    border-color: color-mix(in srgb, var(--line) 88%, transparent);
    box-shadow: 0 7px 20px rgba(47, 51, 73, 0.045);
}

.idea-card-summary.is-empty {
    color: var(--ink-muted);
    font-style: italic;
}

.idea-board-empty {
    min-height: 132px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 20px;
    text-align: center;
}

.idea-board-empty strong {
    color: var(--ink);
}

.idea-board-empty p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.idea-submitter-summary {
    display: grid;
    gap: 2px;
    padding-left: 16px;
    border-left: 1px solid var(--line);
}

.idea-submitter-summary > span,
.idea-overview-card .wo-overview-header span {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.idea-submitter-summary strong {
    color: var(--ink);
    font-size: 0.86rem;
}

.idea-submitter-summary a {
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.idea-overview-card {
    min-height: 200px;
}

.idea-response-card {
    gap: 10px;
}

.idea-response-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.idea-response-visibility {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 750;
    white-space: nowrap;
}

.idea-response-visibility.is-public {
    border-color: rgba(90, 161, 43, 0.28);
    background: rgba(116, 190, 55, 0.1);
    color: #4d7f1e;
}

.idea-response-visibility.is-internal {
    background: var(--panel-soft);
}

.idea-response-card time {
    color: var(--ink-muted);
    font-size: 0.74rem;
}

.idea-response-help {
    margin: -8px 0 0;
    color: var(--ink-soft);
    font-size: 0.77rem;
    line-height: 1.4;
}

.idea-editor-routing-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.idea-editor-routing-fields > .wo-editor-field-full {
    grid-column: 1 / -1;
}

.wo-editor-field-help {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: normal;
    line-height: 1.4;
    text-transform: none;
}

body.theme-dark .idea-board-column,
body.theme-dark .idea-table-heading {
    background-color: color-mix(in srgb, var(--panel) 94%, #111722);
}

body.theme-dark .idea-response-visibility.is-public {
    color: #b9df8b;
}

@media (max-width: 760px) {
    .idea-table-heading {
        align-items: stretch;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .idea-table-heading > * {
        width: 100%;
        flex: 0 0 auto;
    }

    .idea-table-heading > p {
        text-align: left;
    }

    .idea-editor-routing-fields,
    .idea-editor-copy-grid,
    .idea-editor-form .wo-editor-section-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .idea-submitter-summary {
        width: 100%;
        padding: 10px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .idea-response-card-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Settings navigation: a compact rail keeps long administration pages easy to scan. */
.settings-hero-card .section-heading {
    display: grid;
    grid-template-columns: minmax(210px, 0.62fr) minmax(360px, 1fr);
    align-items: stretch;
}

.settings-hero-summary {
    width: min(100%, 560px);
    display: grid;
    gap: 4px;
    align-content: center;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 88%, var(--panel));
}

.settings-current-section-label {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-hero-summary strong {
    color: var(--ink);
    font-size: 1rem;
}

.settings-hero-summary p {
    margin: 2px 0 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.45;
}

.settings-page-shell {
    display: grid;
    grid-template-columns: minmax(236px, 258px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.settings-quick-nav {
    position: sticky;
    top: 84px;
    min-width: 0;
    max-height: calc(100dvh - 108px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.settings-quick-nav-card {
    display: grid;
    gap: 16px;
    padding: 15px;
    border-color: color-mix(in srgb, var(--line-strong) 84%, transparent);
    box-shadow: 0 14px 36px rgba(38, 49, 66, 0.07);
}

.settings-quick-nav-heading {
    display: grid;
    gap: 4px;
    padding: 3px 4px 13px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.settings-quick-nav-heading .card-label,
.settings-quick-nav-heading p {
    margin: 0;
}

.settings-quick-nav-heading strong {
    color: var(--ink);
    font-size: 1rem;
}

.settings-quick-nav-heading p:last-child {
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.settings-mobile-area-menu {
    display: none;
}

.settings-section-nav,
.settings-section-nav-group,
.settings-anchor-nav,
.settings-anchor-nav-links {
    display: grid;
}

.settings-section-nav {
    gap: 16px;
}

.settings-section-nav-group {
    gap: 5px;
}

.settings-section-nav-label {
    padding: 0 8px 3px;
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.settings-section-nav-link {
    position: relative;
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 11px 10px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ink-soft);
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.settings-section-nav-link::before {
    content: "";
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 5px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.settings-section-nav-link:hover {
    transform: translateX(2px);
    border-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: var(--ink);
    text-decoration: none;
}

.settings-section-nav-link.is-active {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 78%, var(--panel));
    color: var(--accent-strong);
}

.settings-section-nav-link.is-active::before {
    background: var(--accent);
}

.settings-section-nav-link strong {
    color: currentColor;
    font-size: 0.86rem;
}

.settings-section-nav-link span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.settings-anchor-nav {
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.settings-anchor-nav-links {
    gap: 3px;
}

.settings-anchor-nav-links > a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 9px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.settings-anchor-nav-links > a > span {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ink-muted) 48%, transparent);
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.settings-anchor-nav-links > a:hover {
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
    color: var(--ink);
    text-decoration: none;
}

.settings-anchor-nav-links > a:hover > span {
    transform: scale(1.25);
    background: var(--accent);
}

.settings-anchor-nav-links > a[aria-current="location"] {
    background: color-mix(in srgb, var(--accent-soft) 82%, var(--panel));
    color: var(--accent-strong);
}

.settings-anchor-nav-links > a[aria-current="location"] > span {
    transform: scale(1.2);
    background: var(--accent);
}

.settings-page-content {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.settings-page-content > .module-band {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-page-content .notification-group-nav {
    display: none;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.settings-page-content > .settings-card-stack {
    gap: 18px;
}

.settings-scroll-target,
.notification-settings-intro,
.notification-rule-group {
    scroll-margin-top: 96px;
}

body.theme-dark .settings-hero-summary,
body.theme-dark .settings-quick-nav-card {
    background: color-mix(in srgb, var(--panel) 94%, #111722);
}

body.theme-dark .settings-section-nav-link.is-active {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
    background: color-mix(in srgb, var(--accent) 13%, var(--panel));
    color: color-mix(in srgb, var(--accent) 74%, white);
}

@media (max-width: 1500px) {
    .settings-page-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-quick-nav {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .settings-quick-nav-card {
        grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
        align-items: start;
    }

    .settings-quick-nav-heading {
        padding-bottom: 3px;
        border-bottom: 0;
    }

    .settings-section-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .settings-anchor-nav {
        grid-column: 1 / -1;
        gap: 7px;
    }

    .settings-anchor-nav .settings-section-nav-label {
        display: none;
    }

    .settings-anchor-nav-links {
        display: flex;
        gap: 5px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .settings-anchor-nav-links > a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    .settings-hero-card .section-heading,
    .settings-quick-nav-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-hero-summary {
        width: 100%;
    }

    .settings-quick-nav-card {
        gap: 13px;
        padding: 13px;
    }

    .settings-section-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 1px 1px 5px;
        scrollbar-width: thin;
    }

    .settings-section-nav-group {
        display: contents;
    }

    .settings-section-nav > .settings-section-nav-group > .settings-section-nav-label {
        display: none;
    }

    .settings-section-nav-link {
        min-width: 158px;
        flex: 0 0 158px;
        padding: 10px 12px 10px 15px;
    }

    .settings-section-nav-link span {
        display: none;
    }

    .settings-section-nav-link::before {
        top: 8px;
        bottom: 8px;
    }

    .settings-page-content > .module-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* Notification settings */
.notification-settings-form {
    display: grid;
    gap: 18px;
}

.notification-settings-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 24px 26px;
    border-color: color-mix(in srgb, var(--line-strong) 88%, #8fa7c2 12%);
}

.notification-settings-intro-copy {
    max-width: 780px;
}

.notification-settings-intro-copy h2 {
    margin-bottom: 8px;
}

.notification-settings-intro-copy > p:last-child {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.notification-delivery-state {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: min(100%, 290px);
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--panel-soft);
}

.notification-delivery-state.is-ready {
    border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel) 30%);
}

.notification-delivery-state.is-unavailable {
    border-color: color-mix(in srgb, #d99a3c 34%, var(--line));
    background: color-mix(in srgb, #fff2da 62%, var(--panel) 38%);
}

.notification-delivery-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 999px;
    background: #d99a3c;
    box-shadow: 0 0 0 4px color-mix(in srgb, #d99a3c 16%, transparent);
}

.notification-delivery-state.is-ready .notification-delivery-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.notification-delivery-state strong,
.notification-delivery-state span {
    display: block;
}

.notification-delivery-state strong {
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.notification-delivery-state div > span {
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.4;
}

.notification-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.notification-summary-card {
    min-width: 0;
    padding: 18px 20px;
}

.notification-summary-card > span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-summary-card > strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
    font-family: "Space Grotesk", "Aptos Display", sans-serif;
    font-size: 1.65rem;
    line-height: 1;
}

.notification-summary-card > strong small {
    color: var(--ink-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.notification-summary-card > p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.79rem;
    line-height: 1.42;
}

.notification-group-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 3px 2px 7px;
    scrollbar-width: thin;
}

.notification-group-nav a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--panel);
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.notification-group-nav a:hover,
.notification-group-nav a:focus-visible {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
    color: var(--ink);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.notification-group-stack {
    display: grid;
    gap: 18px;
}

.notification-rule-group {
    padding: 0;
    scroll-margin-top: 18px;
    overflow: clip;
}

.notification-rule-group-head {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
    align-items: end;
    gap: 24px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 74%, var(--panel) 26%);
}

.notification-rule-group-head h2 {
    margin: 0;
    font-size: 1.14rem;
}

.notification-rule-group-head > p {
    max-width: 680px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.48;
}

.notification-rule-list {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.notification-rule-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.notification-rule-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #5685bf;
    content: "";
}

.notification-rule-card.is-warning::before {
    background: #d99a3c;
}

.notification-rule-card.is-critical::before {
    background: #d75b58;
}

.notification-rule-card.is-success::before {
    background: var(--accent);
}

.notification-rule-card:focus-within {
    border-color: color-mix(in srgb, #5685bf 50%, var(--line-strong));
    box-shadow: 0 0 0 3px color-mix(in srgb, #5685bf 10%, transparent);
}

.notification-rule-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 18px 18px 17px 21px;
}

.notification-rule-copy {
    min-width: 0;
}

.notification-rule-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.notification-rule-title-row h3 {
    margin: 0;
    font-size: 0.98rem;
}

.notification-rule-copy > p {
    max-width: 780px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.48;
}

.notification-rule-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #49647d;
    background: #eaf1f8;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.notification-rule-badge.is-external {
    color: #79591c;
    background: #fff0cc;
}

.notification-rule-copy .notification-recipient-note {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    color: color-mix(in srgb, var(--ink-soft) 82%, #406181 18%);
    font-size: 0.75rem;
}

.notification-recipient-note > span {
    color: var(--ink-muted);
    font-weight: 800;
}

.notification-channel-controls {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.notification-channel-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 112px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel-soft);
    cursor: pointer;
    transition:
        border-color 150ms ease,
        background-color 150ms ease;
}

.notification-channel-toggle:hover {
    border-color: var(--line-strong);
}

.notification-channel-toggle.is-fixed {
    min-width: 148px;
    cursor: default;
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 38%, var(--panel-soft) 62%);
}

.notification-channel-toggle.is-fixed:hover {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.notification-channel-toggle:has(input[type="checkbox"]:checked) {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
    background: color-mix(in srgb, var(--accent-soft) 72%, var(--panel) 28%);
}

.notification-channel-toggle > input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--accent-strong);
}

.notification-channel-toggle span,
.notification-channel-toggle strong,
.notification-channel-toggle small {
    display: block;
}

.notification-channel-toggle strong {
    font-size: 0.79rem;
    line-height: 1.15;
}

.notification-channel-toggle small {
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 0.65rem;
    line-height: 1.1;
}

.notification-rule-automation {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 13px 18px 14px 21px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 66%, var(--panel) 34%);
}

.notification-rule-automation > label {
    display: grid;
    gap: 6px;
    min-width: 160px;
}

.notification-rule-automation > label > span:first-child,
.notification-recipient-select > span,
.notification-role-picker legend {
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.notification-number-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
}

.notification-number-input:focus-within {
    border-color: color-mix(in srgb, var(--accent) 52%, var(--line-strong));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.notification-number-input input {
    width: 90px;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.notification-number-input input:focus {
    outline: 0;
    box-shadow: none;
}

.notification-number-input small {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-width: 48px;
    padding: 0 10px;
    border-left: 1px solid var(--line);
    color: var(--ink-soft);
    background: var(--panel-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.notification-rule-automation > p {
    flex: 1 1 280px;
    margin: 0 0 4px;
    color: var(--ink-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

.notification-audience-editor {
    border-top: 1px solid var(--line);
}

.notification-audience-editor > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px 13px 21px;
    list-style: none;
    background: color-mix(in srgb, var(--panel-soft) 66%, var(--panel) 34%);
    cursor: pointer;
    transition: background-color 150ms ease;
}

.notification-audience-editor > summary::-webkit-details-marker {
    display: none;
}

.notification-audience-editor > summary:hover {
    background: color-mix(in srgb, var(--accent-soft) 35%, var(--panel) 65%);
}

.notification-audience-editor > summary span:first-child,
.notification-audience-editor > summary strong,
.notification-audience-editor > summary small {
    display: block;
}

.notification-audience-editor > summary strong {
    font-size: 0.8rem;
}

.notification-audience-editor > summary small {
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.notification-audience-chevron {
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.notification-audience-editor[open] .notification-audience-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.notification-audience-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    padding: 18px 20px 20px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.notification-role-picker {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.notification-role-picker legend {
    margin-bottom: 9px;
    padding: 0;
}

.notification-role-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-role-options label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--panel-soft);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.notification-role-options label:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
    color: var(--ink);
    background: var(--accent-soft);
}

.notification-role-options input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--accent-strong);
}

.notification-recipient-select {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.notification-recipient-select select {
    width: 100%;
    min-height: 122px;
    padding: 6px;
    border-color: var(--line-strong);
    border-radius: 10px;
    color: var(--ink);
    background: var(--panel);
}

.notification-recipient-select option {
    padding: 7px 8px;
    border-radius: 6px;
}

.notification-recipient-select > small {
    color: var(--ink-muted);
    font-size: 0.69rem;
}

.notification-settings-savebar {
    position: sticky;
    z-index: 8;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 17px 15px 20px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 84%, #50677f 16%);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    box-shadow: 0 14px 34px rgba(31, 45, 63, 0.16);
    backdrop-filter: blur(12px);
}

.notification-settings-savebar > div,
.notification-settings-savebar strong,
.notification-settings-savebar span {
    display: block;
}

.notification-settings-savebar strong {
    margin-bottom: 3px;
    font-size: 0.88rem;
}

.notification-settings-savebar span {
    color: var(--ink-soft);
    font-size: 0.74rem;
}

.notification-settings-savebar .button-primary {
    flex: 0 0 auto;
}

body.theme-dark .notification-delivery-state.is-unavailable {
    border-color: rgba(217, 154, 60, 0.34);
    background: rgba(217, 154, 60, 0.09);
}

body.theme-dark .notification-rule-badge {
    color: #b9cee2;
    background: rgba(91, 139, 190, 0.16);
}

body.theme-dark .notification-rule-badge.is-external {
    color: #efd292;
    background: rgba(217, 154, 60, 0.14);
}

body.theme-dark .notification-settings-savebar {
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1040px) {
    .notification-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-rule-group-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .notification-rule-primary {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .notification-channel-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .notification-settings-intro {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .notification-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .notification-rule-group-head {
        padding: 19px 18px 16px;
    }

    .notification-rule-list {
        padding: 10px;
    }

    .notification-rule-primary {
        padding: 16px 14px 15px 17px;
    }

    .notification-channel-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-channel-toggle {
        min-width: 0;
    }

    .notification-rule-automation {
        align-items: stretch;
        padding-inline: 17px 14px;
    }

    .notification-rule-automation > label {
        flex: 1 1 130px;
        min-width: 0;
    }

    .notification-number-input input {
        min-width: 0;
        width: 100%;
    }

    .notification-audience-body {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .notification-role-picker {
        grid-column: auto;
    }

    .notification-settings-savebar {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    .notification-settings-savebar .button-primary {
        width: 100%;
    }
}

/* Unified notifications and message center */
.notification-flyout {
    position: relative;
}

.notification-trigger {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    transition:
        color 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.notification-trigger:hover,
.notification-trigger[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 62%, var(--panel));
    color: var(--accent-strong);
    box-shadow: 0 10px 25px rgba(31, 52, 68, 0.1);
    transform: translateY(-1px);
}

.notification-trigger svg {
    width: 21px;
    height: 21px;
}

.notification-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--panel);
    border-radius: 999px;
    background: #ea5b48;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(190, 48, 35, 0.3);
}

.notification-popover {
    right: 0;
    left: auto;
    width: min(430px, calc(100vw - 32px));
    padding: 0;
    overflow: hidden;
}

.notification-popover-head,
.notification-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
}

.notification-popover-head {
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 90%, var(--page));
}

.notification-popover-head strong {
    display: block;
    font-size: 15px;
}

.notification-popover-head span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.notification-popover-head-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex-wrap: wrap;
}

.notification-popover-head-actions form {
    margin: 0;
}

.notification-mark-all,
.notification-clear-tray {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.notification-clear-tray {
    color: var(--muted);
}

.notification-mark-all:hover,
.notification-clear-tray:hover {
    color: var(--accent-strong);
}

.notification-popover-list {
    max-height: min(520px, calc(100vh - 220px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-popover-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    background: var(--panel);
    color: var(--text);
    text-align: left;
    text-decoration: none;
    transition: background-color 140ms ease;
}

.notification-popover-item:hover {
    background: color-mix(in srgb, var(--accent-soft) 42%, var(--panel));
}

.notification-popover-item.is-unread {
    background: color-mix(in srgb, var(--accent-soft) 55%, var(--panel));
}

.notification-popover-item.is-unread::after {
    content: "";
    position: absolute;
    top: 19px;
    right: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.notification-popover-marker {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel));
    color: var(--accent-strong);
}

.notification-popover-marker svg {
    width: 17px;
    height: 17px;
}

.notification-popover-copy {
    min-width: 0;
    padding-right: 10px;
}

.notification-popover-copy strong,
.notification-popover-copy span,
.notification-popover-copy time {
    display: block;
}

.notification-popover-copy strong {
    padding-right: 10px;
    font-size: 13px;
    line-height: 1.35;
}

.notification-popover-copy span {
    display: -webkit-box;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notification-popover-copy time {
    margin-top: 5px;
    color: var(--muted-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.notification-popover-empty {
    padding: 38px 24px;
    text-align: center;
}

.notification-popover-empty strong,
.notification-popover-empty span {
    display: block;
}

.notification-popover-empty span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.notification-popover-footer {
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 88%, var(--page));
}

.notification-popover-footer a {
    width: 100%;
    color: var(--link);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.notification-center-page {
    display: grid;
    gap: 18px;
}

.notification-center-hero,
.notification-center-feed {
    overflow: hidden;
}

.notification-center-heading {
    align-items: flex-start;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--line);
}

.notification-center-heading h2,
.notification-feed-toolbar h3 {
    margin: 4px 0 0;
}

.notification-center-heading p {
    max-width: 740px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.notification-center-heading-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.notification-center-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 20px;
}

.notification-center-summary-card {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 88%, var(--page));
}

.notification-center-summary-card > span,
.notification-center-summary-card > strong,
.notification-center-summary-card > small {
    display: block;
}

.notification-center-summary-card > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-center-summary-card > strong {
    margin-top: 5px;
    font-size: 25px;
    line-height: 1;
}

.notification-center-summary-card > small {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.notification-feed-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--line);
}

.notification-filter-tabs {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel) 76%, var(--page));
}

.notification-filter-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.notification-filter-tabs a.is-active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 3px 10px rgba(31, 52, 68, 0.08);
}

.notification-filter-tabs a span {
    display: inline-grid;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, var(--panel));
    color: var(--accent-strong);
    font-size: 10px;
}

.notification-message-list {
    display: grid;
    gap: 10px;
    padding-top: 16px;
}

.notification-message {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--panel);
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.notification-message:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(31, 52, 68, 0.07);
}

.notification-message.is-unread {
    border-left: 4px solid var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 38%, var(--panel));
}

.notification-message-marker {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel));
    color: var(--accent-strong);
}

.notification-message.is-warning .notification-message-marker {
    background: #fff4dd;
    color: #9d6500;
}

.notification-message.is-critical .notification-message-marker {
    background: #ffebe8;
    color: #bc3c2e;
}

.notification-message.is-success .notification-message-marker {
    background: #e8f8e8;
    color: #338639;
}

.notification-message-marker svg {
    width: 20px;
    height: 20px;
}

.notification-message-copy {
    min-width: 0;
}

.notification-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.notification-message-meta time::before {
    content: "•";
    margin-right: 8px;
}

.notification-message h4 {
    margin: 5px 0 0;
    font-size: 15px;
}

.notification-message p {
    max-width: 860px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.notification-message-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-message-actions form {
    margin: 0;
}

.notification-message-open,
.notification-message-archive {
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.notification-message-open {
    background: color-mix(in srgb, var(--accent) 16%, var(--panel));
    color: var(--accent-strong);
}

.notification-message-archive {
    color: var(--muted);
}

.notification-message-archive:hover {
    background: color-mix(in srgb, var(--line) 48%, transparent);
    color: var(--text);
}

.notification-empty-state {
    display: grid;
    min-height: 280px;
    place-items: center;
    align-content: center;
    padding: 38px;
    text-align: center;
}

.notification-empty-icon {
    display: inline-grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent-soft) 70%, var(--panel));
    color: var(--accent-strong);
}

.notification-empty-icon svg {
    width: 28px;
    height: 28px;
}

.notification-empty-state strong {
    margin-top: 15px;
    font-size: 17px;
}

.notification-empty-state p {
    max-width: 420px;
    margin: 6px 0 0;
    color: var(--muted);
}

.notification-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 18px;
}

.notification-pagination a {
    color: var(--link);
    font-weight: 750;
    text-decoration: none;
}

.notification-pagination span {
    color: var(--muted);
    font-size: 12px;
}

body.theme-dark .notification-message.is-warning .notification-message-marker {
    background: rgba(196, 137, 31, 0.16);
    color: #f4c66c;
}

body.theme-dark .notification-message.is-critical .notification-message-marker {
    background: rgba(207, 71, 55, 0.17);
    color: #ff988b;
}

body.theme-dark .notification-message.is-success .notification-message-marker {
    background: rgba(81, 171, 87, 0.17);
    color: #8cdb91;
}

@media (max-width: 860px) {
    .app-sidebar.has-mobile-nav .mobile-nav-bar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .app-sidebar.has-mobile-nav .mobile-notification-flyout {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
    }

    .app-sidebar.has-mobile-nav .mobile-notification-flyout .notification-trigger {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.06);
        color: #f4f8f9;
    }

    .app-sidebar.has-mobile-nav .mobile-account-flyout,
    .app-sidebar.has-mobile-nav .mobile-account-trigger {
        grid-column: 3;
    }

    .mobile-notification-flyout {
        position: static;
    }

    .mobile-notification-flyout .notification-popover {
        position: fixed;
        top: 68px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100dvh - 82px);
        z-index: 120;
    }

    .notification-center-heading,
    .notification-feed-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-center-heading-actions {
        justify-content: flex-start;
    }

    .notification-center-summary {
        grid-template-columns: 1fr;
    }

    .notification-filter-tabs {
        align-self: flex-start;
    }

    .notification-message {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 15px;
    }

    .notification-message-marker {
        width: 38px;
        height: 38px;
    }

    .notification-message-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 520px) {
    .notification-popover-head,
    .notification-popover-footer,
    .notification-popover-item {
        padding-inline: 14px;
    }

    .notification-center-heading-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .notification-center-heading-actions .button-ghost {
        width: 100%;
        justify-content: center;
    }

    .notification-message-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .notification-message-meta time::before {
        display: none;
    }
}

/* Operations report archive and recipient-scoped report reader */
.operations-reports-page {
    position: relative;
    display: grid;
    gap: 18px;
}

.operations-report-loading-indicator {
    position: fixed;
    z-index: 120;
    top: 82px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 94%, var(--accent-soft));
    box-shadow: 0 12px 30px rgba(28, 38, 52, 0.16);
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 750;
}

.operations-report-loading-indicator > span {
    width: 15px;
    height: 15px;
    border: 2px solid color-mix(in srgb, var(--accent) 25%, var(--line-strong));
    border-top-color: var(--accent-strong);
    border-radius: 50%;
    animation: operations-report-loading-spin 700ms linear infinite;
}

.operations-reports-page.is-loading .operations-report-layout,
.operations-reports-page.is-loading .operations-report-empty {
    opacity: 0.58;
    transition: opacity 140ms ease;
}

.operations-reports-page.is-loading [data-report-switch-link] {
    pointer-events: none;
}

@keyframes operations-report-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.operations-reports-hero .section-heading {
    align-items: center;
    margin: 0;
}

.operations-reports-hero .section-heading p {
    max-width: 760px;
}

.operations-reports-hero .button-ghost svg {
    width: 18px;
    height: 18px;
}

.operations-report-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
    gap: 20px;
    align-items: start;
}

.operations-report-document {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cad6e5;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(23, 39, 62, 0.08);
}

.operations-report-cover {
    padding: 34px 38px 30px;
    text-align: center;
    background:
        radial-gradient(circle at 50% -60%, rgba(132, 204, 22, 0.17), transparent 56%),
        linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    border-bottom: 1px solid #dbe3ef;
}

.operations-report-cover img {
    display: block;
    width: auto;
    height: 78px;
    max-width: 310px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.operations-report-kicker {
    display: inline-flex;
    padding: 7px 11px;
    border: 1px solid #b9d98e;
    border-radius: 999px;
    background: #f1fae8;
    color: #3f6f0b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.operations-report-cover h3 {
    margin: 15px auto 8px;
    max-width: 800px;
    color: #14223a;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.16;
}

.operations-report-cover > p {
    max-width: 760px;
    margin: 0 auto;
    color: #66738a;
    font-size: 15px;
    line-height: 1.65;
}

.operations-report-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    max-width: 940px;
    margin: 26px auto 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d5deea;
    border-radius: 15px;
    text-align: left;
    background: rgba(255, 255, 255, 0.9);
}

.operations-report-meta div {
    min-width: 0;
    padding: 13px 15px;
}

.operations-report-meta div + div {
    border-left: 1px solid #dfe6f0;
}

.operations-report-meta dt {
    margin-bottom: 5px;
    color: #8a98ae;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.operations-report-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #27344c;
    font-size: 13px;
    font-weight: 700;
}

.operations-report-section {
    padding: 30px 34px;
    border-bottom: 1px solid #dfe6ef;
}

.operations-report-section:last-child {
    border-bottom: 0;
}

.operations-report-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.operations-report-section-heading h3 {
    margin: 4px 0 0;
    color: #17243b;
    font-size: 20px;
}

.operations-report-section-heading > p {
    max-width: 430px;
    margin: 0;
    color: #748198;
    font-size: 13px;
    text-align: right;
}

.operations-report-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-report-metric {
    position: relative;
    display: grid;
    min-height: 132px;
    padding: 16px;
    border: 1px solid #d6dfeb;
    border-radius: 15px;
    color: inherit;
    text-decoration: none;
    background: #fbfcff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.operations-report-metric.has-items:hover,
.operations-report-metric.has-items:focus-visible {
    border-color: #91c952;
    background: #fbfff7;
    box-shadow: 0 10px 24px rgba(72, 119, 23, 0.11);
    transform: translateY(-2px);
}

.operations-report-metric > span {
    color: #65738a;
    font-size: 12px;
    font-weight: 750;
}

.operations-report-metric strong {
    align-self: end;
    color: #17243b;
    font-size: 30px;
    line-height: 1;
}

.operations-report-metric small {
    margin-top: 6px;
    color: #8793a7;
    font-size: 11px;
}

.operations-report-metric em {
    position: absolute;
    top: 15px;
    right: 14px;
    color: #94a0b1;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.operations-report-metric.has-items em {
    color: #5b8f24;
}

.operations-report-trends {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.operations-report-trend {
    padding: 17px;
    border: 1px solid #d9e1ec;
    border-radius: 15px;
    background: #fff;
}

.operations-report-trend > span,
.operations-report-trend strong,
.operations-report-trend small {
    display: block;
}

.operations-report-trend > span {
    color: #66748b;
    font-size: 12px;
    font-weight: 750;
}

.operations-report-trend strong {
    margin-top: 9px;
    color: #17243b;
    font-size: 25px;
}

.operations-report-trend small {
    margin-top: 7px;
    color: #7c899c;
    font-size: 11px;
    font-weight: 700;
}

.operations-report-trend small.is-up {
    color: #4d7f1b;
}

.operations-report-trend small.is-down {
    color: #a15232;
}

.operations-report-actions-section {
    background: linear-gradient(135deg, #fffdf7, #fbfcff);
}

.operations-report-actions {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    counter-reset: report-action;
    list-style: none;
}

.operations-report-actions li {
    position: relative;
    min-height: 42px;
    padding: 11px 14px 11px 49px;
    border: 1px solid #e0e5ed;
    border-radius: 12px;
    color: #354158;
    font-size: 13px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.82);
    counter-increment: report-action;
}

.operations-report-actions li::before {
    position: absolute;
    top: 9px;
    left: 11px;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    content: counter(report-action);
    color: #4e7f1c;
    font-size: 11px;
    font-weight: 850;
    background: #edf8e2;
}

.operations-report-detail-groups {
    display: grid;
    gap: 10px;
}

.operations-report-detail-group {
    scroll-margin-top: 24px;
    overflow: hidden;
    border: 1px solid #d5dfeb;
    border-radius: 14px;
    background: #fff;
}

.operations-report-detail-group[open] {
    border-color: #b8c7da;
    box-shadow: 0 9px 22px rgba(28, 46, 71, 0.06);
}

.operations-report-detail-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 17px;
    cursor: pointer;
    list-style: none;
    color: #26344b;
    font-size: 13px;
    font-weight: 800;
    background: #fafcff;
}

.operations-report-detail-group > summary::-webkit-details-marker {
    display: none;
}

.operations-report-detail-group > summary::after {
    margin-left: 4px;
    content: "⌄";
    color: #78869b;
    font-size: 16px;
    transition: transform 160ms ease;
}

.operations-report-detail-group[open] > summary::after {
    transform: rotate(180deg);
}

.operations-report-detail-group > summary strong {
    display: inline-flex;
    min-width: 30px;
    height: 25px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 999px;
    color: #425068;
    font-size: 11px;
    background: #e9eef5;
}

.operations-report-record-list {
    display: grid;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid #e2e8f1;
    background: #f8faff;
}

.operations-report-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 15px;
    border: 1px solid #dbe3ed;
    border-radius: 12px;
    background: #fff;
}

.operations-report-record-main {
    min-width: 0;
}

.operations-report-record-main > span {
    display: block;
    margin-bottom: 4px;
    color: #3e70aa;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.operations-report-record-main h4 {
    margin: 0;
    color: #202d44;
    font-size: 14px;
}

.operations-report-record-main dl {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 15px;
    margin: 9px 0 0;
}

.operations-report-record-main dl div {
    display: inline-flex;
    gap: 5px;
    color: #738096;
    font-size: 11px;
}

.operations-report-record-main dt {
    font-weight: 800;
}

.operations-report-record-main dd {
    margin: 0;
}

.operations-report-record-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
}

.operations-report-record-actions > a {
    padding: 7px 10px;
    border: 1px solid #cbd7e5;
    border-radius: 9px;
    color: #20314d;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
}

.operations-report-record-actions > a:hover,
.operations-report-record-actions > a:focus-visible {
    border-color: #87bc4a;
    color: #416d16;
    background: #f7fcef;
}

.operations-report-detail-empty {
    margin: 0;
    padding: 15px 17px;
    border-top: 1px solid #e2e8f1;
    color: #7c899e;
    font-size: 12px;
}

.operations-report-archive {
    position: sticky;
    top: 18px;
    overflow: hidden;
    padding: 0;
}

.operations-report-archive-heading {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #dfe6ef;
}

.operations-report-archive-heading h3 {
    margin: 4px 0 3px;
    color: #19263e;
    font-size: 18px;
}

.operations-report-archive-heading p {
    margin: 0;
    color: #7a879b;
    font-size: 12px;
}

.operations-report-archive-list {
    display: grid;
    gap: 7px;
    padding: 10px;
}

.operations-report-archive-list a {
    display: grid;
    gap: 3px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    background: #f7f9fc;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.operations-report-archive-list a:hover,
.operations-report-archive-list a:focus-visible {
    border-color: #bdcadd;
    background: #fff;
    transform: translateX(-2px);
}

.operations-report-archive-list a.is-active {
    border-color: #9bca65;
    background: #f2f9e9;
    box-shadow: inset 3px 0 0 #74b72f;
}

.operations-report-archive-list a span {
    color: #718098;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.operations-report-archive-list a strong {
    color: #26334a;
    font-size: 12px;
}

.operations-report-archive-list a small {
    color: #8a96a8;
    font-size: 10px;
}

.operations-report-archive-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-top: 1px solid #e0e6ef;
    color: #7b879a;
    font-size: 11px;
}

.operations-report-archive-pagination a {
    color: #456f1c;
    font-weight: 800;
    text-decoration: none;
}

.operations-report-empty {
    display: grid;
    min-height: 360px;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 42px;
    text-align: center;
}

.operations-report-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    color: #5b9220;
    background: #eef8e4;
}

.operations-report-empty-icon svg {
    width: 26px;
    height: 26px;
}

.operations-report-empty h3,
.operations-report-empty p {
    margin: 0;
}

.operations-report-empty p {
    max-width: 620px;
    color: #748197;
}

@media (max-width: 1180px) {
    .operations-report-layout {
        grid-template-columns: 1fr;
    }

    .operations-report-archive {
        position: static;
        grid-row: 1;
    }

    .operations-report-archive-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .operations-report-cover,
    .operations-report-section {
        padding: 24px;
    }

    .operations-report-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operations-report-meta div:nth-child(3) {
        border-left: 0;
        border-top: 1px solid #dfe6f0;
    }

    .operations-report-meta div:nth-child(4) {
        border-top: 1px solid #dfe6f0;
    }

    .operations-report-metrics,
    .operations-report-trends {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operations-report-archive-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .operations-report-loading-indicator {
        top: 142px;
        right: 14px;
    }

    .operations-reports-hero .section-heading,
    .operations-report-section-heading,
    .operations-report-record {
        align-items: stretch;
        flex-direction: column;
    }

    .operations-reports-hero .button-ghost {
        width: 100%;
        justify-content: center;
    }

    .operations-report-cover,
    .operations-report-section {
        padding: 20px 17px;
    }

    .operations-report-cover img {
        height: 62px;
        max-width: 260px;
    }

    .operations-report-meta,
    .operations-report-metrics,
    .operations-report-trends,
    .operations-report-archive-list {
        grid-template-columns: 1fr;
    }

    .operations-report-meta div + div {
        border-top: 1px solid #dfe6f0;
        border-left: 0;
    }

    .operations-report-section-heading > p {
        text-align: left;
    }

    .operations-report-record-actions {
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    .operations-report-loading-indicator > span {
        animation: none;
    }
}

/* Part workspace: calm, scan-friendly inventory-by-location cards. */
.part-stock-location-panel {
    gap: 16px;
}

.part-stock-location-panel .part-stock-workbench-heading {
    align-items: center;
    margin-bottom: 0;
}

.part-stock-workbench-intro {
    max-width: 620px;
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.5;
}

.part-stock-location-count {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 750;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.part-stock-location-count strong {
    color: var(--ink);
    font-size: 0.9rem;
}

.part-stock-location-panel .part-workspace-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
}

.part-stock-location-panel .part-stock-workbench-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
}

.part-stock-location-panel .part-stock-workbench-table thead {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin: 0 0 8px;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
}

.part-stock-location-panel .part-stock-workbench-table thead tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    border: 0;
    background: transparent;
}

.part-stock-location-panel .part-stock-workbench-table thead tr::before {
    content: "Sort locations:";
    margin-right: 2px;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.part-stock-location-panel .part-stock-workbench-table thead th {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    color: var(--ink-soft);
    font-size: 0.68rem;
    background: transparent;
}

.part-stock-location-panel .part-stock-workbench-table .table-sort-link {
    min-height: 29px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.68rem;
    background: var(--panel);
}

.part-stock-location-panel .part-stock-workbench-table .table-sort-link:hover,
.part-stock-location-panel .part-stock-workbench-table .table-sort-link:focus-visible,
.part-stock-location-panel .part-stock-workbench-table .table-sort-link.is-active {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    color: var(--ink);
    background: color-mix(in srgb, var(--accent-soft) 54%, var(--panel));
}

.part-stock-location-panel .part-stock-workbench-table tbody {
    display: grid;
    gap: 11px;
}

.part-stock-location-panel .part-stock-live-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(88px, 112px));
    grid-template-areas:
        "location hand order minimum"
        "actions actions actions actions";
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
    box-shadow: 0 5px 16px rgba(31, 44, 63, 0.045);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.part-stock-location-panel .part-stock-live-row:hover,
.part-stock-location-panel .part-stock-live-row:focus-within {
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    box-shadow: 0 8px 22px rgba(31, 44, 63, 0.075);
}

.part-stock-location-panel .part-stock-live-row > td {
    display: block;
    min-width: 0;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel-soft) 66%, var(--panel));
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(1) {
    grid-area: hand;
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(2) {
    grid-area: order;
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(3) {
    grid-area: minimum;
}

.part-stock-location-panel .part-stock-live-row > .part-stock-location-cell {
    grid-area: location;
    border-radius: 14px 0 0 0;
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(3) {
    border-radius: 0 14px 0 0;
}

.part-stock-location-panel .part-stock-live-row > .part-stock-action-cell {
    grid-area: actions;
    width: auto;
    min-width: 0;
    padding-block: 12px;
    overflow: visible;
    border-bottom: 0;
    border-radius: 0 0 14px 14px;
    background: var(--panel);
}

.part-stock-location-panel .part-stock-value-cell,
.part-stock-location-panel .part-stock-location-cell {
    display: grid;
    align-content: center;
    gap: 4px;
}

.part-stock-location-panel .part-stock-value-cell {
    border-left: 1px solid var(--line);
}

.part-stock-location-panel .part-stock-value-cell::before,
.part-stock-location-panel .part-stock-location-cell::before {
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.065em;
    line-height: 1.2;
    text-transform: uppercase;
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(1)::before {
    content: "On hand";
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(2)::before {
    content: "On order";
}

.part-stock-location-panel .part-stock-live-row > td:nth-child(3)::before {
    content: "Minimum";
}

.part-stock-location-panel .part-stock-location-cell::before {
    content: "Storage location";
}

.part-stock-location-panel .part-stock-value-pill,
.part-stock-location-panel .part-stock-value-label {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.2;
    text-align: left;
    background: transparent;
}

.part-stock-location-panel .part-stock-value-label.muted {
    color: var(--ink);
}

.part-stock-location-panel .part-stock-location-cell {
    min-width: 0;
}

.part-stock-location-panel .part-stock-location-cell strong {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.35;
}

.part-stock-location-panel .part-stock-location-cell span {
    margin-top: 0;
    font-size: 0.78rem;
}

.part-stock-location-panel .part-stock-row-tools {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
}

.part-stock-location-panel .part-stock-qty-entry {
    gap: 4px;
}

.part-stock-location-panel .part-stock-qty-entry span {
    font-size: 0.66rem;
}

.part-stock-location-panel .part-stock-qty-entry input {
    min-height: 40px;
    padding: 6px 9px;
    border-radius: 9px;
    text-align: center;
}

.part-stock-location-panel .part-stock-row-buttons {
    position: relative;
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.part-stock-location-panel .part-stock-primary-actions {
    display: flex;
    min-width: 0;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 7px;
}

.part-stock-location-panel .part-stock-row-buttons .button-ghost {
    width: auto;
    min-height: 40px;
    padding: 0 13px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.part-stock-location-panel [data-movement-type="add_on_hand"] {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    color: color-mix(in srgb, var(--accent-strong) 78%, var(--ink));
    background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel));
}

.part-stock-location-panel .part-stock-more-actions {
    position: relative;
    flex: 0 0 auto;
}

.part-stock-location-panel .part-stock-more-actions > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
    color: var(--ink-soft);
}

.part-stock-location-panel .part-stock-more-actions > summary::-webkit-details-marker {
    display: none;
}

.part-stock-location-panel .part-stock-more-actions > summary::after {
    content: "\2304";
    font-size: 0.82rem;
    line-height: 1;
    transition: transform 150ms ease;
}

.part-stock-location-panel .part-stock-more-actions[open] > summary {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--panel-soft);
}

.part-stock-location-panel .part-stock-more-actions[open] > summary::after {
    transform: rotate(180deg);
}

.part-stock-location-panel .part-stock-on-order-actions {
    position: absolute;
    z-index: 24;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: 190px;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--panel);
    box-shadow: 0 15px 34px rgba(31, 44, 63, 0.17);
}

.part-stock-location-panel .part-stock-live-row:last-child .part-stock-on-order-actions {
    top: auto;
    bottom: calc(100% + 7px);
}

.part-stock-location-panel .part-stock-on-order-actions .button-ghost {
    width: 100%;
    justify-content: flex-start;
}

.part-stock-location-panel .part-stock-workbench-note {
    margin: 0;
    color: var(--ink-muted);
}

.part-stock-location-panel .part-stock-workbench-note strong {
    color: var(--ink-soft);
}

.part-stock-location-panel .part-stock-workbench-table tbody > tr:not(.part-stock-live-row) {
    display: block;
    padding: 24px;
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
    color: var(--ink-soft);
    text-align: center;
    background: var(--panel-soft);
}

.part-stock-location-panel .part-stock-workbench-table tbody > tr:not(.part-stock-live-row) > td {
    display: block;
    padding: 0;
    border: 0;
}

body.theme-dark .part-stock-location-panel .part-stock-live-row {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

body.theme-dark .part-stock-location-panel .part-stock-value-pill,
body.theme-dark .part-stock-location-panel .part-stock-value-label {
    color: var(--ink);
    background: transparent;
}

body.theme-dark .part-stock-location-panel [data-movement-type="add_on_hand"] {
    color: var(--ink);
}

@media (max-width: 760px) {
    .part-stock-location-panel .part-stock-live-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "location location location"
            "hand order minimum"
            "actions actions actions";
    }

    .part-stock-location-panel .part-stock-location-cell {
        border-bottom: 1px solid var(--line);
        border-radius: 14px 14px 0 0;
    }

    .part-stock-location-panel .part-stock-live-row > td:nth-child(3) {
        border-radius: 0;
    }

    .part-stock-location-panel .part-stock-live-row > td:nth-child(1) {
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .part-stock-location-panel {
        padding: 17px;
    }

    .part-stock-location-panel .part-stock-workbench-heading {
        align-items: flex-start;
    }

    .part-stock-location-panel .part-stock-workbench-table thead tr {
        justify-content: flex-start;
    }

    .part-stock-location-panel .part-stock-location-count {
        min-height: 32px;
        padding: 5px 9px;
    }

    .part-stock-location-panel .part-stock-live-row > td {
        padding: 12px;
    }

    .part-stock-location-panel .part-stock-value-cell {
        padding-inline: 10px;
    }

    .part-stock-location-panel .part-stock-row-tools {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .part-stock-location-panel .part-stock-qty-entry {
        grid-template-columns: auto 74px;
        align-items: center;
        justify-content: start;
    }

    .part-stock-location-panel .part-stock-primary-actions {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-stock-location-panel .part-stock-primary-actions .button-ghost {
        width: 100%;
    }

    .part-stock-location-panel .part-stock-primary-actions [data-movement-type="receive_po"] {
        grid-column: 1 / -1;
    }

    .part-stock-location-panel .part-stock-more-actions {
        width: 100%;
    }

    .part-stock-location-panel .part-stock-more-actions > summary {
        width: 100%;
        justify-content: space-between;
    }

    .part-stock-location-panel .part-stock-on-order-actions {
        position: static;
        width: 100%;
        margin-top: 6px;
        box-shadow: none;
    }
}

/* Mobile usability pass: contain dense data, preserve reachable modal content,
   and keep the shared shell comfortable on touch screens. */
.notification-popover-head {
    background: color-mix(in srgb, var(--panel) 90%, var(--bg));
}

.notification-popover-head span,
.notification-clear-tray,
.notification-popover-copy span,
.notification-popover-empty span {
    color: var(--ink-soft);
}

.notification-mark-all,
.notification-popover-footer a {
    color: var(--accent-dark);
}

.notification-popover-item {
    color: var(--ink);
}

.notification-popover-copy time {
    color: var(--ink-muted);
}

.notification-popover-footer {
    background: color-mix(in srgb, var(--panel) 88%, var(--bg));
}

html:has(.modal-backdrop:not([hidden])),
body:has(.modal-backdrop:not([hidden])) {
    overflow: hidden;
}

.modal-backdrop {
    overscroll-behavior: contain;
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .primary-column,
    .sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    [data-live-search-root],
    [data-parts-live-region] {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .table-wrap,
    .table-wrap-auto,
    .mobile-table-region {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .mobile-table-region {
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--panel);
    }

    .mobile-table-region > .data-table {
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .app-sidebar.has-mobile-nav {
        padding: 8px 10px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-bar {
        gap: 7px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-brand {
        margin-bottom: 1px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-brand-logo {
        width: 140px;
        max-width: 140px;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-toggle {
        min-height: 50px;
        padding: 6px 10px;
        border-radius: 14px;
    }

    .app-sidebar.has-mobile-nav .mobile-notification-flyout .notification-trigger,
    .app-sidebar.has-mobile-nav .mobile-account-trigger {
        width: 50px;
        min-width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .app-sidebar.has-mobile-nav .sidebar-nav {
        display: none !important;
    }

    html.mobile-nav-overlay-open,
    html.mobile-nav-overlay-open body {
        overscroll-behavior: none;
    }

    .app-sidebar.has-mobile-nav .mobile-nav-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 10px;
        right: 10px;
        z-index: 95;
        display: none;
        gap: 8px;
        width: auto;
        max-height: calc(100dvh - 126px);
        margin: 0;
        padding: 10px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(35, 42, 50, 0.99) 0%, rgba(18, 23, 29, 0.99) 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.065),
            0 24px 46px rgba(4, 9, 15, 0.4);
    }

    .app-sidebar.has-mobile-nav.is-mobile-nav-open .mobile-nav-menu {
        display: grid;
        animation: mobile-nav-menu-enter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .mobile-nav-menu-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 3px 5px 7px;
        color: #f5f8fa;
    }

    .mobile-nav-menu-heading > div {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .mobile-nav-menu-heading strong {
        font-size: 0.84rem;
        line-height: 1.2;
    }

    .mobile-nav-menu-heading span {
        color: rgba(218, 226, 233, 0.66);
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .mobile-nav-menu-primary,
    .mobile-nav-menu-groups,
    .mobile-nav-section-items {
        min-width: 0;
        display: grid;
    }

    .mobile-nav-menu-groups {
        gap: 6px;
    }

    .mobile-nav-section {
        min-width: 0;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.055);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.025);
        transition: background 160ms ease, border-color 160ms ease;
    }

    .mobile-nav-section[open],
    .mobile-nav-section.is-active {
        border-color: rgba(124, 190, 40, 0.13);
        background: rgba(255, 255, 255, 0.04);
    }

    .mobile-nav-section-summary {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 12px;
        list-style: none;
        color: rgba(230, 237, 243, 0.82);
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.09em;
        line-height: 1;
        text-transform: uppercase;
        cursor: pointer;
        user-select: none;
    }

    .mobile-nav-section-summary::-webkit-details-marker {
        display: none;
    }

    .mobile-nav-section-summary:hover,
    .mobile-nav-section-summary:focus-visible {
        color: #fff;
        background: rgba(255, 255, 255, 0.035);
        outline: none;
    }

    .mobile-nav-section-summary:focus-visible {
        box-shadow: inset 0 0 0 1px rgba(157, 221, 77, 0.4);
    }

    .mobile-nav-section-chevron {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg) translate(-1px, -1px);
        transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .mobile-nav-section[open] .mobile-nav-section-chevron {
        transform: rotate(-135deg) translate(-1px, -1px);
    }

    .mobile-nav-section-items {
        gap: 3px;
        padding: 0 5px 6px;
    }

    .mobile-nav-link {
        min-width: 0;
        min-height: 48px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 5px 10px;
        border: 1px solid transparent;
        border-radius: 11px;
        color: #edf2f6;
        text-decoration: none;
        transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus-visible {
        border-color: rgba(124, 190, 40, 0.17);
        background: rgba(124, 190, 40, 0.085);
        color: #c9f29a;
        text-decoration: none;
        outline: none;
    }

    .mobile-nav-link:focus-visible {
        box-shadow: inset 0 0 0 1px rgba(157, 221, 77, 0.44);
    }

    .mobile-nav-link.is-active {
        border-color: rgba(124, 190, 40, 0.24);
        background: rgba(124, 190, 40, 0.18);
        color: #fff;
        box-shadow: inset 3px 0 0 #7cbe28;
    }

    .mobile-nav-menu-primary > .mobile-nav-link {
        border-color: rgba(255, 255, 255, 0.055);
        background: rgba(255, 255, 255, 0.035);
    }

    .mobile-nav-menu-primary > .mobile-nav-link.is-active {
        border-color: rgba(124, 190, 40, 0.24);
        background: rgba(124, 190, 40, 0.18);
    }

    .mobile-nav-link .nav-token {
        width: 30px;
        height: 30px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.07);
        color: #8bd22f;
    }

    .mobile-nav-link.is-active .nav-token {
        background: #7cbe28;
        color: #14200d;
    }

    .mobile-nav-link-copy {
        min-width: 0;
        display: grid;
        gap: 1px;
    }

    .mobile-nav-link-copy strong,
    .mobile-nav-link-copy small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-link-copy strong {
        font-size: 0.86rem;
        line-height: 1.18;
    }

    .mobile-nav-link-copy small {
        color: rgba(215, 224, 231, 0.62);
        font-size: 0.69rem;
        line-height: 1.18;
    }

    .mobile-nav-link.is-active .mobile-nav-link-copy small {
        color: rgba(235, 246, 224, 0.72);
    }

    .mobile-notification-flyout .notification-popover {
        top: 122px;
        max-height: calc(100dvh - 134px);
    }

    .notification-popover-list {
        max-height: calc(100dvh - 260px);
    }

    .page-dashboard .topbar .shell-controls > .notification-flyout,
    .page-dashboard .topbar .shell-controls > .account-flyout {
        display: none;
    }

    .wo-workspace-tabs,
    .wo-task-panel-tabs,
    .notification-filter-tabs,
    .settings-section-nav,
    .settings-anchor-nav-links {
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .wo-workspace-tabs::-webkit-scrollbar,
    .wo-task-panel-tabs::-webkit-scrollbar,
    .notification-filter-tabs::-webkit-scrollbar,
    .settings-section-nav::-webkit-scrollbar,
    .settings-anchor-nav-links::-webkit-scrollbar {
        display: none;
    }

    .wo-workspace-tab,
    .wo-task-panel-tab,
    .notification-filter-tabs > * {
        flex: 0 0 auto;
        min-height: 44px;
        scroll-snap-align: start;
    }

    .settings-section-nav-link,
    .settings-anchor-nav-links > a {
        min-height: 44px;
        scroll-snap-align: center;
    }

    .table-sort-link,
    .notification-mark-all,
    .notification-clear-tray,
    .notification-popover-footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .notification-popover-head-actions {
        gap: 5px 12px;
    }

    .maps-stage-branches .maps-canvas-shell {
        order: -1;
    }

    .maps-canvas-shell-branches {
        min-height: 0;
    }

    .location-map-console.location-map-branches {
        min-height: max(360px, 52dvh);
    }

    .operations-report-document {
        grid-row: 1;
    }

    .operations-report-archive {
        grid-row: 2;
    }
}

@media (max-width: 640px) {
    .page-dashboard .topbar,
    .page-dashboard .topbar-meta {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .page-dashboard .topbar-chip-row {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        padding: 1px 2px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .page-dashboard .topbar-chip-row::-webkit-scrollbar {
        display: none;
    }

    .page-dashboard .topbar-chip-row > *,
    .page-dashboard .topbar-chip-row .toolbar-chip:last-child:nth-child(odd) {
        flex: 0 0 min(42vw, 150px);
        width: min(42vw, 150px);
        max-width: 150px;
        min-height: 62px;
        grid-column: auto;
        scroll-snap-align: start;
    }

    .wo-workspace-card {
        display: block;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .wo-workspace-card > .wo-workspace-head {
        position: sticky;
        top: 0;
        z-index: 35;
        margin-bottom: 0;
    }

    .wo-workspace-head,
    .wo-workspace-toolbar,
    .wo-workspace-tabs,
    .wo-summary-strip,
    .wo-alert-stack,
    .wo-workspace-body {
        padding-inline: 14px;
    }

    .wo-workspace-head {
        padding-top: 15px;
        padding-bottom: 13px;
    }

    .wo-workspace-head-copy {
        gap: 5px;
    }

    .wo-workspace-head-copy h2 {
        font-size: clamp(1.3rem, 6vw, 1.55rem);
    }

    .wo-workspace-head-copy p {
        font-size: 0.9rem;
    }

    .wo-workspace-toolbar {
        gap: 14px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .wo-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wo-summary-metric,
    .po-workspace-card .wo-summary-strip > * {
        min-width: 0;
        padding: 12px 10px 13px;
        border-right: 1px solid rgba(201, 210, 223, 0.72);
        border-bottom: 1px solid rgba(201, 210, 223, 0.72);
    }

    .wo-summary-metric:nth-child(2n),
    .po-workspace-card .wo-summary-strip > *:nth-child(2n) {
        border-right: 0;
    }

    .wo-summary-metric:nth-last-child(-n + 2),
    .po-workspace-card .wo-summary-strip > *:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .wo-summary-metric:last-child,
    .po-workspace-card .wo-summary-strip > *:last-child {
        border-right: 0;
    }

    .wo-workspace-tabs {
        align-items: stretch;
        gap: 17px;
        padding-top: 4px;
    }

    .wo-workspace-body {
        height: auto;
        min-height: 260px;
        overflow: visible;
    }

    .wo-workspace-backdrop[data-request-workspace] .wo-workspace-toolbar > .page-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .wo-workspace-backdrop[data-request-workspace] .request-approve-form,
    .wo-workspace-backdrop[data-request-workspace] [data-request-linked-action] {
        grid-column: 1 / -1;
    }

    .wo-workspace-backdrop[data-request-workspace] .page-actions > form:not(.request-approve-form),
    .wo-workspace-backdrop[data-request-workspace] .page-actions > form:not(.request-approve-form) > button {
        width: 100%;
    }

    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-actions {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 0;
        width: 100%;
        padding: 10px 0 12px;
        border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
        border-radius: 15px;
        background: color-mix(in srgb, var(--panel-soft) 72%, transparent);
    }

    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-actions::before {
        content: "Quick actions";
        flex: 0 0 100%;
        padding: 0 12px 3px;
        color: var(--ink-muted);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        line-height: 1.2;
        text-align: left;
        text-transform: uppercase;
    }

    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-action {
        flex: 0 0 calc(100% / 6);
        width: auto;
        min-width: 0;
        height: 46px;
        border: 4px solid transparent;
        border-radius: 14px;
        background-clip: padding-box;
        box-shadow:
            inset 0 0 0 1px color-mix(in srgb, var(--line) 78%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.56);
    }

    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-action:hover,
    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-action:focus-visible,
    .wo-workspace-backdrop[data-work-order-workspace] .wo-quick-action.is-active {
        border-color: transparent;
        box-shadow:
            inset 0 0 0 1px rgba(124, 190, 40, 0.42),
            inset 0 1px 0 rgba(255, 255, 255, 0.62);
    }

    .wo-inline-panel {
        left: 50%;
        display: none;
        flex-direction: column;
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 18px;
    }

    .wo-inline-panel.is-visible {
        display: flex;
    }

    .wo-inline-panel-head {
        flex: 0 0 auto;
        padding: 14px 16px;
    }

    .wo-inline-panel-form,
    .wo-task-panel-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        padding: 16px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .wo-task-panel-tabs {
        gap: 16px;
        margin-bottom: 14px;
    }

    .wo-editor-modal > .modal-header {
        min-height: 0;
        padding: 16px 66px 16px 18px;
    }

    .wo-editor-modal > .modal-header p:not(.card-label),
    .wo-editor-modal > .modal-header .modal-header-copy {
        display: none;
    }

    .wo-editor-modal > .modal-header > .button-ghost {
        top: 14px;
        right: 14px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        padding: 0;
        overflow: hidden;
        font-size: 0;
    }

    .part-editor-modal-identity {
        gap: 12px;
    }

    .part-editor-modal-thumbnail {
        width: 58px;
        height: 58px;
        padding: 4px;
    }

    .part-inline-vendor-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-inline-vendor-head {
        align-items: flex-start;
    }

    .part-editor-sourcing-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .wo-editor-modal > .modal-header > .button-ghost::before {
        content: "\00d7";
        font-size: 1.55rem;
        font-weight: 500;
        line-height: 1;
    }

    .wo-editor-footer-copy:not(:has(button)) {
        display: none;
    }

    .wo-editor-footer-copy:has(button) {
        display: block;
    }

    .wo-editor-footer-copy > strong,
    .wo-editor-footer-copy > span {
        display: none;
    }

    .wo-editor-footer {
        padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    }

    .wo-editor-footer-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .wo-editor-footer-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .notification-settings-savebar {
        position: sticky;
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 18;
        gap: 10px;
        padding: 12px;
        border-radius: 13px;
    }

    .notification-settings-savebar span {
        display: none;
    }

    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select,
    textarea {
        font-size: 16px;
    }

    .scheduler-scale-button,
    .pagination a,
    .pagination button,
    .pagination .button-ghost {
        min-height: 44px;
    }

    .purchase-order-line-part-search {
        min-height: 44px !important;
        font-size: 16px !important;
    }

    .button-ghost,
    .button-ghost.button-ghost-sm,
    .button-ghost.button-ghost-small,
    .purchase-order-editor-form .purchase-order-line-expand,
    .purchase-order-editor-form .purchase-order-line-remove,
    .purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove,
    .leaflet-control-zoom-in,
    .leaflet-control-zoom-out {
        min-width: 44px;
        min-height: 44px;
    }

    .idea-status-board,
    .idea-status-board.is-horizontal {
        display: flex;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        height: min(620px, calc(100dvh - 160px));
        min-height: 440px;
        padding: 1px 2px 9px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .idea-board-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .idea-status-board {
        min-width: 0;
    }

    .idea-status-board::-webkit-scrollbar {
        display: none;
    }

    .idea-board-column,
    .idea-board-column.is-horizontal {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        height: 100%;
        flex: 0 0 min(84vw, 330px);
        width: min(84vw, 330px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-snap-align: start;
        scrollbar-width: thin;
    }

    .idea-board-column-head {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 4px 2px 10px;
        background: color-mix(in srgb, var(--panel) 92%, var(--panel-soft));
    }

    .idea-board-card-stack.is-horizontal {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 860px) and (pointer: coarse) {
    .button-ghost,
    .button-ghost.button-ghost-sm,
    .button-ghost.button-ghost-small,
    .purchase-order-editor-form .purchase-order-line-expand,
    .purchase-order-editor-form .purchase-order-line-remove,
    .purchase-order-editor-form .purchase-order-line-card.is-collapsed .purchase-order-line-remove,
    .leaflet-control-zoom-in,
    .leaflet-control-zoom-out {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Work-order table: retain the sortable desktop register while presenting each
   result as a compact, glanceable record on phones. */
.work-orders-select-all-control > span {
    display: none;
}

.requests-select-all-control > span {
    display: none;
}

@media (max-width: 700px) {
    .work-orders-table-card {
        padding: 12px;
    }

    .work-orders-table-region {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .table-wrap-auto.work-orders-table-region > .work-orders-responsive-table {
        display: block;
        width: 100%;
        min-width: 0;
        border: 0;
        background: transparent;
    }

    .work-orders-responsive-table thead,
    .work-orders-responsive-table tbody,
    .work-orders-responsive-table thead tr,
    .work-orders-responsive-table tbody tr,
    .work-orders-responsive-table th,
    .work-orders-responsive-table td {
        box-sizing: border-box;
    }

    .work-orders-responsive-table thead {
        display: block;
        margin-bottom: 9px;
    }

    .work-orders-responsive-table thead tr {
        display: block;
    }

    .work-orders-responsive-table thead th {
        display: none;
    }

    .work-orders-responsive-table thead .work-orders-select-all {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .work-orders-select-all-control {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: color-mix(in srgb, var(--panel) 90%, var(--panel-soft));
        color: var(--ink-soft);
        font-size: 0.76rem;
        font-weight: 750;
        letter-spacing: 0;
        text-transform: none;
        cursor: pointer;
    }

    .work-orders-select-all-control > span {
        display: inline;
    }

    .work-orders-select-all-control input,
    .work-orders-row-check input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--accent);
    }

    .work-orders-responsive-table tbody {
        display: grid;
        gap: 10px;
    }

    .work-orders-responsive-table .work-orders-table-row {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "code select"
            "summary summary"
            "asset asset"
            "status priority"
            "assigned due";
        gap: 9px 12px;
        width: 100%;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: var(--panel);
        box-shadow: 0 8px 22px rgba(20, 32, 48, 0.055);
    }

    .work-orders-responsive-table .work-orders-table-row:hover {
        border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    }

    .work-orders-responsive-table .work-orders-table-row > td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .work-orders-responsive-table .work-orders-table-select {
        grid-area: select;
        justify-self: end;
        align-self: start;
    }

    .work-orders-row-check {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        margin: -7px -7px 0 0;
        border-radius: 11px;
        background: var(--panel-soft);
        cursor: pointer;
    }

    .work-orders-responsive-table .work-orders-table-media {
        display: none;
    }

    .work-orders-responsive-table .work-orders-table-code {
        grid-area: code;
        align-self: center;
    }

    .work-orders-responsive-table .work-orders-table-code::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--ink-muted);
        font-size: 0.63rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .work-orders-responsive-table .work-orders-table-code a {
        font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
        font-size: 0.88rem;
        font-weight: 800;
    }

    .work-orders-responsive-table .work-orders-table-summary {
        grid-area: summary;
    }

    .work-orders-responsive-table .work-orders-table-summary a {
        display: block;
        color: var(--ink);
        font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .work-orders-responsive-table .work-orders-table-summary a:hover {
        color: var(--accent-dark);
        text-decoration: none;
    }

    .work-orders-responsive-table .work-orders-table-asset {
        grid-area: asset;
        padding-bottom: 9px;
        border-bottom: 1px solid var(--line);
    }

    .work-orders-responsive-table .work-orders-table-status {
        grid-area: status;
    }

    .work-orders-responsive-table .work-orders-table-priority {
        grid-area: priority;
        justify-self: end;
        text-align: right;
    }

    .work-orders-responsive-table .work-orders-table-assigned {
        grid-area: assigned;
    }

    .work-orders-responsive-table .work-orders-table-due {
        grid-area: due;
        justify-self: end;
        text-align: right;
    }

    .work-orders-responsive-table .work-orders-table-asset,
    .work-orders-responsive-table .work-orders-table-assigned,
    .work-orders-responsive-table .work-orders-table-due {
        color: var(--ink-soft);
        font-size: 0.79rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .work-orders-responsive-table .work-orders-table-asset::before,
    .work-orders-responsive-table .work-orders-table-assigned::before,
    .work-orders-responsive-table .work-orders-table-due::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--ink-muted);
        font-size: 0.61rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .work-orders-responsive-table .work-orders-table-status::before,
    .work-orders-responsive-table .work-orders-table-priority::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--ink-muted);
        font-size: 0.61rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .work-orders-responsive-table tbody > tr:not(.work-orders-table-row),
    .work-orders-responsive-table .work-orders-table-empty-row {
        display: block;
        padding: 18px;
        border: 1px dashed var(--line-strong);
        border-radius: 14px;
        background: var(--panel-soft);
    }

    .work-orders-responsive-table tbody > tr:not(.work-orders-table-row) > td,
    .work-orders-responsive-table .work-orders-table-empty {
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        color: var(--ink-soft);
        text-align: center;
    }
}

/* Request intake table: use the same glanceable mobile register treatment as
   work orders while keeping the sortable desktop table untouched. */
@media (max-width: 700px) {
    .view-toggle-card-desktop {
        display: none !important;
    }

    .view-toggle-group .view-toggle-card-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .view-toggle-group .view-toggle-card-mobile.is-active {
        pointer-events: none;
    }

    .work-order-board,
    .work-order-board.is-horizontal,
    .work-order-board.is-vertical {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .work-order-column.is-horizontal {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .work-order-column.is-horizontal .work-order-column-head {
        position: static;
    }

    .work-order-card-stack,
    .work-order-card-stack.is-horizontal {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .work-order-card,
    .work-order-card.is-horizontal {
        width: 100%;
        min-height: 0;
        grid-template-rows: none;
    }

    .work-order-card.is-horizontal h3,
    .work-order-card.is-horizontal > p:not(.work-order-card-assignee) {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .work-order-card-stack.is-horizontal .work-order-card-empty {
        min-height: 0;
        place-items: initial;
        text-align: left;
    }

    .requests-table-card {
        padding: 12px;
    }

    .requests-table-region {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .table-wrap-auto.requests-table-region > .requests-responsive-table {
        display: block;
        width: 100%;
        min-width: 0;
        border: 0;
        background: transparent;
    }

    .requests-responsive-table thead,
    .requests-responsive-table tbody,
    .requests-responsive-table thead tr,
    .requests-responsive-table tbody tr,
    .requests-responsive-table th,
    .requests-responsive-table td {
        box-sizing: border-box;
    }

    .requests-responsive-table thead {
        display: block;
        margin-bottom: 9px;
    }

    .requests-responsive-table thead tr {
        display: block;
    }

    .requests-responsive-table thead th {
        display: none;
    }

    .requests-responsive-table thead .requests-select-all {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .requests-select-all-control {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: color-mix(in srgb, var(--panel) 90%, var(--panel-soft));
        color: var(--ink-soft);
        font-size: 0.76rem;
        font-weight: 750;
        letter-spacing: 0;
        text-transform: none;
        cursor: pointer;
    }

    .requests-select-all-control > span {
        display: inline;
    }

    .requests-select-all-control input,
    .requests-row-check input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--accent);
    }

    .requests-responsive-table tbody {
        display: grid;
        gap: 10px;
    }

    .requests-responsive-table .requests-table-row {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "code select"
            "title title"
            "asset asset"
            "status priority"
            "requester created";
        gap: 9px 12px;
        width: 100%;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: var(--panel);
        box-shadow: 0 8px 22px rgba(20, 32, 48, 0.055);
    }

    .requests-responsive-table .requests-table-row:hover {
        border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    }

    .requests-responsive-table .requests-table-row > td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .requests-responsive-table .requests-table-select {
        grid-area: select;
        justify-self: end;
        align-self: start;
    }

    .requests-row-check {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        margin: -7px -7px 0 0;
        border-radius: 11px;
        background: var(--panel-soft);
        cursor: pointer;
    }

    .requests-responsive-table .requests-table-media {
        display: none;
    }

    .requests-responsive-table .requests-table-code {
        grid-area: code;
        align-self: center;
    }

    .requests-responsive-table .requests-table-code::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--ink-muted);
        font-size: 0.63rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .requests-responsive-table .requests-table-code a {
        font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
        font-size: 0.88rem;
        font-weight: 800;
    }

    .requests-responsive-table .requests-table-title {
        grid-area: title;
    }

    .requests-responsive-table .requests-table-title a {
        display: block;
        color: var(--ink);
        font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .requests-responsive-table .requests-table-title a:hover {
        color: var(--accent-dark);
        text-decoration: none;
    }

    .requests-responsive-table .requests-table-asset {
        grid-area: asset;
        padding-bottom: 9px;
        border-bottom: 1px solid var(--line);
    }

    .requests-responsive-table .requests-table-status {
        grid-area: status;
    }

    .requests-responsive-table .requests-table-priority {
        grid-area: priority;
        justify-self: end;
        text-align: right;
    }

    .requests-responsive-table .requests-table-requester {
        grid-area: requester;
    }

    .requests-responsive-table .requests-table-created {
        grid-area: created;
        justify-self: end;
        text-align: right;
    }

    .requests-responsive-table .requests-table-asset,
    .requests-responsive-table .requests-table-requester,
    .requests-responsive-table .requests-table-created {
        color: var(--ink-soft);
        font-size: 0.79rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .requests-responsive-table .requests-table-asset::before,
    .requests-responsive-table .requests-table-requester::before,
    .requests-responsive-table .requests-table-created::before,
    .requests-responsive-table .requests-table-status::before,
    .requests-responsive-table .requests-table-priority::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--ink-muted);
        font-size: 0.61rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .requests-responsive-table tbody > tr:not(.requests-table-row),
    .requests-responsive-table .requests-table-empty-row {
        display: block;
        padding: 18px;
        border: 1px dashed var(--line-strong);
        border-radius: 14px;
        background: var(--panel-soft);
    }

    .requests-responsive-table tbody > tr:not(.requests-table-row) > td,
    .requests-responsive-table .requests-table-empty {
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        color: var(--ink-soft);
        text-align: center;
    }
}

/* Shared mobile register treatment: keep primary records readable without a
   horizontally scrolling desktop table. */
@media (max-width: 700px) {
    .register-list-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 12px !important;
    }

    .register-list-heading > :first-child,
    .register-list-heading .register-primary-create {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .register-list-heading .register-primary-create {
        min-height: 46px;
    }

    .register-view-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
        gap: 7px;
        margin: 0 0 16px;
        padding-bottom: 14px;
    }

    .register-view-toolbar .view-toggle-group {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
    }

    .register-view-toolbar .view-toggle-group > * {
        width: 100%;
        min-width: 0;
    }

    .register-view-toolbar > .register-view-utility,
    .register-view-utility-group {
        width: 100%;
        min-width: 0;
    }

    .register-view-utility-group {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    }

    .register-view-toolbar > .register-view-utility,
    .register-view-utility-group > * {
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table-region {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    /* Once a table becomes a stack of self-contained record cards, the
       desktop scroll region should no longer draw a second card around it. */
    .mobile-table-region.mobile-card-table-region {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .mobile-card-table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        border: 0;
        background: transparent;
    }

    .mobile-card-table thead,
    .mobile-card-table thead tr {
        display: block;
        width: 100%;
    }

    .mobile-card-table thead th {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .mobile-card-table thead .mobile-card-table-select-all {
        position: static;
        display: block;
        width: 100%;
        height: auto;
        margin: 0 0 10px;
        padding: 10px 12px;
        overflow: visible;
        clip: auto;
        white-space: normal;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--panel-soft);
        text-align: left;
    }

    .mobile-card-table-select-all > label,
    .mobile-card-table-select-all-control {
        display: flex;
        align-items: center;
        gap: 9px;
        min-height: 24px;
        color: var(--ink-soft);
        font-size: 0.76rem;
        font-weight: 800;
        cursor: pointer;
    }

    .mobile-card-table-select-all input,
    .mobile-card-table-row-check input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: var(--accent);
    }

    .mobile-card-table tbody {
        display: grid;
        width: 100%;
        gap: 24px;
    }

    .mobile-card-table .mobile-card-table-row {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        gap: 10px 12px;
        width: 100%;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: var(--panel);
        box-shadow: 0 8px 22px rgba(20, 32, 48, 0.055);
    }

    .mobile-card-table .mobile-card-table-row:hover {
        border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    }

    .mobile-card-table .mobile-card-table-row > .mobile-card-cell {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .mobile-card-table .mobile-card-media {
        display: none !important;
    }

    .mobile-card-table .mobile-card-select {
        position: absolute;
        z-index: 1;
        top: 10px;
        right: 10px;
    }

    .mobile-card-table-row-check {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border-radius: 11px;
        background: var(--panel-soft);
        cursor: pointer;
    }

    .mobile-card-table .mobile-card-primary {
        order: 10;
        grid-column: 1 / -1;
        min-height: 25px;
    }

    .mobile-card-table .mobile-card-select ~ .mobile-card-primary {
        padding-right: 42px;
    }

    .mobile-card-table .mobile-card-primary > a,
    .mobile-card-table .mobile-card-primary > strong,
    .mobile-card-table .mobile-card-primary h3 {
        color: var(--ink);
        font-family: "Space Grotesk", "Aptos Display", "Franklin Gothic Medium", sans-serif;
        font-size: 0.98rem;
        font-weight: 800;
        line-height: 1.3;
    }

    .mobile-card-table .mobile-card-primary > a:hover {
        color: var(--accent-dark);
        text-decoration: none;
    }

    .mobile-card-table .mobile-card-secondary {
        order: 20;
        grid-column: 1 / -1;
        padding-bottom: 9px !important;
        border-bottom: 1px solid var(--line) !important;
        color: var(--ink-soft);
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .mobile-card-table .mobile-card-status {
        order: 30;
    }

    .mobile-card-table .mobile-card-metric {
        order: 40;
    }

    .mobile-card-table .mobile-card-meta {
        order: 50;
        color: var(--ink-soft);
        font-size: 0.79rem;
        line-height: 1.35;
    }

    .mobile-card-table .mobile-card-full,
    .mobile-card-table .mobile-card-actions {
        grid-column: 1 / -1;
    }

    .mobile-card-table .mobile-card-actions {
        order: 60;
    }

    .locations-responsive-table .tree-entry {
        margin-left: 0;
        padding-block: 0;
    }

    .locations-responsive-table .tree-action-cell {
        white-space: normal;
        text-align: left;
    }

    .mobile-card-table .mobile-card-cell[data-mobile-label]::before {
        content: attr(data-mobile-label);
        display: block;
        margin-bottom: 3px;
        color: var(--ink-soft);
        font-size: 0.61rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        line-height: 1.25;
        text-transform: uppercase;
    }

    .mobile-card-table .mobile-card-actions .table-actions,
    .mobile-card-table .mobile-card-actions > .table-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
        width: 100%;
        gap: 7px;
    }

    .mobile-card-table .mobile-card-actions .inline-form,
    .mobile-card-table .mobile-card-actions .button-ghost,
    .mobile-card-table .mobile-card-actions .button-link,
    .mobile-card-table .mobile-card-actions button,
    .mobile-card-table .mobile-card-actions a {
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table tbody > tr:not(.mobile-card-table-row),
    .mobile-card-table .mobile-card-table-empty-row {
        display: block;
        width: 100%;
        padding: 18px;
        border: 1px dashed var(--line-strong);
        border-radius: 14px;
        background: var(--panel-soft);
    }

    .mobile-card-table tbody > tr:not(.mobile-card-table-row) > td,
    .mobile-card-table .mobile-card-table-empty {
        display: block;
        width: 100%;
        padding: 0;
        border: 0;
        color: var(--ink-soft);
        text-align: center;
    }
}

/* Dashboard records and location signals retain a simple desktop treatment;
   the denser phone presentation is defined below. */
.dashboard-command-primary-action {
    border-color: var(--accent-strong);
    background: linear-gradient(180deg, #8ed235, var(--accent));
    color: #14200d;
}

.dashboard-command-primary-action:hover {
    border-color: var(--accent-strong);
    background: linear-gradient(180deg, #98dc41, #82c82b);
    color: #14200d;
}

.dashboard-site-card-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.dashboard-site-card-stat strong {
    color: var(--ink);
}

.dashboard-site-empty {
    grid-column: 1 / -1;
}

.dashboard-table-record-link {
    display: inline-grid;
    gap: 2px;
}

.dashboard-table-record-title {
    display: none;
}

/* Dashboard mobile console: keep the operating signals dense and glanceable,
   then turn the two finance tables into readable record cards. */
@media (max-width: 640px) {
    .page-dashboard .topbar-chip-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        grid-auto-columns: auto;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
    }

    .page-dashboard .topbar-chip-row > *,
    .page-dashboard .topbar-chip-row .toolbar-chip:last-child:nth-child(odd) {
        width: 100%;
        max-width: none;
        min-width: 0;
        min-height: 62px;
        grid-column: auto;
        scroll-snap-align: none;
    }

    .page-dashboard .topbar-chip-row > .toolbar-chip:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .dashboard-command-center,
    .dashboard-panel {
        padding: 15px;
    }

    .dashboard-command-center,
    .dashboard-console,
    .dashboard-panel,
    .dashboard-primary-column,
    .dashboard-secondary-column {
        gap: 14px;
    }

    .dashboard-command-copy {
        gap: 7px;
    }

    .dashboard-command-copy h2 {
        font-size: clamp(1.62rem, 7vw, 1.9rem);
        line-height: 1.05;
    }

    .dashboard-command-copytext {
        font-size: 0.88rem;
        line-height: 1.48;
    }

    .dashboard-command-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .dashboard-command-actions > * {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding-inline: 9px;
        text-align: center;
        white-space: normal;
    }

    .dashboard-command-actions > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .dashboard-command-grid,
    .dashboard-signal-grid,
    .dashboard-cost-band {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-command-grid > :last-child:nth-child(odd),
    .dashboard-signal-grid > :last-child:nth-child(odd),
    .dashboard-cost-band > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .dashboard-command-tile,
    .dashboard-signal-card,
    .dashboard-cost-tile {
        min-width: 0;
        min-height: 0;
        align-content: start;
        gap: 6px;
        padding: 11px 12px;
        border-radius: 14px;
    }

    .dashboard-command-tile .card-label,
    .dashboard-cost-tile .card-label {
        min-width: 0;
        font-size: 0.61rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .dashboard-command-tile strong,
    .dashboard-cost-tile strong {
        min-width: 0;
        font-size: clamp(1.08rem, 5vw, 1.35rem);
        line-height: 1.05;
        overflow-wrap: anywhere;
    }

    .dashboard-cost-tile strong {
        font-size: clamp(0.9rem, 4vw, 1.18rem);
        letter-spacing: -0.05em;
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .dashboard-command-tile p:last-child,
    .dashboard-signal-card > p,
    .dashboard-cost-tile p:last-child {
        display: -webkit-box;
        margin: 0;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.32;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .dashboard-signal-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .dashboard-signal-token {
        min-height: 24px;
        max-width: 100%;
        padding-inline: 8px;
        font-size: 0.61rem;
        letter-spacing: 0.06em;
        overflow-wrap: anywhere;
    }

    .dashboard-signal-top strong {
        font-size: 1.42rem;
        line-height: 1;
    }

    .dashboard-signal-card h3 {
        font-size: 0.86rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .dashboard-panel-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-panel-actions > * {
        width: 100%;
        min-width: 0;
    }

    .dashboard-site-card {
        gap: 10px;
        padding: 14px;
        border-radius: 15px;
    }

    .dashboard-site-card-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .dashboard-site-card-stat {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 7px 8px;
        border-radius: 10px;
        background: color-mix(in srgb, var(--panel) 88%, var(--panel-soft));
        line-height: 1.2;
    }

    .dashboard-site-card-stat:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .dashboard-site-card-stat span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .dashboard-stream,
    .dashboard-subpanel {
        padding: 13px;
        border-radius: 15px;
    }

    .dashboard-stream-head,
    .dashboard-subpanel-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 10px;
    }

    .dashboard-stream-head > :first-child,
    .dashboard-stream-head > :last-child,
    .dashboard-subpanel-head > :first-child,
    .dashboard-subpanel-head > :last-child {
        width: auto;
        min-width: 0;
    }

    .dashboard-stream-head .button-link,
    .dashboard-subpanel-head .button-link {
        min-height: 38px;
        padding-inline: 10px;
    }

    .dashboard-work-orders-table-region,
    .dashboard-low-stock-table-region {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .dashboard-work-orders-table .mobile-card-table-row,
    .dashboard-low-stock-table .mobile-card-table-row {
        padding: 12px;
        border-radius: 13px;
        box-shadow: none;
    }

    .dashboard-table-record-link {
        display: grid;
        gap: 3px;
    }

    .dashboard-table-record-code {
        color: var(--accent-strong);
        font-size: 0.72rem;
        font-weight: 850;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .dashboard-table-record-title {
        display: block;
        color: var(--ink);
        font-size: 0.98rem;
        font-weight: 800;
        line-height: 1.3;
    }

    .dashboard-work-orders-priority {
        order: 30 !important;
        justify-self: end;
        text-align: right;
    }

    .dashboard-work-orders-status .status-inline {
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .dashboard-work-orders-due,
    .dashboard-low-stock-vendor {
        grid-column: 1 / -1;
    }

    .dashboard-work-orders-due {
        order: 40 !important;
    }

    .dashboard-low-stock-vendor {
        padding-top: 9px !important;
        border-top: 1px solid var(--line) !important;
    }
}

@media (max-width: 420px) {
    .dashboard-finance-grid .dashboard-subpanel-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .dashboard-finance-grid .dashboard-subpanel-head .button-link {
        width: 100%;
    }

    .dashboard-risk-trend-chart {
        gap: 5px;
    }

    .dashboard-risk-trend-bar {
        min-width: 0;
    }
}

/* Locations keep their tree meaning on phones without inheriting desktop column widths. */
@media (max-width: 640px) {
    .locations-table-region {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .locations-responsive-table.tree-table-has-selector thead th.locations-select-all {
        position: static;
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none;
        height: auto;
        margin: 0 0 10px;
        padding: 10px 12px;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    .locations-select-all-control {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    .locations-responsive-table.tree-table-has-selector tbody td.locations-table-select {
        width: auto;
        min-width: 0;
    }

    .locations-responsive-table tbody td.locations-table-name,
    .locations-responsive-table.tree-table-has-selector tbody td.locations-table-name {
        width: auto !important;
        min-width: 0;
        max-width: 100%;
    }

    .locations-responsive-table .locations-table-name .tree-link,
    .locations-responsive-table .locations-table-name .tree-entry,
    .locations-responsive-table .locations-table-name .tree-copy {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .locations-responsive-table .locations-table-name .tree-copy strong,
    .locations-responsive-table .locations-table-name .tree-meta,
    .locations-responsive-table .locations-table-hierarchy strong,
    .locations-responsive-table .locations-table-hierarchy .muted {
        display: block;
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .locations-responsive-table .locations-table-hierarchy {
        grid-column: 1 / -1;
        padding: 10px 12px !important;
        border: 1px solid var(--line) !important;
        border-radius: 11px;
        background: var(--panel-soft);
    }

    .locations-responsive-table .locations-table-row:not(.tree-depth-0) {
        border-left: 3px solid color-mix(in srgb, var(--accent) 62%, var(--line));
    }
}

/* Mobile register controls: creation, display choice, and filtering are
   separate decisions and should read as separate surfaces. */
@media (max-width: 700px) {
    section.card:has(> .register-list-heading):has(> .register-filter-panel),
    section.card:has(> .register-list-heading):has(> .register-view-toolbar),
    .idea-board-shell:has(> .register-list-heading) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    section.card:has(> .register-list-heading):has(> .register-filter-panel) > .register-list-heading,
    section.card:has(> .register-list-heading):has(> .register-view-toolbar) > .register-list-heading,
    .idea-board-shell:has(> .register-list-heading) > .register-list-heading,
    section.card:has(> .register-list-heading) > .register-view-toolbar,
    .idea-board-shell > .register-view-toolbar,
    section.card > .register-filter-panel,
    .idea-board-shell > .register-filter-panel {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        padding: 14px;
        border: 1px solid var(--line-strong);
        border-radius: 16px;
        background: var(--panel);
        box-shadow: 0 8px 24px rgba(20, 32, 48, 0.055);
    }

    section.card:has(> .register-list-heading):has(> .register-filter-panel) > .register-list-heading,
    section.card:has(> .register-list-heading):has(> .register-view-toolbar) > .register-list-heading,
    .idea-board-shell:has(> .register-list-heading) > .register-list-heading {
        gap: 11px;
    }

    .register-list-heading > .page-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        width: 100%;
    }

    .register-list-heading > .page-actions > * {
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    .register-list-heading > .page-actions > .register-primary-create {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .register-view-toolbar {
        padding-bottom: 14px;
        border-bottom: 1px solid var(--line-strong);
    }

    section.card > .register-filter-panel,
    .idea-board-shell > .register-filter-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    section.card > .register-filter-panel::before,
    .idea-board-shell > .register-filter-panel::before {
        content: "Search & filters";
        display: block;
        color: var(--ink-muted);
        font-size: 0.66rem;
        font-weight: 850;
        letter-spacing: 0.08em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    section.card > .register-filter-panel > .register-toolbar,
    .idea-board-shell > .register-filter-panel > .register-toolbar {
        min-width: 0;
    }

    /* Empty image placeholders stay out of the way, while real record images
       return as compact visual anchors beside each card title. */
    .mobile-card-table .mobile-card-media:has(.media-thumb-shell:not(.is-empty)) {
        position: absolute;
        z-index: 2;
        top: 14px;
        left: 14px;
        display: grid !important;
        width: 50px;
        height: 50px;
        padding: 0;
        place-items: center;
        border: 0;
    }

    .mobile-card-table .mobile-card-media::before {
        display: none !important;
    }

    .mobile-card-table .mobile-card-media .media-thumb-shell:not(.is-empty),
    .mobile-card-table .mobile-card-media .media-thumb-frame,
    .mobile-card-table .mobile-card-media img.table-thumb {
        width: 50px;
        height: 50px;
        max-width: 50px;
        max-height: 50px;
    }

    .mobile-card-table .mobile-card-media img.table-thumb {
        object-fit: cover;
        border-radius: 11px;
    }

    .mobile-card-table .mobile-card-media .media-thumb-popup {
        display: none !important;
    }

    .mobile-card-table .mobile-card-table-row:has(.mobile-card-media .media-thumb-shell:not(.is-empty)) .mobile-card-primary {
        min-height: 50px;
        padding-left: 62px;
    }

    .parts-responsive-table .parts-table-media .part-image-cell > .muted {
        display: none;
    }

    .work-orders-responsive-table .work-orders-table-media:has(.media-thumb-shell:not(.is-empty)),
    .requests-responsive-table .requests-table-media:has(.media-thumb-shell:not(.is-empty)) {
        position: absolute;
        z-index: 2;
        top: 14px;
        left: 14px;
        display: grid !important;
        width: 50px;
        height: 50px;
        padding: 0;
        place-items: center;
        border: 0;
    }

    .work-orders-responsive-table .work-orders-table-media .media-thumb-shell:not(.is-empty),
    .work-orders-responsive-table .work-orders-table-media .media-thumb-frame,
    .work-orders-responsive-table .work-orders-table-media img.table-thumb,
    .requests-responsive-table .requests-table-media .media-thumb-shell:not(.is-empty),
    .requests-responsive-table .requests-table-media .media-thumb-frame,
    .requests-responsive-table .requests-table-media img.table-thumb {
        width: 50px;
        height: 50px;
        max-width: 50px;
        max-height: 50px;
    }

    .work-orders-responsive-table .work-orders-table-media img.table-thumb,
    .requests-responsive-table .requests-table-media img.table-thumb {
        object-fit: cover;
        border-radius: 11px;
    }

    .work-orders-responsive-table .work-orders-table-media .media-thumb-popup,
    .requests-responsive-table .requests-table-media .media-thumb-popup {
        display: none !important;
    }

    .work-orders-table-row:has(.work-orders-table-media .media-thumb-shell:not(.is-empty)) .work-orders-table-code,
    .requests-table-row:has(.requests-table-media .media-thumb-shell:not(.is-empty)) .requests-table-code {
        padding-left: 62px;
    }

    .work-orders-table-row:has(.work-orders-table-media .media-thumb-shell:not(.is-empty)) .work-orders-table-summary,
    .requests-table-row:has(.requests-table-media .media-thumb-shell:not(.is-empty)) .requests-table-title {
        padding-top: 12px;
    }

    body.theme-dark .mobile-card-table .mobile-card-media img.table-thumb,
    body.theme-dark .work-orders-responsive-table .work-orders-table-media img.table-thumb,
    body.theme-dark .requests-responsive-table .requests-table-media img.table-thumb {
        border-color: var(--line-strong);
        background: var(--panel-soft);
    }
}

@media (max-width: 380px) {
    .locations-responsive-table .locations-table-media:has(.media-thumb-shell:not(.is-empty)) {
        width: 40px;
        height: 40px;
    }

    .locations-responsive-table .locations-table-media .media-thumb-shell:not(.is-empty),
    .locations-responsive-table .locations-table-media .media-thumb-frame,
    .locations-responsive-table .locations-table-media img.table-thumb {
        width: 40px;
        height: 40px;
        max-width: 40px;
        max-height: 40px;
    }

    .locations-responsive-table .locations-table-row:has(.locations-table-media .media-thumb-shell:not(.is-empty)) .locations-table-name {
        min-height: 40px;
        padding-left: 50px;
    }

    .locations-responsive-table .locations-table-name .tree-entry {
        gap: 6px;
    }

    .locations-responsive-table .locations-table-name .tree-marker {
        width: 14px;
        flex-basis: 14px;
    }

    .locations-responsive-table .locations-table-name .tree-elbow {
        width: 10px;
    }
}

/* Asset workspace and editor tables: preserve the information hierarchy on
   phones instead of forcing desktop-width columns into a narrow modal. */
@media (max-width: 700px) {
    .asset-workspace-panel .mobile-card-table {
        margin-top: 14px;
    }

    .asset-workspace-panel .mobile-card-table tbody {
        gap: 14px;
    }

    .asset-workspace-panel .mobile-card-table .mobile-card-table-row {
        gap: 11px 12px;
        padding: 14px;
        border-left: 3px solid color-mix(in srgb, var(--accent) 58%, var(--line-strong));
        box-shadow: 0 8px 22px rgba(20, 32, 48, 0.065);
    }

    .asset-inspection-results-table .asset-inspection-result-row {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .asset-inspection-results-table .mobile-card-primary,
    .asset-critical-parts-table .mobile-card-primary {
        font-size: 0.94rem;
        line-height: 1.4;
    }

    .asset-inspection-results-table .mobile-card-secondary,
    .asset-status-periods-table .mobile-card-full {
        padding: 10px 11px !important;
        border: 1px solid var(--line) !important;
        border-radius: 11px;
        background: var(--panel-soft);
    }

    .asset-inspection-history-table .mobile-card-actions,
    .asset-status-periods-table .mobile-card-actions {
        padding-top: 10px !important;
        border-top: 1px solid var(--line) !important;
    }

    .asset-editor-table-wrap:has(.asset-editor-collection-table) {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .asset-editor-collection-table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        border: 0;
        background: transparent;
    }

    .asset-editor-collection-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .asset-editor-collection-table tbody {
        display: grid;
        width: 100%;
        gap: 12px;
    }

    .asset-editor-collection-table .asset-editor-collection-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
        width: 100%;
        padding: 13px;
        border: 1px solid var(--line-strong);
        border-radius: 14px;
        background: var(--panel);
        box-shadow: 0 7px 20px rgba(20, 32, 48, 0.055);
    }

    .asset-editor-collection-table .asset-editor-collection-row > td {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .asset-editor-collection-table .asset-editor-collection-row > td[data-mobile-label]::before {
        content: attr(data-mobile-label);
        display: block;
        color: var(--ink-muted);
        font-size: 0.64rem;
        font-weight: 850;
        letter-spacing: 0.07em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .asset-editor-collection-table select,
    .asset-editor-collection-table input,
    .asset-editor-collection-table .asset-editor-collection-action button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    .asset-editor-inspection-table .asset-editor-collection-handle {
        justify-items: start;
    }

    .asset-editor-inspection-table .row-drag-handle {
        width: 44px;
        min-width: 44px;
    }
}

/* Mobile table audit: nested workspaces and editors use the same readable
   record-card language as the main registers instead of desktop-width grids. */
@media (max-width: 700px) {
    .wo-table-shell.mobile-card-table-region,
    .po-workspace-card .wo-table-shell.mobile-card-table-region,
    .part-overview-stock-table-preview.mobile-card-table-region,
    .part-overview-purchasing-table-region.mobile-card-table-region,
    .part-workspace-table-wrap.mobile-card-table-region,
    .part-movements-table-region.mobile-card-table-region,
    .part-editor-resource-section .part-editor-collection-table-region,
    .asset-workspace-panel > .mobile-card-table-region,
    .asset-workspace-panel .top-spacer > .mobile-card-table-region {
        max-width: 100%;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.theme-dark .wo-table-shell.mobile-card-table-region,
    body.theme-dark .part-workspace-table-wrap.mobile-card-table-region,
    body.theme-dark .part-editor-resource-section .part-editor-collection-table-region {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .po-line-items-table tbody,
    .po-receive-mobile-table tbody,
    .vendor-supplied-parts-table tbody,
    .wo-labor-mobile-table tbody,
    .wo-parts-mobile-table tbody,
    .wo-costs-mobile-table tbody,
    .part-overview-stock-table tbody,
    .part-purchase-orders-table tbody,
    .part-suppliers-table tbody,
    .part-movements-table tbody,
    .part-editor-collection-table tbody,
    .settings-import-preview-responsive-table tbody {
        gap: 13px;
    }

    .po-line-items-table .mobile-card-table-row,
    .po-receive-mobile-table .mobile-card-table-row,
    .vendor-supplied-parts-table .mobile-card-table-row,
    .wo-labor-mobile-table .mobile-card-table-row,
    .wo-parts-mobile-table .mobile-card-table-row,
    .wo-costs-mobile-table .mobile-card-table-row,
    .part-overview-stock-table .mobile-card-table-row,
    .part-purchase-orders-table .mobile-card-table-row,
    .part-suppliers-table .mobile-card-table-row,
    .part-movements-table .mobile-card-table-row,
    .part-editor-collection-table .mobile-card-table-row,
    .settings-import-preview-responsive-table .mobile-card-table-row {
        border-color: var(--line-strong);
        box-shadow: 0 8px 22px rgba(20, 32, 48, 0.065);
    }

    .asset-inspection-results-table .mobile-card-status {
        order: 20;
        grid-column: 1 / -1;
    }

    .asset-inspection-results-table .mobile-card-secondary {
        order: 30;
        grid-column: 1 / -1;
    }

    .mobile-card-table .mobile-card-actions input:not([type="hidden"]),
    .part-editor-collection-table select,
    .part-editor-collection-table input:not([type="hidden"]),
    .part-editor-collection-table .row-action-cell button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }

    .part-editor-collection-table .supplier-primary-cell {
        width: auto;
        text-align: left;
        white-space: normal;
    }

    .part-editor-collection-table .supplier-primary-cell input[type="radio"] {
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        accent-color: var(--accent);
    }

    .part-editor-collection-table .row-action-cell {
        width: 100%;
        white-space: normal;
    }

    .po-receive-mobile-table .po-receive-quantity {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    .po-receive-mobile-table .mobile-card-status {
        order: 45;
    }

    .wo-labor-mobile-table .wo-labor-note-row {
        border-left: 3px solid color-mix(in srgb, var(--accent) 48%, var(--line-strong));
        background: var(--panel-soft);
        box-shadow: none;
    }

    .wo-labor-mobile-table .wo-inline-action-form {
        display: grid;
        margin-top: 9px;
    }

    .wo-entry-admin-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        min-width: 0;
        text-align: left;
        white-space: normal;
    }

    .wo-entry-admin-actions .wo-inline-action-form {
        display: block;
        margin: 0;
    }

    .mobile-card-table .wo-entry-edit-row {
        padding: 0;
        border-style: solid;
        background: var(--panel);
    }

    .mobile-card-table .wo-entry-edit-row > td {
        text-align: left;
    }

    .wo-entry-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wo-entry-edit-grid > label,
    .wo-entry-edit-grid .span-2,
    .wo-entry-edit-grid .span-full {
        grid-column: 1 / -1;
    }

    .wo-entry-edit-grid-labor > label:nth-child(3),
    .wo-entry-edit-grid-labor > label:nth-child(4) {
        grid-column: span 1;
    }

    .wo-entry-edit-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-import-preview-responsive-table .settings-import-preview-table-result .muted {
        display: block;
        margin-top: 7px;
        overflow-wrap: anywhere;
    }
}

/* Settings navigation on compact screens: one clear area selector followed by
   a separately labelled rail for destinations within the active page. */
@media (max-width: 860px) {
    .settings-quick-nav-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
        padding: 12px;
    }

    .settings-quick-nav-heading,
    .settings-section-nav {
        display: none;
    }

    .settings-mobile-area-menu {
        display: block;
        min-width: 0;
    }

    .settings-mobile-area-summary {
        min-height: 44px;
        border: 1px solid var(--line-strong);
        border-radius: 12px;
        background: var(--panel-soft);
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 9px 12px;
        list-style: none;
        color: var(--ink);
        cursor: pointer;
        user-select: none;
    }

    .settings-mobile-area-summary::-webkit-details-marker {
        display: none;
    }

    .settings-mobile-area-summary:hover,
    .settings-mobile-area-summary:focus-visible {
        background: color-mix(in srgb, var(--accent-soft) 52%, var(--panel));
        outline: none;
    }

    .settings-mobile-area-summary:focus-visible {
        box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent);
    }

    .settings-mobile-area-summary-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .settings-mobile-area-summary-copy > span {
        color: var(--ink-muted);
        font-size: 0.64rem;
        font-weight: 850;
        letter-spacing: 0.09em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .settings-mobile-area-summary-copy > strong {
        min-width: 0;
        overflow: hidden;
        color: var(--ink);
        font-size: 0.94rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .settings-mobile-area-chevron {
        width: 9px;
        height: 9px;
        margin-right: 3px;
        border-right: 2px solid var(--ink-soft);
        border-bottom: 2px solid var(--ink-soft);
        transform: rotate(45deg) translate(-1px, -1px);
        transition: transform 180ms ease;
    }

    .settings-mobile-area-menu[open] .settings-mobile-area-chevron {
        transform: rotate(-135deg) translate(-1px, -1px);
    }

    .settings-mobile-area-panel {
        position: absolute;
        inset-block-start: calc(100% + 5px);
        inset-inline: 0;
        min-width: 0;
        max-height: min(58dvh, 520px);
        display: grid;
        gap: 12px;
        padding: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--line-strong);
        border-radius: 12px;
        background: var(--panel);
        box-shadow: var(--shadow);
    }

    .settings-mobile-area-menu:not([open]) > .settings-mobile-area-panel {
        display: none;
    }

    .settings-mobile-area-group,
    .settings-mobile-area-links {
        min-width: 0;
        display: grid;
    }

    .settings-mobile-area-group {
        gap: 6px;
    }

    .settings-mobile-area-links {
        gap: 6px;
    }

    .settings-mobile-area-group-label {
        padding-inline: 3px;
        color: var(--ink-muted);
        font-size: 0.65rem;
        font-weight: 850;
        letter-spacing: 0.09em;
        text-transform: uppercase;
    }

    .settings-mobile-area-link {
        min-width: 0;
        min-height: 50px;
        display: grid;
        align-content: center;
        gap: 2px;
        padding: 8px 11px;
        border-radius: 8px;
        color: var(--ink);
    }

    .settings-mobile-area-link:hover,
    .settings-mobile-area-link:focus-visible {
        background: var(--panel-soft);
        text-decoration: none;
    }

    .settings-mobile-area-link:focus-visible {
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 34%, transparent);
    }

    .settings-mobile-area-link.is-active {
        background: var(--accent-soft);
        color: var(--ink);
    }

    .settings-mobile-area-link strong,
    .settings-mobile-area-link span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .settings-mobile-area-link strong {
        color: currentColor;
        font-size: 0.82rem;
    }

    .settings-mobile-area-link span {
        color: var(--ink-muted);
        font-size: 0.69rem;
    }

    .settings-anchor-nav {
        display: grid;
        gap: 7px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .settings-anchor-nav .settings-section-nav-label {
        display: block;
        padding: 0 2px;
    }

    .settings-anchor-nav-links {
        display: flex;
        gap: 7px;
        width: 100%;
        min-width: 0;
        padding: 0 16px 3px 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-padding-inline: 0 16px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .settings-anchor-nav-links::-webkit-scrollbar {
        display: none;
    }

    .settings-anchor-nav-links > a {
        min-height: 44px;
        flex: 0 0 auto;
        padding: 7px 11px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--panel-soft);
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .settings-anchor-nav-links > a:focus-visible {
        border-color: var(--accent);
        outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
        outline-offset: 2px;
    }

    body.page-settings .settings-scroll-target,
    body.page-settings .notification-settings-intro,
    body.page-settings .notification-rule-group {
        scroll-margin-top: 144px;
    }
}

@media (min-width: 540px) and (max-width: 860px) {
    .settings-mobile-area-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Shared stepped record editors: keep long create/edit workflows focused without
 * weakening native form validation or turning compact action dialogs into wizards. */
.wo-editor-form.is-stepped-editor {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.stepped-editor-tabs {
    --stepped-editor-count: 4;
    --stepped-editor-tab-min: 112px;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(var(--stepped-editor-count), minmax(var(--stepped-editor-tab-min), 1fr));
    align-items: start;
    gap: 0;
    padding: 16px var(--modal-card-padding) 14px;
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--panel-soft) 78%, var(--panel));
    scrollbar-width: none;
}

.stepped-editor-tabs::-webkit-scrollbar {
    display: none;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 36px auto auto;
    gap: 7px;
    justify-items: center;
    min-width: var(--stepped-editor-tab-min);
    min-height: 66px;
    padding: 0 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink-muted);
    font-family: "Aptos", "IBM Plex Sans", "Trebuchet MS", sans-serif;
    line-height: 1.2;
    overflow: visible;
    text-align: center;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::before,
.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 17px;
    width: 50%;
    height: 2px;
    border-radius: 0;
    background: color-mix(in srgb, var(--line-strong) 82%, transparent);
    transition: background 0.18s ease;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::before {
    left: 0;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::after {
    right: 0;
    bottom: auto;
    left: auto;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:first-child::before,
.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:last-child::after {
    display: none;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:hover,
.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:focus-visible {
    color: var(--ink);
    background: transparent;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:focus-visible {
    outline: 0;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab.is-active {
    color: var(--ink);
    background: transparent;
}

.stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-number {
    position: relative;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    border-radius: 50%;
    background: var(--panel);
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:hover .stepped-editor-tab-number {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line-strong));
    background: color-mix(in srgb, var(--accent-soft) 42%, var(--panel));
    color: var(--ink);
    transform: translateY(-1px);
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab:focus-visible .stepped-editor-tab-number {
    outline: 2px solid color-mix(in srgb, var(--accent) 68%, transparent);
    outline-offset: 3px;
}

.stepped-editor-tabs .stepped-editor-tab.is-active .stepped-editor-tab-number {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 88%, var(--panel));
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent);
    color: color-mix(in srgb, var(--accent-strong) 76%, #20340d);
    transform: none;
}

.stepped-editor-tabs .stepped-editor-tab.is-reached.is-step-ready .stepped-editor-tab-number {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #fff;
}

.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab.is-reached::before,
.wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab.is-past::after {
    background: color-mix(in srgb, var(--accent-strong) 76%, var(--line-strong));
}

.stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-label {
    min-width: 0;
    max-width: 100%;
    color: inherit;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-transform: none;
    white-space: normal;
}

.stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-optional {
    color: var(--ink-muted);
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 550;
    letter-spacing: 0;
    line-height: 1.2;
    opacity: 0.82;
    text-transform: none;
}

.stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-optional[hidden] {
    display: none;
}

.stepped-editor-tab-state {
    display: none;
}

.stepped-editor-tabs .stepped-editor-tab.is-incomplete .stepped-editor-tab-state {
    position: absolute;
    z-index: 4;
    top: -8px;
    left: calc(50% + 8px);
    display: grid;
    width: 18px;
    height: 16px;
    padding: 0 0 2px;
    place-items: end center;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: #d9a126;
    color: #fffdf5;
    filter: drop-shadow(0 2px 3px rgba(121, 82, 10, 0.2));
    font-size: 0;
    line-height: 1;
    pointer-events: none;
}

.stepped-editor-tabs .stepped-editor-tab.is-incomplete .stepped-editor-tab-state::before {
    content: "!";
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1;
}

.asset-link-field {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}

.asset-link-field > span:first-child {
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 750;
}

.asset-link-field > small {
    color: var(--ink-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

.asset-link-field.is-asset-link-enhanced > select[data-asset-link-select] {
    display: none;
}

.asset-link-editor {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1.2fr);
    gap: 10px;
    min-width: 0;
}

.asset-link-add-panel,
.asset-link-selection-panel {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 11px;
    border: 1px solid color-mix(in srgb, var(--line) 88%, #acb9ca);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-soft) 72%, var(--panel));
}

.asset-link-panel-label {
    color: var(--ink-muted);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.asset-link-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.asset-link-add-row select,
.asset-link-add-row button {
    min-height: 40px;
}

.asset-link-add-row button {
    min-width: 76px;
    color: color-mix(in srgb, var(--accent-strong) 78%, var(--ink));
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel));
}

.asset-link-selection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.asset-link-count {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.asset-link-pills {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 7px;
}

.asset-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 30px;
    padding: 4px 5px 4px 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 37%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 56%, var(--panel));
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 700;
}

.asset-link-pill > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
}

button.asset-link-pill-remove {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    height: 24px;
    min-height: 0;
    padding: 0;
    place-items: center;
    border: 1px solid #e4a39e;
    border-radius: 50%;
    background: #fbe9e7;
    box-shadow: none;
    color: #ad302d;
    font-family: Arial, sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1;
}

button.asset-link-pill-remove:hover,
button.asset-link-pill-remove:focus-visible {
    border-color: #b93430;
    background: #c9413c;
    color: #ffffff;
}

button.asset-link-pill-remove:focus-visible {
    outline: 2px solid color-mix(in srgb, #c9413c 42%, transparent);
    outline-offset: 2px;
}

.asset-link-empty {
    display: grid;
    min-height: 38px;
    place-items: center start;
    color: var(--ink-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.asset-link-empty[hidden],
.asset-link-pills[hidden] {
    display: none;
}

.purchase-order-line-context-grid .asset-link-field {
    grid-column: span 2;
}

.part-editor-coverage-fields > label {
    grid-column: 1 / -1;
}

.part-editor-primary-asset-links .asset-link-add-row select {
    min-height: 40px;
}

body.theme-dark .asset-link-add-panel,
body.theme-dark .asset-link-selection-panel {
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--panel) 88%, #202730);
}

body.theme-dark .part-editor-primary-asset-links {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line-strong));
    background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

body.theme-dark .asset-link-pill {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line-strong));
    background: color-mix(in srgb, var(--accent) 18%, var(--panel));
}

body.theme-dark button.asset-link-pill-remove {
    border-color: #884744;
    background: #542c2b;
    color: #ffb8b3;
}

body.theme-dark button.asset-link-pill-remove:hover,
body.theme-dark button.asset-link-pill-remove:focus-visible {
    border-color: #df625c;
    background: #bd3c37;
    color: #ffffff;
}

@media (min-width: 761px) {
    .wo-editor-footer-copy:has(> .work-order-delete-button) {
        display: grid;
        flex: 1 1 auto;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 18px;
        row-gap: 3px;
    }

    .wo-editor-footer-copy > .work-order-delete-button {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        justify-self: start;
        margin: 0;
    }

    .wo-editor-footer-copy:has(> .work-order-delete-button) > strong,
    .wo-editor-footer-copy:has(> .work-order-delete-button) > span {
        grid-column: 2;
        justify-self: end;
        text-align: right;
    }
}

.wo-editor-footer > .work-order-delete-button {
    order: -1;
    margin-right: auto;
}

@media (max-width: 900px) {
    .asset-link-editor {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .asset-link-add-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .asset-link-add-row button {
        width: 100%;
    }
}

/* Purchase-order line editor cleanup: keep linked-part lines compact, place
   metadata on intentional rows, and avoid oversized option panels. */
.purchase-order-editor-form .purchase-order-line-card {
    gap: 14px;
}

.purchase-order-editor-form .purchase-order-line-editor-body {
    gap: 14px;
}

.purchase-order-line-linked-part-label {
    display: none;
}

.purchase-order-line-part-composer.has-linked-part .purchase-order-line-linked-part-label {
    display: block;
}

.purchase-order-line-card.has-linked-part .purchase-order-line-description-field textarea {
    min-height: 54px;
    height: 54px;
    resize: vertical;
}

.purchase-order-editor-form .purchase-order-line-details > summary {
    min-height: 52px;
    padding-block: 9px;
}

.purchase-order-editor-form .purchase-order-line-details-body {
    gap: 14px;
    padding: 14px 18px 16px;
}

.purchase-order-editor-form .purchase-order-line-context-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.purchase-order-editor-form .purchase-order-line-vendor-field,
.purchase-order-editor-form .purchase-order-line-category-field,
.purchase-order-editor-form .purchase-order-line-location-field,
.purchase-order-editor-form .purchase-order-line-received-field {
    grid-column: span 3;
}

.purchase-order-editor-form .purchase-order-line-context-grid .asset-link-field {
    grid-column: 1 / -1;
}

.purchase-order-editor-form .purchase-order-line-support-grid {
    gap: 12px;
}

.purchase-order-editor-form .purchase-order-line-notes-field textarea {
    min-height: 92px;
}

.purchase-order-editor-form .purchase-order-line-create-panel {
    padding: 10px 12px;
    border-radius: 12px;
}

.purchase-order-editor-form .purchase-order-line-create-panel.is-linked-part {
    display: none;
}

.purchase-order-editor-form .purchase-order-line-create-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
    gap: 12px 18px;
    align-items: center;
}

.purchase-order-editor-form .purchase-order-line-create-tools {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 12px;
}

.purchase-order-editor-form .purchase-order-line-toggle {
    min-height: 40px;
    padding-inline: 12px;
    border-radius: 11px;
}

.purchase-order-editor-form .purchase-order-line-toggle span {
    font-size: 0.86rem;
}

.purchase-order-editor-form .purchase-order-line-helper,
.purchase-order-editor-form .purchase-order-line-inventory-note {
    font-size: 0.74rem;
    line-height: 1.35;
}

.purchase-order-editor-form .purchase-order-line-mode-field {
    gap: 3px;
}

@media (max-width: 1500px) {
    .purchase-order-editor-form .purchase-order-line-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-editor-form .purchase-order-line-vendor-field,
    .purchase-order-editor-form .purchase-order-line-category-field,
    .purchase-order-editor-form .purchase-order-line-location-field,
    .purchase-order-editor-form .purchase-order-line-received-field {
        grid-column: auto;
    }

    .purchase-order-editor-form .purchase-order-line-context-grid .asset-link-field {
        grid-column: 1 / -1;
    }

    .purchase-order-editor-form .purchase-order-line-create-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .purchase-order-editor-form .purchase-order-line-context-grid,
    .purchase-order-editor-form .purchase-order-line-support-grid,
    .purchase-order-editor-form .purchase-order-line-create-tools {
        grid-template-columns: minmax(0, 1fr);
    }

    .purchase-order-editor-form .purchase-order-line-context-grid .asset-link-field {
        grid-column: auto;
    }

    .purchase-order-line-card.has-linked-part .purchase-order-line-description-field textarea {
        height: auto;
        min-height: 72px;
    }
}

.stepped-editor-tabs .stepped-editor-tab.has-validation-error .stepped-editor-tab-number,
.stepped-editor-tabs .stepped-editor-tab.has-validation-error.is-active .stepped-editor-tab-number {
    border-color: #d64545;
    background: color-mix(in srgb, #d64545 9%, var(--panel));
    box-shadow: 0 0 0 5px color-mix(in srgb, #d64545 12%, transparent);
    color: #b32626;
}

.stepped-editor-scroll {
    padding-top: 18px;
}

.stepped-editor-panels {
    display: grid;
    min-width: 0;
    min-height: 0;
}

.stepped-editor-panel.is-active {
    display: grid;
    /* Let the editor scroll instead of shrinking and clipping media sections. */
    grid-auto-rows: max-content;
    align-content: start;
    gap: 18px;
    min-width: 0;
    min-height: 0;
}

.stepped-editor-panel > .wo-editor-section,
.stepped-editor-panel > .wo-editor-advanced {
    width: 100%;
}

.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-section-head > span:first-child,
.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-section-kicker,
.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-section-head p,
.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-advanced > summary .wo-editor-section-index,
.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-advanced-summary-copy small {
    display: none;
}

.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-section-head {
    gap: 0;
}

.wo-editor-form[data-stepped-editor] [data-record-workspace-panel] .wo-editor-section-head h3 {
    margin: 0;
}

.stepped-editor-panel > details.wo-editor-advanced > summary {
    display: none;
}

.stepped-editor-panel > details.wo-editor-advanced > .wo-editor-advanced-body {
    display: grid;
    gap: 18px;
    border-top: 0;
    border-radius: inherit;
}

.stepped-editor-inline-error {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 12px;
    padding: 10px 13px;
    border: 1px solid color-mix(in srgb, #d64545 42%, var(--line));
    border-radius: 11px;
    background: color-mix(in srgb, #d64545 8%, var(--panel));
    color: #a72424;
    font-size: 0.84rem;
    font-weight: 750;
}

.stepped-editor-field-error {
    display: block;
    margin-top: 6px;
    color: #b32626;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.35;
}

.wo-editor-form :is(input, select, textarea).has-stepped-editor-error {
    border-color: #d64545;
    box-shadow: 0 0 0 3px color-mix(in srgb, #d64545 13%, transparent);
}

body.theme-dark .stepped-editor-tabs {
    background: color-mix(in srgb, var(--panel) 88%, #111a16);
}

body.theme-dark .stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-number {
    border-color: color-mix(in srgb, var(--line-strong) 78%, #7d8794);
    background: color-mix(in srgb, var(--panel) 88%, #202730);
}

body.theme-dark .stepped-editor-tabs .stepped-editor-tab.is-active .stepped-editor-tab-number {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 24%, var(--panel));
    color: #eaf8d5;
}

body.theme-dark .stepped-editor-tabs .stepped-editor-tab.has-validation-error .stepped-editor-tab-number {
    border-color: #ef7070;
    background: color-mix(in srgb, #d64545 18%, var(--panel));
    color: #ffd0d0;
}

body.theme-dark .stepped-editor-tabs .stepped-editor-tab.is-incomplete .stepped-editor-tab-state {
    background: #e0ae3e;
    color: #2c2108;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.34));
}

body.theme-dark .stepped-editor-inline-error {
    color: #ffb5b5;
}

body.theme-dark .stepped-editor-field-error {
    color: #ffb5b5;
}

@media (max-width: 760px) {
    .stepped-editor-tabs {
        --stepped-editor-tab-min: 96px;
        gap: 0;
        padding: 13px 14px 11px;
        scroll-padding-inline: 14px;
        scroll-snap-type: x proximity;
    }

    .stepped-editor-tabs .stepped-editor-tab {
        min-height: 61px;
        padding: 0 6px;
        scroll-snap-align: start;
    }

    .stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-number {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::before,
    .wo-editor-form[data-stepped-editor] .stepped-editor-tabs .stepped-editor-tab::after {
        top: 15px;
    }

    .stepped-editor-tabs .stepped-editor-tab .stepped-editor-tab-label {
        font-size: 0.72rem;
    }

    .stepped-editor-scroll {
        padding-top: 14px;
    }

    .stepped-editor-panel.is-active {
        gap: 14px;
    }
}

/* Work-order part picker: give the visual catalogue room without changing the
   size of the other quick-action panels. */
.wo-inline-panel.wo-parts-selector-panel {
    width: min(1160px, calc(100vw - var(--sidebar-rail-width, 224px) - 48px));
    max-height: calc(100dvh - 48px);
}

.wo-inline-panel.wo-parts-selector-panel.is-visible {
    display: flex;
    flex-direction: column;
}

.wo-parts-selector-panel .wo-inline-panel-head {
    flex: 0 0 auto;
}

.wo-parts-selector-panel .wo-inline-panel-form {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.wo-parts-selector-panel .wo-inline-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wo-parts-selector-panel .part-selector-results {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    max-height: min(520px, 52dvh);
}

@media (max-width: 920px) {
    .wo-inline-panel.wo-parts-selector-panel {
        width: calc(100vw - 28px);
        max-height: calc(100dvh - 28px);
    }

    .wo-parts-selector-panel .wo-inline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wo-parts-selector-panel .wo-inline-grid > .span-2,
    .wo-parts-selector-panel .wo-inline-grid > .span-3 {
        grid-column: 1 / -1;
    }

    .wo-parts-selector-panel .part-selector-results {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
}

@media (max-width: 640px) {
    .wo-inline-panel.wo-parts-selector-panel {
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-width: 0;
        border-radius: 0;
        transform: none;
    }

    .wo-parts-selector-panel .wo-inline-panel-head {
        padding: max(14px, env(safe-area-inset-top)) 16px 14px;
    }

    .wo-parts-selector-panel .wo-inline-panel-form {
        padding: 14px 14px max(18px, env(safe-area-inset-bottom));
    }

    .wo-parts-selector-panel .wo-inline-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .wo-parts-selector-panel .wo-inline-grid > .span-2,
    .wo-parts-selector-panel .wo-inline-grid > .span-3 {
        grid-column: auto;
    }

    .wo-parts-selector-panel .part-selector-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wo-parts-selector-panel .part-selector-search-wrap {
        grid-column: 1 / -1;
    }

    .wo-parts-selector-panel .part-selector-sort,
    .wo-parts-selector-panel .part-selector-stock-filter {
        width: 100%;
        min-width: 0;
    }

    .wo-parts-selector-panel .part-selector-results {
        grid-template-columns: minmax(0, 1fr);
        max-height: min(44dvh, 420px);
    }

    .wo-parts-selector-panel .part-selector-card,
    .wo-parts-selector-panel .part-selector.is-list-view .part-selector-card {
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-rows: minmax(116px, auto);
        min-height: 116px;
    }

    .wo-parts-selector-panel .part-selector-card-media,
    .wo-parts-selector-panel .part-selector.is-list-view .part-selector-card-media {
        min-height: 116px;
    }

    .wo-parts-selector-panel .part-selector-card-body,
    .wo-parts-selector-panel .part-selector.is-list-view .part-selector-card-body {
        padding: 9px 10px 10px;
    }

    .wo-parts-selector-panel .wo-inline-actions {
        position: sticky;
        bottom: calc(-1 * max(18px, env(safe-area-inset-bottom)));
        z-index: 2;
        margin: 14px -14px calc(-1 * max(18px, env(safe-area-inset-bottom)));
        padding: 12px 14px max(14px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: color-mix(in srgb, var(--panel) 94%, transparent);
        backdrop-filter: blur(10px);
    }

    .wo-parts-selector-panel .wo-inline-actions button {
        width: 100%;
    }
}

/* Shared parts explorer --------------------------------------------------- */
body.part-selector-explorer-open {
    overflow: hidden;
}

.part-selector-explorer-launcher {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.part-selector-explorer-choice {
    display: flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

/* Editor forms make unqualified buttons primary/green. The catalogue summary
   is a field-like launcher, not a submit action, so keep it deliberately neutral. */
.editor-form button.part-selector-explorer-choice,
.wo-editor-form button.part-selector-explorer-choice {
    min-height: 54px;
    padding: 8px 11px;
    border-color: var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}

.part-selector-explorer-choice:hover,
.part-selector-explorer-choice:focus-visible,
.editor-form button.part-selector-explorer-choice:hover,
.editor-form button.part-selector-explorer-choice:focus-visible,
.wo-editor-form button.part-selector-explorer-choice:hover,
.wo-editor-form button.part-selector-explorer-choice:focus-visible {
    border-color: rgba(124, 190, 40, 0.72);
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.12);
}

.part-selector-explorer-choice-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 9px;
    background: rgba(124, 190, 40, 0.14);
    color: var(--accent-strong);
    font-size: 1.05rem;
    overflow: hidden;
}

.part-selector-explorer-choice-icon.has-image {
    padding: 2px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-sizing: border-box;
}

.part-selector-explorer-choice-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.part-selector-explorer-choice-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.part-selector-explorer-choice-copy strong,
.part-selector-explorer-choice-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-selector-explorer-choice-copy strong {
    font-size: 0.84rem;
}

.part-selector-explorer-choice-copy small {
    color: var(--ink-muted);
    font-size: 0.7rem;
}

.part-selector-explorer-browse {
    min-height: 54px;
    white-space: nowrap;
}

.part-selector-explorer-layer {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(4px);
}

.part-selector-explorer-layer[hidden] {
    display: none;
}

.part-selector-explorer-dialog {
    display: flex;
    width: min(1160px, calc(100vw - 48px));
    height: min(860px, calc(100dvh - 48px));
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(248, 250, 254, 0.99));
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.38);
}

.part-selector-explorer-head,
.part-selector-explorer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-color: var(--line);
    background: color-mix(in srgb, var(--panel) 96%, transparent);
}

.part-selector-explorer-head {
    border-bottom: 1px solid var(--line);
}

.part-selector-explorer-head > div {
    display: grid;
    gap: 2px;
}

.part-selector-explorer-head span {
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.part-selector-explorer-head strong {
    font-size: 1.15rem;
}

.part-selector-explorer-close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink-soft);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.part-selector-explorer-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
}

.part-selector-explorer-layer .part-selector-search {
    width: 100%;
    min-width: 0;
    padding-left: 36px;
}

.part-selector-explorer-layer .part-selector-search,
.part-selector-explorer-layer .part-selector-sort,
.part-selector-explorer-layer .part-selector-stock-filter {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.part-selector-explorer-layer .part-selector-search {
    padding-block: 0;
    padding-right: 12px;
}

.part-selector-explorer-layer .part-selector-sort,
.part-selector-explorer-layer .part-selector-stock-filter {
    min-width: 138px;
    padding: 0 34px 0 12px;
}

.part-selector-explorer-layer .part-selector-search:hover,
.part-selector-explorer-layer .part-selector-sort:hover,
.part-selector-explorer-layer .part-selector-stock-filter:hover {
    border-color: var(--line-strong);
}

.part-selector-explorer-layer .part-selector-search:focus,
.part-selector-explorer-layer .part-selector-sort:focus,
.part-selector-explorer-layer .part-selector-stock-filter:focus {
    outline: none;
    border-color: rgba(124, 190, 40, 0.78);
    box-shadow: 0 0 0 3px rgba(124, 190, 40, 0.13);
}

.part-selector-explorer-layer label.part-selector-relevance-toggle {
    display: inline-flex !important;
    min-height: 40px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--border, #d6deea);
    border-radius: 10px;
    background: var(--surface-soft, #f6f8fb);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.part-selector-explorer-layer label.part-selector-relevance-toggle input {
    width: auto !important;
    min-height: 0;
    flex: 0 0 auto;
    margin: 0;
}

.part-selector-explorer-body .part-selector-results {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.part-selector-explorer-layer.is-list-view .part-selector-results {
    grid-template-columns: minmax(0, 1fr);
}

.part-selector-explorer-layer.is-list-view .part-selector-card {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 96px;
}

.part-selector-explorer-layer.is-list-view .part-selector-card-media {
    min-height: 94px;
    padding: 9px;
    box-sizing: border-box;
}

.part-selector-explorer-layer.is-list-view .part-selector-card-body {
    padding: 10px 14px 11px;
}

/* List rows retain the complete card dataset without becoming taller. */
.part-selector.is-list-view .part-selector-card-body,
.part-selector-explorer-layer.is-list-view .part-selector-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 3px 10px;
}

.part-selector.is-list-view .part-selector-card-badges,
.part-selector-explorer-layer.is-list-view .part-selector-card-badges {
    grid-column: 1 / 3;
    grid-row: 1;
    align-self: center;
    flex-wrap: nowrap;
    margin: 0;
}

.part-selector.is-list-view .part-selector-card-stock,
.part-selector-explorer-layer.is-list-view .part-selector-card-stock {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin: 0;
    white-space: nowrap;
}

.part-selector.is-list-view .part-selector-card-name,
.part-selector-explorer-layer.is-list-view .part-selector-card-name {
    grid-column: 1 / -1;
    grid-row: 2;
    -webkit-line-clamp: 1;
}

.part-selector.is-list-view .part-selector-card-number,
.part-selector-explorer-layer.is-list-view .part-selector-card-number {
    grid-column: 1;
    grid-row: 3;
}

.part-selector.is-list-view .part-selector-card-meta,
.part-selector-explorer-layer.is-list-view .part-selector-card-meta {
    grid-column: 2 / -1;
    grid-row: 3;
    min-width: 0;
}

.part-selector-explorer-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

.part-selector-explorer-actions button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 249, 253, 0.99));
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.part-selector-explorer-actions button:not(.button-ghost) {
    min-width: 170px;
    border-color: var(--accent-strong);
    background: linear-gradient(180deg, #9fe949 0%, #84d33a 100%);
    color: #16230f;
    box-shadow: 0 10px 22px rgba(124, 190, 40, 0.2);
}

.part-selector-explorer-actions button:not(.button-ghost):hover:not(:disabled) {
    filter: brightness(1.035);
    transform: translateY(-1px);
}

.part-selector-explorer-actions button:disabled {
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--ink-muted);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.72;
}

body.theme-dark .part-selector-explorer-dialog {
    background: linear-gradient(180deg, rgba(50, 56, 66, 0.995), rgba(43, 48, 58, 0.99));
}

.purchase-order-line-part-composer {
    display: grid;
    gap: 8px;
}

.purchase-order-line-part-composer.has-linked-part .purchase-order-line-title-field,
.purchase-order-line-part-composer.has-linked-part .purchase-order-line-part-divider {
    display: none;
}

.purchase-order-line-title-field {
    display: grid;
    gap: 7px;
}

.purchase-order-line-title-field > span {
    color: var(--ink-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.purchase-order-line-part-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.purchase-order-line-part-divider::before,
.purchase-order-line-part-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--line);
}

.purchase-order-line-part-explorer .part-selector-label {
    display: none;
}

/* Critical-spares rows use compact table controls. Keep the selector launcher
   aligned with the required-on-hand input and row action. */
.asset-editor-critical-parts-table button.part-selector-explorer-choice,
.asset-editor-critical-parts-table .part-selector-explorer-browse {
    height: 44px;
    min-height: 44px;
}

.asset-editor-critical-parts-table button.part-selector-explorer-choice {
    padding: 5px 10px;
}

.asset-editor-critical-parts-table .part-selector-explorer-choice-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
    font-size: 0.92rem;
}

.asset-editor-critical-parts-table .part-selector-explorer-choice-copy strong {
    font-size: 0.8rem;
}

.asset-editor-critical-parts-table .part-selector-explorer-choice-copy small {
    font-size: 0.65rem;
}

@media (min-width: 701px) {
    .asset-editor-critical-parts-table .asset-editor-collection-metric > input,
    .asset-editor-critical-parts-table .asset-editor-collection-action > button {
        margin-top: 24px;
    }
}

@media (max-width: 700px) {
    .part-selector-explorer-layer {
        padding: 0;
    }

    .part-selector-explorer-dialog {
        width: 100vw;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .part-selector-explorer-head {
        padding: max(14px, env(safe-area-inset-top)) 14px 13px;
    }

    .part-selector-explorer-body {
        padding: 13px 14px;
    }

    .part-selector-explorer-body .part-selector-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-selector-explorer-body .part-selector-search-wrap {
        grid-column: 1 / -1;
    }

    .part-selector-explorer-body .part-selector-sort,
    .part-selector-explorer-body .part-selector-stock-filter {
        width: 100%;
        min-width: 0;
    }

    .part-selector-explorer-body .part-selector-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-selector-explorer-body .part-selector-card,
    .part-selector-explorer-layer.is-list-view .part-selector-card {
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-rows: minmax(116px, auto);
        min-height: 116px;
    }

    .part-selector-explorer-body .part-selector-card-media,
    .part-selector-explorer-layer.is-list-view .part-selector-card-media {
        min-height: 116px;
    }

    .part-selector-explorer-actions {
        padding: 11px 14px max(11px, env(safe-area-inset-bottom));
    }

    .part-selector-explorer-actions button {
        flex: 1 1 0;
        min-width: 0 !important;
    }
}

@media (max-width: 520px) {
    .part-selector-explorer-launcher {
        grid-template-columns: minmax(0, 1fr);
    }

    .part-selector-explorer-browse {
        width: 100%;
        min-height: 42px;
    }
}

/* Contextual workspace navigation ---------------------------------------
   The close control exits to the current record register. When a record was
   opened from another workspace, this separate control restores that exact
   parent context instead of overloading the close action. */
.wo-workspace-dialog-shell {
    position: relative;
    min-width: 0;
    max-width: 100%;
    width: min(1180px, 100%);
    height: min(92dvh, 980px);
    min-height: 0;
}

.wo-workspace-dialog-shell.is-purchase-order {
    width: min(1320px, 100%);
    height: min(96dvh, 1040px);
}

.wo-workspace-dialog-shell.is-asset {
    width: min(1240px, 100%);
    height: min(94dvh, 1020px);
}

.wo-workspace-dialog-shell.is-part {
    width: min(1280px, 100%);
    height: min(94dvh, 1020px);
}

.wo-workspace-dialog-shell > .wo-workspace-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
}

.wo-workspace-dialog-shell > .wo-workspace-return-context {
    position: absolute;
    top: clamp(96px, 15%, 148px);
    right: calc(100% + 14px);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    max-width: 190px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid rgba(231, 190, 91, 0.58);
    border-radius: 11px 5px 5px 11px;
    background: linear-gradient(135deg, rgba(73, 57, 19, 0.98), rgba(118, 91, 33, 0.98));
    box-shadow: 0 12px 28px rgba(52, 40, 13, 0.32);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wo-workspace-dialog-shell > .wo-workspace-return-context::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 7px solid rgba(118, 91, 33, 0.98);
    transform: translateY(-50%);
}

.wo-workspace-dialog-shell > .wo-workspace-return-context:hover,
.wo-workspace-dialog-shell > .wo-workspace-return-context:focus-visible {
    border-color: rgba(248, 216, 132, 0.82);
    background: linear-gradient(135deg, rgba(88, 68, 23, 0.99), rgba(139, 107, 38, 0.99));
    box-shadow: 0 15px 32px rgba(52, 40, 13, 0.38);
    color: #ffffff;
    text-decoration: none;
    transform: translateX(-2px);
}

.wo-workspace-dialog-shell > .wo-workspace-return-context:hover::after,
.wo-workspace-dialog-shell > .wo-workspace-return-context:focus-visible::after {
    border-left-color: rgba(139, 107, 38, 0.99);
}

.wo-workspace-dialog-shell > .wo-workspace-return-context:focus-visible {
    outline: 3px solid rgba(231, 190, 91, 0.3);
    outline-offset: 3px;
}

@media (max-width: 1480px) {
    .wo-workspace-dialog-shell,
    .wo-workspace-dialog-shell.is-purchase-order,
    .wo-workspace-dialog-shell.is-asset,
    .wo-workspace-dialog-shell.is-part {
        display: flex;
        height: min(96vh, 1040px);
        flex-direction: column;
        gap: 8px;
    }

    .wo-workspace-dialog-shell > .wo-workspace-return-context {
        position: static;
        align-self: flex-start;
        flex: 0 0 auto;
        max-width: min(100%, 260px);
        border-radius: 10px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    }

    .wo-workspace-dialog-shell > .wo-workspace-return-context::after {
        display: none;
    }

    .wo-workspace-dialog-shell > .wo-workspace-return-context:hover,
    .wo-workspace-dialog-shell > .wo-workspace-return-context:focus-visible {
        transform: translateY(-1px);
    }

    .wo-workspace-dialog-shell > .wo-workspace-card {
        flex: 1 1 auto;
        height: auto;
    }
}

@media (max-width: 640px) {
    .wo-workspace-dialog-shell,
    .wo-workspace-dialog-shell.is-purchase-order,
    .wo-workspace-dialog-shell.is-asset,
    .wo-workspace-dialog-shell.is-part {
        width: 100%;
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        gap: 6px;
    }

    .wo-workspace-dialog-shell > .wo-workspace-return-context {
        min-height: 34px;
        max-width: 100%;
        padding: 7px 10px;
        font-size: 0.72rem;
    }

    .wo-workspace-dialog-shell > .wo-workspace-card {
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
    }
}
/* Knowledge article reading layout. */
.knowledge-page-title { display: flex; align-items: center; gap: 10px; }
.knowledge-page-title > .icon { display: inline-flex; width: 28px; height: 28px; color: var(--accent-deep); }
.knowledge-page-title > .icon svg { width: 100%; height: 100%; }
.knowledge-article-page { display: grid; min-width: 0; gap: 18px; }
.knowledge-article {
    --article-border: color-mix(in srgb, var(--line-strong) 75%, #91a4b3);
    min-width: 0;
}
.knowledge-article-back { display: inline-flex; align-items: center; justify-self: start; gap: 8px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.knowledge-article-back:hover { color: var(--ink); }
.knowledge-article-masthead { padding: 24px 28px 20px; border: 1px solid var(--article-border); border-left: 4px solid #416747; border-radius: 12px; background: linear-gradient(115deg, var(--panel) 20%, color-mix(in srgb, var(--panel) 92%, #80a95b)); box-shadow: 0 4px 14px rgba(33, 53, 41, 0.04); }
.knowledge-article-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; padding-bottom: 20px; }
.knowledge-article-book-mark { display: grid; place-items: center; width: 54px; height: 62px; border: 1px solid #294b37; border-radius: 8px 12px 12px 8px; background: linear-gradient(135deg, #284f3a, #3e6b47); color: #c3e991; box-shadow: inset 4px 0 0 rgba(255, 255, 255, 0.12), 3px 3px 0 color-mix(in srgb, var(--panel) 70%, var(--line)); }
.knowledge-article-book-mark .icon { display: inline-flex; width: 29px; height: 29px; }
.knowledge-article-book-mark .icon svg { width: 100%; height: 100%; }
.knowledge-article-heading { min-width: 0; }
.knowledge-article-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink-soft); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.knowledge-article-type { padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 5px; background: color-mix(in srgb, var(--accent) 13%, var(--panel)); color: var(--ink-soft); font-size: 0.7rem; letter-spacing: 0; text-transform: none; }
.knowledge-article-heading h2 { margin: 8px 0 0; color: var(--ink); font-size: clamp(1.6rem, 2.5vw, 2.15rem); font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.knowledge-article-source { margin: 7px 0 0; color: var(--ink-soft); font-size: 0.85rem; }
.knowledge-article-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 11px; }
.knowledge-article-folio { padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--ink-soft); font-family: ui-monospace, Consolas, monospace; font-size: 0.66rem; letter-spacing: 0.08em; }
.knowledge-article-edit { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.knowledge-article-edit > .icon { display: inline-flex; width: 16px; height: 16px; }
.knowledge-article-edit > .icon svg { width: 100%; height: 100%; }
.knowledge-article-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.knowledge-article-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 28px; margin: 0; font-size: 0.82rem; }
.knowledge-article-meta > div { display: grid; gap: 4px; min-width: 0; }
.knowledge-article-meta dt { color: var(--ink-soft); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.knowledge-article-meta dd { margin: 0; color: var(--ink-soft); font-weight: 700; overflow-wrap: anywhere; }
.knowledge-article-window { min-width: 0; margin-top: 22px; }
.knowledge-article-tabs { display: flex; align-items: flex-end; gap: 5px; min-width: 0; padding: 5px 12px 0; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--article-border); }
.knowledge-article-tabs .wo-workspace-tab { flex: 0 0 auto; gap: 8px; min-height: 49px; margin-bottom: -1px; padding: 13px 21px; border: 1px solid var(--article-border); border-bottom-color: var(--article-border); border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--panel-soft) 65%, var(--line)); color: var(--ink-soft); font-size: 0.85rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: background 0.16s ease, color 0.16s ease; }
.knowledge-article-tabs .wo-workspace-tab::after { display: none; }
.knowledge-article-tabs .wo-workspace-tab:hover { background: color-mix(in srgb, var(--panel) 85%, var(--accent)); color: var(--ink); }
.knowledge-article-tabs .wo-workspace-tab.is-active { z-index: 1; padding-top: 16px; min-height: 53px; border-bottom-color: var(--panel); background: var(--panel); color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.knowledge-article-tabs .wo-workspace-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -5px; }
.knowledge-article-tabs .icon { display: inline-flex; width: 16px; height: 16px; opacity: 0.8; }
.knowledge-article-tabs .icon svg { width: 100%; height: 100%; }
.knowledge-article-tab-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 6px; color: var(--ink-muted); background: color-mix(in srgb, var(--line) 50%, transparent); font-size: 0.69rem; }
.knowledge-article-content { min-width: 0; min-height: 380px; padding: 28px; border: 1px solid var(--article-border); border-top: 0; border-radius: 0 0 14px 14px; background: var(--panel); box-shadow: 0 10px 24px rgba(35, 49, 66, 0.055); }
.knowledge-article-content .wo-tab-panel-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.knowledge-article-content .wo-tab-panel-head h3 { font-size: 1.3rem; letter-spacing: -0.015em; }
.knowledge-article-content .wo-tab-panel-head p { max-width: 76ch; font-size: 0.85rem; }
.knowledge-article-content .wo-overview-card { box-shadow: none; border-color: var(--line); border-radius: 10px; background: var(--panel); }
.knowledge-article-content .knowledge-guidance-grid { gap: 26px; align-items: start; }
.knowledge-article-content .knowledge-article-symptom { padding: 20px; border-left: 3px solid color-mix(in srgb, var(--accent) 75%, #5a7351); background: color-mix(in srgb, var(--panel) 94%, var(--accent)); }
.knowledge-article-content .knowledge-article-resolution { padding: 20px 8px; border: 0; border-radius: 0; }
.knowledge-article-content .wo-overview-header { display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
.knowledge-article-section-number { display: inline-grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: var(--panel-soft); font-family: ui-monospace, Consolas, monospace; font-size: 0.71rem; font-weight: 700; }
.knowledge-article-content .knowledge-rich-text { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.8; }
.knowledge-article-content .knowledge-rich-text > p { max-width: 88ch; }
.knowledge-article-content .knowledge-tree-card { border-radius: 14px; box-shadow: none; }
.knowledge-article-content .knowledge-tree-preview-viewport { max-height: 72dvh; min-height: 360px; }
body.theme-dark .knowledge-article-content .knowledge-article-symptom { border-left-color: #87a968; background: color-mix(in srgb, var(--panel) 94%, var(--accent)); }
body.theme-dark .knowledge-article-content .knowledge-article-resolution { background: transparent; }
@media (max-width: 680px) {
    .knowledge-article-page { gap: 16px; }
    .knowledge-article-masthead { padding: 20px 16px 18px; }
    .knowledge-article-header { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
    .knowledge-article-book-mark { width: 39px; height: 48px; }
    .knowledge-article-book-mark .icon { width: 23px; height: 23px; }
    .knowledge-article-heading h2 { font-size: 1.5rem; }
    .knowledge-article-eyebrow { gap: 7px; font-size: 0.59rem; }
    .knowledge-article-header-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .knowledge-article-meta-row { align-items: flex-start; gap: 14px; }
    .knowledge-article-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 14px; }
    .knowledge-article-tabs { padding-left: 5px; padding-right: 5px; gap: 4px; }
    .knowledge-article-tabs .wo-workspace-tab { padding-inline: 13px; font-size: 0.8rem; }
    .knowledge-article-tabs .icon { width: 14px; height: 14px; }
    .knowledge-article-content { padding: 20px 16px; }
    .knowledge-article-content .knowledge-article-symptom { padding: 16px; }
    .knowledge-article-content .knowledge-article-resolution { padding: 2px 0; }
    .knowledge-article-content .knowledge-tree-reader-actions { width: 100%; flex-wrap: wrap; }
    .knowledge-article-content .knowledge-tree-preview-viewport { min-height: 300px; }
}

/* Global personal notes workspace */
body.notes-overlay-open {
    overflow: hidden;
}

body.notes-overlay-open .notes-global-launcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.notes-context-launcher-visible:not(.notes-overlay-open) .notes-global-launcher {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.notes-overlay-open .mm2-dialog-layer {
    z-index: 3700;
}

.notes-global-launcher {
    position: fixed;
    z-index: 3500;
    left: 12px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 12px 11px 10px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, #1d4a37, #2f704c);
    box-shadow: 0 10px 30px rgba(18,36,48,.3);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: padding .16s ease, opacity .16s ease, background .16s ease;
}
.notes-global-launcher:hover { padding-right: 17px; background: linear-gradient(145deg, #245b43, #38805a); }
.notes-global-launcher svg { width: 18px; height: 18px; }
.notes-global-launcher.is-nav-positioned {
    top: var(--notes-launcher-top);
    left: var(--notes-launcher-left);
    bottom: auto;
    width: var(--notes-launcher-width);
    height: var(--notes-launcher-height);
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 10px;
}
.notes-global-launcher.is-nav-positioned:hover { padding-right: 12px; }
.notes-global-launcher.is-nav-positioned.is-nav-compact { justify-content: center; padding: 0; }
.notes-global-launcher.is-nav-positioned.is-nav-compact:hover { padding: 0; }
.notes-global-launcher.is-nav-compact span { display: none; }

.notes-overlay[hidden] {
    display: none !important;
}

.notes-overlay {
    position: fixed;
    inset: 0;
    z-index: 3600;
    display: grid;
    place-items: center;
    padding: clamp(10px, 2vw, 28px);
}

.notes-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 28, 39, .72);
    backdrop-filter: blur(7px);
}

.notes-workspace {
    position: relative;
    width: min(1660px, 100%);
    height: min(920px, calc(100dvh - 40px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 24px;
    background: #f6f8fb;
    box-shadow: 0 30px 90px rgba(8, 20, 30, .42);
}

.notes-workspace-header {
    flex: 0 0 auto;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    color: #fff;
    background: linear-gradient(120deg, #193f31 0%, #2e6b49 100%);
}

.notes-workspace-heading,
.notes-workspace-header-actions,
.notes-command-bar,
.notes-view-switch,
.notes-toggle,
.notes-compact-control {
    display: flex;
    align-items: center;
}

.notes-workspace-heading { gap: 14px; }
.notes-workspace-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 14px;
    background: rgba(255,255,255,.1);
}
.notes-workspace-mark svg { width: 24px; height: 24px; }
.notes-workspace-heading span,
.notes-inspector-header span {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    opacity: .75;
}
.notes-workspace-heading h2 { margin: 0; color: inherit; font-size: 25px; }
.notes-workspace-header-actions { gap: 10px; }
.notes-save-state {
    min-width: 68px;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
    color: rgba(255,255,255,.8);
}
.notes-save-state[data-tone="error"] { color: #ffd1cc; }

.notes-new-button,
.notes-secondary-button,
.notes-close-button {
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.notes-new-button {
    padding: 11px 16px;
    color: #18330f;
    background: #8bd42a;
    border-color: #69ac16;
}
.notes-new-button:hover { background: #98df39; }
.notes-close-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.2);
}
.notes-close-button svg { width: 20px; height: 20px; }

.notes-command-bar {
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid #d7dfeb;
    background: #fff;
}
.notes-search-field {
    min-width: 220px;
    max-width: 480px;
    flex: 1 1 360px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid #cad5e4;
    border-radius: 11px;
    background: #fbfcfe;
}
.notes-search-field:focus-within { border-color: #72ad31; box-shadow: 0 0 0 3px rgba(123,190,47,.13); }
.notes-search-field svg { width: 17px; height: 17px; color: #748095; }
.notes-search-field input { width: 100%; height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: #273044; }
.notes-view-switch { padding: 3px; border: 1px solid #cad5e4; border-radius: 11px; background: #f4f7fb; }
.notes-view-switch button { padding: 7px 12px; border: 0; border-radius: 8px; color: #5b667a; background: transparent; font-weight: 750; cursor: pointer; }
.notes-view-switch button.is-active { color: #214f39; background: #fff; box-shadow: 0 1px 4px rgba(30,50,70,.12); }
.notes-toggle { gap: 7px; height: 42px; padding: 0 12px; border: 1px solid #cad5e4; border-radius: 11px; color: #3b4558; font-weight: 700; }
.notes-toggle input { accent-color: #68ac17; }
.notes-compact-control { gap: 7px; height: 42px; padding: 0 8px 0 11px; border: 1px solid #cad5e4; border-radius: 11px; color: #6c7689; font-size: 12px; font-weight: 750; }
.notes-compact-control select { border: 0; outline: 0; background: transparent; color: #2f394d; font-weight: 750; }
.notes-secondary-button { min-height: 42px; padding: 0 14px; color: #344054; border-color: #cad5e4; background: #fff; }

.notes-workspace-body { min-height: 0; flex: 1; display: flex; position: relative; }
.notes-calculator {
    width: 278px;
    flex: 0 0 278px;
    overflow: hidden;
    border-right: 1px solid #d7dfeb;
    background: #f9fbfd;
    box-shadow: 10px 0 28px rgba(34,48,65,.06);
    transition: width .2s ease, flex-basis .2s ease;
}
.notes-calculator.is-collapsed { width: 56px; flex-basis: 56px; }
.notes-calculator-header { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px 12px 18px; border-bottom: 1px solid #dde5ee; background: #fff; }
.notes-calculator-header span { display: block; color: #8490a3; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.notes-calculator-header h3 { margin: 2px 0 0; color: #293246; font-size: 17px; }
.notes-calculator-header button { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #cdd7e4; border-radius: 9px; color: #526076; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: transform .2s ease; }
.notes-calculator.is-collapsed .notes-calculator-header { justify-content: center; padding: 12px; }
.notes-calculator.is-collapsed .notes-calculator-header > div,
.notes-calculator.is-collapsed .notes-calculator-content { display: none; }
.notes-calculator.is-collapsed .notes-calculator-header button { transform: rotate(180deg); }
.notes-calculator-content { padding: 15px; }
.notes-calculator-display { min-height: 86px; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; margin-bottom: 12px; padding: 12px 14px; overflow: hidden; border: 1px solid #d2dce8; border-radius: 13px; color: #293246; background: #fff; box-shadow: inset 0 1px 3px rgba(35,50,67,.04); }
.notes-calculator-display span { width: 100%; overflow: hidden; color: #8290a4; font-size: 12px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.notes-calculator-display strong { width: 100%; overflow: hidden; font-size: 27px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.notes-calculator-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.notes-calculator-keys button { min-width: 0; height: 44px; border: 1px solid #d3dce7; border-radius: 10px; color: #2e394c; background: #fff; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; box-shadow: 0 2px 5px rgba(34,48,65,.05); }
.notes-calculator-keys button:hover { border-color: #aebdce; background: #f4f7fa; }
.notes-calculator-keys .is-function { color: #68758a; background: #eef2f6; }
.notes-calculator-keys .is-operator { color: #315d47; background: #eaf4df; border-color: #c6dda9; }
.notes-calculator-keys .is-wide { grid-column: span 2; }
.notes-calculator-keys .is-equals { grid-column: span 3; color: #17320f; background: #8bd42a; border-color: #6eaf1d; }
.notes-board-viewport {
    position: relative;
    min-width: 0;
    flex: 1;
    overflow: auto;
    background-color: #f5f7fa;
    background-image: radial-gradient(circle, rgba(84,103,127,.18) 1px, transparent 1px);
    background-size: 20px 20px;
}
.notes-board-canvas {
    position: relative;
    min-width: 100%;
    min-height: 100%;
    padding: 28px;
    box-sizing: border-box;
    zoom: var(--notes-zoom, 1);
}
.notes-board-canvas.is-free { min-width: 1800px; min-height: 1200px; }
.notes-board-canvas.is-grid {
    display: grid;
    grid-template-columns: repeat(var(--notes-grid-columns, 3), minmax(260px, 1fr));
    align-content: start;
    gap: 20px;
}

.workspace-note-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 240px;
    min-height: 200px;
    overflow: hidden;
    border: 1px solid rgba(68,84,103,.2);
    border-radius: 15px;
    color: var(--note-text);
    background: var(--note-body);
    box-shadow: 0 12px 28px rgba(33,45,60,.13);
    transition: box-shadow .18s ease, border-color .18s ease;
}
.workspace-note-card.is-selected { border-color: #78bb2b; box-shadow: 0 0 0 3px rgba(126,194,48,.15), 0 16px 32px rgba(33,45,60,.16); }
.workspace-note-card.is-moving { cursor: grabbing; box-shadow: 0 24px 55px rgba(33,45,60,.24); }
.notes-board-canvas.is-grid .workspace-note-card {
    position: relative;
    inset: auto !important;
    width: auto !important;
    height: 320px !important;
    z-index: auto !important;
}
.workspace-note-header {
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 8px 15px;
    color: var(--note-head-text);
    background: var(--note-head);
    cursor: grab;
    user-select: none;
}
.notes-board-canvas.is-grid .workspace-note-header { cursor: default; }
.workspace-note-header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.workspace-note-actions { display: flex; gap: 3px; }
.note-icon-button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    color: inherit;
    background: transparent;
    cursor: pointer;
}
.note-icon-button:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.12); }
.note-icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.workspace-note-editor-toolbar {
    display: none;
    align-items: center;
    gap: 2px;
    padding: 5px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    border-bottom: 1px solid rgba(88,104,123,.15);
    background: rgba(255,255,255,.48);
}
.workspace-note-card:focus-within .workspace-note-editor-toolbar,
.workspace-note-card.is-selected .workspace-note-editor-toolbar { display: flex; }
.workspace-note-editor-toolbar button { min-width: 27px; height: 27px; flex: 0 0 auto; padding: 0 7px; border: 0; border-radius: 6px; color: var(--note-text); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.workspace-note-editor-toolbar button:hover { background: rgba(80,96,115,.12); }
.workspace-note-size-select { width: 78px; height: 27px; flex: 0 0 78px; padding: 0 4px; border: 1px solid rgba(80,96,115,.2); border-radius: 6px; color: var(--note-text); background: rgba(255,255,255,.55); font-size: 11px; font-weight: 700; }
.workspace-note-editor {
    min-height: 0;
    flex: 1;
    padding: 14px 16px 22px;
    overflow: auto;
    outline: 0;
    color: var(--note-text);
    font-size: 14px;
    line-height: 1.5;
    cursor: text;
}
.workspace-note-editor:empty::before { content: attr(data-placeholder); color: color-mix(in srgb, var(--note-text) 48%, transparent); }
.workspace-note-editor p { margin: 0 0 .65em; }
.workspace-note-editor ul, .workspace-note-editor ol { margin: .4em 0; padding-left: 1.5em; }
.workspace-note-editor [data-mm2-size="small"] { font-size: .82em; }
.workspace-note-editor [data-mm2-size="normal"] { font-size: 1em; }
.workspace-note-editor [data-mm2-size="large"] { font-size: 1.28em; }
.workspace-note-editor [data-mm2-size="x-large"] { font-size: 1.65em; line-height: 1.25; }
.workspace-note-resize {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: linear-gradient(135deg, transparent 45%, color-mix(in srgb, var(--note-text) 30%, transparent) 46% 55%, transparent 56% 64%, color-mix(in srgb, var(--note-text) 35%, transparent) 65% 74%, transparent 75%);
    cursor: nwse-resize;
}
.notes-board-canvas.is-grid .workspace-note-resize { display: none; }

.notes-empty-state,
.notes-loading-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: #647087;
    pointer-events: none;
}
.notes-empty-state[hidden], .notes-loading-state[hidden] { display: none; }
.notes-empty-state > span { font-size: 34px; color: #78ba2f; }
.notes-empty-state h3 { margin: 8px 0 3px; color: #293246; }
.notes-empty-state p { margin: 0 0 16px; }
.notes-empty-state button { pointer-events: auto; }
.notes-loading-spinner { width: 30px; height: 30px; border: 3px solid #dce4ee; border-top-color: #6bae1f; border-radius: 50%; animation: notes-spin .75s linear infinite; }
@keyframes notes-spin { to { transform: rotate(360deg); } }

.notes-inspector {
    width: 330px;
    flex: 0 0 330px;
    overflow: auto;
    border-left: 1px solid #d7dfeb;
    background: #fff;
    box-shadow: -12px 0 30px rgba(35,48,64,.08);
}
.notes-inspector[hidden] { display: none; }
.notes-inspector-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid #e1e7ef; }
.notes-inspector-header span { color: #728096; }
.notes-inspector-header h3 { margin: 0; font-size: 17px; color: #293246; }
.notes-inspector-header button { width: 34px; height: 34px; border: 1px solid #d1dae6; border-radius: 9px; background: #fff; color: #5f6b7d; font-size: 22px; cursor: pointer; }
.notes-inspector-content { display: grid; gap: 18px; padding: 20px; }
.notes-inspector-content label { display: grid; gap: 7px; color: #657189; font-size: 12px; font-weight: 750; }
.notes-inspector-content input[type="text"], .notes-inspector-content input[type="number"] { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #cbd6e4; border-radius: 9px; color: #293246; background: #fff; }
.notes-size-fields, .notes-color-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notes-color-fields input[type="color"] { width: 100%; height: 40px; padding: 3px; border: 1px solid #cbd6e4; border-radius: 9px; background: #fff; }
.notes-inspector fieldset { margin: 0; padding: 0; border: 0; }
.notes-inspector legend { margin-bottom: 9px; color: #657189; font-size: 12px; font-weight: 750; }
.notes-theme-presets { display: flex; gap: 9px; }
.notes-theme-presets button { width: 38px; height: 38px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg, var(--theme-head) 0 50%, var(--theme-body) 51%); box-shadow: 0 0 0 1px #c8d2df; cursor: pointer; }
.notes-inspector-help { margin: 0; padding: 11px 12px; border-radius: 9px; color: #69758a; background: #f4f7fa; font-size: 12px; line-height: 1.45; }

.notes-page-card { max-width: 720px; margin: 70px auto; padding: 48px; border: 1px solid #d5dfeb; border-radius: 24px; text-align: center; background: #fff; box-shadow: 0 16px 42px rgba(37,51,70,.08); }
.notes-page-card-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 18px; color: #315d47; background: #e7f3da; font-size: 28px; }
.notes-page-card > span { color: #7a879a; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.notes-page-card h1 { margin: 8px 0; color: #273044; }
.notes-page-card p { margin: 0 auto 22px; max-width: 540px; color: #657189; line-height: 1.6; }

@media (max-width: 980px) {
    .notes-overlay { padding: 0; }
    .notes-workspace { width: 100%; height: 100%; border: 0; border-radius: 0; }
    .notes-command-bar { overflow-x: auto; }
    .notes-search-field { flex: 0 0 min(340px, 70vw); }
    .notes-compact-control { display: none; }
    .notes-board-canvas.is-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
    .notes-inspector { position: absolute; z-index: 20; top: 0; right: 0; bottom: 0; }
    .notes-calculator { position: absolute; z-index: 19; top: 0; left: 0; bottom: 0; width: min(290px, 85vw); box-shadow: 14px 0 34px rgba(28,42,58,.18); }
    .notes-calculator.is-collapsed { width: 54px; }
}

@media (max-width: 640px) {
    .notes-global-launcher:not(.is-nav-positioned) { top: auto; right: auto; left: 12px; bottom: 16px; border-radius: 13px; }
    .notes-workspace-header { min-height: 72px; padding: 12px 14px; }
    .notes-workspace-mark { width: 39px; height: 39px; }
    .notes-workspace-heading h2 { font-size: 20px; }
    .notes-workspace-heading > div > span, .notes-save-state { display: none; }
    .notes-new-button { padding: 9px 11px; }
    .notes-command-bar { padding: 9px 10px; }
    .notes-search-field { flex-basis: 58vw; }
    .notes-toggle, .notes-secondary-button { display: none; }
    .notes-board-canvas, .notes-board-canvas.is-free, .notes-board-canvas.is-grid {
        min-width: 100%;
        min-height: 100%;
        display: grid;
        grid-template-columns: 1fr;
        align-content: start;
        gap: 14px;
        padding: 14px;
        zoom: 1;
    }
    .notes-board-canvas .workspace-note-card {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: min(340px, 50vh) !important;
        z-index: auto !important;
    }
    .workspace-note-header { cursor: default; }
    .workspace-note-resize { display: none; }
    .notes-inspector { width: 100%; top: auto; height: min(68vh, 560px); border-left: 0; border-top: 1px solid #d7dfeb; border-radius: 18px 18px 0 0; }
}
/* Reusable camera capture keeps Browse available while offering an in-app photo path. */
.mm2-code-scanner-dialog{width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
.mm2-code-scanner-dialog::backdrop{background:rgba(10,20,17,.68)}
.mm2-code-scanner-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.mm2-code-scanner-heading h2{margin:2px 0 0}
.mm2-code-scanner-heading .card-label{margin:0}
.mm2-code-scanner-viewport{position:relative;margin-top:14px;border-radius:12px;overflow:hidden;background:#101412}
.mm2-code-scanner-viewport video{display:block;width:100%;height:min(52dvh,420px);min-height:210px;object-fit:contain}
.mm2-code-scanner-guide{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(82%,520px);height:min(58%,260px);border:2px solid rgba(255,255,255,.9);border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.14);pointer-events:none}
.mm2-code-scanner-tools{display:flex;align-items:end;gap:12px;margin:12px 0}
.mm2-code-scanner-tools label{display:grid;gap:6px;flex:1}
.mm2-code-scanner-tools input{width:100%}
.mm2-code-scanner-camera{display:grid;gap:6px;margin-top:12px}
.mm2-code-scanner-camera select{width:100%;min-height:44px;border:1px solid var(--line-strong);border-radius:10px;padding:8px 10px;background:var(--panel);color:inherit}
.work-order-scan-feedback{grid-column:1/-1;min-height:1.4em;margin:0;color:var(--ink-soft);font-size:.82rem}
@media(max-width:600px){.mm2-code-scanner-dialog{padding:16px}.mm2-code-scanner-viewport video{min-height:180px}.mm2-code-scanner-tools{align-items:stretch;flex-direction:column}.mm2-code-scanner-tools button{width:100%}}
.mm2-photo-capture-button{justify-self:start;gap:8px;margin-top:8px}
.mm2-photo-capture-button svg,.mm2-photo-actions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.mm2-photo-dialog{width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:22px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
.mm2-photo-dialog::backdrop{background:rgba(10,20,17,.68)}
.mm2-photo-dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.mm2-photo-dialog-heading h2{margin:2px 0 0}
.mm2-photo-dialog-heading .card-label{margin:0}
.mm2-photo-dialog video{display:block;width:100%;max-height:min(52dvh,420px);min-height:180px;object-fit:contain;margin-top:14px;border-radius:12px;background:#101412}
.mm2-photo-status{min-height:1.5em;margin:12px 0;color:var(--ink-soft)}
.mm2-photo-camera-label{display:grid;gap:6px;margin:12px 0}
.mm2-photo-camera-label select{width:100%;min-height:44px;border:1px solid var(--line-strong);border-radius:10px;padding:8px 10px;background:var(--panel);color:inherit}
.mm2-photo-actions{display:flex;justify-content:flex-end;margin-top:16px}
.mm2-photo-actions button{display:inline-flex;align-items:center;gap:8px}
@media(max-width:600px){.mm2-photo-dialog{padding:16px}.mm2-photo-dialog video{min-height:150px}.mm2-photo-actions button{width:100%;justify-content:center}}

/* Unified reporting hub and contextual trends. */
.report-hub-tabs { display:flex; gap:6px; padding:6px; border:1px solid var(--border, #d9e1ec); border-radius:16px; background:var(--panel, #fff); }
.report-hub-tabs a { flex:1; padding:14px 18px; border-radius:11px; text-decoration:none; font-weight:750; text-align:center; color:var(--muted, #66748b); }
.report-hub-tabs a.is-active { color:#244c13; background:#edf6e6; box-shadow:inset 0 0 0 1px #c6deb0; }
.report-hub-tabs a:focus-visible, .report-financial-views a:focus-visible { outline:3px solid #548d2d; outline-offset:2px; }
.report-generator { display:flex; flex-wrap:wrap; gap:16px; align-items:end; }
.report-generator label { display:grid; gap:7px; flex:1 1 180px; min-width:0; }
.report-generator label[hidden] { display:none; }
.report-generator label > span { font-size:12px; font-weight:750; color:var(--muted, #66748b); }
.report-generator input, .report-generator select { width:100%; min-height:44px; }
.report-generator p { flex-basis:100%; margin:0; font-size:12px; color:var(--muted, #66748b); }
.report-financial-views { display:flex; flex-wrap:wrap; gap:12px; }
.report-financial-views a { padding:10px 15px; border-radius:10px; text-decoration:none; color:var(--muted, #66748b); border:1px solid var(--border, #d9e1ec); }
.report-financial-views a[aria-current] { background:#edf6e6; color:#244c13; font-weight:750; }
.report-mini-trend { margin:16px 0 0; min-width:0; color:#548d2d; }
.report-mini-trend svg { width:100%; height:78px; display:block; overflow:visible; }
.report-trend-axis { stroke:#d9e1ec; stroke-width:1; }
.report-trend-line { fill:none; stroke:currentColor; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.report-trend-point { fill:currentColor; }
.report-mini-trend figcaption { display:flex; justify-content:space-between; gap:10px; color:#66748b; font-size:10px; }
.report-mini-trend figcaption span { max-width:50%; overflow-wrap:anywhere; }
.report-trend-values { margin-top:10px; color:#66748b; font-size:11px; }
.report-trend-values summary { cursor:pointer; }
.report-trend-values table { width:100%; font-size:11px; text-align:left; }
.report-trend-values th, .report-trend-values td { padding:5px 2px; overflow-wrap:anywhere; }
.report-trend-empty { color:#66748b; font-size:12px; }
.report-score-factor > strong > small { display:inline; font-size:12px; }
.report-score-factor p { font-size:12px; }
.report-cost-section { margin-top:24px; }
.report-financial-note { font-size:12px; color:#66748b; }
.report-print-document { margin:24px auto; padding:0 20px; max-width:1200px; background:#fff; }
.report-print-document .report-hub-tabs, .report-print-document .report-generator, .report-print-document .operations-reports-hero, .report-print-document .report-financial-views, .report-print-document .operations-report-archive { display:none; }
.report-print-document .operations-report-layout { display:block; }
@media (max-width:700px) {
    .report-hub-tabs { gap:3px; padding:4px; }
    .report-hub-tabs a { padding:12px 6px; font-size:12px; }
    .report-generator button { width:100%; }
    .report-financial-views a { flex:1 1 180px; text-align:center; }
}
@media print {
    .report-hub-tabs, .report-generator, .operations-reports-hero, .report-financial-views, .report-print-link, .report-workspace-link, .report-trend-values { display:none !important; }
    .report-print-document { margin:0; padding:0; max-width:none; }
    .operations-report-layout { display:block; }
    .operations-report-archive { display:none !important; }
    .operations-report-document { box-shadow:none; border:0; overflow:visible; }
    .operations-report-trend, .report-cost-section, .operations-report-metric, .operations-report-record { break-inside:avoid; }
    .report-mini-trend { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

.report-generator input, .report-generator select { border:1px solid var(--line-strong, #cad6e5); border-radius:10px; padding:10px 12px; background:var(--panel, #fff); color:var(--ink, #17243b); font:inherit; }
.operations-reports-page > .report-generator { padding:20px; border:1px solid var(--line, #d9e1ec); border-radius:16px; background:var(--panel, #fff); }
.report-score-factor .report-mini-trend { margin-top:auto; padding-top:16px; }
.report-score-factor { display:flex; flex-direction:column; }
.report-score-factor > small { margin-bottom:0; }

.report-financial-metrics { grid-template-columns:repeat(2, minmax(0, 1fr)); }
@media (max-width:600px) { .report-financial-metrics { grid-template-columns:minmax(0, 1fr); } }

/* Connected report navigation and compact on-screen reading. Print keeps its document layout. */
.report-hub { gap:0; min-width:0; border:1px solid var(--line, #d9e1ec); border-radius:18px; background:var(--panel, #fff); }
.report-hub-header { min-width:0; border-radius:18px 18px 0 0; background:var(--panel, #fff); }
.report-hub-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 24px 16px; }
.report-hub-heading h2 { margin:4px 0; color:var(--ink, #17243b); font-size:22px; }
.report-hub-heading p { margin:0; font-size:13px; color:var(--muted, #66748b); }
.report-hub-heading .eyebrow { font-size:10px; }
.report-hub .report-hub-tabs { gap:0; padding:0 16px; border:0; border-bottom:1px solid var(--line, #d9e1ec); border-radius:0; background:transparent; }
.report-hub .report-hub-tabs a { flex:0 1 auto; padding:13px 18px; border:0; border-bottom:3px solid transparent; border-radius:0; font-size:13px; }
.report-hub .report-hub-tabs a.is-active { color:var(--ink, #244c13); border-bottom-color:var(--accent-strong, #70a63c); background:transparent; box-shadow:none; }
.report-hub-content { display:grid; gap:16px; min-width:0; padding:18px; background:color-mix(in srgb, var(--panel, #fff) 70%, var(--bg, #f2f5f9)); border-radius:0 0 18px 18px; }
.report-hub .report-financial-tabs { display:flex; flex-wrap:nowrap; gap:4px; min-width:0; max-width:100%; margin:0; padding:5px; overflow-x:auto; border:0; border-radius:10px; background:var(--panel, #fff); box-shadow:inset 0 0 0 1px var(--line, #d9e1ec); }
.report-hub .report-financial-tabs a { flex:0 0 auto; padding:9px 12px; border-radius:7px; font-size:12px; white-space:nowrap; }
.report-create { min-width:0; border:1px solid var(--line, #d9e1ec); border-radius:12px; background:var(--panel, #fff); }
.report-create > summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 16px; list-style:none; cursor:pointer; }
.report-create > summary::-webkit-details-marker { display:none; }
.report-create > summary strong { display:block; color:var(--ink, #17243b); font-size:13px; }
.report-create > summary small { display:block; margin-top:3px; color:var(--muted, #66748b); font-size:11px; }
.report-create-action { display:inline-flex; align-items:center; gap:12px; color:var(--ink, #244c13); font-size:12px; font-weight:750; white-space:nowrap; }
.report-create-action > span { font-size:20px; line-height:1; }
.report-create[open] > summary { border-bottom:1px solid var(--line, #d9e1ec); }
.report-create[open] .report-create-action > span { transform:rotate(45deg); }
.report-create > .report-generator { padding:16px; gap:12px; }
.report-create .report-generator label { flex-basis:160px; }
.report-create .report-generator p { font-size:11px; }
.report-mobile-picker { display:none; }
.report-hub .operations-report-empty { padding:32px 20px; border:1px dashed var(--line, #d9e1ec); border-radius:12px; }
@media screen {
    .report-hub .operations-report-layout { grid-template-columns:210px minmax(0, 1fr); gap:16px; }
    .report-hub .operations-report-archive { align-self:start; border:1px solid var(--line, #d9e1ec); border-radius:12px; background:var(--panel, #fff); box-shadow:none; }
    .report-hub .operations-report-archive-heading { padding:14px; }
    .report-hub .operations-report-archive-heading .eyebrow { display:none; }
    .report-hub .operations-report-archive-heading h3 { font-size:14px; margin:0 0 4px; }
    .report-hub .operations-report-archive-list { gap:5px; padding:7px; max-height:65vh; overflow-y:auto; }
    .report-hub .operations-report-archive-list a { padding:10px; border-radius:8px; }
    .report-hub .operations-report-archive-list a small { display:none; }
    .report-hub .operations-report-archive-list a:hover { transform:none; }
    .report-hub .operations-report-document { border-radius:12px; box-shadow:none; }
    .report-hub .operations-report-cover { padding:18px 20px; text-align:left; background:#fff; }
    .report-hub .operations-report-cover > img { display:none; }
    .report-viewer-heading { display:flex; align-items:start; justify-content:space-between; gap:16px; }
    .report-viewer-heading > div { min-width:0; }
    .report-hub .operations-report-kicker { margin:0 0 7px; padding:0; border:0; border-radius:0; background:transparent; color:#65738a; font-size:10px; letter-spacing:.05em; }
    .report-hub .operations-report-cover h3 { margin:0; font-size:19px; line-height:1.35; }
    .report-hub .report-viewer-summary { margin:8px 0 12px; font-size:12px; line-height:1.5; }
    .report-viewer-heading .report-print-link { flex:0 0 auto; min-height:32px; padding:0 10px; font-size:11px; }
    .report-hub .operations-report-meta { margin:12px 0 0; border-radius:8px; }
    .report-hub .operations-report-meta div { padding:9px 10px; }
    .report-hub .operations-report-meta dt { font-size:9px; margin-bottom:4px; }
    .report-hub .operations-report-meta dd { font-size:11px; }
    .report-hub .operations-report-section { padding:18px 20px; }
    .report-hub .operations-report-section-heading { gap:14px; margin-bottom:12px; align-items:start; }
    .report-hub .operations-report-section-heading h3 { font-size:16px; margin:3px 0 0; }
    .report-hub .operations-report-section-heading .eyebrow { font-size:9px; }
    .report-hub .operations-report-section-heading > p { max-width:300px; font-size:11px; line-height:1.5; }
    .report-hub .operations-report-metrics { grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
    .report-hub .operations-report-metric { min-height:98px; padding:12px; border-radius:9px; gap:5px; }
    .report-hub .operations-report-metric > span { font-size:11px; }
    .report-hub .operations-report-metric strong { font-size:23px; }
    .report-hub .operations-report-metric small { margin:0; font-size:10px; }
    .report-hub .operations-report-metric em { position:static; font-size:9px; letter-spacing:0; }
    .report-hub .operations-report-metric:not(.has-items) em { display:none; }
    .report-hub .operations-report-trends { gap:9px; }
    .report-hub .operations-report-trend { padding:12px; border-radius:9px; }
    .report-hub .operations-report-trend > strong { font-size:22px; margin-top:6px; }
    .report-hub .operations-report-trend > span { font-size:11px; }
    .report-hub .operations-report-trend p { margin:6px 0; }
    .report-hub .report-mini-trend { margin-top:9px; }
    .report-hub .report-mini-trend svg { height:52px; }
    .report-hub .report-mini-trend figcaption { font-size:9px; }
    .report-hub .report-trend-values { margin-top:6px; font-size:10px; }
    .report-hub .operations-report-actions { gap:8px; }
    .report-hub .operations-report-actions li { padding:12px 14px 12px 42px; font-size:12px; }
    .report-hub .operations-report-record { padding:10px 12px; }
    .report-hub .operations-report-record h4 { font-size:12px; }
    .report-hub .operations-report-detail-group > summary { padding:12px 14px; font-size:12px; }
    .report-hub .financial-page { gap:14px; }
    .report-hub .financial-hero { padding:18px 20px; border-radius:12px; }
    .report-hub .financial-hero h2 { font-size:20px; }
    .report-hub .financial-hero p { font-size:12px; }
    .report-hub .financial-lifetime-metric strong { font-size:26px; }
    .report-hub .financial-filter { padding:14px; border-radius:12px; }
}
@media screen and (max-width:1150px) {
    .report-hub .operations-report-layout { grid-template-columns:185px minmax(0, 1fr); gap:12px; }
    .report-hub .operations-report-metrics { grid-template-columns:repeat(3, minmax(0, 1fr)); }
    .report-hub .operations-report-trends { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width:900px) {
    .report-hub .operations-report-layout { display:block; }
    .report-hub .operations-report-archive { display:none; }
    .report-mobile-picker { display:grid; grid-template-columns:1fr auto; gap:7px 10px; align-items:center; }
    .report-mobile-picker label { grid-column:1/-1; font-size:11px; font-weight:750; color:var(--muted, #66748b); }
    .report-mobile-picker select { min-width:0; width:100%; min-height:40px; border:1px solid var(--line, #d9e1ec); border-radius:8px; padding:8px; background:var(--panel, #fff); color:var(--ink, #17243b); font:inherit; font-size:12px; }
    .report-mobile-pagination { grid-column:1/-1; display:flex; justify-content:space-between; font-size:11px; }
}
@media screen and (max-width:600px) {
    .report-hub-heading { padding:16px; align-items:start; }
    .report-hub-heading h2 { font-size:20px; }
    .report-hub-heading p { font-size:12px; }
    .report-hub-heading > a { min-height:32px; padding:6px 8px; font-size:10px; text-align:center; }
    .report-hub .report-hub-tabs { padding:0 4px; }
    .report-hub .report-hub-tabs a { flex:1; padding:11px 7px; font-size:11px; }
    .report-hub-content { padding:12px; gap:12px; }
    .report-create > summary { padding:12px; gap:8px; }
    .report-create > summary small { max-width:180px; font-size:10px; }
    .report-create .report-generator label { flex-basis:100%; }
    .report-hub .operations-report-cover, .report-hub .operations-report-section { padding:14px; }
    .report-hub .operations-report-cover h3 { font-size:16px; }
    .report-hub .operations-report-meta { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .report-hub .operations-report-meta div { border:0; }
    .report-hub .operations-report-meta div:nth-child(even) { border-left:1px solid #dfe6f0; }
    .report-hub .operations-report-meta div:nth-child(n+3) { border-top:1px solid #dfe6f0; }
    .report-hub .operations-report-metrics { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .report-hub .operations-report-trends { grid-template-columns:minmax(0, 1fr); }
    .report-hub .operations-report-section-heading { display:block; }
    .report-hub .operations-report-section-heading > p { max-width:none; margin-top:6px; text-align:left; }
    .report-viewer-heading { gap:8px; }
}
.report-print-document .report-hub-header, .report-print-document .report-financial-tabs, .report-print-document .report-create, .report-print-document .report-mobile-picker { display:none; }
.report-print-document .report-hub { border:0; background:#fff; }
.report-print-document .report-hub-content { padding:0; background:#fff; }
@media print {
    .report-hub-header, .report-financial-tabs, .report-create, .report-mobile-picker { display:none !important; }
    .report-hub { display:block; border:0; border-radius:0; background:#fff; }
    .report-hub-content { display:block; padding:0; background:#fff; }
}

@media screen { .report-hub .operations-report-meta { width:100%; max-width:none; } }

/* Branded report presentation: distinct sections with compact, scannable highlights. */
@media screen {
    /* About 900px at 1920px; use the available column width on smaller screens. */
    .report-hub .operations-report-document.report-branded-document {
        width: min(100%, max(48rem, 47vw));
        justify-self: center;
        margin-inline: auto;
    }
    .report-hub .report-branded-document { background:#f1f4f8; border-color:#cad5e2; box-shadow:0 4px 18px rgba(26,44,66,.05); }
    .report-hub .report-branded-document .operations-report-cover { position:relative; padding:24px 24px 20px; border-top:4px solid #7eb13e; border-bottom:1px solid #d5dfcb; background: #FFFFFF; }
    .report-hub .report-branded-document .operations-report-cover > img { display:block; width:230px; max-width:65%; height:auto; margin:0 auto 16px; }
    .report-hub .report-branded-document .report-viewer-heading { align-items:center; }
    .report-hub .report-branded-document .operations-report-kicker { display:inline-flex; padding:5px 9px; margin-bottom:9px; border:1px solid #c4dba9; border-radius:6px; background:#eef7e5; color:#476c25; font-size:10px; letter-spacing:.04em; }
    .report-hub .report-branded-document .operations-report-cover h3 { font-size:21px; line-height:1.35; }
    .report-hub .report-branded-document .report-viewer-summary { color:#4f6178; font-size:13px; }
    .report-hub .report-branded-document .operations-report-meta { border-color:#d4dfc9; background:rgba(255,255,255,.92); }
    .report-hub .report-branded-document > .operations-report-section { --report-section-accent:#5079b1; --report-section-soft:#f1f6fe; margin:14px; padding:18px; border:1px solid #dce4ee; border-radius:12px; background:#fff; box-shadow:0 2px 5px rgba(30,50,70,.025); }
    .report-hub .report-branded-document > .report-section-position { --report-section-accent:#4777b1; --report-section-soft:#edf4fe; }
    .report-hub .report-branded-document > .report-section-activity { --report-section-accent:#20837f; --report-section-soft:#edf8f6; }
    .report-hub .report-branded-document > .report-section-actions { --report-section-accent:#aa751c; --report-section-soft:#fff7e8; background:linear-gradient(120deg,#fffcf5,#fff); border-color:#e9dcc1; }
    .report-hub .report-branded-document > .report-section-details { --report-section-accent:#64748b; --report-section-soft:#f2f5f9; }
    .report-hub .report-branded-document > .report-section-financial { --report-section-accent:#538339; --report-section-soft:#f0f7e9; background: #FFF;; border-color:#d6e2cc; }
    .report-hub .report-branded-document > .report-section-health { --report-section-accent:#5d8e34; --report-section-soft:#f0f7e9; }
    .report-hub .report-branded-document > .report-section-drivers { --report-section-accent:#7762a9; --report-section-soft:#f5f1fb; }
    .report-hub .report-branded-document .operations-report-section-heading { padding-bottom:12px; margin-bottom:14px; border-bottom:1px solid #e7edf3; }
    .report-hub .report-branded-document .operations-report-section-heading > div { border-left:4px solid var(--report-section-accent); padding-left:11px; }
    .report-hub .report-branded-document .operations-report-section-heading .eyebrow { color:var(--report-section-accent); font-size:10px; font-weight:800; }
    .report-hub .report-branded-document .operations-report-section-heading h3 { font-size:17px; color:#20324b; }
    .report-hub .report-branded-document .operations-report-section-heading > p { font-size:12px; color:#60718a; }
    .report-hub .report-branded-document .operations-report-metric { --report-metric-accent:#7c8c9e; background:#f8fafc; border-color:#dce5ee; border-top:3px solid var(--report-metric-accent); }
    .report-hub .report-branded-document .operations-report-metric[data-report-tone=info] { --report-metric-accent:#5283be; background:#f2f7ff; }
    .report-hub .report-branded-document .operations-report-metric[data-report-tone=warning] { --report-metric-accent:#d39a35; background:#fff9ed; border-color:#efdfbb; }
    .report-hub .report-branded-document .operations-report-metric[data-report-tone=danger] { --report-metric-accent:#cf6a62; background:#fff4f2; border-color:#edd0cc; }
    .report-hub .report-branded-document .operations-report-metric[data-report-tone=warning] > strong { color:#915d0e; }
    .report-hub .report-branded-document .operations-report-metric[data-report-tone=danger] > strong { color:#a3423e; }
    .report-hub .report-branded-document .operations-report-metric > span { color:#475c76; font-size:12px; }
    .report-hub .report-branded-document .operations-report-metric small { color:#61728a; font-size:11px; }
    .report-hub .report-branded-document .operations-report-trend { border-top:3px solid var(--report-section-accent); background:linear-gradient(180deg,var(--report-section-soft),#fff 55%); border-radius:10px; }
    .report-hub .report-branded-document .operations-report-trend > span { color:#4b5f78; font-size:12px; font-weight:750; }
    .report-hub .report-branded-document .operations-report-trend > strong { font-size:25px; }
    .report-hub .report-branded-document .operations-report-trend > small:not(.is-up):not(.is-down) { color:#61728a; line-height:1.5; }
    .report-hub .report-branded-document .report-mini-trend { color:var(--report-section-accent); }
    .report-hub .report-branded-document .report-mini-trend svg { height:58px; }
    .report-hub .report-branded-document .report-trend-axis { stroke:#d9e3ed; }
    .report-hub .report-branded-document .report-financial-card[data-cost-category=labor] { --report-section-accent:#507db7; --report-section-soft:#f0f5fc; }
    .report-hub .report-branded-document .report-financial-card[data-cost-category=procurement] { --report-section-accent:#7b64a9; --report-section-soft:#f6f2fc; }
    .report-hub .report-branded-document .report-financial-card[data-cost-category=other] { --report-section-accent:#ba8635; --report-section-soft:#fdf7ee; }
    .report-hub .report-branded-document .operations-report-actions li { border-color:#e8dfcf; box-shadow:none; background:#fff; line-height:1.6; }
    .report-hub .report-branded-document .operations-report-actions li::before { background:#f8edcf; color:#8e6117; }
    .report-hub .report-branded-document .operations-report-detail-group > summary { background:#f4f7fb; }
    .report-hub .report-branded-document .report-cost-section { margin-top:16px; padding:14px; background:#fff; border:1px solid #e0e8d9; border-radius:10px; }
    .report-hub .report-branded-document .report-cost-section h4 { margin:0 0 12px; font-size:13px; color:#496b31; }
    .report-hub .report-branded-document .report-financial-note { padding:12px; margin:12px 0; border-radius:8px; background:#eef5e7; color:#4e663b; line-height:1.6; }
    .report-hub .report-branded-document .report-score-factor[data-report-tone=warning] { border-top-color:#c2934e; }
    .report-hub .report-branded-document .report-score-factor[data-report-tone=clear] { border-top-color:#74a64a; }
    .report-hub .report-branded-document .report-score-overview { text-align:center; background:linear-gradient(145deg,var(--report-score-soft,#edf6e4),#fff); }
    .report-hub .report-branded-document .report-score-dial { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; width:108px; height:108px; margin:14px auto 10px; border-radius:50%; background:radial-gradient(closest-side,#fff 79%,transparent 81%),conic-gradient(var(--report-score-color,#72a640) calc(var(--report-score) * 1%),#e3e7e0 0); }
    .report-hub .report-branded-document .report-score-dial > span { color:var(--report-score-ink,#28481b); font-size:32px; line-height:1; }
    .report-hub .report-branded-document .report-score-dial small { margin:3px 0 0; font-size:11px; color:#657a56; }
    .report-hub .report-branded-document .report-score-overview > p { font-size:14px; font-weight:750; color:var(--report-score-ink,#426129); }
    .report-hub .report-branded-document .report-score-overview[data-score-tone=tone-amber] { --report-score-color:#bf912f; --report-score-ink:#86621d; --report-score-soft:#fff6df; }
    .report-hub .report-branded-document .report-score-overview[data-score-tone=tone-orange] { --report-score-color:#cc8543; --report-score-ink:#9b5c24; --report-score-soft:#fff0e3; }
    .report-hub .report-branded-document .report-score-overview[data-score-tone=tone-red] { --report-score-color:#c56860; --report-score-ink:#9f4943; --report-score-soft:#fff0ee; }
}
@media screen and (max-width:600px) {
    .report-hub .report-branded-document .operations-report-cover { padding:18px 14px; }
    .report-hub .report-branded-document .operations-report-cover > img { width:205px; max-width:85%; margin-bottom:14px; }
    .report-hub .report-branded-document .operations-report-cover h3 { font-size:18px; }
    .report-hub .report-branded-document > .operations-report-section { margin:10px; padding:13px; }
    .report-hub .report-branded-document .operations-report-section-heading h3 { font-size:16px; }
    .report-hub .report-branded-document .operations-report-metric { padding:10px; }
    .report-hub .report-branded-document .operations-report-metric > span { font-size:11px; }
}
@media print {
    .report-score-dial > span { font-size:30px; }
    .report-branded-document .operations-report-section { print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

/* Use the View menu palette while keeping native select behavior. */
body.page {
    --select-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23475469' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='m2 2 4 4 4-4'/%3E%3C/svg%3E");
}

body.page.theme-dark {
    --select-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23c8d1df' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='m2 2 4 4 4-4'/%3E%3C/svg%3E");
}

body.page select:not([multiple], [size]) {
    appearance: none;
    padding-inline-end: 32px;
    border-color: var(--line-strong);
    border-radius: 12px;
    background: var(--select-caret) no-repeat right 11px center, var(--panel-soft);
    color: var(--ink);
}

body.page select:not([multiple], [size]):focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

@supports (appearance: base-select) and selector(::picker(select)) {
    body.page select:not([multiple], [size]),
    body.page select:not([multiple], [size])::picker(select) {
        appearance: base-select;
    }

    body.page select:not([multiple], [size])::picker-icon {
        display: none;
    }

    body.page select:not([multiple], [size])::picker(select) {
        max-width: calc(100vw - 24px);
        max-height: min(24rem, 70dvh);
        margin-block: 5px;
        padding: 5px;
        border: 1px solid var(--line-strong);
        border-radius: 12px;
        background: var(--panel);
        color: var(--ink);
        box-shadow: var(--shadow);
    }

    body.page select:not([multiple], [size]) option {
        gap: 8px;
        min-height: 36px;
        padding: 7px 10px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    body.page select:not([multiple], [size]) option:is(:hover, :focus-visible):not(:disabled, :checked) {
        background: var(--panel-soft);
    }

    body.page select:not([multiple], [size]) option:focus-visible {
        outline: 2px solid var(--accent-strong);
        outline-offset: -2px;
    }

    body.page select:not([multiple], [size]) option:checked {
        background: var(--accent-soft);
        font-weight: 700;
    }

    body.page select:not([multiple], [size]) option::checkmark {
        order: 1;
        margin-inline-start: auto;
    }
}

@media (forced-colors: active) {
    body.page select:not([multiple], [size]) {
        appearance: auto;
        padding-inline-end: 12px;
        background-image: none;
    }
}
