:root {
    color-scheme: light;
    --fd-shell-gap: 5px;
    --fd-sidebar-width: 336px;
    --fd-toolbar-height: 96px;
    --fd-bg: #f3f5f8;
    --fd-bg-soft: #fafbfd;
    --fd-surface: #ffffff;
    --fd-surface-muted: #f6f8fb;
    --fd-surface-strong: #eef2f7;
    --fd-sidebar: #16212b;
    --fd-sidebar-line: rgba(255, 255, 255, 0.08);
    --fd-line: #d7dee7;
    --fd-line-strong: #c7d0da;
    --fd-text: #16202a;
    --fd-text-soft: #2c3c4c;
    --fd-muted: #677789;
    --fd-muted-strong: #516171;
    --fd-brand: #0d6b8a;
    --fd-brand-strong: #0a5871;
    --fd-brand-soft: #e7f4f8;
    --fd-brand-border: #c4dde7;
    --fd-shadow-sm: 0 10px 24px rgba(17, 27, 39, 0.05);
    --fd-shadow-md: 0 20px 44px rgba(17, 27, 39, 0.08);
    --fd-shadow-lg: 0 32px 72px rgba(17, 27, 39, 0.12);
    --fd-radius-sm: 12px;
    --fd-radius-md: 18px;
    --fd-radius-lg: 24px;
    --font-body: "Aptos", "Bahnschrift", "Segoe UI", sans-serif;
    --font-heading: "Aptos Display", "Aptos", "Bahnschrift", "Segoe UI", sans-serif;
}

.settings-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 0 0 1.35rem;
}

.settings-section-link {
    flex: 1 1 15rem;
    display: grid;
    gap: 0.2rem;
    min-width: 12rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(188, 202, 214, 0.92);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 252, 0.98) 100%);
    box-shadow: var(--fd-shadow-sm);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-section-link:hover {
    transform: translateY(-1px);
    border-color: rgba(112, 145, 169, 0.85);
}

.settings-section-link strong {
    font-size: 0.96rem;
    color: var(--fd-text);
}

.settings-section-link span {
    color: var(--fd-muted);
    font-size: 0.78rem;
}

.settings-section-link.is-active {
    border-color: rgba(16, 95, 123, 0.42);
    background: linear-gradient(180deg, rgba(231, 244, 248, 0.98) 0%, rgba(246, 250, 252, 0.98) 100%);
    box-shadow: 0 18px 42px rgba(17, 27, 39, 0.08);
}

.settings-summary-card-link {
    display: inline-flex;
    margin-top: 0.65rem;
    font-weight: 700;
    color: var(--fd-brand-strong);
}

.settings-panel-body--documents {
    grid-template-columns: minmax(0, 1fr);
}

.document-settings-workbench {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
}

.document-settings-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.document-settings-tab {
    display: inline-grid;
    gap: 0.14rem;
    flex: 0 1 auto;
    min-height: 0;
    min-width: 11.5rem;
    max-width: 14rem;
    padding: 0.78rem 0.92rem;
    border: 1px solid var(--fd-line);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 249, 251, 0.98) 100%);
    text-align: left;
}

.document-settings-tab span {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fd-muted-strong);
}

.document-settings-tab strong {
    color: var(--fd-text);
}

.document-settings-tab small {
    display: none;
}

.document-settings-tab.is-active {
    border-color: rgba(16, 95, 123, 0.42);
    background: linear-gradient(180deg, rgba(232, 245, 248, 0.98) 0%, rgba(246, 250, 252, 0.98) 100%);
    box-shadow: var(--fd-shadow-sm);
}

.document-settings-panel {
    margin-top: 0;
    min-width: 0;
}

.document-settings-panel[hidden] {
    display: none !important;
}

.document-settings-shell {
    display: grid;
    gap: 1.35rem;
    align-items: start;
    grid-template-columns: 1fr;
}

.document-settings-controls {
    display: grid;
    gap: 1rem;
}

.document-settings-panel-intro,
.document-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.document-settings-panel-intro h4 {
    margin: 0.2rem 0 0.35rem;
    font-size: 1.08rem;
}

.document-settings-state {
    min-width: 14rem;
}

.document-layout-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--fd-line);
    border-radius: 1rem;
    background: rgba(241, 246, 248, 0.92);
}

.document-layout-toggle {
    align-self: center;
    padding-top: 1.5rem;
}

.document-block-builder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.document-block-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--fd-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 27, 39, 0.05);
}

.document-block-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.document-block-card-head strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--fd-text);
}

.document-block-card-head p {
    margin: 0;
    font-size: 0.86rem;
}

.document-block-card-placement,
.document-block-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.document-block-card-body textarea {
    min-height: 6rem;
    resize: vertical;
}

.document-block-card-body label:last-child,
.document-block-card-body label:only-child {
    grid-column: 1 / -1;
}

.document-block-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
    padding: 0.15rem 0;
}

.document-block-note {
    color: var(--fd-muted);
    font-size: 0.88rem;
}

.document-preview-shell {
    display: grid;
    gap: 0.8rem;
    max-width: 56rem;
}

.document-preview-head strong {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.95rem;
    color: var(--fd-text);
}

.document-preview-head span {
    color: var(--fd-muted);
    font-size: 0.82rem;
}

.document-preview-stage {
    max-width: 56rem;
    padding: 1.1rem;
    border: 1px solid var(--fd-line);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(231, 238, 244, 0.72) 0%, rgba(247, 249, 251, 0.98) 100%);
    overflow: auto;
}

.document-preview-sheet {
    --document-preview-accent: #0d6b8a;
    --document-preview-accent-soft: #eaf4f8;
    --document-preview-accent-line: #c7d9e2;
    margin: 0 auto;
    width: min(100%, 45rem);
    aspect-ratio: 210 / 297;
    border: 1px solid rgba(183, 194, 204, 0.92);
    border-radius: 0.4rem;
    background: #ffffff;
    box-shadow: 0 26px 64px rgba(17, 27, 39, 0.14);
    overflow: hidden;
}

.document-preview-sheet--quote {
    --document-preview-accent: #0b5570;
    --document-preview-accent-soft: #ebf4f7;
    --document-preview-accent-line: #c9d8e0;
}

.document-preview-sheet--work_order {
    --document-preview-accent: #175f52;
    --document-preview-accent-soft: #ecf5f2;
    --document-preview-accent-line: #c9ddd8;
}

.document-preview-sheet--invoice {
    --document-preview-accent: #8b5c17;
    --document-preview-accent-soft: #fbf4e8;
    --document-preview-accent-line: #e6d5b6;
}

.document-preview-sheet--reminder {
    --document-preview-accent: #8e3b32;
    --document-preview-accent-soft: #f9edea;
    --document-preview-accent-line: #e7c8c2;
}

.document-preview-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.25rem 2.3rem 1.35rem;
}

.document-preview-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--document-preview-accent-line);
}

.document-preview-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.document-preview-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 0.9rem;
    background: var(--document-preview-accent-soft);
    color: var(--document-preview-accent);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.document-preview-brand-copy {
    display: grid;
    gap: 0.14rem;
}

.document-preview-brand-copy strong {
    color: var(--fd-text);
    font-size: 1rem;
}

.document-preview-brand-copy span {
    color: var(--fd-muted);
    font-size: 0.78rem;
}

.document-preview-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.2rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--document-preview-accent-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--document-preview-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-preview-body {
    display: grid;
    gap: 1rem;
    padding-top: 1rem;
    flex: 1 1 auto;
}

.document-preview-address-row {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 1rem;
}

.document-preview-address-card {
    display: grid;
    gap: 0.22rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(210, 219, 226, 0.95);
    border-radius: 1rem;
    background: rgba(250, 251, 253, 0.9);
}

.document-preview-mini-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fd-muted-strong);
}

.document-preview-address-card strong,
.document-preview-address-card span {
    font-size: 0.78rem;
    color: #3a4650;
}

.document-preview-summary-card {
    display: grid;
    grid-template-columns: 1.35fr 0.78fr;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--document-preview-accent-line);
    border-radius: 1.1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--document-preview-accent-soft) 100%);
}

.document-preview-summary-copy {
    display: grid;
    gap: 0.35rem;
}

.document-preview-summary-copy strong {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.12;
    color: #16202a;
}

.document-preview-summary-copy p {
    margin: 0;
    color: #5d6b73;
    font-size: 0.82rem;
    line-height: 1.45;
}

.document-preview-total-card {
    display: grid;
    align-content: start;
    gap: 0.32rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid rgba(177, 194, 204, 0.95);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
}

.document-preview-total-card strong {
    color: var(--document-preview-accent);
    font-size: 1.12rem;
}

.document-preview-total-card span {
    color: var(--fd-muted);
    font-size: 0.74rem;
}

.document-preview-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.document-preview-fact {
    display: grid;
    gap: 0.22rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(210, 219, 226, 0.95);
    border-radius: 0.95rem;
    background: #ffffff;
}

.document-preview-fact strong {
    color: #20303a;
    font-size: 0.86rem;
}

.document-preview-fact span {
    color: var(--fd-muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-preview-content-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.78fr;
    gap: 1rem;
    align-items: start;
}

.document-preview-line-table {
    width: 100%;
    border-collapse: collapse;
}

.document-preview-line-table th,
.document-preview-line-table td {
    padding: 0.62rem 0.1rem;
    border-bottom: 1px solid rgba(221, 228, 233, 0.92);
    font-size: 0.76rem;
    text-align: left;
    vertical-align: top;
}

.document-preview-line-table th:last-child,
.document-preview-line-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.document-preview-line-table th {
    color: var(--fd-muted-strong);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-preview-line-title {
    display: grid;
    gap: 0.14rem;
}

.document-preview-line-title strong {
    color: #1d2a33;
    font-size: 0.78rem;
}

.document-preview-line-title span {
    color: var(--fd-muted);
    font-size: 0.69rem;
}

.document-preview-sidecard {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid rgba(210, 219, 226, 0.95);
    border-radius: 0.95rem;
    background: rgba(250, 251, 253, 0.94);
}

.document-preview-sidecard-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    color: #475761;
    font-size: 0.75rem;
}

.document-preview-sidecard-row strong {
    color: #15212a;
}

.document-preview-sidecard-row--featured {
    padding-top: 0.55rem;
    border-top: 1px solid rgba(192, 204, 212, 0.95);
    font-size: 0.8rem;
}

.document-preview-sidecard-row--featured strong {
    color: var(--document-preview-accent);
    font-size: 0.98rem;
}

.document-preview-footer {
    position: relative;
    margin-top: auto;
    min-height: 6.6rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(205, 214, 220, 0.95);
}

.document-preview-footer--no-rule {
    border-top: none;
}

.document-preview-footer-grid {
    display: grid;
    gap: 0.85rem;
}

.document-preview-footer-column {
    display: grid;
    gap: 0.58rem;
    min-width: 0;
}

.document-preview-footer-block {
    display: grid;
    gap: 0.12rem;
}

.document-preview-footer-label {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #61707a;
}

.document-preview-footer-block--custom .document-preview-footer-label {
    color: #7a8790;
}

.document-preview-footer-line {
    color: #5a6770;
    font-size: 0.61rem;
    line-height: 1.35;
}

.document-preview-footer-block--page-number .document-preview-footer-line {
    color: var(--document-preview-accent);
    font-weight: 700;
}

.document-preview-footer-block--qr {
    justify-items: flex-start;
}

.document-preview-footer-block--qr-center {
    justify-items: center;
}

.document-preview-footer-block--qr-right {
    justify-items: end;
}

.document-preview-footer-qr {
    display: block;
    padding: 0.2rem;
    border: 1px solid rgba(194, 205, 212, 0.95);
    border-radius: 0.75rem;
    background: #fff;
    object-fit: contain;
}

.document-preview-footer-qr--small {
    width: 2.8rem;
    height: 2.8rem;
}

.document-preview-footer-qr--medium {
    width: 3.35rem;
    height: 3.35rem;
}

.document-preview-footer-spacer {
    width: 100%;
}

.document-preview-footer-spacer--small {
    height: 0.55rem;
}

.document-preview-footer-spacer--medium {
    height: 1rem;
}

.document-preview-footer-spacer--large {
    height: 1.45rem;
}

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

@media (max-width: 900px) {
    .settings-section-nav,
    .document-layout-settings,
    .document-block-builder,
    .document-block-card-placement,
    .document-block-card-body,
    .document-block-options,
    .document-preview-facts-grid,
    .document-preview-content-grid,
    .document-preview-summary-card,
    .document-preview-address-row {
        grid-template-columns: 1fr;
    }

    .document-settings-tablist {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .document-settings-tab {
        min-width: 0;
        max-width: none;
    }

    .document-settings-panel-intro,
    .document-preview-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .document-settings-state {
        min-width: 0;
        width: 100%;
    }

    .document-preview-sheet {
        width: 39rem;
    }

    .document-preview-footer-grid {
        grid-template-columns: 1fr !important;
    }
}

.mail-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
}

.mail-placeholder-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(211, 221, 228, 0.92);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.mail-placeholder-card strong {
    color: var(--fd-text);
    font-size: 0.9rem;
}

.mail-placeholder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mail-placeholder-token {
    width: auto;
    min-height: 0;
    padding: 0.3rem 0.5rem;
    border: 1px solid rgba(198, 210, 219, 0.94);
    border-radius: 999px;
    background: rgba(240, 245, 248, 0.95);
    color: #324452;
    font-size: 0.76rem;
    line-height: 1.2;
}

.mail-placeholder-token:hover {
    border-color: rgba(110, 139, 158, 0.92);
    background: rgba(231, 240, 245, 0.98);
}

.mail-editor-note {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.9rem;
}

.mail-template-source {
    min-height: 14rem;
    line-height: 1.58;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(13, 107, 138, 0.018), transparent 22rem),
        radial-gradient(circle at top right, rgba(91, 128, 162, 0.02), transparent 24rem),
        linear-gradient(180deg, #f9fafc 0%, #f3f5f8 100%);
    color: var(--fd-text);
    font-family: var(--font-body);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--fd-line);
    border-radius: var(--fd-radius-sm);
    background: #ffffff;
    color: var(--fd-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #93a0ad;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--fd-line-strong);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #8bb8c8;
    box-shadow: 0 0 0 4px rgba(13, 107, 138, 0.12);
}

.app-shell {
    display: grid;
    grid-template-columns: var(--fd-sidebar-width) minmax(0, 1fr);
    gap: var(--fd-shell-gap);
    min-height: 100vh;
    padding: var(--fd-shell-gap);
}

.app-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 20, 28, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 70;
}

.sidebar {
    position: fixed;
    top: var(--fd-shell-gap);
    left: var(--fd-shell-gap);
    bottom: var(--fd-shell-gap);
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: var(--fd-sidebar-width);
    height: auto;
    margin: 0;
    padding: 20px 16px 16px;
    background:
        radial-gradient(circle at top left, rgba(101, 180, 206, 0.08), transparent 20rem),
        linear-gradient(180deg, #17232e 0%, #121b24 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: none;
    z-index: 80;
}

.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: grid;
    gap: 10px;
}

.brand-link {
    color: #f6fbff;
}

.brand-logo {
    width: min(100%, 156px);
    height: auto;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.brand-copy small {
    max-width: 24ch;
    color: rgba(236, 244, 248, 0.66);
    font-size: 0.79rem;
    line-height: 1.4;
}

.nav {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.nav-section {
    display: grid;
    gap: 6px;
}

.nav-section-title,
.app-toolbar-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-section-title {
    padding: 0 10px;
    color: rgba(222, 233, 240, 0.48);
}

.nav a {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(241, 247, 251, 0.82);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav a:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav a:focus-visible {
    outline: none;
    border-color: rgba(154, 216, 232, 0.44);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(83, 172, 198, 0.2);
    color: #ffffff;
}

.nav a.is-active {
    border-color: rgba(167, 217, 231, 0.18);
    background: linear-gradient(180deg, rgba(36, 58, 72, 0.98), rgba(24, 39, 50, 0.98));
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 18px rgba(5, 11, 18, 0.14);
}

.nav a.is-active::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: -6px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7bc3d6 0%, #4ba0bb 100%);
}

.nav-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.nav-item-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.nav-item-label {
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.24;
    color: inherit;
}

.nav-item-copyline {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(232, 240, 244, 0.58);
    font-size: 0.72rem;
    line-height: 1.2;
}

.nav-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 7px;
    border-radius: 999px;
    background: #d84b44;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.nav a.is-active .nav-item-icon {
    background: linear-gradient(180deg, rgba(123, 195, 214, 0.28), rgba(75, 160, 187, 0.22));
    color: #f8fdff;
}

.sidebar-close,
.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--fd-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--fd-text);
    box-shadow: var(--fd-shadow-sm);
}

.mobile-nav-toggle {
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.app-main {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 0 0 10px;
}

.app-page,
.workspace-content {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.app-page {
    padding-top: calc(var(--fd-toolbar-height) + 8px);
}

header.app-toolbar {
    position: fixed;
    top: var(--fd-shell-gap);
    left: calc(var(--fd-sidebar-width) + (var(--fd-shell-gap) * 2));
    right: var(--fd-shell-gap);
    z-index: 90;
    border: 1px solid rgba(207, 216, 227, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.975);
    box-shadow: var(--fd-shadow-sm);
}

.app-toolbar-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
}

.app-toolbar-left,
.app-toolbar-right {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.app-toolbar-left {
    flex: 1 1 auto;
    align-items: flex-start;
}

.app-toolbar-right {
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.app-toolbar-page {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.app-toolbar-label,
.eyebrow {
    color: var(--fd-muted);
}

.app-toolbar-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.app-toolbar-title-row h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.16rem, 1.15vw, 1.48rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.app-toolbar-context-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.74rem;
    font-weight: 600;
}

.app-toolbar-page p {
    display: -webkit-box;
    max-width: 56ch;
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.44;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.app-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.app-toolbar-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--fd-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--fd-text-soft);
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.app-toolbar-icon-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-toolbar-icon-button:hover,
.app-toolbar-icon-button:focus-visible,
.app-toolbar-icon-button.is-active {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
    color: var(--fd-brand-strong);
}

.app-toolbar-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d84b44;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    position: absolute;
    top: -5px;
    right: -5px;
}

.app-toolbar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: linear-gradient(180deg, #163549 0%, #0d6b8a 100%);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.app-toolbar-user-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.app-toolbar-user-copy strong {
    font-size: 0.88rem;
    line-height: 1.2;
    display: block;
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-toolbar-user-copy small {
    display: none;
}

.app-toolbar-account {
    position: relative;
}

.app-toolbar-account summary {
    list-style: none;
}

.app-toolbar-account summary::-webkit-details-marker {
    display: none;
}

.app-toolbar-account-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 3px 8px 3px 3px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: var(--fd-surface-muted);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.app-toolbar-account-toggle:hover {
    border-color: var(--fd-line-strong);
    background: #ffffff;
}

.app-toolbar-account-toggle:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 107, 138, 0.12);
}

.app-toolbar-account[open] .app-toolbar-account-toggle {
    border-color: var(--fd-brand-border);
    background: #ffffff;
    box-shadow: var(--fd-shadow-sm);
}

.app-toolbar-account-caret {
    color: var(--fd-muted);
    font-size: 0.78rem;
    transition: transform 0.18s ease;
}

.app-toolbar-account[open] .app-toolbar-account-caret {
    transform: rotate(180deg);
}

.app-toolbar-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    gap: 12px;
    width: min(296px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: var(--fd-shadow-md);
    z-index: 10;
}

.app-toolbar-account-summary {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-bottom: 2px;
}

.app-toolbar-account-summary strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

.app-toolbar-account-summary span,
.app-toolbar-account-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--fd-muted);
    font-size: 0.75rem;
}

.app-toolbar-menu-group {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(215, 222, 231, 0.9);
}

.app-toolbar-menu-group:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.app-toolbar-menu-heading {
    display: grid;
    gap: 4px;
}

.app-toolbar-menu-heading strong {
    font-size: 0.84rem;
    color: var(--fd-text);
}

.app-toolbar-menu-heading span {
    color: var(--fd-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.app-toolbar-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--fd-surface-muted);
    color: var(--fd-text);
    font-size: 0.86rem;
    font-weight: 600;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.app-toolbar-menu-item:hover,
.app-toolbar-menu-item:focus-visible {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
    outline: none;
}

.app-toolbar-menu-item-danger {
    border-color: #efdfdc;
    background: #fff8f7;
    color: #8b3c31;
}

.app-toolbar-menu-item-danger:hover,
.app-toolbar-menu-item-danger:focus-visible {
    border-color: #e5c2bc;
    background: #fff1ef;
    color: #7b3229;
}

.app-toolbar-context-form {
    display: grid;
    gap: 10px;
}

.app-toolbar-context-form label {
    display: grid;
    gap: 6px;
}

.app-toolbar-context-form label span {
    color: var(--fd-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.app-search-modal[hidden] {
    display: none !important;
}

.app-search-modal {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 64px 28px 24px;
}

.app-search-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 21, 30, 0.54);
    backdrop-filter: blur(5px);
}

.app-search-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    width: min(720px, calc(100vw - 64px));
    max-height: min(72dvh, 680px);
    padding: 14px 14px 12px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(249, 251, 253, 0.995) 100%);
    box-shadow: var(--fd-shadow-lg);
    overflow: hidden;
}

.app-search-modal-head,
.app-search-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-search-modal-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.app-search-modal-copy h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.14rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.app-search-modal-copy p {
    margin: 0;
    color: var(--fd-muted);
    max-width: 54ch;
    font-size: 0.79rem;
    line-height: 1.4;
}

.app-search-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--fd-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 1.3rem;
    line-height: 1;
}

.app-search-modal-close:hover,
.app-search-modal-close:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.app-search-modal-form {
    display: grid;
    gap: 8px;
}

.app-search-modal-field {
    position: relative;
    display: grid;
    gap: 0;
}

.app-search-modal-field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-search-modal-field input {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--fd-bg-soft);
    font-size: 0.96rem;
    appearance: none;
    -webkit-appearance: none;
}

.app-search-modal-field input:focus {
    border-color: #9fc8d5;
    box-shadow: 0 0 0 3px rgba(13, 107, 138, 0.08);
    background: #ffffff;
}

.app-search-modal-results {
    display: grid;
    align-content: start;
    gap: 12px;
    min-height: 120px;
    max-height: none;
    overflow: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.app-search-modal-results::-webkit-scrollbar {
    width: 10px;
}

.app-search-modal-results::-webkit-scrollbar-thumb {
    background: rgba(103, 119, 137, 0.22);
    border-radius: 999px;
}

.app-search-live-empty,
.app-search-live-groups {
    display: grid;
    gap: 12px;
}

.app-search-live-empty {
    align-content: start;
    min-height: 0;
    padding: 4px 2px 2px;
}

.app-search-live-empty strong {
    font-size: 1rem;
}

.app-search-live-empty p {
    margin: 0;
    color: var(--fd-muted);
}

.app-search-live-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-search-live-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.72rem;
    font-weight: 600;
}

.app-search-live-group {
    display: grid;
    gap: 10px;
}

.app-search-live-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.app-search-live-group-head strong {
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fd-muted-strong);
}

.app-search-live-group-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--fd-line);
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.app-search-live-group-list {
    display: grid;
    gap: 8px;
}

.app-search-live-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 12px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-search-live-item:hover,
.app-search-live-item:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
    transform: translateY(-1px);
}

.app-search-live-item-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-search-live-item-copy strong {
    font-size: 0.86rem;
    line-height: 1.3;
}

.app-search-live-item-copy small {
    color: var(--fd-muted);
    font-size: 0.75rem;
    line-height: 1.42;
}

.app-search-live-item-open,
.app-search-modal-footer-link,
.app-search-live-footer-link {
    color: var(--fd-brand);
    font-size: 0.79rem;
    font-weight: 700;
}

.app-search-live-item-open {
    flex: 0 0 auto;
}

.app-search-modal-footer {
    padding-top: 8px;
    border-top: 1px solid rgba(215, 222, 231, 0.82);
}

.app-messages-modal[hidden] {
    display: none !important;
}

.app-messages-modal {
    position: fixed;
    inset: 0;
    z-index: 158;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 64px 28px 24px;
}

.app-messages-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 21, 30, 0.54);
    backdrop-filter: blur(5px);
}

.app-messages-modal-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    width: min(1180px, calc(100vw - 64px));
    max-height: min(82dvh, 820px);
    padding: 14px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(249, 251, 253, 0.995) 100%);
    box-shadow: var(--fd-shadow-lg);
    overflow: hidden;
}

.app-messages-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.app-messages-modal-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-messages-modal-copy h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.app-messages-modal-copy p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.79rem;
    line-height: 1.4;
}

.app-messages-modal-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-messages-modal-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(216, 75, 68, 0.18);
    background: rgba(216, 75, 68, 0.08);
    color: #b43c35;
    font-size: 0.75rem;
    font-weight: 700;
}

.app-messages-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--fd-line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 1.3rem;
    line-height: 1;
}

.app-messages-modal-close:hover,
.app-messages-modal-close:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.app-messages-modal-content {
    min-height: 0;
    overflow: hidden;
}

.app-messages-modal-content .message-workbench {
    --message-workbench-height: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 100%;
}

.app-messages-modal-content .message-sidebar-card,
.app-messages-modal-content .message-thread-card {
    border-radius: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: linear-gradient(180deg, #13749a 0%, #0d6281 100%);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 8px 18px rgba(13, 98, 129, 0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 12px 22px rgba(13, 98, 129, 0.16);
}

.button-secondary {
    border-color: var(--fd-line);
    background: #ffffff;
    color: var(--fd-text-soft);
    box-shadow: none;
}

.button-secondary:hover {
    box-shadow: var(--fd-shadow-sm);
}

.button-danger {
    border-color: #e7bcb6;
    background: linear-gradient(180deg, #cf5d4d 0%, #b24737 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(178, 71, 55, 0.18);
}

.button:disabled,
.button-secondary:disabled,
.app-toolbar-search-submit:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    filter: none;
    box-shadow: none;
}

.button:disabled:hover,
.button-secondary:disabled:hover,
.app-toolbar-search-submit:disabled:hover {
    transform: none;
    filter: none;
    box-shadow: none;
}

.toolbar,
.button-row,
.inline-form,
.workflow-hero-actions,
.activity-filter-row,
.assignment-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.toolbar-end {
    justify-content: flex-end;
}

.stack,
.stack-lg,
.detail-stack,
.calendar-side-stack,
.work-order-side-stack,
.activity-list,
.app-notice-stack {
    display: grid;
    gap: 16px;
}

.toolbar-between {
    justify-content: space-between;
}

.stack-lg {
    gap: 22px;
}

.card,
.summary-panel,
.table-card,
.module-filter-card,
.customer-filter-card,
.calendar-filter-card,
.focus-panel,
.module-detail-card,
.work-order-section,
.work-order-side-card,
.calendar-month-board,
.calendar-focus-card,
.calendar-side-card,
.user-create-card,
.user-rule-card,
.activity-card,
.task-card,
.mobile-assignment-card,
.upload-panel,
.info-box,
.empty-state,
.public-form-card,
.public-showcase {
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.99) 100%);
    box-shadow: var(--fd-shadow-sm);
    padding: 20px;
}

.workflow-hero,
.calendar-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 20px;
    align-items: start;
    padding: 20px 22px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.028), transparent 22rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 12px 26px rgba(17, 27, 39, 0.06);
}

.workflow-hero-copy,
.calendar-hero-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.workflow-hero h1,
.calendar-hero h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.48rem, 1.75vw, 2.02rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--fd-text);
}

.workflow-hero h1 small {
    display: block;
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--fd-muted-strong);
}

.workflow-hero p,
.calendar-hero p {
    max-width: 70ch;
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.88rem;
    line-height: 1.52;
}

.workflow-meta-row,
.calendar-stat-strip,
.dashboard-priority-grid,
.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid,
.summary-panel-grid {
    display: grid;
    gap: 14px;
}

.workflow-meta-row {
    grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
}

.overview-grid,
.settings-summary-grid,
.settings-readiness-grid,
.work-order-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.calendar-stat-strip,
.dashboard-priority-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.workflow-meta-pill,
.summary-tile,
.metric-card,
.calendar-mini-stat,
.dashboard-priority-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--fd-shadow-sm);
}

.workflow-meta-pill span,
.summary-tile span,
.metric-card span,
.calendar-mini-stat span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.workflow-meta-pill strong,
.summary-tile strong,
.metric-card strong,
.calendar-mini-stat strong {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.summary-tile small,
.metric-card small,
.calendar-mini-stat small,
.dashboard-priority-card p,
.summary-note {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.metric-card-strong,
.execution-card-strong {
    border-color: var(--fd-brand-border);
    background: linear-gradient(180deg, #f8fcfe 0%, #eef8fb 100%);
}

.dashboard-command-board {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.024), transparent 16rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(248, 250, 252, 0.992) 100%);
    box-shadow: var(--fd-shadow-sm);
}

.dashboard-command-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-command-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.dashboard-command-copy h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.16rem, 1.35vw, 1.56rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.dashboard-command-copy p {
    max-width: 68ch;
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.84rem;
    line-height: 1.48;
}

.dashboard-command-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.dashboard-command-actions .button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 12px;
    box-shadow: none;
}

.dashboard-command-actions .button:hover {
    box-shadow: var(--fd-shadow-sm);
}

.dashboard-command-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-stat-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-stat-card.is-accent {
    border-color: var(--fd-brand-border);
    background: linear-gradient(180deg, #fbfeff 0%, #eef8fb 100%);
}

.dashboard-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.dashboard-stat-value {
    font-family: var(--font-heading);
    font-size: clamp(1.04rem, 1.16vw, 1.28rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.dashboard-stat-note {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-overview-grid,
.dashboard-secondary-grid {
    display: grid;
    gap: 16px;
    align-items: start;
}

.dashboard-overview-grid {
    grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr) minmax(0, 0.94fr);
}

.dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.96fr) minmax(0, 0.92fr);
}

.dashboard-panel-span-2 {
    grid-column: 1 / span 2;
}

.dashboard-stack {
    display: grid;
    gap: 16px;
    align-content: start;
    min-width: 0;
}

.dashboard-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.dashboard-panel-priority {
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.028), transparent 16rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(248, 250, 252, 0.992) 100%);
}

.dashboard-panel-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(249, 251, 253, 0.992) 100%);
}

.dashboard-panel-compact {
    padding: 16px;
}

.dashboard-panel-compact .dashboard-panel-copy h3 {
    font-size: 0.98rem;
}

.dashboard-panel-compact .dashboard-signal-list {
    gap: 8px;
}

.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-panel-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-panel-copy h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.dashboard-panel-copy p,
.dashboard-panel-note {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.46;
}

.dashboard-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.dashboard-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.74rem;
    font-weight: 700;
}

.dashboard-priority-list,
.dashboard-data-list,
.dashboard-signal-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-priority-item,
.dashboard-data-item,
.dashboard-signal-item {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.dashboard-priority-item,
.dashboard-data-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.dashboard-priority-item {
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.022), transparent 10rem),
        linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.dashboard-signal-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 12px 13px;
}

.dashboard-panel-compact .dashboard-signal-item {
    padding: 11px 12px;
    border-radius: 14px;
}

.dashboard-item-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dashboard-item-kicker {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.dashboard-item-title,
.dashboard-item-link {
    color: var(--fd-text);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.3;
}

.dashboard-priority-item .dashboard-item-title {
    font-size: 1rem;
}

.dashboard-item-copy,
.dashboard-item-subline {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.81rem;
    line-height: 1.42;
}

.dashboard-item-link:hover,
.dashboard-item-link:focus-visible {
    color: var(--fd-brand-strong);
}

.dashboard-item-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
    min-width: 0;
    text-align: right;
}

.dashboard-item-meta strong,
.dashboard-item-meta .badge {
    justify-self: end;
}

.dashboard-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 11px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-inline-action:hover,
.dashboard-inline-action:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.dashboard-empty-state {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px dashed rgba(199, 208, 218, 0.96);
    border-radius: 18px;
    background: rgba(249, 251, 253, 0.88);
}

.dashboard-empty-state h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.18;
}

.dashboard-empty-state p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.process-command-board {
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.024), transparent 16rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(248, 250, 252, 0.992) 100%);
    box-shadow: var(--fd-shadow-sm);
}

.process-command-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.process-command-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.process-command-copy h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.18rem, 1.38vw, 1.58rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--fd-text);
}

.process-command-copy p {
    max-width: 68ch;
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.84rem;
    line-height: 1.48;
}

.process-command-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.process-command-actions .button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 12px;
    box-shadow: none;
}

.process-command-actions .button:hover {
    box-shadow: var(--fd-shadow-sm);
}

.process-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.process-stat-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.process-stat-card.is-accent {
    border-color: var(--fd-brand-border);
    background: linear-gradient(180deg, #fbfeff 0%, #eef8fb 100%);
}

.process-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.process-stat-value {
    font-family: var(--font-heading);
    font-size: clamp(1.04rem, 1.14vw, 1.26rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.process-stat-note {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.8rem;
    line-height: 1.42;
}

.process-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
    gap: 16px;
    align-items: start;
}

.process-main,
.process-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.process-side {
    position: sticky;
    top: calc(var(--fd-toolbar-height) + 18px);
}

.process-filter-card {
    display: grid;
    gap: 12px;
}

.process-filter-head,
.process-side-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.process-filter-copy {
    display: grid;
    gap: 3px;
}

.process-filter-copy h3,
.process-side-head h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.process-filter-copy p,
.process-note-copy p,
.process-focus-copy p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.46;
}

.process-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.74rem;
    font-weight: 700;
}

.process-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)) auto auto;
    gap: 10px;
    align-items: center;
}

.process-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-filter-chip,
.process-note-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.75rem;
    font-weight: 600;
}

.process-table-card > .section-head {
    padding: 16px 18px 0;
}

.process-table-head {
    margin-bottom: 0;
}

.process-table-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.process-table thead th {
    background: rgba(246, 248, 251, 0.98);
}

.process-table td {
    padding-top: 16px;
    padding-bottom: 16px;
}

.process-focus-card,
.process-note-card {
    display: grid;
    gap: 12px;
}

.process-focus-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.process-focus-item {
    display: grid;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.process-focus-copy {
    display: grid;
    gap: 4px;
}

.process-focus-copy strong {
    color: var(--fd-text);
    font-size: 0.96rem;
    line-height: 1.32;
}

.process-focus-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.process-inline-link {
    color: var(--fd-brand-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.process-inline-link:hover,
.process-inline-link:focus-visible {
    text-decoration: underline;
}

.process-note-copy {
    display: grid;
    gap: 12px;
}

.process-note-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-topbar {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.024), transparent 15rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.992) 0%, rgba(248, 250, 252, 0.992) 100%);
    box-shadow: var(--fd-shadow-sm);
}

.process-topbar-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.process-topbar-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.process-topbar-copy h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.12rem, 1.4vw, 1.46rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.process-topbar-copy p {
    max-width: 64ch;
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.44;
}

.process-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.process-topbar-actions .button {
    min-height: 35px;
    padding: 0 12px;
    border-radius: 11px;
    box-shadow: none;
}

.process-topbar-actions .button:hover {
    box-shadow: var(--fd-shadow-sm);
}

.process-topbar-lower {
    display: grid;
    gap: 8px;
}

.process-stat-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
}

.process-stat-chip strong {
    color: var(--fd-text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
}

.process-stat-chip span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.process-stat-chip.is-accent {
    border-color: var(--fd-brand-border);
    background: #eef8fb;
    color: var(--fd-brand-strong);
}

.process-focus-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-focus-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-text-soft);
}

.process-focus-inline strong {
    color: var(--fd-text);
    font-size: 0.8rem;
    font-weight: 700;
}

.process-focus-inline small {
    color: var(--fd-brand-strong);
    font-size: 0.76rem;
    font-weight: 700;
}

.process-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.92fr) minmax(280px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.process-table-toolbar {
    display: grid;
    gap: 10px;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--fd-line);
    background:
        linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.process-table-toolbar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.process-table-toolbar-head h3 {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.14;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.process-table-toolbar-head p {
    margin: 4px 0 0;
    color: var(--fd-muted);
    font-size: 0.8rem;
    line-height: 1.44;
}

.process-summary-card,
.process-focus-card,
.process-note-card {
    display: grid;
    gap: 12px;
}

.process-summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.process-summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 11px 12px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.process-summary-item strong {
    color: var(--fd-text);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    line-height: 1.04;
}

.process-summary-label {
    display: block;
    margin-bottom: 3px;
    color: var(--fd-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.process-summary-item small {
    color: var(--fd-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.process-summary-card,
.process-note-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.985) 0%, rgba(247, 250, 252, 0.985) 100%);
}

.process-table-card {
    overflow: hidden;
}

.process-table {
    table-layout: fixed;
}

.process-table th:nth-child(1),
.process-table td:nth-child(1) {
    width: 28%;
}

.process-table th:nth-child(2),
.process-table td:nth-child(2) {
    width: 18%;
}

.process-table th:nth-child(3),
.process-table td:nth-child(3) {
    width: 18%;
}

.process-table th:nth-child(4),
.process-table td:nth-child(4) {
    width: 18%;
}

.process-table th:nth-child(5),
.process-table td:nth-child(5) {
    width: 18%;
}

.process-table thead th {
    padding-top: 14px;
    padding-bottom: 14px;
}

.process-table td {
    padding-top: 18px;
    padding-bottom: 18px;
}

.process-table tbody td {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 253, 255, 0.96) 100%);
}

.process-table tbody tr:hover td {
    background: rgba(244, 250, 252, 0.98);
}

.process-table tbody td:last-child {
    background: rgba(255, 255, 255, 0.98);
}

.process-row-stack {
    display: grid;
    gap: 6px;
}

.process-row-headline {
    color: var(--fd-text);
    font-family: var(--font-heading);
    font-size: 0.98rem;
    line-height: 1.3;
}

.process-row-meta {
    display: block;
    color: var(--fd-muted);
    font-size: 0.78rem;
    line-height: 1.44;
}

.process-table .badge {
    width: max-content;
}

.process-table .table-actions-compact {
    justify-content: flex-start;
}

.process-table .table-actions-compact > a {
    min-width: 74px;
}

.workspace-board,
.detail-grid,
.module-detail-grid,
.module-history-grid,
.customer-history-grid,
.activity-layout,
.calendar-shell,
.user-create-layout,
.public-card-split,
.work-order-shell,
.calendar-lower-grid {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.workspace-board,
.activity-layout,
.work-order-shell {
    grid-template-columns: minmax(0, 1.62fr) minmax(260px, 0.58fr);
}

.detail-grid,
.module-detail-grid,
.module-history-grid,
.customer-history-grid,
.calendar-shell,
.user-create-layout,
.public-card-split,
.calendar-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-main,
.workspace-side,
.calendar-side-stack {
    min-width: 0;
}

.workspace-side {
    display: grid;
    gap: 18px;
}

.summary-panel-head,
.section-head,
.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-head-compact {
    margin-bottom: 14px;
}

.section-head h3,
.summary-panel-head h3,
.modal-head h3 {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 1.06rem;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--fd-text);
}

.section-head p,
.summary-panel-head p,
.muted {
    color: var(--fd-muted);
}

.section-head p,
.summary-panel-head p {
    margin: 4px 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
}

.summary-panel-body {
    display: grid;
    gap: 12px;
}

.table-card {
    overflow: hidden;
    padding: 0;
}

.table-card > .section-head {
    padding: 18px 20px 0;
}

.quote-transition-card {
    border-style: dashed;
}

.quote-transition-list {
    display: grid;
    gap: 14px;
    padding: 0 20px 20px;
}

.quote-transition-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--fd-line);
    border-radius: var(--fd-radius-md);
    background: linear-gradient(180deg, rgba(244, 250, 248, 0.92), rgba(255, 255, 255, 0.96));
}

.quote-transition-copy {
    display: grid;
    gap: 6px;
}

.quote-transition-copy strong {
    font-size: 1.05rem;
    color: var(--fd-text);
}

.quote-transition-copy p {
    margin: 0;
    color: var(--fd-muted);
}

.quote-transition-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th,
.table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--fd-line);
    vertical-align: top;
    text-align: left;
}

.table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
    background: rgba(244, 247, 250, 0.96);
}

.table tbody tr {
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.table tbody tr:hover {
    background: rgba(246, 249, 252, 0.92);
}

.table tbody tr[data-row-href] {
    cursor: pointer;
}

.table tbody tr[data-row-href]:hover {
    background: rgba(231, 244, 248, 0.92);
}

.table tbody tr[data-row-href]:focus-visible {
    outline: none;
    background: rgba(231, 244, 248, 0.96);
    box-shadow: inset 0 0 0 2px rgba(13, 107, 138, 0.2);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table strong,
.customer-related-item strong,
.module-related-item strong,
.calendar-agenda-item strong,
.calendar-unplanned-item strong,
.user-list-row h3,
.task-card-headline strong,
.execution-card h3,
.planner-summary strong,
.workflow-note-panel strong {
    color: var(--fd-text);
}

.table small,
.customer-related-item small,
.module-related-item small,
.calendar-agenda-item p,
.calendar-unplanned-item .meta-copy,
.task-card-summary small,
.task-card-meta span,
.workflow-note-panel p,
.planner-hint {
    color: var(--fd-muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.table-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.table-actions a,
.table-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.table-actions a:hover,
.table-actions button:hover {
    border-color: var(--fd-line-strong);
    background: var(--fd-bg-soft);
}

.table-row-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-row-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(13, 107, 138, 0.08);
    color: var(--fd-brand);
    font-size: 0.8rem;
    font-weight: 800;
    transition: transform 0.16s ease, background-color 0.16s ease;
}

.table-actions-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.quote-filter-form {
    align-items: center;
}

.quote-filter-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.quote-live-hint {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: rgba(244, 247, 250, 0.78);
    color: var(--fd-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.row-action-menu {
    position: relative;
}

.row-action-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

.row-action-menu summary::-webkit-details-marker {
    display: none;
}

.row-action-menu summary:hover,
.row-action-menu summary:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.row-action-menu[open] summary {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.row-action-menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 6;
    display: grid;
    gap: 6px;
    min-width: 176px;
    padding: 8px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--fd-shadow-sm);
}

.row-action-menu-panel a,
.row-action-menu-panel button {
    width: 100%;
    justify-content: flex-start;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--fd-surface-muted);
    color: var(--fd-text-soft);
    font-size: 0.79rem;
    font-weight: 600;
}

.row-action-menu-panel a:hover,
.row-action-menu-panel a:focus-visible,
.row-action-menu-panel button:hover,
.row-action-menu-panel button:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.table tbody tr[data-row-href]:hover .table-row-chevron,
.table tbody tr[data-row-href]:focus-visible .table-row-chevron {
    transform: translateX(2px);
    background: rgba(13, 107, 138, 0.14);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge-label {
    min-width: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.badge-neutral {
    border-color: #d6dde6;
    background: #f5f7fa;
    color: #5a6979;
}

.badge-accent {
    border-color: #c9deea;
    background: #edf7fb;
    color: #0e6b8a;
}

.badge-success {
    border-color: #cfe4d8;
    background: #eef9f3;
    color: #226b4f;
}

.badge-warning {
    border-color: #ecd7b2;
    background: #fff6e8;
    color: #9b6018;
}

.badge-danger {
    border-color: #efcfc9;
    background: #fff2f0;
    color: #ab4738;
}

.module-related-list,
.customer-related-list,
.calendar-agenda-list,
.calendar-unplanned-list,
.user-list,
.task-list,
.mini-list,
.timeline-list,
.workflow-timeline {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.module-related-item,
.customer-related-item,
.calendar-agenda-item,
.calendar-unplanned-item,
.user-list-row,
.mobile-assignment-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: #ffffff;
}

.module-related-item p,
.customer-related-item p,
.user-list-row p,
.timeline-list p,
.workflow-timeline p {
    margin: 6px 0 0;
}

.module-related-meta,
.customer-related-meta,
.calendar-agenda-meta,
.task-card-meta {
    display: grid;
    gap: 6px;
    justify-items: end;
    text-align: right;
    min-width: fit-content;
}

.module-related-item-link {
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.module-related-item-link:hover {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
    transform: translateY(-1px);
}

.module-related-item-link:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: 0 0 0 3px rgba(13, 107, 138, 0.12);
}

.module-related-open {
    color: var(--fd-brand);
    font-size: 0.76rem;
    font-weight: 700;
}

.empty-state,
.info-box,
.upload-panel {
    display: grid;
    gap: 8px;
    padding: 20px 22px;
    background: linear-gradient(180deg, #fafbfd 0%, #f4f7fb 100%);
}

.empty-state h3,
.info-box h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.empty-state p,
.info-box p {
    margin: 0;
    color: var(--fd-muted);
}

.summary-list {
    display: grid;
    gap: 10px;
}

.summary-list div {
    display: grid;
    grid-template-columns: minmax(112px, 150px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(215, 222, 231, 0.72);
}

.summary-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.summary-list dt {
    margin: 0;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.summary-list dd,
.summary-list p {
    margin: 0;
    color: var(--fd-text-soft);
}

.workflow-note-panel,
.planner-summary,
.user-creation-note,
.user-delete-panel,
.calendar-day-empty,
.calendar-empty-state,
.signature-record,
.signature-stage,
.timeline-list li,
.workflow-timeline li {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: var(--fd-surface-muted);
}

.search-results-grid,
.search-summary-grid {
    display: grid;
    gap: 18px;
}

.search-results-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.search-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.search-workbench,
.search-scope-card {
    display: grid;
    gap: 16px;
}

.search-workbench-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.search-workbench-field {
    display: grid;
    gap: 8px;
}

.search-workbench-field > span,
.search-workbench-hints > span {
    color: var(--fd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-workbench-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(215, 222, 231, 0.82);
}

.search-workbench-chip-row,
.filter-chip-row,
.search-scope-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-example-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.search-scope-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--fd-text-soft);
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.search-scope-chip span {
    font-size: 0.82rem;
    font-weight: 600;
}

.search-scope-chip strong {
    color: var(--fd-text);
    font-size: 0.8rem;
}

.search-scope-chip:hover,
.search-scope-chip:focus-visible,
.search-scope-chip.is-active {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
    color: var(--fd-brand-strong);
}

.form-field-hint {
    color: var(--fd-muted);
    font-size: 0.79rem;
    line-height: 1.45;
}

label.is-required > span:first-child::after {
    content: " *";
    color: #b34a41;
}

.execution-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.work-order-priority-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
}

.work-order-priority-card {
    display: grid;
    gap: 18px;
}

.work-order-priority-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.work-order-priority-fact {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: var(--fd-surface-muted);
}

.work-order-priority-fact span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.work-order-priority-fact strong,
.work-order-priority-note strong {
    font-size: 0.94rem;
    line-height: 1.4;
    color: var(--fd-text);
}

.work-order-priority-note {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--fd-brand-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fcfe 0%, #eef8fb 100%);
}

.work-order-priority-note p {
    margin: 0;
    color: var(--fd-text-soft);
}

.work-order-alert-band {
    display: grid;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--fd-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--fd-shadow-sm);
}

.work-order-alert-band-copy {
    display: grid;
    gap: 6px;
}

.work-order-alert-band-copy strong {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.work-order-alert-band-copy p {
    margin: 0;
}

.work-order-alert-list {
    display: grid;
    gap: 12px;
}

.work-order-alert-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: var(--fd-surface-muted);
}

.work-order-alert-item strong {
    display: block;
    margin-bottom: 4px;
}

.work-order-alert-item p {
    margin: 0;
    color: var(--fd-muted);
}

.workflow-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    align-items: center;
    color: var(--fd-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.workflow-hero-links a,
.workflow-hero-links .link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--fd-brand);
    font-size: 0.8rem;
    font-weight: 700;
}

.workflow-hero-links .inline-form {
    gap: 0;
}

.link-button:hover,
.workflow-hero-links a:hover {
    color: var(--fd-brand-strong);
}

.work-order-command-deck {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 18px;
}

.work-order-command-card {
    display: grid;
    gap: 16px;
}

.work-order-command-card-accent {
    align-content: start;
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.06), transparent 18rem),
        linear-gradient(180deg, rgba(248, 252, 254, 0.98) 0%, rgba(241, 248, 251, 0.98) 100%);
}

.work-order-command-card > h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.18rem;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.work-order-command-card > p {
    margin: 0;
    color: var(--fd-muted);
}

.work-order-command-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.work-order-command-fact {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: rgba(244, 248, 251, 0.88);
}

.work-order-command-fact span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.work-order-command-fact strong {
    font-size: 0.96rem;
    line-height: 1.36;
    color: var(--fd-text);
}

.work-order-command-list {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(215, 222, 231, 0.82);
}

.work-order-command-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.work-order-shell-single {
    grid-template-columns: minmax(0, 1fr);
}

.work-order-main {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.workflow-panel-grid-planning {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}

.workflow-panel-grid-planning > .workflow-subpanel:first-child {
    grid-column: 1 / -1;
}

.workflow-subpanel {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: rgba(249, 251, 253, 0.92);
}

.planner-current-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.planner-current-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-current-item {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
}

.planner-current-item span {
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.planner-current-item strong {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--fd-text);
}

.planner-issue-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.planner-issue-form {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(215, 222, 231, 0.82);
}

.member-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.member-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: #ffffff;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.member-option:hover {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
}

.member-option:has(input:checked) {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
}

.member-option input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
    padding: 0;
}

.member-option div {
    display: grid;
    gap: 3px;
}

.member-option strong {
    color: var(--fd-text);
}

.member-option small {
    color: var(--fd-muted);
}

.execution-card {
    display: grid;
    gap: 10px;
}

.execution-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.12rem;
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.execution-card p,
.execution-link,
.execution-link-stack {
    margin: 0;
}

.execution-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.execution-card-meta div {
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--fd-line);
}

.execution-card-meta span {
    display: block;
    margin-bottom: 4px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.execution-link,
.activity-stream-link {
    color: var(--fd-brand);
    font-weight: 700;
}

.execution-link:hover,
.activity-stream-link:hover {
    color: var(--fd-brand-strong);
}

.member-preview,
.user-pill-strip,
.calendar-legend-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-pill {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 0.82rem;
}

.member-pill small {
    color: var(--fd-muted);
    font-size: 0.74rem;
}

.member-pill-muted {
    background: var(--fd-surface-muted);
    color: var(--fd-muted);
}

.member-pill-warning {
    border-color: #ecd7b2;
    background: #fff6e8;
    color: #9b6018;
}

.accordion-card {
    overflow: hidden;
}

.accordion-summary,
.task-card-summary,
.user-edit-toggle {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.accordion-summary::-webkit-details-marker,
.task-card-summary::-webkit-details-marker,
.user-edit-toggle::-webkit-details-marker {
    display: none;
}

.accordion-summary-copy {
    display: grid;
    gap: 6px;
}

.accordion-summary-copy strong,
.user-edit-toggle {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.accordion-summary-copy p {
    margin: 0;
}

.accordion-summary-meta {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--fd-surface-strong);
    color: var(--fd-muted-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.accordion-body,
.task-card-body,
.user-edit-panel {
    margin-top: 16px;
}

.task-card {
    padding: 18px 20px;
}

.task-card-summary {
    padding: 0;
}

.task-card-headline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.task-card-meta {
    align-self: center;
}

.activity-card {
    display: grid;
    gap: 12px;
}

.activity-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.activity-stream-panel {
    display: grid;
    gap: 16px;
}

.activity-stream-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.activity-stream-head h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.16rem;
    letter-spacing: -0.03em;
}

.activity-stream-head-copy,
.activity-stream-body,
.activity-stream-head-meta {
    min-width: 0;
}

.activity-stream-head-copy p,
.activity-stream-message,
.activity-stream-change span {
    color: var(--fd-muted);
}

.activity-stream-head-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.activity-stream-process-label,
.activity-stream-process-count,
.activity-stream-filter,
.activity-stream-pill,
.activity-stream-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.78rem;
    font-weight: 600;
}

.activity-stream-process-label {
    background: var(--fd-surface-muted);
    color: var(--fd-text-soft);
}

.activity-stream-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px 16px;
    flex-wrap: wrap;
}

.activity-stream-search,
.activity-stream-select {
    display: grid;
    gap: 8px;
}

.activity-stream-search {
    flex: 1 1 320px;
}

.activity-stream-search-label,
.activity-stream-select > span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.activity-stream-toolbar-actions {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.activity-stream-toggle.is-active,
.activity-stream-filter.is-active,
.activity-stream-filter:hover {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.activity-stream-filters,
.activity-stream-badges,
.activity-stream-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.activity-stream-feed {
    display: grid;
    gap: 12px;
    max-height: min(72vh, 840px);
    overflow: auto;
    padding-right: 4px;
}

.activity-stream-feed::-webkit-scrollbar {
    width: 10px;
}

.activity-stream-feed::-webkit-scrollbar-thumb {
    background: rgba(103, 119, 137, 0.22);
    border-radius: 999px;
}

.activity-stream-list {
    display: grid;
    gap: 12px;
}

.activity-stream-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--fd-line);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--fd-shadow-sm);
}

.activity-stream-item-new {
    border-color: var(--fd-brand-border);
    box-shadow: 0 18px 32px rgba(13, 107, 138, 0.12);
}

.activity-stream-item-level-success {
    background: linear-gradient(180deg, #fcfffd 0%, #f4fbf7 100%);
}

.activity-stream-item-level-warning {
    background: linear-gradient(180deg, #fffdfa 0%, #fff8ef 100%);
}

.activity-stream-item-level-error {
    background: linear-gradient(180deg, #fffcfb 0%, #fff4f2 100%);
}

.activity-stream-rail {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
}

.activity-stream-rail::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: -18px;
    width: 2px;
    background: linear-gradient(180deg, #d7dee7 0%, rgba(215, 222, 231, 0) 100%);
}

.activity-stream-item:last-child .activity-stream-rail::after {
    display: none;
}

.activity-stream-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.activity-stream-icon-system {
    background: linear-gradient(180deg, #7a8897 0%, #637281 100%);
}

.activity-stream-icon-user {
    background: linear-gradient(180deg, #2b89a7 0%, #0d6b8a 100%);
}

.activity-stream-icon-customer {
    background: linear-gradient(180deg, #426fbc 0%, #375ea3 100%);
}

.activity-stream-icon-financial {
    background: linear-gradient(180deg, #b0782f 0%, #9a661e 100%);
}

.activity-stream-icon-document {
    background: linear-gradient(180deg, #596b7d 0%, #455768 100%);
}

.activity-stream-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.activity-stream-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--fd-muted);
    font-size: 0.8rem;
}

.activity-stream-actor {
    color: var(--fd-text-soft);
    font-weight: 700;
}

.activity-stream-separator {
    color: #a0acb8;
}

.activity-stream-item h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.36;
    color: var(--fd-text);
}

.activity-stream-changes {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: var(--fd-surface-muted);
}

.activity-stream-change strong {
    font-size: 0.79rem;
}

.activity-stream-pill-category-customer {
    background: #eef4ff;
    border-color: #d8e5ff;
    color: #4365a7;
}

.activity-stream-pill-category-user {
    background: #edf8fa;
    border-color: #cee5ec;
    color: #0f667f;
}

.activity-stream-pill-category-financial {
    background: #fff6e8;
    border-color: #ecd7b2;
    color: #a36211;
}

.activity-stream-pill-category-document {
    background: #f1f4f8;
    border-color: #d8e0e8;
    color: #556778;
}

.activity-stream-pill-category-system {
    background: #f3f6f9;
    border-color: #dde4eb;
    color: #607080;
}

.activity-stream-pill-important {
    background: #fff4eb;
    border-color: #f0d8bf;
    color: #a66313;
}

.activity-stream-pill-new {
    background: #ebf8f1;
    border-color: #cfe4d8;
    color: #1f7a57;
}

.message-workbench {
    --message-workbench-height: calc(100dvh - 212px);
    display: grid;
    grid-template-columns: 308px minmax(0, 1fr);
    gap: 10px;
    height: var(--message-workbench-height);
    max-height: var(--message-workbench-height);
    min-height: var(--message-workbench-height);
    align-items: stretch;
    overflow: hidden;
}

.message-sidebar-card,
.message-thread-card {
    display: grid;
    gap: 8px;
    min-height: 0;
    padding: 8px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 250, 252, 0.99) 100%);
    box-shadow: var(--fd-shadow-sm);
    overflow: hidden;
}

.message-sidebar-card {
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.message-thread-card {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.message-thread-card.is-empty {
    grid-template-rows: auto;
}

.message-thread-mobile-bar,
.message-mobile-back {
    display: none;
}

.message-sidebar-head,
.message-thread-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.message-sidebar-head h2,
.message-thread-head h2 {
    margin: 2px 0 0;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    letter-spacing: -0.03em;
}

.message-sidebar-head p,
.message-thread-head p {
    margin: 4px 0 0;
}

.message-sidebar-head p {
    display: none;
}

.message-thread-copy {
    gap: 3px;
}

.message-thread-copy p {
    display: -webkit-box;
    overflow: hidden;
    max-width: 62ch;
    font-size: 0.76rem;
    line-height: 1.24;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.message-sidebar-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.message-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.message-sidebar-metrics,
.message-thread-actions,
.message-thread-facts,
.message-filter-row,
.message-bubble-actions,
.message-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-mini-stat,
.message-thread-pill {
    display: grid;
    gap: 4px;
    min-width: 76px;
    padding: 7px 9px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: var(--fd-surface-muted);
}

.message-mini-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
}

.message-thread-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 999px;
}

.message-mini-stat span,
.message-thread-pill span {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.message-mini-stat strong,
.message-thread-pill strong {
    font-size: 1rem;
    line-height: 1.2;
    color: var(--fd-text);
}

.message-thread-pill span {
    font-size: 0.62rem;
    line-height: 1;
}

.message-thread-pill strong {
    font-size: 0.78rem;
    line-height: 1;
}

.message-mini-stat span {
    font-size: 0.64rem;
    line-height: 1;
}

.message-mini-stat strong {
    font-size: 0.9rem;
    line-height: 1;
}

.message-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.message-search-form input {
    min-height: 32px;
    padding: 0 10px;
    background: var(--fd-bg-soft);
}

.message-search-form .button,
.message-search-submit {
    min-height: 32px;
    min-width: 66px;
    padding: 0 10px;
    font-size: 0.72rem;
}

.message-sidebar-controls {
    border: 1px solid var(--fd-line);
    border-radius: 12px;
    background: var(--fd-surface-muted);
    overflow: hidden;
}

.message-sidebar-controls summary {
    list-style: none;
}

.message-sidebar-controls summary::-webkit-details-marker {
    display: none;
}

.message-sidebar-controls-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.message-sidebar-controls-toggle:hover,
.message-sidebar-controls-toggle:focus-visible {
    outline: none;
    background: #ffffff;
}

.message-sidebar-controls[open] .message-sidebar-controls-toggle {
    background: #ffffff;
    box-shadow: inset 0 -1px 0 rgba(215, 222, 231, 0.9);
}

.message-sidebar-controls-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.message-sidebar-controls-copy strong {
    font-size: 0.74rem;
    line-height: 1.2;
    color: var(--fd-text);
}

.message-sidebar-controls-copy small {
    color: var(--fd-muted);
    font-size: 0.66rem;
    line-height: 1.2;
}

.message-sidebar-controls-meta {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.message-sidebar-controls-body {
    display: grid;
    gap: 8px;
    padding: 7px 9px 9px;
}

.message-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-muted-strong);
    font-size: 0.69rem;
    font-weight: 700;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.message-filter-chip:hover,
.message-filter-chip:focus-visible {
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
    box-shadow: var(--fd-shadow-sm);
    outline: none;
}

.message-filter-chip.is-active {
    border-color: rgba(13, 107, 138, 0.22);
    background: linear-gradient(180deg, #edf7fb 0%, #e6f3f8 100%);
    color: var(--fd-brand-strong);
}

.message-sidebar-tools {
    display: flex;
    justify-content: flex-start;
}

.message-sidebar-tools .button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 0.69rem;
}

.message-conversation-list,
.message-thread-stream {
    display: grid;
    gap: 5px;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

.message-conversation-list {
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
}

.message-conversation-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    align-self: start;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.message-conversation-item:hover,
.message-conversation-item:focus-visible {
    border-color: var(--fd-brand-border);
    background: #fbfdff;
    box-shadow: var(--fd-shadow-sm);
    outline: none;
}

.message-conversation-item.is-active {
    border-color: rgba(13, 107, 138, 0.24);
    background: linear-gradient(180deg, #f6fbfe 0%, #eef6fb 100%);
    box-shadow: 0 8px 16px rgba(13, 107, 138, 0.06);
}

.message-conversation-main,
.message-thread-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    align-content: start;
}

.message-conversation-main {
    grid-template-rows: auto auto auto;
}

.message-conversation-top,
.message-bubble-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.message-conversation-top strong {
    font-size: 0.75rem;
    color: var(--fd-text);
}

.message-conversation-top time,
.message-bubble-meta {
    color: var(--fd-muted);
    font-size: 0.66rem;
    white-space: nowrap;
}

.message-conversation-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 6px;
    color: var(--fd-muted-strong);
    font-size: 0.68rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.message-conversation-main p,
.message-bubble p {
    margin: 0;
    color: var(--fd-text-soft);
}

.message-conversation-main p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.18;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.message-conversation-side {
    display: grid;
    align-content: start;
    justify-items: end;
    gap: 6px;
}

.message-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d84b44;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

.message-importance-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #c06b1c;
    box-shadow: 0 0 0 4px rgba(192, 107, 28, 0.1);
}

.message-thread-stream {
    align-content: start;
    padding: 0 1px 0 0;
}

.message-day-divider {
    display: flex;
    justify-content: center;
    margin: 3px 0 1px;
}

.message-day-divider span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 10px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.message-bubble {
    display: grid;
    gap: 6px;
    max-width: min(660px, 78%);
    padding: 10px 12px;
    border: 1px solid var(--fd-line);
    border-radius: 16px 16px 16px 8px;
    background: #ffffff;
    box-shadow: var(--fd-shadow-sm);
}

.message-bubble.is-unread {
    border-color: var(--fd-brand-border);
    box-shadow: 0 10px 18px rgba(13, 107, 138, 0.1);
}

.message-bubble h3 {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.28;
    color: var(--fd-text);
}

.message-bubble-customer {
    margin-left: auto;
    border-radius: 16px 16px 8px 16px;
    background: linear-gradient(180deg, #eff5ff 0%, #e8f0ff 100%);
    border-color: #d7e2fb;
}

.message-bubble-user {
    background: linear-gradient(180deg, #eef8fa 0%, #e8f4f8 100%);
    border-color: #d2e5ed;
}

.message-bubble-financial {
    background: linear-gradient(180deg, #fffaf2 0%, #fff4e3 100%);
    border-color: #ecd7b2;
}

.message-bubble-document {
    background: linear-gradient(180deg, #f7f9fc 0%, #f1f5f9 100%);
    border-color: #dbe3eb;
}

.message-bubble-system {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.message-bubble-actor {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fd-muted-strong);
}

.message-inline-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--fd-text-soft);
    font-size: 0.68rem;
    font-weight: 600;
}

.message-change-list {
    display: grid;
    gap: 6px;
    padding: 9px 10px;
    border: 1px solid rgba(215, 222, 231, 0.92);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
}

.message-change-item {
    display: grid;
    gap: 3px;
}

.message-change-item strong {
    font-size: 0.72rem;
}

.message-change-item span {
    color: var(--fd-text-soft);
    font-size: 0.74rem;
}

.message-bubble-actions a {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--fd-brand-strong);
}

.message-empty-state {
    min-height: 112px;
    place-content: center;
}

.message-thread-empty {
    align-content: start;
    min-height: 0;
    height: auto;
    padding: 14px 16px;
    border-radius: 14px;
}

.message-thread-empty h3 {
    font-size: 0.9rem;
}

.message-thread-empty p {
    max-width: 44ch;
    font-size: 0.8rem;
}

.calendar-filter-form,
.calendar-filter-actions,
.calendar-modal-grid,
.calendar-slot-grid,
.calendar-day-summary,
.calendar-side-facts,
.user-mini-grid,
.form-grid,
.work-order-form-grid {
    display: grid;
    gap: 14px;
}

.form-grid,
.work-order-form-grid,
.calendar-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-form-topline .settings-summary-card strong {
    font-size: 1.08rem;
}

.quote-builder-form {
    display: grid;
    gap: 18px;
}

.quote-stage-panel {
    position: relative;
    overflow: visible;
}

.quote-stage-head h3 {
    margin: 0;
}

.quote-stage-head-copy {
    display: grid;
    gap: 4px;
}

.quote-stage-body {
    align-items: start;
    overflow: visible;
}

.quote-stage-body-single {
    grid-template-columns: 1fr;
}

.quote-basics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.quote-grid-full {
    grid-column: 1 / -1;
}

.quote-grid-span-2 {
    grid-column: span 2;
}

.quote-customer-picker {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.quote-customer-picker-label > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fd-text-soft);
}

.quote-customer-picker-select {
    position: relative;
    z-index: 6;
}

.quote-customer-picker-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: #ffffff;
    list-style: none;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.quote-customer-picker-toggle::-webkit-details-marker {
    display: none;
}

.quote-customer-picker-toggle:hover,
.quote-customer-picker-select[open] .quote-customer-picker-toggle {
    border-color: var(--fd-line-strong);
    background: var(--fd-bg-soft);
}

.quote-customer-picker-toggle:focus-visible {
    outline: none;
    border-color: #8bb8c8;
    box-shadow: 0 0 0 4px rgba(13, 107, 138, 0.12);
}

.quote-customer-picker-value {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.quote-customer-picker-value strong,
.quote-customer-picker-value small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quote-customer-picker-value strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.quote-customer-picker-value small {
    color: var(--fd-muted);
    font-size: 0.78rem;
}

.quote-customer-picker-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-customer-picker-type.is-hidden {
    display: none;
}

.quote-customer-picker-caret {
    color: var(--fd-muted);
    font-size: 0.86rem;
}

.quote-customer-picker-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 24;
    display: grid;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(207, 216, 227, 0.98);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.995);
    box-shadow: var(--fd-shadow-md);
}

.quote-customer-picker-select[open] {
    z-index: 18;
}

.quote-customer-picker-search input {
    min-height: 42px;
}

.quote-customer-picker-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quote-customer-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--fd-text-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.quote-customer-filter.is-active,
.quote-customer-filter:hover,
.quote-customer-filter:focus-visible {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
}

.quote-customer-picker-list {
    display: grid;
    gap: 8px;
    max-height: 296px;
    overflow: auto;
    padding-right: 4px;
}

.quote-customer-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fd-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--fd-text);
    text-align: left;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.quote-customer-option:hover,
.quote-customer-option:focus-visible,
.quote-customer-option.is-selected {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    box-shadow: var(--fd-shadow-sm);
}

.quote-customer-option-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.quote-customer-option-copy strong {
    font-size: 0.92rem;
    line-height: 1.24;
}

.quote-customer-option-copy small {
    color: var(--fd-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.quote-customer-option-meta {
    color: var(--fd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.quote-customer-picker-empty {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.quote-customer-picker.is-invalid .quote-customer-picker-toggle {
    border-color: #d77f6f;
    box-shadow: 0 0 0 4px rgba(215, 127, 111, 0.12);
}

.form-label-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.info-hint {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.info-hint summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    list-style: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.info-hint summary::-webkit-details-marker {
    display: none;
}

.info-hint summary:hover,
.info-hint summary:focus-visible,
.info-hint[open] summary {
    outline: none;
    border-color: var(--fd-brand-border);
    background: var(--fd-brand-soft);
    color: var(--fd-brand-strong);
    box-shadow: 0 0 0 3px rgba(13, 107, 138, 0.1);
}

.info-hint-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 12;
    display: grid;
    gap: 8px;
    width: min(320px, 72vw);
    padding: 12px 14px;
    border: 1px solid rgba(207, 216, 227, 0.98);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.995);
    box-shadow: var(--fd-shadow-md);
    color: var(--fd-text-soft);
    font-size: 0.82rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.info-hint-right .info-hint-panel {
    left: auto;
    right: 0;
}

.info-hint:hover .info-hint-panel,
.info-hint:focus-within .info-hint-panel,
.info-hint[open] .info-hint-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.info-hint-panel strong {
    color: var(--fd-text);
    font-size: 0.84rem;
}

.info-hint-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 18px;
}

.quote-stage-head-hint {
    margin-left: auto;
}

.quote-status-guidance {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--fd-shadow-sm);
}

.quote-status-guidance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quote-status-guidance > span {
    color: var(--fd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-status-guidance strong {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    line-height: 1.08;
}

.quote-status-guidance p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.quote-disclosure {
    display: grid;
    gap: 0;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.998) 0%, rgba(249, 252, 254, 0.995) 100%);
    box-shadow: var(--fd-shadow-sm);
    overflow: hidden;
}

.quote-disclosure[open] {
    border-color: rgba(196, 213, 223, 0.98);
}

.quote-disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.quote-disclosure-summary::-webkit-details-marker {
    display: none;
}

.quote-disclosure-summary:hover {
    background: rgba(245, 249, 252, 0.7);
}

.quote-disclosure-summary strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.2;
}

.quote-disclosure-summary p {
    margin: 4px 0 0;
    color: var(--fd-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.quote-disclosure-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid var(--fd-line);
    border-radius: 999px;
    background: var(--fd-surface-muted);
    color: var(--fd-muted-strong);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.quote-disclosure-body {
    display: grid;
    gap: 16px;
    padding: 0 18px 18px;
    border-top: 1px solid rgba(215, 222, 231, 0.72);
}

.quote-disclosure-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-stage-body-pricing {
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.72fr);
}

.quote-builder-main {
    min-width: 0;
}

.quote-stage-head {
    align-items: flex-end;
}

.quote-catalog-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 12px;
    align-items: end;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.quote-catalog-picker label {
    display: grid;
    gap: 8px;
}

.quote-line-items {
    display: grid;
    gap: 14px;
}

.quote-line-item {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(205, 216, 227, 0.96);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.998) 0%, rgba(249, 252, 254, 0.995) 100%);
    box-shadow: var(--fd-shadow-sm);
}

.quote-line-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.quote-line-item-ident {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.quote-line-item-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.quote-line-item-ident strong {
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.quote-line-item-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    min-width: max-content;
}

.quote-line-item-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(13, 107, 138, 0.16);
    background: rgba(13, 107, 138, 0.08);
    color: var(--fd-brand-strong);
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.quote-line-item-meta .button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
}

.quote-line-item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.quote-line-item-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.quote-line-item-field span {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.quote-line-item-field-wide {
    grid-column: span 2;
}

.quote-line-item-field textarea {
    min-height: 92px;
    resize: vertical;
}

.quote-line-item-tax-state {
    align-content: start;
}

.quote-inline-note {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(196, 213, 223, 0.9);
    border-radius: 14px;
    background: rgba(244, 248, 251, 0.96);
    color: var(--fd-muted-strong);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
}

.quote-line-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 2px 2px 0;
}

.quote-line-item-actions p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.83rem;
    line-height: 1.45;
}

.quote-builder-summary {
    position: sticky;
    top: calc(var(--app-sticky-offset, 82px) + 10px);
    display: grid;
    gap: 14px;
}

.quote-builder-summary-card,
.quote-builder-summary-note {
    display: grid;
    gap: 8px;
    padding: 18px 18px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--fd-shadow-sm);
}

.quote-builder-summary-card strong {
    font-family: var(--font-heading);
    font-size: 1.56rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.quote-builder-summary-card .eyebrow {
    margin-bottom: 2px;
}

.quote-builder-summary-card p,
.quote-builder-summary-note p {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.quote-builder-summary-list {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    margin: 0;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--fd-shadow-sm);
}

.quote-builder-summary-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(215, 222, 231, 0.72);
}

.quote-builder-summary-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.quote-builder-summary-list dt {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-builder-summary-list dd {
    margin: 0;
    color: var(--fd-text);
    font-size: 0.96rem;
    font-weight: 700;
    text-align: right;
}

.quote-builder-summary-list .is-final dd {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.quote-form-toolbar {
    padding: 8px 0 4px;
}

.calendar-filter-actions {
    grid-template-columns: repeat(2, minmax(0, max-content));
    align-content: end;
}

.calendar-modal-grid,
.user-mini-grid,
.calendar-day-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.month-weekdays,
.month-grid {
    display: grid;
    gap: 10px;
}

.month-weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 10px;
}

.month-weekdays span {
    padding: 0 6px;
    color: var(--fd-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-day,
.calendar-day-card {
    display: grid;
    gap: 12px;
    min-height: 176px;
    padding: 14px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: #ffffff;
}

.month-day-muted {
    background: var(--fd-surface-muted);
}

.month-day-today {
    border-color: var(--fd-brand-border);
    box-shadow: inset 0 0 0 1px rgba(13, 107, 138, 0.12);
}

.month-day-selected {
    background: linear-gradient(180deg, #f9fcfe 0%, #eef7fb 100%);
}

.calendar-day-conflict {
    border-color: #ebd0bb;
    background: linear-gradient(180deg, #fffdfa 0%, #fff6ec 100%);
}

.calendar-day-top,
.calendar-day-select,
.calendar-day-pills,
.calendar-day-tools,
.calendar-day-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-select {
    align-items: baseline;
    width: 100%;
}

.calendar-day-weekday {
    color: var(--fd-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.month-day-number {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--fd-text);
}

.calendar-day-pill,
.calendar-more,
.calendar-focus-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--fd-surface-strong);
    color: var(--fd-muted-strong);
    font-size: 0.72rem;
    font-weight: 700;
}

.calendar-day-pill-warning {
    background: #fff3e1;
    color: #9d6415;
}

.month-day-events,
.calendar-focus-list {
    display: grid;
    gap: 8px;
}

.calendar-event,
.calendar-focus-event {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--fd-line);
    background: var(--fd-surface-muted);
}

.calendar-event strong,
.calendar-focus-event strong {
    font-size: 0.83rem;
    line-height: 1.35;
}

.calendar-event small,
.calendar-focus-event span,
.calendar-focus-event p {
    color: var(--fd-muted);
    font-size: 0.77rem;
    line-height: 1.45;
    margin: 0;
}

.calendar-event-success {
    border-color: #cfe4d8;
    background: #eef9f3;
}

.calendar-event-accent {
    border-color: #d2e5ed;
    background: #edf8fa;
}

.calendar-event-warning {
    border-color: #ecd7b2;
    background: #fff6e8;
}

.calendar-event-danger {
    border-color: #efcfc9;
    background: #fff2f0;
}

.calendar-focus-time,
.calendar-focus-main,
.calendar-focus-meta,
.calendar-agenda-date,
.calendar-agenda-main,
.calendar-unplanned-item > div,
.user-list-main,
.user-list-head,
.user-title-stack,
.user-role-rule,
.user-readonly-note,
.user-delete-copy,
.public-checklist,
.public-form-note,
.login-copy,
.upload-input,
.signature-stage-copy,
.signature-record-copy {
    display: grid;
    gap: 10px;
}

.calendar-agenda-date {
    min-width: 82px;
}

.calendar-agenda-meta {
    min-width: 170px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 21, 30, 0.52);
    z-index: 100;
}

.modal-card {
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
    border: 1px solid rgba(207, 216, 227, 0.96);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--fd-shadow-lg);
}

.modal-card-large {
    width: min(1180px, 100%);
}

.user-role-rule {
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: #ffffff;
}

.user-role-rule.is-allowed {
    border-color: #cfe4d8;
    background: #eef9f3;
}

.user-role-rule.is-blocked {
    background: var(--fd-surface-muted);
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(180deg, #163549 0%, #0d6b8a 100%);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.user-list-head {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.user-title-stack h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.user-title-stack p,
.user-readonly-note,
.public-form-note span {
    margin: 0;
    color: var(--fd-muted);
}

.user-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.user-mini-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--fd-surface-muted);
    border: 1px solid var(--fd-line);
}

.user-mini-card span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.user-mini-card strong {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--fd-text-soft);
}

.user-edit-card {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--fd-line);
}

.checkbox-inline,
.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.checkbox-inline input,
.checkbox-row input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
}

.signature-canvas {
    width: 100%;
    min-height: 200px;
    border: 1px dashed var(--fd-line-strong);
    border-radius: 18px;
    background: #ffffff;
}

.signature-canvas-large {
    min-height: 240px;
}

.signature-preview {
    max-height: 150px;
    object-fit: contain;
}

.app-toast-region {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 110;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.app-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--fd-line);
    border-radius: 18px;
    background: #ffffff;
    color: var(--fd-text);
    box-shadow: var(--fd-shadow-md);
}

.app-notice-inline {
    width: 100%;
}

.app-notice-toast {
    pointer-events: auto;
}

.app-notice-success {
    border-color: #cfe4d8;
    background: #f7fcf9;
}

.app-notice-error {
    border-color: #efcfc9;
    background: #fff6f5;
}

.app-notice-warning {
    border-color: #ecd7b2;
    background: #fff9f1;
}

.app-notice-info {
    border-color: #d2e5ed;
    background: #f7fbfd;
}

.app-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--fd-surface-muted);
    color: var(--fd-text-soft);
    font-size: 0.88rem;
    font-weight: 800;
}

.app-notice-content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.app-notice-kicker {
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-muted);
}

.app-notice-head strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.35;
}

.app-notice-head p,
.app-notice-description {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.86rem;
    line-height: 1.54;
}

form[data-validate-on-interaction] label {
    display: grid;
    gap: 8px;
}

.form-error-message {
    margin: -2px 0 0;
    color: #b34a41;
    font-size: 0.82rem;
    line-height: 1.45;
}

label.is-invalid > span:first-child {
    color: #a24036;
}

label.is-invalid input,
label.is-invalid select,
label.is-invalid textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: #d79b95;
    background: #fff8f7;
    box-shadow: 0 0 0 4px rgba(179, 74, 65, 0.08);
}

.app-notice-dismiss {
    width: 30px;
    height: 30px;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--fd-muted);
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
}

.login-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 20px;
    width: min(1160px, 100%);
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
}

.public-showcase {
    background:
        radial-gradient(circle at top right, rgba(13, 107, 138, 0.1), transparent 20rem),
        linear-gradient(180deg, #f9fbfd 0%, #f3f7fb 100%);
}

.login-brand img {
    width: min(180px, 100%);
}

.public-checklist-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--fd-line);
    border-radius: 16px;
    background: #ffffff;
}

.public-checklist-item span {
    color: var(--fd-muted);
}

.public-form-card form {
    display: grid;
    gap: 16px;
}

.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

@media (max-width: 1440px) {
    .message-workbench {
        --message-workbench-height: calc(100dvh - 246px);
    }

    .app-toolbar-row {
        flex-direction: row;
    }

    .app-toolbar-right {
        width: auto;
        justify-content: flex-end;
    }
}

@media (max-width: 1240px) {
    .process-workbench,
    .process-layout,
    .dashboard-overview-grid,
    .dashboard-secondary-grid,
    .workspace-board,
    .work-order-command-deck,
    .message-workbench,
    .activity-layout,
    .work-order-shell,
    .detail-grid,
    .module-detail-grid,
    .module-history-grid,
    .customer-history-grid,
    .calendar-shell,
    .user-create-layout,
    .public-card-split,
    .calendar-lower-grid,
    .login-card {
        grid-template-columns: 1fr;
    }

    .workflow-hero,
    .calendar-hero,
    .dashboard-command-head,
    .process-command-head,
    .process-topbar-main {
        grid-template-columns: 1fr;
    }

    .dashboard-command-head {
        display: grid;
    }

    .process-command-head {
        display: grid;
    }

    .dashboard-command-actions {
        justify-content: flex-start;
    }

    .process-command-actions {
        justify-content: flex-start;
    }

    .process-topbar-actions {
        justify-content: flex-start;
    }

    .dashboard-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-stat-strip,
    .process-metric-grid,
    .process-alert-strip,
    .work-order-command-facts,
    .planner-current-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workflow-panel-grid-planning {
        grid-template-columns: 1fr;
    }

    .workflow-panel-grid-planning > .workflow-subpanel:first-child {
        grid-column: auto;
    }

    .user-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .process-summary-card {
        position: static;
    }
}

@media (max-width: 960px) {
    .app-shell {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(336px, calc(100vw - 24px));
        height: 100dvh;
        margin: 0;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    body.nav-open .app-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-close,
    .mobile-nav-toggle {
        display: inline-flex;
    }

    .app-main {
        grid-column: 1;
        padding: 0 0 12px;
        gap: 12px;
    }

    .app-page {
        gap: 12px;
        padding: calc(var(--fd-toolbar-height) + 8px) 6px 0;
    }

    .workspace-content {
        gap: 12px;
    }

    .dashboard-command-board {
        padding: 16px;
        gap: 14px;
        border-radius: 18px;
    }

    .dashboard-stack {
        gap: 12px;
    }

    .dashboard-command-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .process-command-board {
        padding: 16px;
        gap: 14px;
        border-radius: 18px;
    }

    .process-filter-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .quote-stage-body,
    .quote-stage-body-pricing {
        grid-template-columns: 1fr;
    }

    .quote-builder-summary {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quote-builder-summary-list,
    .quote-builder-summary-note {
        grid-column: 1 / -1;
    }

    .quote-stage-head {
        align-items: flex-start;
    }

    .quote-stage-head-copy {
        min-width: 0;
    }

    .quote-stage-head-copy .muted {
        max-width: 60ch;
    }

    .quote-customer-picker-panel {
        max-height: min(58dvh, 460px);
        overflow: auto;
    }

    .quote-basics-grid,
    .quote-disclosure-grid,
    .quote-catalog-picker,
    .quote-line-item-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quote-line-item-field-wide {
        grid-column: 1 / -1;
    }

    .quote-grid-span-2 {
        grid-column: 1 / -1;
    }

    .quote-disclosure-summary {
        align-items: flex-start;
    }

    .quote-line-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quote-line-item-actions .button {
        width: 100%;
    }

    .process-filter-toolbar .button {
        width: 100%;
    }

    .process-side {
        position: static;
    }

    .planner-issue-actions,
    .member-picker,
    .work-order-command-facts,
    .planner-current-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-span-2 {
        grid-column: auto;
    }

    .dashboard-panel,
    .dashboard-priority-item,
    .dashboard-data-item,
    .dashboard-signal-item {
        gap: 10px;
    }

    .dashboard-panel-head,
    .dashboard-priority-item,
    .dashboard-data-item,
    .dashboard-signal-item {
        grid-template-columns: 1fr;
    }

    .dashboard-panel-head {
        display: grid;
    }

    .dashboard-panel-actions,
    .dashboard-item-meta {
        justify-items: start;
        justify-content: flex-start;
        text-align: left;
    }

    .process-filter-head,
    .process-side-head,
    .process-focus-meta,
    .process-table-meta {
        display: grid;
        justify-content: flex-start;
    }

    .dashboard-item-meta strong,
    .dashboard-item-meta .badge {
        justify-self: start;
    }

    header.app-toolbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .app-toolbar-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
        padding: 8px 10px;
    }

    .app-toolbar-left {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 8px;
        width: 100%;
        grid-column: 1 / span 2;
    }

    .app-toolbar-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        width: auto;
        min-width: 0;
    }

    .app-toolbar-account {
        position: relative;
        width: auto;
        min-width: 0;
    }

    .app-toolbar-account-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: min(296px, calc(100vw - 16px));
        margin-top: 0;
    }

    .app-toolbar-page {
        gap: 2px;
    }

    .app-toolbar-label {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    .app-toolbar-title-row {
        gap: 6px;
    }

    .app-toolbar-title-row h1 {
        font-size: 1.02rem;
        line-height: 1.06;
    }

    .app-toolbar-context-pill {
        min-height: 21px;
        padding: 0 7px;
        font-size: 0.66rem;
    }

    .app-toolbar-page p {
        display: none;
    }

    .message-search-form {
        grid-template-columns: 1fr;
    }

    .message-workbench {
        height: auto;
        max-height: none;
        min-height: 0;
    }

    .app-toolbar-icon-button,
    .app-toolbar-account-toggle,
    .app-toolbar-context-form select,
    .app-toolbar-context-form button {
        min-height: 36px;
    }

    .app-toolbar-actions {
        gap: 6px;
    }

    .app-messages-modal {
        display: none !important;
    }

    .app-toolbar-icon-button {
        width: 36px;
        min-width: 36px;
        border-radius: 10px;
    }

    .app-toolbar-account-toggle {
        width: auto;
        min-width: 40px;
        min-height: 36px;
        padding: 3px 6px 3px 3px;
        border-radius: 12px;
        grid-template-columns: auto auto;
        gap: 6px;
    }

    .app-toolbar-user-avatar {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 0.76rem;
    }

    .app-toolbar-user-copy {
        display: none;
    }

    .app-toolbar-account-menu {
        padding: 10px;
    }

    .app-search-modal {
        padding: 0;
        align-items: stretch;
    }

    .app-search-modal-panel {
        width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: 0;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    }

    .message-thread-head,
    .message-sidebar-head {
        flex-direction: column;
    }

    .message-bubble {
        max-width: 100%;
    }

    .overview-grid,
    .calendar-stat-strip,
    .dashboard-priority-grid,
    .settings-summary-grid,
    .settings-readiness-grid,
    .work-order-kpi-grid,
    .summary-panel-grid,
    .calendar-modal-grid,
    .calendar-day-summary,
    .user-mini-grid,
    .form-grid,
    .work-order-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .month-weekdays,
    .month-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .month-weekdays {
        display: none;
    }

    .table {
        display: block;
    }

    .table thead {
        display: none;
    }

    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        padding: 16px 18px;
        border-bottom: 1px solid var(--fd-line);
    }

    .table tr:last-child {
        border-bottom: 0;
    }

    .table td {
        padding: 8px 0;
        border-bottom: 0;
    }

    .table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--fd-muted);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .module-related-item,
    .customer-related-item,
    .calendar-agenda-item,
    .calendar-unplanned-item,
    .user-list-row,
    .activity-stream-item {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .module-related-meta,
    .customer-related-meta,
    .calendar-agenda-meta,
    .task-card-meta,
    .activity-stream-head-meta {
        justify-items: start;
        text-align: left;
    }

    .activity-stream-feed {
        max-height: none;
        overflow: visible;
    }

    .work-order-priority-grid,
    .work-order-priority-facts {
        grid-template-columns: 1fr;
    }

    .search-workbench-form {
        grid-template-columns: 1fr;
    }

    .row-action-menu-panel {
        position: static;
        min-width: 0;
        margin-top: 6px;
    }
}

@media (max-width: 640px) {
    body.quote-picker-open {
        overflow: hidden;
    }

    .quote-builder-form {
        gap: 14px;
        padding-bottom: 6px;
    }

    .quote-form-topline {
        gap: 10px;
    }

    .quote-form-topline .settings-summary-card {
        padding: 14px 15px;
        border-radius: 16px;
    }

    .quote-form-topline .settings-summary-card strong {
        font-size: 1rem;
    }

    .quote-stage-panel {
        border-radius: 18px;
    }

    .quote-stage-head-copy h3 {
        font-size: 1.34rem;
        line-height: 1.15;
    }

    .quote-stage-head-copy .muted,
    .quote-stage-panel .muted {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .quote-builder-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quote-builder-summary-card,
    .quote-builder-summary-list {
        border-radius: 16px;
    }

    .quote-builder-summary-card {
        padding: 14px;
    }

    .quote-builder-summary-card strong {
        font-size: 1.18rem;
    }

    .quote-builder-summary-note {
        display: none;
    }

    .quote-customer-picker-select[open] {
        z-index: 40;
    }

    .quote-customer-picker-panel {
        position: fixed;
        inset: calc(var(--app-sticky-offset, 82px) + 8px) 8px auto 8px;
        width: auto;
        max-height: calc(100dvh - var(--app-sticky-offset, 82px) - 18px);
        padding: 12px;
        border-radius: 18px;
        box-shadow: 0 24px 54px rgba(16, 42, 67, 0.24);
    }

    .quote-customer-picker-list {
        max-height: min(48dvh, 360px);
    }

    .quote-catalog-picker {
        padding: 12px;
        border-radius: 16px;
    }

    .quote-line-item {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .quote-line-item-ident strong {
        font-size: 0.95rem;
    }

    .quote-line-item-total {
        width: 100%;
        justify-content: center;
    }

    .quote-line-item-meta .button {
        width: 100%;
    }

    .quote-line-item-actions {
        gap: 8px;
    }

    .quote-line-item-actions p {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .quote-form-toolbar {
        position: static;
        padding: 6px 0 4px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .quote-form-toolbar .button,
    .quote-form-toolbar a.button {
        min-height: 46px;
    }

    .quote-transition-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-transition-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .quote-filter-meta {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .process-stat-strip,
    .process-metric-grid,
    .process-alert-strip,
    .process-filter-toolbar,
    .quote-basics-grid,
    .quote-disclosure-grid,
    .quote-catalog-picker,
    .quote-line-item-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-command-strip {
        grid-template-columns: 1fr;
    }

    .login-page {
        padding: 16px;
    }

    .workflow-hero,
    .calendar-hero,
    .card,
    .summary-panel,
    .table-card,
    .module-filter-card,
    .customer-filter-card,
    .calendar-filter-card,
    .focus-panel,
    .module-detail-card,
    .work-order-section,
    .work-order-side-card,
    .calendar-month-board,
    .calendar-focus-card,
    .calendar-side-card,
    .user-create-card,
    .user-rule-card,
    .activity-card,
    .task-card,
    .mobile-assignment-card,
    .upload-panel,
    .info-box,
    .empty-state,
    .public-form-card,
    .public-showcase,
    .modal-card {
        padding: 18px;
        border-radius: 18px;
    }

    .app-toolbar-row {
        gap: 8px;
        padding: 8px 10px;
    }

    .app-toolbar-left,
    .app-toolbar-right {
        gap: 8px;
    }

    .quote-line-item {
        padding: 14px;
        border-radius: 18px;
    }

    .quote-line-item-head,
    .quote-form-toolbar,
    .quote-line-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quote-disclosure-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-disclosure-grid .span-2,
    .quote-grid-span-2,
    .quote-grid-full {
        grid-column: 1 / -1;
    }

    .quote-disclosure-state,
    .quote-stage-head-hint {
        align-self: flex-start;
    }

    .info-hint-panel {
        width: min(280px, calc(100vw - 36px));
    }

    .quote-customer-picker-toggle,
    .quote-customer-option {
        grid-template-columns: 1fr;
    }

    .quote-customer-picker-type,
    .quote-customer-option-meta {
        justify-self: start;
        white-space: normal;
    }

    .quote-line-item-meta {
        justify-items: stretch;
        min-width: 0;
    }

    .quote-line-item-meta .button,
    .quote-form-toolbar .button,
    .quote-form-toolbar a.button {
        width: 100%;
    }

    .app-toolbar-right {
        align-items: center;
    }

    .app-toolbar-title-row h1 {
        font-size: 0.94rem;
    }

    .app-toolbar-label {
        font-size: 0.58rem;
    }

    .app-toolbar-page p {
        display: none;
    }

    .mobile-nav-toggle {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .mobile-nav-toggle span {
        width: 16px;
    }

    .app-toolbar-icon-button,
    .app-toolbar-account-toggle {
        min-height: 34px;
    }

    .app-toolbar-icon-button {
        width: 34px;
        min-width: 34px;
    }

    .app-search-modal {
        padding: 0;
    }

    .app-search-modal-panel {
        max-height: 100dvh;
        border-radius: 0;
        border: 0;
    }

    .app-search-modal-head {
        align-items: center;
    }

    .app-search-modal-copy h2 {
        font-size: 0.98rem;
    }

    .app-search-modal-copy p {
        display: none;
    }

    .app-search-modal-field input {
        min-height: 40px;
        font-size: 0.9rem;
    }

    .app-search-modal-results {
        min-height: 0;
        max-height: none;
    }

    .overview-grid,
    .calendar-stat-strip,
    .dashboard-priority-grid,
    .settings-summary-grid,
    .settings-readiness-grid,
    .work-order-kpi-grid,
    .summary-panel-grid,
    .calendar-modal-grid,
    .calendar-day-summary,
    .user-mini-grid,
    .form-grid,
    .work-order-form-grid,
    .execution-card-meta {
        grid-template-columns: 1fr;
    }

    .summary-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .message-sidebar-card,
    .message-thread-card {
        padding: 16px;
        border-radius: 18px;
    }

    .month-grid {
        grid-template-columns: 1fr;
    }

    .app-toast-region {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

@media (max-width: 960px) {
    body[data-current-path="/messages"] {
        overflow: hidden;
    }

    body[data-current-path="/messages"] .app-shell {
        min-height: 100dvh;
    }

    body[data-current-path="/messages"] .app-main {
        min-height: 100dvh;
        padding: 0;
        gap: 0;
    }

    body[data-current-path="/messages"] .app-page {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        gap: 0;
        padding-top: var(--fd-toolbar-height);
    }

    body[data-current-path="/messages"] .workspace-content {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        gap: 0;
    }

    body[data-current-path="/messages"] .app-toolbar {
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
    }

    body[data-current-path="/messages"] .app-toolbar-row {
        gap: 8px;
        padding: 8px 10px;
    }

    body[data-current-path="/messages"] .app-toolbar-page {
        gap: 1px;
    }

    body[data-current-path="/messages"] .app-toolbar-page p {
        display: none;
    }

    body[data-current-path="/messages"] .app-toolbar-title-row {
        gap: 6px;
    }

    body[data-current-path="/messages"] .app-toolbar-title-row h1 {
        font-size: 0.94rem;
    }

    body[data-current-path="/messages"] .app-toolbar-context-pill {
        min-height: 20px;
        padding: 0 7px;
        font-size: 0.64rem;
    }

    body[data-current-path="/messages"] .app-toolbar-left,
    body[data-current-path="/messages"] .app-toolbar-right {
        gap: 8px;
    }

    body[data-current-path="/messages"] .app-toolbar-actions {
        gap: 6px;
    }

    body[data-current-path="/messages"] .app-toolbar-icon-button,
    body[data-current-path="/messages"] .app-toolbar-account-toggle {
        min-height: 34px;
    }

    body[data-current-path="/messages"] .message-workbench {
        flex: 1 1 auto;
        min-height: 0;
        height: var(--message-workbench-height);
        max-height: var(--message-workbench-height);
        padding: 0;
        margin: 0;
    }

    .message-workbench {
        display: block;
        height: auto;
        max-height: none;
        min-height: 0;
    }

    .message-workbench.has-list-view .message-thread-card {
        display: none;
    }

    .message-workbench.has-active-conversation .message-sidebar-card {
        display: none;
    }

    .message-sidebar-card,
    .message-thread-card {
        gap: 10px;
        padding: 12px;
        border-radius: 18px;
        overflow: visible;
    }

    body[data-current-path="/messages"] .message-sidebar-card,
    body[data-current-path="/messages"] .message-thread-card {
        height: 100%;
        max-height: 100%;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        border-top: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .message-conversation-list,
    .message-thread-stream {
        gap: 8px;
        overflow: visible;
        padding-right: 0;
        scrollbar-gutter: auto;
    }

    body[data-current-path="/messages"] .message-conversation-list,
    body[data-current-path="/messages"] .message-thread-stream {
        min-height: 0;
        overflow: auto;
        padding-right: 0;
        padding-bottom: 8px;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto;
        overflow-anchor: none;
    }

    .message-conversation-item {
        gap: 9px;
        min-height: 74px;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .message-conversation-top {
        gap: 6px;
    }

    .message-conversation-top strong {
        font-size: 0.84rem;
    }

    .message-conversation-top time,
    .message-bubble-meta {
        font-size: 0.72rem;
    }

    .message-conversation-meta {
        flex-wrap: wrap;
        font-size: 0.74rem;
        white-space: normal;
        text-overflow: clip;
    }

    .message-conversation-main p {
        font-size: 0.76rem;
        line-height: 1.28;
    }

    .message-search-form {
        grid-template-columns: 1fr auto;
    }

    .message-search-form input,
    .message-search-form .button,
    .message-search-submit,
    .message-sidebar-controls-toggle,
    .message-sidebar-tools .button {
        min-height: 40px;
    }

    .message-filter-chip {
        min-height: 34px;
        font-size: 0.74rem;
    }

    .message-thread-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .message-mobile-back,
    .message-thread-mobile-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 12px;
        border: 1px solid var(--fd-line);
        border-radius: 999px;
        background: #ffffff;
        color: var(--fd-text-soft);
        font-size: 0.74rem;
        font-weight: 700;
    }

    .message-mobile-back:hover,
    .message-mobile-back:focus-visible,
    .message-thread-mobile-open:hover,
    .message-thread-mobile-open:focus-visible {
        outline: none;
        border-color: var(--fd-brand-border);
        background: var(--fd-brand-soft);
        color: var(--fd-brand-strong);
    }

    .message-thread-head {
        gap: 6px;
    }

    .message-thread-copy {
        gap: 3px;
    }

    .message-thread-copy p {
        max-width: none;
        font-size: 0.78rem;
        line-height: 1.28;
        -webkit-line-clamp: 1;
    }

    .message-thread-actions {
        display: none;
    }

    .message-thread-copy .eyebrow {
        font-size: 0.66rem;
    }

    .message-thread-facts {
        display: none;
    }

    .message-day-divider {
        margin: 4px 0 1px;
    }

    .message-day-divider span {
        min-height: 18px;
        padding: 0 8px;
        font-size: 0.62rem;
    }

    .message-bubble {
        max-width: 100%;
        gap: 6px;
        padding: 10px 11px;
        border-radius: 14px 14px 14px 8px;
    }

    .message-bubble-customer {
        border-radius: 14px 14px 8px 14px;
    }

    .message-bubble h3 {
        font-size: 0.84rem;
        line-height: 1.26;
    }

    .message-bubble p,
    .message-change-item span {
        font-size: 0.78rem;
        line-height: 1.34;
    }

    .message-inline-chip {
        min-height: 20px;
        padding: 0 7px;
        font-size: 0.68rem;
    }

    .message-bubble-actions a {
        font-size: 0.74rem;
    }

    .message-thread-empty {
        padding: 10px 12px;
    }
}

@media (max-width: 640px) {
    body[data-current-path="/messages"] .app-toolbar-row {
        padding: 6px 8px;
    }

    body[data-current-path="/messages"] .app-toolbar-title-row h1 {
        font-size: 0.9rem;
    }

    body[data-current-path="/messages"] .message-sidebar-card,
    body[data-current-path="/messages"] .message-thread-card {
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        border-radius: 0;
    }

    .message-sidebar-card,
    .message-thread-card {
        padding: 10px;
        border-radius: 16px;
    }

    .message-search-form {
        grid-template-columns: 1fr;
    }

    .message-search-form .button,
    .message-search-submit {
        width: 100%;
    }

    .message-sidebar-title-row {
        align-items: flex-start;
    }

    .message-sidebar-metrics {
        gap: 6px;
    }

    .message-mini-stat {
        min-height: 28px;
        padding: 0 9px;
    }

    .message-thread-mobile-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .message-mobile-back,
    .message-thread-mobile-open {
        width: 100%;
    }
}

.quote-response-page {
    min-height: 100vh;
    align-items: start;
    justify-items: center;
    padding: clamp(10px, 1.8vw, 18px);
    background:
        radial-gradient(circle at top left, rgba(31, 149, 255, 0.08), transparent 32%),
        linear-gradient(180deg, #edf3f7 0%, #f6fafb 100%);
}

.quote-response-shell {
    width: min(1080px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    padding: clamp(14px, 1.8vw, 20px);
    gap: 18px;
    align-items: start;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(194, 207, 215, 0.8);
    box-shadow: 0 12px 24px rgba(25, 48, 61, 0.06);
}

.quote-response-shell .login-brand {
    margin-bottom: 0;
}

.quote-response-shell .login-brand img {
    width: min(100%, 150px);
}

.quote-response-showcase,
.quote-response-panel {
    min-width: 0;
}

.quote-response-showcase {
    display: grid;
    gap: 14px;
    align-content: start;
}

.quote-response-header {
    display: grid;
    gap: 8px;
}

.quote-response-logo {
    display: flex;
    align-items: center;
}

.quote-response-brand-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.quote-response-customer {
    margin: 0;
    color: var(--fd-text-soft);
    font-size: 1.02rem;
    font-weight: 700;
}

.quote-response-shell .login-copy h1,
.quote-response-header h1 {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 3.3rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.quote-response-header p,
.quote-response-intro {
    max-width: 680px;
    margin: 0;
    color: var(--fd-text-soft);
    font-size: 0.98rem;
    line-height: 1.42;
}

.quote-response-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quote-response-note-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid rgba(203, 216, 224, 0.9);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(245, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.quote-response-note-item span {
    color: var(--fd-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quote-response-note-item strong {
    font-size: 0.92rem;
    color: var(--fd-text);
}

.quote-response-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.quote-response-metrics .public-summary-card {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 62px;
    padding: 9px 12px;
    border-radius: 13px;
}

.quote-response-metrics .public-summary-card dt {
    margin: 0;
    color: var(--fd-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quote-response-metrics .public-summary-card dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.24;
    text-align: right;
}

.quote-response-items {
    gap: 8px;
}

.quote-response-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.quote-response-section-head strong,
.quote-response-section-head span {
    color: var(--fd-text-soft);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quote-response-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(206, 217, 224, 0.92);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
}

.quote-response-item strong {
    display: block;
    font-size: 1.04rem;
}

.quote-response-item > span {
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--fd-text);
}

.quote-response-item-meta {
    margin-top: 5px;
    color: var(--fd-text-soft);
    font-size: 0.88rem;
    line-height: 1.34;
}

.quote-response-panel {
    position: sticky;
    top: 14px;
    gap: 10px;
}

.quote-response-panel .section-head-compact {
    margin-bottom: 0;
}

.quote-response-panel h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.1;
}

.quote-response-form label {
    display: grid;
    gap: 5px;
}

.quote-response-form label > span {
    color: var(--fd-text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.quote-response-form textarea {
    min-height: 118px;
    resize: vertical;
}

.quote-response-form textarea,
.quote-response-form textarea::placeholder {
    font-size: 0.96rem;
    line-height: 1.46;
}

.quote-response-help,
.quote-response-error {
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 0.84rem;
    line-height: 1.38;
}

.quote-response-inline-help {
    margin: -2px 0 0;
    color: var(--fd-text-soft);
    font-size: 0.82rem;
    line-height: 1.34;
}

.quote-response-help {
    border: 1px solid rgba(182, 214, 227, 0.92);
    background: rgba(238, 248, 252, 0.96);
    color: var(--fd-text-soft);
}

.quote-response-help strong {
    color: var(--fd-text);
}

.quote-response-error {
    border: 1px solid rgba(229, 115, 115, 0.45);
    background: rgba(255, 243, 242, 0.98);
    color: #991b1b;
}

.quote-response-form .is-invalid {
    border-color: rgba(220, 38, 38, 0.42);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.quote-response-actions {
    grid-template-columns: 1fr;
    gap: 8px;
}

.quote-response-actions .decision-card {
    gap: 0;
    padding: 11px 12px;
    border-radius: 14px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    text-align: left;
}

.quote-response-actions .decision-card:hover,
.quote-response-actions .decision-card:focus-visible {
    border-color: rgba(31, 116, 169, 0.34);
    box-shadow: 0 14px 24px rgba(24, 54, 71, 0.08);
    transform: translateY(-1px);
}

.quote-response-actions .decision-card small {
    color: var(--fd-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quote-response-actions .decision-card strong {
    font-size: 1rem;
    line-height: 1.18;
}

.quote-response-actions .decision-card span {
    display: none;
}

.quote-response-actions .decision-card-primary {
    border-color: rgba(33, 129, 184, 0.28);
    background: linear-gradient(135deg, rgba(232, 246, 252, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.quote-response-page .app-notice-stack {
    margin: 0;
}

@media (max-width: 1200px) {
    .quote-response-shell {
        grid-template-columns: 1fr;
        width: min(760px, 100%);
    }

    .quote-response-panel {
        position: static;
    }

    .quote-response-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .quote-response-page {
        padding: 6px;
    }

    .quote-response-shell {
        width: 100%;
        padding: 12px;
        gap: 10px;
        border-radius: 16px;
    }

    .quote-response-shell .login-brand img {
        width: min(100%, 108px);
    }

    .quote-response-shell .login-copy h1,
    .quote-response-header h1 {
        font-size: clamp(1.9rem, 9vw, 2.5rem);
        white-space: normal;
    }

    .quote-response-header p,
    .quote-response-customer {
        font-size: 0.92rem;
    }

    .quote-response-metrics {
        grid-template-columns: 1fr;
    }

    .quote-response-note {
        gap: 5px;
    }

    .quote-response-note-item {
        width: 100%;
        justify-content: space-between;
        padding: 7px 10px;
    }

    .quote-response-actions {
        grid-template-columns: 1fr;
    }

    .quote-response-item {
        flex-direction: column;
    }

    .quote-response-item > span {
        white-space: normal;
    }

    .quote-response-form textarea {
        min-height: 96px;
    }

    .quote-response-metrics .public-summary-card dd,
    .quote-response-item strong,
    .quote-response-actions .decision-card strong {
        font-size: 0.96rem;
    }

    .quote-response-item-meta,
    .quote-response-inline-help,
    .quote-response-form label > span {
        font-size: 0.84rem;
    }
}
