:root {
    --bg: #f4efe6;
    --bg-strong: linear-gradient(145deg, #f6d8a7 0%, #f4efe6 42%, #d6e4dc 100%);
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: #fffdf8;
    --line: rgba(64, 54, 41, 0.14);
    --text: #2b241d;
    --muted: #6f6458;
    --brand: #9c5a22;
    --brand-strong: #7c4315;
    --accent: #235f56;
    --success: #d8efe3;
    --success-text: #1f5f44;
    --error: #f9dfd6;
    --error-text: #8b3d2c;
    --shadow: 0 20px 60px rgba(52, 41, 24, 0.12);
    --radius: 22px;
    --app-shell-padding: 0;
    --app-shell-gap: 1.5rem;
    --sidebar-width: 250px;
}

.soe-sheet-form,
.soe-sheet {
    display: grid;
    gap: 0.9rem;
}

.soe-sheet-form {
    grid-template-columns: minmax(0, 1fr);
}

.soe-sheet {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(35, 95, 86, 0.14);
    border-radius: 8px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 16px 42px rgba(41, 33, 20, 0.08);
}

.soe-sheet::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: #235f56;
}

.soe-cost-panel::before {
    background: #2f5ca8;
}

.soe-equipment-panel::before {
    background: #9c5a22;
}

.soe-labor-panel::before {
    background: #6b7c38;
}

.soe-sheet-head,
.soe-sheet-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.soe-sheet-head {
    flex-wrap: wrap;
    padding-top: 0.15rem;
}

.soe-sheet-head > div:first-child {
    min-width: min(26rem, 100%);
}

.soe-sheet-head h2 {
    margin: 0;
    color: #1f2933;
    font-size: 1.1rem;
    line-height: 1.25;
}

.soe-sheet-total {
    min-width: 10rem;
    margin-left: auto;
    padding: 0.62rem 0.75rem;
    border: 1px solid rgba(35, 95, 86, 0.16);
    border-radius: 8px;
    background: #f5faf7;
    display: grid;
    gap: 0.2rem;
}

.soe-sheet-total span {
    color: #6f6458;
    font-size: 0.76rem;
}

.soe-sheet-total strong {
    color: #235f56;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.soe-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(31, 41, 55, 0.1);
    border-radius: 8px;
    background: #ffffff;
}

.soe-grid-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    font-size: 0.81rem;
}

.soe-grid-table th,
.soe-grid-table td {
    border: 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    padding: 0.52rem 0.62rem;
    color: #182230;
    vertical-align: middle;
    white-space: nowrap;
}

.soe-grid-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5f8;
    color: #405a76;
    font-weight: 700;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.soe-grid-table tbody tr:nth-child(even) td {
    background: #fbfcfd;
}

.soe-grid-table tbody tr:hover td {
    background: #f4f8fb;
}

.soe-grid-table .is-number,
.soe-readonly-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.soe-readonly-cell {
    color: #344054;
    background: #f3f7f9;
    font-weight: 650;
}

.soe-section-row td,
.soe-section-row th {
    background: #dcebf8;
    color: #17324f;
    font-weight: 700;
    border-bottom-color: rgba(47, 92, 168, 0.18);
}

.soe-section-row td:first-child,
.soe-section-row th:first-child {
    color: #2f5ca8;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.soe-editable-cell,
.soe-input-table td:has(.soe-cell-input) {
    background: #fff7c7;
    box-shadow: inset 0 0 0 1px rgba(172, 118, 12, 0.14);
}

.soe-cell-input {
    width: 100%;
    min-width: 5.5rem;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.58);
    color: #111827;
    font: inherit;
    line-height: 1.2;
    padding: 0.28rem 0.45rem;
    font-variant-numeric: tabular-nums;
}

.soe-cell-input:focus {
    outline: 0;
    border-color: #2f5ca8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(47, 92, 168, 0.14);
}

.soe-cell-input[readonly] {
    color: #475569;
    background: transparent;
    cursor: default;
}

.soe-equipment-wrap {
    max-width: none;
}

.soe-equipment-table {
    min-width: 940px;
}

.soe-input-panel .soe-grid-table {
    min-width: 980px;
}

.soe-input-panel .soe-grid-table th:nth-child(3),
.soe-input-panel .soe-grid-table th:nth-child(5),
.soe-input-panel .soe-grid-table th:nth-child(7),
.soe-input-panel .soe-grid-table th:nth-child(8) {
    text-align: right;
}

.soe-input-panel .soe-grid-table td:nth-child(7),
.soe-input-panel .soe-grid-table td:nth-child(8) {
    background: #eef6f3;
}

.soe-pile-editor-list {
    display: grid;
    gap: 0.85rem;
}

.soe-pile-editor {
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(35, 95, 86, 0.14);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(245, 250, 247, 0.86), rgba(255, 255, 255, 0.96));
}

.soe-pile-editor-head,
.soe-pile-fields,
.soe-pile-calculated {
    display: grid;
    gap: 0.7rem;
}

.soe-pile-editor-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
}

.soe-pile-editor-head span,
.soe-pile-fields span,
.soe-pile-calculated span,
.soe-pile-editor-total span {
    color: #6f6458;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.soe-pile-editor-head strong {
    display: block;
    margin-top: 0.18rem;
    color: #1f2933;
    font-size: 0.98rem;
}

.soe-pile-editor-total {
    min-width: 9.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(47, 92, 168, 0.12);
    text-align: right;
}

.soe-pile-editor-total strong {
    color: #2f5ca8;
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
}

.soe-pile-fields {
    grid-template-columns: repeat(6, minmax(6.5rem, 1fr));
}

.soe-pile-fields label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 0.58rem;
    border-radius: 8px;
    background: #fff7c7;
    box-shadow: inset 0 0 0 1px rgba(172, 118, 12, 0.14);
}

.soe-pile-fields .soe-cell-input {
    min-width: 0;
    background: #ffffff;
}

.soe-pile-calculated {
    grid-template-columns: repeat(4, minmax(8rem, 1fr));
}

.soe-pile-calculated div {
    min-width: 0;
    padding: 0.62rem 0.7rem;
    border-radius: 8px;
    background: #eef6f3;
    border: 1px solid rgba(35, 95, 86, 0.12);
}

.soe-pile-calculated strong {
    display: block;
    margin-top: 0.18rem;
    color: #235f56;
    font-size: 0.94rem;
    font-variant-numeric: tabular-nums;
}

.soe-sheet .button {
    border-radius: 999px;
}

@media (max-width: 760px) {
    .soe-sheet-head,
    .soe-sheet-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .soe-sheet-total {
        width: 100%;
        margin-left: 0;
    }

    .soe-pile-editor-head,
    .soe-pile-fields,
    .soe-pile-calculated {
        grid-template-columns: 1fr;
    }

    .soe-pile-editor-total {
        width: 100%;
        text-align: left;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI Variable", "Trebuchet MS", sans-serif;
    color: var(--text);
    background: var(--bg-strong);
    min-height: 100vh;
}

body.app-page:has(.foundation-shell) {
    background:
        radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96) 42%, #0f172a 100%);
}

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

h1, h2, h3, p {
    margin-top: 0;
}

.auth-page,
.app-page {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    gap: clamp(1.25rem, 2.4vw, 2.5rem);
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        linear-gradient(rgba(44, 65, 76, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 65, 76, 0.05) 1px, transparent 1px),
        linear-gradient(145deg, #f8f5ee 0%, #eef3ef 54%, #f6efe4 100%);
    background-size: 36px 36px, 36px 36px, auto;
}

.auth-brand,
.auth-panel,
.sidebar,
.card,
.topbar {
    backdrop-filter: blur(10px);
}

.auth-brand,
.auth-panel,
.sidebar,
.content {
    border-radius: calc(var(--radius) + 2px);
}

.auth-brand {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(239, 244, 240, 0.82)),
        linear-gradient(90deg, rgba(42, 66, 74, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(42, 66, 74, 0.08) 1px, transparent 1px);
    background-size: auto, 28px 28px, 28px 28px;
    border: 1px solid rgba(49, 66, 68, 0.12);
    padding: clamp(1.35rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    min-height: 320px;
    box-shadow: 0 24px 70px rgba(45, 55, 49, 0.1);
}

.auth-brand h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 4.5vw, 4.8rem);
    line-height: 0.98;
    max-width: 11ch;
    margin-bottom: 1rem;
    color: #283431;
}

.auth-panel {
    display: grid;
    align-content: center;
    padding: clamp(0.2rem, 2vw, 1.5rem);
}

.auth-brand .eyebrow {
    color: #6d756d;
    letter-spacing: 0;
}

.auth-brand .lede {
    max-width: 560px;
    color: #5f6861;
    font-size: 1.02rem;
    line-height: 1.65;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
}

.auth-brand-metrics {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.auth-brand-metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(49, 66, 68, 0.11);
    color: #394642;
    font-size: 0.82rem;
    font-weight: 700;
}

.architecture-visual {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    aspect-ratio: 1.55 / 1;
    align-self: flex-end;
    border-radius: 18px;
    border: 1px solid rgba(48, 66, 70, 0.12);
    background:
        linear-gradient(90deg, rgba(44, 67, 74, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(44, 67, 74, 0.08) 1px, transparent 1px),
        rgba(255, 255, 255, 0.56);
    background-size: 24px 24px, 24px 24px, auto;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.34);
}

.floorplan {
    position: absolute;
    inset: 12%;
    border: 2px solid rgba(44, 58, 58, 0.68);
}

.floorplan-line,
.floorplan-room,
.floorplan-core {
    position: absolute;
    display: block;
}

.floorplan-line {
    background: rgba(44, 58, 58, 0.72);
}

.floorplan-line.line-a {
    left: 34%;
    top: 0;
    bottom: 38%;
    width: 2px;
}

.floorplan-line.line-b {
    left: 0;
    right: 18%;
    top: 48%;
    height: 2px;
}

.floorplan-line.line-c {
    right: 28%;
    top: 48%;
    bottom: 0;
    width: 2px;
}

.floorplan-room {
    border: 2px solid rgba(44, 58, 58, 0.42);
    background: rgba(35, 95, 86, 0.06);
}

.floorplan-room.room-a {
    left: 7%;
    top: 10%;
    width: 18%;
    height: 24%;
}

.floorplan-room.room-b {
    right: 8%;
    top: 12%;
    width: 32%;
    height: 26%;
}

.floorplan-room.room-c {
    left: 44%;
    bottom: 10%;
    width: 17%;
    height: 26%;
}

.floorplan-core {
    right: 8%;
    bottom: 8%;
    width: 15%;
    height: 19%;
    border-radius: 999px 999px 0 0;
    border: 2px solid rgba(156, 90, 34, 0.62);
    border-bottom: 0;
}

.app-shell {
    display: block;
    padding: var(--app-shell-padding);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at top left, rgba(191, 123, 53, 0.18), transparent 28%),
        linear-gradient(180deg, #1a1d20 0%, #231f1a 55%, #2d241c 100%);
    color: #f8f2e8;
    padding: 0;
    box-shadow: 24px 0 48px rgba(30, 24, 17, 0.22);
}

.sidebar::before,
.sidebar::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(6px);
}

.sidebar::before {
    top: -2rem;
    right: -2rem;
    width: 8rem;
    height: 8rem;
    background: radial-gradient(circle, rgba(214, 164, 106, 0.18), transparent 68%);
}

.sidebar::after {
    bottom: -4rem;
    left: -3rem;
    width: 10rem;
    height: 10rem;
    background: radial-gradient(circle, rgba(99, 196, 173, 0.1), transparent 70%);
}

.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: calc(var(--sidebar-width) + var(--app-shell-gap));
    min-width: 0;
    padding: 1.25rem 1.25rem 2rem 0;
}

body.app-page:has(.foundation-shell) .content {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 36%),
        radial-gradient(circle at 20% 8%, rgba(14, 165, 233, 0.16), transparent 34%),
        radial-gradient(circle at 82% 0%, rgba(245, 158, 11, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.88) 52%, rgba(15, 23, 42, 0.96));
}

.page-body {
    flex: 1;
}

body.app-page:has(.foundation-shell) .page-body {
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 28px 70px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(12px);
}

body.app-page:has(.foundation-shell) .app-signature {
    color: rgba(226, 232, 240, 0.72);
}

.topbar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 84% 18%, rgba(245, 158, 11, 0.2), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    box-shadow:
        0 24px 58px rgba(15, 23, 42, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 46%),
        radial-gradient(circle at 12% 100%, rgba(14, 165, 233, 0.16), transparent 34%);
    pointer-events: none;
}

.topbar h1 {
    color: #ffffff;
    font-size: clamp(1.7rem, 2vw, 2.1rem);
    line-height: 1.05;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.24);
}

.topbar-title-stack {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.topbar-project-context {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    color: rgba(226, 232, 240, 0.84);
    font-size: 0.92rem;
    line-height: 1.2;
}

.topbar-project-context span {
    padding: 0.18rem 0.45rem;
    border: 1px solid rgba(125, 211, 252, 0.24);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.13);
    color: #bae6fd;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.topbar-project-context strong {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.topbar-project-context em {
    color: rgba(226, 232, 240, 0.74);
    font-style: normal;
    font-weight: 700;
}

.topbar .user-chip {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.topbar .user-chip strong {
    color: #ffffff;
}

.topbar .user-chip span {
    color: rgba(226, 232, 240, 0.78);
}

.topbar .button-ghost {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.topbar .button-ghost:hover,
.topbar .button-ghost:focus-visible {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.14);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.brand-block h2,
.topbar h1,
.card h2 {
    margin-bottom: 0.35rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.sidebar .eyebrow,
.sidebar .nav-title,
.sidebar .submenu-title {
    color: rgba(236, 221, 198, 0.72);
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-brand {
    position: relative;
    z-index: 1;
    padding: 1rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(255, 227, 191, 0.12);
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-mark,
.sidebar-brand-logo-wrap {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(73, 53, 34, 0.95), rgba(34, 27, 21, 0.96));
    border: 2px solid rgba(191, 123, 53, 0.86);
    box-shadow: inset 0 0 0 1px rgba(255, 225, 183, 0.3);
}

.sidebar-brand-mark-icon {
    color: #ffd9b0;
}

.sidebar-brand-mark-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-brand-logo-wrap {
    overflow: hidden;
    background: #ffffff;
    border-color: rgba(191, 123, 53, 0.72);
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.sidebar-brand-copy {
    min-width: 0;
    flex: 1;
}

.sidebar-brand-copy strong {
    display: block;
    color: #fff2df;
    font-size: 0.98rem;
    font-weight: 700;
}

.sidebar-brand-copy small {
    display: block;
    margin-top: 0.2rem;
    color: rgba(229, 211, 187, 0.74);
    font-size: 0.76rem;
}

.sidebar-brand-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 0.18rem;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: rgba(232, 215, 191, 0.72);
}

.sidebar-brand-toggle span {
    display: block;
    width: 8px;
    height: 8px;
    border-top: 1.6px solid currentColor;
    border-left: 1.6px solid currentColor;
    transform: rotate(-45deg);
}

.sidebar-nav {
    position: relative;
    z-index: 1;
    padding: 1rem 0.8rem 1.2rem;
}

.sidebar-section-label {
    margin: 1rem 0 0.55rem 0.35rem;
    color: rgba(224, 204, 177, 0.46);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.sidebar-nav > .sidebar-section-label:first-child {
    margin-top: 0;
}

.submenu-block,
.sidebar-admin-group,
.submenu-group {
    margin-top: 1rem;
}

.submenu-block,
.sidebar-admin-group {
    padding: 0;
    border: 0;
    background: transparent;
}

.nav-link,
.submenu-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    margin-bottom: 0.28rem;
    color: rgba(247, 238, 226, 0.9);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid transparent;
}

button.nav-link {
    width: 100%;
    appearance: none;
    text-align: left;
    background-color: transparent;
    cursor: pointer;
    font: inherit;
}

.nav-link:hover,
.submenu-link:hover,
.nav-link.active,
.submenu-link.active {
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover,
.submenu-link:hover {
    border-color: rgba(255, 219, 175, 0.08);
}

.nav-link.active {
    background: linear-gradient(180deg, rgba(76, 56, 37, 0.96), rgba(52, 39, 27, 0.96));
    border-color: rgba(191, 123, 53, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.submenu-link.active {
    background: rgba(73, 54, 36, 0.78);
    border-color: rgba(191, 123, 53, 0.16);
}

.nav-link-icon,
.submenu-link-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: rgba(191, 123, 53, 0.12);
    color: #ffd0a3;
}

.nav-link.active .nav-link-icon {
    background: rgba(191, 123, 53, 0.2);
    color: #ffe4c6;
}

.nav-link-copy {
    min-width: 0;
}

.nav-link-copy strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
}

.nav-children {
    display: grid;
    gap: 0.22rem;
    margin: -0.05rem 0 0.55rem 2.35rem;
    padding-left: 0.55rem;
    border-left: 1px solid rgba(255, 219, 175, 0.12);
}

.nav-children[hidden] {
    display: none !important;
}

.nav-link-arrow {
    display: none;
}

.nav-link-arrow::after {
    content: "\203A";
    font-size: 1.2rem;
    line-height: 1;
}

.nav-link-toggle .nav-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(231, 216, 196, 0.72);
    font-size: 0;
    line-height: 1;
    transition: transform 0.18s ease, color 0.18s ease;
}

.nav-link-toggle[aria-expanded="true"] .nav-link-arrow {
    transform: rotate(90deg);
    color: rgba(255, 228, 198, 0.92);
}

.nav-link-toggle:hover .nav-link-arrow {
    color: rgba(255, 228, 198, 0.88);
}

.submenu-title {
    margin: 0.2rem 0 0.45rem 0.35rem;
    color: rgba(222, 205, 181, 0.48);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.submenu-group + .submenu-group {
    margin-top: 0.9rem;
}

.submenu-link {
    grid-template-columns: auto minmax(0, 1fr);
    color: rgba(231, 216, 196, 0.78);
    padding: 0.62rem 0.7rem;
    font-size: 0.88rem;
}

.submenu-link-icon {
    width: 1.7rem;
    height: 1.7rem;
    color: rgba(255, 208, 163, 0.82);
}

.nav-child-link {
    margin-bottom: 0;
    padding: 0.5rem 0.6rem;
    font-size: 0.84rem;
}

.nav-child-link .submenu-link-icon {
    width: 1.4rem;
    height: 1.4rem;
    background: transparent;
}

.alert {
    padding: 1rem 1.15rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--success);
    color: var(--success-text);
    border-color: rgba(31, 95, 68, 0.15);
}

.alert-error {
    background: var(--error);
    color: var(--error-text);
    border-color: rgba(139, 61, 44, 0.16);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.narrow-card {
    max-width: 520px;
    margin-inline: auto;
}

.login-card {
    width: min(100%, 460px);
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 244, 0.94)),
        linear-gradient(90deg, rgba(42, 66, 74, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(42, 66, 74, 0.05) 1px, transparent 1px);
    background-size: auto, 24px 24px, 24px 24px;
    border-color: rgba(49, 66, 68, 0.12);
    box-shadow: 0 28px 68px rgba(43, 50, 46, 0.14);
}

.login-card-head {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.login-card-head .eyebrow {
    margin-bottom: 0;
    color: #6d756d;
    letter-spacing: 0;
}

.login-card-head h2 {
    margin-bottom: 0;
    color: #283431;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.login-card-head p:last-child {
    max-width: 34rem;
    margin-bottom: 0;
    color: #667068;
    line-height: 1.55;
}

.login-mark {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 0.4rem;
    border-radius: 16px;
    background: #2d3c39;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.login-mark::before,
.login-mark::after,
.login-mark span {
    content: "";
    position: absolute;
    background: #f5eadb;
}

.login-mark::before {
    left: 13px;
    right: 13px;
    top: 13px;
    height: 2px;
}

.login-mark::after {
    left: 13px;
    top: 13px;
    bottom: 13px;
    width: 2px;
}

.login-mark span:first-child {
    right: 13px;
    top: 13px;
    bottom: 22px;
    width: 2px;
}

.login-mark span:last-child {
    left: 13px;
    right: 22px;
    bottom: 13px;
    height: 2px;
    background: #c78747;
}

.login-system-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
    margin-bottom: 1.15rem;
}

.login-system-meta .info-row {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem;
    border-radius: 16px;
    background: rgba(244, 247, 244, 0.82);
    border-color: rgba(49, 66, 68, 0.1);
}

.login-system-meta .info-row span {
    color: #6c746e;
    font-size: 0.78rem;
}

.login-system-meta .info-row strong {
    color: #2d3c39;
    font-size: 0.92rem;
}

.login-card label span {
    color: #56625c;
}

.login-card input {
    border-radius: 14px;
    border-color: rgba(49, 66, 68, 0.16);
    background: rgba(255, 255, 255, 0.92);
}

.login-card input:focus {
    outline: 3px solid rgba(35, 95, 86, 0.14);
    border-color: rgba(35, 95, 86, 0.42);
}

.login-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 0.15rem;
    border-radius: 14px;
    background: #2d3c39;
}

.login-submit:hover {
    background: #1f2d2a;
}

.login-footnote {
    margin: 1rem 0 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
    margin-top: 1rem;
}

.split-layout.wide-right {
    grid-template-columns: 1fr 1fr;
}

.grid-cards {
    display: grid;
    gap: 1rem;
}

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

.stat-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(247, 240, 228, 0.85));
}

.quantity-spotlight {
    background: linear-gradient(155deg, rgba(231, 239, 255, 0.96), rgba(210, 225, 255, 0.86));
    border-color: rgba(58, 88, 155, 0.18);
}

.cost-spotlight {
    background: linear-gradient(155deg, rgba(255, 244, 225, 0.98), rgba(247, 214, 167, 0.88));
    border-color: rgba(156, 90, 34, 0.2);
}

.price-spotlight {
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.98), rgba(192, 231, 213, 0.9));
    border-color: rgba(35, 95, 86, 0.22);
}

.stat-label {
    color: var(--muted);
    display: block;
    margin-bottom: 0.65rem;
}

.stat-value {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    color: var(--brand-strong);
}

.stat-value.small {
    font-size: 1.3rem;
}

.quantity-spotlight .stat-value {
    color: #3558a2;
}

.cost-spotlight .stat-value {
    color: var(--brand-strong);
}

.price-spotlight .stat-value {
    color: var(--accent);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.app-signature {
    margin-top: 1rem;
    padding: 0.35rem 0.45rem 0;
    text-align: right;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.app-signature strong {
    color: var(--brand-strong);
}

.user-chip {
    background: rgba(156, 90, 34, 0.1);
    border: 1px solid rgba(156, 90, 34, 0.16);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-chip span {
    font-size: 0.72rem;
    color: var(--muted);
}

.button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fffaf3;
    padding: 0.8rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.button:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

.button-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.75);
}

.button-danger {
    background: #b8472a;
}

.button-danger:hover {
    background: #94361d;
}

.button-success {
    background: #2d6a4f;
}

.button-success:hover {
    background: #1b4332;
}

.button-outline-success {
    background: transparent;
    color: #2d6a4f;
    border: 1px solid rgba(45, 106, 79, 0.32);
}

.button-outline-success:hover {
    background: rgba(45, 106, 79, 0.1);
}

.back-to-top-button {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fffaf3;
    box-shadow: 0 18px 36px rgba(124, 67, 21, 0.28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(1rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top-button.is-visible:hover {
    box-shadow: 0 22px 42px rgba(124, 67, 21, 0.34);
    transform: translateY(-2px);
}

.back-to-top-button:focus-visible {
    outline: 3px solid rgba(35, 95, 86, 0.28);
    outline-offset: 3px;
}

.back-to-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1rem;
    line-height: 1;
}

.form-stack {
    display: grid;
    gap: 0.95rem;
}

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

.four-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

label span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.field-help {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
}

input[readonly][data-auto-quantity-input] {
    background: linear-gradient(155deg, rgba(231, 239, 255, 0.94), rgba(210, 225, 255, 0.84));
    border-color: rgba(53, 88, 162, 0.18);
    color: #3558a2;
    font-weight: 800;
}

textarea {
    resize: vertical;
}

.project-list,
.sheet-card-grid,
.module-grid,
.module-tabs,
.menu-preview {
    display: grid;
    gap: 0.8rem;
}

.project-card,
.module-card,
.sheet-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.project-card:hover,
.module-card:hover,
.sheet-card:hover {
    transform: translateY(-2px);
    border-color: rgba(35, 95, 86, 0.28);
}

.project-card p,
.sheet-card p,
.muted-line,
.brand-block p,
.empty-state p,
.lede {
    color: var(--muted);
}

.project-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.module-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-card {
    flex-direction: column;
    align-items: flex-start;
}

.project-hero-card,
.project-module-nav-card {
    position: relative;
    overflow: hidden;
}

.project-hero-card::before,
.project-module-nav-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.project-hero-card {
    border-color: rgba(37, 58, 86, 0.16);
    background:
        linear-gradient(135deg, rgba(16, 24, 38, 0.98), rgba(20, 32, 48, 0.96)),
        radial-gradient(circle at top right, rgba(87, 170, 223, 0.14), transparent 35%);
    color: #f5f7fb;
    box-shadow: 0 30px 64px rgba(15, 25, 40, 0.24);
}

.project-hero-card::before {
    background:
        linear-gradient(90deg, rgba(150, 180, 220, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(150, 180, 220, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.42;
}

.project-hero-card > * {
    position: relative;
    z-index: 1;
}

.project-hero-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1.3rem;
    align-items: stretch;
}

.project-hero-visual {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    border-radius: 24px;
    border: 1px solid rgba(182, 204, 230, 0.18);
    background:
        linear-gradient(160deg, rgba(34, 49, 72, 0.94), rgba(17, 27, 43, 0.96)),
        radial-gradient(circle at top right, rgba(255, 200, 140, 0.08), transparent 34%);
}

.project-hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.04);
}

.project-hero-visual.is-empty {
    display: grid;
    place-items: center;
}

.project-hero-visual-fallback {
    display: grid;
    gap: 0.55rem;
    justify-items: center;
    text-align: center;
    color: rgba(241, 246, 255, 0.88);
}

.project-hero-visual-fallback strong {
    display: inline-grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 24px;
    border: 1px solid rgba(196, 217, 242, 0.22);
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.9rem;
    letter-spacing: 0.08em;
}

.project-hero-visual-badges {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.project-hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(202, 219, 239, 0.18);
    background: rgba(10, 16, 26, 0.55);
    color: #f2f7ff;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.project-hero-badge.phase {
    background: rgba(53, 88, 162, 0.24);
}

.project-hero-badge.status-bidding {
    background: rgba(53, 88, 162, 0.24);
}

.project-hero-badge.status-active {
    background: rgba(35, 95, 86, 0.28);
}

.project-hero-badge.status-completed {
    background: rgba(45, 106, 79, 0.28);
}

.project-hero-badge.status-on-hold {
    background: rgba(156, 90, 34, 0.28);
}

.project-hero-badge.status-draft,
.project-hero-badge.status-review {
    background: rgba(124, 95, 63, 0.28);
}

.project-hero-copy {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.project-hero-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-hero-head .eyebrow {
    color: rgba(192, 211, 235, 0.74);
}

.project-hero-head h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.04;
    color: #ffffff;
}

.project-hero-address,
.project-hero-scope {
    margin: 0;
}

.project-hero-address {
    font-size: 1rem;
    color: rgba(232, 239, 249, 0.88);
}

.project-hero-scope {
    margin-top: 0.45rem;
    max-width: 860px;
    color: rgba(192, 205, 223, 0.78);
    line-height: 1.55;
}

.project-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: flex-end;
}

.project-hero-actions .button-ghost {
    border-color: rgba(190, 210, 232, 0.2);
    color: #edf5ff;
}

.project-hero-actions .button-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.project-blueprint-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(182, 204, 230, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(232, 239, 249, 0.86);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.project-hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.project-hero-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.project-hero-fact {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(182, 204, 230, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.project-hero-fact span {
    color: rgba(192, 205, 223, 0.72);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.project-hero-fact strong {
    color: #f7fbff;
    font-size: 0.95rem;
    line-height: 1.3;
}

.project-dashboard-metrics {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.project-edit-screen {
    display: grid;
    gap: 1rem;
}

.project-edit-screen > .card {
    width: 100%;
    max-width: 1120px;
}

.project-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.project-kpi-card,
.project-secondary-card {
    position: relative;
    overflow: hidden;
}

.project-kpi-card {
    min-height: 148px;
    display: grid;
    gap: 0.45rem;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 236, 0.94));
}

.project-kpi-card::before,
.project-secondary-card::before {
    content: "";
    position: absolute;
    inset: auto 1rem 0.85rem auto;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    opacity: 0.16;
    background: currentColor;
}

.project-kpi-card.tone-price {
    color: var(--accent);
}

.project-kpi-card.tone-cost {
    color: var(--brand-strong);
}

.project-kpi-card.tone-quantity {
    color: #3558a2;
}

.project-kpi-label,
.project-secondary-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.project-kpi-value {
    font-size: clamp(1.7rem, 2.5vw, 2.4rem);
    line-height: 1.05;
}

.project-kpi-caption {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.project-secondary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.project-secondary-card {
    min-height: 94px;
    display: grid;
    gap: 0.3rem;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 246, 240, 0.92));
}

.project-secondary-card::before {
    width: 32px;
    height: 32px;
    bottom: 0.9rem;
    right: 0.9rem;
}

.project-secondary-card.tone-price {
    color: var(--accent);
}

.project-secondary-card.tone-cost {
    color: var(--brand-strong);
}

.project-secondary-card.tone-quantity {
    color: #3558a2;
}

.project-secondary-card.tone-neutral {
    color: #4a5b74;
}

.project-secondary-value {
    font-size: 1.3rem;
    line-height: 1.08;
}

.project-module-nav-card {
    border-color: rgba(35, 95, 86, 0.2);
    background:
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(249, 253, 251, 0.99), rgba(238, 247, 244, 0.96));
    box-shadow: 0 30px 62px rgba(33, 51, 82, 0.12);
}

.project-module-nav-card::after {
    background:
        linear-gradient(90deg, rgba(35, 95, 86, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(35, 95, 86, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 92%);
    opacity: 0.38;
}

.project-module-nav-card > * {
    position: relative;
    z-index: 1;
}

.project-module-toggle summary {
    list-style: none;
}

.project-module-toggle summary::-webkit-details-marker {
    display: none;
}

.project-module-nav-head {
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 0;
}

.project-module-toggle-summary {
    cursor: pointer;
    margin-bottom: 0;
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(35, 95, 86, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(235, 246, 242, 0.94));
    box-shadow:
        0 16px 32px rgba(33, 51, 82, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.project-module-toggle-summary:hover,
.project-module-toggle-summary:focus-visible {
    border-color: rgba(35, 95, 86, 0.28);
    box-shadow:
        0 22px 42px rgba(33, 51, 82, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    outline: 0;
}

.project-module-toggle-body {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(35, 95, 86, 0.1);
}

.project-module-toggle-toolbar {
    display: flex;
    justify-content: flex-end;
}

.project-module-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 0.95rem;
    border: 1px solid rgba(35, 95, 86, 0.28);
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6b5e, #2f8f7b);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 12px 24px rgba(31, 107, 94, 0.2);
}

.project-module-toggle-label::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
}

.project-module-toggle-label .is-collapse {
    display: none;
}

.project-module-toggle[open] .project-module-toggle-label {
    background: linear-gradient(135deg, #8a4f17, #c26d1d);
    border-color: rgba(194, 109, 29, 0.34);
}

.project-module-toggle[open] .project-module-toggle-label::after {
    transform: rotate(-135deg) translateX(-1px);
}

.project-module-toggle[open] .project-module-toggle-label .is-expand {
    display: none;
}

.project-module-toggle[open] .project-module-toggle-label .is-collapse {
    display: inline;
}

.project-module-nav-head h2 {
    font-size: 2.15rem;
    line-height: 1.05;
    margin-bottom: 0.35rem;
}

.project-module-nav-head .muted-line {
    max-width: 780px;
    color: #5b6777;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.35;
}

.project-module-nav-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    align-items: center;
}

.project-module-shortcut {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr) auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.35rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(35, 95, 86, 0.18);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(234, 244, 240, 0.92));
}

.project-module-shortcut-copy {
    display: grid;
    gap: 0.25rem;
}

.project-module-shortcut-copy strong {
    font-size: 1.1rem;
}

.project-module-shortcut-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.project-module-shortcut-label {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.project-module-shortcut-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-start;
}

.project-module-shortcut-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(64, 54, 41, 0.08);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.project-module-shortcut-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.project-module-shortcut-actions form {
    margin: 0;
}

.project-module-shortcut-empty {
    grid-template-columns: 1fr;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.82);
}

.project-management-command-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.95fr) minmax(250px, 0.54fr);
    gap: 0.68rem;
    align-items: stretch;
    padding: 0.82rem;
    border: 1px solid rgba(35, 95, 86, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(135deg, #122032 0%, #1c352f 55%, #4c321e 100%);
    background-size: 42px 42px, 42px 42px, auto;
    box-shadow: 0 18px 46px rgba(24, 31, 42, 0.14);
    color: #f8fafc;
    overflow: hidden;
}

.pm-command-main,
.pm-command-metrics,
.pm-command-panel {
    position: relative;
    z-index: 1;
}

.pm-command-main {
    display: grid;
    align-content: center;
    gap: 0.42rem;
    min-height: 7.2rem;
}

.pm-command-kicker {
    color: #92d6bf;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pm-command-main h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.66rem;
    line-height: 1.08;
}

.pm-command-main p {
    max-width: 62rem;
    margin: 0;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.88rem;
    line-height: 1.45;
}

.pm-command-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.12rem;
}

.pm-command-flow span {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.3rem 0.58rem;
    border: 1px solid rgba(146, 214, 191, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8fff5;
    font-size: 0.74rem;
    font-weight: 800;
}

.pm-command-action-row {
    display: flex;
    align-items: center;
    margin-top: 0.2rem;
}

.pm-command-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    align-content: stretch;
}

.pm-command-metric {
    display: grid;
    align-content: center;
    min-height: 100%;
    padding: 0.64rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.pm-command-metric span {
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.pm-command-metric strong {
    color: #ffffff;
    font-size: 1.52rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.pm-command-metric.is-pending {
    border-color: rgba(246, 196, 93, 0.36);
    background: rgba(246, 196, 93, 0.14);
}

.pm-command-metric.is-overdue {
    border-color: rgba(239, 115, 91, 0.4);
    background: rgba(239, 115, 91, 0.14);
}

.pm-command-panel {
    display: grid;
    gap: 0.4rem;
    align-content: center;
    padding: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
}

.pm-command-panel-row {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    min-height: 2.05rem;
    padding: 0.32rem 0.44rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.pm-command-panel-row span {
    display: inline-grid;
    place-items: center;
    width: 1.86rem;
    height: 1.86rem;
    border-radius: 8px;
    background: #e8f3ef;
    color: #235f56;
    font-size: 0.74rem;
    font-weight: 900;
}

.pm-command-panel-row strong {
    color: #ffffff;
    font-size: 0.9rem;
}

.pm-command-button {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-width: 16.5rem;
    min-height: 2.38rem;
    background: #b66320;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1280px) {
    .project-management-command-card {
        grid-template-columns: 1fr;
    }

    .pm-command-main {
        min-height: 0;
    }

    .pm-command-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pm-command-action-row {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .project-management-command-card {
        padding: 0.9rem;
        border-radius: 18px;
    }

    .pm-command-main h2 {
        font-size: 1.55rem;
        line-height: 1.15;
    }

    .pm-command-metrics,
    .pm-command-panel {
        grid-template-columns: 1fr;
    }

    .pm-command-metric strong {
        font-size: 1.65rem;
    }

    .pm-command-action-row,
    .pm-command-button {
        width: 100%;
    }
}

.project-module-nav-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
}

.project-module-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr) minmax(260px, 0.65fr);
    grid-template-rows: auto auto auto;
    column-gap: 1.2rem;
    row-gap: 0.45rem;
    align-items: stretch;
    min-height: 100%;
    padding: 0.82rem 0.95rem;
    border-radius: 22px;
    border-color: rgba(64, 54, 41, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 248, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.project-module-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 22px 0 0 22px;
    background: rgba(64, 54, 41, 0.12);
}

.project-module-card.is-populated {
    border-color: rgba(35, 95, 86, 0.24);
}

.project-module-card.is-populated .module-card-head strong,
.project-module-card.is-populated h3 {
    color: var(--accent);
}

.project-module-card .module-card-head,
.project-module-card-copy {
    grid-column: 1;
}

.project-module-card-copy {
    display: grid;
    gap: 0.45rem;
    align-content: start;
}

.project-module-card-copy h3,
.project-module-card-copy p {
    margin: 0;
}

.project-module-card.tone-workflow::before {
    background: #3558a2;
}

.project-module-card.tone-earthwork::before {
    background: #8d5b2d;
}

.project-module-card.tone-soe::before {
    background: #3f6f80;
}

.project-module-card.tone-piles::before {
    background: #4c5d73;
}

.project-module-card.tone-foundation::before {
    background: #235f56;
}

.project-module-card.tone-superstructure::before {
    background: #5470b3;
}

.project-module-card.tone-pricing::before {
    background: #c67c22;
}

.project-module-card.tone-general::before {
    background: #7c5f3f;
}

.project-module-card-topline {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    grid-column: 1 / -1;
}

.project-module-code,
.project-module-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-module-code {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
}

.project-module-state {
    background: rgba(74, 91, 116, 0.1);
    color: #4a5b74;
}

.project-module-card.state-active .project-module-state {
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
}

.project-module-card.state-priced .project-module-state {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
}

.project-module-card.state-workflow .project-module-state {
    background: rgba(198, 124, 34, 0.1);
    color: var(--brand-strong);
}

.project-module-stat-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0;
    grid-column: 2;
    grid-row: 2;
    align-self: center;
}

.project-module-stat {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.12rem;
    min-height: 48px;
    padding: 0.42rem 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(64, 54, 41, 0.08);
    text-align: center;
}

.project-module-stat span {
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-module-stat strong {
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.15;
}

.project-module-money-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
    grid-column: 3;
    grid-row: 2;
    align-self: center;
}

.project-module-money-grid .value-stack {
    justify-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 0.42rem 0.55rem;
    border: 1px solid rgba(64, 54, 41, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.project-module-money-grid .value-main {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.project-module-card-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(64, 54, 41, 0.08);
    color: var(--muted);
    font-size: 0.82rem;
    grid-column: 3;
    grid-row: 3;
    align-self: end;
}

.project-module-card-footer strong {
    color: var(--accent);
    font-size: 0.88rem;
}

.project-module-title-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
    padding: 0.78rem 1rem;
    align-items: center;
}

.project-module-title-row h3 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.2;
}

.project-module-title-row.is-populated h3 {
    color: var(--accent);
}

@media (max-width: 1180px) {
    .project-hero-grid,
    .project-module-shortcut {
        grid-template-columns: 1fr;
    }

    .project-module-card {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .project-module-card-topline,
    .project-module-card .module-card-head,
    .project-module-card-copy,
    .project-module-stat-grid,
    .project-module-money-grid,
    .project-module-card-footer {
        grid-column: auto;
        grid-row: auto;
    }

    .project-module-stat-grid,
    .project-module-money-grid {
        margin-top: 0.9rem;
    }

    .project-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-secondary-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .project-module-shortcut-actions {
        justify-content: flex-start;
    }
}

.module-card h3 {
    margin-bottom: 0.55rem;
}

.module-card-head,
.module-card-meta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
}

.module-card-head {
    margin-bottom: 0.5rem;
}

.module-card-meta {
    margin-top: auto;
    padding-top: 0.9rem;
}

.module-card-values {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.value-stack {
    display: grid;
    gap: 0.18rem;
}

.compact-value-stack {
    gap: 0.28rem;
}

.value-caption {
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.value-main {
    font-size: 0.92rem;
    line-height: 1.1;
}

.cost-text {
    color: var(--brand-strong);
}

.price-text {
    color: var(--accent);
}

.value-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.value-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(64, 54, 41, 0.1);
    background: rgba(255, 255, 255, 0.58);
}

.qty-chip {
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
    border-color: rgba(53, 88, 162, 0.14);
}

.cost-chip {
    background: rgba(156, 90, 34, 0.1);
    color: var(--brand-strong);
    border-color: rgba(156, 90, 34, 0.14);
}

.price-chip {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
    border-color: rgba(35, 95, 86, 0.14);
}

.value-callout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.price-callout {
    background: rgba(35, 95, 86, 0.12);
    color: var(--accent);
    border: 1px solid rgba(35, 95, 86, 0.16);
}

.module-tabs {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: 1rem;
}

.module-tab {
    position: relative;
    overflow: hidden;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 0.3rem;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.module-tab:hover,
.module-tab:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(35, 95, 86, 0.26);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    outline: none;
}

.module-tab.active {
    background:
        radial-gradient(circle at 82% 18%, rgba(245, 158, 11, 0.24), transparent 36%),
        linear-gradient(135deg, #0f172a, #1e293b);
    border-color: rgba(245, 158, 11, 0.34);
    color: #ffffff;
    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.module-tab.active:hover,
.module-tab.active:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow:
        0 20px 42px rgba(15, 23, 42, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.module-tab.active strong {
    color: #ffffff;
}

.module-tab span {
    color: var(--muted);
    font-size: 0.84rem;
}

.module-tab.active span {
    color: rgba(226, 232, 240, 0.86);
}

.menu-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-preview-group {
    padding: 1rem;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.menu-preview-group p {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.menu-preview-group a {
    display: block;
    padding: 0.45rem 0;
    color: var(--accent);
}

.profile-grid {
    display: grid;
    gap: 0.8rem;
}

.profile-card {
    padding: 1rem;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.detail-panel {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(35, 95, 86, 0.06);
    border: 1px solid rgba(35, 95, 86, 0.14);
}

.detail-panel-title {
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.client-record-card.status-active {
    border-color: rgba(45, 106, 79, 0.3);
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.04), rgba(255, 255, 255, 0.8));
}

.client-record-card.status-inactive {
    border-color: rgba(111, 100, 88, 0.3);
    background: linear-gradient(135deg, rgba(111, 100, 88, 0.04), rgba(255, 255, 255, 0.8));
}

.client-record-card.priority-critical {
    border-left: 4px solid #b8472a;
}

.client-record-card.priority-high {
    border-left: 4px solid #d97706;
}

.client-record-card.priority-medium {
    border-left: 4px solid #ca8a04;
}

.client-record-card.priority-low {
    border-left: 4px solid #16a34a;
}

.client-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.client-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand);
    color: #fffaf3;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.client-status-badges {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-badge, .priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-active {
    background: rgba(45, 106, 79, 0.1);
    color: #2d6a4f;
}

.status-badge.status-inactive {
    background: rgba(111, 100, 88, 0.1);
    color: #6f6458;
}

.priority-badge.priority-critical {
    background: rgba(184, 71, 42, 0.1);
    color: #b8472a;
}

.priority-badge.priority-high {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.priority-badge.priority-medium {
    background: rgba(202, 138, 4, 0.1);
    color: #ca8a04;
}

.priority-badge.priority-low {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.value-chip.category-chip {
    background: var(--accent);
    color: #fffaf3;
}

.value-chip.subcategory-chip {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
}

.value-chip.project-chip {
    background: rgba(155, 90, 34, 0.1);
    color: var(--brand);
}

.value-chip.role-chip {
    background: rgba(53, 136, 162, 0.1);
    color: #3588a2;
}

.compliance-progress {
    margin-top: 0.75rem;
}

.compliance-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(64, 54, 41, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding-right: 3.5rem;
}

.stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    opacity: 0.7;
    color: var(--text);
}

.stat-companies .stat-icon {
    color: var(--brand);
}

.stat-accounts .stat-icon {
    color: #2d6a4f;
}

.stat-links .stat-icon {
    color: #3588a2;
}

.stat-contacts .stat-icon {
    color: var(--accent);
}

.stat-companies {
    background: linear-gradient(135deg, rgba(155, 90, 34, 0.1), rgba(255, 250, 243, 0.9));
    border-color: rgba(155, 90, 34, 0.2);
}

.stat-accounts {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.1), rgba(255, 250, 243, 0.9));
    border-color: rgba(45, 106, 79, 0.2);
}

.stat-links {
    background: linear-gradient(135deg, rgba(53, 136, 162, 0.1), rgba(255, 250, 243, 0.9));
    border-color: rgba(53, 136, 162, 0.2);
}

.stat-contacts {
    background: linear-gradient(135deg, rgba(35, 95, 86, 0.1), rgba(255, 250, 243, 0.9));
    border-color: rgba(35, 95, 86, 0.2);
}

.split-layout.wide-right.client-page-layout {
    grid-template-columns: 1fr;
    align-items: start;
}

.split-layout.wide-right.client-page-layout .client-directory-shell {
    grid-column: 1 / -1;
}

.client-page-layout.editor-active {
    grid-template-columns: 1fr;
}

.client-page-layout.editor-active .client-directory-shell {
    display: none;
}

.client-page-layout.editor-active .client-editor-shell {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    background: #ffffff;
    z-index: 999;
    overflow: auto;
    padding: 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(64, 54, 41, 0.06);
}

.client-directory-shell,
.client-editor-shell {
    min-width: 0;
}

.client-directory-shell {
    width: 100%;
    max-width: none;
}

.client-record-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.client-record-card:hover,
.client-record-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(52, 41, 24, 0.1);
    border-color: rgba(35, 95, 86, 0.24);
    outline: none;
}

.client-editor-shell {
    display: none;
    padding: 1.2rem;
    background: #ffffff;
    border-color: rgba(64, 54, 41, 0.1);
    box-shadow: 0 18px 42px rgba(52, 41, 24, 0.08);
}

body.client-detail-drawer-open {
    overflow: hidden;
}

.client-detail-drawer {
    position: fixed;
    inset: 0;
    z-index: 980;
    display: grid;
    justify-items: end;
}

.client-detail-drawer[hidden] {
    display: none;
}

.client-detail-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(24, 20, 16, 0.18);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.client-detail-drawer-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    width: min(500px, 100vw);
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow: -14px 0 42px rgba(28, 23, 17, 0.14);
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.client-detail-drawer.is-open .client-detail-drawer-backdrop {
    opacity: 1;
}

.client-detail-drawer.is-open .client-detail-drawer-panel {
    transform: translateX(0);
}

.client-detail-drawer-head,
.client-detail-drawer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.15rem;
    background: #ffffff;
}

.client-detail-drawer-head {
    border-bottom: 1px solid rgba(64, 54, 41, 0.08);
}

.client-detail-drawer-head h2,
.client-detail-section h3 {
    margin: 0;
}

.client-detail-drawer-body {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem 1.15rem 1.2rem;
    display: grid;
    gap: 0.95rem;
    background: linear-gradient(180deg, rgba(252, 249, 243, 0.76), rgba(255, 255, 255, 0.98));
}

.client-detail-drawer-actions {
    border-top: 1px solid rgba(64, 54, 41, 0.08);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.client-detail-hero,
.client-detail-section {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.client-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
}

.client-detail-avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(156, 90, 34, 0.96), rgba(124, 67, 21, 0.94));
    color: #fff9f1;
    font-size: 1.65rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(124, 67, 21, 0.18);
}

.client-detail-hero-copy {
    display: grid;
    gap: 0.55rem;
}

.client-detail-main-contact {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 700;
}

.client-detail-status-row,
.client-detail-inline-list,
.client-detail-channel-list,
.client-detail-compliance-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.client-detail-grid div,
.client-detail-list-card {
    display: grid;
    gap: 0.35rem;
}

.client-detail-grid span,
.client-detail-list-card small,
.client-detail-list-card span,
.client-detail-section-head span {
    color: var(--muted);
    font-size: 0.8rem;
}

.client-detail-grid strong,
.client-detail-list-card strong {
    font-size: 0.92rem;
}

.client-detail-section-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.client-detail-list-card {
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    background: rgba(250, 247, 241, 0.92);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.client-detail-list-card.is-primary {
    border-color: rgba(35, 95, 86, 0.18);
    background: rgba(235, 247, 241, 0.96);
}

.client-detail-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.client-detail-channel-list a,
.client-detail-channel-list span,
.client-detail-inline-list span {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(64, 54, 41, 0.06);
    color: var(--text);
}

.client-detail-compliance-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-detail-compliance-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0.8rem;
    border-radius: 16px;
    background: rgba(250, 247, 241, 0.92);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.client-detail-compliance-item.is-complete {
    background: rgba(235, 247, 241, 0.96);
    border-color: rgba(35, 95, 86, 0.18);
}

.client-detail-address,
.client-detail-notes {
    margin-bottom: 0;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .client-detail-drawer-panel {
        width: 100vw;
    }

    .client-detail-hero,
    .client-detail-grid,
    .client-detail-compliance-list {
        grid-template-columns: 1fr;
    }
}

.client-editor-shell .form-stack {
    gap: 0.85rem;
}

.client-editor-shell .form-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 0.75rem;
}

.client-editor-shell .form-grid label {
    min-width: 0;
}

.client-editor-shell .form-grid select,
.client-editor-shell .form-grid input {
    min-width: 0;
}

.client-form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 244, 235, 0.82));
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.client-form-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.client-form-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.64);
}

.client-form-tab.is-active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(35, 95, 86, 0.14);
    box-shadow: 0 10px 22px rgba(35, 95, 86, 0.08);
}

.client-edit-name {
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(35, 95, 86, 0.08);
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    display: inline-block;
}

.client-form-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0 0.42rem;
    border-radius: 999px;
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
}

.client-form-panels {
    display: grid;
    gap: 0.9rem;
}

.client-tab-panel {
    display: grid;
}

.client-tab-panel {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-tab-panel.is-active {
    opacity: 1;
    transform: translateY(0);
}

.client-tab-panel[hidden] {
    display: none !important;
    opacity: 0;
    transform: translateY(10px);
}

.client-contact-card.is-primary {
    border-color: var(--accent);
    background: rgba(35, 95, 86, 0.04);
}

.button.loading {
    position: relative;
    color: transparent;
}

.button.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.client-compliance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.client-compliance-item {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.84);
    color: var(--text);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-compliance-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.client-compliance-toggle input {
    margin: 0.18rem 0 0;
    accent-color: var(--accent);
}

.client-compliance-copy {
    display: grid;
    gap: 0.18rem;
}

.client-compliance-copy strong {
    font-size: 0.9rem;
    font-weight: 700;
}

.client-compliance-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.client-compliance-date-field {
    display: grid;
    gap: 0.28rem;
}

.client-compliance-date-field span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.client-compliance-date-field input {
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
}

.client-compliance-files {
    display: grid;
    gap: 0.55rem;
    padding-top: 0.15rem;
}

.client-compliance-file-list {
    display: grid;
    gap: 0.5rem;
}

.client-compliance-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(64, 54, 41, 0.06);
}

.client-compliance-file-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.client-compliance-file-meta small {
    color: var(--muted);
    font-size: 0.75rem;
}

.client-compliance-upload {
    display: grid;
    gap: 0.28rem;
}

.client-compliance-upload span {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
}

.client-compliance-upload input[type="file"] {
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    border: 1px dashed rgba(64, 54, 41, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
}

.client-compliance-alert {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.32rem 0.58rem;
    margin-top: 0.45rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
}

.client-compliance-alert-warning {
    background: rgba(185, 127, 24, 0.12);
    color: #8b5e08;
}

.client-compliance-alert-expired,
.client-compliance-alert-missing {
    background: rgba(184, 71, 42, 0.12);
    color: #9a3c22;
}

.client-compliance-item.is-complete {
    border-color: rgba(35, 95, 86, 0.18);
    background: linear-gradient(160deg, rgba(231, 246, 239, 0.92), rgba(255, 255, 255, 0.96));
    box-shadow: 0 12px 24px rgba(35, 95, 86, 0.06);
}

.client-compliance-item.is-complete .client-compliance-copy small {
    color: var(--accent);
    font-weight: 700;
}

.client-compliance-item.is-warning {
    border-color: rgba(185, 127, 24, 0.18);
    background: linear-gradient(160deg, rgba(255, 248, 233, 0.96), rgba(255, 255, 255, 0.98));
}

.client-compliance-item.is-warning .client-compliance-copy small {
    color: #8b5e08;
    font-weight: 700;
}

.client-compliance-item.is-expired,
.client-compliance-item.is-missing {
    border-color: rgba(184, 71, 42, 0.2);
    background: linear-gradient(160deg, rgba(255, 239, 235, 0.96), rgba(255, 255, 255, 0.98));
}

.client-compliance-item.is-expired .client-compliance-copy small,
.client-compliance-item.is-missing .client-compliance-copy small {
    color: #9a3c22;
    font-weight: 700;
}

.client-chip-row {
    margin-top: 0.55rem;
}

.client-form-section {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.client-editor-shell .client-form-tabs,
.client-editor-shell .detail-panel,
.client-editor-shell .client-form-action-bar {
    background: #ffffff;
}

.client-form-section-head,
.client-contact-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.client-form-section-head h3 {
    margin-bottom: 0.35rem;
}

.client-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.58rem;
}

.client-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex: none;
}

.client-label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.client-label-with-icon svg {
    width: 15px;
    height: 15px;
    color: var(--muted);
    flex: none;
}

.client-label-with-icon em {
    font-style: normal;
}

.client-filter-shell {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 245, 237, 0.82));
    border: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.client-filter-shell .form-grid {
    gap: 0.7rem;
}

.client-filter-shell label span {
    margin-bottom: 0.28rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.client-filter-shell input,
.client-filter-shell select {
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
}

.client-filter-actions {
    justify-content: space-between;
    gap: 0.55rem;
}

.client-filter-results {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    background: rgba(35, 95, 86, 0.08);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
}

.client-contact-stack {
    display: grid;
    gap: 0.9rem;
}

.client-project-link-stack {
    display: grid;
    gap: 0.9rem;
}

.client-project-link-card {
    display: grid;
    gap: 0.9rem;
}

.client-inline-empty {
    margin: 0;
}

.client-main-contact-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.client-main-contact-toggle input {
    margin: 0.18rem 0 0;
    accent-color: var(--accent);
}

.client-main-contact-toggle:hover {
    border-color: rgba(35, 95, 86, 0.16);
    background: rgba(255, 255, 255, 0.94);
}

.client-main-contact-copy {
    display: grid;
    gap: 0.12rem;
}

.client-main-contact-copy strong {
    font-size: 0.88rem;
    font-weight: 700;
}

.client-main-contact-copy small {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.client-contact-flag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.client-check-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 52px;
    width: 100%;
    padding: 0.5rem 0.72rem;
    border-radius: 16px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.client-check-chip input {
    margin: 0;
}

.client-field-caption {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.client-inline-warning {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #9d4343;
}

.client-inline-warning span {
    color: #b73a3a;
    font-weight: 700;
}

.client-multi-select {
    display: grid;
    gap: 0.6rem;
}

.client-multi-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 1.25rem;
}

.client-multi-select-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.client-multi-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(35, 95, 86, 0.16);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.client-multi-chip-remove {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.client-multi-chip-remove:hover {
    color: #9d4343;
}

.client-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.client-directory-panel {
    display: grid;
    gap: 0.8rem;
}

.client-contact-card {
    display: grid;
    gap: 0.78rem;
    padding: 0.98rem 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(244, 248, 247, 0.94), rgba(238, 244, 242, 0.9));
    border-color: rgba(35, 95, 86, 0.12);
}

.client-contact-card.is-primary {
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(229, 244, 239, 0.95)),
        radial-gradient(circle at top right, rgba(113, 240, 196, 0.12), transparent 42%);
    border-color: rgba(35, 95, 86, 0.22);
    box-shadow: 0 18px 42px rgba(35, 95, 86, 0.08);
}

.client-contact-heading {
    display: grid;
    gap: 0.22rem;
}

.client-contact-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.client-contact-title-row .detail-panel-title {
    margin-bottom: 0;
}

.client-contact-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(35, 95, 86, 0.18);
    background: rgba(35, 95, 86, 0.12);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-contact-card.is-primary .client-main-contact-toggle {
    border-color: rgba(35, 95, 86, 0.2);
    background: linear-gradient(160deg, rgba(228, 246, 238, 0.9), rgba(255, 255, 255, 0.92));
}

.client-contact-card .form-grid {
    gap: 0.7rem;
}

.client-contact-card label span {
    margin-bottom: 0.24rem;
    font-size: 0.82rem;
}

.client-contact-card input,
.client-contact-card select,
.client-contact-card textarea {
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
}

.client-contact-meta-grid {
    grid-template-columns: 0.85fr 1.15fr 1fr;
}

.client-contact-channel-grid {
    grid-template-columns: 1.25fr 0.9fr 0.9fr;
}

.client-form-action-bar {
    position: sticky;
    bottom: 1rem;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.96);
    border: 1px solid rgba(64, 54, 41, 0.12);
    box-shadow: 0 16px 30px rgba(52, 41, 24, 0.1);
    backdrop-filter: blur(10px);
}

.client-form-action-buttons {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.client-form-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(64, 54, 41, 0.06);
    color: var(--muted);
}

.client-form-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(64, 54, 41, 0.26);
}

.client-form-status[data-state="dirty"] {
    background: rgba(156, 90, 34, 0.1);
    color: var(--brand-strong);
}

.client-form-status[data-state="dirty"]::before {
    background: var(--brand);
}

.client-form-status[data-state="saving"] {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
}

.client-form-status[data-state="saving"]::before {
    background: var(--accent);
}

.company-preview-card {
    background:
        linear-gradient(155deg, rgba(246, 251, 255, 0.98), rgba(235, 244, 250, 0.94)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.14), transparent 42%);
    border-color: rgba(95, 155, 255, 0.16);
}

.company-preview-stack {
    display: grid;
    gap: 1rem;
}

.company-logo-upload-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(247, 250, 255, 0.96), rgba(241, 247, 255, 0.92));
    border: 1px solid rgba(95, 155, 255, 0.14);
}

.company-logo-upload-copy {
    display: grid;
    align-content: start;
    gap: 0.4rem;
}

.company-logo-upload-copy span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.company-logo-upload-copy strong,
.company-logo-upload-copy p {
    margin: 0;
}

.company-logo-upload-field {
    display: grid;
    gap: 0.85rem;
}

.company-logo-preview-frame {
    display: grid;
    place-items: center;
    min-height: 128px;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.company-logo-preview-frame img {
    display: block;
    max-width: 100%;
    max-height: 92px;
    object-fit: contain;
}

.company-logo-remove-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.company-logo-remove-toggle input {
    margin: 0;
    accent-color: var(--accent);
}

.company-preview-hero {
    padding: 1.1rem 1.15rem;
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(18, 33, 55, 0.96), rgba(28, 49, 79, 0.92)),
        radial-gradient(circle at top right, rgba(113, 240, 196, 0.16), transparent 36%);
    color: #eef5ff;
    box-shadow: 0 24px 70px rgba(12, 19, 34, 0.18);
}

.company-preview-logo-wrap {
    display: inline-grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(9, 15, 28, 0.18);
}

.company-preview-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-preview-kicker {
    display: inline-block;
    margin-bottom: 0.7rem;
    color: rgba(222, 235, 255, 0.72);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.company-preview-hero strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.08;
    margin-bottom: 0.55rem;
}

.company-preview-hero p {
    margin-bottom: 0;
    color: rgba(222, 235, 255, 0.78);
}

.company-footer-preview {
    font-size: 0.98rem;
    line-height: 1.7;
}

.print-company-manager-card {
    margin-top: 1.2rem;
}

.print-company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.print-company-card {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.84);
}

.print-company-card.is-new {
    background: linear-gradient(155deg, rgba(247, 250, 255, 0.96), rgba(241, 247, 255, 0.92));
}

.print-company-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.print-company-card-head h2,
.compact-head h2 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.print-company-logo-frame {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    flex: 0 0 auto;
    padding: 0.55rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.print-company-logo-frame img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.catalog-autocomplete {
    display: grid;
    gap: 0.85rem;
}

.catalog-search-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.catalog-clear-button[hidden] {
    display: none;
}

.catalog-selected-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px dashed rgba(64, 54, 41, 0.16);
    background: rgba(255, 255, 255, 0.55);
}

.catalog-selected-card.active {
    border-style: solid;
    border-color: rgba(35, 95, 86, 0.22);
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.92), rgba(210, 239, 226, 0.88));
}

.catalog-selected-caption {
    margin-bottom: 0;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.catalog-selected-card strong {
    font-size: 1rem;
    line-height: 1.35;
}

.catalog-selected-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.catalog-results {
    display: none;
    gap: 0.65rem;
    padding: 0.7rem;
    border-radius: 18px;
    border: 1px solid rgba(35, 95, 86, 0.14);
    background: rgba(255, 255, 255, 0.76);
}

.catalog-results.active {
    display: grid;
}

.catalog-result-item {
    appearance: none;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(64, 54, 41, 0.1);
    border-radius: 16px;
    background: #fffdf8;
    padding: 0.85rem 0.95rem;
    display: grid;
    gap: 0.2rem;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.catalog-result-item:hover,
.catalog-result-item.active {
    border-color: rgba(35, 95, 86, 0.24);
    background: rgba(228, 246, 238, 0.92);
    transform: translateY(-1px);
}

.catalog-result-kind {
    display: inline-flex;
    width: fit-content;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.catalog-result-meta,
.catalog-result-empty {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.catalog-result-empty {
    padding: 0.35rem 0.2rem;
}

.detail-grid {
    display: grid;
    gap: 0.85rem;
}

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

.detail-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-stack {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.compact-login {
    margin-bottom: 1rem;
}

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

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.project-team-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-hub-jump-nav {
    position: sticky;
    top: 0.7rem;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.82rem 0;
    padding: 0.52rem;
    border: 1px solid rgba(64, 54, 41, 0.1);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 12px 28px rgba(38, 42, 35, 0.08);
    backdrop-filter: blur(12px);
}

.project-hub-jump-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.1rem;
    padding: 0.34rem 0.64rem;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.project-hub-jump-nav a:hover {
    color: var(--accent);
    border-color: rgba(35, 95, 86, 0.16);
    background: rgba(35, 95, 86, 0.08);
}

.project-hub-jump-nav span {
    display: inline-grid;
    place-items: center;
    min-width: 1.78rem;
    height: 1.38rem;
    padding: 0 0.28rem;
    border-radius: 7px;
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 900;
}

.project-hub-top-grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(340px, 0.58fr);
    gap: 0.9rem;
    align-items: stretch;
}

.project-hub-card {
    position: relative;
    overflow: hidden;
    padding: 0.92rem 0.98rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 247, 0.94));
    border-color: rgba(64, 54, 41, 0.08);
    box-shadow: 0 10px 28px rgba(38, 42, 35, 0.055);
}

.project-hub-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--section-accent, #235f56), var(--section-accent-2, #b66320));
    opacity: 0.72;
}

.project-hub-card + .project-hub-card {
    margin-top: 0.65rem;
}

.project-hub-card .section-head,
.project-team-toolbar,
.project-log-toolbar {
    position: relative;
    z-index: 1;
    align-items: center;
    padding-bottom: 0.58rem;
    border-bottom: 1px solid rgba(64, 54, 41, 0.08);
}

.project-hub-card .section-head {
    margin-bottom: 0.68rem;
}

.project-section-card {
    --section-accent: #235f56;
    --section-accent-soft: rgba(35, 95, 86, 0.1);
    --section-accent-border: rgba(35, 95, 86, 0.18);
    scroll-margin-top: 5.3rem;
}

.project-section-team {
    --section-accent: #235f56;
    --section-accent-2: #2f8d70;
    --section-accent-soft: rgba(35, 95, 86, 0.1);
    --section-accent-border: rgba(35, 95, 86, 0.2);
}

.project-section-rfi {
    --section-accent: #a66a1f;
    --section-accent-2: #c98a2a;
    --section-accent-soft: rgba(191, 133, 47, 0.12);
    --section-accent-border: rgba(191, 133, 47, 0.24);
}

.project-section-submittal {
    --section-accent: #4c5f8a;
    --section-accent-2: #6177ad;
    --section-accent-soft: rgba(76, 95, 138, 0.11);
    --section-accent-border: rgba(76, 95, 138, 0.22);
}

.project-section-card .section-head {
    margin: -0.12rem -0.18rem 0.72rem;
    padding: 0.7rem 0.78rem;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--section-accent-soft), rgba(255, 255, 255, 0.68));
    border: 1px solid var(--section-accent-border);
}

.project-section-card .section-head .eyebrow,
.project-section-card .section-head h2 {
    color: var(--section-accent);
}

.project-section-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.48rem;
    align-items: center;
}

.project-section-count {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.32rem 0.66rem;
    border-radius: 999px;
    color: var(--section-accent);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--section-accent-border);
    font-size: 0.76rem;
    font-weight: 850;
}

.project-section-count.muted {
    color: var(--muted);
    border-color: rgba(64, 54, 41, 0.1);
}

.project-hub-card .section-head h2 {
    font-size: 1.02rem;
    line-height: 1.25;
}

.project-hub-card .section-head .muted-line,
.project-team-toolbar .muted-line,
.project-log-toolbar .muted-line {
    margin-top: 0.18rem;
    max-width: 760px;
    font-size: 0.82rem;
}

.project-workbook-card,
.project-hub-brief-card {
    min-height: 100%;
}

.project-workbook-upload {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 0.65rem;
}

.project-workbook-upload .button {
    min-width: 10.5rem;
    height: 2.45rem;
}

.project-file-field input[type="file"] {
    min-height: 2.45rem;
    padding: 0.48rem 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
}

.project-file-field input[type="file"]::file-selector-button {
    margin-right: 0.65rem;
    padding: 0.42rem 0.72rem;
    border: 0;
    border-radius: 10px;
    background: rgba(166, 96, 32, 0.12);
    color: #8f531d;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.project-hub-brief-card {
    display: grid;
    align-content: stretch;
}

.project-hub-brief-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.58rem;
}

.project-hub-brief-item {
    display: grid;
    gap: 0.22rem;
    min-height: 6rem;
    padding: 0.74rem;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(35, 95, 86, 0.14);
    background: linear-gradient(180deg, rgba(238, 248, 244, 0.88), rgba(255, 255, 255, 0.88));
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.project-hub-brief-item:hover {
    transform: translateY(-1px);
    border-color: rgba(35, 95, 86, 0.26);
    box-shadow: 0 14px 24px rgba(35, 95, 86, 0.1);
}

.project-hub-brief-item span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.project-hub-brief-item strong {
    color: var(--accent);
    font-size: 1.85rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.project-hub-brief-item small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.project-hub-brief-item.accent-rfi {
    border-color: rgba(191, 133, 47, 0.18);
    background: linear-gradient(180deg, rgba(255, 246, 231, 0.9), rgba(255, 255, 255, 0.88));
}

.project-hub-brief-item.accent-rfi strong {
    color: #9b641e;
}

.project-hub-brief-item.accent-submittal {
    border-color: rgba(76, 95, 138, 0.18);
    background: linear-gradient(180deg, rgba(240, 244, 255, 0.9), rgba(255, 255, 255, 0.88));
}

.project-hub-brief-item.accent-submittal strong {
    color: #4c5f8a;
}

.project-hub-next-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.72rem;
}

.project-hub-next-actions .button {
    flex: 1 1 12rem;
    justify-content: center;
}

.project-hub-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.78rem;
    align-items: center;
    min-height: 5.2rem;
    padding: 0.86rem 1rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(250, 248, 244, 0.62), rgba(255, 255, 255, 0.78));
    border: 1px dashed rgba(64, 54, 41, 0.14);
    text-align: left;
}

.project-hub-empty-icon {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    color: var(--section-accent, #235f56);
    background: var(--section-accent-soft, rgba(35, 95, 86, 0.1));
    border: 1px solid var(--section-accent-border, rgba(35, 95, 86, 0.16));
    font-size: 0.74rem;
    font-weight: 900;
}

.project-hub-empty h3 {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}

.project-hub-empty p {
    max-width: 560px;
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.42;
}

.project-hub-empty .button {
    width: auto;
    margin-top: 0.58rem;
}

.project-team-stack,
.project-team-readonly-grid {
    display: grid;
    gap: 0.62rem;
}

.project-team-card {
    display: grid;
    gap: 0.72rem;
    padding: 0.86rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(244, 249, 247, 0.86));
    border: 1px solid var(--section-accent-border, rgba(35, 95, 86, 0.12));
}

.project-team-card.readonly {
    background: rgba(255, 255, 255, 0.7);
}

.project-team-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin: -0.18rem -0.18rem 0;
    padding: 0.58rem 0.62rem;
    border-radius: 10px;
    background: var(--section-accent-soft, rgba(35, 95, 86, 0.08));
    border: 1px solid var(--section-accent-border, rgba(35, 95, 86, 0.12));
}

.project-team-company-grid {
    grid-template-columns: 1.2fr 0.9fr 0.75fr;
}

.project-team-channel-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.project-team-flag-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.project-team-empty {
    margin: 0;
}

.project-log-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-log-stack,
.project-log-readonly-grid {
    display: grid;
    gap: 0.62rem;
}

.project-log-card {
    display: grid;
    gap: 0.72rem;
    padding: 0.86rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(247, 250, 249, 0.86));
    border: 1px solid var(--section-accent-border, rgba(35, 95, 86, 0.12));
}

.project-log-card.readonly {
    background: rgba(255, 255, 255, 0.7);
}

.project-log-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin: -0.18rem -0.18rem 0;
    padding: 0.58rem 0.62rem;
    border-radius: 10px;
    background: var(--section-accent-soft, rgba(35, 95, 86, 0.08));
    border: 1px solid var(--section-accent-border, rgba(35, 95, 86, 0.12));
}

.project-log-core-grid {
    grid-template-columns: 0.85fr 0.85fr 1.1fr;
}

.project-log-reference-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-log-recipient-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
}

.project-log-empty {
    margin: 0;
}

.project-team-toolbar .small-button,
.project-log-toolbar .small-button {
    min-height: 2.18rem;
    padding-inline: 0.86rem;
    border-color: var(--section-accent-border, rgba(166, 96, 32, 0.26));
    color: var(--section-accent, #8f531d);
    background: var(--section-accent-soft, rgba(166, 96, 32, 0.08));
}

.project-hub-action-button {
    box-shadow: 0 10px 20px color-mix(in srgb, var(--section-accent, #9c5a22) 16%, transparent);
}

.project-save-button {
    min-width: 10rem;
    min-height: 2.45rem;
    background: var(--section-accent, #235f56);
    border-color: var(--section-accent, #235f56);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--section-accent, #235f56) 18%, transparent);
}

.log-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.66rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(35, 95, 86, 0.16);
    color: #255f56;
    background: rgba(35, 95, 86, 0.1);
}

.log-status-badge.status-open,
.log-status-badge.status-pending {
    color: #a36d21;
    border-color: rgba(191, 133, 47, 0.2);
    background: rgba(191, 133, 47, 0.12);
}

.log-status-badge.status-overdue,
.log-status-badge.status-rejected {
    color: #a24036;
    border-color: rgba(162, 64, 54, 0.2);
    background: rgba(162, 64, 54, 0.12);
}

.log-status-badge.status-answered,
.log-status-badge.status-closed,
.log-status-badge.status-approved,
.log-status-badge.status-approved-as-noted {
    color: #257a58;
    border-color: rgba(37, 122, 88, 0.2);
    background: rgba(37, 122, 88, 0.12);
}

.log-status-badge.status-revise-and-resubmit,
.log-status-badge.status-draft {
    color: #4c5f8a;
    border-color: rgba(76, 95, 138, 0.18);
    background: rgba(76, 95, 138, 0.1);
}

.table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    background: rgba(255, 255, 255, 0.86);
}

.table-form {
    display: contents;
}

th,
td {
    padding: 0.85rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

thead {
    background: rgba(35, 95, 86, 0.09);
}

.inline-form {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.compact-inline {
    margin-bottom: 0;
}

.top-margin {
    margin-top: 1rem;
}

.action-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.action-stack .button {
    min-width: 0;
    max-width: 120px;
    white-space: nowrap;
}

.equipment-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 118px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(64, 54, 41, 0.08);
}

.equipment-action-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.equipment-action-button-edit {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(45, 106, 79, 0.16));
    border-color: rgba(45, 106, 79, 0.26);
    color: #24553e;
}

.equipment-action-button-edit:hover {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.16), rgba(45, 106, 79, 0.24));
}

.equipment-action-button-delete {
    background: linear-gradient(135deg, #b8472a, #a13c21);
    box-shadow: 0 14px 26px rgba(184, 71, 42, 0.18);
}

.equipment-action-button-delete:hover {
    background: linear-gradient(135deg, #a94024, #8e331b);
}

.small-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.subtle-cell {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.table-value {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.58rem;
    border-radius: 12px;
    font-weight: 800;
    line-height: 1.1;
}

.qty-value {
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
}

.cost-value {
    background: rgba(156, 90, 34, 0.12);
    color: var(--brand-strong);
}

.price-value {
    background: rgba(35, 95, 86, 0.14);
    color: var(--accent);
}

.price-comp-stack {
    display: grid;
    gap: 1rem;
}

.price-comp-toolbar-card,
.price-comp-table-card,
.price-comp-entry-card {
    overflow: hidden;
}

.price-comp-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.price-comp-add-button {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.35rem;
    background: linear-gradient(135deg, #235f56, #2f7d71);
    box-shadow: 0 16px 32px rgba(35, 95, 86, 0.22);
}

.price-comp-add-button:hover {
    background: linear-gradient(135deg, #1d5149, #286b61);
}

.price-comp-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.2rem;
    line-height: 1;
}

.price-comp-entry-card {
    width: 100%;
    max-width: none;
}

.price-comp-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.price-comp-row-action-form {
    margin: 0;
}

.price-comp-row-action {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(64, 54, 41, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.price-comp-row-action:hover {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(64, 54, 41, 0.18);
    transform: translateY(-1px);
}

.price-comp-row-action-delete {
    background: rgba(184, 71, 42, 0.08);
    border-color: rgba(184, 71, 42, 0.14);
    color: #9a3c22;
}

.price-comp-row-action-delete:hover {
    background: rgba(184, 71, 42, 0.14);
    border-color: rgba(184, 71, 42, 0.2);
}

.price-comp-section-field {
    display: grid;
    gap: 0.55rem;
}

.price-comp-section-builder {
    align-self: start;
}

.price-comp-section-builder summary {
    list-style: none;
    width: fit-content;
}

.price-comp-section-builder summary::-webkit-details-marker {
    display: none;
}

.price-comp-section-builder-body {
    margin-top: 0.65rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px dashed rgba(64, 54, 41, 0.18);
    background: rgba(255, 255, 255, 0.62);
}

.price-comp-source-active {
    border-color: rgba(35, 95, 86, 0.24);
    background: rgba(35, 95, 86, 0.08);
}

.detail-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.detail-chip {
    display: inline-flex;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state.compact {
    padding: 1.2rem 0;
}

.finance-hero {
    background: linear-gradient(160deg, rgba(255, 249, 240, 0.96), rgba(246, 238, 228, 0.88));
}

.finance-tab-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.finance-chip-row {
    margin-top: 0;
}

.finance-board {
    align-items: start;
}

.finance-estimate-summary {
    display: grid;
    gap: 1rem;
}

.finance-table-link:hover strong,
.finance-table-link:hover {
    color: var(--brand-strong);
}

@media (max-width: 720px) {
    .finance-tab-row {
        justify-content: flex-start;
    }
}

.dashboard-shell {
    display: grid;
    gap: 1rem;
}

.dashboard-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(13, 22, 37, 0.96), rgba(10, 16, 28, 0.92)),
        radial-gradient(circle at top right, rgba(113, 240, 196, 0.14), transparent 42%);
    border-color: rgba(132, 176, 255, 0.18);
    color: #edf4ff;
    box-shadow: 0 26px 80px rgba(5, 10, 18, 0.28);
}

.dashboard-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(150, 197, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(150, 197, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
    pointer-events: none;
}

.dashboard-panel > * {
    position: relative;
    z-index: 1;
}

.dashboard-shell .eyebrow,
.dashboard-shell .stat-label,
.dashboard-shell .muted-line,
.dashboard-shell .project-meta,
.dashboard-shell .value-caption,
.dashboard-shell .subtle-cell,
.dashboard-shell .dashboard-hero-text,
.dashboard-shell .signal-card span,
.dashboard-shell .signal-card small,
.dashboard-shell .axis-pill span,
.dashboard-shell .status-row span,
.dashboard-shell .dashboard-hero-summary-label,
.dashboard-shell .dashboard-summary-item span,
.dashboard-shell .workspace-metric span,
.dashboard-shell .workspace-sheet-pill {
    color: rgba(222, 235, 255, 0.7);
}

.dashboard-shell .button-ghost {
    border-color: rgba(160, 196, 255, 0.22);
    color: #edf4ff;
}

.dashboard-shell .button-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dashboard-shell label span,
.dashboard-shell .empty-state p {
    color: rgba(222, 235, 255, 0.7);
}

.dashboard-shell .empty-state h3,
.dashboard-shell h2,
.dashboard-shell h3 {
    color: #edf4ff;
}

.dashboard-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: end;
}

.dashboard-filter-actions {
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-shell input,
.dashboard-shell select,
.dashboard-shell textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(132, 176, 255, 0.18);
    color: #edf4ff;
}

.dashboard-shell input::placeholder,
.dashboard-shell textarea::placeholder {
    color: rgba(222, 235, 255, 0.5);
}

.dashboard-shell select option {
    color: #0d1625;
}

.dashboard-shell .value-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(132, 176, 255, 0.14);
    color: #edf4ff;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.2rem;
    min-height: 328px;
}

.dashboard-overline {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #9ed3ff;
    margin-bottom: 0.9rem;
}

.dashboard-hero h2 {
    font-size: clamp(2rem, 3.8vw, 4rem);
    line-height: 0.98;
    max-width: 15ch;
    margin-bottom: 0.9rem;
}

.dashboard-hero-text {
    max-width: 54ch;
    line-height: 1.6;
}

.dashboard-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.95rem 0 1.15rem;
}

.dashboard-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(119, 180, 255, 0.08);
    border: 1px solid rgba(119, 180, 255, 0.18);
    color: #cbe5ff;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-tag-accent {
    background: rgba(113, 240, 196, 0.12);
    border-color: rgba(113, 240, 196, 0.24);
    color: #71f0c4;
}

.dashboard-brief-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0 0 1.15rem;
}

.dashboard-brief-card {
    display: grid;
    gap: 0.34rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.dashboard-brief-card span {
    color: rgba(222, 235, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
}

.dashboard-brief-card strong {
    color: #edf4ff;
    font-size: 1rem;
    line-height: 1.3;
}

.dashboard-brief-card small {
    color: rgba(222, 235, 255, 0.72);
    font-size: 0.8rem;
    line-height: 1.45;
}

.dashboard-filter-shell {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.dashboard-hero-visual {
    display: grid;
    gap: 1rem;
}

.dashboard-hero-signal-grid .signal-card-featured {
    grid-column: 1 / -1;
}

.dashboard-orb {
    position: relative;
    min-height: 238px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(113, 240, 196, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    border: 1px solid rgba(132, 176, 255, 0.18);
}

.dashboard-orb::before,
.dashboard-orb::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(126, 186, 255, 0.22);
}

.dashboard-orb::before {
    inset: 18%;
}

.dashboard-orb::after {
    inset: 28%;
}

.dashboard-orb-core {
    width: 178px;
    height: 178px;
    border-radius: 50%;
    background: rgba(7, 14, 25, 0.92);
    border: 1px solid rgba(113, 240, 196, 0.22);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1.4rem;
    box-shadow: inset 0 0 40px rgba(113, 240, 196, 0.08);
}

.dashboard-orb-core span,
.dashboard-orb-core small {
    color: rgba(222, 235, 255, 0.72);
}

.dashboard-orb-core strong {
    font-size: 1.8rem;
    line-height: 1;
    color: #71f0c4;
}

.dashboard-signal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.signal-card {
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.signal-card span {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
}

.signal-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.02rem;
    line-height: 1.35;
}

.signal-card small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

.dashboard-hero-summary {
    margin-top: auto;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.dashboard-hero-summary-label {
    display: inline-block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.dashboard-hero-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.dashboard-summary-item {
    display: grid;
    gap: 0.18rem;
}

.dashboard-summary-item strong {
    font-size: 1.24rem;
    line-height: 1.1;
    color: #edf4ff;
}

.dashboard-stats-grid .dashboard-panel {
    min-height: 142px;
}

.dashboard-stats-grid .stat-card {
    background:
        linear-gradient(160deg, rgba(16, 25, 40, 0.98), rgba(11, 17, 29, 0.92)),
        radial-gradient(circle at top right, rgba(113, 240, 196, 0.1), transparent 40%);
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid-main {
    grid-template-columns: 1.4fr 0.9fr;
}

.dashboard-grid-priority {
    grid-template-columns: 1.22fr 0.78fr;
}

.dashboard-grid-secondary {
    grid-template-columns: 0.92fr 1.08fr;
}

.workspace-panel,
.chart-panel,
.skyline-panel,
.status-panel,
.navigation-panel {
    min-height: 100%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(222, 235, 255, 0.72);
    font-size: 0.82rem;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.legend-cost {
    background: #f2b870;
}

.legend-price {
    background: #71f0c4;
}

.chart-surface {
    display: grid;
    gap: 0.95rem;
}

.dashboard-chart {
    width: 100%;
    height: auto;
    display: block;
}

.chart-frame {
    fill: rgba(255, 255, 255, 0.02);
    stroke: rgba(132, 176, 255, 0.16);
}

.chart-grid-line {
    stroke: rgba(149, 192, 255, 0.16);
    stroke-dasharray: 5 8;
}

.chart-grid-label {
    fill: rgba(222, 235, 255, 0.48);
    font-size: 11px;
    font-family: Consolas, "Segoe UI Variable", sans-serif;
}

.chart-area-price {
    fill: url(#priceAreaGradient);
}

.chart-line {
    fill: none;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-cost {
    stroke: #f2b870;
}

.chart-line-price {
    stroke: #71f0c4;
}

.chart-node {
    stroke: #08111f;
    stroke-width: 2;
}

.chart-node-cost {
    fill: #f2b870;
}

.chart-node-price {
    fill: #71f0c4;
}

.chart-axis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 0.7rem;
}

.axis-pill {
    display: block;
    padding: 0.78rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.axis-pill strong {
    color: #edf4ff;
    font-size: 0.92rem;
}

.skyline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 0.8rem;
    align-items: end;
    min-height: 332px;
    margin-top: 1rem;
}

.skyline-bar {
    position: relative;
    min-height: 286px;
    display: grid;
    align-content: end;
    gap: 0.35rem;
    padding: 0.85rem 0.75rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(132, 176, 255, 0.14);
    overflow: hidden;
}

.skyline-bar:hover {
    border-color: rgba(113, 240, 196, 0.28);
    transform: translateY(-2px);
}

.skyline-bar-fill {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 60px;
    height: var(--bar-height);
    border-radius: 18px 18px 8px 8px;
    background: linear-gradient(180deg, #9fd9ff, #3970ff 54%, #112548);
    box-shadow: 0 0 28px rgba(81, 124, 255, 0.24);
}

.skyline-bar-cap {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(60px + var(--bar-height) - 6px);
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

.skyline-bar small,
.skyline-bar span {
    color: rgba(222, 235, 255, 0.7);
}

.skyline-bar strong {
    color: #edf4ff;
    font-size: 0.9rem;
    line-height: 1.3;
}

.status-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    align-items: center;
}

.status-ring {
    width: 210px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-inline: auto;
    box-shadow: inset 0 0 0 1px rgba(132, 176, 255, 0.14);
}

.status-ring-core {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: rgba(7, 14, 25, 0.94);
    border: 1px solid rgba(132, 176, 255, 0.18);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1rem;
}

.status-ring-core strong {
    font-size: 2.3rem;
    line-height: 1;
    color: #edf4ff;
}

.status-ring-core span {
    color: rgba(222, 235, 255, 0.7);
    font-size: 0.82rem;
}

.status-stack {
    display: grid;
    gap: 0.75rem;
}

.status-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.82rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.14);
}

.status-row strong {
    color: #edf4ff;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

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

.workspace-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(132, 176, 255, 0.14);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workspace-card:hover {
    transform: translateY(-2px);
    border-color: rgba(113, 240, 196, 0.26);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.workspace-card-primary {
    grid-column: 1 / -1;
    padding: 1.15rem 1.2rem;
    background:
        linear-gradient(155deg, rgba(14, 24, 42, 0.96), rgba(9, 16, 29, 0.92)),
        radial-gradient(circle at top right, rgba(113, 240, 196, 0.14), transparent 38%);
    border-color: rgba(113, 240, 196, 0.18);
}

.workspace-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.workspace-status-badge,
.workspace-sheet-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(132, 176, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workspace-status-active {
    color: #71f0c4;
    border-color: rgba(113, 240, 196, 0.22);
    background: rgba(113, 240, 196, 0.1);
}

.workspace-status-draft {
    color: #f2b870;
    border-color: rgba(242, 184, 112, 0.22);
    background: rgba(242, 184, 112, 0.1);
}

.workspace-status-review {
    color: #9fd9ff;
    border-color: rgba(159, 217, 255, 0.22);
    background: rgba(159, 217, 255, 0.1);
}

.workspace-card strong {
    color: #edf4ff;
    font-size: 1.08rem;
    line-height: 1.25;
}

.workspace-card p {
    margin-bottom: 0;
    color: rgba(222, 235, 255, 0.76);
}

.workspace-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.workspace-metric {
    display: grid;
    gap: 0.16rem;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(132, 176, 255, 0.12);
}

.workspace-metric strong {
    font-size: 0.96rem;
    line-height: 1.25;
}

.dashboard-shell .project-card,
.dashboard-shell .menu-preview-group {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(132, 176, 255, 0.14);
}

.dashboard-shell .project-card:hover,
.dashboard-shell .menu-preview-group:hover {
    border-color: rgba(113, 240, 196, 0.26);
}

.dashboard-shell .project-card strong,
.dashboard-shell .menu-preview-group p {
    color: #edf4ff;
}

.dashboard-shell .project-card p {
    color: rgba(222, 235, 255, 0.7);
}

.dashboard-shell .menu-preview {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-shell .menu-preview-group a {
    color: #9fd9ff;
}

.dashboard-shell .qty-chip {
    background: rgba(95, 155, 255, 0.12);
    border-color: rgba(95, 155, 255, 0.2);
    color: #9fd9ff;
}

.dashboard-shell .cost-chip {
    background: rgba(242, 184, 112, 0.12);
    border-color: rgba(242, 184, 112, 0.2);
    color: #f2b870;
}

.dashboard-shell .price-callout {
    background: rgba(113, 240, 196, 0.12);
    border-color: rgba(113, 240, 196, 0.2);
    color: #71f0c4;
}

.foundation-stack,
.foundation-shell,
.foundation-primary-stack,
.foundation-side-stack {
    display: grid;
    gap: 0.85rem;
}

.foundation-brief-card {
    display: grid;
    gap: 0.85rem;
    background:
        linear-gradient(155deg, rgba(10, 18, 32, 0.95), rgba(18, 31, 52, 0.9)),
        radial-gradient(circle at top right, rgba(141, 216, 255, 0.12), transparent 38%);
    border-color: rgba(141, 216, 255, 0.18);
    color: #eff7ff;
    box-shadow: 0 28px 84px rgba(8, 14, 24, 0.24);
}

.foundation-import-card {
    margin-top: 1rem;
}

.foundation-brief-card .eyebrow,
.foundation-brief-card .muted-line,
.foundation-brief-card label span,
.foundation-brief-card .foundation-project-row span,
.foundation-brief-card .foundation-selected-caption {
    color: rgba(227, 239, 255, 0.72);
}

.foundation-brief-card .button-ghost {
    border-color: rgba(160, 196, 255, 0.22);
    color: #eff7ff;
}

.foundation-brief-card .button-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

.foundation-brief-head {
    order: -30;
    align-items: flex-start;
}

.foundation-version-loader {
    order: -28;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(480px, auto);
    gap: 0.9rem;
    align-items: center;
    min-height: 5.4rem;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(245, 158, 11, 0.58);
    border-radius: 22px;
    background:
        radial-gradient(circle at 6% 20%, rgba(245, 158, 11, 0.42), transparent 30%),
        linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(14, 116, 144, 0.18)),
        rgba(255, 255, 255, 0.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 24px 52px rgba(8, 14, 24, 0.26),
        0 0 0 4px rgba(245, 158, 11, 0.08);
}

.foundation-version-loader-copy {
    display: flex;
    align-items: center;
    gap: 0.78rem;
    min-width: 0;
}

.foundation-version-loader-copy > div {
    display: grid;
    justify-items: start;
    width: 100%;
}

.foundation-version-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 0.35rem;
    padding: 0.42rem 0.72rem;
    border: 1px solid rgba(254, 215, 170, 0.62);
    border-radius: 999px;
    background: rgba(234, 88, 12, 0.34);
    color: #fff7ed;
    font-size: 0.9rem;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.foundation-version-loader-copy h3 {
    margin: 0.15rem 0 0.18rem;
    color: #ffffff;
    font-size: 1.72rem;
    font-weight: 950;
    line-height: 1.15;
}

.foundation-version-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin: 0;
    width: 100%;
    transform: translateX(7.5rem);
}

.foundation-version-current span {
    color: #bfdbfe;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.foundation-version-current strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 9.8rem;
    min-height: 3.25rem;
    padding: 0.46rem 1.25rem;
    border: 2px solid rgba(125, 211, 252, 0.58);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.44), rgba(2, 132, 199, 0.24));
    color: #f0f9ff;
    font-size: 1.9rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow:
        0 14px 28px rgba(14, 116, 144, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.foundation-version-loader.is-rv-loaded .foundation-version-current strong {
    border-color: rgba(254, 215, 170, 0.76);
    background:
        linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-size: 2.12rem;
    box-shadow:
        0 18px 36px rgba(234, 88, 12, 0.34),
        0 0 0 4px rgba(245, 158, 11, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 1180px) {
    .foundation-version-current {
        transform: none;
    }
}

.foundation-version-loader-badge {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 3.9rem;
    height: 3.9rem;
    border-radius: 18px;
    background: linear-gradient(145deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    box-shadow: 0 18px 38px rgba(234, 88, 12, 0.38);
}

.foundation-version-loader-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 0.65rem;
    min-width: 0;
}

.foundation-version-loader-controls label {
    display: grid;
    gap: 0.42rem;
    min-width: min(380px, 100%);
}

.foundation-version-loader-controls label span {
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.foundation-version-loader-controls select {
    min-height: 2.85rem;
    padding-inline: 1rem;
    border-radius: 18px;
    border-color: rgba(160, 196, 255, 0.34);
    background-color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
    font-weight: 800;
}

.foundation-version-load-button {
    min-height: 2.85rem;
    padding-inline: 1.3rem;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 950;
    white-space: nowrap;
    box-shadow:
        0 14px 30px rgba(234, 88, 12, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.foundation-command-title-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.foundation-module-menu-badge {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 5.2rem;
    min-height: 4.4rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(245, 158, 11, 0.98), rgba(234, 88, 12, 0.92));
    color: #ffffff;
    box-shadow:
        0 16px 34px rgba(234, 88, 12, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    text-align: center;
}

.foundation-module-menu-badge strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.04em;
}

.foundation-module-menu-badge small {
    display: block;
    margin-top: 0.28rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.foundation-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.foundation-head-actions .foundation-command-save {
    position: relative;
    isolation: isolate;
    min-height: 3.15rem;
    padding: 0.92rem 1.45rem;
    overflow: hidden;
    border: 2px solid rgba(187, 247, 208, 0.95);
    background:
        linear-gradient(135deg, #22c55e 0%, #06b6d4 52%, #2563eb 100%);
    color: #ffffff;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.18),
        0 18px 34px rgba(37, 99, 235, 0.32),
        0 7px 18px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.foundation-head-actions .foundation-command-save::after {
    content: "";
    position: absolute;
    inset: -45% auto -45% -40%;
    z-index: -1;
    width: 48%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
    transition: left 0.38s ease;
}

.foundation-head-actions .foundation-command-save:hover,
.foundation-head-actions .foundation-command-save:focus-visible {
    filter: saturate(1.12) brightness(1.07);
    transform: translateY(-2px) scale(1.04);
    box-shadow:
        0 0 0 5px rgba(125, 211, 252, 0.26),
        0 24px 42px rgba(37, 99, 235, 0.42),
        0 10px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.foundation-head-actions .foundation-command-save:hover::after,
.foundation-head-actions .foundation-command-save:focus-visible::after {
    left: 94%;
}

.foundation-head-actions .foundation-command-save:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.18),
        0 9px 20px rgba(37, 99, 235, 0.26),
        0 5px 14px rgba(0, 0, 0, 0.16);
}

.foundation-brief-card .foundation-command-ghost {
    border: 1px solid rgba(203, 213, 225, 0.34);
    background: rgba(255, 255, 255, 0.03);
    color: #eff7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.foundation-brief-card .foundation-command-ghost:hover,
.foundation-brief-card .foundation-command-ghost:focus-visible {
    border-color: rgba(226, 232, 240, 0.58);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px rgba(0, 0, 0, 0.1);
}

.foundation-brief-card .foundation-command-ghost:active {
    transform: translateY(0) scale(0.98);
}

.foundation-brief-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.foundation-rv-block {
    grid-column: 1 / -1;
}

.foundation-controls-panel .foundation-control-grid {
    grid-template-columns: 1fr;
}

.foundation-brief-toggle.foundation-controls-panel .foundation-card-toggle-body {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.foundation-control-wide {
    order: 2;
    grid-column: 1 / -1;
}

.foundation-controls-panel .foundation-rv-block {
    order: 1;
}

.foundation-controls-panel {
    margin-top: 0.45rem;
}

.foundation-controls-panel .foundation-meta-block {
    padding: 0.62rem;
    border-radius: 14px;
}

.foundation-controls-panel .foundation-panel-title {
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
}

.foundation-controls-panel .foundation-form-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.42rem 0.5rem;
}

.foundation-controls-panel .foundation-form-grid label {
    gap: 0.22rem;
}

.foundation-controls-panel .foundation-form-grid label span {
    font-size: 0.72rem;
    line-height: 1.15;
}

.foundation-controls-panel .foundation-form-grid input,
.foundation-controls-panel .foundation-form-grid select {
    min-height: 2.28rem;
    padding: 0.42rem 0.7rem;
    border-radius: 11px;
    font-size: 0.86rem;
}

.foundation-rv-workspace {
    display: grid;
    gap: 0.62rem;
}

.foundation-rv-control-grid {
    display: grid;
    grid-template-columns: minmax(170px, 0.85fr) minmax(220px, 1.08fr) minmax(300px, 1.35fr) minmax(220px, 1fr);
    gap: 0.5rem;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.foundation-rv-tool-block {
    display: grid;
    align-content: start;
    gap: 0.48rem;
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid rgba(160, 196, 255, 0.2);
    border-radius: 12px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.64), rgba(30, 41, 59, 0.38)),
        rgba(255, 255, 255, 0.035);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 16px 34px rgba(8, 14, 24, 0.18);
}

.foundation-rv-tool-block.is-save {
    border-color: rgba(254, 215, 170, 0.28);
    background:
        linear-gradient(145deg, rgba(124, 45, 18, 0.24), rgba(15, 23, 42, 0.56)),
        rgba(255, 255, 255, 0.035);
}

.foundation-rv-tool-block.is-print {
    border-color: rgba(125, 211, 252, 0.28);
    background:
        linear-gradient(145deg, rgba(8, 47, 73, 0.3), rgba(15, 23, 42, 0.56)),
        rgba(255, 255, 255, 0.035);
}

.foundation-rv-tool-block.is-compare {
    border-color: rgba(192, 132, 252, 0.28);
    background:
        linear-gradient(145deg, rgba(76, 29, 149, 0.22), rgba(15, 23, 42, 0.56)),
        rgba(255, 255, 255, 0.035);
}

.foundation-rv-tool-head {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
}

.foundation-rv-tool-head span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.62rem;
    height: 1.62rem;
    border: 1px solid rgba(254, 215, 170, 0.34);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.92), rgba(234, 88, 12, 0.88));
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.foundation-rv-tool-head strong {
    min-width: 0;
    color: #f8fbff;
    font-size: 0.98rem;
    font-weight: 950;
}

.foundation-rv-tool-copy {
    margin: 0;
    color: rgba(227, 239, 255, 0.72);
    font-size: 0.68rem;
    line-height: 1.22;
}

.foundation-rv-tool-copy.is-muted {
    color: rgba(227, 239, 255, 0.58);
    font-size: 0.64rem;
}

.foundation-rv-tool-fields,
.foundation-rv-pdf-actions {
    display: grid;
    gap: 0.38rem;
}

.foundation-rv-tool-fields label {
    display: grid;
    gap: 0.24rem;
    min-width: 0;
}

.foundation-rv-tool-fields label span {
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-rv-tool-fields input,
.foundation-rv-tool-fields select {
    width: 100%;
    min-width: 0;
    min-height: 2.18rem;
    border-radius: 10px;
    font-size: 0.78rem;
}

.foundation-rv-compare-fields,
.foundation-rv-print-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-rv-compare-fields .button,
.foundation-rv-print-fields label:last-child {
    grid-column: 1 / -1;
}

.foundation-rv-pdf-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.foundation-rv-pdf-actions .button,
.foundation-rv-tool-fields .button {
    width: 100%;
    min-height: 2.18rem;
    padding-inline: 0.5rem;
    font-size: 0.72rem;
}

.foundation-rv-pdf-actions .foundation-command-save {
    background:
        linear-gradient(135deg, #0891b2 0%, #0284c7 52%, #2563eb 100%);
    border-color: rgba(186, 230, 253, 0.74);
    box-shadow:
        0 0 0 3px rgba(14, 165, 233, 0.14),
        0 14px 28px rgba(37, 99, 235, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

@media (max-width: 760px) {
    .foundation-rv-control-grid {
        grid-template-columns: repeat(4, minmax(230px, 1fr));
    }

    .foundation-rv-compare-fields,
    .foundation-rv-print-fields,
    .foundation-rv-pdf-actions {
        grid-template-columns: 1fr;
    }
}

.foundation-rv-actions,
.foundation-rv-compare-bar,
.foundation-rv-list-row,
.foundation-rv-comparison-head,
.foundation-rv-diff-head,
.foundation-rv-diff-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.foundation-rv-actions,
.foundation-rv-compare-bar {
    flex-wrap: wrap;
}

.foundation-rv-actions {
    align-items: flex-end;
}

.foundation-rv-note {
    flex: 1 1 280px;
    min-width: 0;
}

.foundation-rv-note input {
    width: 100%;
}

.foundation-rv-create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    flex: 0 0 auto;
    min-width: 174px;
    min-height: 2.85rem;
    padding: 0.78rem 1.05rem;
    border: 1px solid rgba(254, 215, 170, 0.72);
    border-radius: 16px;
    background:
        linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow:
        0 0 0 3px rgba(245, 158, 11, 0.12),
        0 12px 24px rgba(234, 88, 12, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.foundation-rv-create-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.foundation-rv-create-button:hover,
.foundation-rv-create-button:focus-visible {
    filter: saturate(1.08) brightness(1.05);
    transform: translateY(-1px);
    box-shadow:
        0 0 0 4px rgba(245, 158, 11, 0.18),
        0 16px 30px rgba(234, 88, 12, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.foundation-rv-create-button:active {
    transform: translateY(0);
    box-shadow:
        0 0 0 2px rgba(245, 158, 11, 0.14),
        0 8px 18px rgba(234, 88, 12, 0.24);
}

.foundation-rv-save-button {
    border: 1px solid rgba(187, 247, 208, 0.78);
    border-radius: 16px;
    background:
        linear-gradient(135deg, #22c55e 0%, #06b6d4 55%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.12),
        0 12px 24px rgba(37, 99, 235, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.foundation-rv-share-link {
    min-width: 92px;
}

.foundation-rv-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.foundation-rv-icon-link svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.foundation-rv-empty {
    margin-top: 0.75rem;
}

.foundation-rv-list,
.foundation-rv-comparison {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.foundation-rv-list-row,
.foundation-rv-comparison,
.foundation-rv-metric,
.foundation-rv-diff-table {
    border: 1px solid rgba(160, 196, 255, 0.2);
    background: rgba(255, 255, 255, 0.045);
    border-radius: 8px;
}

.foundation-rv-comparison-toggle {
    margin-top: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(20, 184, 166, 0.08) 46%, rgba(15, 23, 42, 0.62)),
        rgba(255, 255, 255, 0.045);
    box-shadow:
        0 12px 28px rgba(8, 47, 73, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.foundation-rv-comparison-toggle-summary {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.15rem;
    padding: 0.62rem 2.8rem 0.62rem 0.78rem;
    cursor: pointer;
    list-style: none;
}

.foundation-rv-comparison-toggle-summary::-webkit-details-marker {
    display: none;
}

.foundation-rv-comparison-toggle-summary::after {
    content: "+";
    position: absolute;
    right: 0.72rem;
    top: 50%;
    display: grid;
    width: 1.68rem;
    height: 1.68rem;
    place-items: center;
    border: 1px solid rgba(186, 230, 253, 0.72);
    border-radius: 999px;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.32);
    font-weight: 950;
    transform: translateY(-50%);
}

.foundation-rv-comparison-toggle[open] .foundation-rv-comparison-toggle-summary::after {
    content: "-";
}

.foundation-rv-comparison-toggle-summary span,
.foundation-rv-comparison-toggle-summary em {
    color: rgba(227, 239, 255, 0.78);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 850;
}

.foundation-rv-comparison-toggle-summary span {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-rv-comparison-toggle-summary strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.24rem 0.72rem;
    border: 1px solid rgba(186, 230, 253, 0.46);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.58);
    color: #f8fbff;
    font-size: 1.02rem;
    font-weight: 950;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.foundation-rv-comparison-toggle-summary em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.7rem;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #bbf7d0;
    white-space: nowrap;
}

.foundation-rv-comparison-toggle .foundation-rv-comparison {
    margin-top: 0;
    border: 0;
    border-top: 1px solid rgba(160, 196, 255, 0.14);
    border-radius: 0;
    background: transparent;
}

.foundation-rv-list-row {
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
}

.foundation-rv-list-row strong,
.foundation-rv-comparison-head strong {
    color: #f8fbff;
}

.foundation-rv-list-row span,
.foundation-rv-list-row small,
.foundation-rv-comparison-head span {
    color: rgba(227, 239, 255, 0.72);
}

.foundation-rv-comparison {
    gap: 0.42rem;
    padding: 0.52rem;
}

.foundation-rv-comparison-head {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding-block: 0.12rem;
}

.foundation-rv-analysis-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 0.8fr) minmax(280px, 1.3fr);
    gap: 0.45rem;
}

.foundation-rv-verdict-card,
.foundation-rv-impact-card,
.foundation-rv-chart-card {
    border: 1px solid rgba(160, 196, 255, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.46);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.foundation-rv-verdict-card,
.foundation-rv-impact-card {
    display: grid;
    align-content: start;
    gap: 0.32rem;
    padding: 0.56rem;
}

.foundation-rv-verdict-card {
    position: relative;
    overflow: hidden;
}

.foundation-rv-verdict-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #f59e0b;
}

.foundation-rv-verdict-card.is-best::before {
    background: #22c55e;
}

.foundation-rv-verdict-card.is-risk::before {
    background: #fb7185;
}

.foundation-rv-verdict-card.is-even::before {
    background: #7dd3fc;
}

.foundation-rv-verdict-card > span,
.foundation-rv-impact-card > span,
.foundation-rv-chart-label span {
    color: rgba(227, 239, 255, 0.66);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-rv-verdict-card strong,
.foundation-rv-chart-label strong {
    color: #ffffff;
}

.foundation-rv-verdict-card p {
    margin: 0;
    color: rgba(232, 241, 255, 0.78);
    font-size: 0.76rem;
    line-height: 1.28;
}

.foundation-rv-verdict-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.foundation-rv-verdict-pills em {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.28rem 0.48rem;
    border: 1px solid rgba(160, 196, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(245, 249, 255, 0.88);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.foundation-rv-impact-card ul {
    display: grid;
    gap: 0.32rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.foundation-rv-impact-card li {
    position: relative;
    padding-left: 0.88rem;
    color: rgba(232, 241, 255, 0.82);
    font-size: 0.74rem;
    line-height: 1.25;
}

.foundation-rv-impact-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.46rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: #f59e0b;
}

.foundation-rv-chart-card {
    display: grid;
    gap: 0.46rem;
    padding: 0.56rem;
}

.foundation-rv-chart-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.foundation-rv-chart-label {
    display: grid;
    gap: 0.18rem;
}

.foundation-rv-bars {
    display: grid;
    gap: 0.38rem;
}

.foundation-rv-bar-line {
    display: grid;
    grid-template-columns: minmax(62px, 0.18fr) minmax(0, 1fr) minmax(104px, auto);
    gap: 0.5rem;
    align-items: center;
}

.foundation-rv-bar-line span,
.foundation-rv-bar-line strong {
    color: rgba(245, 249, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 850;
}

.foundation-rv-bar-line i {
    display: block;
    min-height: 0.5rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(125, 211, 252, 0.82), rgba(59, 130, 246, 0.8));
    box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.12), 0 8px 16px rgba(59, 130, 246, 0.16);
}

.foundation-rv-bar-line.is-best i {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.92), rgba(20, 184, 166, 0.84));
    box-shadow: 0 0 0 1px rgba(187, 247, 208, 0.16), 0 8px 16px rgba(34, 197, 94, 0.18);
}

.foundation-rv-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
    gap: 0.38rem;
}

.foundation-rv-metric {
    display: grid;
    gap: 0.18rem;
    padding: 0.42rem 0.5rem;
}

.foundation-rv-metric span,
.foundation-rv-diff-head {
    color: rgba(227, 239, 255, 0.68);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-rv-metric strong {
    color: #ffffff;
}

.foundation-rv-diff-table {
    overflow: hidden;
}

.foundation-rv-item-diff-table {
    display: grid;
    overflow-x: auto;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(8, 47, 73, 0.26), rgba(15, 23, 42, 0.5)),
        rgba(255, 255, 255, 0.035);
}

.foundation-rv-item-diff-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.48rem 0.6rem;
    border-bottom: 1px solid rgba(160, 196, 255, 0.14);
}

.foundation-rv-item-diff-title strong {
    color: #ffffff;
    font-weight: 950;
}

.foundation-rv-item-diff-title span {
    color: rgba(227, 239, 255, 0.68);
    font-size: 0.72rem;
}

.foundation-rv-item-diff-head,
.foundation-rv-item-diff-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.28fr) repeat(5, minmax(104px, 0.75fr));
    gap: 0.4rem;
    min-width: 820px;
    padding: 0.4rem 0.6rem;
    align-items: center;
}

.foundation-rv-item-diff-head {
    color: rgba(191, 219, 254, 0.86);
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-rv-item-diff-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 820px;
    padding: 0.36rem 0.6rem;
    border-top: 1px solid rgba(125, 211, 252, 0.18);
    border-bottom: 1px solid rgba(125, 211, 252, 0.08);
    background: rgba(14, 116, 144, 0.16);
}

.foundation-rv-item-diff-group strong {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.16);
    color: #dff7ff;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.foundation-rv-item-diff-group span {
    color: rgba(227, 239, 255, 0.64);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.foundation-rv-item-diff-row {
    border-top: 1px solid rgba(160, 196, 255, 0.14);
    color: rgba(240, 247, 255, 0.9);
    font-size: 0.76rem;
}

.foundation-rv-item-diff-row > span:first-child {
    display: grid;
    gap: 0.2rem;
}

.foundation-rv-item-diff-row > span:first-child strong {
    color: #ffffff;
}

.foundation-rv-item-diff-row small {
    color: rgba(227, 239, 255, 0.58);
    font-size: 0.66rem;
}

.foundation-rv-diff-head,
.foundation-rv-diff-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(110px, 0.7fr));
    padding: 0.38rem 0.52rem;
}

.foundation-rv-diff-row {
    border-top: 1px solid rgba(160, 196, 255, 0.14);
    color: rgba(240, 247, 255, 0.86);
}

.foundation-rv-metric .is-positive,
.foundation-rv-item-diff-row .is-positive,
.foundation-rv-diff-row .is-positive {
    color: #7dd3fc;
}

.foundation-rv-metric .is-negative,
.foundation-rv-item-diff-row .is-negative,
.foundation-rv-diff-row .is-negative {
    color: #fca5a5;
}

.foundation-brief-kpi {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.18rem;
    padding: 0.62rem 0.75rem;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(160, 196, 255, 0.12);
    text-align: center;
}

.foundation-brief-kpi.is-primary-price {
    overflow: hidden;
    transform: none;
    border-color: rgba(16, 185, 129, 0.4);
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.28), transparent 28%),
        linear-gradient(135deg, #10b981, #059669);
    box-shadow:
        0 18px 38px rgba(5, 150, 105, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.foundation-brief-kpi.is-primary-price::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 52%);
    pointer-events: none;
}

.foundation-brief-kpi span,
.foundation-brief-kpi small {
    color: rgba(227, 239, 255, 0.72);
}

.foundation-brief-kpi span {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.foundation-brief-kpi strong {
    color: #eff7ff;
    font-size: 1.14rem;
}

.foundation-brief-kpi.is-primary-price span,
.foundation-brief-kpi.is-primary-price small,
.foundation-brief-kpi.is-primary-price strong {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.foundation-brief-kpi.is-primary-price strong {
    font-size: 1.28rem;
    text-shadow: 0 8px 20px rgba(4, 120, 87, 0.28);
}

.foundation-brief-kpi.is-primary-price small {
    color: rgba(236, 253, 245, 0.88);
}

.foundation-brief-kpi small {
    font-size: 0.72rem;
}

.foundation-compact-sheet {
    display: grid;
    gap: 0.78rem;
    margin-top: 0.95rem;
    padding: 0.9rem;
    border: 1px solid rgba(160, 196, 255, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(235, 243, 250, 0.96)),
        radial-gradient(circle at top right, rgba(64, 126, 201, 0.12), transparent 38%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 14px 34px rgba(7, 14, 24, 0.18);
}

.foundation-compact-sheet-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.foundation-compact-sheet-head h3 {
    margin: 0.15rem 0 0;
    color: #1c2f4a;
    font-size: 1rem;
}

.foundation-compact-sheet .eyebrow {
    color: #5d7191;
}

.foundation-compact-sheet-total {
    display: grid;
    justify-items: center;
    gap: 0.12rem;
    min-width: 132px;
    padding: 0.58rem 0.72rem;
    border: 1px solid rgba(35, 95, 86, 0.18);
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(229, 248, 240, 0.98), rgba(204, 235, 221, 0.92));
    text-align: center;
}

.foundation-compact-sheet-total span {
    color: #426a5d;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-sheet-total strong {
    color: #174536;
    font-size: 1.05rem;
}

.foundation-sog-brief-card {
    order: 3;
    margin-top: 0.85rem;
}

.foundation-waterproofing-card {
    order: 4;
    margin-top: 0.85rem;
}

.foundation-module-menu-badge-sog {
    border-color: rgba(14, 116, 144, 0.42);
    background: linear-gradient(145deg, rgba(14, 116, 144, 0.98), rgba(31, 113, 128, 0.92));
    box-shadow:
        0 16px 34px rgba(14, 116, 144, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.foundation-module-menu-badge-waterproofing {
    border-color: rgba(13, 148, 136, 0.42);
    background: linear-gradient(145deg, rgba(13, 148, 136, 0.98), rgba(15, 118, 110, 0.92));
    box-shadow:
        0 16px 34px rgba(13, 148, 136, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.foundation-sog-breakdown-card {
    border-color: rgba(14, 116, 144, 0.2);
    background:
        linear-gradient(180deg, rgba(248, 252, 255, 0.98), rgba(235, 243, 250, 0.96)),
        radial-gradient(circle at top right, rgba(14, 116, 144, 0.1), transparent 38%);
}

.foundation-waterproofing-breakdown-card {
    border-color: rgba(13, 148, 136, 0.2);
}

.foundation-other-elements-breakdown-card {
    margin-top: 0.9rem;
    border-color: rgba(202, 138, 4, 0.24);
}

.foundation-sog-empty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(14, 116, 144, 0.18);
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.09);
    color: #0e7490;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-edit-menu {
    display: grid;
    grid-template-columns: minmax(11rem, 1.25fr) auto minmax(7rem, 0.65fr) minmax(14rem, 1.45fr) minmax(7rem, 0.68fr) minmax(8rem, 0.74fr) minmax(8rem, 0.78fr);
    gap: 0.45rem;
    align-items: center;
    padding: 0.52rem;
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 252, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 22px rgba(15, 23, 42, 0.06);
}

.foundation-sog-edit-menu > strong {
    color: #111827;
    font-size: 0.88rem;
}

.foundation-sog-edit-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.foundation-sog-model-toggle {
    appearance: none;
    display: inline-grid;
    grid-template-columns: 2rem minmax(6.4rem, 1fr) 0.72rem;
    align-items: center;
    gap: 0.48rem;
    min-height: 2.42rem;
    min-width: 12.6rem;
    padding: 0.26rem 0.58rem 0.26rem 0.32rem;
    border: 1px solid rgba(14, 116, 144, 0.28);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(236, 254, 255, 0.98), rgba(239, 246, 255, 0.94));
    color: #0f5f6b;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(14, 116, 144, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.foundation-sog-model-toggle:hover,
.foundation-sog-model-toggle:focus-visible {
    border-color: rgba(14, 116, 144, 0.46);
    background:
        linear-gradient(135deg, rgba(207, 250, 254, 0.98), rgba(219, 234, 254, 0.96));
    box-shadow: 0 13px 22px rgba(14, 116, 144, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    outline: none;
}

.foundation-sog-model-toggle.is-open {
    border-color: rgba(22, 163, 74, 0.42);
    background:
        linear-gradient(135deg, rgba(220, 252, 231, 0.98), rgba(236, 254, 255, 0.94));
    color: #166534;
}

.foundation-sog-model-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(14, 116, 144, 0.12);
    color: currentColor;
}

.foundation-sog-model-toggle.is-open .foundation-sog-model-toggle-icon {
    background: rgba(22, 163, 74, 0.14);
}

.foundation-sog-model-toggle-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.foundation-sog-model-toggle-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
    text-align: left;
}

.foundation-sog-model-toggle-copy > span {
    overflow: hidden;
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-sog-model-toggle-copy small {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1;
}

.foundation-sog-model-toggle-caret {
    width: 0.48rem;
    height: 0.48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.16s ease;
}

.foundation-sog-model-toggle.is-open .foundation-sog-model-toggle-caret {
    transform: rotate(225deg) translateY(-1px);
}

.foundation-sog-delete-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    overflow: hidden;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 999px;
    background: rgba(254, 226, 226, 0.7);
    color: transparent;
    cursor: pointer;
}

.foundation-sog-delete-button::before {
    content: "";
    position: absolute;
    width: 0.78rem;
    height: 0.78rem;
    border: 1.7px solid currentColor;
    border-top: 0;
    border-radius: 0 0 3px 3px;
    color: #dc2626;
}

.foundation-sog-delete-button::after {
    content: "";
    position: absolute;
    top: 0.44rem;
    width: 0.9rem;
    height: 1.7px;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 -0.18rem 0 -0.03rem #dc2626;
}

.foundation-sog-edit-field {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.foundation-sog-edit-field span {
    color: #3558a2;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-edit-menu .foundation-sog-edit-field span,
.foundation-sog-edit-menu label span {
    color: #3558a2;
    opacity: 1;
}

.foundation-sog-edit-field input,
.foundation-sog-edit-field select {
    width: 100%;
    min-width: 0;
    height: 2rem;
    padding: 0.32rem 0.58rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    color: #172a45;
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
}

.foundation-sog-edit-field select {
    text-align: left;
}

.foundation-sog-menu-stat {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    min-height: 2.2rem;
    align-content: center;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
}

.foundation-sog-menu-stat span {
    color: #3558a2;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.foundation-sog-menu-stat strong {
    display: block;
    overflow: hidden;
    color: #172a45;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-sog-menu-stat.is-wide strong {
    text-align: left;
}

.foundation-sog-add-strip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem 0.78rem;
    border: 1px dashed rgba(14, 116, 144, 0.34);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(236, 254, 255, 0.9), rgba(240, 249, 255, 0.72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.foundation-sog-add-primary {
    min-height: 2.28rem;
    padding: 0.46rem 0.92rem;
    border-color: rgba(14, 116, 144, 0.48);
    border-radius: 999px;
    background: linear-gradient(135deg, #0e7490, #0f766e);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(14, 116, 144, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.foundation-sog-add-primary:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(14, 116, 144, 0.2);
}

.foundation-sog-add-strip span {
    color: #0f5f6b;
    font-size: 0.78rem;
    font-weight: 800;
}

.foundation-sog-template-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.66rem 0.78rem;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 14px;
    background: rgba(248, 252, 255, 0.86);
}

.foundation-sog-template-strip > span {
    color: #25466f;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-template-strip button,
.foundation-sog-row-duplicate {
    min-height: 1.96rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.95);
    color: #3558a2;
    font-size: 0.7rem;
    font-weight: 900;
    cursor: pointer;
}

.foundation-sog-template-strip button:hover,
.foundation-sog-row-duplicate:hover {
    border-color: rgba(53, 88, 162, 0.34);
    background: rgba(219, 234, 254, 0.95);
}

.foundation-sog-template-strip button.is-active {
    border-color: rgba(14, 116, 144, 0.5);
    background: linear-gradient(135deg, #0e7490, #0f766e);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(14, 116, 144, 0.16);
}

.foundation-sog-input-board {
    display: grid;
    gap: 0.62rem;
    padding: 0.72rem;
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 253, 0.9));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.foundation-sog-input-board[hidden] {
    display: none;
}

.foundation-sog-input-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.1rem;
}

.foundation-sog-input-head h3 {
    margin: 0.12rem 0 0;
    color: #172a45;
    font-size: 0.95rem;
}

.foundation-sog-rows {
    display: grid;
    gap: 0.58rem;
}

.foundation-sog-row {
    position: relative;
    display: grid;
    gap: 0.5rem;
    padding: 0.62rem 0.68rem;
    overflow: hidden;
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.9));
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.06);
}

.foundation-sog-row[data-sog-status="calculated"] {
    border-color: rgba(15, 118, 110, 0.26);
}

.foundation-sog-row[data-sog-status="review"] {
    border-color: rgba(220, 38, 38, 0.24);
}

.foundation-sog-row::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.28rem;
    background: linear-gradient(180deg, #0e7490, #235f56);
}

.foundation-sog-row[data-sog-status="incomplete"]::before {
    background: linear-gradient(180deg, #d97706, #b45309);
}

.foundation-sog-row[data-sog-status="review"]::before {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.foundation-sog-row-head {
    display: grid;
    grid-template-columns: minmax(8.5rem, 0.75fr) minmax(16rem, 1.6fr) minmax(5.8rem, auto) minmax(6.6rem, auto);
    gap: 0.5rem;
    align-items: end;
}

.foundation-sog-row-head label {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.foundation-sog-row-head label > span,
.foundation-sog-input-board .foundation-sog-row-head label > span {
    color: #25466f;
    opacity: 1;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-row-head input,
.foundation-sog-row-head select {
    width: 100%;
    min-width: 0;
    min-height: 1.96rem;
    padding: 0.34rem 0.56rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 9px;
    background: #ffffff;
    color: #10233d;
    font-size: 0.82rem;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 0 rgba(15, 23, 42, 0.02);
}

.foundation-sog-row-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    justify-self: end;
    white-space: nowrap;
    min-height: 1.96rem;
    min-width: 6.15rem;
    padding: 0.3rem 0.62rem;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 10px;
    background: rgba(254, 242, 242, 0.92);
    color: #b91c1c;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(185, 28, 28, 0.07);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.foundation-sog-row-remove svg {
    flex: 0 0 auto;
    width: 0.92rem;
    height: 0.92rem;
}

.foundation-sog-row-remove span {
    display: inline-block;
}

.foundation-sog-row-remove:hover {
    border-color: rgba(220, 38, 38, 0.32);
    background: rgba(254, 226, 226, 0.94);
    transform: translateY(-1px);
}

.foundation-sog-row-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    padding: 0.36rem 0.58rem;
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(240, 253, 250, 0.82), rgba(240, 249, 255, 0.72));
}

.foundation-sog-row-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.18rem;
    padding: 0.15rem 0.42rem;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.foundation-sog-reinforcement-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.18rem;
    padding: 0.15rem 0.44rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 999px;
    background: rgba(219, 234, 254, 0.72);
    color: #1d4ed8;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-sog-reinforcement-tag.is-wire-mesh {
    border-color: rgba(13, 148, 136, 0.22);
    background: rgba(204, 251, 241, 0.78);
    color: #0f766e;
}

.foundation-sog-row[data-sog-status="calculated"] .foundation-sog-row-status {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.foundation-sog-row[data-sog-status="review"] .foundation-sog-row-status {
    background: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
}

.foundation-sog-row-summary strong {
    color: #10233d;
    font-size: 0.92rem;
    font-weight: 950;
}

.foundation-sog-row-summary > span:last-child {
    color: #536987;
    font-size: 0.76rem;
    font-weight: 800;
}

.foundation-sog-row-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.foundation-sog-row-alerts[hidden] {
    display: none;
}

.foundation-sog-row-alerts span {
    display: inline-flex;
    align-items: center;
    min-height: 1.28rem;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
}

.foundation-sog-row-alerts .is-warning {
    background: rgba(251, 191, 36, 0.16);
    color: #92400e;
}

.foundation-sog-row-alerts .is-danger {
    background: rgba(254, 226, 226, 0.9);
    color: #b91c1c;
}

.foundation-sog-row-alerts .is-info {
    background: rgba(219, 234, 254, 0.9);
    color: #1d4ed8;
}

.foundation-sog-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.foundation-sog-mode-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.34rem 0.58rem;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 999px;
    background: rgba(248, 252, 255, 0.9);
    color: #3558a2;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-sog-input-board .foundation-sog-mode-toggle label span {
    color: #3558a2;
}

.foundation-sog-mode-toggle input {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0;
}

.foundation-sog-input-grid,
.foundation-sog-output-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.5rem;
}

.foundation-sog-input-grid label,
.foundation-sog-output-grid label {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.foundation-sog-field.is-alert input,
.foundation-sog-field.is-alert select {
    border-color: rgba(217, 119, 6, 0.48) !important;
    background: rgba(255, 251, 235, 0.96) !important;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

.foundation-sog-field.is-danger input,
.foundation-sog-field.is-danger select {
    border-color: rgba(220, 38, 38, 0.58) !important;
    background: rgba(254, 242, 242, 0.98) !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

.foundation-sog-field-alert {
    color: #92400e;
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.15;
}

.foundation-sog-field.is-danger .foundation-sog-field-alert {
    color: #b91c1c;
}

.foundation-sog-field.is-half {
    grid-column: span 6;
}

.foundation-sog-field.is-third {
    grid-column: span 4;
}

.foundation-sog-mat-group {
    display: grid;
    grid-column: span 3;
    grid-template-columns: auto minmax(9rem, 13rem);
    align-items: end;
    gap: 0.34rem;
    padding: 0.46rem;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 10px;
    background: rgba(248, 252, 255, 0.72);
}

.foundation-sog-mat-group > strong {
    color: #0f5f6b;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.foundation-sog-mat-group > div {
    display: grid;
    grid-template-columns: minmax(3.8rem, 5.2rem) minmax(4.6rem, 6rem);
    gap: 0.34rem;
    justify-content: start;
}

.foundation-sog-mesh-group {
    display: grid;
    grid-column: span 6;
    align-content: center;
    gap: 0.24rem;
    min-height: 4.6rem;
    padding: 0.46rem;
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 10px;
    background: rgba(240, 253, 250, 0.72);
}

.foundation-sog-mesh-group[hidden],
.foundation-sog-mat-group[hidden] {
    display: none;
}

.foundation-sog-mesh-group > strong {
    color: #0f5f6b;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-mesh-group > span {
    color: #25466f;
    font-size: 0.78rem;
    font-weight: 850;
}

.foundation-sog-mesh-group label {
    display: grid;
    gap: 0.28rem;
}

.foundation-sog-mesh-group label > span {
    color: #25466f;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-mesh-group select {
    width: 100%;
    min-width: 0;
    min-height: 1.96rem;
    padding: 0.34rem 0.56rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 9px;
    background: #ffffff;
    color: #16233a;
    font-size: 0.84rem;
    font-weight: 800;
}

.foundation-sog-cost-group {
    display: grid;
    grid-column: span 6;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
    padding: 0.46rem;
    border: 1px solid rgba(14, 116, 144, 0.12);
    border-radius: 10px;
    background: rgba(240, 253, 250, 0.62);
}

.foundation-sog-cost-group label {
    display: grid;
    gap: 0.12rem;
    position: relative;
}

.foundation-sog-cost-group em {
    position: absolute;
    right: 0.4rem;
    top: 1.42rem;
    padding: 0.08rem 0.32rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 950;
}

.foundation-sog-cost-group em.is-override {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.foundation-sog-cost-group small {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1;
}

.foundation-sog-cost-group input {
    padding-right: 4.7rem !important;
}

.foundation-sog-input-board .foundation-sog-input-grid span,
.foundation-sog-input-board .foundation-sog-output-grid span {
    color: #25466f;
    opacity: 1;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.foundation-sog-input-board .foundation-sog-input-grid input,
.foundation-sog-input-board .foundation-sog-input-grid select {
    width: 100%;
    min-width: 0;
    min-height: 1.96rem;
    padding: 0.34rem 0.56rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 9px;
    background: #ffffff;
    color: #10233d;
    font-size: 0.82rem;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 1px 0 rgba(15, 23, 42, 0.02);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.foundation-sog-input-board .foundation-sog-row-head input:focus,
.foundation-sog-input-board .foundation-sog-row-head select:focus,
.foundation-sog-input-board .foundation-sog-input-grid input:focus,
.foundation-sog-input-board .foundation-sog-input-grid select:focus {
    outline: none;
    border-color: rgba(14, 116, 144, 0.48);
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.foundation-sog-metric-card {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 0.68rem;
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(236, 254, 255, 0.82), rgba(240, 253, 250, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.foundation-sog-metric-card:nth-child(1),
.foundation-sog-metric-card:nth-child(2) {
    grid-column: span 2;
}

.foundation-sog-metric-card:nth-child(5),
.foundation-sog-metric-card:nth-child(6) {
    grid-column: span 3;
}

.foundation-sog-metric-card span {
    color: #25466f;
    font-size: 0.65rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.foundation-sog-metric-card strong {
    color: #0f5f6b;
    font-size: 1.16rem;
    font-weight: 950;
    line-height: 1.1;
}

.foundation-sog-metric-card.is-money strong {
    color: #8b4d17;
}

.foundation-sog-metric-card small {
    color: #61748e;
    font-size: 0.7rem;
    font-weight: 800;
}

.foundation-sog-breakdown-table {
    min-width: 1120px;
}

.foundation-waterproofing-table {
    min-width: 1180px;
}

.foundation-other-elements-table {
    min-width: 1180px;
}

.foundation-waterproofing-table select,
.foundation-waterproofing-table input[type="number"] {
    width: 100%;
    min-height: 2rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #1e293b;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}

.foundation-waterproofing-table select {
    min-width: 24rem;
    padding: 0.34rem 0.5rem;
}

.foundation-waterproofing-table input[type="number"] {
    min-width: 6.5rem;
    padding: 0.34rem 0.42rem;
    text-align: right;
}

.foundation-other-elements-table td[data-other-elements-editable-cell] {
    padding: 0.22rem 0.28rem;
    background: #fff6bf !important;
}

.foundation-other-elements-add-button {
    border: 1px solid rgba(35, 95, 86, 0.32);
    background: linear-gradient(135deg, #2f8f7a, #235f56);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(35, 95, 86, 0.2);
}

.foundation-other-elements-add-button:hover,
.foundation-other-elements-add-button:focus-visible {
    border-color: rgba(35, 95, 86, 0.5);
    background: linear-gradient(135deg, #36a68d, #1f6a54);
    color: #ffffff;
    transform: translateY(-1px);
}

.foundation-other-elements-table tbody tr:hover td[data-other-elements-editable-cell],
.foundation-other-elements-table tbody tr:nth-child(even) td[data-other-elements-editable-cell] {
    background: #fff6bf !important;
}

.foundation-other-elements-editable {
    width: 100%;
    min-height: 2rem;
    border: 1px solid rgba(180, 130, 0, 0.34);
    border-radius: 4px;
    background: #fff8cc;
    color: #0f172a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.foundation-other-elements-editable:focus {
    background: #fff3a3;
    outline: 2px solid rgba(202, 138, 4, 0.44);
    outline-offset: 1px;
}

.foundation-other-elements-number {
    text-align: right;
}

.foundation-other-elements-options {
    width: min(100%, 34rem);
    margin-top: 1rem;
    overflow: visible;
}

.foundation-other-elements-options table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.82rem;
}

.foundation-other-elements-options th,
.foundation-other-elements-options td {
    padding: 0.42rem 0.56rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #ffffff;
    color: #172a45;
    text-align: left;
}

.foundation-other-elements-options th {
    background: #e8f1f8;
    color: #1f3d5d;
    font-weight: 900;
}

.foundation-other-elements-options th:first-child {
    background: #fff6bf;
    color: #111827;
}

.foundation-other-elements-options tbody tr:nth-child(odd) td {
    background: #f1f5f9;
}

.foundation-other-elements-options tbody td:last-child {
    text-align: right;
    font-weight: 850;
}

.foundation-sog-breakdown-empty-note {
    display: grid;
    place-items: center;
    min-height: 4.8rem;
    padding: 1rem;
    border: 1px dashed rgba(14, 116, 144, 0.22);
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.86);
    color: #536987;
    font-size: 0.82rem;
    font-weight: 850;
    text-align: center;
}

.foundation-sog-breakdown-empty-note[hidden] {
    display: none;
}

.foundation-sog-breakdown-tools {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
}

.foundation-sog-breakdown-tools button {
    min-height: 1.65rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.92);
    color: #3558a2;
    font-size: 0.68rem;
    font-weight: 900;
    cursor: pointer;
}

.foundation-sog-breakdown-tools button[aria-pressed="true"] {
    border-color: rgba(14, 116, 144, 0.32);
    background: rgba(236, 254, 255, 0.95);
    color: #0e7490;
}

.foundation-sog-empty-badge.is-live {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

.foundation-sog-breakdown-card[data-sog-show-empty="false"] .is-sog-empty-row {
    display: none;
}

.foundation-sog-breakdown-card[data-sog-show-empty="false"][data-sog-has-live="false"] .foundation-sog-breakdown-table thead,
.foundation-sog-breakdown-card[data-sog-show-empty="false"][data-sog-has-live="false"] .foundation-sog-breakdown-table tfoot,
.foundation-sog-breakdown-card[data-sog-show-empty="false"][data-sog-has-live="false"] .foundation-sog-schedule-grid {
    display: none;
}

.foundation-sog-breakdown-table .is-empty-cell {
    min-width: 5.2rem;
    color: #94a3b8;
}

.foundation-sog-breakdown-table .is-empty-cell::after {
    content: "-";
}

.foundation-sog-breakdown-table .is-empty-cell[data-sog-has-value="true"]::after {
    content: "";
}

.foundation-sog-breakdown-table .is-empty-cell[data-sog-editable-cell]::after {
    content: "";
}

.foundation-sog-breakdown-table .is-empty-cell[data-sog-editable-cell] {
    min-width: 9rem;
}

.foundation-sog-schedule-grid {
    display: grid;
    grid-template-columns: minmax(9rem, 0.72fr) repeat(5, minmax(8rem, 1fr));
    overflow-x: auto;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.foundation-sog-schedule-grid > div {
    min-height: 2.15rem;
    padding: 0.48rem 0.58rem;
    border-right: 1px solid rgba(53, 88, 162, 0.1);
}

.foundation-sog-schedule-grid > div:last-child {
    border-right: 0;
}

.foundation-sog-schedule-label {
    display: grid;
    place-items: center;
    background: rgba(53, 88, 162, 0.08);
    color: #24364f;
    font-weight: 900;
    text-align: center;
}

.foundation-sog-schedule-grid span {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.foundation-sog-schedule-grid strong {
    display: block;
    min-height: 0.8rem;
    text-align: center;
}

.foundation-decision-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
    margin-bottom: 0.75rem;
}

.foundation-decision-card {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 0.36rem;
    min-height: 112px;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

.foundation-decision-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

.foundation-decision-card span {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.foundation-decision-card strong {
    color: #172a45;
    font-size: 1rem;
    line-height: 1.15;
}

.foundation-decision-card p {
    margin: 0;
    color: #536987;
    font-size: 0.82rem;
    line-height: 1.35;
}

.foundation-decision-card.is-danger {
    border-color: rgba(220, 38, 38, 0.22);
    background:
        linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.76));
}

.foundation-decision-card.is-danger::before {
    background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.foundation-decision-card.is-danger strong {
    color: #991b1b;
}

.foundation-decision-card.is-warning {
    border-color: rgba(245, 158, 11, 0.26);
    background:
        linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.78));
}

.foundation-decision-card.is-warning::before {
    background: linear-gradient(180deg, #f59e0b, #ea580c);
}

.foundation-decision-card.is-warning strong {
    color: #9a3412;
}

.foundation-decision-card.is-good {
    border-color: rgba(16, 185, 129, 0.22);
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.78));
}

.foundation-decision-card.is-good::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.foundation-decision-card.is-good strong {
    color: #047857;
}

.foundation-decision-card.is-neutral {
    border-color: rgba(100, 116, 139, 0.2);
    background:
        linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.78));
}

.foundation-decision-card.is-neutral::before {
    background: linear-gradient(180deg, #94a3b8, #475569);
}

.foundation-decision-card.is-neutral strong {
    color: #334155;
}

.foundation-decision-card.is-driver {
    border-color: rgba(37, 99, 235, 0.22);
    background:
        radial-gradient(circle at 88% 14%, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.76));
}

.foundation-decision-card.is-driver::before {
    background: linear-gradient(180deg, #06b6d4, #2563eb);
}

.foundation-decision-card.is-driver strong {
    color: #1e40af;
}

.foundation-compact-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.foundation-compact-kpi {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.32rem;
    min-height: 86px;
    padding: 0.78rem 0.88rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    text-align: center;
}

.foundation-compact-kpi.is-cost {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
}

.foundation-compact-kpi.is-cost span i {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.foundation-compact-kpi span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    color: #536987;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-kpi span i {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.12);
    color: #3558a2;
    font-size: 0.68rem;
    font-style: normal;
    letter-spacing: 0;
}

.foundation-compact-kpi strong {
    color: #172a45;
    font-size: 1.16rem;
    line-height: 1.1;
}

.foundation-compact-kpi small {
    color: #61748e;
    font-size: 0.78rem;
}

.foundation-compact-percent-control {
    display: inline-grid;
    grid-template-columns: minmax(4.6rem, 5.2rem) auto;
    align-items: center;
    gap: 0.28rem;
}

.foundation-compact-percent-input {
    width: 100%;
    min-height: 1.78rem;
    border: 1px solid rgba(53, 88, 162, 0.24);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #172a45;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.foundation-compact-percent-input[readonly] {
    background: rgba(255, 255, 255, 0.64);
    color: #42526b;
}

.foundation-compact-percent-edit {
    min-height: 1.78rem;
    padding: 0 0.52rem;
    border: 1px solid rgba(53, 88, 162, 0.24);
    border-radius: 6px;
    background: #ffffff;
    color: #3558a2;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    cursor: pointer;
}

.foundation-compact-percent-edit:hover,
.foundation-compact-percent-edit:focus-visible {
    border-color: rgba(53, 88, 162, 0.5);
    background: #eef4ff;
}

.foundation-compact-unit-price-rule {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.25rem;
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-radius: 999px;
    background: rgba(238, 244, 255, 0.76);
    color: #4f647d;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
}

.foundation-compact-unit-price-rule:hover,
.foundation-compact-unit-price-rule:focus-visible {
    border-color: rgba(53, 88, 162, 0.42);
    background: #eef4ff;
    outline: none;
}

.foundation-compact-add-equipment {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    margin-left: 0.35rem;
    border: 1px solid rgba(166, 91, 31, 0.25);
    border-radius: 999px;
    background: #fff7ed;
    color: #9a531c;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.foundation-compact-add-equipment:hover,
.foundation-compact-add-equipment:focus-visible {
    border-color: rgba(166, 91, 31, 0.55);
    background: #ffedd5;
}

.foundation-pump-equipment-modal-card {
    max-width: 760px;
}

.foundation-pump-equipment-close-button {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 2.2rem;
    padding: 0.48rem 0.8rem;
    border: 1px solid rgba(100, 116, 139, 0.28);
    border-radius: 999px;
    background: #ffffff;
    color: #172a45;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.foundation-pump-equipment-close-button span {
    display: inline-grid;
    place-items: center;
    width: 1.12rem;
    height: 1.12rem;
    border-radius: 999px;
    background: #172a45;
    color: #ffffff;
    font-size: 0.9rem;
    line-height: 1;
}

.foundation-pump-equipment-close-button:hover,
.foundation-pump-equipment-close-button:focus-visible {
    border-color: rgba(166, 91, 31, 0.44);
    background: #fff7ed;
    color: #9a531c;
}

.foundation-pump-equipment-close-button:hover span,
.foundation-pump-equipment-close-button:focus-visible span {
    background: #9a531c;
}

.foundation-pump-equipment-cancel-button {
    border-color: rgba(100, 116, 139, 0.28);
    background: #ffffff;
    color: #172a45;
}

.foundation-pump-equipment-modal-body {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.foundation-pump-equipment-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 9rem;
    gap: 0.85rem;
}

.foundation-pump-equipment-notes {
    grid-column: 1 / -1;
}

.foundation-pump-equipment-summary {
    overflow: hidden;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 8px;
    background: #f8fafc;
}

.foundation-pump-equipment-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0.86rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.16);
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.foundation-pump-equipment-summary-head strong {
    color: #172a45;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.foundation-pump-equipment-summary table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.foundation-pump-equipment-summary th,
.foundation-pump-equipment-summary td {
    padding: 0.58rem 0.72rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.14);
    color: #334155;
    text-align: left;
    vertical-align: top;
}

.foundation-pump-equipment-summary th {
    color: #172a45;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-pump-equipment-summary .is-number,
.foundation-pump-equipment-summary tfoot th:nth-last-child(-n + 2) {
    text-align: right;
    white-space: nowrap;
}

.foundation-pump-equipment-summary .is-strong,
.foundation-pump-equipment-summary tfoot th {
    color: #172a45;
    font-weight: 900;
}

.foundation-pump-equipment-summary tfoot th {
    background: #eaf1fb;
    border-bottom: 0;
}

@media (max-width: 720px) {
    .foundation-pump-equipment-grid {
        grid-template-columns: 1fr;
    }

    .foundation-pump-equipment-summary {
        overflow-x: auto;
    }
}

.foundation-compact-kpi.is-om {
    border-color: rgba(37, 99, 235, 0.2);
    background:
        linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.92));
}

.foundation-compact-kpi.is-om span i {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.foundation-compact-kpi.is-om strong {
    color: #1e40af;
}

.foundation-compact-kpi.is-profit {
    border-color: rgba(16, 185, 129, 0.22);
    background:
        linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.9));
}

.foundation-compact-kpi.is-profit span i {
    background: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.foundation-compact-kpi.is-profit strong {
    color: #047857;
}

.foundation-compact-kpi.is-proposal {
    position: relative;
    overflow: hidden;
    border-color: rgba(5, 150, 105, 0.34);
    background:
        radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.3), transparent 30%),
        linear-gradient(135deg, #10b981, #059669);
    box-shadow:
        0 14px 30px rgba(5, 150, 105, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.foundation-compact-kpi.is-proposal::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 54%);
    pointer-events: none;
}

.foundation-compact-kpi.is-proposal span,
.foundation-compact-kpi.is-proposal strong {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.foundation-compact-kpi.is-proposal strong {
    color: #ffffff;
    font-size: 1.28rem;
    text-shadow: 0 8px 18px rgba(4, 120, 87, 0.25);
}

.foundation-compact-kpi.is-proposal span i {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.foundation-compact-kpi.is-unit {
    background: rgba(225, 246, 249, 0.9);
}

.foundation-compact-kpi.is-unit span i {
    background: rgba(67, 190, 203, 0.18);
    color: #0f6b78;
}

.foundation-compact-composition {
    display: grid;
    gap: 0.55rem;
}

.foundation-compact-composition-bar {
    display: flex;
    width: 100%;
    height: 1rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.1);
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.18),
        0 8px 18px rgba(53, 88, 162, 0.08);
}

.foundation-compact-composition-bar span {
    display: block;
    min-width: 0.55rem;
    cursor: help;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.foundation-compact-composition-bar span:hover {
    filter: brightness(1.12) saturate(1.14);
}

.foundation-compact-composition-bar .is-material,
.foundation-compact-composition-legend .is-material::before,
.foundation-compact-category-chip.is-material {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.foundation-compact-composition-bar .is-equipment,
.foundation-compact-composition-legend .is-equipment::before,
.foundation-compact-category-chip.is-equipment {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.foundation-compact-composition-bar .is-labor,
.foundation-compact-composition-legend .is-labor::before,
.foundation-compact-category-chip.is-labor {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.foundation-compact-category-chip.is-risk {
    background: #b42318;
}

.foundation-compact-composition-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.foundation-compact-composition-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: #536987;
    font-size: 0.8rem;
    font-weight: 800;
}

.foundation-compact-composition-legend span::before {
    content: "";
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
}

.foundation-compact-sheet-scroll {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.foundation-compact-sheet-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.foundation-compact-sheet-table th,
.foundation-compact-sheet-table td {
    padding: 0.72rem 0.82rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
    color: #223854;
    text-align: center;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.foundation-compact-sheet-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.98), rgba(226, 232, 240, 0.96));
    color: #536987;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-sheet-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.74);
}

.foundation-compact-sheet-table tbody tr:hover td {
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1), inset 0 -1px 0 rgba(148, 163, 184, 0.1);
}

.foundation-compact-sheet-table tbody tr.is-expandable {
    cursor: pointer;
}

.foundation-compact-sheet-table tbody tr.is-expandable:focus-visible td {
    outline: 2px solid rgba(53, 88, 162, 0.42);
    outline-offset: -2px;
}

.foundation-compact-row-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-right: 0.34rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.1);
    vertical-align: -0.12rem;
}

.foundation-compact-row-caret::before {
    content: "";
    width: 0.36rem;
    height: 0.36rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
}

.foundation-compact-sheet-table tbody tr.is-expanded .foundation-compact-row-caret::before {
    transform: rotate(45deg);
}

.foundation-compact-detail-row td {
    padding: 0.72rem 0.9rem;
    background: rgba(246, 250, 255, 0.94);
    text-align: left;
    white-space: normal;
}

.foundation-compact-detail-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.foundation-compact-detail-panel div {
    display: grid;
    gap: 0.16rem;
    padding: 0.54rem 0.64rem;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.foundation-compact-detail-panel span {
    color: #536987;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-detail-panel strong {
    color: #172a45;
    font-size: 0.82rem;
    line-height: 1.35;
}

.foundation-compact-detail-table-wrap {
    overflow-x: auto;
}

.foundation-compact-sheet-table .foundation-compact-detail-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.foundation-compact-sheet-table .foundation-compact-detail-table th,
.foundation-compact-sheet-table .foundation-compact-detail-table td {
    padding: 0.62rem 0.68rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: #172a45;
    font-size: 0.78rem;
    text-align: center;
    white-space: normal;
}

.foundation-compact-sheet-table .foundation-compact-detail-table th {
    color: #536987;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-sheet-table .foundation-compact-detail-table td.is-number,
.foundation-compact-sheet-table .foundation-compact-detail-table th.is-number {
    text-align: center;
    white-space: nowrap;
}

.foundation-compact-sheet-table .foundation-compact-detail-table td:first-child,
.foundation-compact-sheet-table .foundation-compact-detail-table th:first-child {
    text-align: left;
}

.foundation-compact-sheet-table .foundation-compact-detail-table td.is-strong,
.foundation-compact-sheet-table .foundation-compact-detail-table td.is-total-price {
    font-weight: 900;
}

.foundation-compact-sheet-table .foundation-compact-detail-table tfoot th {
    background: rgba(230, 239, 252, 0.92);
    font-size: 0.7rem;
}

.foundation-compact-detail-note {
    max-width: 28rem;
    color: #536987;
    line-height: 1.35;
}

.foundation-compact-sheet-table .foundation-compact-group-row td {
    padding: 0.58rem 0.82rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(246, 250, 255, 0.96);
    text-align: left;
}

.foundation-compact-group-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.64rem;
    text-transform: uppercase;
}

.foundation-compact-group-row span::before {
    content: "";
    width: 0.54rem;
    height: 0.54rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.foundation-compact-group-row.is-material span {
    background: #3558a2;
}

.foundation-compact-group-row.is-equipment span {
    background: #9c5a22;
}

.foundation-compact-group-row.is-labor span {
    background: #1f7180;
}

.foundation-compact-group-row.is-risk span {
    background: #b42318;
}

.foundation-compact-sheet-table tbody tr.is-material td:first-child {
    border-left: 5px solid #3558a2;
}

.foundation-compact-sheet-table tbody tr.is-equipment td:first-child {
    border-left: 5px solid #9c5a22;
}

.foundation-compact-sheet-table tbody tr.is-labor td:first-child {
    border-left: 5px solid #1f7180;
}

.foundation-compact-sheet-table tbody tr.is-risk td:first-child {
    border-left: 5px solid #b42318;
}

.foundation-compact-sheet-table tbody tr.is-risk td {
    background: rgba(180, 35, 24, 0.045);
}

.foundation-compact-sheet-table tbody tr.is-major:not(.is-zero) td {
    background: rgba(255, 251, 235, 0.62);
}

.foundation-compact-sheet-table tbody tr:hover:not(.foundation-compact-group-row):not(.foundation-compact-detail-row) td {
    background: #f8fafc;
}

.foundation-compact-sheet-table tr.is-zero td {
    color: #8a98aa;
    opacity: 0.58;
}

.foundation-compact-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.82rem;
    height: 0.82rem;
    min-height: 0;
    padding: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 0;
    font-weight: 800;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.78);
}

.foundation-compact-category-cell {
    width: 4.2rem;
    text-align: center;
}

.foundation-compact-item-name {
    color: #172a45;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
}

.foundation-compact-sheet-table tr.is-zero .foundation-compact-item-name {
    color: #8a98aa;
    font-weight: 700;
}

.foundation-compact-sheet-table tr.is-labor td {
    color: #1f7180;
    background: rgba(67, 190, 203, 0.07);
}

.foundation-compact-sheet-table .is-number {
    text-align: center;
}

.foundation-compact-sheet-table .is-strong,
.foundation-compact-sheet-table tfoot th {
    color: #172a45;
    font-weight: 800;
}

.foundation-compact-sheet-table .is-strong {
    background: rgba(53, 88, 162, 0.08);
    color: #163b7a;
}

.foundation-compact-sheet-table .is-om {
    background: rgba(53, 88, 162, 0.1);
    color: #274f9e;
    font-weight: 800;
}

.foundation-compact-sheet-table .is-profit {
    background: rgba(156, 90, 34, 0.12);
    color: #8b4d17;
    font-weight: 800;
}

.foundation-compact-sheet-table .is-total-price {
    background: rgba(35, 95, 86, 0.13);
    color: #174536;
    font-weight: 900;
}

.foundation-compact-sheet-table .is-share {
    min-width: 9.6rem;
    background: rgba(248, 250, 252, 0.88);
    color: #334155;
    font-weight: 900;
}

.foundation-compact-share-meter {
    display: inline-flex;
    width: 6.9rem;
    height: 0.62rem;
    margin-right: 0.5rem;
    overflow: hidden;
    vertical-align: middle;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(226, 232, 240, 0.72), rgba(241, 245, 249, 0.86));
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.foundation-compact-share-meter span {
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.22);
}

.foundation-compact-share-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.15rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.foundation-compact-share-pill.is-high {
    border-color: transparent;
    background: transparent;
    color: #8b4d17;
    font-weight: 900;
}

.foundation-compact-sheet-table .is-unit-cy {
    background: rgba(67, 190, 203, 0.13);
    color: #0f6b78;
    font-weight: 900;
}

.foundation-compact-sheet-table tfoot th {
    background: linear-gradient(180deg, rgba(245, 226, 207, 0.98), rgba(238, 211, 185, 0.98));
    border-bottom: 0;
    text-align: center;
}

.foundation-compact-sheet-table tfoot th[colspan] {
    text-align: left;
}

.foundation-compact-sheet-table tfoot tr.is-proposal-row th {
    background: linear-gradient(180deg, rgba(255, 238, 176, 1), rgba(248, 203, 133, 0.98));
    color: #6b3f12;
    font-size: 0.92rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.foundation-compact-labor-panel-row td {
    padding: 0.55rem 0.65rem;
    background:
        linear-gradient(180deg, rgba(242, 249, 252, 0.98), rgba(232, 245, 249, 0.96)),
        linear-gradient(90deg, rgba(31, 113, 128, 0.09), transparent 34%);
    border-bottom: 1px solid rgba(31, 113, 128, 0.16);
}

.foundation-compact-labor-sheet {
    position: relative;
    display: grid;
    grid-template-columns: minmax(9rem, 0.75fr) minmax(13rem, 0.95fr) minmax(32rem, 2.8fr) minmax(12rem, 0.95fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(31, 113, 128, 0.18);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(23, 42, 69, 0.08);
}

.foundation-compact-labor-sheet::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #1f7180, #43becb 48%, #f0b15d);
    pointer-events: none;
}

.foundation-compact-labor-head,
.foundation-compact-labor-rate,
.foundation-compact-labor-difference {
    display: grid;
    align-content: center;
    gap: 0.28rem;
    min-width: 0;
    min-height: 5.6rem;
    padding: 0.72rem 0.82rem 0.66rem;
    border: 0;
    border-right: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.96));
}

.foundation-compact-labor-micro-stack {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.foundation-compact-labor-side-stack {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.foundation-compact-labor-micro-stack .foundation-compact-labor-head,
.foundation-compact-labor-micro-stack .foundation-compact-labor-rate {
    min-height: 0;
    border-right: 0;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-head,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference {
    gap: 0.18rem;
    padding: 0.42rem 0.5rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-head > span,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate > span,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference > span {
    font-size: 0.64rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-head strong {
    font-size: 0.82rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate label {
    gap: 0.24rem;
}

.foundation-compact-labor-sheet span,
.foundation-compact-labor-sheet em {
    color: #5c6f87;
    font-weight: 800;
    font-size: 0.68rem;
    font-style: normal;
    letter-spacing: 0;
}

.foundation-compact-labor-head > span,
.foundation-compact-labor-rate > span,
.foundation-compact-labor-difference > span {
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.foundation-compact-labor-head strong,
.foundation-compact-labor-difference strong {
    color: #172a45;
    font-size: 1rem;
    line-height: 1.1;
}

.foundation-compact-labor-rate label,
.foundation-compact-labor-matrix label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem;
}

.foundation-compact-labor-rate input,
.foundation-compact-labor-matrix input {
    width: 6.2rem;
    height: 1.55rem;
    min-width: 0;
    padding: 0 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(53, 88, 162, 0.24);
    background: #ffffff;
    color: #172a45;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
    box-shadow: inset 0 1px 2px rgba(23, 42, 69, 0.04);
}

.foundation-compact-labor-rate input {
    width: 100%;
}

.foundation-compact-labor-rate input:focus,
.foundation-compact-labor-matrix input:focus {
    border-color: rgba(53, 88, 162, 0.46);
    outline: 2px solid rgba(53, 88, 162, 0.14);
    outline-offset: 1px;
}

.foundation-compact-labor-matrix {
    display: grid;
    grid-template-columns: minmax(10rem, 1.15fr) minmax(7.3rem, 0.85fr) minmax(8.6rem, 0.95fr);
    gap: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #d9e4f2;
}

.foundation-compact-labor-matrix > span,
.foundation-compact-labor-matrix > strong,
.foundation-compact-labor-matrix > b,
.foundation-compact-labor-matrix > label {
    min-width: 0;
    margin: 0;
    padding: 0.37rem 0.5rem;
    border-right: 1px solid rgba(53, 88, 162, 0.12);
    border-bottom: 1px solid rgba(53, 88, 162, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: #24395e;
    font-size: 0.7rem;
    line-height: 1.2;
}

.foundation-compact-labor-matrix > *:nth-child(3n) {
    border-right: 0;
}

.foundation-compact-labor-matrix > *:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.foundation-compact-labor-matrix > span {
    background: rgba(248, 251, 255, 0.96);
    color: #4f627c;
    text-align: right;
}

.foundation-compact-labor-matrix > strong {
    background: linear-gradient(180deg, #dbeafe, #c7ddf7);
    color: #1f447a;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.64rem;
    letter-spacing: 0.07em;
}

.foundation-compact-labor-matrix > strong:nth-child(3),
.foundation-compact-labor-matrix > label {
    background: #ffead8;
}

.foundation-compact-labor-matrix > b {
    background: rgba(255, 255, 255, 0.96);
    color: #172a45;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: right;
}

.foundation-compact-labor-difference {
    border-right: 0;
    background:
        linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(255, 239, 216, 0.96));
    text-align: left;
}

.foundation-compact-labor-difference span {
    color: #8c4e1d;
}

.foundation-compact-labor-difference-grid {
    display: grid;
    gap: 0.38rem;
}

.foundation-compact-labor-difference-grid > div {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
    padding: 0.34rem 0.42rem;
    border: 1px solid rgba(156, 90, 34, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 12px rgba(156, 90, 34, 0.08);
}

.foundation-compact-labor-difference-grid em {
    color: #8c4e1d;
    font-size: 0.56rem;
    text-transform: uppercase;
}

.foundation-compact-labor-difference-grid strong {
    min-width: 0;
    color: #8c4e1d;
    font-size: 0.8rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.foundation-compact-labor-difference strong.is-negative {
    color: #1f7a4d;
}

.foundation-compact-labor-open {
    width: auto;
    min-width: 3.3rem;
    padding-inline: 0.55rem;
    margin-left: 0.45rem;
    font-size: 0.68rem;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    will-change: transform;
}

.foundation-compact-labor-open:hover,
.foundation-compact-labor-open:focus-visible {
    transform: translateY(-1px) scale(1.02);
}

.foundation-compact-labor-open:active {
    transform: translateY(0) scale(0.98);
}

.foundation-labor-modal {
    display: grid;
    place-items: start center;
    padding: 0.85rem 1.25rem 1rem calc(var(--sidebar-width) + 1.25rem);
    width: 100vw;
    overflow-y: auto;
    overflow-x: hidden;
}

.foundation-item-modal-card.foundation-labor-modal-card {
    width: min(1080px, calc(100vw - var(--sidebar-width) - 2.5rem));
    height: min(860px, calc(100dvh - 1.85rem));
    margin: 0 auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
    padding: 1.45rem 1.55rem 1.25rem;
    border: 1px solid rgba(201, 221, 238, 0.78);
    background:
        linear-gradient(180deg, rgba(248, 252, 255, 0.99), rgba(239, 247, 252, 0.99));
    outline: none;
    scrollbar-color: rgba(31, 113, 128, 0.34) rgba(232, 241, 246, 0.78);
    scrollbar-width: thin;
}

.foundation-labor-modal-card::-webkit-scrollbar,
.foundation-labor-modal-detail::-webkit-scrollbar {
    width: 0.38rem;
    height: 0.38rem;
}

.foundation-labor-modal-card::-webkit-scrollbar-track,
.foundation-labor-modal-detail::-webkit-scrollbar-track {
    background: rgba(232, 241, 246, 0.78);
    border-radius: 999px;
}

.foundation-labor-modal-card::-webkit-scrollbar-thumb,
.foundation-labor-modal-detail::-webkit-scrollbar-thumb {
    border: 1px solid rgba(232, 241, 246, 0.78);
    border-radius: 999px;
    background: rgba(31, 113, 128, 0.36);
}

.foundation-labor-modal-card::-webkit-scrollbar-thumb:hover,
.foundation-labor-modal-detail::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 113, 128, 0.56);
}

.foundation-labor-modal-card .foundation-item-modal-header {
    position: sticky;
    top: 0;
    z-index: 12;
    align-items: center;
    gap: 0.65rem;
    justify-content: flex-start;
    margin: -0.72rem -1.55rem 0.68rem;
    padding: 0.68rem 1.55rem 0.62rem;
    border-bottom: 1px solid rgba(53, 88, 162, 0.12);
    background:
        linear-gradient(180deg, rgba(248, 252, 255, 0.99), rgba(241, 248, 252, 0.97));
    box-shadow: 0 12px 24px rgba(23, 42, 69, 0.07);
}

.foundation-labor-modal-card .foundation-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.68rem;
    min-width: 0;
}

.foundation-labor-modal-card .foundation-modal-code-pill {
    flex: 0 0 auto;
    padding: 0.22rem 0.52rem;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
}

.foundation-labor-modal-card .foundation-modal-title-wrap h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.28rem;
    margin: 0;
    color: #172a45;
    font-size: 1.38rem;
    font-weight: 950;
    line-height: 1.08;
    text-shadow: none;
}

.foundation-labor-modal-card #foundation-labor-modal-title {
    color: #172a45;
}

.foundation-labor-modal-card .foundation-modal-subtitle {
    max-width: none;
    margin: 0.12rem 0 0;
    color: #526a86;
    font-size: 0.72rem;
    line-height: 1.25;
}

.foundation-labor-modal-count {
    color: #0f5f6b;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0;
    text-shadow: none;
}

.foundation-labor-modal-close-button {
    min-width: 4.75rem;
    height: 2rem;
    padding: 0 0.85rem;
    border: 1px solid rgba(7, 86, 99, 0.42);
    border-radius: 999px;
    background: linear-gradient(180deg, #0f7180, #075663);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 10px 22px rgba(7, 86, 99, 0.24);
    opacity: 1;
}

.foundation-labor-modal-close-button:hover,
.foundation-labor-modal-close-button:focus-visible {
    border-color: rgba(7, 86, 99, 0.6);
    background: linear-gradient(180deg, #138295, #075663);
    color: #ffffff;
}

.foundation-labor-modal-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.62rem 0 0.72rem;
}

.foundation-labor-modal-kpi {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 3.25rem;
    padding: 0.48rem 0.62rem;
    border: 1px solid rgba(53, 88, 162, 0.12);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.96));
    box-shadow: 0 6px 14px rgba(23, 42, 69, 0.035);
}

.foundation-labor-modal-kpi.is-total {
    border-color: rgba(31, 122, 77, 0.2);
    background:
        linear-gradient(180deg, rgba(237, 252, 244, 0.98), rgba(220, 246, 232, 0.96));
}

.foundation-labor-modal-kpi span {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    margin-bottom: 0.16rem;
    color: #5c6f87;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.foundation-labor-modal-kpi strong {
    display: block;
    overflow: hidden;
    color: #172a45;
    font-size: 0.88rem;
    font-weight: 950;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-labor-modal-kpi.is-total strong {
    color: #0b4f45;
}

.foundation-compact-labor-sheet-modal {
    margin-bottom: 1.15rem;
}

.foundation-compact-labor-sheet-modal.foundation-compact-labor-sheet {
    grid-template-columns: minmax(0, 1.5fr) minmax(10rem, 0.56fr) minmax(15.5rem, 0.9fr);
    gap: 0.55rem;
    padding: 0.62rem;
    border-color: rgba(151, 165, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-compact-labor-sheet-modal.foundation-compact-labor-sheet::before {
    height: 2px;
    background: #1f7180;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-side-stack {
    order: 2;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix {
    order: 1;
}

.foundation-compact-labor-sheet-modal .foundation-labor-simulation-board {
    order: 3;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    margin: 0;
    padding: 0.52rem;
    border: 1px solid rgba(151, 165, 184, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-compact-labor-sheet-modal .foundation-labor-simulation-head,
.foundation-compact-labor-sheet-modal .foundation-labor-simulation-delta {
    padding: 0.38rem 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.foundation-compact-labor-sheet-modal .foundation-labor-compare-grid {
    gap: 0.18rem;
    padding: 0.36rem 0.5rem;
    border: 1px solid rgba(151, 165, 184, 0.14);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.72);
}

.foundation-compact-labor-sheet-modal .foundation-labor-compare-row {
    grid-template-columns: 4.8rem minmax(5.8rem, 1fr) 6.8rem;
    gap: 0.32rem;
}

.foundation-compact-labor-sheet-modal .foundation-labor-whatif-controls {
    display: grid;
    gap: 0.42rem;
    padding: 0.48rem 0.5rem;
    border: 1px solid rgba(151, 165, 184, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.foundation-labor-whatif-controls label {
    display: grid;
    grid-template-columns: 4.8rem minmax(5.8rem, 1fr) 3.2rem;
    align-items: center;
    gap: 0.46rem;
    margin: 0;
}

.foundation-labor-whatif-controls span {
    color: #253d5c;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-labor-whatif-controls strong {
    justify-self: end;
    min-width: 2.6rem;
    padding: 0.14rem 0.34rem;
    border: 1px solid rgba(31, 113, 128, 0.14);
    border-radius: 999px;
    background: rgba(236, 248, 250, 0.82);
    color: #0f5f6b;
    font-size: 0.7rem;
    font-weight: 950;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.foundation-labor-whatif-controls input[type="range"] {
    appearance: none;
    width: 100%;
    height: 1.15rem;
    margin: 0;
    border-radius: 999px;
    background: transparent;
    accent-color: #0f7180;
    cursor: pointer;
}

.foundation-labor-whatif-controls input[type="range"]::-webkit-slider-runnable-track {
    height: 0.42rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 113, 128, 0.22), rgba(245, 158, 11, 0.34));
}

.foundation-labor-whatif-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: -0.32rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f7180, #0b5560);
    box-shadow: 0 5px 12px rgba(15, 113, 128, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.foundation-labor-whatif-controls input[type="range"]::-moz-range-track {
    height: 0.42rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(15, 113, 128, 0.22), rgba(245, 158, 11, 0.34));
}

.foundation-labor-whatif-controls input[type="range"]::-moz-range-thumb {
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f7180, #0b5560);
    box-shadow: 0 5px 12px rgba(15, 113, 128, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.foundation-labor-whatif-controls input[type="range"]:hover::-webkit-slider-thumb,
.foundation-labor-whatif-controls input[type="range"]:focus-visible::-webkit-slider-thumb {
    transform: scale(1.08);
    box-shadow: 0 7px 16px rgba(15, 113, 128, 0.32);
}

.foundation-labor-whatif-controls input[type="range"]:hover::-moz-range-thumb,
.foundation-labor-whatif-controls input[type="range"]:focus-visible::-moz-range-thumb {
    transform: scale(1.08);
    box-shadow: 0 7px 16px rgba(15, 113, 128, 0.32);
}

.foundation-labor-whatif-controls input[type="range"]:disabled {
    cursor: default;
    opacity: 0.52;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-head,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference {
    min-height: 0;
    border: 1px solid rgba(151, 165, 184, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack .foundation-compact-labor-head,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack .foundation-compact-labor-rate {
    min-height: 2.1rem;
    padding: 0.3rem 0.46rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack .foundation-compact-labor-head strong {
    font-size: 0.8rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack .foundation-compact-labor-rate label {
    padding-top: 0;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack .foundation-compact-labor-rate input {
    width: 4.6rem;
    height: 1.2rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-micro-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid rgba(151, 165, 184, 0.22);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-side-stack .foundation-compact-labor-difference {
    min-height: 0;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-side-stack {
    gap: 0;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate {
    background: #fff9ef;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate label {
    position: relative;
    padding-top: 0.08rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate label::before,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix label::before {
    content: none;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong:nth-child(3) {
    position: relative;
    padding-top: 0.24rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong:nth-child(3)::before {
    content: none;
    position: absolute;
    top: 0.04rem;
    right: 0.18rem;
    padding: 0.04rem 0.2rem;
    border: 1px solid rgba(154, 87, 30, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #9a571e;
    font-size: 0.42rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate input,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix input {
    width: 4.6rem;
    height: 0.92rem;
    font-size: 0.72rem;
    border-color: rgba(176, 116, 24, 0.28);
    background: #fff6df;
    outline: 0;
    box-shadow:
        inset 0 1px 2px rgba(23, 42, 69, 0.04);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-rate input:focus,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix input:focus {
    border-color: rgba(176, 116, 24, 0.58);
    background: #ffefbf;
    outline: 2px solid rgba(255, 212, 96, 0.28);
    outline-offset: 1px;
    box-shadow:
        inset 0 1px 2px rgba(23, 42, 69, 0.05),
        0 0 0 3px rgba(255, 206, 84, 0.28);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix {
    grid-template-columns: 9.4rem minmax(7.4rem, 0.62fr) minmax(9.2rem, 1fr);
    gap: 0;
    padding: 0.28rem;
    border: 1px solid rgba(151, 165, 184, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > span,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > b,
.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > label {
    min-height: 1.08rem;
    padding: 0.12rem 0.28rem;
    border: 0;
    border-bottom: 1px solid rgba(151, 165, 184, 0.18);
    border-radius: 4px;
    color: #132b46;
    font-size: 0.72rem;
    line-height: 1.1;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > span {
    background: rgba(255, 255, 255, 0.58);
    color: #1f3553;
    font-size: 0.66rem;
    font-weight: 900;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong {
    color: #173f74;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > b {
    color: #0f2742;
    font-size: 0.72rem;
    font-weight: 950;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    color: #263f5e;
    font-size: 0.68rem;
    font-weight: 850;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > *:nth-child(3n + 2) {
    background: rgba(238, 246, 255, 0.86);
    text-align: left;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > *:nth-child(3n) {
    background: rgba(255, 244, 232, 0.9);
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong:nth-child(2)::after {
    content: " baseline";
    font-weight: 850;
    opacity: 0.8;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-matrix > strong:nth-child(3)::after {
    content: " inputs";
    font-weight: 850;
    opacity: 0.8;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference {
    align-content: stretch;
    min-height: 0;
    padding: 0.38rem 0.5rem;
    background: #fff1f1;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference-grid {
    gap: 0.22rem;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference-grid > div {
    padding: 0.28rem 0.34rem;
    border-color: rgba(180, 35, 24, 0.16);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: none;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference-grid em {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference-grid strong {
    font-size: 0.76rem;
}

.foundation-labor-calculator-strip {
    display: grid;
    grid-template-columns: minmax(18rem, 1.7fr) repeat(3, minmax(8rem, 0.72fr)) minmax(12rem, 0.95fr);
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.foundation-labor-formula-card,
.foundation-labor-productivity-card,
.foundation-labor-variance-card {
    min-width: 0;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 253, 0.96));
    box-shadow: 0 10px 22px rgba(23, 42, 69, 0.055);
}

.foundation-labor-formula-card span,
.foundation-labor-productivity-card span,
.foundation-labor-variance-card span {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    margin-bottom: 0.25rem;
    color: #5c6f87;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-labor-formula-card strong {
    display: block;
    color: #172a45;
    font-size: 0.84rem;
    font-weight: 950;
    line-height: 1.35;
}

.foundation-labor-productivity-card strong {
    display: block;
    color: #0f5f6b;
    font-size: 1.08rem;
    font-weight: 950;
    line-height: 1.1;
}

.foundation-labor-efficiency-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.45rem;
    padding: 0.18rem 0.44rem;
    border: 1px solid rgba(31, 113, 128, 0.18);
    border-radius: 999px;
    background: rgba(31, 113, 128, 0.08);
    color: #0f5f6b;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 900;
}

.foundation-labor-efficiency-chip.is-low {
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(254, 226, 226, 0.74);
    color: #b42318;
}

.foundation-labor-efficiency-chip.is-normal {
    border-color: rgba(31, 113, 128, 0.2);
    background: rgba(224, 247, 250, 0.78);
    color: #0f5f6b;
}

.foundation-labor-efficiency-chip.is-high {
    border-color: rgba(31, 122, 77, 0.2);
    background: rgba(220, 246, 232, 0.78);
    color: #1f7a4d;
}

.foundation-labor-variance-card {
    border-color: rgba(31, 122, 77, 0.18);
    background:
        linear-gradient(180deg, rgba(237, 252, 244, 0.98), rgba(220, 246, 232, 0.96));
}

.foundation-labor-variance-card strong {
    display: block;
    color: #1f7a4d;
    font-size: 1.02rem;
    font-weight: 950;
    line-height: 1.12;
}

.foundation-labor-variance-card em {
    display: block;
    margin-top: 0.22rem;
    color: #557166;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 850;
}

.foundation-labor-variance-card.is-warning {
    border-color: rgba(156, 90, 34, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(255, 239, 216, 0.96));
}

.foundation-labor-variance-card.is-warning strong,
.foundation-labor-variance-card.is-warning em {
    color: #8c4e1d;
}

.foundation-labor-variance-card.is-danger {
    border-color: rgba(180, 35, 24, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 241, 242, 0.98), rgba(254, 226, 226, 0.96));
}

.foundation-labor-variance-card.is-danger strong,
.foundation-labor-variance-card.is-danger em {
    color: #b42318;
}

.foundation-labor-simulation-board {
    display: grid;
    grid-template-columns: minmax(14rem, 0.85fr) minmax(26rem, 2fr) minmax(10rem, 0.75fr);
    align-items: stretch;
    gap: 0.52rem;
    margin: 0 0 0.65rem;
    padding: 0.58rem;
    border: 1px solid rgba(31, 113, 128, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(23, 42, 69, 0.05);
}

.foundation-labor-simulation-head,
.foundation-labor-simulation-delta {
    display: grid;
    align-content: center;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: #ffffff;
}

.foundation-labor-simulation-head span,
.foundation-labor-simulation-delta span {
    color: #5c6f87;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-labor-simulation-head strong,
.foundation-labor-simulation-delta strong {
    color: #0f5f6b;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.08;
}

.foundation-labor-simulation-delta em {
    color: #557166;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 850;
}

.foundation-labor-simulation-board.is-warning .foundation-labor-simulation-delta strong,
.foundation-labor-simulation-board.is-warning .foundation-labor-simulation-delta em {
    color: #8c4e1d;
}

.foundation-labor-simulation-board.is-negative .foundation-labor-simulation-delta strong,
.foundation-labor-simulation-board.is-negative .foundation-labor-simulation-delta em {
    color: #047857;
}

.foundation-labor-simulation-board.is-negative .foundation-labor-simulation-delta {
    border: 1px solid rgba(4, 120, 87, 0.24);
    background: linear-gradient(180deg, #ecfdf5, #d1fae5);
    box-shadow: inset 3px 0 0 #059669;
}

.foundation-labor-simulation-board.is-warning .foundation-labor-simulation-delta {
    border: 1px solid rgba(156, 90, 34, 0.24);
    background: linear-gradient(180deg, #fff8ed, #ffefd8);
}

.foundation-labor-simulation-board.is-danger .foundation-labor-simulation-delta strong,
.foundation-labor-simulation-board.is-danger .foundation-labor-simulation-delta em {
    color: #b42318;
}

.foundation-labor-simulation-board.is-danger .foundation-labor-simulation-delta {
    border: 1px solid rgba(180, 35, 24, 0.28);
    background: linear-gradient(180deg, #fff1f2, #fee2e2);
    box-shadow: inset 3px 0 0 #b42318;
}

.foundation-labor-simulation-delta b,
.foundation-compact-labor-difference-grid strong[data-foundation-labor-difference] {
    cursor: help;
}

.foundation-labor-simulation-delta b.is-warning,
.foundation-compact-labor-difference-grid strong[data-foundation-labor-difference].is-warning {
    display: inline-block;
    width: fit-content;
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(156, 90, 34, 0.24);
    border-radius: 999px;
    background: #fff1df;
    color: #8c4e1d;
}

.foundation-labor-simulation-delta b.is-negative,
.foundation-compact-labor-difference-grid strong[data-foundation-labor-difference].is-negative {
    display: inline-block;
    width: fit-content;
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(4, 120, 87, 0.24);
    border-radius: 999px;
    background: #d1fae5;
    color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.08);
}

.foundation-labor-simulation-delta b.is-danger,
.foundation-compact-labor-difference-grid strong[data-foundation-labor-difference].is-danger {
    display: inline-block;
    width: fit-content;
    padding: 0.12rem 0.38rem;
    border: 1px solid rgba(180, 35, 24, 0.3);
    border-radius: 999px;
    background: #fee2e2;
    color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.08);
}

.foundation-labor-compare-grid {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.34rem 0.4rem;
    border-radius: 6px;
    background: #f8fafc;
}

.foundation-labor-compare-row {
    display: grid;
    grid-template-columns: 5.8rem minmax(10rem, 1fr) 8.5rem;
    align-items: center;
    gap: 0.48rem;
    min-width: 0;
}

.foundation-labor-compare-row > span {
    color: #253d5c;
    font-size: 0.64rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-labor-compare-row > strong {
    color: #132b46;
    font-size: 0.78rem;
    font-weight: 950;
    text-align: right;
}

.foundation-labor-cost-mix-card {
    display: grid;
    grid-template-columns: auto minmax(11rem, 0.8fr) minmax(20rem, 1.5fr);
    align-items: center;
    gap: 1rem;
    margin: 0.3rem 0 0.75rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(31, 113, 128, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-labor-cost-mix-chart {
    display: grid;
    place-items: center;
}

.foundation-labor-cost-mix-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.8rem;
    aspect-ratio: 1;
    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(15, 113, 128, 0.08),
        0 12px 22px rgba(23, 42, 69, 0.08);
}

.foundation-labor-cost-mix-donut::after {
    content: "";
    position: absolute;
    inset: 0.84rem;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.foundation-labor-cost-mix-donut > span {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.08rem;
    justify-items: center;
    max-width: 4.2rem;
    text-align: center;
}

.foundation-labor-cost-mix-donut strong {
    color: #132b46;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.05;
}

.foundation-labor-cost-mix-donut small {
    color: #64748b;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.foundation-labor-cost-mix-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.foundation-labor-cost-mix-copy span {
    color: #5c6f87;
    font-size: 0.6rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-labor-cost-mix-copy strong {
    color: #172a45;
    font-size: 0.86rem;
    font-weight: 950;
}

.foundation-labor-cost-mix-copy p {
    margin: 0;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.25;
}

.foundation-labor-cost-mix-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.42rem;
    min-width: 0;
}

.foundation-labor-cost-mix-legend > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.34rem;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.72);
}

.foundation-labor-cost-mix-legend > div.is-muted {
    opacity: 0.52;
}

.foundation-labor-cost-mix-legend i {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.88);
}

.foundation-labor-cost-mix-legend i.is-footings {
    background: #0f7180;
}

.foundation-labor-cost-mix-legend i.is-walls {
    background: #ea580c;
}

.foundation-labor-cost-mix-legend i.is-beams {
    background: #3558a2;
}

.foundation-labor-cost-mix-legend i.is-other {
    background: #94a3b8;
}

.foundation-labor-cost-mix-legend span {
    min-width: 0;
    color: #253d5c;
    font-size: 0.66rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-labor-cost-mix-legend strong {
    color: #132b46;
    font-size: 0.72rem;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.foundation-labor-compare-track {
    height: 0.86rem;
    overflow: hidden;
    border: 1px solid rgba(53, 88, 162, 0.1);
    border-radius: 999px;
    background: rgba(213, 226, 240, 0.66);
}

.foundation-labor-compare-fill {
    display: block;
    width: var(--foundation-labor-compare-width, 0%);
    height: 100%;
    border-radius: inherit;
    transition: width 260ms ease;
}

.foundation-labor-compare-row.is-default .foundation-labor-compare-fill {
    background: #6f9bc9;
}

.foundation-labor-compare-row.is-estimate .foundation-labor-compare-fill {
    background: #d89135;
}

.foundation-labor-simulation-board .is-simulating,
.foundation-labor-calculator-strip .is-simulating,
.foundation-compact-labor-sheet-modal .is-simulating,
.foundation-labor-modal-detail .is-simulating {
    animation: foundationLaborValuePulse 460ms ease;
}

@keyframes foundationLaborValuePulse {
    0% {
        background-color: rgba(255, 232, 148, 0);
        transform: scale(1);
    }
    42% {
        background-color: rgba(255, 232, 148, 0.72);
        transform: scale(1.025);
    }
    100% {
        background-color: rgba(255, 232, 148, 0);
        transform: scale(1);
    }
}

.foundation-labor-modal-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 0.55rem;
    padding: 0.65rem 0.78rem;
    border: 1px solid rgba(31, 113, 128, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-labor-modal-detail-head span {
    display: block;
    margin-bottom: 0.14rem;
    color: #5c6f87;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-labor-modal-detail-head strong {
    display: block;
    color: #172a45;
    font-size: 0.84rem;
    font-weight: 950;
}

.foundation-labor-modal-unused-toggle {
    min-width: 7.4rem;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    will-change: transform;
}

.foundation-labor-modal-unused-toggle:not([disabled]):hover,
.foundation-labor-modal-unused-toggle:not([disabled]):focus-visible {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 18px rgba(23, 42, 69, 0.08);
}

.foundation-labor-modal-unused-toggle:not([disabled]):active {
    transform: translateY(0) scale(0.98);
}

.foundation-labor-modal-unused-toggle[disabled] {
    cursor: default;
    opacity: 0.55;
}

.foundation-labor-modal-detail {
    overflow: auto;
    max-height: min(27vh, 310px);
    border: 1px solid rgba(151, 165, 184, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    scrollbar-color: rgba(31, 113, 128, 0.34) rgba(232, 241, 246, 0.78);
    scrollbar-width: thin;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.foundation-labor-modal-detail .foundation-compact-detail-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    background: #ffffff;
}

.foundation-labor-modal-detail .foundation-labor-excel-table {
    min-width: 1180px;
}

.foundation-labor-modal-detail .foundation-compact-detail-table th,
.foundation-labor-modal-detail .foundation-compact-detail-table td {
    padding: 0.62rem 0.72rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    color: #142840;
    font-size: 0.74rem;
    line-height: 1.2;
}

.foundation-labor-modal-detail .foundation-compact-detail-table th {
    background: #f7fafc;
    color: #31527b;
    font-weight: 900;
    text-transform: uppercase;
}

.foundation-labor-modal-detail .foundation-compact-detail-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7fafc;
    box-shadow: 0 1px 0 rgba(151, 165, 184, 0.28), 0 8px 14px rgba(23, 42, 69, 0.04);
}

.foundation-labor-modal-detail .foundation-labor-excel-table thead tr:nth-child(2) th {
    top: 2rem;
}

.foundation-labor-modal-detail .foundation-labor-excel-table .foundation-labor-excel-group-row th {
    text-align: center;
}

.foundation-labor-modal-detail .foundation-labor-excel-table .is-default-group {
    background: #eaf2fb;
    color: #254d7d;
}

.foundation-labor-modal-detail .foundation-labor-excel-table .is-estimate-group {
    background: #fff1df;
    color: #7a481a;
}

.foundation-labor-modal-detail .foundation-labor-excel-table .is-estimate-placeholder {
    background: rgba(255, 249, 232, 0.38);
    color: #506176;
    font-weight: 850;
}

.foundation-labor-modal-detail .foundation-compact-detail-table th:first-child,
.foundation-labor-modal-detail .foundation-compact-detail-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 1px 0 0 rgba(151, 165, 184, 0.22);
}

.foundation-labor-modal-detail .foundation-compact-detail-table thead th:first-child {
    z-index: 5;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tbody td:first-child {
    background: rgba(255, 255, 255, 0.94);
}

.foundation-labor-modal-detail .foundation-compact-detail-table tbody tr:nth-child(even) td {
    background: rgba(249, 250, 251, 0.68);
}

.foundation-labor-modal-detail .foundation-compact-detail-table tbody tr:nth-child(even) td:first-child {
    background: rgba(249, 250, 251, 0.94);
}

.foundation-labor-modal-detail .foundation-compact-detail-table tbody tr:hover td {
    background: #f9fafb;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tbody tr:hover td:first-child {
    background: #f9fafb;
}

.foundation-labor-modal-detail .foundation-compact-detail-table .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.foundation-sog-labor-modal-card {
    height: auto;
    max-height: min(860px, calc(100dvh - 1.85rem));
}

.foundation-sog-labor-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.foundation-sog-labor-window-summary {
    display: grid;
    grid-template-columns: minmax(13rem, 0.9fr) minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(12rem, 0.8fr);
    overflow: hidden;
    margin: 0.64rem 0 0.78rem;
    border: 1px solid rgba(53, 88, 162, 0.22);
    border-radius: 8px;
    background: #ffffff;
}

.foundation-sog-labor-window-summary > * {
    min-height: 2rem;
    padding: 0.42rem 0.58rem;
    border-right: 1px solid rgba(53, 88, 162, 0.14);
    border-bottom: 1px solid rgba(53, 88, 162, 0.12);
    color: #172a45;
    font-size: 0.72rem;
    font-weight: 850;
}

.foundation-sog-labor-window-summary > *:nth-child(4n) {
    border-right: 0;
}

.foundation-sog-labor-window-summary .foundation-sog-labor-window-title {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 2.2rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-sog-labor-window-summary > strong {
    background: #ffffff;
    text-align: center;
    font-size: 0.78rem;
}

.foundation-sog-labor-window-summary > span {
    text-align: right;
}

.foundation-sog-labor-window-summary > b {
    background: #bfd8f1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.foundation-sog-labor-window-summary > b:nth-child(4n) {
    background: #f7c9ad;
}

.foundation-sog-labor-window-summary > b.foundation-sog-labor-editable-cell,
.foundation-sog-labor-generated-editable {
    background: #fff200;
    color: #0f172a;
}

.foundation-sog-labor-editable-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0;
}

.foundation-sog-labor-summary-input,
.foundation-sog-labor-generated-input,
.foundation-sog-labor-table input.foundation-sog-labor-input {
    background: #fff9b8;
}

.foundation-sog-labor-summary-input,
.foundation-sog-labor-generated-input {
    width: 100%;
    min-height: 2rem;
    padding: 0.42rem 0.28rem;
    border: 0;
    border-radius: 0;
    color: #0f172a;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: right;
}

.foundation-sog-labor-summary-input:focus,
.foundation-sog-labor-generated-input:focus,
.foundation-sog-labor-table input.foundation-sog-labor-input:focus {
    background: #fff200;
    outline: 2px solid rgba(146, 117, 0, 0.48);
    outline-offset: -2px;
}

.foundation-sog-labor-window-summary > aside {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #ffffff;
}

.foundation-sog-labor-window-summary > aside span {
    color: #172a45;
    font-weight: 850;
}

.foundation-sog-labor-window-summary > aside b {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.foundation-sog-labor-breakdown-window {
    overflow-x: auto;
    margin-bottom: 0.78rem;
}

.foundation-sog-labor-breakdown-table {
    min-width: 1180px;
}

.foundation-sog-labor-breakdown-table th,
.foundation-sog-labor-breakdown-table td,
.foundation-sog-labor-breakdown-table tfoot th,
.foundation-sog-labor-breakdown-table .is-strong,
.foundation-sog-labor-breakdown-table .is-total-price,
.foundation-sog-labor-breakdown-table .is-unit-cy {
    color: #142840;
}

.foundation-sog-labor-breakdown-table thead th {
    color: #173554;
}

.foundation-sog-labor-breakdown-table thead th:nth-child(n + 2):nth-child(-n + 5),
.foundation-sog-labor-breakdown-table tfoot th:nth-child(n + 2):nth-child(-n + 5) {
    background: #bfd8f1;
    color: #142840;
}

.foundation-sog-labor-breakdown-table thead th:nth-child(n + 6):nth-child(-n + 9),
.foundation-sog-labor-breakdown-table tfoot th:nth-child(n + 6):nth-child(-n + 9) {
    background: #f7c9ad;
    color: #142840;
}

.foundation-sog-labor-breakdown-table tfoot th {
    color: #142840;
    font-weight: 950;
}

.foundation-sog-labor-summary-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(118px, 0.24fr) minmax(118px, 0.24fr);
    gap: 0.55rem;
    margin: 0.64rem 0 0.78rem;
}

.foundation-sog-labor-summary-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.78fr) minmax(180px, 1fr);
    overflow: hidden;
    border: 1px solid rgba(201, 221, 238, 0.82);
    border-radius: 10px;
    background: #ffffff;
}

.foundation-sog-labor-summary-grid > * {
    min-height: 2rem;
    padding: 0.48rem 0.62rem;
    border-bottom: 1px solid rgba(201, 221, 238, 0.58);
    color: #172a45;
    font-size: 0.7rem;
    font-weight: 850;
}

.foundation-sog-labor-summary-grid > span {
    text-align: right;
}

.foundation-sog-labor-summary-grid > strong {
    background: #fff6e9;
    color: #174272;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-sog-labor-summary-grid > b {
    background: #fff9ef;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.foundation-sog-labor-summary-grid > *:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.foundation-sog-labor-summary-card {
    display: grid;
    align-content: center;
    gap: 0.32rem;
    min-height: 100%;
    padding: 0.75rem 0.68rem;
    border: 1px solid rgba(201, 221, 238, 0.82);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.foundation-sog-labor-summary-card.is-rate {
    background: linear-gradient(180deg, #fff9ef, #fff3dd);
}

.foundation-sog-labor-summary-card span {
    color: #526a86;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-sog-labor-summary-card strong {
    color: #172a45;
    font-size: 0.88rem;
    font-weight: 950;
}

.foundation-sog-labor-table input.foundation-sog-labor-input {
    width: 100%;
    min-width: 5.8rem;
    height: 1.85rem;
    padding: 0.26rem 0.42rem;
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-radius: 6px;
    color: #172a45;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: right;
}

.foundation-sog-labor-table input.foundation-sog-labor-input:focus {
    background: #fff200;
    border-color: rgba(146, 117, 0, 0.72);
    outline: 2px solid rgba(255, 242, 0, 0.38);
    outline-offset: 1px;
}

.foundation-sog-labor-table input.foundation-sog-labor-input[readonly] {
    color: #64748b;
    background: #f8fafc;
}

.foundation-sog-labor-modal .foundation-compact-detail-table th,
.foundation-sog-labor-modal .foundation-compact-detail-table td,
.foundation-sog-labor-modal .foundation-compact-detail-table tfoot th,
.foundation-sog-labor-modal .foundation-compact-detail-table .is-total-price,
.foundation-sog-labor-modal .foundation-compact-detail-table .is-unit-cy {
    color: #142840;
}

.foundation-sog-labor-modal .foundation-compact-detail-table thead th {
    color: #173554;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tr.is-unused td {
    background: rgba(248, 250, 252, 0.58);
    color: #7f8da1;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tr.is-unused td:first-child {
    color: #64748b;
    font-weight: 800;
}

.foundation-labor-row-name {
    min-width: 14rem;
}

.foundation-labor-row-name > span:first-child {
    display: block;
    margin-bottom: 0.28rem;
}

.foundation-labor-impact-meter {
    display: block;
    overflow: hidden;
    width: 100%;
    height: 0.2rem;
    border-radius: 999px;
    background: rgba(201, 213, 225, 0.6);
}

.foundation-labor-impact-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f7180, #43becb);
}

.foundation-labor-modal-detail .foundation-compact-detail-table tfoot th {
    position: sticky;
    bottom: 0;
    border-top: 1px solid rgba(31, 113, 128, 0.28);
    border-bottom: 0;
    background: #e9f8fa;
    color: #0f5f6b;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    box-shadow: 0 -1px 0 rgba(151, 165, 184, 0.2), 0 -8px 14px rgba(23, 42, 69, 0.04);
    z-index: 2;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tfoot th:first-child {
    left: 0;
    z-index: 4;
}

.foundation-labor-modal-detail .foundation-compact-detail-table tfoot .is-total-price,
.foundation-labor-modal-detail .foundation-compact-detail-table tfoot .is-unit-cy {
    color: #0b4f45;
}

.foundation-labor-closeout-strip {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.82fr) minmax(0, 0.82fr) minmax(13.5rem, 1.45fr) minmax(0, 0.88fr);
    gap: 0;
    overflow: hidden;
    margin-top: 0.9rem;
    margin-bottom: 0.8rem;
    position: sticky;
    bottom: 4.45rem;
    z-index: 10;
    border: 1px solid rgba(31, 113, 128, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.foundation-labor-closeout-strip > div {
    min-width: 0;
    padding: 0.9rem 0.95rem;
    border-right: 1px solid rgba(31, 113, 128, 0.12);
    background: rgba(255, 255, 255, 0.46);
}

.foundation-labor-closeout-strip > div:last-child {
    border-right: 0;
}

.foundation-labor-closeout-strip > div.is-total {
    position: relative;
    background:
        linear-gradient(180deg, rgba(199, 249, 244, 0.99), rgba(139, 221, 221, 0.99));
    box-shadow:
        inset 0 4px 0 rgba(7, 86, 99, 0.85),
        0 14px 24px rgba(7, 86, 99, 0.14);
    isolation: isolate;
}

.foundation-labor-closeout-strip > div.is-total::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.foundation-labor-closeout-strip span {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    margin-bottom: 0.22rem;
    color: #5c6f87;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-labor-closeout-strip strong {
    display: block;
    overflow: hidden;
    color: #172a45;
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1.08;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-labor-closeout-strip .is-total strong {
    color: #075663;
    font-size: 1.58rem;
    letter-spacing: 0;
}

.foundation-labor-closeout-strip .is-total span {
    color: #075663;
}

.foundation-labor-inline-icon.foundation-panel-icon {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    padding: 0.18rem;
    border-radius: 6px;
    border: 1px solid rgba(31, 113, 128, 0.16);
    background: rgba(31, 113, 128, 0.08);
    color: #0f5f6b;
    box-shadow: none;
}

.foundation-labor-inline-icon.foundation-panel-icon svg {
    width: 100%;
    height: 100%;
}

.foundation-labor-modal-kpi.is-total .foundation-labor-inline-icon,
.foundation-labor-closeout-strip .is-total .foundation-labor-inline-icon {
    border-color: rgba(31, 122, 77, 0.2);
    background: rgba(31, 122, 77, 0.1);
    color: #0b6b4f;
}

.foundation-labor-variance-card.is-danger .foundation-labor-inline-icon {
    border-color: rgba(180, 35, 24, 0.2);
    background: rgba(180, 35, 24, 0.08);
    color: #b42318;
}

.foundation-labor-variance-card.is-warning .foundation-labor-inline-icon {
    border-color: rgba(156, 90, 34, 0.22);
    background: rgba(156, 90, 34, 0.09);
    color: #8c4e1d;
}

.foundation-labor-calculation-card {
    margin: 0.95rem 0 0.75rem;
    padding: 0.8rem;
    border: 1px solid rgba(31, 113, 128, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58), 0 10px 22px rgba(23, 42, 69, 0.06);
}

.foundation-labor-calculation-table-wrap {
    overflow-x: auto;
}

.foundation-labor-calculation-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #ffffff;
    color: #10233d;
    font-size: 0.76rem;
}

.foundation-labor-calculation-table th,
.foundation-labor-calculation-table td {
    padding: 0.38rem 0.48rem;
    border: 1px solid rgba(74, 85, 104, 0.28);
    text-align: right;
    white-space: nowrap;
}

.foundation-labor-calculation-table thead tr:first-child th {
    background: #fff7bd;
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
}

.foundation-labor-calculation-table thead tr:nth-child(2) th,
.foundation-labor-calculation-table tfoot th,
.foundation-labor-calculation-table tfoot td {
    background: #fffbe6;
    color: #24364f;
    font-weight: 900;
}

.foundation-labor-calculation-table tbody th,
.foundation-labor-calculation-table tfoot th {
    text-align: left;
}

.foundation-labor-calculation-table input {
    width: 6.8rem;
    max-width: 100%;
    height: 1.65rem;
    padding: 0.18rem 0.36rem;
    border: 1px solid rgba(201, 149, 42, 0.4);
    border-radius: 4px;
    background: linear-gradient(180deg, #fffde9, #fff4c8);
    color: #10233d;
    font: inherit;
    font-weight: 800;
    text-align: right;
    box-shadow: inset 0 1px 2px rgba(120, 80, 25, 0.08);
}

.foundation-labor-calculation-table input:focus {
    outline: 2px solid rgba(12, 113, 128, 0.22);
    border-color: rgba(12, 113, 128, 0.44);
}

.foundation-labor-modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 11;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin: 0 -1.55rem -1.25rem;
    padding: 0.98rem 1.55rem 1.05rem;
    border-top: 1px solid rgba(31, 113, 128, 0.2);
    background:
        linear-gradient(180deg, rgba(241, 248, 252, 0.98), rgba(232, 243, 248, 0.98));
    box-shadow: 0 -14px 32px rgba(23, 42, 69, 0.1);
    backdrop-filter: blur(12px);
}

.foundation-labor-modal-back-button {
    min-width: 5.2rem;
    height: 2.15rem;
    border: 1px solid #d1d5db;
    background: transparent;
    color: #374151;
    font-weight: 900;
    box-shadow: none;
    opacity: 1;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    will-change: transform;
}

.foundation-labor-modal-back-button:hover,
.foundation-labor-modal-back-button:focus-visible {
    border-color: #9ca3af;
    background: rgba(255, 255, 255, 0.78);
    color: #111827;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

.foundation-labor-modal-back-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 5px 12px rgba(17, 24, 39, 0.07);
}

.foundation-labor-modal-save-button {
    min-width: 6.1rem;
    height: 2.32rem;
    border-color: rgba(234, 88, 12, 0.5);
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    font-weight: 950;
    box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
    will-change: transform;
}

.foundation-labor-modal-save-button:hover,
.foundation-labor-modal-save-button:focus-visible {
    border-color: rgba(194, 65, 12, 0.62);
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    color: #ffffff;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.34);
}

.foundation-labor-modal-save-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 9px 18px rgba(234, 88, 12, 0.26);
}

.foundation-compact-labor-difference.is-good {
    background:
        linear-gradient(180deg, rgba(237, 252, 244, 0.98), rgba(220, 246, 232, 0.96));
}

.foundation-compact-labor-difference.is-negative {
    background:
        linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.96));
    box-shadow: inset 3px 0 0 #059669;
}

.foundation-compact-labor-difference.is-negative span,
.foundation-compact-labor-difference strong.is-negative {
    color: #047857;
}

.foundation-compact-labor-difference.is-good span {
    color: #1f7a4d;
}

.foundation-compact-labor-difference strong.is-good {
    color: #1f7a4d;
}

.foundation-compact-labor-difference.is-warning {
    background:
        linear-gradient(180deg, rgba(255, 248, 237, 0.98), rgba(255, 239, 216, 0.96));
}

.foundation-compact-labor-difference strong.is-warning {
    color: #8c4e1d;
}

.foundation-compact-labor-difference.is-danger {
    background:
        linear-gradient(180deg, rgba(255, 241, 242, 0.98), rgba(254, 226, 226, 0.96));
}

.foundation-compact-labor-difference.is-danger span,
.foundation-compact-labor-difference strong.is-danger {
    color: #b42318;
}

.foundation-compact-labor-difference strong.is-danger {
    color: #b42318;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference.is-good {
    background: #eefaf3;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference.is-warning {
    background: #fff7ed;
}

.foundation-compact-labor-sheet-modal .foundation-compact-labor-difference.is-danger {
    background: #fff1f1;
}

@media (max-width: 980px) {
    .foundation-labor-modal {
        transform: none;
        width: 100vw;
        padding: 0.8rem;
    }

    .foundation-item-modal-card.foundation-labor-modal-card {
        width: min(100%, calc(100vw - 1.6rem));
        height: min(920px, calc(100dvh - 1.6rem));
        transform: none;
    }

    .foundation-labor-modal-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-labor-calculator-strip,
    .foundation-labor-simulation-board,
    .foundation-labor-closeout-strip {
        grid-template-columns: 1fr;
    }

    .foundation-labor-compare-row {
        grid-template-columns: 5.6rem minmax(8rem, 1fr) 7.6rem;
    }

    .foundation-labor-closeout-strip > div {
        border-right: 0;
        border-bottom: 1px solid rgba(31, 113, 128, 0.12);
    }

    .foundation-labor-closeout-strip > div:last-child {
        border-bottom: 0;
    }

    .foundation-compact-labor-sheet {
        grid-template-columns: 1fr;
    }

    .foundation-compact-labor-micro-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-compact-labor-head,
    .foundation-compact-labor-rate,
    .foundation-compact-labor-difference {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(53, 88, 162, 0.12);
    }

    .foundation-compact-labor-matrix {
        overflow-x: auto;
    }

    .foundation-compact-labor-matrix > span,
    .foundation-compact-labor-matrix > strong,
    .foundation-compact-labor-matrix > b,
    .foundation-compact-labor-matrix > label {
        min-width: 7.4rem;
    }
}

.foundation-compact-proposal-card {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 0.7rem;
    padding: 0.82rem;
    border: 1px solid rgba(156, 90, 34, 0.2);
    border-radius: 16px;
    background: linear-gradient(135deg, #fff5d7, #f7d391 48%, #dca85c);
    box-shadow: 0 14px 28px rgba(156, 90, 34, 0.18);
}

.foundation-compact-proposal-card div {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    justify-items: center;
    gap: 0.18rem;
    padding: 0.64rem 0.76rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.foundation-compact-proposal-card span {
    display: block;
    color: #6b3f12;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-compact-proposal-card strong {
    display: block;
    color: #3f260c;
    font-size: 1.18rem;
    line-height: 1.1;
}

@media (max-width: 1280px) {
    .foundation-decision-grid {
        grid-template-columns: 1fr;
    }

    .foundation-sog-edit-menu {
        grid-template-columns: minmax(0, 1fr) auto repeat(2, minmax(9rem, 1fr));
    }

    .foundation-sog-edit-field.is-wide {
        grid-column: span 2;
    }

    .foundation-sog-input-grid,
    .foundation-sog-output-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-sog-field.is-half,
    .foundation-sog-field.is-third,
    .foundation-sog-mat-group,
    .foundation-sog-mesh-group,
    .foundation-sog-cost-group,
    .foundation-sog-metric-card,
    .foundation-sog-metric-card:nth-child(1),
    .foundation-sog-metric-card:nth-child(2),
    .foundation-sog-metric-card:nth-child(5),
    .foundation-sog-metric-card:nth-child(6) {
        grid-column: span 1;
    }

    .foundation-sog-row-head {
        grid-template-columns: 1fr;
    }

    .foundation-sog-row-head .foundation-sog-mode-toggle {
        justify-content: flex-start;
    }

    .foundation-compact-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .foundation-compact-proposal-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .foundation-command-title-row {
        flex-direction: column;
    }

    .foundation-rv-actions {
        align-items: stretch;
    }

    .foundation-rv-note,
    .foundation-rv-create-button {
        flex-basis: 100%;
        width: 100%;
    }

    .foundation-rv-compare-fields,
    .foundation-rv-print-fields,
    .foundation-rv-pdf-actions {
        grid-template-columns: 1fr;
    }

    .foundation-rv-chart-row {
        grid-template-columns: 1fr;
    }

    .foundation-rv-bar-line {
        grid-template-columns: minmax(54px, 0.22fr) minmax(0, 1fr);
    }

    .foundation-rv-bar-line strong {
        grid-column: 2;
    }

    .foundation-module-menu-badge {
        min-width: 100%;
        min-height: 3.5rem;
        grid-template-columns: auto auto;
        justify-content: center;
        gap: 0.5rem;
    }

    .foundation-module-menu-badge small {
        margin-top: 0;
    }

    .foundation-sog-input-head {
        flex-direction: column;
    }

    .foundation-sog-mode-toggle {
        justify-content: flex-start;
    }

    .foundation-sog-edit-menu {
        grid-template-columns: 1fr;
    }

    .foundation-sog-edit-field.is-wide {
        grid-column: auto;
    }

    .foundation-sog-edit-actions {
        justify-content: flex-start;
    }

    .foundation-sog-add-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .foundation-sog-input-grid,
    .foundation-sog-output-grid {
        grid-template-columns: 1fr;
    }

    .foundation-sog-field.is-half,
    .foundation-sog-field.is-third,
    .foundation-sog-mat-group,
    .foundation-sog-mesh-group,
    .foundation-sog-cost-group,
    .foundation-sog-metric-card,
    .foundation-sog-metric-card:nth-child(1),
    .foundation-sog-metric-card:nth-child(2),
    .foundation-sog-metric-card:nth-child(5),
    .foundation-sog-metric-card:nth-child(6) {
        grid-column: auto;
    }

    .foundation-sog-mat-group > div {
        grid-template-columns: 1fr;
    }

    .foundation-sog-mat-group {
        grid-template-columns: 1fr;
    }

    .foundation-sog-cost-group {
        grid-template-columns: 1fr;
    }

    .foundation-compact-kpi-grid {
        grid-template-columns: 1fr;
    }

    .foundation-compact-detail-panel {
        grid-template-columns: 1fr;
    }
}

.foundation-brief-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.foundation-card-toggle {
    display: grid;
    gap: 0;
}

.foundation-card-toggle summary {
    list-style: none;
}

.foundation-card-toggle summary::-webkit-details-marker {
    display: none;
}

.foundation-card-toggle-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 0.15rem 0.1rem;
    border-radius: 18px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.foundation-card-toggle-summary:hover {
    background: rgba(53, 88, 162, 0.04);
}

.foundation-card-toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    border: 1px solid rgba(53, 88, 162, 0.12);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.foundation-card-toggle-label::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.18s ease;
}

.foundation-card-toggle[open] .foundation-card-toggle-summary {
    background: rgba(53, 88, 162, 0.05);
}

.foundation-card-toggle[open] .foundation-card-toggle-label {
    background: rgba(53, 88, 162, 0.12);
    border-color: rgba(53, 88, 162, 0.18);
}

.foundation-card-toggle[open] .foundation-card-toggle-label::after {
    transform: rotate(-135deg) translateX(-1px);
}

.foundation-card-toggle-body {
    display: grid;
    gap: 0.95rem;
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(64, 54, 41, 0.06);
}

.foundation-icon-toggle-card {
    display: flex;
    justify-content: flex-end;
}

[data-foundation-compact-panel] > summary {
    display: none;
}

.foundation-icon-toggle-details {
    position: relative;
}

.foundation-icon-toggle-details[open] {
    width: 100%;
}

[data-foundation-compact-panel][open] {
    width: 100%;
}

[data-foundation-compact-panel][open] > .foundation-icon-toggle-panel,
[data-foundation-compact-panel][open] > .foundation-equipment-compact-panel,
[data-foundation-compact-panel][open] > .foundation-rule-icon-panel {
    width: 100%;
    min-height: calc(100vh - 13rem);
    margin-top: 0.75rem;
    margin-left: 0;
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.foundation-icon-toggle-summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    list-style: none;
    cursor: pointer;
}

.foundation-icon-toggle-summary::-webkit-details-marker {
    display: none;
}

.foundation-icon-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(53, 88, 162, 0.2);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(243, 247, 255, 0.96), rgba(255, 255, 255, 0.92));
    color: #3558a2;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.foundation-icon-toggle-button svg {
    width: 19px;
    height: 19px;
}

.foundation-icon-toggle-summary:hover .foundation-icon-toggle-button,
.foundation-icon-toggle-summary:focus-visible .foundation-icon-toggle-button {
    border-color: rgba(53, 88, 162, 0.42);
    box-shadow: 0 14px 30px rgba(53, 88, 162, 0.18);
}

.foundation-icon-toggle-count {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #0e7490;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.foundation-icon-toggle-panel {
    width: min(1160px, 100%);
    margin-top: 0.55rem;
    margin-left: auto;
}

.foundation-collapsible-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.94));
    border-color: rgba(64, 54, 41, 0.06);
    box-shadow: 0 12px 28px rgba(36, 57, 94, 0.05);
}

.foundation-brief-toggle {
    order: -20;
    margin-top: 0.85rem;
}

.foundation-readonly-banner {
    order: -25;
}

.foundation-brief-static .foundation-card-toggle-summary {
    cursor: default;
}

.foundation-brief-static .foundation-card-toggle-summary:hover {
    background: transparent;
}

.foundation-brief-toggle .foundation-card-toggle-summary .eyebrow,
.foundation-brief-toggle .foundation-card-toggle-summary .muted-line {
    color: rgba(227, 239, 255, 0.72);
}

.foundation-brief-toggle .foundation-card-toggle-summary h2 {
    color: #eff7ff;
}

.foundation-brief-toggle .foundation-card-toggle-label {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(160, 196, 255, 0.16);
    color: #eff7ff;
}

.foundation-brief-toggle.foundation-card-toggle[open] .foundation-card-toggle-summary {
    background: rgba(255, 255, 255, 0.05);
}

.foundation-brief-toggle.foundation-card-toggle[open] .foundation-card-toggle-label {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(160, 196, 255, 0.24);
}

.foundation-brief-toggle .foundation-card-toggle-body {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top-color: rgba(160, 196, 255, 0.14);
}

.foundation-brief-toggle .foundation-brief-grid {
    margin-top: 0;
}

.foundation-meta-block {
    padding: 0.9rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(160, 196, 255, 0.12);
    overflow-x: auto;
}

.foundation-panel-title {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
    color: #9fd9ff;
}

.foundation-project-grid,
.foundation-form-grid,
.foundation-labor-grid,
.foundation-takeoff-grid,
.foundation-takeoff-metrics,
.foundation-density-grid,
.foundation-risk-grid {
    display: grid;
    gap: 0.6rem;
}

.foundation-project-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.foundation-project-row {
    display: grid;
    gap: 0.3rem;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(160, 196, 255, 0.12);
    min-width: 0;
}

.foundation-project-row strong {
    color: #eff7ff;
}

.foundation-project-row-wide {
    grid-column: 1 / -1;
}

.foundation-form-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.foundation-form-grid label {
    min-width: 0;
}

.foundation-takeoff-metrics,
.foundation-takeoff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-density-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.foundation-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-risk-wide {
    grid-column: 1 / -1;
}

.foundation-main-grid {
    order: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: start;
}

.foundation-compact-menu {
    position: sticky;
    top: 0.65rem;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 0.52rem;
    max-width: 100%;
    padding: 0.52rem;
    overflow-x: auto;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.94));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
}

.foundation-top-compact-menu {
    order: 2;
    top: 0.65rem;
    margin-bottom: 0;
    border-radius: 20px;
}

.foundation-compact-menu-label {
    display: inline-grid;
    align-content: center;
    justify-items: center;
    flex: 0 0 auto;
    min-width: 4.4rem;
    height: 2.35rem;
    padding: 0.18rem 0.7rem;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.98), rgba(234, 88, 12, 0.92));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(234, 88, 12, 0.2);
}

.foundation-compact-menu-label strong {
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.06em;
}

.foundation-compact-menu-label small {
    margin-top: 0.14rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.foundation-compact-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 5rem;
    height: 2.35rem;
    padding: 0 0.78rem 0 0.48rem;
    border: 1px solid rgba(53, 88, 162, 0.16);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease;
}

.foundation-compact-menu-button:hover,
.foundation-compact-menu-button:focus-visible,
.foundation-compact-menu-button.is-active {
    border-color: rgba(14, 116, 144, 0.34);
    background: linear-gradient(145deg, rgba(236, 254, 255, 0.98), rgba(255, 255, 255, 0.96));
    color: #0e7490;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(14, 116, 144, 0.16);
}

.foundation-compact-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-radius: 10px;
    background: rgba(53, 88, 162, 0.08);
    color: currentColor;
}

.foundation-compact-menu-icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.foundation-compact-menu-button:hover .foundation-compact-menu-icon,
.foundation-compact-menu-button:focus-visible .foundation-compact-menu-icon,
.foundation-compact-menu-button.is-active .foundation-compact-menu-icon {
    border-color: rgba(14, 116, 144, 0.2);
    background: rgba(14, 116, 144, 0.12);
}

.foundation-compact-menu-button em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.12);
    color: #0e7490;
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0;
}

.foundation-compact-menu-button em.is-alert {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.foundation-main-grid > * {
    min-width: 0;
}

.foundation-primary-stack,
.foundation-side-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
}

.foundation-primary-stack {
    width: 100%;
}

.foundation-side-stack {
    width: 100%;
}

.foundation-primary-stack > .card {
    width: 100%;
    border-color: rgba(53, 88, 162, 0.12);
    box-shadow: 0 18px 40px rgba(36, 57, 94, 0.08);
}

.foundation-side-stack > .card {
    width: 100%;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(246, 249, 253, 0.96));
    border-color: rgba(53, 88, 162, 0.08);
    box-shadow: 0 10px 26px rgba(36, 57, 94, 0.05);
}

.foundation-primary-stack > .foundation-icon-toggle-card,
.foundation-primary-stack > .foundation-equipment-compact-card,
.foundation-side-stack > .foundation-icon-toggle-card,
.foundation-side-stack > .foundation-rule-icon-card {
    flex: 0 0 auto;
    width: auto;
}

.foundation-primary-stack > .foundation-icon-toggle-card:has(> .foundation-icon-toggle-details[open]),
.foundation-primary-stack > .foundation-equipment-compact-card:has(> .foundation-equipment-compact-details[open]),
.foundation-side-stack > .foundation-icon-toggle-card:has(> .foundation-icon-toggle-details[open]),
.foundation-side-stack > .foundation-rule-icon-card:has(> .foundation-rule-icon-details[open]) {
    flex: 1 0 100%;
    width: 100%;
}

.foundation-side-stack label {
    display: grid;
    gap: 0.32rem;
    align-content: start;
}

.foundation-side-stack input:not([type="checkbox"]):not([type="radio"]),
.foundation-side-stack select,
.foundation-side-stack .foundation-inline-input {
    width: min(100%, 12rem);
    min-width: 0;
    padding: 0.52rem 0.68rem;
    border-radius: 12px;
    font-size: 0.82rem;
}

.foundation-side-stack textarea {
    width: 100%;
}

.foundation-side-stack .foundation-density-grid,
.foundation-side-stack .foundation-rule-control-grid {
    gap: 0.5rem;
}

.foundation-side-stack .foundation-summary-row {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 118px) minmax(92px, 118px);
    gap: 0.55rem;
    padding: 0.68rem 0.78rem;
}

.foundation-side-stack .foundation-summary-row > .table-value,
.foundation-side-stack .foundation-summary-row > input {
    justify-self: end;
}

.foundation-side-stack .foundation-breakdown-table {
    min-width: 0;
    table-layout: fixed;
}

.foundation-side-stack .foundation-breakdown-table th,
.foundation-side-stack .foundation-breakdown-table td {
    padding: 0.65rem 0.72rem;
}

.foundation-side-stack .foundation-breakdown-table th:last-child,
.foundation-side-stack .foundation-breakdown-table td:last-child {
    width: 132px;
    text-align: right;
}

.foundation-side-stack .foundation-breakdown-table td:last-child input {
    width: 7.5rem;
    margin-left: auto;
}

.foundation-notes-card {
    grid-column: auto;
}

.foundation-notes-card-highlight {
    background: linear-gradient(165deg, rgba(255, 247, 233, 0.98), rgba(255, 239, 214, 0.94));
    border: 1px solid rgba(156, 90, 34, 0.18);
    box-shadow: 0 24px 50px rgba(116, 71, 28, 0.12);
}

.foundation-notes-card-highlight::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, rgba(156, 90, 34, 0.92), rgba(224, 152, 78, 0.92));
}

.foundation-matrix-card,
.foundation-breakdown-card,
.foundation-notes-card,
.foundation-takeoff-card,
.foundation-labor-card,
.foundation-risk-card,
.foundation-equipment-card {
    position: relative;
    overflow: hidden;
}

.foundation-summary-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(165deg, rgba(239, 246, 255, 0.98), rgba(229, 239, 252, 0.96)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.12), transparent 42%);
}

.foundation-breakdown-card::before,
.foundation-priority-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(53, 88, 162, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(53, 88, 162, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.foundation-notes-card-highlight .foundation-card-toggle-summary:hover,
.foundation-notes-card-highlight .foundation-card-toggle[open] .foundation-card-toggle-summary {
    background: rgba(156, 90, 34, 0.08);
}

.foundation-notes-card-highlight .foundation-card-toggle-label {
    background: rgba(156, 90, 34, 0.12);
    border-color: rgba(156, 90, 34, 0.2);
    color: #8c4e1d;
}

.foundation-notes-card-highlight .foundation-card-toggle-label::after {
    color: currentColor;
}

.foundation-default-rule-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.foundation-default-rule {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 251, 244, 0.96);
    border: 1px solid rgba(156, 90, 34, 0.18);
}

.foundation-default-rule strong {
    color: #24395e;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-default-rule span {
    color: #5c6f87;
    font-size: 0.86rem;
    line-height: 1.5;
}

.foundation-rebar-reference-panel {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    padding: 0.72rem;
    border-radius: 14px;
    background: rgba(243, 247, 255, 0.92);
    border: 1px solid rgba(53, 88, 162, 0.14);
}

.foundation-rebar-reference-panel .section-head {
    margin-bottom: 0;
    gap: 0.55rem;
}

.foundation-rebar-reference-panel .section-head h3 {
    font-size: 1rem;
    margin-bottom: 0.12rem;
}

.foundation-rebar-reference-panel .section-head .muted-line {
    font-size: 0.78rem;
    line-height: 1.3;
}

.foundation-rebar-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.foundation-rebar-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.32rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.14);
    background: rgba(255, 255, 255, 0.92);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.foundation-rebar-chip strong {
    color: #24395e;
    font-size: 0.76rem;
}

.foundation-rebar-chip.is-applied {
    background: rgba(229, 247, 238, 0.95);
    border-color: rgba(31, 95, 68, 0.18);
    color: #1f5f44;
}

.foundation-rebar-chip.is-reference {
    background: rgba(255, 251, 244, 0.96);
    border-color: rgba(156, 90, 34, 0.18);
    color: #7f4f24;
}

.foundation-rebar-reference-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(53, 88, 162, 0.12);
    background: rgba(255, 255, 255, 0.96);
}

.foundation-rebar-reference-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.foundation-rebar-reference-table th,
.foundation-rebar-reference-table td {
    padding: 0.48rem 0.62rem;
    text-align: left;
    vertical-align: middle;
}

.foundation-rebar-reference-table thead th {
    color: #3558a2;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(243, 247, 255, 0.96);
}

.foundation-rebar-reference-table tbody tr + tr td {
    border-top: 1px solid rgba(53, 88, 162, 0.08);
}

.foundation-rebar-reference-table td strong {
    display: block;
    color: #24395e;
    font-size: 0.78rem;
}

.foundation-rebar-reference-table td small {
    display: block;
    margin-top: 0.12rem;
    color: #5c6f87;
    font-size: 0.68rem;
    line-height: 1.25;
}

.foundation-rebar-reference-table tr.is-applied td:first-child strong {
    color: #1f5f44;
}

.foundation-rebar-reference-table tr.is-reference td:first-child strong {
    color: #7f4f24;
}

.foundation-rebar-reference-compact-card {
    display: flex;
    justify-content: flex-end;
}

.foundation-rebar-reference-compact-details {
    position: relative;
}

.foundation-rebar-reference-compact-details[open] {
    width: 100%;
}

.foundation-rebar-reference-compact-summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    list-style: none;
    cursor: pointer;
}

.foundation-rebar-reference-compact-summary::-webkit-details-marker {
    display: none;
}

.foundation-rebar-reference-compact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(53, 88, 162, 0.2);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(243, 247, 255, 0.96), rgba(255, 255, 255, 0.92));
    color: #3558a2;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.foundation-rebar-reference-compact-button svg {
    width: 19px;
    height: 19px;
}

.foundation-rebar-reference-compact-summary:hover .foundation-rebar-reference-compact-button,
.foundation-rebar-reference-compact-summary:focus-visible .foundation-rebar-reference-compact-button {
    border-color: rgba(53, 88, 162, 0.42);
    box-shadow: 0 14px 30px rgba(53, 88, 162, 0.18);
}

.foundation-rebar-reference-compact-panel {
    width: min(920px, 100%);
    margin-top: 0.55rem;
    margin-left: auto;
}

.foundation-rule-review-card {
    display: grid;
    gap: 0.95rem;
    background: linear-gradient(180deg, rgba(243, 247, 255, 0.98), rgba(234, 241, 252, 0.95));
    border: 1px solid rgba(53, 88, 162, 0.14);
}

.foundation-rule-icon-card {
    display: flex;
    justify-content: flex-end;
}

.foundation-rule-icon-details {
    position: relative;
}

.foundation-rule-icon-summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    list-style: none;
    cursor: pointer;
}

.foundation-rule-icon-summary::-webkit-details-marker {
    display: none;
}

.foundation-rule-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(236, 254, 255, 0.96), rgba(255, 255, 255, 0.92));
    color: #0e7490;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.foundation-rule-icon-button svg {
    width: 18px;
    height: 18px;
}

.foundation-rule-icon-summary:hover .foundation-rule-icon-button,
.foundation-rule-icon-summary:focus-visible .foundation-rule-icon-button {
    border-color: rgba(14, 116, 144, 0.42);
    box-shadow: 0 14px 30px rgba(14, 116, 144, 0.18);
}

.foundation-rule-icon-count {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.foundation-rule-icon-panel {
    min-width: min(780px, calc(100vw - 3rem));
    margin-top: 0.55rem;
}

.foundation-equipment-compact-card {
    display: flex;
    justify-content: flex-end;
}

.foundation-equipment-compact-details {
    position: relative;
}

.foundation-equipment-compact-details[open] {
    width: 100%;
}

.foundation-equipment-compact-summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    list-style: none;
    cursor: pointer;
}

.foundation-equipment-compact-summary::-webkit-details-marker {
    display: none;
}

.foundation-equipment-compact-details[open] .foundation-equipment-compact-summary {
    margin-left: auto;
}

.foundation-equipment-compact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(180, 83, 9, 0.2);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.92));
    color: #b45309;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.foundation-equipment-compact-button svg {
    width: 19px;
    height: 19px;
}

.foundation-equipment-compact-summary:hover .foundation-equipment-compact-button,
.foundation-equipment-compact-summary:focus-visible .foundation-equipment-compact-button {
    border-color: rgba(180, 83, 9, 0.42);
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.18);
}

.foundation-equipment-compact-count {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #0e7490;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.foundation-equipment-compact-panel {
    width: min(1160px, 100%);
    margin-top: 0.55rem;
    margin-left: auto;
}

.foundation-rule-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    align-items: start;
    gap: 0.8rem;
}

.foundation-rule-review-list {
    display: grid;
    gap: 0.75rem;
}

.foundation-rule-alert {
    display: grid;
    gap: 0.3rem;
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 245, 229, 0.92);
    border: 1px solid rgba(156, 90, 34, 0.18);
}

.foundation-rule-alert strong {
    color: #24395e;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.foundation-rule-alert span,
.foundation-rule-alert small {
    line-height: 1.45;
}

.foundation-rule-alert span {
    color: #7f4f24;
    font-size: 0.84rem;
    font-weight: 700;
}

.foundation-rule-alert small {
    color: #5c6f87;
    font-size: 0.82rem;
}

.foundation-rule-ok {
    padding: 0.9rem 0.95rem;
    border-radius: 16px;
    background: rgba(229, 247, 238, 0.92);
    border: 1px solid rgba(31, 95, 68, 0.14);
    color: #1f5f44;
    font-size: 0.86rem;
    font-weight: 700;
}

.foundation-rule-ok.is-hidden {
    display: none;
}

.foundation-breakdown-card > *,
.foundation-priority-card > * {
    position: relative;
    z-index: 1;
}

.foundation-priority-card {
    grid-column: 1 / -1;
    border-color: rgba(53, 88, 162, 0.18);
    box-shadow: 0 18px 40px rgba(36, 57, 94, 0.08);
}

.foundation-priority-card::after {
    content: "";
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    top: 0;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, rgba(53, 88, 162, 0.9), rgba(159, 217, 255, 0.65));
}

.foundation-scope-item.is-mat-foundation {
    border-color: rgba(183, 107, 18, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 251, 243, 0.92), rgba(255, 255, 255, 0.96)),
        var(--panel);
}

.foundation-scope-special-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: rgba(183, 107, 18, 0.1);
    border: 1px solid rgba(183, 107, 18, 0.18);
    color: #9a3412;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}

.foundation-mat-card {
    display: grid;
    gap: 0.95rem;
    background:
        radial-gradient(circle at top right, rgba(245, 181, 77, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(255, 255, 255, 0.98));
}

.foundation-mat-card-head {
    margin-bottom: 0;
}

.foundation-mat-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.95rem;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.foundation-mat-status.is-active {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.18);
}

.foundation-mat-status.is-draft {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-mat-status.is-idle {
    color: #7a8699;
    background: rgba(122, 134, 153, 0.1);
    border-color: rgba(122, 134, 153, 0.14);
}

.foundation-mat-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.92rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(183, 107, 18, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.foundation-mat-hero-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #9a3412;
    background: rgba(183, 107, 18, 0.12);
    border: 1px solid rgba(183, 107, 18, 0.18);
}

.foundation-mat-hero-icon .foundation-equipment-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.foundation-mat-hero-copy {
    display: grid;
    gap: 0.24rem;
}

.foundation-mat-hero-copy strong {
    color: #24395e;
    font-size: 1rem;
    line-height: 1.05;
}

.foundation-mat-hero-copy span {
    color: #5c6f87;
    font-size: 0.82rem;
    line-height: 1.38;
}

.foundation-mat-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.foundation-mat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.7rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
    white-space: nowrap;
}

.foundation-mat-badge.is-active {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.16);
}

.foundation-mat-badge.is-draft,
.foundation-mat-badge.is-logistics {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-mat-badge.is-idle {
    color: #7a8699;
    background: rgba(122, 134, 153, 0.1);
    border-color: rgba(122, 134, 153, 0.14);
}

.foundation-mat-badge.is-heavy {
    color: #9a3412;
    background: rgba(183, 107, 18, 0.1);
    border-color: rgba(183, 107, 18, 0.16);
}

.foundation-mat-badge.is-warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.18);
}

.foundation-mat-badge.is-risk {
    color: #b42318;
    background: rgba(228, 72, 72, 0.1);
    border-color: rgba(228, 72, 72, 0.16);
}

.foundation-mat-metric-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.foundation-mat-metric-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.72rem;
    align-items: flex-start;
    padding: 0.82rem 0.88rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.foundation-mat-metric-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid transparent;
}

.foundation-mat-metric-icon .foundation-equipment-icon {
    width: 1.12rem;
    height: 1.12rem;
}

.foundation-mat-metric-icon.is-area,
.foundation-mat-metric-icon.is-thickness {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-mat-metric-icon.is-concrete,
.foundation-mat-metric-icon.is-truck {
    color: #9a3412;
    background: rgba(183, 107, 18, 0.1);
    border-color: rgba(183, 107, 18, 0.16);
}

.foundation-mat-metric-icon.is-rebar {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.16);
}

.foundation-mat-metric-icon.is-pump,
.foundation-mat-metric-icon.is-plan {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-mat-metric-copy {
    display: grid;
    gap: 0.18rem;
}

.foundation-mat-metric-copy span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-mat-metric-copy strong {
    color: #24395e;
    font-size: 1.03rem;
    line-height: 1.06;
}

.foundation-mat-metric-copy small {
    color: #5c6f87;
    font-size: 0.76rem;
    line-height: 1.33;
}

.foundation-mat-alert-list {
    display: grid;
    gap: 0.58rem;
}

.foundation-mat-alert-list:empty {
    display: none;
}

.foundation-mat-alert {
    display: grid;
    gap: 0.22rem;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.84);
}

.foundation-mat-alert strong {
    color: #24395e;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-mat-alert span {
    color: #5c6f87;
    font-size: 0.79rem;
    line-height: 1.4;
}

.foundation-mat-alert.is-info {
    background: rgba(53, 88, 162, 0.06);
    border-color: rgba(53, 88, 162, 0.14);
}

.foundation-mat-alert.is-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.18);
}

.foundation-mat-alert.is-risk {
    background: rgba(228, 72, 72, 0.08);
    border-color: rgba(228, 72, 72, 0.16);
}

.foundation-mat-footnote {
    margin: 0;
    color: #5c6f87;
    font-size: 0.76rem;
    line-height: 1.42;
}

.foundation-table-wrap {
    border-radius: 22px;
}

.foundation-equipment-layout {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    align-items: start;
}

.foundation-equipment-card .section-head {
    margin-bottom: 0.75rem;
    gap: 0.85rem;
    align-items: flex-start;
}

.foundation-equipment-card .section-head h2 {
    margin-bottom: 0.25rem;
    line-height: 1.08;
}

.foundation-equipment-card .muted-line,
.foundation-equipment-card .foundation-card-copy {
    font-size: 0.82rem;
    line-height: 1.35;
}

.foundation-equipment-head-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.foundation-equipment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
}

.foundation-equipment-icon svg {
    width: 100%;
    height: 100%;
}

.foundation-equipment-summary-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

.foundation-equipment-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    padding: 0.78rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.foundation-equipment-summary-card.is-total {
    background: linear-gradient(160deg, rgba(53, 88, 162, 0.1), rgba(159, 217, 255, 0.18));
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-equipment-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    flex: 0 0 2.3rem;
    border-radius: 14px;
    border: 1px solid transparent;
}

.foundation-equipment-summary-icon.is-total {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.12);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-equipment-summary-icon.is-pump {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.16);
}

.foundation-equipment-summary-icon.is-boom {
    color: #9a3412;
    background: rgba(154, 52, 18, 0.1);
    border-color: rgba(154, 52, 18, 0.16);
}

.foundation-equipment-summary-icon.is-crane {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.16);
}

.foundation-equipment-summary-copy {
    display: grid;
    gap: 0.18rem;
}

.foundation-equipment-summary-copy span {
    color: var(--muted);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-equipment-summary-copy strong {
    color: #24395e;
    font-size: 1.12rem;
    line-height: 1.05;
}

.foundation-equipment-summary-copy small {
    color: #5c6f87;
    font-size: 0.76rem;
    line-height: 1.3;
}

.foundation-equipment-rule-info {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    padding: 0.72rem 0.82rem;
    border-radius: 16px;
    background: rgba(53, 88, 162, 0.05);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-equipment-rule-info summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #24395e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.foundation-equipment-rule-info summary::-webkit-details-marker {
    display: none;
}

.foundation-equipment-rule-info-icon {
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.22);
    background: rgba(255, 255, 255, 0.82);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.foundation-equipment-rule-panel {
    display: grid;
    gap: 0.55rem;
}

.foundation-equipment-rule-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    background: rgba(255, 251, 244, 0.98);
    border: 1px solid rgba(156, 90, 34, 0.16);
}

.foundation-equipment-rule-item strong {
    color: #24395e;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.foundation-equipment-rule-item span {
    color: #5c6f87;
    font-size: 0.78rem;
    line-height: 1.35;
}

.foundation-equipment-form-panel,
.foundation-equipment-table-panel {
    display: grid;
    gap: 0.7rem;
}

.foundation-subpanel {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(53, 88, 162, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.foundation-equipment-card .foundation-subpanel {
    padding: 0.82rem 0.9rem;
    border-radius: 18px;
}

.foundation-subpanel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
}

.foundation-equipment-card .foundation-subpanel-head {
    gap: 0.6rem;
}

.foundation-subpanel-head .foundation-panel-title {
    margin-bottom: 0.35rem;
    color: #3558a2;
}

.foundation-equipment-card .foundation-subpanel-head .foundation-panel-title {
    margin-bottom: 0.18rem;
    font-size: 0.88rem;
}

.foundation-subpanel-head .foundation-card-copy {
    margin: 0;
}

.foundation-subpanel-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    border: 1px solid rgba(53, 88, 162, 0.12);
    color: #3558a2;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.foundation-equipment-card .foundation-subpanel-count {
    min-height: 1.7rem;
    padding: 0.28rem 0.58rem;
    font-size: 0.7rem;
}

.foundation-equipment-launcher-cards {
    display: grid;
    gap: 0.7rem;
}

.foundation-equipment-launcher-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.78rem 0.82rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-equipment-launcher-card.is-pump {
    border-color: rgba(26, 137, 145, 0.2);
    background: linear-gradient(160deg, rgba(238, 252, 252, 0.94), rgba(255, 255, 255, 0.9));
}

.foundation-equipment-launcher-card.is-boom {
    border-color: rgba(214, 91, 42, 0.2);
    background: linear-gradient(160deg, rgba(255, 246, 240, 0.94), rgba(255, 255, 255, 0.9));
}

.foundation-equipment-launcher-card.is-crane {
    border-color: rgba(111, 82, 219, 0.2);
    background: linear-gradient(160deg, rgba(246, 243, 255, 0.94), rgba(255, 255, 255, 0.9));
}

.foundation-equipment-launcher-card-head {
    display: flex;
    align-items: center;
    gap: 0.58rem;
}

.foundation-equipment-launcher-card-head h3,
.foundation-equipment-launcher-card-head .eyebrow {
    margin: 0;
}

.foundation-equipment-launcher-card-head h3 {
    font-size: 0.95rem;
    line-height: 1.2;
    color: #24395e;
}

.foundation-equipment-launcher-copy {
    margin: 0;
    color: #5c6f87;
    font-size: 0.76rem;
    line-height: 1.35;
}

.foundation-equipment-launcher-rule {
    border-radius: 12px;
    border: 1px solid rgba(53, 88, 162, 0.12);
    background: rgba(255, 255, 255, 0.62);
    overflow: hidden;
}

.foundation-equipment-launcher-rule summary {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.48rem 0.58rem;
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.foundation-equipment-launcher-rule summary::-webkit-details-marker {
    display: none;
}

.foundation-equipment-launcher-rule-body {
    display: grid;
    gap: 0.28rem;
    padding: 0 0.68rem 0.64rem;
    color: #425775;
    font-size: 0.75rem;
    line-height: 1.35;
}

.foundation-equipment-launcher-rule-body strong {
    color: #24395e;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.foundation-equipment-launcher-rule-body p {
    margin: 0;
}

.foundation-equipment-launcher-card-grid {
    display: grid;
    grid-template-columns: minmax(86px, 0.35fr) minmax(0, 1fr);
    gap: 0.55rem;
}

.foundation-equipment-launcher-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.foundation-equipment-launcher-empty {
    padding: 0.7rem;
}

.foundation-equipment-form-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: minmax(118px, 0.32fr) minmax(0, 1fr);
}

.foundation-equipment-observation-field {
    align-content: start;
}

.foundation-equipment-quantity-actions {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.foundation-equipment-auto-apply {
    flex: 1 1 100%;
    min-height: 2.8rem;
    padding: 0.55rem 0.95rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #3558a2, #27467f);
    box-shadow: 0 10px 20px rgba(53, 88, 162, 0.18);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-align: center;
}

.foundation-equipment-auto-apply:hover {
    background: linear-gradient(135deg, #2f5095, #223d70);
}

.foundation-equipment-auto-apply.is-match {
    background: linear-gradient(135deg, #235f56, #194941);
    box-shadow: 0 10px 20px rgba(35, 95, 86, 0.18);
}

.foundation-equipment-auto-apply.is-disabled,
.foundation-equipment-auto-apply:disabled {
    background: linear-gradient(135deg, rgba(53, 88, 162, 0.22), rgba(53, 88, 162, 0.14));
    box-shadow: none;
    color: rgba(36, 57, 94, 0.72);
}

.foundation-equipment-recommended-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-height: 2rem;
    padding: 0.3rem 0.72rem;
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    font: inherit;
    cursor: pointer;
}

.foundation-equipment-recommended-chip span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.foundation-equipment-recommended-chip strong {
    font-size: 0.76rem;
    color: #24395e;
}

.foundation-equipment-recommended-chip.is-match {
    background: rgba(35, 95, 86, 0.1);
    border-color: rgba(35, 95, 86, 0.18);
}

.foundation-equipment-recommended-chip.is-hidden {
    display: none;
}

.foundation-equipment-quantity-feedback {
    margin-top: 0.2rem;
}

.foundation-equipment-auto-note {
    margin: 0;
    min-height: 0;
    font-size: 0.74rem;
    line-height: 1.3;
}

.foundation-equipment-preview {
    display: grid;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(53, 88, 162, 0.05);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-equipment-preview.is-highlight {
    background: linear-gradient(160deg, rgba(255, 245, 229, 0.94), rgba(255, 237, 210, 0.9));
    border-color: rgba(156, 90, 34, 0.22);
}

.foundation-equipment-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    align-items: center;
}

.foundation-equipment-preview-head strong {
    font-size: 0.9rem;
    color: #24395e;
}

.foundation-equipment-preview-summary,
.foundation-equipment-preview-status {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.foundation-equipment-preview-summary {
    color: #24395e;
    font-weight: 700;
}

.foundation-equipment-preview-status {
    color: #5c6f87;
    padding-top: 0.08rem;
}

.foundation-equipment-guidance {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.1rem;
    border-top: 1px solid rgba(53, 88, 162, 0.08);
}

.foundation-equipment-guidance.is-hidden {
    display: none;
}

.foundation-equipment-guidance-note {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #35506f;
}

.foundation-equipment-boom-apply {
    justify-self: start;
}

.foundation-observation-flag {
    display: block;
    margin-bottom: 0.2rem;
    padding: 0.42rem 0.55rem;
    border-radius: 12px;
    background: rgba(156, 90, 34, 0.12);
    border: 1px solid rgba(156, 90, 34, 0.18);
    color: var(--brand-strong);
    font-size: 0.74rem;
    line-height: 1.3;
    font-weight: 700;
}

.foundation-equipment-actions {
    flex-wrap: wrap;
}

.foundation-equipment-entry-list {
    display: grid;
    gap: 0.65rem;
}

.foundation-equipment-entry {
    display: grid;
    gap: 0.65rem;
    padding: 0.78rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(53, 88, 162, 0.1);
    box-shadow: none;
}

.foundation-equipment-entry-auto {
    background: linear-gradient(180deg, rgba(240, 248, 255, 0.96), rgba(232, 243, 255, 0.9));
    border-style: dashed;
    border-color: rgba(53, 88, 162, 0.22);
}

.foundation-equipment-entry-auto.is-suppressed {
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 241, 228, 0.9));
    border-color: rgba(156, 90, 34, 0.24);
}

.foundation-equipment-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
}

.foundation-equipment-entry-main {
    display: flex;
    align-items: flex-start;
    gap: 0.72rem;
    min-width: 0;
}

.foundation-equipment-entry-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    border-radius: 14px;
    border: 1px solid transparent;
}

.foundation-equipment-entry-icon.is-pump {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.16);
}

.foundation-equipment-entry-icon.is-boom {
    color: #9a3412;
    background: rgba(154, 52, 18, 0.1);
    border-color: rgba(154, 52, 18, 0.16);
}

.foundation-equipment-entry-icon.is-crane {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.16);
}

.foundation-equipment-entry-icon.is-equipment {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.08);
    border-color: rgba(53, 88, 162, 0.14);
}

.foundation-equipment-entry-copy {
    display: grid;
    gap: 0.24rem;
    min-width: 0;
}

.foundation-equipment-entry-title-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.foundation-equipment-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-equipment-type-badge.is-pump {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-color: rgba(15, 118, 110, 0.14);
}

.foundation-equipment-type-badge.is-boom {
    color: #9a3412;
    background: rgba(154, 52, 18, 0.1);
    border-color: rgba(154, 52, 18, 0.14);
}

.foundation-equipment-type-badge.is-crane {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.14);
}

.foundation-equipment-type-badge.is-equipment {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.08);
    border-color: rgba(53, 88, 162, 0.14);
}

.foundation-equipment-type-badge.is-auto {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.foundation-equipment-entry-head strong {
    color: #24395e;
    font-size: 0.9rem;
}

.foundation-equipment-entry-summary {
    margin: 0;
    color: #24395e;
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 700;
}

.foundation-equipment-entry-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.foundation-auto-equipment-chip.is-suppressed {
    background: rgba(156, 90, 34, 0.1);
    border-color: rgba(156, 90, 34, 0.16);
    color: #9c5a22;
}

.foundation-equipment-entry-notes {
    display: grid;
    gap: 0.28rem;
}

.foundation-matrix-table,
.foundation-breakdown-table {
    min-width: 860px;
}

.foundation-code-cell {
    font-family: Consolas, "Segoe UI Variable", sans-serif;
    color: #3558a2;
    font-weight: 700;
}

.foundation-inline-input {
    min-width: 92px;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    font-size: 0.9rem;
}

.foundation-inline-input.is-out-of-range {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.55);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.foundation-inline-number {
    text-align: right;
}

.foundation-inline-hint {
    display: block;
    margin: 0.2rem 0 0.55rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.foundation-inline-unit {
    min-width: 72px;
}

.foundation-money-field {
    position: relative;
}

.foundation-money-prefix {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-weight: 700;
    pointer-events: none;
}

.foundation-money-field .foundation-inline-input {
    padding-left: 1.8rem;
}

.foundation-scope-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}

.foundation-scope-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    border: 1px solid rgba(53, 88, 162, 0.12);
    color: #3558a2;
    font-weight: 700;
    font-size: 0.8rem;
}

.foundation-scope-counter span {
    color: var(--muted);
    font-weight: 500;
}

.foundation-scope-list {
    display: grid;
    gap: 0.42rem;
}

.foundation-scope-table {
    display: grid;
    gap: 0.42rem;
    overflow-x: auto;
}

.foundation-matrix-subsection {
    margin-top: 0.95rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-attachment-cell {
    display: grid;
    gap: 0.45rem;
}

.foundation-attachment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.85rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.14);
    background: rgba(53, 88, 162, 0.06);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.foundation-attachment-status.is-ready {
    background: rgba(35, 95, 86, 0.09);
    border-color: rgba(35, 95, 86, 0.16);
    color: #235f56;
}

.foundation-attachment-status.is-empty {
    background: rgba(97, 116, 142, 0.08);
    border-color: rgba(97, 116, 142, 0.12);
    color: #61748e;
}

.foundation-attachment-status.is-pending {
    background: rgba(156, 90, 34, 0.08);
    border-color: rgba(156, 90, 34, 0.16);
    color: #9c5a22;
}

.foundation-attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.foundation-attachment-upload-inline {
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.foundation-file-input-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.foundation-scope-table-head,
.foundation-scope-total-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.55fr) minmax(118px, 0.72fr) minmax(102px, 0.58fr) minmax(98px, 0.55fr) minmax(118px, 0.72fr) minmax(118px, 0.72fr) minmax(118px, 0.72fr);
    min-width: 960px;
    gap: 0.42rem;
    align-items: center;
}

.foundation-scope-table-head {
    padding: 0 0.55rem;
    color: #61748e;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-scope-metric-head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: 100%;
    min-height: 1.45rem;
    padding: 0.24rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.12);
    background: rgba(53, 88, 162, 0.06);
    color: #3558a2;
    font-size: 0.62rem;
}

.foundation-scope-metric-head.is-cost {
    background: rgba(156, 90, 34, 0.08);
    border-color: rgba(156, 90, 34, 0.16);
    color: #8b4d17;
}

.foundation-scope-metric-head.is-unit-cost {
    background: rgba(35, 95, 86, 0.08);
    border-color: rgba(35, 95, 86, 0.16);
    color: #235f56;
}

.foundation-scope-metric-head-icon {
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: currentColor;
}

.foundation-scope-item {
    padding: 0.56rem 0.62rem;
    border-radius: 16px;
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-color: color-mix(in srgb, var(--scope-accent, #3558a2) 24%, transparent);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(242, 247, 251, 0.84)),
        radial-gradient(circle at top right, var(--scope-accent-soft, rgba(95, 155, 255, 0.12)), transparent 42%);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.foundation-scope-item.is-active {
    border-color: rgba(35, 95, 86, 0.22);
    box-shadow: 0 12px 24px rgba(20, 42, 75, 0.06);
}

.foundation-scope-item.is-inactive {
    opacity: 0.88;
    background: rgba(255, 255, 255, 0.76);
}

.foundation-scope-item-main {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) minmax(118px, 0.68fr) minmax(176px, 0.95fr) minmax(98px, 0.55fr) minmax(118px, 0.68fr) minmax(118px, 0.68fr) minmax(118px, 0.68fr);
    min-width: 1040px;
    gap: 0.42rem;
    align-items: center;
}

.foundation-scope-item-cell {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
}

.foundation-scope-item-trigger {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: default;
}

.foundation-zero-item-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 35, 24, 0.16);
    background: rgba(180, 35, 24, 0.07);
    color: #b42318;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.foundation-zero-item-button:hover {
    background: rgba(180, 35, 24, 0.12);
    border-color: rgba(180, 35, 24, 0.28);
    transform: translateY(-1px);
}

.foundation-row-edit-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 2.35rem;
    height: 1.55rem;
    padding: 0 0.46rem;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.16);
    background: rgba(53, 88, 162, 0.06);
    color: #3558a2;
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.foundation-row-edit-button:hover {
    background: rgba(53, 88, 162, 0.12);
    border-color: rgba(53, 88, 162, 0.28);
}

.foundation-zero-item-button svg {
    width: 0.95rem;
    height: 0.95rem;
}

.foundation-zero-modal-button svg {
    width: 0.9rem;
    height: 0.9rem;
}

.foundation-scope-item-overview {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    flex-wrap: nowrap;
}

.foundation-scope-stage-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    background: var(--scope-accent-soft, rgba(53, 88, 162, 0.1));
    color: var(--scope-accent, #3558a2);
    border: 1px solid rgba(53, 88, 162, 0.14);
    border-color: color-mix(in srgb, var(--scope-accent, #3558a2) 24%, transparent);
}

.foundation-scope-stage-icon svg {
    width: 1.08rem;
    height: 1.08rem;
}

.foundation-code-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.58rem;
    border-radius: 999px;
    background: var(--scope-accent-soft, rgba(53, 88, 162, 0.08));
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-color: color-mix(in srgb, var(--scope-accent, #3558a2) 24%, transparent);
    color: var(--scope-accent, #3558a2);
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.foundation-scope-item-codebar,
.foundation-row-status,
.foundation-modal-head-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.foundation-scope-item-codebar {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.foundation-code-button {
    appearance: none;
    border: 1px solid rgba(53, 88, 162, 0.18);
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    padding: 0.55rem 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.foundation-code-button:hover {
    background: rgba(53, 88, 162, 0.14);
    border-color: rgba(53, 88, 162, 0.26);
    transform: translateY(-1px);
}

.foundation-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.48rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    border: 1px solid rgba(64, 54, 41, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.foundation-status-pill.is-active {
    color: #1b4332;
    background: rgba(45, 106, 79, 0.12);
    border-color: rgba(45, 106, 79, 0.22);
}

.foundation-status-pill.is-inactive {
    color: var(--muted);
    background: rgba(64, 54, 41, 0.06);
}

.foundation-scope-item-copy {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.foundation-scope-item-copy strong {
    font-size: 0.9rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.foundation-scope-item-copy p,
.foundation-scope-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.22;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foundation-scope-item-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.foundation-scope-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.44rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.07);
    color: #3558a2;
    font-size: 0.66rem;
    font-weight: 700;
    white-space: nowrap;
}

.foundation-row-snapshot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-height: 38px;
    padding: 0.34rem 0.46rem;
    border-radius: 12px;
    background: rgba(53, 88, 162, 0.06);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.foundation-row-snapshot.is-quantity {
    background: rgba(53, 88, 162, 0.08);
    border-color: rgba(53, 88, 162, 0.16);
}

.foundation-row-snapshot.is-cost {
    background: rgba(156, 90, 34, 0.09);
    border-color: rgba(156, 90, 34, 0.18);
}

.foundation-row-snapshot.is-unit-cost {
    background: rgba(35, 95, 86, 0.08);
    border-color: rgba(35, 95, 86, 0.16);
}

.foundation-row-snapshot.is-rebar-factor {
    flex-direction: column;
    align-items: stretch;
    gap: 0.22rem;
    padding: 0.24rem 0.34rem;
}

.foundation-row-rebar-factor-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.24rem;
}

.foundation-row-rebar-factor-input {
    height: 1.58rem;
    padding: 0 0.35rem;
    border-radius: 9px;
    text-align: center;
    text-align-last: center;
}

.foundation-row-rebar-thermometer {
    position: relative;
    display: block;
    height: 0.34rem;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(90deg, #b42318 0%, #ca8a04 24%, #1f5f44 50%, #ca8a04 76%, #b42318 100%);
    border: 1px solid rgba(36, 57, 94, 0.12);
}

.foundation-row-rebar-thermometer-marker {
    position: absolute;
    top: 50%;
    left: var(--rebar-factor-level, 0%);
    width: 0.64rem;
    height: 0.64rem;
    border-radius: 999px;
    background: #24395e;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(20, 42, 75, 0.22);
    transform: translate(-50%, -50%);
}

.foundation-row-rebar-factor-current {
    display: none;
}

.foundation-row-snapshot.is-psi {
    padding: 0.26rem 0.36rem;
}

.foundation-row-psi-select {
    width: 100%;
    min-width: 0;
    height: 1.9rem;
    padding: 0 1.45rem 0 0.45rem;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.88);
    color: #24395e;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
    text-align-last: left;
}

.foundation-row-psi-current {
    display: none;
}

.foundation-compact-unit-price-control,
.foundation-compact-qty-control {
    display: inline-grid;
    grid-template-columns: minmax(0, 5.4rem) auto;
    align-items: center;
    gap: 0.32rem;
    width: 100%;
    max-width: 8.8rem;
}

.foundation-compact-qty-control {
    grid-template-columns: minmax(0, 4.2rem) auto;
    max-width: 7.7rem;
}

.foundation-compact-unit-price-input,
.foundation-compact-qty-input {
    width: 100%;
    min-width: 0;
    height: 1.46rem;
    padding: 0 0.45rem;
    border-radius: 9px;
    border: 1px solid rgba(53, 88, 162, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: #24395e;
    font-size: 0.76rem;
    font-weight: 800;
    text-align: right;
}

.foundation-compact-unit-price-input[readonly],
.foundation-compact-qty-input[readonly] {
    color: #6f7f95;
    background: rgba(255, 255, 255, 0.54);
}

.foundation-compact-unit-price-input:focus,
.foundation-compact-qty-input:focus {
    outline: 2px solid rgba(53, 88, 162, 0.24);
    outline-offset: 1px;
}

.foundation-compact-unit-price-edit,
.foundation-compact-qty-edit {
    appearance: none;
    height: 1.46rem;
    padding: 0 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(53, 88, 162, 0.18);
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.foundation-compact-unit-price-edit:hover,
.foundation-compact-qty-edit:hover {
    background: rgba(53, 88, 162, 0.14);
}

.foundation-compact-item-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 8px;
}

.foundation-compact-item-toggle[role="button"] {
    cursor: pointer;
}

.foundation-compact-item-toggle[role="button"]:focus-visible {
    outline: 2px solid rgba(53, 88, 162, 0.32);
    outline-offset: 2px;
}

.foundation-compact-item-toggle[role="button"]:hover {
    color: #3558a2;
}

.foundation-row-snapshot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.42rem;
    height: 1.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.foundation-row-snapshot-icon svg {
    width: 0.86rem;
    height: 0.86rem;
}

.foundation-row-snapshot.is-quantity .foundation-row-snapshot-icon {
    color: #3558a2;
}

.foundation-row-snapshot.is-cost .foundation-row-snapshot-icon {
    color: #9c5a22;
}

.foundation-row-snapshot.is-unit-cost .foundation-row-snapshot-icon {
    color: #235f56;
}

.foundation-row-snapshot strong {
    color: #24395e;
    font-size: 0.82rem;
    white-space: nowrap;
    text-align: center;
}

.foundation-row-snapshot.is-cost strong {
    color: #7a451a;
}

.foundation-row-snapshot.is-unit-cost strong {
    color: #235f56;
}

.foundation-row-snapshot .foundation-inline-input {
    min-width: 0;
    width: 100%;
    padding: 0.24rem 0.36rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #24395e;
    background: rgba(255, 255, 255, 0.9);
}

.foundation-row-snapshot small {
    color: #235f56;
    font-weight: 700;
    font-size: 0.88rem;
}

.foundation-row-rule-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    color: #3558a2;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(53, 88, 162, 0.18);
    cursor: help;
}

.foundation-row-rule-info svg {
    width: 0.78rem;
    height: 0.78rem;
}

.foundation-row-rule-info.is-rebar-ok {
    color: #1f5f44;
    border-color: rgba(31, 95, 68, 0.26);
}

.foundation-row-rule-info.is-rebar-warning {
    color: #854d0e;
    border-color: rgba(202, 138, 4, 0.32);
}

.foundation-row-rule-info.is-rebar-danger {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.32);
}

.foundation-scope-item-actions {
    display: grid;
    gap: 0.28rem;
    align-content: center;
}

.foundation-scope-toggle {
    min-width: 70px;
}

.foundation-scope-item-actions .small-button {
    min-height: 28px;
    padding: 0.26rem 0.6rem;
    font-size: 0.7rem;
}

.foundation-scope-total-row {
    padding: 0.56rem 0.62rem;
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.98), rgba(210, 239, 220, 0.92));
    border: 1px solid rgba(35, 95, 86, 0.16);
    color: #1b4332;
}

.foundation-scope-total-row strong {
    font-size: 0.84rem;
}

.foundation-scope-total-row span:last-child {
    justify-self: end;
    color: #235f56;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foundation-item-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1.9rem;
}

.foundation-item-modal[hidden] {
    display: none;
}

.foundation-item-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 18, 32, 0.78), rgba(8, 18, 32, 0.64)),
        radial-gradient(circle at top center, rgba(95, 155, 255, 0.18), transparent 42%);
    backdrop-filter: blur(20px);
}

.foundation-item-modal-card {
    position: relative;
    width: min(1460px, calc(100vw - 56px));
    max-height: min(95vh, 1120px);
    overflow: auto;
    padding: 1.55rem 1.55rem 1.25rem;
    background:
        linear-gradient(145deg, rgba(252, 253, 255, 0.99), rgba(235, 243, 250, 0.98)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.16), transparent 38%),
        radial-gradient(circle at bottom left, rgba(35, 95, 86, 0.1), transparent 34%);
    border-color: rgba(95, 155, 255, 0.18);
    box-shadow: 0 52px 160px rgba(8, 17, 31, 0.36);
}

.foundation-item-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(95, 155, 255, 0.14);
}

.foundation-modal-title-wrap {
    display: grid;
    gap: 0.75rem;
}

.foundation-modal-code-pill {
    display: inline-flex;
    width: fit-content;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: rgba(18, 57, 124, 0.08);
    border: 1px solid rgba(18, 57, 124, 0.12);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.foundation-item-modal-header h2 {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.02;
}

.foundation-modal-subtitle {
    max-width: 860px;
    margin: 0.45rem 0 0;
    color: #5c6f87;
    font-size: 0.98rem;
    line-height: 1.55;
}

.foundation-item-modal-header .foundation-modal-head-actions {
    justify-content: flex-end;
}

.foundation-modal-state-banner {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1.15rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 14px 28px rgba(15, 36, 68, 0.04);
}

.foundation-modal-state-banner strong {
    font-size: 1rem;
}

.foundation-modal-state-banner span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.foundation-modal-state-banner.is-active {
    background: rgba(45, 106, 79, 0.08);
    border-color: rgba(45, 106, 79, 0.18);
}

.foundation-modal-state-banner.is-inactive {
    background: rgba(64, 54, 41, 0.04);
}

.foundation-item-modal-card label > span,
.foundation-item-modal-card .foundation-scope-driver-fields span {
    color: #61748e;
    font-weight: 600;
}

.foundation-item-modal-card .foundation-inline-input {
    min-height: 54px;
    padding: 0.82rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(84, 103, 143, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.foundation-item-modal-card textarea.foundation-inline-input {
    min-height: 108px;
    resize: vertical;
}

.foundation-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

body.modal-open {
    overflow: hidden;
}

body.foundation-labor-window-page {
    overflow: hidden;
    background: #eef6fb;
}

body.foundation-labor-window-page .sidebar,
body.foundation-labor-window-page .topbar,
body.foundation-labor-window-page .app-signature,
body.foundation-labor-window-page .back-to-top-button,
body.foundation-labor-window-page .alert {
    display: none;
}

body.foundation-labor-window-page .content,
body.app-page.foundation-labor-window-page:has(.foundation-shell) .content {
    min-height: 100vh;
    margin-left: 0;
    padding: 0;
    background: #eef6fb;
}

body.foundation-labor-window-page .page-body,
body.app-page.foundation-labor-window-page:has(.foundation-shell) .page-body {
    min-height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.foundation-labor-window-page .foundation-labor-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: start center;
    align-items: start;
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

body.foundation-labor-window-page .foundation-item-modal-backdrop {
    background: #eef6fb;
    backdrop-filter: none;
}

body.foundation-labor-window-page .foundation-item-modal-card.foundation-labor-modal-card {
    width: min(1280px, calc(100vw - 1.5rem));
    height: calc(100dvh - 1.5rem);
    margin: 0 auto;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.foundation-modal-workspace {
    display: grid;
    gap: 1.2rem;
}

.foundation-modal-summary-shell {
    display: grid;
    gap: 0.8rem;
}

.foundation-modal-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.foundation-head-copy {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.foundation-panel-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.foundation-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 14px;
    border: 1px solid rgba(53, 88, 162, 0.14);
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.foundation-panel-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.foundation-panel-icon.is-summary,
.foundation-panel-icon.is-composition,
.foundation-panel-icon.is-grid {
    background: rgba(53, 88, 162, 0.08);
    border-color: rgba(53, 88, 162, 0.14);
    color: #3558a2;
}

.foundation-panel-icon.is-material,
.foundation-panel-icon.is-total,
.foundation-panel-icon.is-allowance {
    background: rgba(156, 90, 34, 0.1);
    border-color: rgba(156, 90, 34, 0.16);
    color: #8c4e1d;
}

.foundation-panel-icon.is-labor,
.foundation-panel-icon.is-system,
.foundation-panel-icon.is-risk,
.foundation-panel-icon.is-files {
    background: rgba(36, 57, 94, 0.08);
    border-color: rgba(36, 57, 94, 0.14);
    color: #24395e;
}

.foundation-panel-icon.is-profit,
.foundation-panel-icon.is-notes,
.foundation-panel-icon.is-sell {
    background: rgba(35, 95, 86, 0.1);
    border-color: rgba(35, 95, 86, 0.16);
    color: #1f5f44;
}

.foundation-modal-summary-bar {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.foundation-modal-summary-card {
    display: grid;
    gap: 0.22rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 252, 0.92)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.08), transparent 42%);
    border: 1px solid rgba(53, 88, 162, 0.12);
    box-shadow: 0 16px 32px rgba(26, 42, 66, 0.05);
}

.foundation-modal-summary-card span,
.foundation-metric span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foundation-modal-summary-card strong,
.foundation-metric strong {
    color: #24395e;
    font-size: 1.05rem;
}

.foundation-modal-summary-card.is-cost {
    background: linear-gradient(155deg, rgba(255, 245, 235, 0.98), rgba(250, 233, 210, 0.92));
    border-color: rgba(156, 90, 34, 0.16);
}

.foundation-modal-summary-card.is-price {
    background: linear-gradient(155deg, rgba(235, 247, 242, 0.98), rgba(208, 234, 223, 0.92));
    border-color: rgba(35, 95, 86, 0.18);
}

.foundation-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.foundation-modal-tech-stack {
    display: grid;
    gap: 0.9rem;
}

.foundation-scope-driver-card {
    display: grid;
    gap: 0.9rem;
    padding: 1.15rem 1.2rem;
    border-radius: 22px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(242, 247, 251, 0.92)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.08), transparent 44%);
    border: 1px solid rgba(53, 88, 162, 0.12);
    box-shadow: 0 18px 36px rgba(26, 42, 66, 0.05);
}

.foundation-scope-driver-card-material {
    background:
        linear-gradient(160deg, rgba(255, 250, 240, 0.98), rgba(247, 241, 227, 0.94)),
        radial-gradient(circle at top right, rgba(156, 90, 34, 0.14), transparent 42%);
    border: 1px solid rgba(156, 90, 34, 0.22);
    box-shadow: 0 22px 42px rgba(82, 53, 24, 0.08);
}

.foundation-scope-driver-card-material .foundation-panel-title {
    color: var(--brand-strong);
}

.foundation-scope-driver-card-material .foundation-helper-chip {
    background: rgba(156, 90, 34, 0.1);
    border-color: rgba(156, 90, 34, 0.16);
    color: var(--brand-strong);
}

.foundation-modal-inline-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.foundation-item-modal-card .foundation-panel-title {
    margin: 0;
    color: #3558a2;
}

.foundation-card-copy {
    margin: 0.3rem 0 0;
    color: #5c6f87;
    font-size: 0.86rem;
    line-height: 1.45;
}

.foundation-helper-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    border: 1px solid rgba(53, 88, 162, 0.12);
    color: #3558a2;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-scope-driver-fields {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.foundation-scope-driver-field-stack {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.foundation-scope-driver-fields-tight {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.foundation-scope-driver-fields label,
.foundation-commercial-grid label {
    display: grid;
    gap: 0.4rem;
}

.foundation-modal-commercial-card {
    display: grid;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(250, 252, 255, 0.98), rgba(236, 244, 251, 0.95)),
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.08), transparent 42%);
    border: 1px solid rgba(35, 95, 86, 0.14);
    box-shadow: 0 20px 40px rgba(26, 42, 66, 0.06);
    position: sticky;
    top: 0;
}

.foundation-commercial-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-commercial-highlight {
    padding: 0.7rem;
    border-radius: 18px;
    background: rgba(53, 88, 162, 0.05);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.foundation-commercial-wide {
    grid-column: 1 / -1;
}

.foundation-commercial-totals {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-commercial-total-card {
    display: grid;
    gap: 0.3rem;
    justify-items: center;
    text-align: center;
    padding: 1rem 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(255, 245, 235, 0.98), rgba(249, 234, 214, 0.92));
    border: 1px solid rgba(156, 90, 34, 0.16);
}

.foundation-total-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.foundation-total-card-head .foundation-panel-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 12px;
}

.foundation-commercial-total-card.is-price {
    background: linear-gradient(155deg, rgba(235, 247, 242, 0.98), rgba(208, 234, 223, 0.92));
    border-color: rgba(35, 95, 86, 0.18);
}

.foundation-total-card-head > span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foundation-commercial-total-card.is-price .foundation-total-card-head span {
    color: #1f5f44;
}

.foundation-commercial-total-card strong {
    color: #24395e;
    font-size: 1.18rem;
}

.foundation-item-composition-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.foundation-item-composition-stack {
    display: grid;
    gap: 0.9rem;
}

.foundation-item-composition-section {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-item-composition-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.foundation-section-head-copy {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.foundation-section-head-copy > div {
    display: grid;
    gap: 0.15rem;
}

.foundation-item-composition-section-head .foundation-panel-icon {
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 13px;
}

.foundation-item-composition-section-head p {
    margin: 0;
    color: #24395e;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.foundation-section-head-copy > div > span {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foundation-item-composition-final-head {
    margin-top: 0.15rem;
}

.foundation-item-composition-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-item-composition-grid-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.foundation-item-composition-grid-fifth {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.foundation-item-composition-sheet-section {
    gap: 0.95rem;
}

.foundation-cost-sheet-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid rgba(156, 90, 34, 0.16);
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.98), rgba(255, 248, 237, 0.95));
}

.foundation-cost-sheet-table {
    width: 100%;
    min-width: 470px;
    table-layout: fixed;
    border-collapse: collapse;
}

.foundation-cost-sheet-table th:nth-child(1),
.foundation-cost-sheet-table td:nth-child(1) {
    width: 38%;
}

.foundation-cost-sheet-table th:nth-child(2),
.foundation-cost-sheet-table td:nth-child(2) {
    width: 22%;
}

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

.foundation-cost-sheet-table th:nth-child(4),
.foundation-cost-sheet-table td:nth-child(4) {
    width: 22%;
}

.foundation-cost-sheet-table th,
.foundation-cost-sheet-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(156, 90, 34, 0.1);
}

.foundation-cost-sheet-table thead th {
    background: linear-gradient(180deg, rgba(255, 235, 163, 0.95), rgba(252, 220, 120, 0.92));
    color: #6e4317;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.foundation-cost-sheet-table thead th:first-child {
    text-align: left;
}

.foundation-cost-sheet-table thead th:first-child {
    border-top-left-radius: 16px;
}

.foundation-cost-sheet-table thead th:last-child {
    border-top-right-radius: 16px;
}

.foundation-cost-sheet-table tbody th {
    color: #24395e;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.72);
}

.foundation-cost-sheet-table tbody td {
    text-align: right;
    background: rgba(255, 255, 255, 0.88);
}

.foundation-cost-sheet-table tbody td span {
    display: inline-block;
    color: #24395e;
    font-size: 0.9rem;
    font-weight: 700;
}

.foundation-cost-sheet-table tbody tr.is-total th,
.foundation-cost-sheet-table tbody tr.is-total td {
    background: linear-gradient(180deg, rgba(244, 231, 206, 0.98), rgba(238, 221, 190, 0.96));
}

.foundation-cost-sheet-table tbody tr.is-total th,
.foundation-cost-sheet-table tbody tr.is-total td span {
    color: #6e4317;
    font-weight: 800;
}

.foundation-cost-sheet-table tbody tr:last-child th,
.foundation-cost-sheet-table tbody tr:last-child td {
    border-bottom: 0;
}

.foundation-cost-sheet-note {
    margin: 0;
    padding: 0.75rem 0.9rem 0.85rem;
    color: #7f4f24;
    font-size: 0.78rem;
    line-height: 1.45;
}

.foundation-item-composition-note {
    margin: 0;
}

.foundation-item-composition-grid label {
    display: grid;
    gap: 0.4rem;
}

.foundation-composition-output-wide {
    grid-column: 1 / -1;
}

.foundation-auto-calc-meta {
    display: grid;
    gap: 0.12rem;
}

.foundation-auto-calc-meta .foundation-field-caption {
    margin-top: 0;
}

.foundation-labor-template-feedback {
    margin-top: 0.1rem;
}

.foundation-labor-template-feedback.is-smart {
    color: #1f5f44;
}

.foundation-labor-template-feedback.is-manual {
    color: #8c4e1d;
}

.foundation-item-composition-grid .foundation-inline-input[readonly] {
    background: rgba(53, 88, 162, 0.05);
    color: #24395e;
    font-weight: 700;
}

.foundation-composition-output span {
    color: #5c6f87;
}

.foundation-item-composition-totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.foundation-modal-attachments-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-modal-attachments-body {
    display: grid;
    gap: 0.85rem;
}

.foundation-modal-attachment-empty {
    display: grid;
    gap: 0.28rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(53, 88, 162, 0.05);
    border: 1px dashed rgba(53, 88, 162, 0.2);
}

.foundation-modal-attachment-empty strong {
    color: #24395e;
    font-size: 0.92rem;
}

.foundation-modal-attachment-empty span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.foundation-modal-attachment-list {
    display: grid;
    gap: 0.65rem;
}

.foundation-modal-attachment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.82rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-modal-attachment-meta {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.foundation-modal-attachment-meta strong {
    color: #24395e;
    font-size: 0.9rem;
}

.foundation-modal-attachment-meta span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
}

.foundation-modal-attachment-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.foundation-modal-attachment-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
}

.foundation-modal-attachment-upload .subtle-cell {
    margin: 0;
}

.foundation-metric.compact {
    padding: 0.95rem 1rem;
}

.foundation-metric {
    display: grid;
    gap: 0.28rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(53, 88, 162, 0.06);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.foundation-metric strong {
    color: #3558a2;
    font-size: 1.1rem;
}

.foundation-metric-material-total {
    gap: 0.55rem;
}

.foundation-metric-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
}

.foundation-metric-detail-pill {
    display: grid;
    gap: 0.16rem;
    padding: 0.5rem 0.62rem;
    border-radius: 14px;
    border: 1px solid rgba(53, 88, 162, 0.12);
    background: rgba(255, 255, 255, 0.72);
}

.foundation-metric-detail-pill small {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.foundation-metric-detail-pill em {
    color: #24395e;
    font-size: 0.92rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.15;
}

.foundation-metric-detail-qty {
    color: #5c6f87;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
}

.foundation-metric-detail-pill.is-concrete {
    background: linear-gradient(155deg, rgba(255, 245, 235, 0.94), rgba(250, 233, 210, 0.88));
    border-color: rgba(156, 90, 34, 0.16);
}

.foundation-metric-detail-pill.is-rebar {
    background: linear-gradient(155deg, rgba(239, 246, 255, 0.94), rgba(226, 237, 255, 0.88));
    border-color: rgba(53, 88, 162, 0.16);
}

@media (max-width: 640px) {
    .foundation-metric-detail-grid {
        grid-template-columns: 1fr;
    }
}

.foundation-field-caption {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.foundation-rebar-factor-feedback strong {
    font-weight: 800;
}

.foundation-rebar-factor-feedback.is-info {
    color: var(--muted);
}

.foundation-rebar-factor-feedback.is-ok {
    color: #1f5f44;
}

.foundation-rebar-factor-feedback.is-danger {
    color: #b42318;
    font-weight: 700;
}

.foundation-modal-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
    padding: 1rem 0 0.25rem;
    background: linear-gradient(180deg, rgba(244, 249, 253, 0), rgba(244, 249, 253, 0.95) 32%, rgba(244, 249, 253, 0.99));
    border-top: 1px solid rgba(95, 155, 255, 0.12);
}

.foundation-modal-save-hint {
    margin: 0;
    color: #5c6f87;
    font-size: 0.86rem;
    line-height: 1.45;
}

.foundation-summary-table {
    display: grid;
    gap: 0.55rem;
}

.foundation-summary-row {
    display: grid;
    grid-template-columns: 1.4fr minmax(0, 140px) minmax(0, 140px);
    gap: 0.7rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.foundation-summary-head {
    background: rgba(53, 88, 162, 0.08);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.foundation-summary-total {
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.98), rgba(192, 231, 213, 0.9));
    border-color: rgba(35, 95, 86, 0.2);
}

.foundation-scope-item.is-inactive .foundation-row-snapshot {
    background: rgba(64, 54, 41, 0.04);
}

.foundation-row-snapshot.is-rebar-ok,
.foundation-scope-item.is-inactive .foundation-row-snapshot.is-rebar-ok {
    background: rgba(31, 95, 68, 0.12);
    border-color: rgba(31, 95, 68, 0.28);
}

.foundation-row-snapshot.is-rebar-ok strong {
    color: #1f5f44;
}

.foundation-row-snapshot.is-rebar-ok .foundation-row-rebar-factor-input {
    color: #1f5f44;
    border-color: rgba(31, 95, 68, 0.24);
}

.foundation-row-snapshot.is-rebar-ok .foundation-row-rebar-thermometer-marker {
    background: #1f5f44;
}

.foundation-row-snapshot.is-rebar-warning,
.foundation-scope-item.is-inactive .foundation-row-snapshot.is-rebar-warning {
    background: rgba(202, 138, 4, 0.13);
    border-color: rgba(202, 138, 4, 0.34);
}

.foundation-row-snapshot.is-rebar-warning strong {
    color: #854d0e;
}

.foundation-row-snapshot.is-rebar-warning .foundation-row-rebar-factor-input {
    color: #854d0e;
    border-color: rgba(202, 138, 4, 0.28);
}

.foundation-row-snapshot.is-rebar-warning .foundation-row-rebar-thermometer-marker {
    background: #ca8a04;
}

.foundation-row-snapshot.is-rebar-danger,
.foundation-scope-item.is-inactive .foundation-row-snapshot.is-rebar-danger {
    background: rgba(180, 35, 24, 0.12);
    border-color: rgba(180, 35, 24, 0.34);
}

.foundation-row-snapshot.is-rebar-danger strong {
    color: #b42318;
}

.foundation-row-snapshot.is-rebar-danger .foundation-row-rebar-factor-input {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.28);
}

.foundation-row-snapshot.is-rebar-danger .foundation-row-rebar-thermometer-marker {
    background: #b42318;
}

.foundation-readonly-banner {
    margin-top: 1rem;
    border: 1px solid rgba(160, 196, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 1280px) {
    .foundation-brief-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-rv-analysis-grid {
        grid-template-columns: 1fr;
    }

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

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

    .foundation-controls-panel .foundation-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .foundation-item-composition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-item-composition-grid-fifth {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .foundation-main-grid {
        grid-template-columns: 1fr;
    }

    .foundation-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-notes-card {
        grid-column: 1 / -1;
    }

    .foundation-scope-table-head,
    .foundation-scope-total-row,
    .foundation-scope-item-main {
        grid-template-columns: minmax(220px, 1.25fr) minmax(112px, 0.65fr) minmax(168px, 0.92fr) minmax(96px, 0.55fr) minmax(112px, 0.65fr) minmax(112px, 0.65fr) minmax(112px, 0.65fr);
    }

    .foundation-modal-layout {
        grid-template-columns: 1fr;
    }

    .foundation-modal-commercial-card {
        position: static;
    }

    .foundation-modal-summary-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .foundation-side-stack {
        grid-template-columns: 1fr;
    }

    .foundation-scope-table-head {
        display: none;
    }

    .foundation-scope-total-row,
    .foundation-scope-item-main,
    .foundation-commercial-grid,
    .foundation-commercial-totals,
    .foundation-item-composition-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .foundation-modal-attachment-row,
    .foundation-modal-attachment-upload {
        display: grid;
    }

    .foundation-modal-attachment-actions {
        justify-content: start;
    }

    .foundation-item-composition-section-head {
        align-items: start;
        flex-direction: column;
    }

    .foundation-scope-item-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-scope-item-cell,
    .foundation-scope-item-overview {
        display: grid;
        gap: 0.28rem;
    }

    .foundation-zero-item-button {
        width: 100%;
        height: 2rem;
        border-radius: 10px;
    }

    .foundation-scope-item-codebar,
    .foundation-scope-item-copy,
    .foundation-scope-item-meta {
        min-width: 0;
    }

    .foundation-scope-item-copy {
        display: grid;
        gap: 0.14rem;
    }

    .foundation-scope-note {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .foundation-item-modal {
        padding: 0.8rem;
    }

    .foundation-item-modal-card {
        width: min(100%, calc(100vw - 24px));
        max-height: min(96vh, 1040px);
        padding: 1rem 1rem 0.95rem;
    }

    .foundation-item-modal-header {
        flex-direction: column;
    }

    .foundation-item-modal-header h2 {
        font-size: 1.55rem;
    }

    .foundation-modal-summary-bar,
    .foundation-scope-driver-fields,
    .foundation-scope-driver-fields-tight {
        grid-template-columns: 1fr;
    }

    .foundation-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

.pricing-stack,
.pricing-shell {
    display: grid;
    gap: 1rem;
}

.pricing-brief-card {
    background:
        linear-gradient(155deg, rgba(245, 251, 255, 0.98), rgba(230, 241, 247, 0.94)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.14), transparent 42%);
    border-color: rgba(95, 155, 255, 0.18);
}

.pricing-brief-head {
    align-items: flex-start;
}

.pricing-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.pricing-custom-builder {
    background:
        linear-gradient(155deg, rgba(255, 249, 239, 0.98), rgba(247, 240, 228, 0.94)),
        radial-gradient(circle at top right, rgba(156, 90, 34, 0.12), transparent 42%);
    border-color: rgba(156, 90, 34, 0.16);
}

.pricing-template-library {
    background:
        linear-gradient(155deg, rgba(247, 251, 255, 0.98), rgba(233, 241, 250, 0.94)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.1), transparent 44%);
    border-color: rgba(53, 88, 162, 0.16);
}

.pricing-section-head {
    align-items: flex-start;
}

.pricing-section-tools {
    display: grid;
    gap: 0.85rem;
    justify-items: end;
}

.pricing-template-context {
    display: grid;
    gap: 0.2rem;
    text-align: right;
}

.pricing-template-context span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.pricing-template-context strong {
    font-size: 1rem;
    color: #3558a2;
}

.pricing-top-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 1rem;
    margin-top: 1rem;
}

.pricing-controls-card {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(95, 155, 255, 0.12);
}

.pricing-panel-title {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.85rem;
    color: #3558a2;
}

.pricing-controls-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

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

.pricing-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.pricing-template-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.pricing-template-card-match {
    border-color: rgba(35, 95, 86, 0.2);
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.92), rgba(242, 250, 246, 0.9));
}

.pricing-template-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.pricing-template-head strong {
    display: block;
    margin-bottom: 0.2rem;
}

.pricing-template-head p,
.pricing-template-subtitle {
    margin: 0;
    color: var(--muted);
}

.pricing-template-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    background: rgba(35, 95, 86, 0.12);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
}

.pricing-template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.pricing-template-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    font-size: 0.8rem;
}

.pricing-template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pricing-custom-builder-grid {
    margin-top: 1rem;
}

.pricing-custom-meta-grid {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.pricing-section-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    min-width: min(520px, 100%);
}

.pricing-control-field {
    margin: 0;
}

.pricing-custom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.pricing-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.pricing-phase-card {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(35, 95, 86, 0.12);
}

.pricing-phase-card span,
.pricing-phase-card small {
    color: var(--muted);
}

.pricing-phase-card strong {
    font-size: 1.34rem;
    line-height: 1.05;
    color: #3558a2;
}

.pricing-phase-card-total {
    background: linear-gradient(155deg, rgba(228, 246, 238, 0.98), rgba(192, 231, 213, 0.9));
    border-color: rgba(35, 95, 86, 0.18);
}

.pricing-phase-card-total strong {
    color: var(--accent);
}

.pricing-board-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.pricing-table-card {
    position: relative;
    overflow: hidden;
}

.pricing-table-card-custom {
    border-color: rgba(156, 90, 34, 0.18);
    background:
        linear-gradient(155deg, rgba(255, 252, 247, 0.98), rgba(246, 239, 229, 0.92)),
        radial-gradient(circle at top right, rgba(156, 90, 34, 0.1), transparent 46%);
}

.pricing-table-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(53, 88, 162, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(53, 88, 162, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.pricing-table-card > * {
    position: relative;
    z-index: 1;
}

.pricing-table-wrap {
    border-radius: 22px;
}

.pricing-table {
    min-width: 1120px;
}

.pricing-inline-input {
    padding: 0.62rem 0.72rem;
    border-radius: 14px;
    font-size: 0.88rem;
}

.pricing-inline-number {
    text-align: right;
}

.pricing-inline-unit {
    min-width: 78px;
}

.pricing-inline-output {
    font-weight: 700;
    color: #3558a2;
    background: rgba(255, 255, 255, 0.92);
    border-style: dashed;
    cursor: default;
}

.pricing-inline-output:focus {
    outline: 2px solid rgba(53, 88, 162, 0.24);
    outline-offset: 0;
}

.pricing-unit-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.58rem;
    border-radius: 12px;
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    font-weight: 700;
    line-height: 1.1;
}

.pricing-section-total-row td {
    background: rgba(35, 95, 86, 0.06);
    font-weight: 700;
}

.pricing-readonly-banner {
    margin-top: 1rem;
}

body.pricing-modal-open {
    overflow: hidden;
}

.pricing-brief-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(245, 251, 255, 0.99), rgba(229, 241, 248, 0.96)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.16), transparent 44%);
    border-color: rgba(95, 155, 255, 0.22);
    box-shadow: 0 28px 84px rgba(24, 47, 78, 0.14);
}

.pricing-brief-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(95, 155, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 155, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent);
    pointer-events: none;
}

/* Responsive improvements */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .client-page-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .four-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .sidebar {
        display: none;
    }

    .client-form-tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .client-form-tab {
        justify-content: center;
    }

    .four-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-stack {
        flex-direction: column;
        gap: 0.5rem;
    }

    .button {
        width: 100%;
    }
}

.pricing-brief-card > * {
    position: relative;
    z-index: 1;
}

.pricing-segment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: -0.2rem;
    padding: 1rem 1.15rem;
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(246, 251, 255, 0.82), rgba(233, 243, 250, 0.76));
    border: 1px solid rgba(95, 155, 255, 0.12);
    box-shadow: 0 14px 38px rgba(24, 47, 78, 0.08);
}

.pricing-segment-toolbar-copy h2 {
    margin-bottom: 0;
}

.pricing-segment-toolbar-copy .eyebrow {
    margin-bottom: 0.35rem;
}

.pricing-add-segment-button {
    display: inline-flex;
    align-items: center;
    gap: 0.78rem;
    min-height: 62px;
    padding: 0.78rem 1.2rem 0.78rem 0.82rem;
    border: 1px solid rgba(35, 95, 86, 0.2);
    border-radius: 999px;
    background:
        linear-gradient(160deg, rgba(35, 95, 86, 0.96), rgba(20, 63, 57, 0.96)),
        radial-gradient(circle at top, rgba(113, 240, 196, 0.24), transparent 48%);
    color: #f7fffb;
    font-size: 0.96rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 42px rgba(20, 63, 57, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pricing-add-segment-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 1.55rem;
    font-weight: 300;
    transform: translateY(-1px);
}

.pricing-add-segment-label {
    white-space: nowrap;
}

.pricing-add-segment-button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 22px 52px rgba(20, 63, 57, 0.3);
    filter: saturate(1.06);
}

.pricing-segment-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.pricing-segment-modal[hidden] {
    display: none;
}

.pricing-segment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 21, 36, 0.5);
    backdrop-filter: blur(12px);
}

.pricing-segment-modal-card {
    position: relative;
    width: min(920px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    background:
        linear-gradient(150deg, rgba(250, 252, 255, 0.99), rgba(236, 243, 249, 0.97)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.16), transparent 40%);
    border-color: rgba(95, 155, 255, 0.2);
    box-shadow: 0 42px 120px rgba(8, 17, 31, 0.3);
}

.pricing-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pricing-controls-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(242, 248, 252, 0.74));
    border-color: rgba(95, 155, 255, 0.16);
}

.pricing-phase-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(241, 247, 251, 0.82));
    border-color: rgba(95, 155, 255, 0.14);
}

.pricing-phase-card::after {
    content: "";
    position: absolute;
    inset: auto 1rem 0.9rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(95, 155, 255, 0.15), rgba(35, 95, 86, 0.2));
}

.pricing-phase-card strong {
    font-size: 1.45rem;
}

.pricing-table-card {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 252, 0.93)),
        radial-gradient(circle at top right, rgba(95, 155, 255, 0.08), transparent 44%);
    border-color: rgba(95, 155, 255, 0.14);
    box-shadow: 0 20px 56px rgba(24, 47, 78, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pricing-table-card:hover {
    transform: translateY(-2px);
    border-color: rgba(53, 88, 162, 0.2);
    box-shadow: 0 28px 72px rgba(24, 47, 78, 0.14);
}

.pricing-table-card-custom {
    border-color: rgba(156, 90, 34, 0.2);
    background:
        linear-gradient(155deg, rgba(255, 252, 247, 0.99), rgba(247, 240, 229, 0.95)),
        radial-gradient(circle at top right, rgba(214, 149, 71, 0.12), transparent 48%);
}

.pricing-table-card-enter {
    animation: pricingCardEnter 1.1s ease;
}

.pricing-table-wrap {
    border: 1px solid rgba(95, 155, 255, 0.12);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pricing-table {
    min-width: 1120px;
    background: rgba(255, 255, 255, 0.96);
}

.pricing-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #30435e;
    border-bottom: 1px solid rgba(95, 155, 255, 0.16);
    backdrop-filter: blur(10px);
}

.pricing-table tbody td {
    transition: background 0.18s ease;
}

.pricing-table tbody tr:hover td {
    background: rgba(95, 155, 255, 0.04);
}

.pricing-inline-input {
    padding: 0.66rem 0.76rem;
    border-radius: 13px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 0 0 1px rgba(64, 54, 41, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pricing-inline-input:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(95, 155, 255, 0.14), inset 0 0 0 1px rgba(53, 88, 162, 0.28);
}

.pricing-inline-output {
    font-weight: 800;
    border-style: solid;
    cursor: default;
    box-shadow: inset 0 0 0 1px rgba(53, 88, 162, 0.12);
}

.product-catalog-editor-card {
    overflow: hidden;
    background:
        linear-gradient(155deg, rgba(255, 249, 239, 0.98), rgba(247, 240, 228, 0.94)),
        radial-gradient(circle at top right, rgba(156, 90, 34, 0.12), transparent 42%);
    border-color: rgba(156, 90, 34, 0.16);
}

.product-catalog-form {
    display: grid;
    gap: 0.72rem;
}

.product-catalog-form-shell {
    display: grid;
    gap: 0.68rem;
}

.product-catalog-form-section {
    display: grid;
    gap: 0.55rem;
    padding: 0.72rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(156, 90, 34, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.product-catalog-form-section-output {
    background: linear-gradient(160deg, rgba(231, 246, 240, 0.88), rgba(243, 251, 248, 0.92));
    border-color: rgba(35, 95, 86, 0.14);
}

.product-catalog-form-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.55rem;
}

.product-catalog-form-section-head .eyebrow {
    margin-bottom: 0.12rem;
    font-size: 0.64rem;
}

.product-catalog-form-section-head h3 {
    margin: 0;
    font-size: 0.92rem;
}

.product-catalog-form-grid {
    margin-bottom: 0;
    gap: 0.55rem;
}

.product-catalog-form-grid-identity {
    grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 0.9fr) minmax(11rem, 0.85fr);
}

.product-catalog-form-grid-pricing {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-catalog-form-grid-output {
    grid-template-columns: repeat(2, minmax(0, 0.5fr));
}

.product-catalog-form-name {
    grid-column: 1 / -1;
}

.product-catalog-editor-card > .pricing-section-head {
    align-items: center;
    margin-bottom: 0.75rem;
}

.product-catalog-editor-card > .pricing-section-head h2 {
    margin: 0.18rem 0 0.22rem;
    font-size: 1.35rem;
}

.product-catalog-editor-card > .pricing-section-head .muted-line {
    margin: 0;
}

.product-form-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.product-form-title-row .eyebrow {
    margin: 0;
}

.product-form-mode-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    border: 1px solid rgba(156, 90, 34, 0.16);
    border-radius: 999px;
    background: rgba(255, 244, 226, 0.86);
    color: #7c4315;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.28rem 0.55rem;
}

.product-catalog-form label {
    gap: 0.32rem;
}

.product-catalog-form label > span {
    font-size: 0.78rem;
}

.product-catalog-form input,
.product-catalog-form select,
.product-catalog-form textarea {
    min-height: 2.55rem;
    padding: 0.66rem 0.8rem;
}

.product-catalog-form textarea {
    min-height: 5.7rem;
}

.product-sector-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.product-sector-add-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid rgba(35, 95, 86, 0.2);
    border-radius: 999px;
    background: rgba(231, 246, 240, 0.86);
    color: #235f56;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.34rem 0.5rem;
    white-space: nowrap;
}

.product-sector-add-button:hover,
.product-sector-add-button:focus-visible {
    border-color: rgba(35, 95, 86, 0.38);
    background: #e1f4ed;
    outline: none;
}

.product-sector-add-button > span {
    display: grid;
    place-items: center;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    background: #235f56;
    color: #ffffff;
    font-size: 0.76rem;
    line-height: 1;
}

.product-form-context {
    display: grid;
    gap: 0.22rem;
    text-align: right;
}

.product-form-context span {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.product-form-context strong {
    font-size: 1rem;
    color: #3558a2;
}

.product-catalog-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.product-sector-manager-card {
    display: grid;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.96));
    border-color: rgba(53, 88, 162, 0.12);
}

.product-sector-manager-card.is-attention {
    animation: product-sector-attention 1.35s ease;
}

@keyframes product-sector-attention {
    0%,
    100% {
        box-shadow: var(--shadow);
        border-color: rgba(53, 88, 162, 0.12);
    }

    35% {
        box-shadow: 0 0 0 4px rgba(35, 95, 86, 0.18), var(--shadow);
        border-color: rgba(35, 95, 86, 0.42);
    }
}

.product-sector-manager-grid {
    display: grid;
    grid-template-columns: minmax(20rem, 0.9fr) minmax(22rem, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.product-sector-create-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(53, 88, 162, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.product-sector-create-subtitle {
    grid-column: 1 / -1;
}

.product-sector-create-form button {
    justify-self: start;
}

.product-sector-manager-list {
    display: grid;
    gap: 0.55rem;
}

.product-sector-manager-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(53, 88, 162, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.product-sector-manager-row > div {
    display: grid;
    gap: 0.12rem;
}

.product-sector-manager-row strong {
    color: #24395e;
    font-size: 0.86rem;
}

.product-sector-manager-row span {
    color: var(--muted);
    font-size: 0.74rem;
}

.product-catalog-summary-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.15rem 0.65rem;
    align-items: center;
    padding: 0.82rem 0.9rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(53, 88, 162, 0.12);
    color: inherit;
    text-decoration: none;
}

.product-catalog-summary-card.active {
    border-color: rgba(35, 95, 86, 0.24);
    background: rgba(35, 95, 86, 0.1);
    box-shadow: 0 14px 28px rgba(35, 95, 86, 0.08);
}

.product-catalog-summary-card .product-sector-icon {
    grid-row: span 3;
}

.product-catalog-summary-card span {
    color: #24395e;
    font-size: 0.82rem;
    font-weight: 800;
}

.product-catalog-summary-card strong {
    color: #3558a2;
    font-size: 1.18rem;
    line-height: 1;
}

.product-catalog-summary-card small {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.product-sector-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border: 1px solid rgba(53, 88, 162, 0.14);
    flex: 0 0 auto;
}

.product-sector-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.product-sector-icon.is-concrete_pricing,
.product-sector-icon.is-concrete_lightweight_pricing {
    color: #3558a2;
    background: rgba(53, 88, 162, 0.1);
    border-color: rgba(53, 88, 162, 0.14);
}

.product-sector-icon.is-boom,
.product-sector-icon.is-knuckle_boom,
.product-sector-icon.is-knuckle_boom_and_cranes,
.product-sector-icon.is-concrete_pumping_corp {
    color: #1f6a54;
    background: rgba(35, 95, 86, 0.1);
    border-color: rgba(35, 95, 86, 0.14);
}

.product-sector-icon.is-cranes {
    color: #7c3d12;
    background: rgba(180, 83, 9, 0.1);
    border-color: rgba(180, 83, 9, 0.16);
}

.product-sector-icon.is-labor_pricing,
.product-sector-icon.is-rebar_pricing,
.product-sector-icon.is-wire_mesh {
    color: #8b4d17;
    background: rgba(156, 90, 34, 0.1);
    border-color: rgba(156, 90, 34, 0.16);
}

.product-sector-icon.is-formwork,
.product-sector-icon.is-earthwork,
.product-sector-icon.is-waterproofing,
.product-sector-icon.is-miscellaneous,
.product-sector-icon.is-others {
    color: #5c6f87;
    background: rgba(92, 111, 135, 0.1);
    border-color: rgba(92, 111, 135, 0.14);
}

.product-catalog-list-toolbar {
    display: grid;
    gap: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 253, 0.95));
}

.product-catalog-toolbar-meta {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-catalog-toolbar-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.45fr) minmax(150px, 0.32fr);
    align-items: end;
}

.product-catalog-bulk-form {
    display: grid;
    grid-template-columns: minmax(96px, 0.24fr) minmax(180px, 0.45fr) minmax(220px, 0.55fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(53, 88, 162, 0.05);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.product-catalog-bulk-meta {
    display: grid;
    gap: 0.22rem;
    padding: 0.72rem 0.78rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(53, 88, 162, 0.1);
}

.product-catalog-bulk-meta span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-catalog-bulk-meta strong {
    color: #3558a2;
    font-size: 1.05rem;
}

.product-catalog-toolbar-summary {
    display: grid;
    gap: 0.25rem;
    padding: 0.82rem 0.9rem;
    border-radius: 18px;
    background: rgba(53, 88, 162, 0.06);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.product-catalog-toolbar-summary-label {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.product-catalog-toolbar-summary strong {
    font-size: 1.2rem;
    color: #3558a2;
}

.product-sector-grid {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    align-items: start;
}

.product-sector-card {
    min-height: 100%;
}

.product-sector-tools {
    display: grid;
    gap: 0.85rem;
    justify-items: end;
}

.product-sector-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.product-sector-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    background: rgba(53, 88, 162, 0.08);
    color: #3558a2;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-sector-empty {
    padding: 1.5rem 0.35rem 0.65rem;
}

.product-catalog-table {
    min-width: 1240px;
}

.product-catalog-sector-card {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.product-sector-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
}

.product-sector-title .product-sector-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 14px;
}

.product-sector-title .product-sector-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.product-head-select,
.product-cell-select {
    width: 42px;
    text-align: center;
}

.product-head-select input,
.product-cell-select input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #3558a2;
}

.product-catalog-sector-card.is-active-sector,
.product-catalog-sector-card.is-filter-hit {
    border-color: rgba(53, 88, 162, 0.16);
    box-shadow: 0 18px 36px rgba(36, 57, 94, 0.07);
}

.product-catalog-sector-card[hidden] {
    display: none;
}

.product-catalog-table thead th {
    white-space: nowrap;
}

.product-catalog-number-head,
.product-catalog-number-cell {
    text-align: right;
}

.product-catalog-description-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.product-catalog-row-flags {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.product-status-pill {
    font-weight: 800;
}

.product-status-pill.is-active {
    background: rgba(35, 95, 86, 0.12);
    color: #1f6a54;
    border-color: rgba(35, 95, 86, 0.16);
}

.product-status-pill.is-inactive {
    background: rgba(184, 71, 42, 0.08);
    color: #9a3c22;
    border-color: rgba(184, 71, 42, 0.14);
}

.product-note-pill {
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
    border-color: rgba(53, 88, 162, 0.14);
}

.product-fnd-pill {
    background: rgba(35, 95, 86, 0.1);
    color: #1f6a54;
    border-color: rgba(35, 95, 86, 0.14);
}

.product-search-mark {
    padding: 0.02rem 0.12rem;
    border-radius: 5px;
    background: rgba(255, 211, 90, 0.58);
    color: inherit;
}

.product-catalog-note {
    max-width: 52ch;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-height: 1.45;
}

.product-head-status {
    background: linear-gradient(180deg, rgba(239, 241, 246, 0.98), rgba(248, 250, 252, 0.96));
    color: #4d5d73;
}

.product-head-actions {
    background: linear-gradient(180deg, rgba(255, 244, 226, 0.98), rgba(252, 248, 242, 0.96));
    color: #8b4d17;
}

.product-status-chip {
    font-weight: 800;
}

.product-status-chip.is-active {
    background: rgba(35, 95, 86, 0.12);
    border-color: rgba(35, 95, 86, 0.16);
    color: #1f6a54;
}

.product-status-chip.is-inactive {
    background: rgba(184, 71, 42, 0.08);
    border-color: rgba(184, 71, 42, 0.14);
    color: #9a3c22;
}

@media (max-width: 900px) {
    .product-catalog-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-catalog-form-grid-identity,
    .product-catalog-form-grid-pricing,
    .product-catalog-form-grid-output,
    .product-catalog-toolbar-grid,
    .product-catalog-bulk-form,
    .product-sector-manager-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-sector-grid {
        grid-template-columns: 1fr;
    }

    .product-form-context,
    .product-sector-tools {
        justify-items: start;
        text-align: left;
    }

    .product-sector-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .product-catalog-summary-grid {
        grid-template-columns: 1fr;
    }

    .product-catalog-form-grid-identity,
    .product-catalog-form-grid-pricing,
    .product-catalog-form-grid-output,
    .product-catalog-toolbar-grid,
    .product-catalog-bulk-form,
    .product-sector-manager-grid,
    .product-sector-create-form {
        grid-template-columns: 1fr;
    }

    .product-sector-manager-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .product-catalog-description-main {
        flex-direction: column;
    }

    .product-catalog-row-flags {
        justify-content: flex-start;
    }
}

.pricing-head-code,
.pricing-head-description,
.pricing-head-unit {
    background: linear-gradient(180deg, rgba(242, 246, 252, 0.98), rgba(233, 239, 247, 0.96));
}

.pricing-head-base {
    background: linear-gradient(180deg, rgba(255, 238, 209, 0.98), rgba(255, 247, 231, 0.96));
    color: #8b4d17;
}

.pricing-head-coef {
    background: linear-gradient(180deg, rgba(221, 235, 255, 0.98), rgba(239, 246, 255, 0.96));
    color: #315ba2;
}

.pricing-head-adjustment {
    background: linear-gradient(180deg, rgba(255, 226, 220, 0.98), rgba(255, 243, 240, 0.96));
    color: #b14b35;
}

.pricing-head-sell {
    background: linear-gradient(180deg, rgba(216, 244, 233, 0.98), rgba(237, 251, 245, 0.96));
    color: #1f6a54;
}

.pricing-head-foundation-qty,
.pricing-head-foundation-total {
    background: linear-gradient(180deg, rgba(221, 239, 255, 0.98), rgba(240, 248, 255, 0.96));
    color: #2c5da9;
}

.pricing-head-super-qty,
.pricing-head-super-total {
    background: linear-gradient(180deg, rgba(255, 231, 214, 0.98), rgba(255, 245, 236, 0.96));
    color: #b85b1f;
}

.pricing-cell-code {
    background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(238, 243, 249, 0.96));
    color: #4a5b74;
    font-weight: 700;
}

.pricing-cell-description {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.96));
}

.pricing-cell-base {
    background: linear-gradient(180deg, rgba(255, 248, 236, 0.99), rgba(255, 239, 213, 0.96));
    box-shadow: inset 0 0 0 1px rgba(214, 149, 71, 0.22);
    color: #8b4d17;
}

.pricing-cell-coefficient {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.99), rgba(225, 236, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(53, 88, 162, 0.2);
    color: #315ba2;
}

.pricing-cell-adjustment {
    background: linear-gradient(180deg, rgba(255, 245, 242, 0.99), rgba(255, 229, 222, 0.96));
    box-shadow: inset 0 0 0 1px rgba(196, 92, 62, 0.18);
    color: #b14b35;
}

.pricing-cell-sell {
    background: linear-gradient(180deg, rgba(237, 251, 245, 0.99), rgba(214, 244, 231, 0.96));
    box-shadow: inset 0 0 0 1px rgba(35, 95, 86, 0.18);
    color: #1f6a54;
}

.pricing-cell-foundation-qty {
    background: linear-gradient(180deg, rgba(241, 248, 255, 0.99), rgba(224, 238, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(70, 114, 191, 0.18);
    color: #2c5da9;
}

.pricing-cell-unit {
    background: linear-gradient(180deg, rgba(244, 247, 252, 0.99), rgba(235, 241, 248, 0.96));
    color: #48617f;
}

.pricing-cell-foundation-total {
    background: linear-gradient(180deg, rgba(229, 246, 255, 0.99), rgba(208, 236, 251, 0.96));
    box-shadow: inset 0 0 0 1px rgba(53, 127, 177, 0.18);
    color: #1f6e9b;
}

.pricing-cell-super-qty {
    background: linear-gradient(180deg, rgba(255, 247, 240, 0.99), rgba(255, 232, 216, 0.96));
    box-shadow: inset 0 0 0 1px rgba(217, 131, 76, 0.18);
    color: #b85b1f;
}

.pricing-cell-super-total {
    background: linear-gradient(180deg, rgba(255, 238, 231, 0.99), rgba(255, 221, 210, 0.96));
    box-shadow: inset 0 0 0 1px rgba(205, 101, 70, 0.2);
    color: #b2482f;
}

.pricing-unit-pill {
    background: linear-gradient(180deg, rgba(238, 244, 251, 0.98), rgba(228, 238, 248, 0.96));
    color: #4b6585;
    border: 1px solid rgba(95, 155, 255, 0.12);
}

.pricing-section-total-row td {
    background: linear-gradient(180deg, rgba(242, 247, 252, 0.94), rgba(235, 242, 249, 0.88));
    font-weight: 700;
}

.pricing-total-chip {
    font-weight: 800;
    border-radius: 14px;
    padding: 0.38rem 0.68rem;
    border: 1px solid transparent;
}

.pricing-total-chip-foundation-qty {
    background: rgba(70, 114, 191, 0.12);
    border-color: rgba(70, 114, 191, 0.18);
    color: #2c5da9;
}

.pricing-total-chip-foundation {
    background: rgba(53, 127, 177, 0.12);
    border-color: rgba(53, 127, 177, 0.18);
    color: #1f6e9b;
}

.pricing-total-chip-super-qty {
    background: rgba(217, 131, 76, 0.12);
    border-color: rgba(217, 131, 76, 0.18);
    color: #b85b1f;
}

.pricing-total-chip-super {
    background: rgba(205, 101, 70, 0.14);
    border-color: rgba(205, 101, 70, 0.18);
    color: #b2482f;
}

@keyframes pricingCardEnter {
    0% {
        transform: translateY(18px) scale(0.985);
        opacity: 0;
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }

    60% {
        transform: translateY(-3px) scale(1.004);
        opacity: 1;
        box-shadow: 0 26px 70px rgba(35, 95, 86, 0.14);
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.workflow-dashboard-hero {
    background:
        linear-gradient(150deg, rgba(255, 252, 246, 0.98), rgba(236, 244, 241, 0.94)),
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.14), transparent 42%);
    border-color: rgba(35, 95, 86, 0.16);
}

.workflow-dashboard-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.workflow-dashboard-stats .stat-card {
    min-height: 148px;
}

.workflow-dashboard-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.workflow-project-card {
    display: grid;
    gap: 0.95rem;
    padding: 1.15rem;
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(246, 240, 229, 0.92)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.08), transparent 38%);
    border: 1px solid rgba(64, 54, 41, 0.12);
    box-shadow: 0 16px 40px rgba(52, 41, 24, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.workflow-project-card:hover {
    transform: translateY(-2px);
    border-color: rgba(35, 95, 86, 0.22);
    box-shadow: 0 24px 58px rgba(52, 41, 24, 0.12);
}

.workflow-project-card-head,
.workflow-entry-head,
.workflow-document-row {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

.workflow-project-card-head p {
    margin-bottom: 0;
    color: var(--muted);
}

.workflow-project-financials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.workflow-project-financials .value-stack,
.workflow-project-meta span {
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.workflow-project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.workflow-board-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.workflow-repeater-stack {
    display: grid;
    gap: 0.85rem;
}

.workflow-entry-card,
.workflow-document-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(64, 54, 41, 0.12);
}

.workflow-entry-head {
    align-items: center;
}

.workflow-operational-card {
    --ops-accent: #2764d8;
    --ops-soft: #eef4ff;
    --ops-strong: #183d82;
    padding: 0.9rem;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ops-soft) 70%, #ffffff), rgba(255, 255, 255, 0.9));
    border-color: color-mix(in srgb, var(--ops-accent) 20%, rgba(64, 54, 41, 0.12));
}

.workflow-operational-card-contract {
    --ops-accent: #a8641f;
    --ops-soft: #fff3e4;
    --ops-strong: #6b3b0d;
}

.workflow-operational-card-schedule {
    --ops-accent: #2c7be5;
    --ops-soft: #eaf4ff;
    --ops-strong: #17477f;
}

.workflow-operational-card-execution {
    --ops-accent: #138a57;
    --ops-soft: #e8f8ef;
    --ops-strong: #0b5636;
}

.workflow-operational-card-receivables {
    --ops-accent: #7a54c7;
    --ops-soft: #f1ecff;
    --ops-strong: #4b3380;
}

.workflow-operational-head {
    margin-bottom: 0.48rem;
    padding-bottom: 0.52rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ops-accent) 18%, rgba(64, 54, 41, 0.1));
}

.workflow-operational-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.workflow-operational-title h2 {
    color: var(--ops-strong);
    font-size: 1.1rem;
    line-height: 1.12;
}

.workflow-operational-title .eyebrow {
    color: color-mix(in srgb, var(--ops-strong) 72%, var(--muted));
}

.workflow-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
    border-radius: 10px;
    background: var(--ops-accent);
    color: #ffffff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--ops-accent) 28%, transparent);
}

.workflow-panel-icon svg {
    width: 1.16rem;
    height: 1.16rem;
}

.workflow-profile-card {
    --ops-accent: #235f56;
    --ops-soft: #eef8f4;
    --ops-strong: #174d45;
    padding: 0.9rem;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ops-soft) 72%, #ffffff), rgba(255, 255, 255, 0.92));
    border-color: color-mix(in srgb, var(--ops-accent) 20%, rgba(64, 54, 41, 0.12));
}

.workflow-profile-head {
    margin-bottom: 0.52rem;
    padding-bottom: 0.52rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ops-accent) 18%, rgba(64, 54, 41, 0.1));
}

.workflow-profile-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.workflow-profile-title h2 {
    color: var(--ops-strong);
    font-size: 1.12rem;
    line-height: 1.12;
}

.workflow-profile-title .eyebrow {
    color: color-mix(in srgb, var(--ops-strong) 72%, var(--muted));
}

.workflow-profile-card .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.5rem;
}

.workflow-profile-card label span {
    margin-bottom: 0.18rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-profile-card input,
.workflow-profile-card select,
.workflow-profile-card textarea {
    min-height: 2.18rem;
    padding: 0.42rem 0.55rem;
    border-color: color-mix(in srgb, var(--ops-accent) 16%, var(--line));
    border-radius: 9px;
    font-size: 0.82rem;
}

.workflow-profile-card textarea {
    min-height: 3.2rem;
}

.workflow-save-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.workflow-save-button {
    width: auto;
    min-height: 2rem;
    padding: 0.42rem 0.88rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1;
}

.project-management-save-bar {
    position: sticky;
    bottom: 0.6rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding: 0.5rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 36px rgba(52, 41, 24, 0.12);
    backdrop-filter: blur(12px);
}

.project-management-save-bar span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
}

.project-management-save-bar .workflow-save-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.project-management-save-bar.is-dirty {
    border-color: rgba(166, 100, 31, 0.24);
    background: #fff7ed;
}

.project-management-save-bar.is-dirty span {
    color: #92400e;
}

.project-management-save-bar.is-dirty .workflow-save-button:not(:disabled) {
    box-shadow: 0 16px 34px rgba(166, 100, 31, 0.26);
}

.project-management-save-bar.is-saving {
    border-color: rgba(35, 95, 86, 0.24);
    background: #ecfdf5;
}

.workflow-operational-card .button-ghost {
    border-color: color-mix(in srgb, var(--ops-accent) 28%, var(--line));
    color: var(--ops-strong);
}

.workflow-operational-card > .workflow-repeater-stack {
    gap: 0.55rem;
}

.workflow-operational-entry {
    gap: 0.52rem;
    padding: 0.68rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
    border-color: color-mix(in srgb, var(--ops-accent) 15%, rgba(64, 54, 41, 0.1));
}

.workflow-operational-entry .workflow-entry-head {
    min-height: 1.8rem;
}

.workflow-operational-entry .workflow-entry-head strong {
    color: var(--ops-strong);
    font-size: 0.86rem;
}

.workflow-operational-entry .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.46rem;
}

.workflow-operational-entry label span {
    margin-bottom: 0.18rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-operational-entry input,
.workflow-operational-entry select,
.workflow-operational-entry textarea {
    min-height: 2.05rem;
    padding: 0.38rem 0.5rem;
    border-color: color-mix(in srgb, var(--ops-accent) 16%, var(--line));
    border-radius: 8px;
    font-size: 0.8rem;
}

.workflow-operational-entry textarea {
    min-height: 2.55rem;
}

.workflow-submittal-card {
    --ops-accent: #0d95b8;
    --ops-soft: #e7f8fb;
    --ops-strong: #07576d;
    padding: 0.9rem;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ops-soft) 72%, #ffffff), rgba(255, 255, 255, 0.92));
    border-color: color-mix(in srgb, var(--ops-accent) 20%, rgba(64, 54, 41, 0.12));
}

.workflow-submittal-head {
    margin-bottom: 0.52rem;
    padding-bottom: 0.52rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ops-accent) 18%, rgba(64, 54, 41, 0.1));
}

.workflow-submittal-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.workflow-submittal-head h2 {
    color: var(--ops-strong);
    font-size: 1.12rem;
    line-height: 1.12;
}

.workflow-submittal-title .eyebrow {
    color: color-mix(in srgb, var(--ops-strong) 72%, var(--muted));
}

.workflow-submittal-card .button-ghost {
    border-color: color-mix(in srgb, var(--ops-accent) 28%, var(--line));
    color: var(--ops-strong);
}

.workflow-submittal-form {
    gap: 0.55rem;
}

.workflow-submittal-card .workflow-repeater-stack {
    gap: 0.55rem;
}

.workflow-submittal-entry {
    gap: 0.52rem;
    padding: 0.68rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
    border-color: color-mix(in srgb, var(--ops-accent) 15%, rgba(64, 54, 41, 0.1));
}

.workflow-submittal-entry .workflow-entry-head {
    min-height: 1.8rem;
}

.workflow-submittal-entry .workflow-entry-head strong {
    color: var(--ops-strong);
    font-size: 0.86rem;
}

.workflow-submittal-entry .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 0.42rem;
}

.workflow-submittal-entry label span {
    margin-bottom: 0.18rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-submittal-entry input,
.workflow-submittal-entry select,
.workflow-submittal-entry textarea {
    min-height: 2rem;
    padding: 0.38rem 0.5rem;
    border-color: color-mix(in srgb, var(--ops-accent) 14%, var(--line));
    border-radius: 8px;
    font-size: 0.8rem;
}

.workflow-submittal-entry textarea {
    min-height: 2.5rem;
}

.workflow-submittal-file-stack {
    gap: 0.48rem;
}

.workflow-submittal-file-card {
    --ops-accent: #61707d;
    --ops-soft: #eef3f5;
    --ops-strong: #34414a;
    gap: 0.48rem;
    padding: 0.68rem;
    border-radius: 10px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ops-soft) 76%, #ffffff), rgba(255, 255, 255, 0.88));
    border-color: color-mix(in srgb, var(--ops-accent) 18%, rgba(64, 54, 41, 0.12));
}

.workflow-submittal-file-head {
    min-height: 1.9rem;
}

.workflow-submittal-file-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.workflow-submittal-file-title .workflow-panel-icon {
    width: 1.95rem;
    height: 1.95rem;
    flex-basis: 1.95rem;
    border-radius: 8px;
}

.workflow-submittal-file-title strong {
    overflow: hidden;
    color: var(--ops-strong);
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-submittal-file-card .muted-line {
    margin: 0;
    font-size: 0.78rem;
}

.workflow-submittal-file-card .action-stack {
    gap: 0.36rem;
}

.workflow-submittal-file-card .workflow-document-row {
    padding: 0.4rem 0.48rem;
    border-radius: 8px;
}

.workflow-submittal-file-upload {
    gap: 0.34rem;
    margin-top: 0.2rem;
}

.workflow-submittal-file-upload label span {
    margin-bottom: 0.14rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-submittal-file-upload input {
    min-height: 1.95rem;
    padding: 0.34rem 0.48rem;
    border-color: color-mix(in srgb, var(--ops-accent) 16%, var(--line));
    border-radius: 8px;
    font-size: 0.78rem;
}

.workflow-submittal-file-upload input[type="file"] {
    padding: 0.25rem 0.42rem;
}

.workflow-submittal-file-upload .button {
    width: fit-content;
    min-height: 1.8rem;
    padding: 0.28rem 0.58rem;
    font-size: 0.76rem;
}

.workflow-document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: start;
    gap: 1rem;
}

.workflow-document-center {
    padding: 0.9rem;
}

.workflow-document-center-head {
    margin-bottom: 0.4rem;
}

.workflow-document-center-head h2 {
    font-size: 1.18rem;
}

.workflow-document-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
    align-items: start;
    gap: 0.62rem;
}

.workflow-document-card-compact {
    --document-accent: #2764d8;
    --document-soft: #eef4ff;
    --document-strong: #183d82;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.58rem;
    border-radius: 10px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--document-soft) 82%, #ffffff), rgba(255, 255, 255, 0.86));
    border-color: color-mix(in srgb, var(--document-accent) 22%, rgba(64, 54, 41, 0.12));
    box-shadow: 0 10px 26px rgba(52, 41, 24, 0.07);
}

.workflow-document-card-compact h3 {
    margin: 0;
    color: var(--document-strong);
    font-size: 0.86rem;
    line-height: 1.15;
}

.workflow-document-card-head {
    display: flex;
    align-items: center;
    gap: 0.52rem;
}

.workflow-document-card-head span:not(.workflow-document-icon) {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
}

.workflow-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.05rem;
    height: 2.05rem;
    flex: 0 0 2.05rem;
    border-radius: 8px;
    background: var(--document-accent);
    color: #ffffff;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--document-accent) 28%, transparent);
}

.workflow-document-icon svg {
    width: 1.08rem;
    height: 1.08rem;
}

.workflow-document-card-compact .muted-line {
    margin: 0;
    font-size: 0.76rem;
}

.workflow-document-card-compact .action-stack {
    display: grid;
    gap: 0.28rem;
    max-height: 8.6rem;
    overflow-y: auto;
    padding-right: 0.12rem;
    scrollbar-width: thin;
}

.workflow-document-card-compact .workflow-document-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.22rem 0.36rem;
    padding: 0.3rem 0.36rem;
    border-radius: 8px;
}

.workflow-document-card-compact .workflow-document-row .button {
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0.24rem 0.42rem;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-document-card-compact .workflow-document-row form {
    justify-self: end;
}

.workflow-document-card-compact .workflow-document-row .subtle-cell {
    grid-column: 1 / -1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-document-upload-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem;
    margin-top: 0.25rem;
}

.workflow-document-upload-compact label:nth-of-type(3),
.workflow-document-upload-compact .workflow-document-upload-button {
    grid-column: 1 / -1;
}

.workflow-document-upload-compact label span {
    margin-bottom: 0.14rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workflow-document-upload-compact input {
    min-height: 1.8rem;
    padding: 0.28rem 0.42rem;
    border-color: color-mix(in srgb, var(--document-accent) 18%, var(--line));
    border-radius: 8px;
    font-size: 0.78rem;
}

.workflow-document-upload-compact input[type="file"] {
    padding: 0.22rem 0.38rem;
}

.workflow-document-upload-compact .button {
    min-height: 1.75rem;
    padding: 0.26rem 0.52rem;
    font-size: 0.76rem;
}

.workflow-document-upload-button {
    justify-content: center;
    border-color: color-mix(in srgb, var(--document-accent) 34%, var(--line));
    background: var(--document-accent);
    color: #ffffff;
}

.workflow-document-upload-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-right: 0.24rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 900;
    line-height: 1;
}

.workflow-document-card-compact[data-document-stage="estimate"] {
    --document-accent: #2c7be5;
    --document-soft: #eaf4ff;
    --document-strong: #17477f;
}

.workflow-document-card-compact[data-document-stage="proposal"] {
    --document-accent: #8b5cf6;
    --document-soft: #f2ecff;
    --document-strong: #5635a5;
}

.workflow-document-card-compact[data-document-stage="contract"] {
    --document-accent: #a8641f;
    --document-soft: #fff3e4;
    --document-strong: #6b3b0d;
}

.workflow-document-card-compact[data-document-stage="submittal"] {
    --document-accent: #0d95b8;
    --document-soft: #e7f8fb;
    --document-strong: #07576d;
}

.workflow-document-card-compact[data-document-stage="execution"] {
    --document-accent: #138a57;
    --document-soft: #e8f8ef;
    --document-strong: #0b5636;
}

.workflow-document-card-compact[data-document-stage="invoice"] {
    --document-accent: #c84931;
    --document-soft: #fff0eb;
    --document-strong: #82301e;
}

.workflow-document-card-compact[data-document-stage="payment"] {
    --document-accent: #5f6f7b;
    --document-soft: #eef3f5;
    --document-strong: #34414a;
}

.workflow-document-row {
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(64, 54, 41, 0.08);
    align-items: center;
}

.workflow-document-row form {
    margin: 0;
}

.workflow-estimate-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}

.workflow-estimate-table th,
.workflow-estimate-table td {
    padding: 0.55rem;
    border-bottom: 1px solid rgba(64, 54, 41, 0.08);
    text-align: left;
    vertical-align: top;
}

.workflow-estimate-table th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.workflow-estimate-table td input,
.workflow-estimate-table td select,
.workflow-estimate-table td textarea {
    min-width: 92px;
    padding: 0.65rem 0.72rem;
    border-radius: 12px;
}

.project-management-board {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

.project-management-top-menu {
    position: sticky;
    top: 0.65rem;
    z-index: 12;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin: -0.2rem 0 0.9rem;
    padding: 0.5rem;
    border: 1px solid rgba(43, 36, 29, 0.14);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(28, 35, 43, 0.97), rgba(67, 48, 31, 0.94));
    box-shadow: 0 16px 34px rgba(36, 30, 22, 0.18);
    overflow-x: auto;
    scrollbar-width: thin;
}

.project-management-top-menu-group {
    display: grid;
    gap: 0.22rem;
    align-self: stretch;
    min-width: max-content;
}

.project-management-top-menu-group > span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-top-menu-group > div {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.project-management-top-menu a {
    --management-accent: #235f56;
    --management-soft: #eef8f4;
    --management-strong: #174d45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.42rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 3px solid var(--management-accent);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.76rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.project-management-top-menu a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.project-management-top-menu a.active {
    border-color: var(--management-accent);
    background: var(--management-accent);
    color: #ffffff;
}

.project-management-top-menu .project-management-top-back {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-width: 1px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.project-management-top-menu .project-management-top-back:hover {
    background: rgba(255, 255, 255, 0.18);
}

.project-management-actions,
.project-management-tabs,
.project-management-group-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.project-management-actions {
    justify-content: flex-end;
}

.project-management-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-management-breadcrumb a {
    color: var(--management-strong, #235f56);
    text-decoration: none;
}

.project-management-breadcrumb span:last-child {
    color: #2f281f;
}

.project-management-overview-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin: 0.15rem 0 0.85rem;
    padding: 0.72rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 10px;
    background:
        linear-gradient(90deg, rgba(35, 95, 86, 0.08), rgba(166, 100, 31, 0.08)),
        #fffdf8;
}

.project-management-overview-strip span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.2rem;
    padding: 0.42rem 0.68rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    color: #51483e;
    font-size: 0.78rem;
    font-weight: 850;
}

.project-management-overview-strip strong {
    color: #235f56;
    font-size: 1rem;
}

.project-management-overview-strip .is-alert {
    border-color: rgba(185, 28, 28, 0.22);
    background: #fef2f2;
    color: #991b1b;
}

.project-management-overview-strip .is-alert strong {
    color: #b91c1c;
}

.project-management-overview-strip .is-warning {
    border-color: rgba(217, 119, 6, 0.24);
    background: #fffbeb;
    color: #92400e;
}

.project-management-overview-strip .is-warning strong {
    color: #b45309;
}

.project-management-overview-strip .is-review {
    border-color: rgba(91, 33, 182, 0.22);
    background: #f5f3ff;
    color: #5b21b6;
}

.project-management-overview-strip .is-review strong {
    color: #6d28d9;
}

.project-management-overview-strip .is-muted {
    border-color: rgba(100, 116, 139, 0.2);
    background: #f8fafc;
    color: #475569;
}

.project-management-overview-strip .is-muted strong {
    color: #334155;
}

.project-management-priority-panel {
    display: grid;
    gap: 0.75rem;
    margin: 0.35rem 0 0.95rem;
    padding: 0.85rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #f7faf8);
}

.project-management-priority-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.project-management-priority-head div {
    display: grid;
    gap: 0.12rem;
}

.project-management-priority-head span {
    color: #235f56;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-priority-head strong {
    color: #1f2933;
    font-size: 1rem;
}

.project-management-priority-head small,
.project-management-empty-note {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.project-management-empty-note {
    margin: 0;
}

.project-management-next-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 0.55rem;
}

.project-management-next-action {
    display: grid;
    gap: 0.22rem;
    padding: 0.7rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-left: 4px solid #a8641f;
    border-radius: 8px;
    background: #fffdf8;
    color: #334155;
    text-decoration: none;
}

.project-management-next-action:hover {
    border-left-color: #235f56;
    box-shadow: 0 10px 24px rgba(52, 41, 24, 0.11);
}

.project-management-next-reason {
    justify-self: start;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.66rem;
    font-weight: 900;
}

.project-management-next-action strong {
    color: #111827;
    font-size: 0.88rem;
}

.project-management-next-action span:not(.project-management-next-reason),
.project-management-next-action small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.75rem;
    margin: 0.45rem 0 0.2rem;
}

.project-management-summary-card {
    --management-accent: #235f56;
    --management-soft: #eef8f4;
    --management-strong: #174d45;
    display: grid;
    gap: 0.42rem;
    min-height: 7rem;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(43, 36, 29, 0.12);
    border-top: 4px solid var(--management-accent);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.2)),
        var(--management-soft);
    color: var(--text);
    box-shadow: 0 8px 18px rgba(52, 41, 24, 0.07);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.project-management-summary-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--management-accent) 42%, #ffffff);
    box-shadow: 0 16px 32px rgba(52, 41, 24, 0.13);
}

.project-management-summary-card.is-pending {
    border-left-color: var(--management-accent);
    background: var(--management-soft);
}

.project-management-summary-card.is-overdue {
    border-color: rgba(191, 61, 36, 0.24);
    border-left-color: #bf3d24;
    background: linear-gradient(90deg, rgba(191, 61, 36, 0.08), var(--management-soft) 42%);
}

.project-management-summary-card.is-complete {
    border-left-color: var(--management-accent);
    background: var(--management-soft);
}

.project-management-summary-title {
    min-height: 2rem;
    color: #2f281f;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.25;
}

.project-management-summary-card strong {
    color: var(--management-strong);
    font-size: 1.9rem;
    line-height: 1;
}

.project-management-summary-meta,
.project-management-summary-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    color: #51483e;
    font-size: 0.74rem;
    font-weight: 800;
}

.project-management-summary-meta {
    align-items: stretch;
}

.project-management-summary-meta,
.project-management-summary-foot,
.project-management-summary-action {
    line-height: 1.2;
}

.project-management-summary-meta {
    display: grid;
    grid-template-columns: 1fr auto;
}

.project-management-summary-meta > span,
.project-management-summary-meta {
    min-width: 0;
}

.project-management-summary-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.38rem;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    white-space: nowrap;
}

.project-management-summary-foot {
    padding-top: 0.22rem;
    border-top: 1px solid rgba(43, 36, 29, 0.1);
    color: var(--muted);
}

.project-management-summary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 1.8rem;
    margin-top: 0.1rem;
    padding-top: 0.36rem;
    border-top: 1px solid rgba(43, 36, 29, 0.1);
    color: var(--management-strong);
    font-size: 0.74rem;
    font-weight: 900;
}

.project-management-summary-action span {
    display: inline-grid;
    place-items: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: var(--management-accent);
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
}

.project-management-tabs {
    gap: 0.38rem;
    margin: 0.2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(43, 36, 29, 0.12);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.project-management-tab {
    --management-accent: #235f56;
    --management-soft: #eef8f4;
    --management-strong: #174d45;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.74rem;
    padding: 0.26rem 0.52rem;
    border: 1px solid color-mix(in srgb, var(--management-accent) 38%, #ffffff);
    border-left: 3px solid var(--management-accent);
    border-radius: 7px;
    background: var(--management-soft);
    color: var(--management-strong);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.project-management-tab.active {
    border-color: var(--management-accent);
    background: var(--management-accent);
    color: #ffffff;
}

.project-management-summary-card[data-management-view="project_charter"],
.project-management-top-menu a[data-management-tab="project_charter"],
.project-management-tab[data-management-tab="project_charter"],
.project-management-group[data-management-view="project_charter"] {
    --management-accent: #d6a719;
    --management-soft: #fff8dc;
    --management-strong: #76540a;
}

.project-management-summary-card[data-management-view="plans"],
.project-management-top-menu a[data-management-tab="plans"],
.project-management-tab[data-management-tab="plans"],
.project-management-group[data-management-view="plans"] {
    --management-accent: #1e7bd7;
    --management-soft: #eaf4ff;
    --management-strong: #0f4c81;
}

.project-management-summary-card[data-management-view="slab_edge"],
.project-management-top-menu a[data-management-tab="slab_edge"],
.project-management-tab[data-management-tab="slab_edge"],
.project-management-group[data-management-view="slab_edge"] {
    --management-accent: #0d95b8;
    --management-soft: #e6f8fb;
    --management-strong: #07566c;
}

.project-management-summary-card[data-management-view="shop_drawings"],
.project-management-top-menu a[data-management-tab="shop_drawings"],
.project-management-tab[data-management-tab="shop_drawings"],
.project-management-group[data-management-view="shop_drawings"] {
    --management-accent: #138a57;
    --management-soft: #e9f8ef;
    --management-strong: #0c5437;
}

.project-management-summary-card[data-management-view="rfis"],
.project-management-top-menu a[data-management-tab="rfis"],
.project-management-tab[data-management-tab="rfis"],
.project-management-group[data-management-view="rfis"] {
    --management-accent: #7a54c7;
    --management-soft: #f1ecff;
    --management-strong: #4b3380;
}

.project-management-summary-card[data-management-view="safety_drawings"],
.project-management-top-menu a[data-management-tab="safety_drawings"],
.project-management-tab[data-management-tab="safety_drawings"],
.project-management-group[data-management-view="safety_drawings"] {
    --management-accent: #c84931;
    --management-soft: #fff0eb;
    --management-strong: #87301e;
}

.project-management-summary-card[data-management-view="soe_submittals"],
.project-management-top-menu a[data-management-tab="soe_submittals"],
.project-management-tab[data-management-tab="soe_submittals"],
.project-management-group[data-management-view="soe_submittals"] {
    --management-accent: #3f69c9;
    --management-soft: #edf2ff;
    --management-strong: #263f7b;
}

.project-management-summary-card[data-management-view="permits"],
.project-management-top-menu a[data-management-tab="permits"],
.project-management-tab[data-management-tab="permits"],
.project-management-group[data-management-view="permits"] {
    --management-accent: #9b6a22;
    --management-soft: #fff3df;
    --management-strong: #634112;
}

.project-management-summary-card[data-management-view="long_term_items"],
.project-management-top-menu a[data-management-tab="long_term_items"],
.project-management-tab[data-management-tab="long_term_items"],
.project-management-group[data-management-view="long_term_items"] {
    --management-accent: #5f6f7b;
    --management-soft: #eef3f5;
    --management-strong: #34414a;
}

.project-management-summary-card[data-management-view="main"],
.project-management-top-menu a[data-management-tab="main"],
.project-management-top-menu a[data-management-tab="all"],
.project-management-tab[data-management-tab="main"],
.project-management-tab[data-management-tab="all"],
.project-management-group[data-management-view="main"] {
    --management-accent: #a8641f;
    --management-soft: #fff5e8;
    --management-strong: #6d3e0d;
}

.project-management-stack {
    display: grid;
    gap: 0.95rem;
}

.project-management-group {
    border: 1px solid rgba(43, 36, 29, 0.12);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: 0 14px 34px rgba(52, 41, 24, 0.08);
    overflow: hidden;
}

.project-management-group-summary {
    display: grid;
    grid-template-columns: minmax(12rem, 0.9fr) minmax(0, 1.6fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(43, 36, 29, 0.1);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--management-accent) 14%, #ffffff), rgba(255, 255, 255, 0.78));
}

.project-management-group-title {
    display: grid;
    gap: 0.25rem;
}

.project-management-group-title span {
    color: var(--management-strong, #235f56);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-management-group-title strong {
    color: #1f2933;
    font-size: 1.18rem;
    line-height: 1.2;
}

.project-management-group-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.project-management-group-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 2rem;
    padding: 0.36rem 0.58rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: #4b5563;
    font-size: 0.74rem;
    font-weight: 800;
}

.project-management-group-stats strong {
    color: var(--management-strong, #235f56);
    font-size: 0.95rem;
}

.project-management-group-stats .is-alert {
    border-color: rgba(185, 28, 28, 0.2);
    background: #fef2f2;
    color: #991b1b;
}

.project-management-group-stats .is-alert strong {
    color: #b91c1c;
}

.project-management-group-head {
    align-items: end;
    padding: 0.85rem 1rem;
    background: #fbfcfa;
    border-bottom: 1px solid rgba(43, 36, 29, 0.1);
}

.project-management-group-marker {
    display: grid;
    gap: 0.25rem;
    min-width: 8.5rem;
    padding: 0.55rem 0.7rem;
    border-left: 4px solid var(--management-accent, #1e7bd7);
    border-radius: 8px;
    background: var(--management-soft, #edf5ff);
}

.project-management-group-marker span {
    color: var(--management-strong, #2a4968);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-group-marker strong {
    color: var(--management-strong, #0f4c81);
    font-size: 1.3rem;
    line-height: 1;
}

.project-management-group-head label {
    display: grid;
    gap: 0.3rem;
    min-width: min(13rem, 100%);
    flex: 1 1 13rem;
}

.project-management-group-head label span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-group-head input {
    width: 100%;
    min-height: 2.3rem;
    border: 1px solid rgba(43, 36, 29, 0.13);
    border-radius: 8px;
    background: #ffffff;
    padding: 0.45rem 0.6rem;
    color: var(--text);
    font: inherit;
}

.project-management-table-wrap {
    overflow-x: auto;
}

.project-management-table {
    width: 100%;
    min-width: 1460px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}

.project-management-table th,
.project-management-table td {
    border-bottom: 1px solid rgba(43, 36, 29, 0.08);
    padding: 0.48rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.project-management-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef4f6;
    color: #3f5264;
    font-size: 0.69rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-table tbody tr:nth-child(even) td {
    background: #fbfcfd;
}

.project-management-table tbody tr:hover td {
    background: #f2f7f5;
}

.project-management-table input,
.project-management-table select {
    width: 100%;
    min-height: 2.05rem;
    border: 1px solid rgba(43, 36, 29, 0.12);
    border-radius: 7px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    padding: 0.34rem 0.45rem;
}

.project-management-table td:first-child input {
    min-width: 14rem;
    font-weight: 700;
}

.project-management-table input[type="date"] {
    min-width: 8.5rem;
}

.project-management-check-cell {
    text-align: center;
}

.project-management-check-cell input[type="checkbox"] {
    width: 1.05rem;
    min-height: 1.05rem;
    accent-color: #235f56;
}

.management-status-select {
    min-width: 8.4rem;
    font-weight: 800;
    border-width: 1px;
}

.project-management-table input.management-label-input {
    font-weight: 800;
    text-align: center;
}

.project-management-table input:focus,
.project-management-table select:focus,
.project-management-group-head input:focus,
.project-management-detail-grid input:focus,
.project-management-detail-grid select:focus,
.project-management-slab-detail-grid input:focus,
.project-management-slab-detail-grid select:focus,
.project-management-control-grid input:focus,
.project-management-control-grid select:focus,
.project-management-update-row input:focus,
.project-management-update-row select:focus {
    outline: 0;
    border-color: var(--management-accent, #235f56);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--management-accent, #235f56) 18%, transparent);
}

.project-management-item-stack {
    display: grid;
    gap: 0;
    padding: 0.35rem 0.85rem 0.85rem;
}

.project-management-status-row {
    position: relative;
    display: grid;
    grid-template-columns: 2.25rem minmax(16rem, 30rem) minmax(10rem, 12rem) auto minmax(0, 1fr);
    align-items: center;
    gap: 0;
    min-height: 2.75rem;
    border: 1px solid rgba(43, 36, 29, 0.08);
    border-top: 0;
    border-left: 4px solid var(--row-status-accent, var(--management-accent, #1e7bd7));
    background:
        linear-gradient(90deg, var(--row-status-bg, #ffffff), #ffffff 46%);
}

.project-management-status-row.project-management-charter-row {
    grid-template-columns: 2.25rem minmax(18rem, 1.35fr) minmax(8rem, 0.55fr) minmax(8rem, 0.55fr) minmax(12rem, 0.9fr);
}

.project-management-status-row:first-child {
    border-top: 1px solid rgba(43, 36, 29, 0.08);
    border-radius: 8px 8px 0 0;
}

.project-management-status-row:last-child {
    border-radius: 0 0 8px 8px;
}

.project-management-status-row.is-expanded {
    background:
        linear-gradient(90deg, var(--row-status-bg-strong, var(--management-soft, #edf5ff)), #ffffff 56%);
}

.project-management-status-row.is-selected {
    background: #1e4b91 !important;
}

.project-management-status-row.is-selected .project-management-status-title,
.project-management-status-row.is-selected .project-management-grid-cell {
    background: #1e4b91 !important;
}

.project-management-status-row.is-selected :is(input, select, strong) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.project-management-status-row.status-pending,
.project-management-status-row.status-waiting,
.project-management-status-row.status-waiting-on-new-plans,
.project-management-status-row.status-requested,
.project-management-status-row.status-approved-aor-waiting,
.project-management-status-row.status-approved-aor-waiting-eor,
.project-management-status-row.status-approved-eor-waiting,
.project-management-status-row.status-approved-eor-waiting-aor {
    --row-status-accent: #f59e0b;
    --row-status-bg: #fff7ed;
    --row-status-bg-strong: #ffedd5;
}

.project-management-status-row.status-received,
.project-management-status-row.status-approved,
.project-management-status-row.status-approved-as-noted,
.project-management-status-row.status-file-and-field-use,
.project-management-status-row.status-closed,
.project-management-status-row.status-done,
.project-management-status-row.status-rfi-closed {
    --row-status-accent: #10b981;
    --row-status-bg: #ecfdf5;
    --row-status-bg-strong: #d1fae5;
}

.project-management-status-row.status-submitted,
.project-management-status-row.status-sent,
.project-management-status-row.status-open,
.project-management-status-row.status-new-plans,
.project-management-status-row.status-new-mep {
    --row-status-accent: #2563eb;
    --row-status-bg: #eff6ff;
    --row-status-bg-strong: #dbeafe;
}

.project-management-status-row.status-rejected,
.project-management-status-row.status-revise-resubmit,
.project-management-status-row.status-revise-and-resubmit,
.project-management-status-row.status-blocked {
    --row-status-accent: #dc2626;
    --row-status-bg: #fef2f2;
    --row-status-bg-strong: #fee2e2;
}

.project-management-status-row.status-detailer-court,
.project-management-status-row.status-drafter-court,
.project-management-status-row.status-pm-court,
.project-management-status-row.status-eor-court,
.project-management-status-row.status-aor-court,
.project-management-status-row.status-rfi-eor-court,
.project-management-status-row.status-hamona-to-review {
    --row-status-accent: #8b5cf6;
    --row-status-bg: #f5f3ff;
    --row-status-bg-strong: #ede9fe;
}

.project-management-status-row.status-in-progress {
    --row-status-accent: #06b6d4;
    --row-status-bg: #ecfeff;
    --row-status-bg-strong: #cffafe;
}

.project-management-status-row.status-n-a,
.project-management-status-row.status-not-started {
    --row-status-accent: #64748b;
    --row-status-bg: #f8fafc;
    --row-status-bg-strong: #e2e8f0;
}

.project-management-status-title,
.project-management-status-control {
    display: grid;
    gap: 0.12rem;
    padding: 0.38rem 0.65rem;
    min-width: 0;
    border-left: 1px solid rgba(43, 36, 29, 0.07);
}

.project-management-status-title span,
.project-management-status-control span,
.project-management-detail-grid label span,
.project-management-slab-detail-grid label span,
.project-management-update-row label span,
.project-management-updates-head span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-item-detail-compact :is(.project-management-slab-detail-grid, .project-management-update-row, .project-management-control-grid) label span {
    font-size: 0.58rem;
    line-height: 1;
}

.project-management-status-title strong {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.1;
}

.project-management-status-title small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.project-management-row-toggle {
    width: 100%;
    height: 100%;
    min-height: 2.75rem;
    border: 0;
    border-right: 1px solid rgba(43, 36, 29, 0.07);
    background: transparent;
    color: var(--management-strong, #1b557f);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.project-management-row-toggle[aria-expanded="true"] {
    transform: rotate(90deg);
}

.project-management-row-select {
    position: absolute;
    left: 1.38rem;
    top: 50%;
    z-index: 7;
    display: grid;
    place-items: center;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    transform: translateY(-50%);
}

.project-management-row-select input {
    width: 0.82rem;
    height: 0.82rem;
    margin: 0;
    accent-color: #38a7cf;
}

.project-management-row-toggle:hover {
    background: var(--management-soft, #edf5ff);
}

.project-management-status-control select,
.project-management-detail-grid input,
.project-management-detail-grid select,
.project-management-slab-detail-grid input,
.project-management-slab-detail-grid select,
.project-management-update-row input,
.project-management-update-row select {
    width: 100%;
    min-height: 2rem;
    border: 1px solid rgba(43, 36, 29, 0.13);
    border-radius: 8px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    padding: 0.42rem 0.58rem;
}

.project-management-item-detail-compact .project-management-update-row input,
.project-management-item-detail-compact .project-management-update-row select,
.project-management-item-detail-compact .project-management-control-grid input,
.project-management-item-detail-compact .project-management-control-grid select {
    min-height: 1.75rem;
    border-radius: 6px;
    font-size: 0.74rem;
    padding: 0.22rem 0.36rem;
}

.project-management-file-field {
    position: relative;
    align-content: end;
    cursor: pointer;
}

.project-management-file-input {
    position: absolute;
    width: 1px !important;
    min-height: 1px !important;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.project-management-upload-control {
    display: grid;
    gap: 0.06rem;
    min-height: 1.72rem;
    border: 1px solid color-mix(in srgb, var(--management-accent, #1e7bd7) 34%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--management-soft, #edf5ff) 58%, #ffffff);
    color: var(--management-strong, #1b557f);
    padding: 0.28rem 0.45rem;
}

.project-management-upload-control strong {
    color: inherit;
    font-size: 0.72rem;
    line-height: 1;
}

.project-management-upload-control small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.64rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-file-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.24rem;
    max-height: 6.1rem;
    margin-top: 0.28rem;
    overflow-y: auto;
    padding: 0.02rem 0.18rem 0.02rem 0;
    scrollbar-width: thin;
}

.project-management-file-actions[hidden] {
    display: none;
}

.project-management-file-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.16rem;
    align-items: center;
    min-width: 0;
    min-height: 1.82rem;
    padding: 0.2rem 0.24rem;
    border: 1px solid rgba(30, 123, 215, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.88);
}

.project-management-file-action-name {
    overflow: hidden;
    color: #1f2937;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-file-action-meta {
    display: none;
}

.project-management-file-action-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.14rem;
    justify-content: flex-start;
}

.project-management-file-actions a,
.project-management-file-actions button {
    display: inline-grid;
    place-items: center;
    width: 1.18rem;
    height: 1.18rem;
    border: 1px solid color-mix(in srgb, var(--management-accent, #1e7bd7) 30%, transparent);
    border-radius: 7px;
    background: #ffffff;
    color: var(--management-strong, #1b557f);
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0;
    text-decoration: none;
}

.project-management-file-actions button[aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
}

.project-management-file-action-icon {
    width: 0.78rem;
    height: 0.78rem;
}

.project-management-file-actions a:hover,
.project-management-file-actions button:hover {
    border-color: var(--management-accent, #1e7bd7);
    background: color-mix(in srgb, var(--management-soft, #edf5ff) 70%, #ffffff);
}

.project-management-file-add-more {
    justify-self: stretch;
    margin-bottom: 0;
}

.project-management-file-add-more .project-management-file-action-icon {
    width: 0.82rem;
    height: 0.82rem;
}

.project-management-file-actions button[data-file-remove-index] {
    border-color: rgba(188, 64, 39, 0.32);
    color: #bc4027;
}

.project-management-file-actions button[data-file-remove-index]:hover {
    border-color: #bc4027;
    background: #fff1ec;
}

.is-file-preview-open {
    overflow: hidden;
}

.project-management-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 0.45rem;
    background: rgba(10, 15, 20, 0.82);
}

.project-management-preview-modal[hidden] {
    display: none;
}

.project-management-preview-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: calc(100vw - 0.9rem);
    height: calc(100dvh - 0.9rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: #101827;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.project-management-preview-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    min-height: 0;
    overflow: hidden;
}

.project-management-preview-head,
.project-management-preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    background: #ffffff;
}

.project-management-preview-head {
    border-bottom: 1px solid rgba(43, 36, 29, 0.1);
}

.project-management-preview-head h2 {
    max-width: min(1040px, 74vw);
    margin: 0.05rem 0 0;
    overflow: hidden;
    color: var(--text);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-preview-head span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.project-management-preview-body {
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: auto;
    padding: 0.45rem;
    background: #0b111d;
}

.project-management-preview-side {
    display: grid;
    grid-template-columns: 5.6rem minmax(0, 1fr);
    min-height: 0;
    border-left: 1px solid rgba(43, 36, 29, 0.12);
    background: #ffffff;
}

.project-management-preview-tabs {
    display: grid;
    align-content: start;
    gap: 0.45rem;
    padding: 0.8rem 0.55rem;
    border-right: 1px solid rgba(43, 36, 29, 0.1);
    background: #f7f8fb;
}

.project-management-preview-tabs button {
    display: grid;
    justify-items: center;
    gap: 0.24rem;
    min-height: 4.3rem;
    padding: 0.4rem 0.18rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.project-management-preview-tabs button:hover,
.project-management-preview-tabs button.is-active {
    border-color: rgba(30, 123, 215, 0.22);
    background: #ffffff;
    color: #1e5fbf;
}

.project-management-preview-tabs svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-management-preview-panel {
    min-width: 0;
    min-height: 0;
    padding: 0.95rem;
    overflow: auto;
}

.project-management-preview-panel h3 {
    margin: 0 0 0.8rem;
    color: var(--text);
    font-size: 0.95rem;
}

.project-management-preview-panel-body {
    display: grid;
    gap: 0.65rem;
}

.project-management-preview-info {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.project-management-preview-info div,
.project-management-preview-comment,
.project-management-preview-empty-panel,
.project-management-preview-related {
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 8px;
    background: #f9fafb;
}

.project-management-preview-info div {
    display: grid;
    gap: 0.18rem;
    padding: 0.58rem 0.68rem;
}

.project-management-preview-info dt {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-management-preview-info dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #111827;
    font-size: 0.82rem;
    font-weight: 800;
}

.project-management-preview-comment,
.project-management-preview-empty-panel {
    padding: 0.72rem;
    color: #374151;
    font-size: 0.82rem;
    line-height: 1.45;
}

.project-management-preview-related {
    display: grid;
    gap: 0.18rem;
    width: 100%;
    padding: 0.62rem 0.7rem;
    text-align: left;
    cursor: pointer;
}

.project-management-preview-related:hover,
.project-management-preview-related.is-active {
    border-color: rgba(30, 123, 215, 0.28);
    background: #eef6ff;
}

.project-management-preview-related strong,
.project-management-preview-related span,
.project-management-preview-related small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-preview-related strong {
    color: #111827;
    font-size: 0.78rem;
}

.project-management-preview-related span,
.project-management-preview-related small {
    color: #64748b;
    font-size: 0.72rem;
}

.project-management-preview-body img,
.project-management-preview-body iframe {
    border: 0;
    border-radius: 4px;
    background: #ffffff;
}

.project-management-preview-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-management-preview-body iframe {
    width: 100%;
    height: 100%;
}

.project-management-preview-empty {
    display: grid;
    gap: 0.35rem;
    max-width: 26rem;
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    text-align: center;
}

.project-management-preview-empty span {
    color: rgba(255, 255, 255, 0.72);
}

.project-management-preview-actions {
    border-top: 1px solid rgba(43, 36, 29, 0.1);
}

@media (max-width: 980px) {
    .project-management-preview-main {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .project-management-preview-side {
        grid-template-columns: 1fr;
        max-height: 16rem;
        border-left: 0;
        border-top: 1px solid rgba(43, 36, 29, 0.12);
    }

    .project-management-preview-tabs {
        display: flex;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(43, 36, 29, 0.1);
    }

    .project-management-preview-tabs button {
        min-width: 5.5rem;
        min-height: 3.8rem;
    }
}

.project-management-file-field:hover .project-management-upload-control,
.project-management-file-field:focus-within .project-management-upload-control {
    border-color: var(--management-accent, #1e7bd7);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--management-accent, #1e7bd7) 12%, transparent);
}

.project-management-detail-grid input[data-fixed-management-item] {
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 900;
    cursor: not-allowed;
}

.project-management-status-row > .small-button {
    justify-self: start;
    margin: 0 0.55rem;
    min-height: 1.9rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.72rem;
}

.project-management-inline-detail {
    grid-column: 2 / -1;
    display: grid;
    gap: 0.45rem;
    padding: 0.5rem 0.55rem 0.55rem;
    border-left: 2px solid color-mix(in srgb, var(--management-accent, #1e7bd7) 45%, transparent);
    background: color-mix(in srgb, var(--management-soft, #edf5ff) 38%, #ffffff);
}

.project-management-item-detail {
    display: grid;
    gap: 0.65rem;
    padding: 0.72rem;
    border: 1px solid rgba(43, 36, 29, 0.12);
    border-left: 4px solid var(--management-accent, #1e7bd7);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--management-soft, #edf5ff), #ffffff 62%);
}

.project-management-item-detail-compact {
    gap: 0.34rem;
    padding: 0.38rem 0.46rem 0.46rem;
    border-radius: 8px;
    background: #f8fcff;
}

.project-management-item-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(43, 36, 29, 0.1);
}

.project-management-item-detail-compact .project-management-item-detail-head {
    align-items: center;
    padding-bottom: 0.28rem;
}

.project-management-item-detail-head a {
    color: var(--management-strong, #1b557f);
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}

.project-management-item-detail-head h3 {
    margin: 0.18rem 0 0;
    color: var(--text);
    font-size: 1.35rem;
}

.project-management-item-detail-compact .project-management-item-detail-head h3 {
    margin-top: 0.06rem;
    font-size: 0.98rem;
    line-height: 1.05;
}

.project-management-item-detail-compact .project-management-item-detail-head a {
    font-size: 0.66rem;
}

.project-management-item-detail-compact .project-management-item-detail-head .management-status-select {
    width: min(100%, 23rem);
    min-height: 1.9rem;
    border-radius: 8px;
}

.project-management-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.project-management-slab-detail-grid {
    display: grid;
    grid-template-columns: minmax(12rem, 1.15fr) minmax(9rem, 0.75fr) minmax(8rem, 0.62fr) minmax(13rem, 0.95fr) minmax(8rem, 0.62fr) minmax(14rem, 1.25fr);
    gap: 0.32rem;
    align-items: end;
}

.project-management-detail-grid label,
.project-management-slab-detail-grid label,
.project-management-update-row label {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.project-management-slab-detail-grid input,
.project-management-slab-detail-grid select {
    min-height: 1.78rem;
    border-radius: 6px;
    font-size: 0.76rem;
    padding: 0.24rem 0.38rem;
}

.project-management-slab-note {
    grid-column: span 1;
}

.project-management-check-field {
    align-content: end;
}

.project-management-check-field input[type="checkbox"] {
    width: 1.2rem;
    min-height: 1.2rem;
    accent-color: var(--management-accent, #235f56);
}

.project-management-detail-notes {
    grid-column: span 2;
}

.project-management-updates-panel {
    display: grid;
    gap: 0.4rem;
    padding: 0.44rem;
    border: 1px solid rgba(43, 36, 29, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.project-management-updates-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.project-management-item-detail-compact .project-management-updates-panel {
    padding: 0.25rem;
}

.project-management-item-detail-compact .project-management-updates-head {
    min-height: 1.7rem;
}

.project-management-updates-head > div {
    display: grid;
    gap: 0.15rem;
}

.project-management-updates-head strong {
    color: var(--text);
    font-size: 0.86rem;
}

.project-management-item-detail-compact .project-management-updates-head strong {
    font-size: 0.72rem;
}

.project-management-update-stack {
    display: grid;
    gap: 0.35rem;
}

.project-management-updates-footer {
    display: flex;
    justify-content: flex-start;
    padding: 0.35rem 0.45rem 0;
}

.project-management-update-row-actions {
    display: flex;
    align-items: end;
    padding: 0.45rem;
    border-left: 1px solid rgba(43, 36, 29, 0.08);
}

.project-management-update-row {
    display: grid;
    grid-template-columns: minmax(14rem, 1.2fr) minmax(8.5rem, 0.68fr) minmax(16rem, 1.18fr) minmax(15rem, 1.1fr) minmax(8.5rem, 0.68fr) minmax(12rem, 0.88fr) minmax(8.5rem, 0.68fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(43, 36, 29, 0.08);
    border-radius: 0;
    background: #ffffff;
    overflow-x: auto;
}

.project-management-update-row-inline {
    grid-template-columns: minmax(14rem, 1.2fr) minmax(8.5rem, 0.68fr) minmax(11rem, 0.76fr) minmax(8.5rem, 0.68fr) minmax(12rem, 0.88fr) minmax(8.5rem, 0.68fr);
}

.project-management-update-row-slab {
    grid-template-columns: minmax(10rem, 0.9fr) minmax(10.5rem, 0.84fr) minmax(10.5rem, 0.84fr) minmax(12rem, 1fr) minmax(8rem, 0.6fr) minmax(13rem, 0.96fr) minmax(12rem, 0.9fr) minmax(8rem, 0.6fr) minmax(10.5rem, 0.8fr) minmax(8rem, 0.6fr);
    min-width: 1220px;
}

.project-management-update-row-inline.project-management-update-row-slab {
    grid-template-columns: minmax(10rem, 0.9fr) minmax(10.5rem, 0.84fr) minmax(10.5rem, 0.84fr) minmax(12rem, 1fr) minmax(8rem, 0.6fr) minmax(11rem, 0.78fr) minmax(8rem, 0.6fr) minmax(10.5rem, 0.8fr) minmax(8rem, 0.6fr);
    min-width: 1080px;
}

.project-management-update-row-slab-files,
.project-management-update-row-inline.project-management-update-row-slab-files {
    grid-template-columns: minmax(8rem, 0.85fr) minmax(12rem, 1fr) minmax(12rem, 1fr) minmax(8rem, 0.58fr) minmax(12rem, 1fr) minmax(7.2rem, 0.45fr);
    min-width: 1100px;
    overflow: visible;
}

.project-management-update-row-slab-files label,
.project-management-update-row-slab-files .project-management-control-window-cell {
    min-height: 2.55rem;
    padding: 0.16rem 0.2rem;
}

.project-management-update-row-slab-files label span,
.project-management-update-row-slab-files .project-management-control-window-cell > span {
    font-size: 0.58rem;
    line-height: 1;
}

.project-management-update-row-slab-files input,
.project-management-update-row-slab-files select {
    min-height: 1.65rem !important;
    border-radius: 5px !important;
    font-size: 0.72rem !important;
    padding: 0.18rem 0.32rem !important;
}

.project-management-update-row-slab-files .project-management-upload-control {
    min-height: 1.68rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.08rem 0.18rem;
    padding: 0.14rem 0.24rem;
    border-radius: 6px;
}

.project-management-update-row-slab-files .project-management-upload-control strong {
    font-size: 0.56rem;
    line-height: 1;
}

.project-management-update-row-slab-files .project-management-upload-control small {
    font-size: 0.5rem;
    line-height: 1;
}

.project-management-update-row-slab-files .project-management-file-actions {
    grid-column: 1 / -1;
    max-height: 3.85rem;
    gap: 0.16rem;
    margin-top: 0.14rem;
}

.project-management-update-row-slab-files .project-management-control-window summary {
    min-height: 1.65rem;
    border-radius: 5px;
    font-size: 0.62rem;
    padding: 0.18rem 0.36rem;
}

.project-management-update-row + .project-management-update-row {
    border-top: 0;
}

.project-management-update-row label,
.project-management-attachment-summary-cell,
.project-management-control-window-cell {
    min-height: 2.8rem;
    padding: 0.28rem;
    border-right: 1px solid rgba(43, 36, 29, 0.08);
}

.project-management-item-detail-compact .project-management-update-row label {
    min-height: 2.18rem;
    padding: 0.18rem;
}

.project-management-attachment-summary-cell {
    display: grid;
    gap: 0.24rem;
    align-content: center;
}

.project-management-control-window-cell {
    position: relative;
    display: grid;
    gap: 0.24rem;
    align-content: center;
}

.project-management-attachment-summary-cell > span,
.project-management-control-window-cell > span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-attachment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.project-management-attachment-summary span,
.project-management-attachment-summary a {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    border: 1px solid rgba(30, 123, 215, 0.18);
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.22rem 0.42rem;
    text-decoration: none;
    white-space: nowrap;
}

.project-management-attachment-summary strong {
    margin-right: 0.18rem;
    color: #0f4c81;
    font-size: 0.76rem;
}

.project-management-attachment-summary a {
    border-color: color-mix(in srgb, var(--management-accent, #1e7bd7) 42%, transparent);
    background: color-mix(in srgb, var(--management-soft, #edf5ff) 68%, #ffffff);
    color: var(--management-strong, #1b557f);
}

.project-management-control-window summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    border: 1px solid color-mix(in srgb, var(--management-accent, #1e7bd7) 42%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--management-soft, #edf5ff) 68%, #ffffff);
    color: var(--management-strong, #1b557f);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 850;
    list-style: none;
    padding: 0.3rem 0.5rem;
}

.project-management-control-window summary::-webkit-details-marker {
    display: none;
}

.project-management-control-window[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(15, 23, 42, 0.34);
}

.project-management-control-window[open] .project-management-revision-control-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 60;
    width: min(74rem, calc(100vw - 3rem));
    max-height: min(34rem, calc(100dvh - 5rem));
    margin: 0;
    overflow: auto;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(13, 104, 122, 0.24);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.project-management-revision-control-panel {
    grid-column: 1 / -1;
    display: grid;
    border-top: 1px solid rgba(43, 36, 29, 0.08);
    background: #f8fafc;
}

.project-management-revision-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.25rem;
    padding: 0.16rem 0.35rem;
    border-bottom: 1px solid rgba(43, 36, 29, 0.08);
    background: #e9f7fb;
}

.project-management-revision-control-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.project-management-revision-control-title span {
    color: #0d687a;
    font-size: 0.58rem;
    font-weight: 850;
    text-transform: uppercase;
}

.project-management-revision-control-title strong,
.project-management-revision-control-title em {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.16rem 0.48rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
}

.project-management-revision-control-title strong {
    border: 1px solid rgba(13, 104, 122, 0.24);
    background: #d8f5fb;
    color: #07566c;
}

.project-management-revision-control-title em {
    border: 1px solid rgba(56, 167, 207, 0.22);
    background: #ffffff;
    color: #334155;
}

.project-management-revision-control-head small {
    color: #526071;
    font-size: 0.58rem;
    font-weight: 760;
}

.project-management-revision-control-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.project-management-save-exit-button {
    min-height: 1.55rem;
    padding: 0.2rem 0.6rem;
    border-color: rgba(13, 104, 122, 0.3);
    background: #0d687a;
    color: #ffffff;
    font-size: 0.62rem;
    line-height: 1;
    white-space: nowrap;
}

.project-management-save-exit-button:hover {
    background: #095468;
}

.project-management-revision-control-grid {
    grid-template-columns: repeat(7, minmax(7rem, 1fr)) !important;
    gap: 0.28rem !important;
    padding: 0.32rem !important;
}

.project-management-update-row .project-management-check-field {
    justify-items: center;
    text-align: center;
}

.project-management-update-row .project-management-check-field input[type="checkbox"] {
    margin-top: 0.15rem;
}

.project-management-slab-toolbar {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(12rem, 0.42fr) auto auto;
    gap: 0.55rem;
    align-items: end;
    min-width: 920px;
    padding: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #1f2242;
}

.project-management-slab-toolbar label {
    display: grid;
    gap: 0.24rem;
}

.project-management-slab-toolbar label span {
    color: #9ea5ca;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-slab-toolbar input,
.project-management-slab-toolbar select {
    width: 100%;
    min-height: 2.15rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: #f8fafc;
    color: #1f2937;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 760;
    padding: 0.38rem 0.55rem;
}

.project-management-slab-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.project-management-slab-quick-filters button {
    min-height: 2.15rem;
    border: 1px solid rgba(55, 194, 221, 0.32);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8fbff;
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 850;
    padding: 0.32rem 0.55rem;
}

.project-management-slab-quick-filters button:hover,
.project-management-slab-quick-filters button.active {
    border-color: #37c2dd;
    background: rgba(55, 194, 221, 0.22);
}

.project-management-slab-quick-filters .project-management-delete-selected {
    border-color: rgba(220, 38, 38, 0.55);
    color: #fee2e2;
}

.project-management-slab-quick-filters .project-management-delete-selected:hover {
    border-color: rgba(220, 38, 38, 0.8);
    background: rgba(220, 38, 38, 0.22);
}

.project-management-slab-results {
    justify-self: end;
    align-self: center;
    min-width: 5.8rem;
    color: #d7d8eb;
    font-size: 0.72rem;
    font-weight: 850;
    text-align: right;
}

.project-management-bulk-bar {
    position: fixed;
    left: 50%;
    bottom: 5.8rem;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding: 0.48rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #343447;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.34);
    color: #ffffff;
    transform: translateX(-50%);
}

.project-management-bulk-bar[hidden] {
    display: none;
}

.project-management-bulk-bar strong {
    padding: 0 0.4rem;
    color: #ffffff;
    font-size: 0.78rem;
    white-space: nowrap;
}

.project-management-bulk-bar button {
    min-height: 1.85rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.24rem 0.55rem;
}

.project-management-bulk-bar button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.project-management-grid-head {
    position: sticky;
    top: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: 2.25rem minmax(18rem, 1.35fr) minmax(8rem, 0.55fr) minmax(12rem, 0.9fr) minmax(12rem, 0.9fr) minmax(9rem, 0.65fr) minmax(9rem, 0.65fr);
    min-width: 1180px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #2c2d4d;
}

.project-management-grid-head span {
    min-height: 2.35rem;
    padding: 0.58rem 0.7rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #d7d8eb;
    font-size: 0.72rem;
    font-weight: 850;
    text-align: center;
}

.project-management-grid-head span:first-child,
.project-management-grid-head span:nth-child(2) {
    position: sticky;
    z-index: 8;
    background: #2c2d4d;
}

.project-management-grid-head span:first-child {
    left: 0;
}

.project-management-grid-head span:nth-child(2) {
    left: 2.25rem;
}

.project-management-charter-total-cell input {
    text-align: center;
}

.project-management-monday-board {
    border-color: rgba(43, 49, 91, 0.72);
    background: #171a36;
    box-shadow: 0 18px 42px rgba(15, 18, 38, 0.22);
    overflow-x: auto;
}

.project-management-monday-board .project-management-group-summary {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(14, 149, 184, 0.22), rgba(23, 26, 54, 0.94));
}

.project-management-monday-board .project-management-group-title strong,
.project-management-monday-board .project-management-group-stats strong {
    color: #f8fafc;
}

.project-management-monday-board .project-management-group-title span {
    color: #37c2dd;
}

.project-management-monday-board .project-management-group-stats span {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.07);
    color: #d7d8eb;
}

.project-management-monday-board .project-management-group-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: #202342;
}

.project-management-monday-board .project-management-group-head label span {
    color: #9ea5ca;
}

.project-management-monday-board .project-management-group-head input {
    border-color: rgba(255, 255, 255, 0.14);
    background: #f9fbff;
}

.project-management-monday-board .project-management-item-stack {
    min-width: 920px;
    padding: 0;
    overflow-x: visible;
}

.project-management-monday-board .project-management-status-row {
    grid-template-columns: 2.25rem minmax(18rem, 1.35fr) minmax(8rem, 0.55fr) minmax(12rem, 0.9fr) minmax(12rem, 0.9fr) minmax(9rem, 0.65fr) minmax(9rem, 0.65fr);
    min-width: 1180px;
    min-height: 2.8rem;
    border-color: rgba(255, 255, 255, 0.08);
    border-left-width: 4px;
    background: #303252;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row {
    grid-template-columns: 2.25rem minmax(18rem, 1.35fr) minmax(8rem, 0.55fr) minmax(8rem, 0.55fr) minmax(12rem, 0.9fr);
    border-color: rgba(43, 36, 29, 0.1);
    background: #ffffff;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row.is-expanded {
    background: #fffaf0;
}

.project-management-monday-board .project-management-status-row:first-child,
.project-management-monday-board .project-management-status-row:last-child {
    border-radius: 0;
}

.project-management-monday-board .project-management-status-row.is-expanded {
    background: #252848;
}

.project-management-monday-board .project-management-slab-row {
    grid-template-rows: minmax(2.8rem, auto);
    grid-auto-rows: auto;
}

.project-management-monday-board .project-management-slab-row > .project-management-row-toggle {
    grid-column: 1;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-status-title {
    grid-column: 2;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-grid-submittal-cell {
    grid-column: 3;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-status-control {
    grid-column: 4;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-grid-status-cell {
    grid-column: 5;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-grid-schedule-cell {
    grid-column: 6;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-grid-request-cell {
    grid-column: 7;
    grid-row: 1;
}

.project-management-monday-board .project-management-slab-row > .project-management-inline-detail {
    grid-column: 1 / -1;
    grid-row: 2;
}

.project-management-monday-board .project-management-row-toggle {
    position: sticky;
    left: 0;
    z-index: 5;
    min-height: 2.8rem;
    border-right-color: rgba(255, 255, 255, 0.08);
    background: #303252;
    color: #dce4ff;
}

.project-management-monday-board .project-management-row-toggle:hover {
    background: rgba(14, 149, 184, 0.18);
}

.project-management-monday-board .project-management-status-title,
.project-management-monday-board .project-management-status-control,
.project-management-monday-board .project-management-grid-cell {
    display: grid;
    align-items: center;
    min-height: 2.8rem;
    padding: 0.35rem 0.48rem;
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.project-management-monday-board .project-management-status-title {
    position: sticky;
    left: 2.25rem;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    background: #303252;
}

.project-management-monday-board .project-management-charter-row .project-management-status-title {
    background: #ffffff;
}

.project-management-monday-board .project-management-status-title small {
    color: #37c2dd;
    white-space: nowrap;
}

.project-management-grid-cell span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.project-management-grid-cell {
    position: relative;
}

.project-management-owner-cell strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-management-grid-input,
.project-management-monday-board .project-management-status-title .project-management-grid-input,
.project-management-monday-board .project-management-grid-cell input,
.project-management-monday-board .project-management-grid-cell select.project-management-grid-input,
.project-management-monday-board .project-management-due-cell input {
    width: 100%;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #f8fafc;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 760;
    padding: 0.32rem 0.45rem;
}

.project-management-monday-board .project-management-charter-row .project-management-status-title .project-management-grid-input,
.project-management-monday-board .project-management-charter-row .project-management-grid-cell input {
    color: #1f2937;
}

.project-management-monday-board .project-management-charter-row .project-management-grid-cell input {
    text-align: center;
}

.project-management-due-cell input {
    text-align: center;
}

.project-management-revision-select {
    background: #38a7cf !important;
    border-color: #38a7cf !important;
    color: #ffffff !important;
    font-weight: 850 !important;
    text-align: center;
    text-align-last: center;
}

.project-management-revision-select option {
    background: #38a7cf;
    color: #ffffff;
    font-weight: 850;
}

.project-management-grid-schedule-cell input {
    border-radius: 999px !important;
    background: #c4c4c4 !important;
    color: #ffffff !important;
    text-align: center;
    text-align-last: center;
}

.project-management-grid-request-cell input {
    text-align: center;
}

.project-management-monday-board .project-management-grid-input:focus,
.project-management-monday-board .project-management-grid-cell input:focus,
.project-management-monday-board .project-management-grid-cell select:focus {
    outline: 0;
    border-color: #37c2dd;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 2px rgba(55, 194, 221, 0.16);
}

.project-management-monday-board .project-management-status-control {
    align-content: center;
}

.project-management-monday-board .project-management-status-control .management-status-select,
.project-management-monday-board .project-management-grid-status-cell .management-label-input {
    width: 100%;
    min-height: 2rem;
    border-radius: 0;
    border-color: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.32rem 0.45rem;
    text-align: center;
}

.project-management-monday-board .project-management-status-control .management-status-color {
    display: none;
}

.project-management-control-cell {
    justify-items: center;
}

.project-management-control-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.4rem;
    min-height: 2rem;
    padding: 0.32rem 0.72rem;
    border: 1px solid rgba(55, 194, 221, 0.45);
    border-radius: 6px;
    background: rgba(55, 194, 221, 0.16);
    color: #e8fbff;
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
}

.project-management-control-open:hover {
    background: rgba(55, 194, 221, 0.28);
    color: #ffffff;
}

.project-management-control-panel {
    margin-top: 0.12rem;
    border: 1px solid rgba(43, 49, 91, 0.14);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.project-management-control-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.48rem 0.7rem;
    border-bottom: 1px solid rgba(43, 49, 91, 0.12);
    background: #e9f7fb;
}

.project-management-control-head span {
    display: block;
    color: #0d687a;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-management-control-head strong {
    display: block;
    margin-top: 0.06rem;
    color: #1f2937;
    font-size: 0.86rem;
}

.project-management-control-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(8.2rem, 1fr));
    gap: 0.42rem;
    padding: 0.58rem 0.7rem 0.7rem;
}

.project-management-control-grid label {
    display: grid;
    gap: 0.22rem;
}

.project-management-control-grid label span {
    color: #526071;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.05;
}

.project-management-control-grid input,
.project-management-control-grid select {
    width: 100%;
    min-height: 2.05rem;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    background: #ffffff;
    color: #1f2937;
    font: inherit;
    font-size: 0.82rem;
    padding: 0.34rem 0.48rem;
}

.project-management-control-choice {
    font-weight: 850 !important;
    text-align: center;
    text-align-last: center;
}

.project-management-control-choice-yes {
    border-color: #05bf72 !important;
    background: #05bf72 !important;
    color: #ffffff !important;
}

.project-management-control-choice-no {
    border-color: #df2f4c !important;
    background: #df2f4c !important;
    color: #ffffff !important;
}

.project-management-control-choice-not-applicable {
    border-color: #7d4db3 !important;
    background: #7d4db3 !important;
    color: #ffffff !important;
}

.project-management-control-choice-na,
.project-management-control-choice-empty {
    border-color: #d7dee8 !important;
    background: #ffffff !important;
    color: #1f2937 !important;
}

.project-management-control-choice option {
    color: #1f2937;
    background: #ffffff;
    font-weight: 800;
}

.project-management-control-choice option.project-management-control-choice-yes {
    background: #05bf72;
    color: #ffffff;
}

.project-management-control-choice option.project-management-control-choice-no {
    background: #df2f4c;
    color: #ffffff;
}

.project-management-control-choice option.project-management-control-choice-not-applicable {
    background: #7d4db3;
    color: #ffffff;
}

.project-management-control-wide {
    grid-column: span 3;
}

.project-management-monday-board .project-management-inline-detail {
    grid-column: 1 / -1;
    padding: 0.62rem 0.9rem 0.9rem 2.25rem;
    border-left: 4px solid #0d95b8;
    background: #252848;
}

.project-management-monday-board .project-management-updates-panel {
    border-color: rgba(255, 255, 255, 0.08);
    background: #303252;
}

.project-management-monday-board .project-management-updates-head strong {
    color: #f8fafc;
}

.project-management-monday-board .project-management-updates-head span,
.project-management-monday-board .project-management-update-row label span {
    color: #aeb5d6;
}

.project-management-monday-board .project-management-update-row {
    border-color: rgba(255, 255, 255, 0.08);
    background: #303252;
}

.project-management-monday-board .project-management-update-row label {
    border-right-color: rgba(255, 255, 255, 0.08);
}

.project-management-monday-board .project-management-attachment-summary-cell {
    border-right-color: rgba(255, 255, 255, 0.08);
}

.project-management-monday-board .project-management-attachment-summary-cell > span {
    color: #aeb5d6;
}

.project-management-monday-board .project-management-control-window-cell {
    border-right-color: rgba(255, 255, 255, 0.08);
}

.project-management-monday-board .project-management-control-window-cell > span {
    color: #aeb5d6;
}

.project-management-monday-board .project-management-control-window summary {
    border-color: rgba(55, 194, 221, 0.34);
    background: rgba(55, 194, 221, 0.14);
    color: #dff9ff;
}

.project-management-monday-board .project-management-attachment-summary span,
.project-management-monday-board .project-management-attachment-summary a {
    border-color: rgba(255, 255, 255, 0.12);
    background: #272a49;
    color: #f8fafc;
}

.project-management-monday-board .project-management-attachment-summary strong {
    color: #37c2dd;
}

.project-management-monday-board .project-management-attachment-summary a {
    border-color: rgba(55, 194, 221, 0.34);
    background: rgba(55, 194, 221, 0.14);
    color: #dff9ff;
}

.project-management-monday-board .project-management-update-row input {
    border-color: rgba(255, 255, 255, 0.1);
    background: #272a49;
    color: #f8fafc;
}

.project-management-monday-board .project-management-upload-control {
    border-color: rgba(55, 194, 221, 0.34);
    background: rgba(55, 194, 221, 0.1);
    color: #dff9ff;
}

.project-management-monday-board .project-management-upload-control small {
    color: #aeb5d6;
}

.project-management-monday-board .button-ghost.small-button {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.project-management-monday-board .project-management-item-detail-compact {
    gap: 0;
    padding: 0;
    border: 1px solid rgba(55, 194, 221, 0.55);
    border-left: 4px solid #0ea5c6;
    border-radius: 8px;
    background: #f8fbff;
    overflow: hidden;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-item-detail-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
    gap: 0.7rem;
    align-items: center;
    padding: 0.42rem 0.58rem;
    border-bottom: 1px solid #d7e5ef;
    background: linear-gradient(90deg, #eef9fc, #ffffff);
}

.project-management-monday-board .project-management-item-detail-compact .project-management-item-detail-head a {
    color: #07566c;
    font-size: 0.62rem;
    font-weight: 900;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-item-detail-head h3 {
    margin: 0.08rem 0 0;
    color: #1f2937;
    font-size: 0.9rem;
    line-height: 1.05;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-item-detail-head .management-status-select {
    width: 100%;
    min-height: 2rem;
    border-radius: 7px;
    font-size: 0.78rem;
}

.project-management-monday-board .project-management-item-detail-compact .management-status-color {
    display: none;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-slab-detail-grid {
    grid-template-columns: minmax(12rem, 1.25fr) minmax(8rem, 0.62fr) minmax(7.4rem, 0.55fr) minmax(11rem, 0.8fr) minmax(7.4rem, 0.55fr) minmax(14rem, 1.35fr);
    gap: 0.28rem;
    padding: 0.42rem 0.55rem 0.36rem;
    border-bottom: 1px solid #d7e5ef;
    background: #ffffff;
}

.project-management-monday-board .project-management-item-detail-compact :is(.project-management-slab-detail-grid, .project-management-update-row, .project-management-control-grid) label span {
    color: #6b7d91;
    font-size: 0.54rem;
    font-weight: 900;
}

.project-management-monday-board .project-management-item-detail-compact :is(.project-management-slab-detail-grid, .project-management-update-row, .project-management-control-grid) :is(input, select) {
    min-height: 1.72rem;
    border-radius: 5px;
    font-size: 0.72rem;
    padding: 0.2rem 0.34rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-panel {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #242747;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-head {
    min-height: 1.75rem;
    padding: 0.34rem 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #303252;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-head strong {
    color: #ffffff;
    font-size: 0.7rem;
    line-height: 1;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-head span {
    color: #9bdff0;
    font-size: 0.55rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-head .small-button {
    min-height: 1.7rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-stack {
    gap: 0;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-updates-footer {
    padding: 0.32rem 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #303252;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row-slab {
    grid-template-columns:
        minmax(10rem, 1.05fr)
        minmax(8.5rem, 0.72fr)
        minmax(8.5rem, 0.72fr)
        minmax(11rem, 1fr)
        minmax(7.6rem, 0.62fr)
        minmax(10rem, 0.8fr)
        minmax(10rem, 0.8fr)
        minmax(7.6rem, 0.62fr)
        minmax(9rem, 0.78fr)
        minmax(7.6rem, 0.62fr);
    min-width: 1060px;
    border: 0;
    border-radius: 0;
    background: #303252;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row-slab-files {
    grid-template-columns:
        minmax(8rem, 0.85fr)
        minmax(12rem, 1fr)
        minmax(12rem, 1fr)
        minmax(8rem, 0.58fr)
        minmax(12rem, 1fr)
        minmax(7.2rem, 0.45fr);
    min-width: 1100px;
    overflow: visible;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row-slab-files label,
.project-management-monday-board .project-management-item-detail-compact .project-management-update-row-slab-files .project-management-control-window-cell {
    min-height: 2.55rem;
    padding: 0.16rem 0.2rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row label {
    min-height: 2.05rem;
    padding: 0.18rem 0.24rem;
    border-right-color: rgba(255, 255, 255, 0.08);
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row input {
    border-color: rgba(255, 255, 255, 0.1);
    background: #272a49;
    color: #f8fafc;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-update-row select {
    min-height: 1.72rem;
    border-radius: 5px;
    font-size: 0.72rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-file-field {
    align-content: center;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-upload-control {
    min-height: 1.68rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.08rem 0.18rem;
    padding: 0.14rem 0.24rem;
    border-radius: 6px;
    background: rgba(55, 194, 221, 0.12);
}

.project-management-monday-board .project-management-item-detail-compact .project-management-upload-control strong {
    font-size: 0.56rem;
    text-transform: uppercase;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-upload-control small {
    grid-column: 1 / -1;
    font-size: 0.5rem;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-file-actions {
    display: flex;
    gap: 0.2rem;
    margin-top: 0;
    padding: 0;
    overflow: visible;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-file-actions a,
.project-management-monday-board .project-management-item-detail-compact .project-management-file-actions button {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 5px;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-revision-control-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #f8fbff;
}

.project-management-update-row.needs-revision [data-revision-required-panel] {
    position: relative;
    opacity: 0.72;
}

.project-management-update-row.needs-revision [data-revision-required-panel]::after {
    content: "Choose Revision # first";
    position: absolute;
    inset: 0.35rem;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(13, 149, 184, 0.45);
    border-radius: 7px;
    background: rgba(248, 251, 255, 0.82);
    color: #07566c;
    font-size: 0.72rem;
    font-weight: 900;
    cursor: not-allowed;
    pointer-events: auto;
}

.project-management-update-row.needs-revision .project-management-control-window[open] [data-revision-required-panel],
.project-management-control-window[open] [data-revision-required-panel] {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 60;
    width: min(74rem, calc(100vw - 3rem));
    max-height: min(34rem, calc(100dvh - 5rem));
    margin: 0;
    overflow: auto;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.project-management-update-row.needs-revision .project-management-control-window[open] [data-revision-required-panel]::after {
    display: none;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-revision-control-head {
    min-height: 1.25rem;
    padding: 0.16rem 0.44rem;
    background: #e9f7fb;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-revision-control-grid {
    grid-template-columns: repeat(10, minmax(6.6rem, 1fr)) !important;
    gap: 0.22rem !important;
    padding: 0.32rem 0.44rem 0.44rem !important;
}

.project-management-monday-board .project-management-item-detail-compact .project-management-control-wide {
    grid-column: span 4;
}

:is(.management-status-select, .management-label-input).status-not-started {
    background: #f3f4f6;
    color: #4b5563;
}

:is(.management-status-select, .management-label-input).status-pending {
    background: #8d97aa;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-received,
:is(.management-status-select, .management-label-input).status-approved-as-noted,
:is(.management-status-select, .management-label-input).status-closed,
:is(.management-status-select, .management-label-input).status-file-and-field-use,
:is(.management-status-select, .management-label-input).status-approved {
    background: #3bd092;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-requested,
:is(.management-status-select, .management-label-input).status-submitted {
    background: #f5bd5b;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-open,
:is(.management-status-select, .management-label-input).status-rejected,
:is(.management-status-select, .management-label-input).status-revise-resubmit,
:is(.management-status-select, .management-label-input).status-revise-and-resubmit {
    background: #e86279;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-n-a {
    background: #686b67;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-detailer-court,
:is(.management-status-select, .management-label-input).status-rfi-eor-court,
:is(.management-status-select, .management-label-input).status-eor-court,
:is(.management-status-select, .management-label-input).status-aor-court {
    background: #6fcfd0;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-drafter-court,
:is(.management-status-select, .management-label-input).status-pm-court,
:is(.management-status-select, .management-label-input).status-new-mep {
    background: #a768b0;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-new-plans,
:is(.management-status-select, .management-label-input).status-hamona-to-review {
    background: #f25fa7;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-rfi-closed,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting-eor,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting-aor {
    background: #38a7cf;
    color: #ffffff;
}

.management-status-select.status-not-started {
    background: #f3f4f6;
    color: #4b5563;
}

.management-status-select.status-pending {
    background: #8d97aa;
    color: #ffffff;
}

.management-status-select.status-received,
.management-status-select.status-approved-as-noted,
.management-status-select.status-closed,
.management-status-select.status-file-and-field-use {
    background: #3bd092;
    color: #ffffff;
}

.management-status-select.status-requested,
.management-status-select.status-submitted {
    background: #f5bd5b;
    color: #ffffff;
}

.management-status-select.status-open,
.management-status-select.status-rejected,
.management-status-select.status-revise-resubmit,
.management-status-select.status-revise-and-resubmit {
    background: #e86279;
    color: #ffffff;
}

.management-status-select.status-n-a {
    background: #686b67;
    color: #ffffff;
}

.management-status-select.status-detailer-court,
.management-status-select.status-rfi-eor-court,
.management-status-select.status-eor-court,
.management-status-select.status-aor-court {
    background: #6fcfd0;
    color: #ffffff;
}

.management-status-select.status-drafter-court,
.management-status-select.status-pm-court,
.management-status-select.status-new-mep {
    background: #a768b0;
    color: #ffffff;
}

.management-status-select.status-new-plans,
.management-status-select.status-hamona-to-review {
    background: #f25fa7;
    color: #ffffff;
}

.management-status-select.status-rfi-closed,
.management-status-select.status-approved-aor-waiting,
.management-status-select.status-approved-aor-waiting-eor,
.management-status-select.status-approved-eor-waiting,
.management-status-select.status-approved-eor-waiting-aor {
    background: #38a7cf;
    color: #ffffff;
}

.management-status-select.status-in-progress,
.management-status-select.status-waiting,
.management-status-select.status-waiting-on-new-plans {
    background: #fff4ce;
    color: #7a4b00;
}

.management-status-select.status-sent {
    background: #e8f0ff;
    color: #294c8f;
}

.management-status-select.status-approved,
.management-status-select.status-done {
    background: #dff5e8;
    color: #1f6b46;
}

.management-status-select.status-blocked {
    background: #fde2df;
    color: #92352b;
}

:is(.management-status-select, .management-label-input).status-not-started {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

:is(.management-status-select, .management-label-input).status-pending,
:is(.management-status-select, .management-label-input).status-waiting,
:is(.management-status-select, .management-label-input).status-waiting-on-new-plans,
:is(.management-status-select, .management-label-input).status-requested,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting-eor,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting-aor {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

:is(.management-status-select, .management-label-input).status-submitted,
:is(.management-status-select, .management-label-input).status-sent,
:is(.management-status-select, .management-label-input).status-open,
:is(.management-status-select, .management-label-input).status-new-plans,
:is(.management-status-select, .management-label-input).status-new-mep {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

:is(.management-status-select, .management-label-input).status-received,
:is(.management-status-select, .management-label-input).status-approved,
:is(.management-status-select, .management-label-input).status-approved-as-noted,
:is(.management-status-select, .management-label-input).status-file-and-field-use,
:is(.management-status-select, .management-label-input).status-closed,
:is(.management-status-select, .management-label-input).status-done,
:is(.management-status-select, .management-label-input).status-rfi-closed {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

:is(.management-status-select, .management-label-input).status-rejected,
:is(.management-status-select, .management-label-input).status-revise-resubmit,
:is(.management-status-select, .management-label-input).status-revise-and-resubmit,
:is(.management-status-select, .management-label-input).status-blocked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

:is(.management-status-select, .management-label-input).status-detailer-court,
:is(.management-status-select, .management-label-input).status-drafter-court,
:is(.management-status-select, .management-label-input).status-pm-court,
:is(.management-status-select, .management-label-input).status-eor-court,
:is(.management-status-select, .management-label-input).status-aor-court,
:is(.management-status-select, .management-label-input).status-rfi-eor-court,
:is(.management-status-select, .management-label-input).status-hamona-to-review {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

:is(.management-status-select, .management-label-input).status-in-progress {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0e7490;
}

:is(.management-status-select, .management-label-input).status-n-a {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.management-status-select option {
    background: #ffffff;
    color: #1f2933;
}

.management-status-select option.status-received {
    background: #79cdef;
    color: #ffffff;
}

.management-status-select option.status-requested {
    background: #f5bd5b;
    color: #ffffff;
}

.management-status-select option.status-waiting,
.management-status-select option.status-waiting-on-new-plans,
.management-status-select option.status-new-plans,
.management-status-select option.status-new-mep,
.management-status-select option.status-hamona-to-review {
    background: #f25fa7;
    color: #ffffff;
}

.management-status-select option.status-pending {
    background: #8d97aa;
    color: #ffffff;
}

.management-status-select option.status-n-a,
.management-status-select option.status-not-started {
    background: #686b67;
    color: #ffffff;
}

.management-status-select option.status-approved,
.management-status-select option.status-approved-as-noted,
.management-status-select option.status-file-and-field-use,
.management-status-select option.status-closed,
.management-status-select option.status-done,
.management-status-select option.status-rfi-closed {
    background: #3bd092;
    color: #ffffff;
}

.management-status-select option.status-submitted,
.management-status-select option.status-sent,
.management-status-select option.status-open {
    background: #38a7cf;
    color: #ffffff;
}

.management-status-select option.status-rejected,
.management-status-select option.status-revise-resubmit,
.management-status-select option.status-revise-and-resubmit,
.management-status-select option.status-blocked {
    background: #e86279;
    color: #ffffff;
}

.management-status-select option.status-in-progress {
    background: #6fcfd0;
    color: #ffffff;
}

.management-status-select option.status-detailer-court,
.management-status-select option.status-drafter-court,
.management-status-select option.status-pm-court,
.management-status-select option.status-eor-court,
.management-status-select option.status-aor-court,
.management-status-select option.status-rfi-eor-court,
.management-status-select option.status-approved-aor-waiting,
.management-status-select option.status-approved-aor-waiting-eor,
.management-status-select option.status-approved-eor-waiting,
.management-status-select option.status-approved-eor-waiting-aor {
    background: #a768b0;
    color: #ffffff;
}

:is(.management-status-select, .management-label-input).status-approved-as-noted,
:is(.management-status-select, .management-label-input).status-received,
:is(.management-status-select, .management-label-input).status-approved,
:is(.management-status-select, .management-label-input).status-closed,
:is(.management-status-select, .management-label-input).status-done,
:is(.management-status-select, .management-label-input).status-rfi-closed {
    background: #3bd092 !important;
    border-color: #3bd092 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-file-and-field-use {
    background: #a9dc3f !important;
    border-color: #a9dc3f !important;
    color: #1f2933 !important;
}

:is(.management-status-select, .management-label-input).status-pending {
    background: #8d97aa !important;
    border-color: #8d97aa !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-requested,
:is(.management-status-select, .management-label-input).status-submitted {
    background: #f5bd5b !important;
    border-color: #f5bd5b !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-revise-resubmit,
:is(.management-status-select, .management-label-input).status-revise-and-resubmit,
:is(.management-status-select, .management-label-input).status-rejected,
:is(.management-status-select, .management-label-input).status-blocked {
    background: #e86279 !important;
    border-color: #e86279 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-waiting,
:is(.management-status-select, .management-label-input).status-waiting-on-new-plans,
:is(.management-status-select, .management-label-input).status-new-plans,
:is(.management-status-select, .management-label-input).status-hamona-to-review {
    background: #f25fa7 !important;
    border-color: #f25fa7 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-open,
:is(.management-status-select, .management-label-input).status-sent,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting-eor,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting-aor {
    background: #38a7cf !important;
    border-color: #38a7cf !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-in-progress,
:is(.management-status-select, .management-label-input).status-eor-court {
    background: #6fcfd0 !important;
    border-color: #6fcfd0 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-detailer-court,
:is(.management-status-select, .management-label-input).status-drafter-court,
:is(.management-status-select, .management-label-input).status-rfi-eor-court,
:is(.management-status-select, .management-label-input).status-new-mep {
    background: #a768b0 !important;
    border-color: #a768b0 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-pm-court {
    background: #d98f78 !important;
    border-color: #d98f78 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-aor-court {
    background: #4f78ad !important;
    border-color: #4f78ad !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-not-started,
:is(.management-status-select, .management-label-input).status-n-a {
    background: #686b67 !important;
    border-color: #686b67 !important;
    color: #ffffff !important;
}

.management-status-select option:checked {
    box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.08);
}

.project-management-status-control,
.project-management-item-detail-head {
    position: relative;
}

.project-management-status-control .management-status-select,
.project-management-item-detail-head .management-status-select {
    padding-right: 2.15rem;
}

.management-status-color {
    position: absolute;
    right: 1.08rem;
    top: 50%;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid color-mix(in srgb, var(--status-text, #1f2937) 22%, #ffffff);
    border-radius: 999px;
    background: var(--status-swatch, var(--status-bg, #9ca3af));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82);
    pointer-events: none;
    transform: translateY(-50%);
}

.project-management-item-detail-head .management-status-color {
    right: 0.75rem;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-not-started {
    --status-bg: #f3f4f6;
    --status-border: #d1d5db;
    --status-text: #374151;
    --status-swatch: #6b7280;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-pending {
    --status-bg: #fff7ed;
    --status-border: #fdba74;
    --status-text: #9a3412;
    --status-swatch: #f97316;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-received {
    --status-bg: #ecfdf5;
    --status-border: #86efac;
    --status-text: #047857;
    --status-swatch: #10b981;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-requested {
    --status-bg: #fef9c3;
    --status-border: #fde047;
    --status-text: #854d0e;
    --status-swatch: #eab308;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-waiting,
:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-waiting-on-new-plans {
    --status-bg: #fff1f2;
    --status-border: #fda4af;
    --status-text: #be123c;
    --status-swatch: #e11d48;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-n-a {
    --status-bg: #f8fafc;
    --status-border: #cbd5e1;
    --status-text: #475569;
    --status-swatch: #64748b;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-approved {
    --status-bg: #dcfce7;
    --status-border: #86efac;
    --status-text: #166534;
    --status-swatch: #22c55e;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-approved-as-noted {
    --status-bg: #d1fae5;
    --status-border: #6ee7b7;
    --status-text: #065f46;
    --status-swatch: #059669;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-file-and-field-use {
    --status-bg: #ccfbf1;
    --status-border: #5eead4;
    --status-text: #0f766e;
    --status-swatch: #14b8a6;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-closed,
:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-done {
    --status-bg: #e0f2fe;
    --status-border: #7dd3fc;
    --status-text: #0369a1;
    --status-swatch: #0ea5e9;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-submitted {
    --status-bg: #eff6ff;
    --status-border: #93c5fd;
    --status-text: #1d4ed8;
    --status-swatch: #3b82f6;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-sent {
    --status-bg: #eef2ff;
    --status-border: #a5b4fc;
    --status-text: #4338ca;
    --status-swatch: #6366f1;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-open {
    --status-bg: #f0f9ff;
    --status-border: #7dd3fc;
    --status-text: #075985;
    --status-swatch: #0284c7;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-rejected {
    --status-bg: #fef2f2;
    --status-border: #fca5a5;
    --status-text: #b91c1c;
    --status-swatch: #dc2626;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-revise-resubmit,
:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-revise-and-resubmit {
    --status-bg: #fff1f2;
    --status-border: #fb7185;
    --status-text: #9f1239;
    --status-swatch: #f43f5e;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-blocked {
    --status-bg: #fee2e2;
    --status-border: #ef4444;
    --status-text: #991b1b;
    --status-swatch: #b91c1c;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-detailer-court {
    --status-bg: #f5f3ff;
    --status-border: #c4b5fd;
    --status-text: #6d28d9;
    --status-swatch: #8b5cf6;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-drafter-court {
    --status-bg: #faf5ff;
    --status-border: #d8b4fe;
    --status-text: #7e22ce;
    --status-swatch: #a855f7;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-pm-court {
    --status-bg: #fdf4ff;
    --status-border: #f0abfc;
    --status-text: #a21caf;
    --status-swatch: #d946ef;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-eor-court,
:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-rfi-eor-court {
    --status-bg: #fae8ff;
    --status-border: #e879f9;
    --status-text: #86198f;
    --status-swatch: #c026d3;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-aor-court {
    --status-bg: #fce7f3;
    --status-border: #f9a8d4;
    --status-text: #be185d;
    --status-swatch: #ec4899;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-new-mep {
    --status-bg: #f0fdfa;
    --status-border: #5eead4;
    --status-text: #0f766e;
    --status-swatch: #2dd4bf;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-new-plans {
    --status-bg: #ecfeff;
    --status-border: #67e8f9;
    --status-text: #0e7490;
    --status-swatch: #06b6d4;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-hamona-to-review {
    --status-bg: #fff7ed;
    --status-border: #fb923c;
    --status-text: #c2410c;
    --status-swatch: #ea580c;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-rfi-closed {
    --status-bg: #f0fdf4;
    --status-border: #4ade80;
    --status-text: #15803d;
    --status-swatch: #16a34a;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-approved-aor-waiting {
    --status-bg: #fefce8;
    --status-border: #facc15;
    --status-text: #a16207;
    --status-swatch: #ca8a04;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-approved-eor-waiting,
:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-approved-eor-waiting-aor {
    --status-bg: #fffbeb;
    --status-border: #f59e0b;
    --status-text: #92400e;
    --status-swatch: #d97706;
}

:is(.management-status-select, .management-label-input, .management-status-color, .management-status-select option, .project-management-status-row).status-in-progress {
    --status-bg: #e0f2fe;
    --status-border: #38bdf8;
    --status-text: #075985;
    --status-swatch: #0ea5e9;
}

:is(.management-status-select, .management-label-input)[class*="status-"] {
    border-color: var(--status-border, #cbd5e1);
    background: var(--status-bg, #f8fafc);
    color: var(--status-text, #1f2937);
}

.management-status-select option[class*="status-"] {
    background: var(--status-bg, #ffffff);
    color: var(--status-text, #1f2937);
    font-weight: 800;
}

:is(.management-status-select, .management-label-input).status-approved-as-noted,
:is(.management-status-select, .management-label-input).status-received,
:is(.management-status-select, .management-label-input).status-approved,
:is(.management-status-select, .management-label-input).status-closed,
:is(.management-status-select, .management-label-input).status-done,
:is(.management-status-select, .management-label-input).status-rfi-closed {
    background: #3bd092 !important;
    border-color: #3bd092 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-file-and-field-use {
    background: #a9dc3f !important;
    border-color: #a9dc3f !important;
    color: #1f2933 !important;
}

:is(.management-status-select, .management-label-input).status-pending {
    background: #8d97aa !important;
    border-color: #8d97aa !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-requested,
:is(.management-status-select, .management-label-input).status-submitted {
    background: #f5bd5b !important;
    border-color: #f5bd5b !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-revise-resubmit,
:is(.management-status-select, .management-label-input).status-revise-and-resubmit,
:is(.management-status-select, .management-label-input).status-rejected,
:is(.management-status-select, .management-label-input).status-blocked {
    background: #e86279 !important;
    border-color: #e86279 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-waiting,
:is(.management-status-select, .management-label-input).status-waiting-on-new-plans,
:is(.management-status-select, .management-label-input).status-new-plans,
:is(.management-status-select, .management-label-input).status-hamona-to-review {
    background: #f25fa7 !important;
    border-color: #f25fa7 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-open,
:is(.management-status-select, .management-label-input).status-sent,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting,
:is(.management-status-select, .management-label-input).status-approved-aor-waiting-eor,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting,
:is(.management-status-select, .management-label-input).status-approved-eor-waiting-aor {
    background: #38a7cf !important;
    border-color: #38a7cf !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-in-progress,
:is(.management-status-select, .management-label-input).status-eor-court {
    background: #6fcfd0 !important;
    border-color: #6fcfd0 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-detailer-court,
:is(.management-status-select, .management-label-input).status-drafter-court,
:is(.management-status-select, .management-label-input).status-rfi-eor-court,
:is(.management-status-select, .management-label-input).status-new-mep {
    background: #a768b0 !important;
    border-color: #a768b0 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-pm-court {
    background: #d98f78 !important;
    border-color: #d98f78 !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-aor-court {
    background: #4f78ad !important;
    border-color: #4f78ad !important;
    color: #ffffff !important;
}

:is(.management-status-select, .management-label-input).status-not-started,
:is(.management-status-select, .management-label-input).status-n-a {
    background: #686b67 !important;
    border-color: #686b67 !important;
    color: #ffffff !important;
}

.project-management-status-row[class*="status-"] {
    --row-status-accent: var(--status-swatch, #64748b);
    --row-status-bg: var(--status-bg, #f8fafc);
    --row-status-bg-strong: color-mix(in srgb, var(--status-bg, #f8fafc) 78%, var(--status-swatch, #64748b));
}

.project-management-monday-board .project-management-status-row.project-management-charter-row,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-status-title,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-grid-cell {
    background: #ffffff !important;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row input.project-management-grid-input,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-grid-cell input {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-charter-title {
    display: block;
    overflow: hidden;
    color: #1f2937 !important;
    font-size: 0.8rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row input.project-management-grid-input::placeholder,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-grid-cell input::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
}

.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-status-title,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-status-title *,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-status-title input,
.project-management-monday-board .project-management-status-row.project-management-charter-row .project-management-status-title strong {
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

@media (max-width: 760px) {
    .project-management-top-menu {
        top: 0.25rem;
        margin-top: 0;
    }

    .project-management-group-summary {
        grid-template-columns: 1fr;
    }

    .project-management-group-stats {
        justify-content: flex-start;
    }

    .project-management-status-row,
    .project-management-update-row,
    .project-management-detail-grid,
    .project-management-slab-detail-grid,
    .project-management-control-grid {
        grid-template-columns: 1fr;
    }

    .project-management-detail-notes,
    .project-management-slab-note,
    .project-management-control-wide {
        grid-column: auto;
    }

    .workflow-document-upload-compact {
        grid-template-columns: 1fr;
    }

    .project-management-item-detail-head,
    .project-management-updates-head {
        align-items: stretch;
        flex-direction: column;
    }
}

.equipment-hero {
    background:
        linear-gradient(145deg, rgba(245, 249, 255, 0.98), rgba(243, 235, 222, 0.94)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.15), transparent 34%),
        radial-gradient(circle at bottom left, rgba(35, 95, 86, 0.1), transparent 36%);
    border-color: rgba(64, 54, 41, 0.1);
    overflow: hidden;
}

.equipment-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.2rem;
    align-items: center;
}

.equipment-hero-copy h2 {
    margin-bottom: 0.7rem;
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 1.02;
}

.equipment-hero-panels {
    display: grid;
    gap: 0.85rem;
}

.equipment-hero-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(64, 54, 41, 0.08);
    box-shadow: 0 18px 34px rgba(44, 37, 27, 0.06);
}

.equipment-hero-panel span,
.equipment-hero-panel strong {
    display: block;
}

.equipment-hero-panel span {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.equipment-hero-panel strong {
    margin-top: 0.18rem;
    font-size: 1.05rem;
    color: var(--brand-strong);
}

.equipment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.equipment-icon svg {
    width: 100%;
    height: 100%;
}

.equipment-hero-panel-icon {
    width: 42px;
    height: 42px;
    padding: 0.7rem;
    border-radius: 14px;
    color: #3558a2;
    background: rgba(53, 88, 162, 0.12);
    border: 1px solid rgba(53, 88, 162, 0.14);
}

.equipment-stats-grid .stat-card {
    min-height: 150px;
}

.equipment-stat-card .stat-icon {
    width: 34px;
    height: 34px;
}

.equipment-board-card,
.equipment-editor-card {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(246, 239, 228, 0.9)),
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.08), transparent 40%);
}

.equipment-section-head {
    align-items: flex-start;
}

.equipment-section-mark,
.equipment-subsection-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow: 0 14px 28px rgba(49, 39, 23, 0.06);
}

.equipment-section-mark-icon {
    width: 24px;
    height: 24px;
    color: var(--brand-strong);
}

.equipment-asset-card {
    align-items: stretch;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 241, 231, 0.92)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.08), transparent 38%);
    border: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow: 0 18px 40px rgba(44, 37, 27, 0.07);
}

.equipment-asset-card.is-ready {
    border-color: rgba(37, 117, 92, 0.22);
}

.equipment-asset-card.is-active {
    border-color: rgba(53, 88, 162, 0.22);
}

.equipment-asset-card.is-watch {
    border-color: rgba(198, 124, 34, 0.22);
}

.equipment-asset-card.is-risk {
    border-color: rgba(184, 71, 42, 0.22);
}

.equipment-asset-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.equipment-asset-copy {
    min-width: 0;
}

.equipment-asset-mark {
    width: 52px;
    height: 52px;
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(64, 54, 41, 0.08);
    color: var(--brand-strong);
    border: 1px solid rgba(64, 54, 41, 0.1);
}

.equipment-asset-mark.is-ready {
    background: rgba(37, 117, 92, 0.12);
    color: #25755c;
    border-color: rgba(37, 117, 92, 0.16);
}

.equipment-asset-mark.is-active {
    background: rgba(53, 88, 162, 0.12);
    color: #3558a2;
    border-color: rgba(53, 88, 162, 0.16);
}

.equipment-asset-mark.is-watch {
    background: rgba(198, 124, 34, 0.12);
    color: #c67c22;
    border-color: rgba(198, 124, 34, 0.16);
}

.equipment-asset-mark.is-risk {
    background: rgba(184, 71, 42, 0.12);
    color: #b8472a;
    border-color: rgba(184, 71, 42, 0.16);
}

.equipment-asset-meta span {
    background: rgba(255, 255, 255, 0.74);
}

.equipment-chip.is-ready {
    background: rgba(37, 117, 92, 0.12);
    color: #25755c;
    border-color: rgba(37, 117, 92, 0.16);
}

.equipment-chip.is-active {
    background: rgba(53, 88, 162, 0.12);
    color: #3558a2;
    border-color: rgba(53, 88, 162, 0.16);
}

.equipment-chip.is-watch {
    background: rgba(198, 124, 34, 0.12);
    color: #c67c22;
    border-color: rgba(198, 124, 34, 0.16);
}

.equipment-chip.is-risk {
    background: rgba(184, 71, 42, 0.12);
    color: #b8472a;
    border-color: rgba(184, 71, 42, 0.16);
}

.equipment-chip.is-neutral {
    background: rgba(64, 54, 41, 0.07);
    color: var(--text);
}

.equipment-chip.is-project {
    background: rgba(35, 95, 86, 0.12);
    color: var(--accent);
    border-color: rgba(35, 95, 86, 0.16);
}

.equipment-chip.is-location {
    background: rgba(53, 136, 162, 0.12);
    color: #3588a2;
    border-color: rgba(53, 136, 162, 0.16);
}

.equipment-panel {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.78), rgba(244, 238, 228, 0.92)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.05), transparent 34%);
    border-color: rgba(64, 54, 41, 0.12);
}

.equipment-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.equipment-panel-title-wrap,
.equipment-doc-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.equipment-panel-icon,
.equipment-doc-icon {
    width: 18px;
    height: 18px;
    color: var(--brand-strong);
}

.equipment-subsection-head {
    align-items: center;
}

.equipment-panel-profile {
    background:
        linear-gradient(150deg, rgba(255, 251, 245, 0.94), rgba(237, 244, 247, 0.88)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.08), transparent 32%);
}

.equipment-profile-shell {
    display: grid;
    gap: 1rem;
}

.equipment-profile-hero {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 252, 0.9)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.08), transparent 36%);
    border: 1px solid rgba(64, 54, 41, 0.1);
    box-shadow: 0 18px 40px rgba(44, 37, 27, 0.06);
}

.equipment-profile-hero-media {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 20px;
    background:
        linear-gradient(160deg, rgba(225, 233, 245, 0.94), rgba(245, 238, 228, 0.92)),
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.08), transparent 40%);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.equipment-profile-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipment-profile-hero-fallback {
    display: grid;
    place-items: center;
    gap: 0.55rem;
    min-height: inherit;
    color: var(--muted);
    text-align: center;
}

.equipment-profile-hero-copy {
    display: grid;
    gap: 0.95rem;
    align-content: start;
}

.equipment-profile-topline {
    margin-bottom: 0;
}

.equipment-profile-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
}

.equipment-profile-identity h3 {
    margin-bottom: 0.25rem;
    font-size: 1.45rem;
}

.equipment-profile-identity p {
    margin-bottom: 0;
    color: var(--muted);
}

.equipment-profile-chip-row {
    margin-top: 0;
}

.equipment-profile-meta-grid,
.equipment-profile-kpi-grid,
.equipment-profile-grid {
    display: grid;
    gap: 0.9rem;
}

.equipment-profile-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-profile-meta-card,
.equipment-profile-kpi-card {
    display: grid;
    gap: 0.28rem;
    padding: 0.88rem 0.95rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.equipment-profile-meta-card span,
.equipment-profile-kpi-card span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.equipment-profile-meta-card strong,
.equipment-profile-kpi-card strong {
    color: var(--text);
    font-size: 0.96rem;
}

.equipment-profile-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.equipment-profile-kpi-card {
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(246, 241, 232, 0.88)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.06), transparent 44%);
}

.equipment-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-profile-section {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(64, 54, 41, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.equipment-profile-section-wide {
    grid-column: 1 / -1;
}

.equipment-profile-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.equipment-profile-section-head h3 {
    margin-bottom: 0.2rem;
}

.equipment-panel-allocation {
    background:
        linear-gradient(150deg, rgba(246, 250, 255, 0.94), rgba(232, 242, 255, 0.88));
}

.equipment-panel-usage {
    background:
        linear-gradient(150deg, rgba(247, 255, 253, 0.94), rgba(232, 247, 243, 0.88));
}

.equipment-panel-maintenance {
    background:
        linear-gradient(150deg, rgba(255, 248, 243, 0.95), rgba(253, 236, 226, 0.9));
}

.equipment-panel-rental {
    background:
        linear-gradient(150deg, rgba(255, 250, 242, 0.95), rgba(248, 239, 221, 0.9));
}

.equipment-panel-docs {
    background:
        linear-gradient(150deg, rgba(248, 250, 255, 0.95), rgba(240, 244, 255, 0.9));
}

.equipment-doc-card {
    border-width: 1px;
    box-shadow: 0 16px 30px rgba(44, 37, 27, 0.06);
}

.equipment-doc-card.is-general {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(245, 244, 239, 0.92));
}

.equipment-doc-card.is-photo {
    background: linear-gradient(150deg, rgba(242, 248, 255, 0.94), rgba(231, 240, 255, 0.96));
}

.equipment-doc-card.is-allocation {
    background: linear-gradient(150deg, rgba(246, 250, 255, 0.9), rgba(233, 242, 255, 0.94));
}

.equipment-doc-card.is-usage {
    background: linear-gradient(150deg, rgba(247, 255, 253, 0.9), rgba(233, 248, 243, 0.94));
}

.equipment-doc-card.is-maintenance {
    background: linear-gradient(150deg, rgba(255, 248, 244, 0.92), rgba(252, 236, 227, 0.94));
}

.equipment-doc-card.is-rental {
    background: linear-gradient(150deg, rgba(255, 250, 242, 0.92), rgba(248, 239, 221, 0.94));
}

.equipment-directory-shell .client-directory-grid {
    align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    justify-content: start;
}

.equipment-record-card {
    display: grid;
    gap: 0.9rem;
    width: 100%;
    max-width: 380px;
    border-left: 4px solid rgba(64, 54, 41, 0.16);
    content-visibility: auto;
    contain-intrinsic-size: 420px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(247, 241, 232, 0.9)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.06), transparent 36%);
}

.equipment-record-cover {
    position: relative;
    overflow: hidden;
    height: clamp(88px, 9vw, 118px);
    min-height: 88px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(226, 234, 245, 0.92), rgba(242, 237, 227, 0.9));
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.equipment-record-cover img,
.equipment-cover-preview img,
.equipment-photo-frame img,
.equipment-drawer-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipment-record-cover-fallback,
.equipment-drawer-cover.is-empty {
    display: grid;
    place-items: center;
    gap: 0.5rem;
    min-height: inherit;
    color: var(--muted);
    text-align: center;
}

.equipment-record-cover-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.equipment-record-card.status-available {
    border-left-color: #2d6a4f;
}

.equipment-record-card.status-in-use {
    border-left-color: #3558a2;
}

.equipment-record-card.status-reserved {
    border-left-color: #c67c22;
}

.equipment-record-card.status-maintenance,
.equipment-record-card.status-out-of-service {
    border-left-color: #b8472a;
}

.equipment-record-avatar,
.equipment-detail-avatar {
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(35, 95, 86, 0.96), rgba(26, 70, 63, 0.92));
    box-shadow: 0 14px 28px rgba(35, 95, 86, 0.16);
}

.project-directory-shell .client-directory-grid {
    align-items: stretch;
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    justify-content: start;
}

.project-record-card {
    display: grid;
    gap: 0.9rem;
    width: 100%;
    max-width: 380px;
    color: inherit;
    text-decoration: none;
    border-left: 4px solid rgba(64, 54, 41, 0.16);
    content-visibility: auto;
    contain-intrinsic-size: 300px;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(246, 241, 234, 0.92)),
        radial-gradient(circle at top right, rgba(53, 88, 162, 0.07), transparent 38%);
}

.project-record-card.status-bidding {
    border-left-color: #3558a2;
}

.project-record-card.status-active {
    border-left-color: #2d6a4f;
}

.project-record-card.status-completed {
    border-left-color: #25755c;
}

.project-record-card.status-on-hold {
    border-left-color: #c67c22;
}

.project-record-card.status-draft,
.project-record-card.status-review {
    border-left-color: #7c5f3f;
}

.status-badge.status-bidding {
    background: rgba(53, 88, 162, 0.12);
    color: #3558a2;
}

.status-badge.status-completed {
    background: rgba(37, 117, 92, 0.12);
    color: #25755c;
}

.status-badge.status-on-hold {
    background: rgba(198, 124, 34, 0.12);
    color: #b36f18;
}

.status-badge.status-draft,
.status-badge.status-review {
    background: rgba(124, 95, 63, 0.12);
    color: #7c5f3f;
}

.project-photo-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-photo-preview.is-empty {
    display: grid;
    place-items: center;
    gap: 0.55rem;
    min-height: inherit;
    color: var(--muted);
    text-align: center;
}

.project-record-avatar {
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(53, 88, 162, 0.96), rgba(33, 60, 123, 0.92));
    box-shadow: 0 14px 28px rgba(53, 88, 162, 0.16);
}

.project-record-summary {
    display: grid;
    gap: 0.18rem;
    margin-top: 0.8rem;
    padding: 0.82rem 0.88rem;
    border-radius: 16px;
    background: rgba(53, 88, 162, 0.08);
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.project-record-summary strong {
    font-size: 0.92rem;
    color: var(--text);
}

.project-record-summary span {
    color: var(--muted);
    font-size: 0.8rem;
}

.project-record-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.project-record-metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(64, 54, 41, 0.08);
    font-size: 0.8rem;
    color: var(--text);
}

.project-photo-preview {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border-radius: 18px;
    background:
        linear-gradient(160deg, rgba(225, 233, 245, 0.94), rgba(245, 238, 228, 0.92)),
        radial-gradient(circle at top right, rgba(35, 95, 86, 0.08), transparent 40%);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.project-photo-field {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.project-photo-block > span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.project-photo-preview {
    min-height: 132px;
}

.project-photo-field-controls {
    display: grid;
    gap: 0.65rem;
}

.project-photo-remove-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.project-photo-remove-toggle input {
    width: auto;
    margin: 0;
}

.equipment-record-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.equipment-record-metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(64, 54, 41, 0.08);
    font-size: 0.8rem;
    color: var(--text);
}

.equipment-location-spotlight {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    margin-top: 0.8rem;
    padding: 0.8rem 0.85rem;
    border-radius: 16px;
    background: rgba(35, 95, 86, 0.08);
    border: 1px solid rgba(35, 95, 86, 0.14);
}

.equipment-location-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.equipment-location-spotlight strong,
.equipment-location-spotlight span {
    display: block;
}

.equipment-location-spotlight strong {
    font-size: 0.9rem;
}

.equipment-location-spotlight span {
    margin-top: 0.16rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.equipment-maintenance-alert {
    display: inline-flex;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.equipment-maintenance-alert.is-overdue {
    background: rgba(184, 71, 42, 0.12);
    color: #b8472a;
}

.equipment-maintenance-alert.is-due-soon {
    background: rgba(198, 124, 34, 0.12);
    color: #b36f18;
}

.equipment-maintenance-alert.is-upcoming {
    background: rgba(35, 95, 86, 0.1);
    color: var(--accent);
}

.status-badge.status-available {
    background: rgba(45, 106, 79, 0.1);
    color: #2d6a4f;
}

.status-badge.status-in-use {
    background: rgba(53, 88, 162, 0.1);
    color: #3558a2;
}

.status-badge.status-reserved {
    background: rgba(198, 124, 34, 0.12);
    color: #b36f18;
}

.status-badge.status-maintenance,
.status-badge.status-out-of-service {
    background: rgba(184, 71, 42, 0.12);
    color: #b8472a;
}

.equipment-form-panels {
    display: grid;
    gap: 0.9rem;
}

.equipment-detail-grid,
.equipment-detail-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-photo-gallery {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.equipment-photo-gallery-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: flex-start;
}

@media (max-width: 1080px) {
    .equipment-profile-hero,
    .equipment-profile-grid,
    .equipment-profile-kpi-grid {
        grid-template-columns: 1fr;
    }

    .equipment-profile-meta-grid {
        grid-template-columns: 1fr;
    }
}

.equipment-cover-preview {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(245, 250, 255, 0.96), rgba(235, 242, 255, 0.92));
    border: 1px solid rgba(53, 88, 162, 0.12);
}

.equipment-cover-preview img {
    min-height: 210px;
    border-radius: 16px;
}

.equipment-cover-preview-copy {
    display: grid;
    align-content: start;
    gap: 0.6rem;
}

.equipment-cover-preview-copy p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.55;
}

.equipment-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.equipment-photo-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.equipment-photo-card.is-cover {
    border-color: rgba(35, 95, 86, 0.18);
    box-shadow: 0 16px 30px rgba(35, 95, 86, 0.08);
}

.equipment-photo-frame {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    min-height: 132px;
    border-radius: 16px;
    background: rgba(232, 239, 248, 0.92);
}

.equipment-photo-meta {
    display: grid;
    gap: 0.18rem;
}

.equipment-photo-meta span {
    color: var(--muted);
    font-size: 0.78rem;
}

.equipment-photo-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.equipment-cover-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(64, 54, 41, 0.08);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.equipment-cover-toggle input {
    margin: 0;
    accent-color: var(--accent);
}

.equipment-drawer-cover {
    overflow: hidden;
    justify-self: start;
    width: min(100%, 238px);
    height: 136px;
    min-height: 136px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(226, 234, 245, 0.92), rgba(242, 237, 227, 0.9));
}

.equipment-timeline {
    display: grid;
    gap: 0.85rem;
}

.equipment-timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
}

.equipment-timeline-mark {
    width: 12px;
    height: 12px;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: rgba(64, 54, 41, 0.18);
    box-shadow: 0 0 0 6px rgba(64, 54, 41, 0.05);
}

.equipment-timeline-mark.is-ready {
    background: #2d6a4f;
    box-shadow: 0 0 0 6px rgba(45, 106, 79, 0.12);
}

.equipment-timeline-mark.is-active {
    background: #3558a2;
    box-shadow: 0 0 0 6px rgba(53, 88, 162, 0.12);
}

.equipment-timeline-mark.is-watch {
    background: #c67c22;
    box-shadow: 0 0 0 6px rgba(198, 124, 34, 0.12);
}

.equipment-timeline-mark.is-risk {
    background: #b8472a;
    box-shadow: 0 0 0 6px rgba(184, 71, 42, 0.12);
}

.equipment-timeline-copy {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    background: rgba(250, 247, 241, 0.92);
    border: 1px solid rgba(64, 54, 41, 0.08);
}

.equipment-timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.equipment-timeline-head span,
.equipment-timeline-meta span,
.equipment-timeline-copy small {
    color: var(--muted);
    font-size: 0.78rem;
}

.equipment-timeline-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
}

.equipment-timeline-copy p {
    margin-bottom: 0;
    line-height: 1.5;
}

body.equipment-confirm-open {
    overflow: hidden;
}

.equipment-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    pointer-events: none;
}

.equipment-confirm-modal[hidden] {
    display: none;
}

.equipment-confirm-modal.is-open {
    pointer-events: auto;
}

.equipment-confirm-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(24, 20, 16, 0.34);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.equipment-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 28px;
    border: 1px solid rgba(64, 54, 41, 0.1);
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(248, 243, 235, 0.98));
    box-shadow: 0 28px 60px rgba(24, 20, 16, 0.22);
    transform: translateY(18px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.equipment-confirm-modal.is-open .equipment-confirm-backdrop {
    opacity: 1;
}

.equipment-confirm-modal.is-open .equipment-confirm-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.equipment-confirm-icon-wrap {
    display: flex;
    align-items: center;
}

.equipment-confirm-icon {
    display: inline-grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 20px;
    background: rgba(184, 71, 42, 0.12);
    color: #b8472a;
    box-shadow: inset 0 0 0 1px rgba(184, 71, 42, 0.08);
}

.equipment-confirm-icon svg {
    width: 20px;
    height: 20px;
}

.equipment-confirm-copy {
    display: grid;
    gap: 0.45rem;
}

.equipment-confirm-copy h3,
.equipment-confirm-copy p {
    margin: 0;
}

.equipment-confirm-copy h3 {
    font-size: 1.28rem;
}

.equipment-confirm-copy p:last-child {
    color: var(--muted);
    line-height: 1.55;
}

.equipment-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.equipment-confirm-actions .button,
.client-detail-drawer-actions .equipment-action-button,
.workflow-document-row .equipment-action-button {
    min-width: 126px;
}

@media (max-width: 1080px) {
    .app-shell,
    .auth-shell,
    .split-layout,
    .split-layout.wide-right,
    .stats-grid,
    .menu-preview,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .app-shell {
        display: grid;
        padding: 1rem;
    }

    .auth-brand {
        min-height: auto;
    }

    .architecture-visual {
        align-self: stretch;
        max-width: 560px;
    }

    .sidebar {
        order: 2;
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: auto;
        height: auto;
        max-height: none;
        overflow: hidden;
        overflow-y: visible;
    }

    .content {
        order: 1;
        margin-left: 0;
    }

    .dashboard-hero,
    .dashboard-grid-main,
    .dashboard-grid-priority,
    .dashboard-grid-secondary,
    .status-layout,
    .project-hub-top-grid,
    .foundation-brief-grid,
    .foundation-main-grid,
    .foundation-equipment-layout,
    .pricing-top-grid,
    .company-logo-upload-card,
    .equipment-hero-grid,
    .equipment-cover-preview {
        grid-template-columns: 1fr;
    }

    .pricing-section-tools {
        justify-items: stretch;
    }

    .workspace-grid,
    .workspace-metrics,
    .dashboard-hero-summary-grid,
    .dashboard-brief-grid {
        grid-template-columns: 1fr 1fr;
    }

    .project-team-flag-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-log-reference-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-hub-brief-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .client-contact-flag-grid,
    .client-contact-meta-grid,
    .client-contact-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foundation-equipment-head-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .app-shell,
    .auth-shell {
        padding: 1rem;
    }

    .auth-shell {
        gap: 1rem;
    }

    .auth-brand,
    .login-card {
        border-radius: 20px;
    }

    .architecture-visual {
        aspect-ratio: 1.35 / 1;
    }

    .auth-brand h1 {
        font-size: clamp(2rem, 12vw, 3rem);
    }

    .login-system-meta {
        grid-template-columns: 1fr;
    }

    .topbar,
    .section-head,
    .project-hero-head,
    .project-hero-actions,
    .project-card,
    .sheet-card,
    .info-row,
    .project-module-nav-head,
    .project-module-nav-actions,
    .project-module-shortcut-actions,
    .workflow-project-card-head,
    .workflow-entry-head,
    .workflow-document-row,
    .project-log-toolbar,
    .project-log-card-head,
    .project-team-toolbar,
    .project-team-card-head,
    .project-section-head-actions,
    .client-form-section-head,
    .client-contact-card-header,
    .equipment-panel-head,
    .equipment-panel-title-wrap,
    .equipment-doc-title,
    .equipment-photo-gallery-head,
    .equipment-timeline-head,
    .equipment-photo-actions,
    .equipment-confirm-actions,
    .foundation-card-toggle-summary,
    .foundation-equipment-preview-head,
    .foundation-equipment-entry-head,
    .foundation-subpanel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .project-hub-jump-nav {
        position: relative;
        top: auto;
        align-items: stretch;
    }

    .project-hub-jump-nav a {
        flex: 1 1 9rem;
        justify-content: center;
    }

    .project-hub-empty {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .project-section-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .project-workbook-upload .button {
        width: 100%;
    }

    .catalog-search-shell {
        grid-template-columns: 1fr;
    }

    .client-directory-grid,
    .project-record-metrics,
    .equipment-record-metrics,
    .equipment-detail-grid,
    .equipment-detail-metric-grid,
    .equipment-photo-grid,
    .workspace-grid,
    .workspace-metrics,
    .dashboard-hero-summary-grid,
    .client-compliance-grid,
    .client-multi-select-entry,
    .project-log-core-grid,
    .project-log-reference-grid,
    .project-log-recipient-grid,
    .project-workbook-upload,
    .project-hub-brief-grid,
    .project-team-flag-grid,
    .project-team-company-grid,
    .project-team-channel-grid,
    .client-contact-flag-grid,
    .client-contact-meta-grid,
    .client-contact-channel-grid,
    .foundation-form-grid,
    .foundation-project-grid,
    .foundation-takeoff-grid,
    .foundation-takeoff-metrics,
    .foundation-density-grid,
    .foundation-risk-grid,
    .foundation-equipment-form-grid,
    .pricing-custom-builder-grid,
    .pricing-custom-meta-grid,
    .pricing-controls-grid,
    .pricing-summary-grid,
    .pricing-section-controls,
    .workflow-project-financials {
        grid-template-columns: 1fr;
    }

    .equipment-directory-shell .client-directory-grid {
        grid-template-columns: 1fr;
    }

    .project-directory-shell .client-directory-grid {
        grid-template-columns: 1fr;
    }

    .foundation-brief-kpis {
        grid-template-columns: 1fr;
    }

    .foundation-card-toggle-label {
        align-self: flex-start;
    }

    .project-record-card,
    .equipment-record-card {
        max-width: none;
    }

    .project-photo-field {
        grid-template-columns: 1fr;
    }

    .pricing-segment-modal {
        padding: 1rem;
    }

    .client-filter-actions,
    .client-form-action-bar,
    .client-form-action-buttons {
        width: 100%;
    }

    .client-filter-actions,
    .client-form-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .client-filter-results {
        margin-left: 0;
        justify-content: center;
    }

    .pricing-segment-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pricing-segment-modal-card {
        max-height: min(92vh, 920px);
    }

    .pricing-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .pricing-add-segment-button {
        width: 100%;
        justify-content: center;
        min-height: 58px;
    }

    .equipment-confirm-actions .button {
        width: 100%;
    }

    .project-kpi-grid,
    .project-secondary-metrics,
    .project-module-nav-grid,
    .project-module-stat-grid {
        grid-template-columns: 1fr;
    }

    .project-hero-visual {
        min-height: 220px;
    }

    .project-hero-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-card-values {
        grid-template-columns: 1fr;
    }

    .project-module-shortcut {
        padding: 0.95rem;
    }

    .project-module-shortcut-meta {
        justify-content: flex-start;
    }

    .dashboard-signal-grid,
    .chart-axis,
    .skyline {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-hero h2 {
        font-size: 2.35rem;
    }

    .detail-grid-three,
    .detail-grid-four,
    .four-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .back-to-top-button {
        right: 1rem;
        bottom: 1rem;
        padding: 0.85rem;
    }

    .back-to-top-button span:last-child {
        display: none;
    }

    .dashboard-signal-grid,
    .chart-axis,
    .skyline,
    .workspace-grid,
    .workspace-metrics,
    .dashboard-hero-summary-grid,
    .dashboard-brief-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-orb-core {
        width: 154px;
        height: 154px;
    }

    .project-hero-head h2,
    .project-module-nav-head h2 {
        font-size: 1.55rem;
    }

    .project-hero-facts {
        grid-template-columns: 1fr;
    }

    .status-ring {
        width: 180px;
    }

    .detail-grid-three,
    .detail-grid-four,
    .four-grid,
    .foundation-summary-row {
        grid-template-columns: 1fr;
    }
}

