﻿:root {
    color-scheme: light;
    --bg: #eef3f4;
    --bg-2: #dfe9e8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --surface-2: #edf4f3;
    --glass: rgba(255, 255, 255, 0.58);
    --text: #17211f;
    --muted: #64716e;
    --line: rgba(46, 71, 68, 0.16);
    --primary: #0f766e;
    --primary-strong: #0b4f4a;
    --primary-soft: rgba(15, 118, 110, 0.12);
    --steel: #334155;
    --gold: #b7791f;
    --gold-soft: rgba(183, 121, 31, 0.14);
    --danger: #9f1239;
    --success: #047857;
    --radius: 8px;
    --button-height: 48px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.08);
}

/* Communications center visual unification: notifications and internal messages share one polished language. */
.comm-page,
.wa-page {
    --comm-navy: #0f2947;
    --comm-blue: #2563eb;
    --comm-teal: #0f766e;
    --comm-green: #059669;
    --comm-line: rgba(15, 41, 71, .14);
    --comm-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.comm-page :is(.comm-hero, .comm-filter, .notification-card, .comm-empty),
.wa-page :is(.wa-hero, .wa-filter, .wa-scope-strip, .wa-contacts, .wa-chat, .wa-modal-card) {
    border-radius: 10px !important;
    border: 1px solid var(--comm-line) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,250,252,.88)),
        radial-gradient(circle at 8% 12%, rgba(37, 99, 235, .08), transparent 32%),
        radial-gradient(circle at 92% 18%, rgba(15, 118, 110, .10), transparent 34%) !important;
    box-shadow: var(--comm-shadow) !important;
}

.comm-page .comm-hero,
.wa-page .wa-hero {
    min-height: 92px !important;
    padding: 18px 22px !important;
    overflow: hidden !important;
    position: relative !important;
}

.comm-page .comm-hero::before,
.wa-page .wa-hero::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--comm-blue), var(--comm-teal));
}

.comm-page .comm-hero h1,
.wa-page .wa-hero h1 {
    color: var(--comm-navy) !important;
    font-size: 23px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
}

.comm-page .comm-hero p,
.wa-page .wa-hero p {
    color: #52667a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.comm-page .comm-hero-icon,
.wa-page .wa-actions .primary-button,
.wa-page .wa-actions .link-button {
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, var(--comm-blue), var(--comm-teal)) !important;
    color: #fff !important;
    box-shadow: 0 13px 25px rgba(37, 99, 235, .18) !important;
}

.comm-page :is(.comm-filter label, .notification-copy h2),
.wa-page :is(.wa-filter label, .wa-panel-head h2, .wa-contact strong) {
    color: var(--comm-navy) !important;
}

.comm-page .comm-filter select,
.wa-page .wa-filter select,
.wa-page .wa-search input,
.wa-page .wa-form input,
.wa-page .wa-form select,
.wa-page .wa-form textarea,
.wa-page .wa-compose textarea {
    border: 1px solid rgba(15, 41, 71, .18) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #102a43 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 5px 12px rgba(15, 23, 42, .04) !important;
    font-weight: 850 !important;
}

.comm-page :is(.primary-button, .link-button),
.wa-page :is(.primary-button, .link-button, .wa-compose button, .wa-form-actions button) {
    min-height: 42px !important;
    border-radius: 8px !important;
    border-color: rgba(37, 99, 235, .38) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(37, 99, 235, .16) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.comm-page :is(.primary-button:hover, .link-button:hover),
.wa-page :is(.primary-button:hover, .link-button:hover, .wa-compose button:hover, .wa-form-actions button:hover) {
    border-color: rgba(15, 118, 110, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #0f766e 0%, #0f5f59 100%) !important;
    color: #fff !important;
}

.comm-page .comm-scope-strip,
.wa-page .wa-scope-strip,
.wa-page .wa-chip {
    border-color: rgba(15, 118, 110, .20) !important;
    background: linear-gradient(135deg, rgba(236,253,245,.95), rgba(240,253,250,.78)) !important;
    color: var(--comm-teal) !important;
}

.comm-page .comm-scope-strip strong,
.wa-page .wa-scope-strip strong,
.wa-page .wa-chip {
    background: linear-gradient(135deg, var(--comm-teal), var(--comm-green)) !important;
    color: #fff !important;
}

.comm-page .notification-card {
    border-inline-start-color: rgba(100, 116, 139, .68) !important;
}

.comm-page .notification-card.unread {
    border-inline-start-color: var(--comm-teal) !important;
    background:
        linear-gradient(135deg, #fff, rgba(236,253,245,.92)),
        radial-gradient(circle at 88% 10%, rgba(15,118,110,.10), transparent 30%) !important;
}

.comm-page .notification-icon,
.wa-page .wa-avatar {
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--comm-navy), var(--comm-blue)) !important;
    box-shadow: 0 9px 18px rgba(15, 41, 71, .16) !important;
}

.comm-page .notification-card.unread .notification-icon {
    background: linear-gradient(135deg, var(--comm-teal), var(--comm-blue)) !important;
}

.comm-page .notification-copy p,
.wa-page .wa-bubble p {
    color: #243b53 !important;
}

.comm-page .notification-meta span,
.wa-page .wa-contact span,
.wa-page .wa-bubble time {
    color: var(--comm-teal) !important;
    background: rgba(236, 253, 245, .88) !important;
}

.wa-page .wa-panel-head,
.wa-page .wa-modal-head {
    min-height: 54px !important;
    border-bottom: 1px solid rgba(15, 41, 71, .12) !important;
    background: linear-gradient(135deg, rgba(239,246,255,.96), rgba(236,253,245,.90)) !important;
}

.wa-page .wa-contact {
    border-bottom-color: rgba(15, 41, 71, .10) !important;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.wa-page .wa-contact:hover,
.wa-page .wa-contact.active {
    background: linear-gradient(135deg, rgba(239,246,255,.95), rgba(236,253,245,.82)) !important;
    box-shadow: inset 4px 0 0 var(--comm-blue) !important;
}

html[dir="rtl"] .wa-page .wa-contact:hover,
html[dir="rtl"] .wa-page .wa-contact.active {
    box-shadow: inset -4px 0 0 var(--comm-blue) !important;
}

.wa-page .wa-message-list {
    background:
        linear-gradient(180deg, rgba(248,250,252,.98), rgba(239,246,255,.74)),
        radial-gradient(circle at 12% 22%, rgba(15, 118, 110, .08), transparent 34%) !important;
}

.wa-page .wa-bubble {
    border-radius: 12px !important;
    border-color: rgba(15, 41, 71, .12) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06) !important;
}

.wa-page .wa-bubble.mine {
    border-color: rgba(15, 118, 110, .24) !important;
    background: linear-gradient(135deg, rgba(236,253,245,.98), rgba(240,253,250,.88)) !important;
}

.wa-page .wa-compose {
    border-top-color: rgba(15, 41, 71, .12) !important;
    background: linear-gradient(135deg, #fff, rgba(248,250,252,.92)) !important;
}

/* BOQ setup final overrides: proper analysis dropdown, orange finalization, navy tables. */
.boq-setup-page .boq-analysis-picker {
    position: relative !important;
    overflow: visible !important;
}

.boq-setup-page .boq-analysis-picker-button {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 42px !important;
    padding: 8px 11px !important;
    border: 1px solid rgba(15, 118, 110, .30) !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #fff, #f7fbfb) !important;
    color: #123046 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 6px 14px rgba(15,23,42,.06) !important;
    text-align: start !important;
    transform: none !important;
}

.boq-setup-page .boq-analysis-picker-button::after {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid #0f766e;
    border-block-end: 2px solid #0f766e;
    transform: rotate(45deg) translateY(-2px);
}

.boq-setup-page .boq-analysis-picker-button span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    color: #123046 !important;
}

.boq-setup-page .boq-analysis-menu {
    position: absolute !important;
    z-index: 3200 !important;
    inset-inline: 0 !important;
    top: calc(100% + 6px) !important;
    display: grid !important;
    gap: 6px !important;
    min-width: min(560px, 88vw) !important;
    max-height: 360px !important;
    padding: 9px !important;
    border: 1px solid rgba(15, 118, 110, .28) !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #fff, #f8fbfb) !important;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .22) !important;
    overflow-y: auto !important;
}

.boq-setup-page .boq-analysis-menu[hidden] {
    display: none !important;
}

.boq-setup-page .boq-analysis-menu .boq-analysis-search {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 0 4px !important;
    border: 1px solid rgba(15, 118, 110, .30) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #0f172a !important;
    box-shadow: 0 5px 12px rgba(15, 23, 42, .06) !important;
}

.boq-setup-page .boq-analysis-option {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 9px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #102a43 !important;
    box-shadow: none !important;
    text-align: start !important;
    transform: none !important;
}

.boq-setup-page .boq-analysis-option span {
    color: #102a43 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.45 !important;
    white-space: normal !important;
}

.boq-setup-page .boq-analysis-option strong {
    color: #0f766e !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

.boq-setup-page .boq-analysis-option:hover,
.boq-setup-page .boq-analysis-option.selected {
    border-color: rgba(5, 150, 105, .22) !important;
    background: linear-gradient(135deg, rgba(236,253,245,.95), rgba(240,253,250,.86)) !important;
}

.boq-setup-page .boq-analysis-option:hover span,
.boq-setup-page .boq-analysis-option.selected span,
.boq-setup-page .boq-analysis-option:hover strong,
.boq-setup-page .boq-analysis-option.selected strong {
    color: #047857 !important;
}

.boq-setup-page .boq-save-button,
.boq-setup-page [data-finalize-boq],
.boq-setup-page [data-finalize-confirm] {
    width: min(100%, 420px) !important;
    min-height: 46px !important;
    justify-content: center !important;
    border-color: rgba(245, 158, 11, .70) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.23), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 24px rgba(180, 83, 9, .24) !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-action-strip [data-finalize-boq] {
    min-width: 280px !important;
}

.boq-setup-page :is(.boq-main-table, .boq-document-table, .boq-summary-table, .boq-document-summary-table) thead th,
.boq-setup-page .boq-main-table tfoot th,
.boq-setup-page .boq-main-table tfoot td,
.boq-setup-page .boq-document-table tfoot th,
.boq-setup-page .boq-document-table tfoot td,
.boq-setup-page .boq-summary-table .grand th,
.boq-setup-page .boq-summary-table .grand td,
.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td,
.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td.boq-final-label,
.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand .num-cell {
    color: #fff !important;
    background: linear-gradient(180deg, #0f2947, #08294b) !important;
    border-color: #111827 !important;
    font-weight: 950 !important;
}

/* Technical office button unification: match the BOQ setup crystalline action style. */
:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .primary-button,
    .link-button,
    .cash-btn,
    .actual-log-button,
    button[type="submit"],
    button[type="button"]
) {
    min-height: 40px !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 15px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 9px 18px rgba(37, 99, 235, .18) !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 950 !important;
    text-decoration: none !important;
    white-space: normal !important;
    cursor: pointer;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .primary-button,
    .link-button,
    .cash-btn,
    .actual-log-button,
    button[type="submit"],
    button[type="button"]
):hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, .72) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 44%),
        linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        0 12px 22px rgba(37, 99, 235, .22) !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .primary-button,
    .link-button,
    .cash-btn,
    .actual-log-button,
    button[type="submit"],
    button[type="button"]
) svg {
    width: 16px !important;
    height: 16px !important;
    color: #fff !important;
    flex: 0 0 auto !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .boq-print-button,
    .print-button,
    .cash-print-button,
    [data-print],
    [data-print-takeoff],
    [data-print-report],
    a[href*="print"],
    button[onclick*="print"]
) {
    border-color: rgba(5, 150, 105, .54) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 9px 18px rgba(4, 120, 87, .18) !important;
    color: #fff !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .boq-save-button,
    [data-finalize-boq],
    .save-button,
    .button-save,
    button[name="finalize"],
    button[value="finalize"]
) {
    border-color: rgba(245, 158, 11, .62) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(180, 83, 9, .20) !important;
    color: #fff !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(
    .link-button.subtle,
    button.subtle,
    .subtle
) {
    border-color: rgba(37, 99, 235, .36) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(.icon-action, .action-icon) {
    display: inline-grid !important;
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 6px 12px rgba(37, 99, 235, .16) !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(.icon-action.print, .icon-action.analysis-print) {
    border-color: rgba(5, 150, 105, .54) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
}

:is(
    .project-technical-page,
    .resource-page,
    .analysis-page,
    .boq-setup-page,
    .boqs-page,
    .certificate-page,
    .material-takeoff-page,
    .schedule-page,
    .works-report-page,
    .cash-page,
    .cash-register-page,
    .ai-summary-page
) :is(.icon-action.danger, button.danger, a.danger, .link-button.danger, .primary-button.danger) {
    border-color: rgba(220, 38, 38, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    color: #fff !important;
}

.resource-page .category-tabs .category-tab {
    min-height: 38px !important;
    border-color: rgba(37, 99, 235, .34) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.28), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 7px 14px rgba(37, 99, 235, .14) !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.resource-page .category-tabs .category-tab:hover,
.resource-page .category-tabs .category-tab:focus-visible,
.resource-page .category-tabs .category-tab.active {
    border-color: rgba(245, 158, 11, .68) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #c2410c 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(194, 65, 12, .22) !important;
    transform: translateY(-1px);
}

.resource-page .category-tabs .category-tab.active {
    outline: 3px solid rgba(245, 158, 11, .18);
}

.resource-page .category-tabs .category-tab svg {
    color: #fff !important;
}

.boq-create-panel,
.boq-workspace,
.boq-editor-panel,
.boq-mini-panel,
.boq-summary-card {
    position: relative;
    overflow: visible;
}

.boq-create-form {
    display: grid;
    grid-template-columns: minmax(150px, .55fr) minmax(320px, 1.65fr) minmax(110px, .4fr) auto;
    gap: 14px;
    align-items: end;
}

.boq-create-form .wide {
    min-width: 0;
}

.boq-create-panel {
    padding: 18px 20px 20px;
    border: 1px solid rgba(14, 116, 144, .2);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(240, 249, 255, .72)),
        #fff;
    box-shadow: 0 16px 36px rgba(14, 116, 144, .09), inset 0 1px 0 #fff;
}

.boq-create-panel::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(180deg, #0f766e, #0284c7);
}

html[dir="rtl"] .boq-create-panel::before {
    border-radius: 0 8px 8px 0;
}

.boq-create-panel > h2 {
    margin: 0 0 15px;
    padding-block-end: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(14, 116, 144, .15);
    color: #164e63;
    font-size: 16px;
    line-height: 1.35;
}

.boq-create-panel > h2 svg {
    width: 19px;
    height: 19px;
}

.boq-create-form .field {
    gap: 6px;
}

.boq-create-form .field > span {
    color: #38566a;
    font-size: 11px;
    font-weight: 850;
}

.boq-create-form input,
.boq-create-form select {
    min-height: 44px;
    padding: 9px 11px;
    border-color: rgba(51, 65, 85, .2);
    font-size: 12px;
    font-weight: 750;
}

.boq-create-form .boq-auto-number {
    color: #075985;
    background:
        linear-gradient(135deg, rgba(224, 242, 254, .92), rgba(240, 253, 250, .94)),
        #f8fafc;
    border-color: rgba(2, 132, 199, .25);
    font-family: Consolas, "Courier New", monospace;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
}

.boq-create-form .primary-button {
    min-height: 44px;
    padding-inline: 18px;
    white-space: nowrap;
    font-size: 12px;
}

.app-content-banner-only > .shell > header.topbar > :first-child:has(h1),
.app-content-banner-only > .analysis-page > header.topbar > :first-child:has(h1),
.app-content-banner-only .material-takeoff-hero > div:first-child:has(h1),
.app-content-banner-only .works-report-hero > div:first-child:has(h1),
.app-content-banner-only .discipline-dashboard-hero > .discipline-dashboard-copy {
    display: none;
}

.app-content-banner-only .material-takeoff-hero,
.app-content-banner-only .works-report-hero {
    grid-template-columns: minmax(0, 1fr);
}

.app-content-banner-only .discipline-dashboard-hero {
    min-height: auto;
    justify-content: flex-end;
    padding-block: 15px;
}

.boq-cards-section {
    display: grid;
    gap: 14px;
    margin-block: 18px;
}

.boq-final-index-panel {
    margin-block-start: 18px;
}

.boq-index-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-block: 18px;
}

.boq-index-summary > div {
    min-height: 88px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .56)),
        linear-gradient(135deg, rgba(15, 118, 110, .11), rgba(51, 65, 85, .08));
    box-shadow: var(--shadow-soft), inset 0 1px 0 #fff;
}

.boq-index-summary small {
    align-self: end;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.boq-index-summary strong {
    grid-column: 3;
    grid-row: 1 / 3;
    color: var(--primary-strong);
    font-size: 30px;
    line-height: 1;
}

.boq-summary-icon {
    grid-row: 1 / 3;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--steel), #475569);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.boq-summary-icon.draft {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

.boq-summary-icon.final {
    background: linear-gradient(135deg, #047857, #10b981);
}

.boq-register-panel {
    margin-block: 18px;
    padding: 0;
    overflow: hidden;
    border-color: rgba(51, 65, 85, .16);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.boq-register-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(51, 65, 85, .15);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .58)),
        linear-gradient(90deg, rgba(245, 158, 11, .14), rgba(15, 118, 110, .08));
}

.boq-final-index-panel .boq-register-heading {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .6)),
        linear-gradient(90deg, rgba(16, 185, 129, .15), rgba(51, 65, 85, .08));
}

.boq-register-heading h2 {
    margin: 4px 0;
    color: var(--primary-strong);
    font-size: 18px;
}

.boq-register-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.boq-register-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #78350f;
    font-size: 12px;
    font-weight: 900;
}

.boq-register-kicker.final {
    color: #065f46;
}

.boq-register-wrap {
    overflow: visible;
}

.boq-register-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.boq-register-table th {
    padding: 11px 7px;
    border: 1px solid #17211f;
    color: #fff;
    background: linear-gradient(135deg, #334155, #0f766e);
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
}

.boq-draft-register .boq-register-table th {
    background: linear-gradient(135deg, #475569, #b45309);
}

.boq-register-table td {
    padding: 10px 7px;
    border: 1px solid rgba(23, 33, 31, .62);
    vertical-align: middle;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
}

.boq-register-table tbody tr {
    background: rgba(255, 255, 255, .82);
    transition: background .18s ease, box-shadow .18s ease;
}

.boq-register-table tbody tr:nth-child(even) {
    background: rgba(237, 244, 243, .74);
}

.boq-register-table tbody tr:hover {
    background: rgba(219, 234, 254, .66);
    box-shadow: inset 4px 0 0 #2563eb;
}

.boq-register-table th:nth-child(1),
.boq-register-table td:nth-child(1) { width: 4%; }
.boq-register-table th:nth-child(2),
.boq-register-table td:nth-child(2) { width: 11%; }
.boq-register-table th:nth-child(3),
.boq-register-table td:nth-child(3) { width: 22%; }
.boq-register-table th:nth-child(4),
.boq-register-table td:nth-child(4) { width: 11%; }
.boq-register-table th:nth-child(5),
.boq-register-table td:nth-child(5) { width: 8%; }
.boq-register-table th:nth-child(6),
.boq-register-table td:nth-child(6) { width: 13%; }
.boq-register-table th:nth-child(7),
.boq-register-table td:nth-child(7) { width: 7%; }
.boq-register-table th:nth-child(8),
.boq-register-table td:nth-child(8) { width: 10%; }
.boq-register-table th:nth-child(9),
.boq-register-table td:nth-child(9) { width: 14%; }

.boq-register-table .boq-desc-cell {
    text-align: start;
    overflow-wrap: anywhere;
}

.boq-row-number {
    color: var(--muted);
    font-weight: 900;
}

.boq-code {
    display: inline-block;
    color: #0b2f78;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.boq-table-status,
.boq-data-chip,
.boq-currency-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 27px;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.boq-table-status.draft {
    color: #78350f;
    border: 1px solid rgba(217, 119, 6, .3);
    background: rgba(245, 158, 11, .15);
}

.boq-table-status.final {
    color: #065f46;
    border: 1px solid rgba(5, 150, 105, .3);
    background: rgba(16, 185, 129, .14);
}

.boq-data-chip {
    color: var(--steel);
    background: rgba(51, 65, 85, .09);
}

.boq-currency-chip {
    color: #0b2f78;
    border: 1px solid rgba(37, 99, 235, .22);
    background: rgba(37, 99, 235, .09);
    letter-spacing: 0;
}

.boq-date {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.boq-register-actions {
    display: table-cell;
    gap: 5px;
    min-height: 48px;
    text-align: center;
    white-space: nowrap;
}

.boq-main-table td.boq-register-actions {
    display: table-cell;
    width: 14%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.boq-register-actions .icon-action {
    display: inline-flex;
    vertical-align: middle;
    margin-inline: 2px;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 6px;
}

.boq-register-actions .icon-action svg {
    width: 15px;
    height: 15px;
}

.boq-register-actions .icon-action.print {
    color: #065f46;
    border-color: rgba(5, 150, 105, .38);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .18)),
        rgba(16, 185, 129, .22);
}

.boq-final-index-panel .section-heading {
    margin-block-end: 12px;
}

.boq-final-table th {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, var(--steel), var(--primary-strong));
}

.boq-final-table tbody tr {
    background: rgba(255, 255, 255, .64);
}

.boq-final-table tbody tr:nth-child(even) {
    background: rgba(237, 244, 243, .72);
}

.empty-state.compact {
    min-height: 140px;
    display: grid;
    place-items: center;
    padding: 20px;
    border: 1px dashed rgba(15, 118, 110, .28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .55);
    color: var(--muted);
    font-weight: 900;
}

.boq-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.boq-card {
    min-height: 178px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .78);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .5)),
        linear-gradient(135deg, rgba(15, 118, 110, .11), rgba(183, 121, 31, .1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .92),
        0 16px 34px rgba(15, 23, 42, .1);
    position: relative;
    overflow: hidden;
}

.boq-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--steel));
}

.boq-card.active {
    border-color: rgba(15, 118, 110, .44);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 20px 42px rgba(15, 118, 110, .18);
}

.boq-card-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.boq-card-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.boq-card-body h3 {
    margin: 0;
    color: var(--primary-strong);
    font-size: 17px;
    line-height: 1.35;
}

.boq-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.boq-status {
    width: max-content;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--primary-strong);
    background: rgba(15, 118, 110, .12);
    font-size: 11px;
    font-weight: 900;
}

.boq-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.boq-card-meta span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .55);
    font-size: 11px;
    font-weight: 900;
}

.boq-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.boq-workspace {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.boq-workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(183, 121, 31, .1)),
        rgba(255, 255, 255, .62);
}

.boq-workspace-header h2 {
    margin: 6px 0 4px;
    color: var(--primary-strong);
    font-size: 24px;
}

.boq-workspace-header p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.boq-action-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(37, 99, 235, .2);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(15, 118, 110, .1)),
        rgba(255, 255, 255, .82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), var(--shadow-soft);
}

.boq-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.boq-management-actions {
    justify-content: flex-start;
}

.boq-print-actions {
    justify-content: flex-end;
    margin-inline-start: auto;
    padding-inline-start: 14px;
    border-inline-start: 1px solid rgba(15, 118, 110, .18);
}

.boq-action-strip-final .link-button {
    min-height: 44px;
    padding-inline: 14px;
    font-size: 11px;
    font-weight: 900;
}

.boq-action-strip-final .link-button svg {
    width: 17px;
    height: 17px;
}

.boq-action-strip-final {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    direction: ltr;
}

.boq-action-strip-final .boq-management-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
}

.boq-action-strip-final .boq-print-actions {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    margin: 0;
    padding: 0 14px 0 0;
    border-inline-start: 0;
    border-right: 1px solid rgba(15, 118, 110, .18);
}

html[dir="rtl"] .boq-action-strip-final .boq-action-group {
    direction: rtl;
}

.boq-action-strip-final .boq-print-actions .boq-print-button {
    min-width: 158px;
    justify-content: center;
    color: #fff;
    border-color: rgba(5, 150, 105, .72);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .04)),
        linear-gradient(135deg, #047857, #10b981);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .46),
        0 10px 24px rgba(4, 120, 87, .22);
}

.boq-action-strip-final .boq-management-actions .boq-certificates-button {
    color: #fff;
    border-color: rgba(37, 99, 235, .7);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, .04)),
        linear-gradient(135deg, #1d4ed8, #0284c7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .42),
        0 10px 24px rgba(29, 78, 216, .2);
}

.boq-toolbar,
.boq-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    justify-content: flex-end;
}

.boq-form-actions {
    grid-column: 1 / -1;
    justify-content: center;
    padding-block-start: 4px;
}

.boq-form-actions .primary-button {
    width: min(460px, 100%);
}

.boq-form-actions .link-button.subtle {
    min-width: 150px;
}

.boq-title-form {
    display: grid;
    grid-template-columns:
        minmax(130px, .62fr)
        minmax(280px, 1.75fr)
        minmax(92px, .42fr)
        minmax(170px, .72fr);
    gap: 10px;
    align-items: end;
}

.boq-title-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border: 1px solid rgba(44, 62, 80, .2);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .92)),
        linear-gradient(135deg, rgba(44, 62, 80, .07), rgba(15, 118, 110, .05));
    box-shadow: var(--shadow-soft);
}

.boq-title-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, #2c3e50, #0f766e);
}

.boq-title-card h3 {
    margin: 0 0 13px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    border-bottom: 1px solid rgba(44, 62, 80, .13);
    font-size: 17px;
    font-weight: 900;
}

.boq-title-card h3 svg {
    width: 18px;
    height: 18px;
    color: #0f766e;
}

.boq-title-form .field {
    min-width: 0;
    gap: 5px;
    font-size: 12px;
}

.boq-title-form .field > span {
    color: #4a5568;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.boq-title-form input,
.boq-title-form select {
    width: 100%;
    min-width: 0;
    height: var(--button-height);
    min-height: var(--button-height);
    padding-inline: 10px;
    border-color: #cbd5e0;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}

.boq-title-form input:focus,
.boq-title-form select:focus {
    border-color: #0f766e;
    outline: 3px solid rgba(15, 118, 110, .11);
}

.boq-title-form .link-button {
    width: 100%;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
}

.boq-title-form .link-button svg {
    width: 16px;
    height: 16px;
}

.boq-workspace > .boq-title-card,
.boq-workspace > .boq-editor-grid,
.boq-workspace > .boq-print-details {
    margin-block-start: 2px;
}

.boq-workspace .boq-editor-panel,
.boq-workspace .boq-mini-panel,
.boq-workspace .boq-summary-card {
    border-color: rgba(44, 62, 80, .18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .9)),
        linear-gradient(135deg, rgba(15, 118, 110, .045), rgba(183, 121, 31, .035));
}

.boq-workspace .boq-editor-panel > h3,
.boq-workspace .boq-mini-panel > h3,
.boq-workspace .boq-summary-card > h3 {
    min-height: 29px;
    margin-bottom: 13px;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(44, 62, 80, .13);
    color: #2c3e50;
    font-size: 15px;
    font-weight: 900;
}

.boq-workspace .boq-editor-panel > h3 svg,
.boq-workspace .boq-mini-panel > h3 svg,
.boq-workspace .boq-summary-card > h3 svg {
    width: 18px;
    height: 18px;
    color: #0f766e;
}

.boq-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.boq-editor-panel,
.boq-mini-panel,
.boq-summary-card {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58)),
        linear-gradient(135deg, rgba(15, 118, 110, .05), rgba(183, 121, 31, .04));
    box-shadow: var(--shadow-soft);
}

.boq-editor-panel {
    width: 100%;
    padding: 16px;
}

.boq-item-entry-panel {
    padding-bottom: 18px;
}

.boq-items-table-panel {
    padding-top: 16px;
}

.boq-editor-panel h3,
.boq-mini-panel h3,
.boq-summary-card h3 {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-strong);
    font-size: 17px;
}

.boq-item-form {
    display: grid;
    grid-template-columns:
        minmax(72px, .42fr)
        minmax(330px, 2.5fr)
        minmax(62px, .34fr)
        minmax(76px, .42fr)
        minmax(92px, .56fr)
        minmax(100px, .62fr);
    gap: 9px;
    align-items: end;
    margin-block-end: 0;
    padding: 10px 12px;
    border: 1.4px solid rgba(17, 24, 39, .2);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .52)),
        linear-gradient(135deg, rgba(15, 118, 110, .06), rgba(183, 121, 31, .05));
}

.boq-item-form .field {
    gap: 5px;
    font-size: 12px;
}

.boq-item-form input,
.boq-item-form select {
    min-height: 38px;
    height: 38px;
    padding-inline: 8px;
    font-size: 12px;
    font-weight: 800;
}

.boq-item-form input[readonly] {
    direction: ltr;
    color: #1f4f46;
    border-color: rgba(15, 118, 110, .28);
    background: linear-gradient(180deg, #f0fdf9, #ecf8f5);
    font-family: "Courier New", monospace;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
    cursor: default;
}

.analysis-select-field {
    min-width: 0;
}

.boq-analysis-search {
    margin-block-end: 4px;
}

.boq-analysis-picker {
    position: relative;
    z-index: 60;
}

.boq-analysis-picker-button {
    width: 100%;
    min-height: var(--button-height);
    border: 1px solid rgba(29, 78, 216, 0.38);
    border-radius: var(--radius);
    padding: 8px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.3), rgba(14, 165, 233, 0.2));
    color: #0b2f78;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 -10px 18px rgba(255, 255, 255, 0.1),
        0 10px 22px rgba(37, 99, 235, 0.12);
    backdrop-filter: blur(12px);
}

.boq-analysis-picker-button span,
.boq-analysis-option span {
    min-width: 0;
    text-align: start;
}

.boq-analysis-picker-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boq-analysis-option span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.boq-analysis-picker-button strong,
.boq-analysis-option strong {
    color: var(--primary-strong);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.boq-analysis-menu {
    position: absolute;
    inset-inline: 0;
    inset-block-start: calc(100% + 5px);
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1.5px solid rgba(15, 118, 110, .28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 50px rgba(15, 23, 42, .18);
    z-index: 90;
}

.boq-analysis-option {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
}

.boq-analysis-option strong {
    padding-block-start: 2px;
}

.boq-analysis-option:hover,
.boq-analysis-option.selected {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.boq-analysis-empty {
    padding: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.boq-table-wrap {
    overflow-x: visible;
    width: 100%;
}

.boq-main-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11.5px;
    min-width: 0;
}

.boq-main-table th,
.boq-main-table td {
    border: 1.5px solid #111827;
    padding: 7px 6px;
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.boq-main-table th {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-weight: 900;
    font-size: 11px;
}

.boq-main-table tfoot th,
.boq-main-table tfoot td {
    background: rgba(245, 158, 11, .34);
    color: #000;
    font-weight: 900;
}

.boq-desc-cell {
    text-align: start !important;
    font-weight: 750;
}

.boq-main-table th:nth-child(1),
.boq-main-table td:nth-child(1) {
    width: 10%;
}

.boq-main-table th:nth-child(2),
.boq-main-table td:nth-child(2) {
    width: 39%;
}

.boq-main-table th:nth-child(3),
.boq-main-table td:nth-child(3) {
    width: 8%;
}

.boq-main-table th:nth-child(4),
.boq-main-table td:nth-child(4) {
    width: 10%;
}

.boq-main-table th:nth-child(5),
.boq-main-table td:nth-child(5),
.boq-main-table th:nth-child(6),
.boq-main-table td:nth-child(6) {
    width: 12%;
}

.boq-actions-col {
    width: 10%;
}

.boq-main-table td.action-icons {
    padding: 5px 4px;
    overflow-wrap: normal;
}

.boq-main-table .action-icons {
    min-width: 76px;
}

.boq-main-table.boq-register-table th:nth-child(1),
.boq-main-table.boq-register-table td:nth-child(1) { width: 4%; }
.boq-main-table.boq-register-table th:nth-child(2),
.boq-main-table.boq-register-table td:nth-child(2) { width: 11%; }
.boq-main-table.boq-register-table th:nth-child(3),
.boq-main-table.boq-register-table td:nth-child(3) { width: 22%; }
.boq-main-table.boq-register-table th:nth-child(4),
.boq-main-table.boq-register-table td:nth-child(4) { width: 11%; }
.boq-main-table.boq-register-table th:nth-child(5),
.boq-main-table.boq-register-table td:nth-child(5) { width: 8%; }
.boq-main-table.boq-register-table th:nth-child(6),
.boq-main-table.boq-register-table td:nth-child(6) { width: 13%; }
.boq-main-table.boq-register-table th:nth-child(7),
.boq-main-table.boq-register-table td:nth-child(7) { width: 7%; }
.boq-main-table.boq-register-table th:nth-child(8),
.boq-main-table.boq-register-table td:nth-child(8) { width: 10%; }
.boq-main-table.boq-register-table th:nth-child(9),
.boq-main-table.boq-register-table td:nth-child(9) { width: 14%; }

.boq-main-table .action-icons .icon-action {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    aspect-ratio: 1 / 1;
    border-radius: 7px;
    flex: 0 0 30px;
}

.boq-main-table .action-icons .icon-action svg {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

.boq-calculation-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    position: static;
    top: auto;
    align-items: start;
}

.boq-addition-form,
.boq-tax-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(120px, .28fr) auto;
    gap: 8px;
    align-items: end;
}

.boq-tax-form {
    grid-template-columns: minmax(160px, 240px) auto;
    justify-content: start;
}

.boq-addition-form button,
.boq-tax-form button {
    justify-content: center;
}

.boq-empty-line {
    color: var(--muted);
    font-weight: 900;
}

.boq-additions-wrap {
    margin-block-start: 10px;
}

.boq-additions-table th:nth-child(1),
.boq-additions-table td:nth-child(1) {
    width: 52%;
}

.boq-additions-table th:nth-child(2),
.boq-additions-table td:nth-child(2),
.boq-additions-table th:nth-child(3),
.boq-additions-table td:nth-child(3) {
    width: 16%;
}

.boq-summary-card {
    align-self: stretch;
}

.boq-summary-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border-radius: var(--radius);
}

.boq-summary-table th,
.boq-summary-table td {
    border: 1.5px solid #111827;
    padding: 9px 10px;
    text-align: center;
    font-weight: 900;
}

.boq-summary-table th {
    width: 62%;
    color: var(--text);
    background: linear-gradient(180deg, rgba(237, 244, 243, .95), rgba(255, 255, 255, .85));
}

.boq-summary-table td {
    color: var(--primary-strong);
    background: #fff;
    font-variant-numeric: tabular-nums;
}

.boq-summary-table .grand th,
.boq-summary-table .grand td {
    background: rgba(245, 158, 11, .38);
    color: #000;
    font-size: 16px;
}

.boq-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background:
        radial-gradient(circle at 30% 20%, rgba(37, 99, 235, .18), transparent 32%),
        rgba(15, 23, 42, .38);
    backdrop-filter: blur(10px);
}

.boq-modal-backdrop[hidden] {
    display: none !important;
}

.boq-finalize-modal {
    width: min(100%, 560px);
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .76)),
        linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(245, 158, 11, .1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .98),
        0 28px 80px rgba(15, 23, 42, .26);
}

.boq-modal-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #0f2f72;
    border: 1px solid rgba(37, 99, 235, .34);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .28)),
        linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(14, 165, 233, .18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96);
}

.boq-modal-copy h2 {
    margin: 0 0 8px;
    color: #0f2f72;
    font-size: 22px;
}

.boq-modal-copy p {
    margin: 0;
    color: var(--text);
    line-height: 1.8;
    font-weight: 800;
}

.boq-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgba(46, 71, 68, .14);
    padding-top: 14px;
}

.boq-live-message {
    margin-block: 10px;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .boq-editor-grid {
        grid-template-columns: 1fr;
    }

    .boq-title-form {
        grid-template-columns: minmax(130px, .65fr) minmax(260px, 1.55fr) minmax(100px, .45fr);
    }

    .boq-title-form .link-button {
        grid-column: 1 / -1;
        width: min(100%, 320px);
        justify-self: center;
    }

    .boq-calculation-panel {
        position: static;
    }

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

@media (max-width: 760px) {
    .boq-index-summary {
        grid-template-columns: 1fr;
    }

    .boq-register-wrap {
        padding: 10px;
    }

    .boq-print-register .boq-register-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .boq-register-count {
        min-width: 94px;
    }

    .boq-print-register .boq-register-wrap {
        padding: 12px;
    }

    .boq-register-table,
    .boq-register-table tbody,
    .boq-register-table tr,
    .boq-register-table td {
        display: block;
        width: 100%;
    }

    .boq-register-table thead {
        display: none;
    }

    .boq-register-table tbody tr {
        margin-block-end: 12px;
        border: 1px solid rgba(51, 65, 85, .22);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--shadow-soft);
    }

    .boq-register-table td {
        display: grid;
        grid-template-columns: minmax(105px, 36%) 1fr;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        border-width: 0 0 1px;
        text-align: start;
    }

    .boq-register-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 900;
    }

    .boq-register-table td:last-child {
        border-bottom: 0;
    }

    .boq-register-actions {
        justify-content: flex-start;
    }

    .boq-create-form,
    .boq-title-form,
    .boq-item-form,
    .boq-workspace-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .boq-toolbar,
    .boq-form-actions,
    .boq-action-strip,
    .boq-modal-actions {
        justify-content: stretch;
    }

    .boq-action-strip {
        display: grid;
    }

    .boq-action-strip-final {
        grid-template-columns: 1fr;
    }

    .boq-action-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .boq-print-actions {
        margin-inline-start: 0;
        padding-inline-start: 0;
        padding-block-start: 10px;
        border-inline-start: 0;
        border-block-start: 1px solid rgba(15, 118, 110, .18);
    }

    .boq-action-strip-final .boq-management-actions,
    .boq-action-strip-final .boq-print-actions {
        grid-column: 1;
    }

    .boq-action-strip-final .boq-management-actions {
        grid-row: 1;
    }

    .boq-action-strip-final .boq-print-actions {
        grid-row: 2;
        padding: 10px 0 0;
        border-right: 0;
        border-block-start: 1px solid rgba(15, 118, 110, .18);
    }

    .boq-toolbar a,
    .boq-form-actions button,
    .boq-action-strip a,
    .boq-action-strip button,
    .boq-modal-actions button {
        width: 100%;
        justify-content: center;
    }
}

.side-site-discipline-workspace .side-workspace-link.inventory{border-color:rgba(180,83,9,.28);background:linear-gradient(135deg,rgba(255,247,237,.92),rgba(254,243,199,.62));color:#7c2d12}.side-site-discipline-workspace .side-workspace-link.inventory svg{color:#d97706}.side-site-discipline-workspace .side-workspace-link.inventory.active{border-color:rgba(180,83,9,.58);background:linear-gradient(135deg,#b45309,#f59e0b);color:#fff;box-shadow:0 10px 22px rgba(180,83,9,.22)}.side-site-discipline-workspace .side-workspace-link.inventory.active svg{color:#fff7ed}
.inventory-page{display:grid;gap:14px}.inventory-hero{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:14px;align-items:stretch;border:1px solid rgba(180,83,9,.18);border-radius:8px;padding:14px;background:linear-gradient(135deg,rgba(255,247,237,.96),rgba(240,253,250,.88)),radial-gradient(circle at 12% 15%,rgba(245,158,11,.16),transparent 34%);box-shadow:0 18px 38px rgba(15,23,42,.08)}.inventory-hero>div:first-child{min-width:0}.inventory-hero span,.inventory-panel-head>span{display:inline-flex;align-items:center;gap:7px;color:#92400e;font-size:11px;font-weight:950}.inventory-hero span svg,.inventory-panel-head svg{width:17px;height:17px}.inventory-hero h1{margin:7px 0 5px;color:#17324d;font-size:22px;line-height:1.25}.inventory-hero p{margin:0;max-width:900px;color:#475569;font-size:12px;font-weight:750;line-height:1.7}.inventory-hero form{display:grid;align-content:center;border:1px solid rgba(14,116,144,.16);border-radius:8px;padding:10px;background:rgba(255,255,255,.76)}.inventory-hero label,.inventory-stock-form label,.inventory-notes-field{display:grid;gap:5px}.inventory-hero label>span,.inventory-stock-form label>span,.inventory-notes-field>span{color:#334155;font-size:10px;font-weight:900}.inventory-hero select,.inventory-stock-form select,.inventory-stock-form input,.inventory-notes-field textarea,.inventory-issue-input{width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:8px 9px;background:#fff;color:#0f172a;font-size:11px;font-weight:800}.inventory-alert{border-radius:8px;padding:10px 12px;font-size:12px;font-weight:900}.inventory-alert.success{border:1px solid rgba(22,163,74,.26);background:#dcfce7;color:#166534}.inventory-alert.error{border:1px solid rgba(220,38,38,.24);background:#fee2e2;color:#991b1b}
.inventory-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.inventory-stats article{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:9px;min-height:78px;border:1px solid rgba(148,163,184,.28);border-radius:8px;padding:10px;background:rgba(255,255,255,.88);box-shadow:0 12px 28px rgba(15,23,42,.07)}.inventory-stats article>span{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;color:#fff}.inventory-stats .teal{background:#0f766e}.inventory-stats .blue{background:#2563eb}.inventory-stats .orange{background:#d97706}.inventory-stats .red{background:#dc2626}.inventory-stats .violet{background:#7c3aed}.inventory-stats svg{width:18px;height:18px}.inventory-stats small{display:block;grid-column:2;color:#64748b;font-size:10px;font-weight:900}.inventory-stats strong{display:block;grid-column:2;color:#132f4c;font-size:18px;font-weight:950;white-space:nowrap}.inventory-stock-panel,.inventory-materials-panel,.inventory-requests-panel,.inventory-transactions-panel{border:1px solid rgba(180,83,9,.16);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,247,237,.72))}.inventory-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.inventory-panel-head strong{border:1px solid rgba(13,148,136,.18);border-radius:999px;padding:5px 9px;color:#0f766e;background:rgba(204,251,241,.7);font-size:10px}.inventory-stock-form{display:grid;grid-template-columns:minmax(240px,1fr) 150px minmax(220px,1fr) auto;gap:10px;align-items:end}.inventory-button{min-height:38px;border-color:rgba(180,83,9,.28);background:linear-gradient(135deg,#d97706,#f59e0b);color:#fff;box-shadow:0 10px 20px rgba(217,119,6,.22)}.inventory-button svg{width:16px;height:16px}
.inventory-table-wrap{width:100%;overflow-x:auto;border:1px solid #111827;border-radius:7px;background:#fff}.inventory-table{width:100%;min-width:1180px;border-collapse:collapse;table-layout:fixed}.inventory-table.compact{min-width:940px}.inventory-table th,.inventory-table td{border:1px solid #111827;padding:7px 6px;color:#0f172a;font-size:10.5px;font-weight:750;line-height:1.45;vertical-align:middle;text-align:center;overflow-wrap:anywhere}.inventory-table th{background:linear-gradient(180deg,#0f3b66,#08294b);color:#fff;font-size:10px;font-weight:950}.inventory-table tbody tr:nth-child(even) td{background:rgba(248,250,252,.78)}.inventory-table .number{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:900}.inventory-table .required{color:#b45309}.inventory-material-name{text-align:start!important}.inventory-material-name svg{width:15px;height:15px;margin-inline-end:5px;color:#d97706;vertical-align:middle}.inventory-status,.inventory-request-status{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:88px;border-radius:999px;padding:5px 7px;font-size:9.5px;font-weight:950}.inventory-status.ok,.inventory-request-status.issued{background:#dcfce7;color:#166534}.inventory-status.low,.inventory-request-status.partially_issued{background:#fef3c7;color:#92400e}.inventory-status.critical,.inventory-status.empty,.inventory-request-status.pending_approval{background:#fee2e2;color:#991b1b}.inventory-request-status.approved{background:#dbeafe;color:#1e40af}.stock-status-critical td,.stock-status-empty td{background:rgba(254,226,226,.72)!important}.stock-status-low td{background:rgba(254,243,199,.58)!important}.inventory-issue-input{max-width:105px;margin:auto;padding:6px;text-align:center}.inventory-notes-field{margin-top:10px}.inventory-request-items{display:grid;gap:4px;text-align:start}.inventory-request-items span{border-radius:5px;padding:4px 6px;background:#f8fafc;color:#334155;font-size:10px;font-weight:850}.inventory-requests-panel .table-actions.compact{display:inline-flex;gap:5px;justify-content:center;align-items:center}.inventory-requests-panel .table-actions form{margin:0}
.inventory-timeline{display:grid;gap:8px}.inventory-timeline article{display:grid;grid-template-columns:34px minmax(0,1fr);gap:9px;align-items:center;border:1px solid rgba(148,163,184,.24);border-radius:8px;padding:8px;background:rgba(255,255,255,.82)}.inventory-timeline article>span{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;color:#fff;background:#0f766e}.inventory-timeline article>span.issue_out{background:#d97706}.inventory-timeline strong{display:block;color:#17324d;font-size:11px;font-weight:950}.inventory-timeline small{display:block;margin-top:3px;color:#64748b;font-size:9.5px;font-weight:800}.inventory-empty,.inventory-muted{display:grid;place-items:center;gap:8px;padding:20px;color:#64748b;font-weight:900;text-align:center}
@media (max-width:1100px){.inventory-hero,.inventory-stock-form{grid-template-columns:1fr}.inventory-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, var(--bg) 0%, #f8faf9 48%, var(--bg-2) 100%);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
}

html[lang="ar"] body {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.app-shell {
    width: min(1540px, calc(100% - 28px));
    margin-inline: auto;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    padding-block: 18px 28px;
    position: relative;
}

html[dir="ltr"] .app-shell {
    grid-template-columns: 360px minmax(0, 1fr);
}

html[dir="ltr"] .side-nav {
    grid-column: 1;
}

html[dir="ltr"] .app-content {
    grid-column: 2;
}

html[dir="rtl"] .side-nav {
    grid-column: 1;
}

html[dir="rtl"] .app-content {
    grid-column: 2;
}

.app-content {
    min-width: 0;
}

.app-content .shell {
    width: 100%;
    padding-block-start: 18px;
}

.side-nav {
    position: sticky;
    top: 18px;
    align-self: start;
    height: calc(100vh - 36px);
    min-height: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.06), rgba(183, 121, 31, 0.05));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 18px 44px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(20px);
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    max-height: calc(100vh - 36px);
    overflow: visible;
}

.side-quick-rail {
    grid-column: 1;
    grid-row: 1 / 3;
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: visible;
    padding: 7px 5px;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(15, 41, 71, .94), rgba(15, 118, 110, .86)),
        #0f2947;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 14px 30px rgba(15, 23, 42, .14);
    position: relative;
    z-index: 5;
}

.side-brand,
.side-nav nav {
    grid-column: 2;
    min-width: 0;
}

.side-brand {
    grid-row: 1;
    min-height: 0;
}

.side-nav nav {
    grid-row: 2;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.side-quick-form {
    display: contents;
}

.side-quick-action {
    position: relative;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    color: rgba(255, 255, 255, .9);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.side-quick-action svg {
    width: 18px;
    height: 18px;
}

.side-quick-action:hover,
.side-quick-action.active {
    color: #fff;
    border-color: rgba(125, 211, 252, .62);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .04)),
        linear-gradient(135deg, #0ea5e9, #0f766e);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .32),
        0 10px 20px rgba(14, 165, 233, .22);
    transform: translateY(-1px);
}

.side-quick-action.active-soft {
    border-color: rgba(16, 185, 129, .42);
    color: #d1fae5;
    background:
        linear-gradient(145deg, rgba(16, 185, 129, .22), rgba(255, 255, 255, .04));
}

.side-quick-action.muted {
    opacity: .86;
}

.side-quick-action.danger {
    margin-block-start: auto;
    color: #fecaca;
    border-color: rgba(248, 113, 113, .22);
    background:
        linear-gradient(145deg, rgba(248, 113, 113, .14), rgba(255, 255, 255, .03));
}

.side-quick-action.danger:hover {
    color: #fff;
    border-color: rgba(248, 113, 113, .68);
    background:
        linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow: 0 10px 20px rgba(220, 38, 38, .22);
}

.side-quick-action b {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -5px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #0f2947;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 9px;
    font-weight: 950;
    line-height: 1;
}

.side-quick-action b[data-count="0"] {
    display: none;
}

.side-quick-action::after {
    content: attr(title);
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: calc(100% + 10px);
    transform: translateY(-50%) scale(.96);
    min-width: max-content;
    max-width: 220px;
    padding: 6px 8px;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 8px;
    color: #0f172a;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
    z-index: 30;
}

html[dir="rtl"] .side-quick-action::after {
    inset-inline-start: auto;
    inset-inline-end: calc(100% + 10px);
}

.side-quick-action:hover::after,
.side-quick-action:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.side-brand {
    display: grid;
    gap: 8px;
}

.side-brand .brand-mark {
    margin-block-end: 6px;
}

.side-brand strong {
    color: var(--primary-strong);
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: 0;
}

.side-project-brand {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding: 11px;
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.78);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.11), rgba(183, 121, 31, 0.1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    position: relative;
}

.side-project-brand::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--steel));
}

.side-project-logo {
    width: 100%;
    min-height: 68px;
    height: auto;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.side-project-logo img {
    width: 100%;
    height: auto;
    max-height: 112px;
    object-fit: contain;
    display: block;
    background: #fff;
}

.side-project-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.side-project-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.side-project-copy strong {
    color: var(--primary-strong);
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-user-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background: rgba(240, 253, 250, .74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.side-user-card > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #065f46);
}

.side-user-card svg {
    width: 17px;
    height: 17px;
}

.side-user-card div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.side-user-card strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-user-card small {
    overflow: hidden;
    color: #0f766e;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav nav {
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    padding-inline-end: 5px;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    overflow-anchor: none;
}

.js .side-nav nav {
    opacity: 0;
}

.js .side-nav nav.is-position-restored {
    opacity: 1;
}

.side-link,
.side-sub-link,
.side-child-link,
.side-group summary,
.side-language-switch button,
.side-logout button {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-weight: 820;
    letter-spacing: 0;
    line-height: 1.25;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.side-link,
.side-group summary,
.side-language-switch button,
.side-logout button {
    padding: 9px 10px;
}

.side-link,
.side-group summary {
    min-height: 37px;
    color: #12315f;
    font-size: 12.5px;
    font-weight: 850;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.24)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 118, 110, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 7px 16px rgba(15, 23, 42, 0.055);
    backdrop-filter: blur(12px);
}

.side-link svg,
.side-sub-link svg,
.side-child-link svg,
.side-group summary svg,
.side-resource-link svg,
.side-language-switch button svg,
.side-logout button svg {
    width: 16px;
    height: 16px;
}

.side-group summary .side-chevron {
    width: 14px;
    height: 14px;
    color: #426282;
}

.side-link:hover,
.side-sub-link:hover,
.side-group summary:hover,
.side-child-link:hover,
.side-resource-link:hover {
    transform: none;
    color: #08245d;
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -8px 16px rgba(255, 255, 255, 0.14),
        0 10px 20px rgba(37, 99, 235, 0.1);
}

.side-link.active,
.side-sub-link.active,
.side-child-link.active {
    color: #08245d;
    border-color: rgba(37, 99, 235, 0.48);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.46), rgba(14, 165, 233, 0.3));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 10px 22px rgba(37, 99, 235, 0.16);
}

.side-branch .side-child-link.active {
    color: #053d30;
    border-color: rgba(15, 118, 110, 0.54);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.5), rgba(16, 185, 129, 0.34));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 10px 22px rgba(15, 118, 110, 0.18);
}

.side-group {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
}

.side-group:has(.active) {
    border-color: rgba(15, 118, 110, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.055), rgba(183, 121, 31, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.side-group summary {
    cursor: pointer;
    justify-content: space-between;
    list-style: none;
    position: relative;
    overflow: hidden;
}

.side-group summary::before {
    content: "";
    width: 4px;
    align-self: stretch;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.72), rgba(15, 118, 110, 0.44));
}

html[dir="rtl"] .side-group summary::before {
    order: 3;
}

.side-group:has(.active) summary::before {
    background: linear-gradient(180deg, #2563eb, #0f766e, #b7791f);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.07);
}

.side-group summary::-webkit-details-marker {
    display: none;
}

.side-group summary span,
.side-language-switch button,
.side-logout button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.side-nav-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.side-language-switch,
.side-logout {
    min-width: 0;
}

.side-language-switch button,
.side-logout button {
    width: 100%;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    cursor: pointer;
    font: inherit;
    font-size: 11.5px;
}

.side-language-switch button {
    color: #0b3b73;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.2)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.side-language-switch button:hover {
    transform: none;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        0 8px 18px rgba(37, 99, 235, 0.12);
}

.reports-center-page {
    display: grid;
    gap: 18px;
}

.reports-center-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(240, 253, 250, .9), rgba(239, 246, 255, .84)),
        #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.reports-center-head span,
.reports-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 950;
}

.reports-center-head h2 {
    margin: 6px 0 4px;
    color: #0f2947;
    font-size: 23px;
    line-height: 1.25;
}

.reports-center-head p {
    margin: 0;
    max-width: 760px;
    color: #475569;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.7;
}

.reports-center-head form {
    display: grid;
    grid-template-columns: minmax(180px, 240px) auto;
    gap: 8px;
    align-items: end;
}

.reports-center-head label {
    grid-column: 1 / -1;
    color: #0f2947;
    font-size: 11px;
    font-weight: 950;
}

.reports-center-head select {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(15, 41, 71, .16);
    padding: 0 10px;
    color: #0f172a;
    background: rgba(255, 255, 255, .92);
    font-weight: 850;
}

.reports-center-head button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0f2947);
    box-shadow: 0 10px 20px rgba(15, 118, 110, .18);
    font-size: 12px;
    font-weight: 950;
}

.reports-center-section {
    display: grid;
    gap: 12px;
}

.reports-section-title {
    justify-content: flex-start;
    padding-inline: 2px;
}

.reports-section-title h3 {
    margin: 0;
    color: #0f2947;
    font-size: 15px;
    line-height: 1.35;
}

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

.reports-center-card,
.reports-mini-link {
    text-decoration: none;
}

.reports-center-card {
    min-height: 118px;
    display: grid;
    align-content: center;
    gap: 9px;
    padding: 14px;
    border: 1px solid rgba(15, 41, 71, .13);
    border-radius: 12px;
    color: #0f172a;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .07);
    overflow: hidden;
    position: relative;
}

.reports-center-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 5px;
    background: var(--report-tone, #0f766e);
}

.reports-center-card i,
.reports-mini-link i {
    color: var(--report-tone, #0f766e);
}

.reports-center-card svg {
    width: 24px;
    height: 24px;
}

.reports-center-card strong {
    color: #0f2947;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.45;
}

.reports-center-card span {
    width: max-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--report-tone, #0f766e);
    background: color-mix(in srgb, var(--report-tone, #0f766e) 11%, #fff);
    font-size: 11px;
    font-weight: 950;
}

.reports-center-card.site,
.reports-mini-link.site { --report-tone: #0f766e; }
.reports-center-card.cash,
.reports-mini-link.cash { --report-tone: #b7791f; }
.reports-center-card.technical,
.reports-mini-link.technical { --report-tone: #2563eb; }
.reports-center-card.planning,
.reports-mini-link.planning { --report-tone: #7c3aed; }

.reports-discipline-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.reports-discipline-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(248, 250, 252, .82)),
        #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}

.reports-discipline-card header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f2947;
}

.reports-discipline-card header svg {
    width: 18px;
    height: 18px;
    color: #0f766e;
}

.reports-discipline-card header strong {
    font-size: 14px;
    font-weight: 950;
}

.reports-discipline-card > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.reports-mini-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 9px;
    border: 1px solid color-mix(in srgb, var(--report-tone, #0f766e) 18%, transparent);
    border-radius: 10px;
    color: #0f172a;
    background: color-mix(in srgb, var(--report-tone, #0f766e) 7%, #fff);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
}

.reports-mini-link span {
    min-width: 0;
}

.reports-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 150px;
    padding: 20px;
    border: 1px dashed rgba(15, 41, 71, .22);
    border-radius: 12px;
    color: #475569;
    background: rgba(248, 250, 252, .86);
    text-align: center;
}

.reports-empty.small {
    min-height: 90px;
}

.reports-empty svg {
    width: 28px;
    height: 28px;
    color: #94a3b8;
}

.reports-empty strong {
    font-size: 13px;
    font-weight: 950;
}

.reports-center-premium {
    gap: 22px;
}

.reports-center-premium .reports-center-head {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-color: rgba(14, 116, 144, .18);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(236, 253, 245, .76)),
        #fff;
    box-shadow:
        0 18px 42px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}

.reports-center-premium .reports-center-head::after {
    content: "";
    position: absolute;
    inset-block: -40px;
    inset-inline-end: -70px;
    width: min(360px, 42%);
    background:
        radial-gradient(circle at 35% 36%, rgba(20, 184, 166, .18), transparent 34%),
        linear-gradient(135deg, rgba(14, 116, 144, .12), rgba(37, 99, 235, .06));
    transform: skewX(-14deg);
    pointer-events: none;
}

.reports-center-premium .reports-center-head > * {
    position: relative;
    z-index: 1;
}

.reports-center-premium .reports-center-head h2 {
    font-size: clamp(24px, 2.4vw, 34px);
}

.reports-center-premium .reports-center-head p {
    font-size: 13.5px;
}

.reports-center-premium .reports-section-title {
    padding: 0;
}

.reports-center-premium .reports-section-title h3 {
    font-size: 17px;
}

.reports-center-premium .reports-center-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.reports-center-premium .reports-project-card {
    --card-a: #0f766e;
    --card-b: #0891b2;
    position: relative;
    min-height: 236px;
    align-content: stretch;
    gap: 12px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--card-a) 24%, transparent);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .92)),
        #fff;
    box-shadow:
        0 18px 38px rgba(15, 23, 42, .09),
        inset 0 1px 0 rgba(255, 255, 255, .92);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.reports-center-premium .reports-project-card::before {
    display: none;
}

.reports-center-premium .reports-project-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--card-a) 45%, transparent);
    box-shadow:
        0 22px 46px rgba(15, 23, 42, .13),
        0 0 0 4px color-mix(in srgb, var(--card-a) 8%, transparent);
}

.report-card-icon {
    position: absolute;
    z-index: 4;
    inset-block-start: 24px;
    inset-inline-start: 24px;
    justify-self: start;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: none !important;
    box-shadow: none !important;
    filter: none !important;
    pointer-events: none;
}

.report-card-icon svg {
    width: 25px;
    height: 25px;
    color: #fff;
    stroke-width: 2.35;
}

.reports-center-premium .reports-project-card.daily {
    --card-a: #0f766e;
    --card-b: #22c55e;
    --report-card-image: url('../images/reports-center/daily-reports.jpg');
}

.reports-center-premium .reports-project-card.execution {
    --card-a: #1d4ed8;
    --card-b: #06b6d4;
    --report-card-image: url('../images/reports-center/project-execution-report.jpg');
}

.reports-center-premium .reports-project-card.unit-cost {
    --card-a: #7c3aed;
    --card-b: #14b8a6;
    --report-card-image: url('../images/reports-center/project-execution-report.jpg');
}

.reports-center-premium .reports-project-card.cash {
    --card-a: #b45309;
    --card-b: #facc15;
    --report-card-image: url('../images/reports-center/cash-flow-report.jpg');
}

.reports-center-premium .reports-project-card.payments {
    --card-a: #6d28d9;
    --card-b: #ec4899;
    --report-card-image: url('../images/reports-center/payments-register.jpg');
}

.report-card-art {
    position: relative;
    min-height: 122px;
    overflow: hidden;
    display: grid;
    align-content: end;
    gap: 8px;
    padding: 15px;
    border-radius: 13px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, .04), rgba(2, 6, 23, .82)),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 42%, transparent), color-mix(in srgb, var(--card-b) 22%, transparent)),
        var(--report-card-image),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 94%, #020617 6%), color-mix(in srgb, var(--card-b) 72%, #020617 28%));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26);
}

.report-card-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .24;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000);
}

.report-card-art::after {
    content: "";
    position: absolute;
    inset-inline-end: -26px;
    inset-block-start: -20px;
    width: 118px;
    height: 118px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, .22);
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .28), transparent 36%),
        rgba(255, 255, 255, .08);
    transform: rotate(18deg);
}

.report-card-art strong {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 16px;
    line-height: 1.35;
    text-shadow: 0 9px 20px rgba(0, 0, 0, .32);
}

.reports-center-premium .reports-project-card p {
    min-height: 52px;
    margin: 0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.6;
}

.reports-center-premium .reports-project-card > span {
    justify-self: start;
    margin-top: auto;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--card-a);
    background: color-mix(in srgb, var(--card-a) 10%, #fff);
    font-size: 11.5px;
}

.reports-center-premium .reports-discipline-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.reports-center-premium .reports-discipline-card {
    --discipline-a: #0f766e;
    --discipline-b: #14b8a6;
    position: relative;
    overflow: hidden;
    gap: 14px;
    padding: 16px;
    border-color: color-mix(in srgb, var(--discipline-a) 20%, transparent);
    border-radius: 16px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--discipline-a) 12%, #fff), color-mix(in srgb, var(--discipline-b) 7%, #fff)),
        #fff;
    box-shadow:
        0 16px 34px rgba(15, 23, 42, .075),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}

.reports-center-premium .reports-discipline-card::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 120px;
    background:
        radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--discipline-a) 18%, transparent), transparent 40%),
        linear-gradient(135deg, transparent, color-mix(in srgb, var(--discipline-b) 10%, transparent));
    pointer-events: none;
}

.reports-center-premium .reports-discipline-card.emerald { --discipline-a: #0f766e; --discipline-b: #22c55e; }
.reports-center-premium .reports-discipline-card.blue { --discipline-a: #2563eb; --discipline-b: #38bdf8; }
.reports-center-premium .reports-discipline-card.amber { --discipline-a: #b45309; --discipline-b: #f59e0b; }
.reports-center-premium .reports-discipline-card.violet { --discipline-a: #7c3aed; --discipline-b: #a78bfa; }
.reports-center-premium .reports-discipline-card.cyan { --discipline-a: #0891b2; --discipline-b: #22d3ee; }
.reports-center-premium .reports-discipline-card.rose { --discipline-a: #be123c; --discipline-b: #fb7185; }

.reports-center-premium .reports-discipline-card header {
    position: relative;
    z-index: 1;
    gap: 10px;
}

.reports-center-premium .reports-discipline-card header > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--discipline-a), var(--discipline-b));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--discipline-a) 22%, transparent);
}

.reports-center-premium .reports-discipline-card header svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.reports-center-premium .reports-discipline-card header strong {
    color: #0f2947;
    font-size: 15px;
}

.reports-center-premium .reports-discipline-card > div {
    position: relative;
    z-index: 1;
}

.reports-center-premium .reports-mini-link {
    min-height: 44px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .58)),
        color-mix(in srgb, var(--report-tone, #0f766e) 8%, #fff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.unit-cost-report-page {
    display: grid;
    gap: 18px;
}

.unit-cost-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid rgba(29, 78, 216, .18);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(239, 246, 255, .86)),
        linear-gradient(90deg, rgba(29, 78, 216, .08), rgba(15, 118, 110, .06)),
        #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .075), inset 0 1px 0 rgba(255, 255, 255, .94);
}

.unit-cost-hero::after {
    content: "";
    position: absolute;
    inset-block: -50px;
    inset-inline-end: -90px;
    width: min(430px, 45%);
    background:
        radial-gradient(circle at 30% 34%, rgba(37, 99, 235, .14), transparent 35%),
        linear-gradient(135deg, rgba(29, 78, 216, .11), rgba(15, 118, 110, .07));
    transform: skewX(-13deg);
    pointer-events: none;
}

.unit-cost-hero > * {
    position: relative;
    z-index: 1;
}

.unit-cost-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 6px 11px;
    border: 1px solid rgba(29, 78, 216, .2);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(239, 246, 255, .9);
    font-size: 12px;
    font-weight: 950;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.unit-cost-hero h1 {
    margin: 10px 0 6px;
    color: #0f2947;
    font-size: clamp(25px, 2.3vw, 34px);
    line-height: 1.25;
    font-weight: 950;
}

.unit-cost-hero p {
    max-width: 820px;
    margin: 0;
    color: #52677a;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.75;
}

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

.unit-cost-actions .unit-cost-office-action,
.unit-cost-actions .unit-cost-print {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.unit-cost-actions button.unit-cost-print {
    cursor: pointer;
}

.unit-cost-actions .unit-cost-office-action {
    border: 1px solid #1d4ed8 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22) !important;
}

.unit-cost-actions .unit-cost-office-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 28px rgba(37, 99, 235, .28) !important;
}

.unit-cost-actions .unit-cost-office-action svg,
.unit-cost-actions .unit-cost-print svg {
    width: 17px;
    height: 17px;
}

.unit-cost-print {
    border: 1px solid #15803d !important;
    background: linear-gradient(135deg, #15803d, #16a34a) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(21, 128, 61, .22) !important;
}

.unit-cost-print:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 28px rgba(21, 128, 61, .28) !important;
}

.unit-cost-filter-card {
    padding: 14px;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .9)),
        #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.unit-cost-filter-card form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.unit-cost-filter-card label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.unit-cost-filter-card label span {
    color: #0f2947;
    font-size: 12px;
    font-weight: 950;
}

.unit-cost-filter-card select {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbdce6;
    border-radius: 11px;
    background: #fff;
    color: #10253f;
    font-size: 12px;
    font-weight: 850;
}

.unit-cost-filter-card button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border: 1px solid #1d4ed8;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.unit-cost-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.unit-cost-kpis article {
    --tone: #0f766e;
    --soft: #f0fdfa;
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .9), color-mix(in srgb, var(--tone) 8%, #fff)),
        var(--soft);
    box-shadow: 0 15px 32px rgba(15, 23, 42, .065);
}

.unit-cost-kpis article.teal { --tone: #0f766e; --soft: #f0fdfa; }
.unit-cost-kpis article.blue { --tone: #2563eb; --soft: #eff6ff; }
.unit-cost-kpis article.amber { --tone: #d97706; --soft: #fffbeb; }
.unit-cost-kpis article.violet { --tone: #7c3aed; --soft: #f5f3ff; }
.unit-cost-kpis article.rose { --tone: #be123c; --soft: #fff1f2; }

.unit-cost-kpis i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 66%, #fff));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--tone) 22%, transparent);
}

.unit-cost-kpis svg {
    width: 16px;
    height: 16px;
}

.unit-cost-kpis span {
    display: block;
    min-width: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.unit-cost-kpis strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    margin-top: 4px;
    overflow: hidden;
    color: #0f2947;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.2;
    direction: ltr;
    text-align: start;
    text-overflow: clip;
    white-space: nowrap;
}

.unit-cost-kpis strong.fit-sm {
    font-size: 10.5px;
}

.unit-cost-kpis strong.fit-xs {
    font-size: 9.2px;
    letter-spacing: -.1px;
}

.unit-cost-kpis-wrap {
    min-width: 0;
    border: 1px solid rgba(15, 41, 71, .1);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .68)),
        #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.unit-cost-kpis-wrap > header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px 0;
    color: #0f2947;
}

.unit-cost-kpis-wrap > header i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 12px 24px rgba(15, 118, 110, .18);
}

.unit-cost-kpis-wrap > header svg {
    width: 17px;
    height: 17px;
}

.unit-cost-kpis-wrap h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 950;
}

.unit-cost-kpis-comprehensive {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px 14px;
}

.unit-cost-kpis-comprehensive article {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    min-height: 78px;
    padding: 9px 10px;
    border-radius: 14px;
}

.unit-cost-kpis-comprehensive i {
    width: 28px;
    height: 28px;
    border-radius: 11px;
}

.unit-cost-kpis-comprehensive svg {
    width: 14px;
    height: 14px;
}

.unit-cost-kpis-comprehensive span {
    font-size: 10px;
    line-height: 1.25;
}

.unit-cost-kpis-comprehensive strong {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
    padding: 5px 6px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 12%, transparent);
    font-size: clamp(7.2px, .5vw, 9.6px);
    line-height: 1.15;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
}

.unit-cost-kpis-comprehensive strong.fit-sm {
    font-size: clamp(6.8px, .47vw, 9px);
}

.unit-cost-kpis-comprehensive strong.fit-xs {
    font-size: clamp(6.4px, .43vw, 8.2px);
    letter-spacing: 0;
}

.unit-cost-visual-grid {
    display: grid;
    grid-template-columns: .95fr 1.05fr;
    gap: 14px;
}

.unit-cost-chart-card,
.unit-cost-table-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .075);
}

.unit-cost-chart-card > header,
.unit-cost-table-card > header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(15, 41, 71, .1);
    background: linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(37, 99, 235, .06));
}

.unit-cost-chart-card h2,
.unit-cost-table-card h2 {
    margin: 0;
    color: #0f2947;
    font-size: 15px;
    font-weight: 950;
}

.unit-cost-chart-card > header i,
.unit-cost-table-card > header i {
    color: #0f766e;
}

.unit-cost-donut-wrap {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.unit-cost-donut {
    position: relative;
    width: 164px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(15, 41, 71, .08), 0 16px 28px rgba(15, 23, 42, .08);
}

.unit-cost-donut::after {
    content: "";
    position: absolute;
    inset: 38px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 41, 71, .08);
}

.unit-cost-donut span {
    position: relative;
    z-index: 1;
    color: #0f2947;
    font-size: 17px;
    font-weight: 950;
}

.unit-cost-legend {
    display: grid;
    gap: 8px;
}

.unit-cost-legend span {
    display: grid;
    gap: 7px;
    padding: 8px 10px;
    border-inline-start: 5px solid var(--legend-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--legend-color) 8%, #fff);
}

.unit-cost-legend b {
    min-width: 0;
    overflow: hidden;
    color: #10253f;
    font-size: 12px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-legend small {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
}

.unit-cost-legend small em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, var(--legend-color) 28%, transparent);
    border-radius: 999px;
    color: color-mix(in srgb, var(--legend-color) 70%, #0f172a);
    background: color-mix(in srgb, var(--legend-color) 12%, #fff);
    font-size: 10.5px;
    font-style: normal;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.unit-cost-bars {
    display: grid;
    gap: 12px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(248, 250, 252, .9), rgba(236, 253, 245, .48)),
        #fff;
}

.unit-cost-bar-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--bar-color) 18%, #dbe5ed);
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--bar-color) 8%, #fff), rgba(255, 255, 255, .92)),
        #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}

.unit-cost-bar-title {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.unit-cost-bar-title strong {
    min-width: 0;
    overflow: hidden;
    color: #0f2947;
    font-size: 12.5px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-bar-title small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-bar-row span {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, 0)),
        color-mix(in srgb, var(--bar-color) 12%, #e2e8f0);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .12);
}

.unit-cost-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 58%, #fff));
    box-shadow: 0 0 18px color-mix(in srgb, var(--bar-color) 26%, transparent);
}

.unit-cost-bar-row em {
    display: grid;
    gap: 3px;
    justify-items: end;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid color-mix(in srgb, var(--bar-color) 24%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--bar-color) 9%, #fff);
    color: #10253f;
    font-style: normal;
    font-weight: 950;
    text-align: end;
}

.unit-cost-bar-row em small {
    color: color-mix(in srgb, var(--bar-color) 65%, #334155);
    font-size: 9px;
    font-weight: 950;
}

.unit-cost-bar-row em b {
    max-width: 100%;
    overflow: hidden;
    color: #0f2947;
    font-size: 10.5px;
    font-weight: 950;
    text-overflow: clip;
    white-space: nowrap;
}

.unit-cost-control-strip {
    overflow: hidden;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(248, 250, 252, .72)),
        #fff;
    box-shadow: 0 14px 32px rgba(15, 41, 71, .08);
}

.unit-cost-stack-card {
    overflow: hidden;
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .78)),
        #fff;
    box-shadow: 0 14px 32px rgba(15, 41, 71, .08);
}

.unit-cost-stack-card > header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(15, 41, 71, .08);
    background:
        linear-gradient(135deg, rgba(15, 41, 71, .06), rgba(37, 99, 235, .08)),
        #fff;
}

.unit-cost-stack-card > header i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
}

.unit-cost-stack-card h2 {
    margin: 0;
    color: #0f2947;
    font-size: 14px;
    font-weight: 950;
}

.unit-cost-stack-list {
    display: grid;
    gap: 9px;
    padding: 12px 14px 14px;
}

.unit-cost-stack-list article {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) minmax(310px, .9fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--stack-color) 18%, #dbe5ed);
    border-radius: 13px;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--stack-color) 10%, transparent), transparent 40%),
        #fff;
}

.unit-cost-stack-list article > strong {
    min-width: 0;
    overflow: hidden;
    color: #0f2947;
    font-size: 12px;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-stack-track {
    display: flex;
    height: 17px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.unit-cost-stack-track span {
    display: block;
    height: 100%;
}

.unit-cost-stack-track .certified {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.unit-cost-stack-track .remaining {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.unit-cost-stack-track .direct {
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.unit-cost-stack-track .indirect {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.unit-cost-stack-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.unit-cost-stack-values em {
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid rgba(15, 41, 71, .1);
    border-radius: 10px;
    background: rgba(248, 250, 252, .86);
    font-style: normal;
}

.unit-cost-stack-values em.certified {
    border-color: rgba(22, 163, 74, .2);
    background: rgba(240, 253, 244, .9);
}

.unit-cost-stack-values em.remaining {
    border-color: rgba(249, 115, 22, .2);
    background: rgba(255, 247, 237, .92);
}

.unit-cost-stack-values em.indirect {
    border-color: rgba(217, 119, 6, .24);
    background: rgba(255, 251, 235, .94);
}

.unit-cost-stack-values em.total {
    border-color: rgba(37, 99, 235, .22);
    background: rgba(239, 246, 255, .94);
}

.unit-cost-stack-values small,
.unit-cost-stack-values b {
    display: block;
    min-width: 0;
    overflow: hidden;
    line-height: 1.15;
    white-space: nowrap;
}

.unit-cost-stack-values small {
    color: #64748b;
    font-size: 8.5px;
    font-weight: 950;
}

.unit-cost-stack-values b {
    margin-top: 3px;
    color: #0f2947;
    font-size: clamp(7px, .65vw, 10px);
    font-weight: 950;
}

.unit-cost-control-strip > header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(15, 41, 71, .08);
    background:
        linear-gradient(135deg, rgba(15, 41, 71, .06), rgba(15, 118, 110, .08)),
        #fff;
}

.unit-cost-control-strip > header i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #0f2947, #0f766e);
}

.unit-cost-control-strip h2 {
    margin: 0;
    color: #0f2947;
    font-size: 14px;
    font-weight: 950;
}

.unit-cost-control-strip > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    padding: 11px 13px 13px;
}

.unit-cost-control-strip span {
    --control-rgb: 37, 99, 235;
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value"
        "icon name";
    gap: 4px 9px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid rgba(var(--control-rgb), .18);
    border-radius: 13px;
    background:
        radial-gradient(circle at 0% 0%, rgba(var(--control-rgb), .14), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .25)),
        rgba(var(--control-rgb), .07);
}

.unit-cost-control-strip span.cost { --control-rgb: 217, 119, 6; }
.unit-cost-control-strip span.low { --control-rgb: 15, 118, 110; }
.unit-cost-control-strip span.remaining { --control-rgb: 190, 18, 60; }
.unit-cost-control-strip span.spend { --control-rgb: 124, 58, 237; }

.unit-cost-control-strip span > i {
    grid-area: icon;
    grid-row: span 3;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: rgb(var(--control-rgb));
}

.unit-cost-control-strip small {
    grid-area: label;
    color: rgb(var(--control-rgb));
    font-size: 10px;
    font-weight: 950;
    line-height: 1.25;
}

.unit-cost-control-strip b {
    grid-area: value;
    display: block;
    min-width: 0;
    max-width: 100%;
    padding: 5px 7px;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, .74);
    box-shadow: inset 0 0 0 1px rgba(var(--control-rgb), .14);
    color: #0f2947;
    font-size: clamp(7px, .68vw, 10px);
    font-weight: 950;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    text-overflow: clip;
}

.unit-cost-control-strip em {
    grid-area: name;
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-building-list {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.unit-cost-building-card {
    border: 1px solid rgba(15, 41, 71, .12);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    overflow: hidden;
}

.unit-cost-building-card summary {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    background:
        linear-gradient(135deg, rgba(29, 78, 216, .1), rgba(15, 118, 110, .08)),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .92));
    border-bottom: 1px solid rgba(15, 41, 71, .08);
}

.unit-cost-building-card summary::-webkit-details-marker {
    display: none;
}

.building-rank {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    box-shadow: 0 13px 26px rgba(37, 99, 235, .18);
}

.building-rank svg {
    width: 22px;
    height: 22px;
    color: #fff;
    stroke-width: 2.2;
}

.unit-cost-building-title {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.unit-cost-building-title strong {
    display: block;
    color: #0f2947;
    font-size: clamp(17px, 1.35vw, 22px);
    font-weight: 950;
    line-height: 1.22;
}

.unit-cost-building-title small {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 5px 9px;
    border: 1px solid rgba(29, 78, 216, .15);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(239, 246, 255, .88);
    font-size: 11.5px;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unit-cost-building-head-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    justify-items: stretch;
    min-width: 0;
}

.unit-cost-building-head-values b,
.unit-cost-building-head-values em,
.unit-cost-building-head-values i {
    display: grid;
    gap: 3px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 12px;
    font-style: normal;
    font-weight: 950;
    text-align: center;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.unit-cost-building-head-values b {
    border: 1px solid rgba(15, 118, 110, .22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .18)),
        rgba(240, 253, 250, .96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.unit-cost-building-head-values em {
    border: 1px solid rgba(217, 119, 6, .24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .18)),
        rgba(255, 251, 235, .96);
}

.unit-cost-building-head-values i {
    border: 1px solid rgba(37, 99, 235, .22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .18)),
        rgba(239, 246, 255, .96);
}

.unit-cost-building-head-values small {
    display: block;
    color: #0f766e;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.15;
}

.unit-cost-building-head-values em small {
    color: #b45309;
}

.unit-cost-building-head-values i small {
    color: #1d4ed8;
}

.unit-cost-building-head-values strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #111827;
    font-size: 11.5px;
    font-weight: 950;
    line-height: 1.15;
    text-overflow: clip;
    white-space: nowrap;
}

.unit-cost-building-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px;
    padding: 12px 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(248, 250, 252, .66)),
        rgba(239, 246, 255, .36);
}

.unit-cost-building-metrics span {
    min-width: 0;
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "value value";
    gap: 5px 7px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid rgba(var(--metric-rgb), .2);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .2)),
        rgba(var(--metric-rgb), .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
}

.unit-cost-building-metrics .metric-contract { --metric-rgb: 15, 118, 110; }
.unit-cost-building-metrics .metric-indirect { --metric-rgb: 217, 119, 6; }
.unit-cost-building-metrics .metric-total { --metric-rgb: 37, 99, 235; }
.unit-cost-building-metrics .metric-unit { --metric-rgb: 124, 58, 237; }
.unit-cost-building-metrics .metric-certificate { --metric-rgb: 37, 99, 235; }
.unit-cost-building-metrics .metric-percent { --metric-rgb: 217, 119, 6; }
.unit-cost-building-metrics .metric-remaining { --metric-rgb: 190, 18, 60; }
.unit-cost-building-metrics .metric-variance { --metric-rgb: 79, 70, 229; }
.unit-cost-building-metrics .metric-coverage { --metric-rgb: 124, 58, 237; }
.unit-cost-building-metrics .metric-count { --metric-rgb: 8, 145, 178; }

.unit-cost-building-metrics span > i {
    grid-area: icon;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: rgb(var(--metric-rgb));
}

.unit-cost-building-metrics span > i svg {
    width: 14px;
    height: 14px;
}

.unit-cost-building-metrics small {
    grid-area: label;
    display: block;
    color: rgb(var(--metric-rgb));
    font-size: 10px;
    font-weight: 950;
    line-height: 1.25;
}

.unit-cost-building-metrics b {
    grid-area: value;
    display: block;
    margin-top: 2px;
    max-width: 100%;
    overflow: hidden;
    color: #0f2947;
    font-size: clamp(7px, .72vw, 11px);
    font-weight: 950;
    line-height: 1.18;
    white-space: nowrap;
    text-overflow: clip;
}

.unit-cost-building-metrics-split {
    display: block;
    padding: 12px 14px;
}

.unit-cost-building-metrics-row {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.unit-cost-building-metrics-main {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.unit-cost-building-metrics-added {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed rgba(15, 41, 71, .16);
}

.unit-cost-building-metrics-added b {
    padding: 5px 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .7);
    box-shadow: inset 0 0 0 1px rgba(var(--metric-rgb), .12);
    font-size: clamp(7px, .66vw, 10.2px);
    text-align: center;
}

.unit-cost-building-metrics-main b {
    padding: 5px 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 0 0 1px rgba(var(--metric-rgb), .12);
    text-align: center;
}

.unit-cost-discipline-grid {
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(15, 41, 71, .08);
    background: rgba(248, 250, 252, .72);
}

.unit-cost-discipline-grid article {
    position: relative;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--discipline-color) 18%, transparent);
    border-radius: 14px;
    background: #fff;
}

.unit-cost-discipline-grid article + article {
    margin-top: 18px;
}

.unit-cost-discipline-grid article + article::before {
    content: "";
    display: block;
    position: relative;
    inset: auto;
    width: calc(100% - 32px);
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background:
        linear-gradient(90deg,
            transparent,
            color-mix(in srgb, var(--discipline-color) 45%, #d97706),
            color-mix(in srgb, var(--discipline-color) 35%, #2563eb),
            transparent);
}

.unit-cost-discipline-grid article > header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    background: color-mix(in srgb, var(--discipline-color) 9%, #fff);
}

.unit-cost-discipline-grid article > header > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: var(--discipline-color);
}

.unit-cost-discipline-grid article > header strong {
    color: #0f2947;
    font-size: 13px;
    font-weight: 950;
}

.unit-cost-discipline-grid article > header small {
    display: block;
    margin-top: 2px;
    color: var(--discipline-color);
    font-size: 11px;
    font-weight: 950;
}

.unit-cost-discipline-grid article > header b {
    color: #0f2947;
    font-size: 13px;
    font-weight: 950;
}

.unit-cost-discipline-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
    min-width: 0;
}

.unit-cost-discipline-values em {
    position: relative;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 54px;
    max-width: 100%;
    padding: 9px 11px;
    border: 1px solid color-mix(in srgb, var(--discipline-color) 32%, #dbe7ef);
    border-radius: 14px;
    color: color-mix(in srgb, var(--discipline-color) 72%, #0f172a);
    background:
        radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--discipline-color) 18%, transparent), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .34)),
        color-mix(in srgb, var(--discipline-color) 10%, #fff);
    font-style: normal;
    font-weight: 950;
    overflow: hidden;
    text-overflow: clip;
    text-align: start;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 18px color-mix(in srgb, var(--discipline-color) 10%, transparent);
}

.unit-cost-discipline-values em::before {
    content: "";
    display: block;
    width: 7px;
    height: 32px;
    border-radius: 999px;
    background: var(--discipline-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--discipline-color) 10%, transparent);
}

.unit-cost-discipline-values em small {
    display: block;
    min-width: 0;
    color: color-mix(in srgb, var(--discipline-color) 68%, #334155);
    font-size: 10px;
    font-weight: 950;
    line-height: 1.3;
}

.unit-cost-discipline-values em b {
    min-width: 64px;
    padding: 6px 9px;
    border: 1px solid color-mix(in srgb, var(--discipline-color) 20%, #dbe7ef);
    border-radius: 999px;
    background: #fff;
    color: #0f2947;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.unit-cost-contract-table {
    overflow-x: visible;
    max-width: 100%;
}

.unit-cost-contract-table table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.unit-cost-contract-table th:nth-child(1),
.unit-cost-contract-table td:nth-child(1) {
    width: 21.3%;
}

.unit-cost-contract-table th:nth-child(2),
.unit-cost-contract-table td:nth-child(2) {
    width: 7%;
}

.unit-cost-contract-table th:nth-child(3),
.unit-cost-contract-table td:nth-child(3) {
    width: 9%;
}

.unit-cost-contract-table th:nth-child(4),
.unit-cost-contract-table td:nth-child(4) {
    width: 6.5%;
}

.unit-cost-contract-table th:nth-child(5),
.unit-cost-contract-table td:nth-child(5) {
    width: 10.2%;
}

.unit-cost-contract-table th:nth-child(6),
.unit-cost-contract-table td:nth-child(6) {
    width: 9.5%;
}

.unit-cost-contract-table th:nth-child(7),
.unit-cost-contract-table td:nth-child(7) {
    width: 10.1%;
}

.unit-cost-contract-table th:nth-child(8),
.unit-cost-contract-table td:nth-child(8) {
    width: 9.5%;
}

.unit-cost-contract-table th:nth-child(9),
.unit-cost-contract-table td:nth-child(9) {
    width: 9%;
}

.unit-cost-contract-table th:nth-child(10),
.unit-cost-contract-table td:nth-child(10) {
    width: 7.9%;
}

.unit-cost-contract-table th {
    padding: 8px 5px;
    border: 1px solid #d9e6ee;
    background: #0f2947;
    color: #fff;
    font-size: 10px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.unit-cost-contract-table tfoot td {
    border: 1px solid #d9e6ee;
    background: #0f2947;
    color: #fff;
    font-weight: 950;
}

.unit-cost-contract-table tfoot small,
.unit-cost-contract-table tfoot b,
.unit-cost-contract-table tfoot em {
    display: block;
    color: #fff;
    font-style: normal;
}

.unit-cost-contract-table td {
    padding: 8px 5px;
    border: 1px solid #d9e6ee;
    color: #10253f;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.28;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.unit-cost-contract-table td:not(.name),
.unit-cost-contract-table th:not(:first-child) {
    word-break: normal;
}

.unit-cost-contract-table td:not(.name) {
    white-space: nowrap;
    font-size: clamp(8.2px, .62vw, 10px);
}

.unit-cost-contract-table td.name {
    text-align: start;
}

.unit-cost-contract-table td.name strong,
.unit-cost-contract-table td.name small {
    display: block;
}

.unit-cost-contract-table td.name strong {
    color: #0f766e;
    font-size: 11px;
}

.unit-cost-contract-table td.name small,
.unit-cost-contract-table td small {
    margin-top: 3px;
    color: #64748b;
    font-size: 9px;
}

.unit-cost-contract-table tfoot td {
    font-size: 9.5px;
    line-height: 1.2;
}

.unit-cost-contract-table tfoot td.money-total b {
    font-size: clamp(7.5px, .58vw, 9px);
    white-space: nowrap;
}

.unit-cost-contract-table tfoot td.money-total small,
.unit-cost-contract-table tfoot td em {
    margin-top: 2px;
    color: rgba(255, 255, 255, .82);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
}

.unit-cost-empty {
    min-height: 210px;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 22px;
    border: 1px dashed rgba(15, 41, 71, .22);
    border-radius: 16px;
    background: rgba(248, 250, 252, .85);
    color: #64748b;
    text-align: center;
}

.unit-cost-empty svg {
    width: 34px;
    height: 34px;
}

.unit-cost-empty strong {
    font-size: 14px;
    font-weight: 950;
}

@media (max-width: 1180px) {
    .unit-cost-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .unit-cost-kpis.unit-cost-kpis-comprehensive {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .unit-cost-visual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .unit-cost-hero,
    .unit-cost-filter-card form,
    .unit-cost-building-card summary {
        grid-template-columns: 1fr;
    }
    .unit-cost-actions {
        justify-content: flex-start;
    }
    .unit-cost-kpis,
    .unit-cost-building-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .unit-cost-kpis.unit-cost-kpis-comprehensive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .unit-cost-building-metrics-main,
    .unit-cost-building-metrics-added {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .unit-cost-donut-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .unit-cost-building-head-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .unit-cost-kpis,
    .unit-cost-building-metrics {
        grid-template-columns: 1fr;
    }
    .unit-cost-kpis.unit-cost-kpis-comprehensive {
        grid-template-columns: 1fr;
    }
    .unit-cost-building-metrics-main,
    .unit-cost-building-metrics-added {
        grid-template-columns: 1fr;
    }
    .unit-cost-bar-row {
        grid-template-columns: 1fr;
    }
    .unit-cost-bar-row em {
        text-align: start;
    }
    .unit-cost-building-head-values {
        grid-template-columns: 1fr;
    }
}

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

@media (max-width: 860px) {
    .reports-center-premium .reports-center-head,
    .reports-center-premium .reports-discipline-list {
        grid-template-columns: 1fr;
    }

    .reports-center-premium .reports-discipline-card > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .reports-center-premium .reports-center-grid,
    .reports-center-premium .reports-discipline-card > div {
        grid-template-columns: 1fr;
    }
}

.side-chevron {
    transition: transform 0.18s ease;
}

.side-group[open] .side-chevron {
    transform: rotate(180deg);
}

.side-sub-link {
    margin-inline-start: 12px;
    padding: 8px 9px;
    min-height: 34px;
    font-size: 12px;
    color: #1d4070;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.13), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 5px 12px rgba(15, 23, 42, 0.035);
}

html[dir="rtl"] .side-sub-link {
    margin-inline-start: 0;
    margin-inline-end: 12px;
}

.side-branch {
    position: relative;
    display: grid;
    gap: 5px;
    padding-block: 3px;
}

.side-branch::before {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-start: 25px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.28), rgba(15, 118, 110, 0.38), rgba(183, 121, 31, 0.24));
}

.side-branch:has(.active)::before {
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.4), rgba(15, 118, 110, 0.74), rgba(183, 121, 31, 0.42));
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.05);
}

html[dir="rtl"] .side-branch::before {
    inset-inline-start: auto;
    inset-inline-end: 25px;
}

.side-child-link {
    margin-inline-start: 36px;
    min-height: 31px;
    padding: 7px 8px;
    font-size: 11.5px;
    color: #23486d;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.13), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(15, 118, 110, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    position: relative;
}

.side-resource-branch {
    display: grid;
    gap: 4px;
    margin-inline-start: 50px;
    padding-block: 2px 5px;
    position: relative;
}

html[dir="rtl"] .side-resource-branch {
    margin-inline-start: 0;
    margin-inline-end: 50px;
}

.side-resource-link {
    min-height: 28px;
    padding: 6px 7px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #385178;
    text-decoration: none;
    font-size: 11px;
    font-weight: 820;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(183, 121, 31, 0.12), rgba(37, 99, 235, 0.06));
    border: 1px solid rgba(183, 121, 31, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.side-resource-link:hover {
    color: #08245d;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(183, 121, 31, 0.2), rgba(29, 78, 216, 0.12));
}

.side-resource-link.active {
    color: #4a2d04;
    border-color: rgba(183, 121, 31, 0.5);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.08)),
        linear-gradient(135deg, rgba(183, 121, 31, 0.54), rgba(245, 158, 11, 0.36));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 8px 18px rgba(124, 74, 3, 0.16);
}

html[dir="rtl"] .side-child-link {
    margin-inline-start: 0;
    margin-inline-end: 36px;
}

.side-child-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.09);
}

.side-analysis-link {
    color: #053d30;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.22), rgba(16, 185, 129, 0.13));
    border-color: rgba(15, 118, 110, 0.2);
    min-height: 32px;
}

.side-analysis-link::before {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11);
}

.side-analysis-link.active {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.58), rgba(16, 185, 129, 0.38));
    border-color: rgba(15, 118, 110, 0.56);
    color: #052e26;
}

.side-resource-link.active svg,
.side-analysis-link.active svg,
.side-child-link.active svg,
.side-sub-link.active svg {
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.42));
}

.side-sub-link.muted,
.side-child-link.muted {
    color: var(--muted);
    cursor: default;
    opacity: 0.78;
}

.side-sub-link.muted:hover,
.side-child-link.muted:hover {
    color: var(--muted);
    border-color: transparent;
}

.side-group-system summary::before {
    background: linear-gradient(180deg, #2563eb, #38bdf8);
}

.side-group-projects summary::before {
    background: linear-gradient(180deg, #0f766e, #10b981);
}

.side-project-hub-link {
    color: #0f315f;
    border-color: rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.2)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 118, 110, 0.1));
}

.side-management-group {
    display: grid;
    gap: 5px;
    margin: 2px 0 4px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid rgba(15, 118, 110, .15);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .3)),
        linear-gradient(135deg, color-mix(in srgb, var(--management-a, #0f766e) 8%, transparent), color-mix(in srgb, var(--management-b, #2563eb) 6%, transparent));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.side-management-technical {
    --management-a: #0f766e;
    --management-b: #2563eb;
    --management-c: #134e4a;
}

.side-management-site {
    --management-a: #d97706;
    --management-b: #0f766e;
    --management-c: #7c2d12;
    border-color: rgba(217, 119, 6, .18);
}

.side-management-group summary {
    min-height: 34px;
    padding: 8px 9px;
    border-color: color-mix(in srgb, var(--management-a) 22%, transparent);
    color: color-mix(in srgb, var(--management-c) 84%, #0f172a);
    font-size: 11.7px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .2)),
        linear-gradient(135deg, color-mix(in srgb, var(--management-a) 18%, transparent), color-mix(in srgb, var(--management-b) 12%, transparent));
}

.side-management-group summary::before {
    background: linear-gradient(180deg, var(--management-a), var(--management-b));
}

.side-management-group[open] summary {
    border-color: color-mix(in srgb, var(--management-a) 36%, transparent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 8px 17px color-mix(in srgb, var(--management-a) 13%, transparent);
}

.side-finance-links {
    display: grid;
    gap: 6px;
}

.side-management-group .side-finance-group.side-group {
    margin: 2px 0;
}

.side-management-group .side-finance-group.side-group > summary {
    min-height: 37px;
    padding: 9px 10px;
    color: #12315f;
    font-size: 12.5px;
    font-weight: 850;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.24)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 118, 110, 0.1));
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 7px 16px rgba(15, 23, 42, 0.055);
}

.side-management-group .side-finance-group.side-group > summary::before {
    background: linear-gradient(180deg, #0f766e, #10b981);
}

.side-finance-group[open] > summary .side-chevron {
    transform: rotate(180deg);
}

.side-management-link,
.side-site-link {
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #40566c;
    text-decoration: none;
    font-size: 10.8px;
    font-weight: 840;
    line-height: 1.3;
    background: rgba(255, 255, 255, .54);
    transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.side-management-link svg,
.side-site-link svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.side-management-link:hover {
    transform: translateX(2px);
    color: color-mix(in srgb, var(--management-c) 80%, #0f172a);
    border-color: color-mix(in srgb, var(--management-a) 25%, transparent);
    background: rgba(255, 255, 255, .82);
}

html[dir="rtl"] .side-management-link:hover {
    transform: translateX(-2px);
}

.side-management-link.active {
    color: #fff;
    border-color: color-mix(in srgb, var(--management-a) 68%, transparent);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, var(--management-a), var(--management-b));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .38),
        0 7px 16px color-mix(in srgb, var(--management-a) 22%, transparent);
}

.side-management-technical .side-sub-link.active,
.side-management-technical .side-workspace-link.active {
    color: #fff !important;
    border-color: rgba(13, 148, 136, .82) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, #0f766e, #0891b2) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .42),
        0 9px 20px rgba(15, 118, 110, .22) !important;
}

.side-management-technical .side-sub-link.active svg,
.side-management-technical .side-workspace-link.active svg {
    color: #fff !important;
}

.side-site-workspace {
    display: grid;
    gap: 4px;
    margin-block-start: 2px;
    padding: 7px;
    border: 1px solid rgba(217, 119, 6, .12);
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 247, 237, .52));
}

.side-site-link {
    color: #6b4a1b;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .64), rgba(255, 247, 237, .36)),
        linear-gradient(135deg, rgba(217, 119, 6, .12), rgba(15, 118, 110, .06));
    border-color: rgba(217, 119, 6, .09);
}

.side-site-link.muted {
    opacity: .84;
    cursor: default;
}

.side-site-link.muted:hover {
    transform: none;
    color: #6b4a1b;
    border-color: rgba(217, 119, 6, .09);
}

.side-group-future summary::before {
    background: linear-gradient(180deg, #64748b, #94a3b8);
}

.side-group-future {
    opacity: .9;
}

.side-discipline-link {
    font-weight: 880;
}

.side-discipline-link.active {
    min-height: 36px;
    color: #fff !important;
    border-color: rgba(13, 148, 136, .82) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, #0f766e, #0891b2) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .42),
        0 9px 20px rgba(15, 118, 110, .22) !important;
}

.side-discipline-link.active::before {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.side-discipline-workspace {
    position: relative;
    display: grid;
    gap: 5px;
    margin: 2px 4px 6px 48px;
    padding: 8px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(241, 245, 249, .58)),
        #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 8px 18px rgba(15, 23, 42, .055);
}

html[dir="rtl"] .side-discipline-workspace {
    margin: 2px 48px 6px 4px;
}

.side-discipline-workspace::before {
    content: "";
    position: absolute;
    inset-block: 8px;
    inset-inline-start: -15px;
    width: 2px;
    border-radius: 99px;
    background: linear-gradient(180deg, #b7791f, #0f766e, #2563eb);
}

.side-workspace-label {
    min-height: 27px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 6px;
    color: #3f4f5e;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.2;
}

.side-workspace-label svg {
    width: 14px;
    height: 14px;
}

.side-workspace-label.resources {
    color: #74420a;
    background: rgba(245, 158, 11, .13);
}

.side-workspace-label.contracts {
    color: #075985;
    background: rgba(14, 165, 233, .12);
}

.side-workspace-label.reports {
    color: #065f46;
    background: rgba(16, 185, 129, .12);
}

.side-workspace-label.site {
    color: #92400e;
    background: rgba(217, 119, 6, .13);
}

.side-site-branch .side-child-link.active {
    color: #fff !important;
    border-color: rgba(124, 45, 18, .72) !important;
    background:
        linear-gradient(135deg, rgba(124, 45, 18, .98), rgba(180, 83, 9, .96)),
        #7c2d12 !important;
    box-shadow: 0 8px 18px rgba(124, 45, 18, .18);
}

.side-site-branch .side-child-link.active svg {
    color: #fff7ed !important;
}

.side-site-branch .side-child-link,
.side-site-discipline-workspace .side-workspace-link {
    color: #6b4a1b;
    border-color: rgba(217, 119, 6, .18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .68), rgba(255, 247, 237, .44)),
        rgba(255, 255, 255, .52);
}

.side-site-branch .side-child-link:hover,
.side-site-discipline-workspace .side-workspace-link:hover {
    color: #7c2d12;
    border-color: rgba(217, 119, 6, .42);
    background:
        linear-gradient(145deg, rgba(255, 247, 237, .86), rgba(240, 253, 250, .56)),
        rgba(255, 255, 255, .78);
}

.side-site-branch .side-child-link svg,
.side-site-discipline-workspace .side-workspace-link svg {
    color: #d97706;
}

.side-site-discipline-workspace .side-workspace-link.active {
    color: #fff;
    border-color: rgba(217, 119, 6, .62);
    background:
        linear-gradient(135deg, rgba(217, 119, 6, .96), rgba(15, 118, 110, .9)),
        #d97706;
}

.side-workspace-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding-block-end: 3px;
}

.side-workspace-link {
    min-height: 29px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #40566c;
    background: rgba(255, 255, 255, .5);
    font-size: 10.5px;
    font-weight: 820;
    line-height: 1.25;
    text-decoration: none;
    transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.side-workspace-link svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.side-workspace-link:hover {
    transform: translateX(2px);
    color: #0f3d64;
    border-color: rgba(14, 116, 144, .22);
    background: rgba(240, 249, 255, .88);
}

html[dir="rtl"] .side-workspace-link:hover {
    transform: translateX(-2px);
}

.side-workspace-link.active {
    color: #fff;
    border-color: rgba(37, 99, 235, .68);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, #1d4ed8, #0284c7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .38),
        0 7px 16px rgba(29, 78, 216, .2);
}

.side-workspace-resources .side-workspace-link.active {
    border-color: rgba(180, 83, 9, .68);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, #b45309, #d97706);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .38),
        0 7px 16px rgba(180, 83, 9, .2);
}

.side-logout {
    margin: 0;
}

.side-logout button {
    width: 100%;
    border: 1px solid rgba(159, 18, 57, 0.36);
    color: #7f1231;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.3), rgba(190, 18, 60, 0.18));
    cursor: pointer;
    justify-content: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 18px rgba(159, 18, 57, 0.1);
}

.ghost-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(159, 18, 57, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.3)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.14), rgba(190, 18, 60, 0.08));
    color: #8a1538;
    font-weight: 900;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 8px 18px rgba(159, 18, 57, 0.08);
}

.ghost-button:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 18, 57, 0.28);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.36)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(190, 18, 60, 0.12));
}

.content-banner {
    min-height: 134px;
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background-image:
        linear-gradient(90deg, rgba(8, 47, 54, .94) 0%, rgba(8, 62, 67, .72) 34%, rgba(8, 47, 54, .14) 70%, rgba(8, 47, 54, .04) 100%),
        var(--content-banner-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow);
}

.content-banner > div {
    position: relative;
    z-index: 2;
}

html[dir="rtl"] .content-banner {
    background-image:
        linear-gradient(270deg, rgba(8, 47, 54, .94) 0%, rgba(8, 62, 67, .72) 34%, rgba(8, 47, 54, .14) 70%, rgba(8, 47, 54, .04) 100%),
        var(--content-banner-image);
}

.content-banner::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 34%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.13));
    opacity: 0.38;
}

.content-banner span {
    display: inline-flex;
    margin-block-end: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 900;
}

.content-banner h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    max-width: 720px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .34);
}

.banner-comm-actions {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.banner-comm-button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 20px rgba(15, 23, 42, .16);
    text-decoration: none;
    backdrop-filter: blur(7px);
}

.banner-comm-button:hover,
.banner-comm-button.active {
    background: rgba(15, 118, 110, .82);
}

.banner-comm-button svg {
    width: 19px;
    height: 19px;
}

.banner-comm-button b,
.side-sub-link b {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 10px;
    line-height: 1;
}

.banner-comm-button b {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -6px;
    border: 2px solid rgba(255, 255, 255, .9);
}

.side-notification-link {
    position: relative;
}

.side-sub-link b {
    margin-inline-start: auto;
}

[data-live-count][data-count="0"] {
    display: none;
}

.side-group-system .side-sub-link {
    border-color: rgba(15, 118, 110, .22);
    background: rgba(15, 118, 110, .1);
    color: #0f4f49;
}

.side-group-system .side-sub-link svg {
    color: #0f766e;
}

.side-group-system .side-sub-link:hover {
    border-color: rgba(15, 118, 110, .36);
    background: rgba(15, 118, 110, .16);
    color: #0f4f49;
}

.side-group-system .side-sub-link.active {
    border-color: rgba(6, 95, 70, .78);
    background: linear-gradient(135deg, #065f46, #0f766e);
    color: #fff;
    box-shadow: 0 12px 24px rgba(6, 95, 70, .22);
}

.side-group-system .side-sub-link.active svg,
.side-group-system .side-sub-link.active span {
    color: #fff;
}

.side-group-system .side-sub-link.active b {
    border: 1px solid rgba(255, 255, 255, .55);
}

.content-banner-schedule {
    min-height: 210px;
    align-items: center;
    background-size: cover;
    background-position: center 46%;
}

.content-banner-schedule h1 {
    max-width: 560px;
}

html[dir="rtl"] .content-banner-schedule {
    background-position: center 46%;
}

.content-banner-cash-flow {
    min-height: 232px;
    padding: 30px 34px;
    align-items: center;
    background-image:
        linear-gradient(90deg, rgba(8, 36, 63, .94) 0%, rgba(7, 64, 82, .76) 36%, rgba(7, 64, 82, .28) 62%, rgba(7, 64, 82, .08) 100%),
        var(--content-banner-image);
    background-position: center 50%;
    background-size: cover;
    border-color: rgba(59, 130, 246, .26);
    box-shadow:
        0 14px 34px rgba(15, 43, 77, .12),
        inset 0 1px 0 rgba(255, 255, 255, .22);
}

.content-banner-cash-flow::after {
    width: 42%;
    background:
        radial-gradient(circle at 50% 42%, rgba(45, 212, 191, .24), transparent 52%),
        linear-gradient(110deg, transparent, rgba(255, 255, 255, .16));
    opacity: .46;
}

.content-banner-cash-flow h1 {
    max-width: 620px;
    font-size: clamp(31px, 3.25vw, 46px);
    line-height: 1.15;
}

.content-banner-cash-flow span {
    color: rgba(224, 247, 250, .86);
}

html[dir="rtl"] .content-banner-cash-flow {
    background-image:
        linear-gradient(270deg, rgba(8, 36, 63, .94) 0%, rgba(7, 64, 82, .76) 36%, rgba(7, 64, 82, .28) 62%, rgba(7, 64, 82, .08) 100%),
        var(--content-banner-image);
    background-position: center 50%;
}

.content-banner-reports-center {
    min-height: 230px;
    padding: 30px 34px;
    align-items: center;
    background-image:
        linear-gradient(90deg, rgba(5, 22, 39, .94) 0%, rgba(7, 50, 76, .78) 38%, rgba(7, 50, 76, .24) 68%, rgba(7, 50, 76, .06) 100%),
        var(--content-banner-image);
    background-position: center 52%;
    background-size: cover;
    border-color: rgba(34, 211, 238, .24);
    box-shadow:
        0 20px 44px rgba(15, 23, 42, .14),
        inset 0 1px 0 rgba(255, 255, 255, .18);
}

html[dir="rtl"] .content-banner-reports-center {
    background-image:
        linear-gradient(270deg, rgba(5, 22, 39, .94) 0%, rgba(7, 50, 76, .78) 38%, rgba(7, 50, 76, .24) 68%, rgba(7, 50, 76, .06) 100%),
        var(--content-banner-image);
    background-position: center 52%;
}

.content-banner-reports-center h1 {
    max-width: 660px;
    font-size: clamp(32px, 3.35vw, 48px);
    line-height: 1.12;
}

.content-banner-reports-center span {
    color: rgba(224, 247, 250, .88);
}

.banner-signal {
    width: 58px;
    height: 58px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    z-index: 1;
}

.banner-signal svg {
    width: 28px;
    height: 28px;
}

.shell {
    width: min(1220px, calc(100% - 32px));
    margin-inline: auto;
    padding-block: 28px;
    position: relative;
}

.language-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.language-panel,
.module-card,
.roles-panel,
.roles-grid article,
.print-preview article,
.principles,
.panel {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.language-panel {
    width: min(660px, 100%);
    padding: 34px;
    box-shadow: var(--shadow);
}

.brand-mark {
    width: 112px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04)),
        linear-gradient(135deg, var(--primary-strong), var(--primary));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius);
    font-weight: 900;
    letter-spacing: 0;
    margin-block-end: 22px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 12px 26px rgba(15, 118, 110, 0.24);
}

.brand-mark.compact {
    width: 108px;
    height: 40px;
    margin-block-end: 14px;
}

h1,
h2,
p {
    margin-block-start: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    margin-block-end: 12px;
    letter-spacing: 0;
}

h2 {
    font-size: 18px;
    line-height: 1.35;
}

.panel h2,
.print-preview h2,
.roles-panel h2,
.principles h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

p {
    color: var(--muted);
    line-height: 1.8;
    margin-block-end: 24px;
}

.welcome {
    display: inline-flex;
    align-items: center;
    color: var(--primary-strong);
    margin-block-end: 8px;
    font-weight: 800;
}

.language-form,
.stack-form {
    display: grid;
    gap: 16px;
}

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

.option-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: grid;
    gap: 9px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.option-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.38);
}

.option-card:has(input:checked) {
    border-color: rgba(15, 118, 110, 0.72);
    box-shadow:
        0 0 0 3px rgba(15, 118, 110, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-card svg {
    color: var(--gold);
}

.option-card span {
    font-weight: 900;
    font-size: 20px;
}

.option-card small,
.module-card span,
.badges span,
.roles-grid span {
    color: var(--muted);
    font-size: 13px;
}

.language-flash-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: minmax(250px, auto) auto auto;
    align-content: center;
    justify-items: center;
    gap: 0;
    padding: clamp(20px, 3vw, 42px);
    background:
        radial-gradient(circle at 18% 12%, rgba(34, 211, 238, .22), transparent 28%),
        radial-gradient(circle at 86% 16%, rgba(250, 204, 21, .16), transparent 24%),
        linear-gradient(135deg, #071827 0%, #0b2944 45%, #052034 100%);
    color: #fff;
    isolation: isolate;
}

.flash-stage {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 40px));
    height: clamp(270px, 36vh, 410px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(6, 24, 39, .94), rgba(7, 50, 76, .82)),
        #061827;
    box-shadow:
        0 28px 85px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .22);
}

.flash-stage::before,
.flash-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.flash-stage::before {
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(5, 18, 31, .88), rgba(5, 18, 31, .24) 48%, rgba(5, 18, 31, .86)),
        radial-gradient(circle at 51% 45%, rgba(34, 211, 238, .24), transparent 36%);
}

.flash-stage::after {
    display: none;
}

.flash-visual-strip {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: .72;
}

.flash-visual-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.16) contrast(1.06);
    transform: scale(1.05);
    animation: flashImageDrift 6.8s ease-in-out both;
}

.flash-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: .3;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: perspective(700px) rotateX(58deg) translateY(96px) scale(1.35);
    transform-origin: bottom;
    animation: flashGrid 6.8s linear infinite;
}

.flash-scan {
    position: absolute;
    inset: -20%;
    z-index: 5;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .42) 50%, transparent 58%);
    transform: translateX(-80%);
    animation: flashScan 6.8s ease-in-out both;
    mix-blend-mode: screen;
}

.flash-feature {
    position: absolute;
    z-index: 6;
    left: 50%;
    top: 28%;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    direction: ltr;
    text-align: left;
    width: min(720px, calc(100% - 48px));
    padding: clamp(14px, 2vw, 20px);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .045)),
        rgba(4, 25, 41, .42);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translate(-50%, -36%) scale(.94);
    animation: flashFeature 24s cubic-bezier(.2, .9, .22, 1) infinite both;
}

.flash-feature span {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    justify-self: start;
    border-radius: 14px;
    color: #082f49;
    background: linear-gradient(135deg, #facc15, #22d3ee);
    box-shadow: 0 16px 32px rgba(34, 211, 238, .28);
}

.flash-feature svg {
    width: 31px;
    height: 31px;
}

.flash-feature strong {
    display: block;
    direction: ltr;
    text-align: left;
    color: #ffffff;
    font-size: clamp(22px, 2.7vw, 38px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 12px 28px rgba(0, 0, 0, .36);
}

.flash-feature small {
    display: block;
    direction: ltr;
    text-align: left;
    margin-top: 8px;
    color: #d9f5ff;
    font-size: clamp(12px, 1.1vw, 15px);
    font-weight: 850;
    line-height: 1.55;
}

.flash-feature-1 { animation-delay: 4.8s; }
.flash-feature-2 { animation-delay: 9.6s; }
.flash-feature-3 { animation-delay: 14.4s; }
.flash-feature-4 { animation-delay: 19.2s; }

.flash-skip-bar {
    position: absolute;
    z-index: 8;
    top: 18px;
    inset-inline-end: 18px;
}

.flash-skip-bar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(6, 24, 39, .48);
    color: #e0f2fe;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.flash-skip-bar svg {
    width: 15px;
    height: 15px;
}

.flash-logo-scene {
    position: relative;
    z-index: 4;
    isolation: isolate;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(690px, calc(100vw - 56px));
    margin-top: 0;
    transform: translateY(-44%) scale(.72);
    transform-origin: top center;
    opacity: 1;
    animation: none;
}

.flash-logo-scene img {
    position: relative;
    z-index: 2;
    width: min(675px, 92vw);
    max-height: 198px;
    object-fit: contain;
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .38));
}

.flash-logo-scene p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #dff8ff;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-shadow: 0 8px 18px rgba(0, 0, 0, .42);
}

.flash-orbit {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: -10px;
    width: min(640px, 88vw);
    height: 18px;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    overflow: visible;
    animation: none;
}

.flash-orbit::before,
.flash-orbit::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    border-radius: 999px;
    transform: translate(-50%, -50%) scaleX(0);
    transform-origin: center;
    pointer-events: none;
}

.flash-orbit::before {
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #38bdf8 15%, #e0f2fe 50%, #38bdf8 85%, transparent 100%);
    box-shadow:
        0 0 9px rgba(56, 189, 248, .95),
        0 0 22px rgba(14, 165, 233, .78),
        0 0 42px rgba(59, 130, 246, .38);
    animation: flashNeonLine 7.5s ease-in-out infinite;
}

.flash-orbit::after {
    height: 16px;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, .34) 0%, rgba(14, 165, 233, .18) 38%, transparent 74%);
    filter: blur(8px);
    opacity: .78;
    animation: flashNeonLine 7.5s ease-in-out infinite;
}

.flash-language-panel {
    position: relative;
    z-index: 5;
    width: min(680px, calc(100vw - 40px));
    margin-top: clamp(-132px, -12vh, -84px);
    padding: clamp(14px, 1.8vw, 20px);
    border: 1px solid rgba(173, 232, 255, .42);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(9, 52, 82, .76), rgba(5, 28, 48, .58)),
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, .22), transparent 38%),
        rgba(255, 255, 255, .08);
    box-shadow:
        0 30px 86px rgba(0, 0, 0, .36),
        inset 0 1px 0 rgba(255, 255, 255, .38),
        inset 0 -1px 0 rgba(34, 211, 238, .16);
    backdrop-filter: blur(22px) saturate(1.22);
    transform: translateY(20px) scale(.97);
    opacity: 0;
    pointer-events: none;
    animation: flashPanel 1.1s ease .45s both;
    direction: ltr;
    text-align: left;
}

.flash-language-panel .language-form,
.flash-language-panel .field,
.flash-language-panel .option-card {
    direction: ltr;
    text-align: center;
}

.language-flash-shell.flash-finished .flash-stage,
.language-flash-shell.flash-finished .flash-scan,
.language-flash-shell.flash-finished .flash-logo-scene {
    animation-duration: .35s;
    animation-delay: 0s;
}

.language-flash-shell.flash-finished .flash-skip-bar {
    display: none;
}

.language-flash-shell.flash-finished .flash-stage {
    animation: none;
}

.language-flash-shell.flash-finished .flash-scan {
    display: none;
}

.language-flash-shell.flash-finished .flash-feature {
    display: grid;
    animation-duration: 24s;
}

.language-flash-shell.flash-finished .flash-logo-scene {
    animation: none;
    opacity: 1;
    transform: translateY(-44%) scale(.72);
    transform-origin: top center;
}

.language-flash-shell.flash-finished .flash-language-panel {
    animation: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.flash-panel-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin-bottom: 11px;
}

.flash-panel-head > span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #082f49;
    background: linear-gradient(135deg, #facc15, #67e8f9);
    box-shadow: 0 16px 34px rgba(34, 211, 238, .28);
}

.flash-panel-head svg {
    width: 21px;
    height: 21px;
}

.flash-panel-head h1 {
    margin: 0 0 3px;
    color: #ffffff;
    font-size: clamp(18px, 2vw, 24px);
    text-shadow: 0 10px 28px rgba(0, 0, 0, .34);
}

.flash-panel-head p {
    margin: 0;
    color: #caefff;
    font-size: 11.5px;
    font-weight: 850;
    line-height: 1.45;
}

.flash-language-options {
    gap: 8px;
}

.flash-option-card {
    border-radius: 14px;
    justify-items: center;
    align-items: center;
    min-height: 104px;
    padding: 13px 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08)),
        rgba(8, 47, 73, .46);
    border-color: rgba(173, 232, 255, .28);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, .14),
        inset 0 1px 0 rgba(255, 255, 255, .28);
    color: #fff;
    cursor: pointer;
}

.flash-option-card.is-submitting {
    transform: translateY(-2px) scale(.99);
    border-color: rgba(250, 204, 21, .7);
    box-shadow:
        0 0 0 4px rgba(250, 204, 21, .14),
        0 18px 38px rgba(34, 211, 238, .24),
        inset 0 1px 0 rgba(255, 255, 255, .34);
}

.flash-option-card span {
    color: #ffffff;
    font-size: 17px;
    text-align: center;
    text-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.flash-option-card small {
    color: #aee9ff;
    text-align: center;
}

.flash-option-card svg {
    width: 20px;
    height: 20px;
    color: #facc15;
}

.flash-currency-field {
    margin-top: 2px;
    color: #eafaff;
}

.flash-currency-field span {
    color: #eafaff;
}

.flash-currency-field select {
    min-height: 44px;
    border: 1px solid rgba(173, 232, 255, .32);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08)),
        rgba(3, 32, 52, .64);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
}

.flash-currency-field select option {
    color: #0f172a;
}

.flash-continue-button {
    justify-self: center;
    min-width: 220px;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, .95), rgba(34, 211, 238, .92) 48%, rgba(29, 78, 216, .94));
    color: #071827;
    box-shadow: 0 18px 38px rgba(34, 211, 238, .24), inset 0 1px 0 rgba(255, 255, 255, .42);
}

@keyframes flashImageDrift {
    0% { transform: scale(1.08) translateX(0); }
    100% { transform: scale(1.14) translateX(-2%); }
}

@keyframes flashFeature {
    0%, 3% { opacity: 0; transform: translate(-50%, -22%) scale(.92); filter: blur(8px); }
    7%, 20% { opacity: 1; transform: translate(-50%, -36%) scale(1); filter: blur(0); }
    27%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.03); filter: blur(4px); }
}

@keyframes flashScan {
    0% { transform: translateX(-85%) rotate(0deg); opacity: 0; }
    20%, 72% { opacity: .7; }
    100% { transform: translateX(85%) rotate(0deg); opacity: 0; }
}

@keyframes flashLogo {
    0%, 62% { opacity: 0; transform: translateY(-124px) scale(1.42); filter: blur(10px); }
    70%, 84% { opacity: 1; transform: translateY(-92px) scale(1.28); filter: blur(0); }
    100% { opacity: 1; transform: translateY(-26px) scale(.72); filter: blur(0); }
}

@keyframes flashPanel {
    0% { opacity: 0; transform: translateY(20px) scale(.97); pointer-events: none; }
    100% { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
}

@keyframes flashOrbit {
    to { transform: rotate(360deg); }
}

@keyframes flashNeonLine {
    0% {
        opacity: .35;
        transform: translate(-50%, -50%) scaleX(.04);
    }
    46% {
        opacity: 1;
        transform: translate(-50%, -50%) scaleX(1);
    }
    72% {
        opacity: .9;
        transform: translate(-50%, -50%) scaleX(1);
    }
    100% {
        opacity: .28;
        transform: translate(-50%, -50%) scaleX(.04);
    }
}

@keyframes flashFlamePulse {
    0% {
        opacity: .78;
        transform: translateX(-50%) scaleX(.86) scaleY(.82);
        filter: blur(.2px) saturate(1.05);
    }
    48% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.05) scaleY(1.05);
        filter: blur(.05px) saturate(1.35);
    }
    100% {
        opacity: .9;
        transform: translateX(-50%) scaleX(.94) scaleY(.9);
        filter: blur(.15px) saturate(1.18);
    }
}

@keyframes flashGrid {
    to { background-position: 0 58px, 58px 0; }
}

@keyframes flashProgress {
    0% { transform: scaleX(0); transform-origin: left; opacity: .68; }
    100% { transform: scaleX(1); transform-origin: left; opacity: 1; }
}

@media (max-width: 760px) {
    .language-flash-shell {
        grid-template-rows: auto auto;
        padding: 18px;
    }

    .flash-stage {
        width: min(100%, 620px);
        height: 260px;
        border-radius: 16px;
    }

    .flash-visual-strip {
        grid-template-columns: 1fr;
    }

    .flash-visual-strip img + img {
        display: none;
    }

    .flash-feature {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 11px;
        width: calc(100% - 28px);
        padding: 13px;
    }

    .flash-feature span {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .flash-feature svg {
        width: 24px;
        height: 24px;
    }

    .flash-logo-scene {
        width: min(540px, calc(100vw - 50px));
        margin-top: 0;
    }

    .flash-logo-scene img {
        max-height: 138px;
    }

    .flash-orbit {
        bottom: -8px;
        width: min(500px, 82vw);
        height: 14px;
    }

    .language-flash-shell.flash-finished .flash-logo-scene {
        transform: translateY(-44%) scale(.72);
    }

    .flash-panel-head {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .flash-panel-head > span {
        width: 46px;
        height: 46px;
    }
}

.login-crystal-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0;
    padding: clamp(22px, 3vw, 44px);
    background:
        radial-gradient(circle at 16% 10%, rgba(34, 211, 238, .22), transparent 30%),
        radial-gradient(circle at 86% 14%, rgba(250, 204, 21, .14), transparent 24%),
        linear-gradient(135deg, #071827 0%, #0b2944 45%, #052034 100%);
    color: #fff;
    isolation: isolate;
}

.login-visual-stage {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 40px));
    height: clamp(270px, 36vh, 410px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(6, 24, 39, .94), rgba(7, 50, 76, .82)),
        #061827;
    box-shadow:
        0 28px 85px rgba(0, 0, 0, .32),
        inset 0 1px 0 rgba(255, 255, 255, .22);
}

.login-crystal-shell .login-visual-stage {
    display: none;
}

.login-visual-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 18, 31, .88), rgba(5, 18, 31, .24) 48%, rgba(5, 18, 31, .86)),
        radial-gradient(circle at 51% 45%, rgba(34, 211, 238, .24), transparent 36%);
}

.login-visual-strip {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: .72;
}

.login-visual-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.16) contrast(1.06);
    transform: scale(1.08);
    animation: flashImageDrift 12s ease-in-out infinite alternate;
}

.login-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: .28;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: perspective(700px) rotateX(58deg) translateY(96px) scale(1.35);
    transform-origin: bottom;
}

.login-light-sweep {
    position: absolute;
    inset: -20%;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .22) 50%, transparent 58%);
    mix-blend-mode: screen;
    animation: loginSweep 7s ease-in-out infinite;
}

.login-system-points {
    position: absolute;
    z-index: 6;
    inset-inline: clamp(18px, 4vw, 64px);
    bottom: clamp(16px, 3vh, 28px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.login-system-points span {
    display: grid;
    min-height: 38px;
    place-items: center;
    border: 1px solid rgba(173, 232, 255, .28);
    border-radius: 999px;
    background: rgba(8, 47, 73, .46);
    color: #dff8ff;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .6px;
    backdrop-filter: blur(12px);
}

.login-logo-scene {
    position: relative;
    z-index: 4;
    isolation: isolate;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(690px, calc(100vw - 56px));
    margin-top: 0;
    transform: translateY(-18px) scale(.72);
}

.login-logo-scene img {
    position: relative;
    z-index: 2;
    width: min(675px, 92vw);
    max-height: 198px;
    object-fit: contain;
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .38));
}

.login-logo-scene p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #dff8ff;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-shadow: 0 8px 18px rgba(0, 0, 0, .42);
}

.login-orbit {
    animation-duration: 6.8s;
}

.login-crystal-panel {
    position: relative;
    z-index: 5;
    width: min(560px, calc(100vw - 40px));
    margin-top: clamp(6px, 1.2vh, 14px);
    padding: clamp(20px, 2.4vw, 30px);
    border: 1px solid rgba(173, 232, 255, .42);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(9, 52, 82, .78), rgba(5, 28, 48, .6)),
        radial-gradient(circle at 18% 0%, rgba(34, 211, 238, .22), transparent 38%),
        rgba(255, 255, 255, .08);
    box-shadow:
        0 30px 86px rgba(0, 0, 0, .36),
        inset 0 1px 0 rgba(255, 255, 255, .38),
        inset 0 -1px 0 rgba(34, 211, 238, .16);
    backdrop-filter: blur(22px) saturate(1.22);
}

.login-panel-head {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.login-panel-head > span {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 16px;
    color: #082f49;
    background: linear-gradient(135deg, #facc15, #67e8f9);
    box-shadow: 0 16px 34px rgba(34, 211, 238, .28);
}

.login-panel-head svg {
    width: 27px;
    height: 27px;
}

.login-panel-head h1 {
    margin: 0 0 4px;
    color: #fff;
    font-size: clamp(25px, 3vw, 36px);
    text-shadow: 0 10px 28px rgba(0, 0, 0, .34);
}

.login-panel-head p {
    margin: 0;
    color: #caefff;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.6;
}

.login-form {
    gap: 14px;
}

.login-field {
    color: #eafaff;
    gap: 8px;
}

.login-field > span {
    color: #eafaff;
    font-size: 13px;
    font-weight: 950;
}

.login-input-wrap {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    min-height: 48px;
    border: 1px solid rgba(173, 232, 255, .32);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08)),
        rgba(3, 32, 52, .64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
}

.login-input-wrap svg {
    justify-self: center;
    width: 19px;
    height: 19px;
    color: #facc15;
}

.login-input-wrap input {
    width: 100%;
    min-height: 46px;
    border: 0;
    background: transparent !important;
    color: #fff !important;
    caret-color: #fff;
    font-size: 15px;
    font-weight: 800;
    outline: none;
    direction: ltr;
}

.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:hover,
.login-input-wrap input:-webkit-autofill:focus,
.login-input-wrap input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 1000px rgba(3, 32, 52, .86) inset !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(3, 32, 52, .86) inset !important;
    transition: background-color 9999s ease-out 0s;
}

.login-submit-button {
    justify-self: center;
    min-width: 220px;
    min-height: 48px;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, .95), rgba(34, 211, 238, .92) 48%, rgba(29, 78, 216, .94));
    color: #071827;
    box-shadow: 0 18px 38px rgba(34, 211, 238, .24), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.login-alert {
    border-color: rgba(248, 113, 113, .36);
    background: rgba(127, 29, 29, .34);
    color: #fee2e2;
}

@keyframes loginSweep {
    0% { transform: translateX(-90%); opacity: 0; }
    38%, 62% { opacity: .72; }
    100% { transform: translateX(90%); opacity: 0; }
}

@media (max-width: 760px) {
    .login-crystal-shell {
        padding: 18px;
    }

    .login-visual-stage {
        width: min(100%, 620px);
        height: 260px;
        border-radius: 16px;
    }

    .login-visual-strip {
        grid-template-columns: 1fr;
    }

    .login-visual-strip img + img {
        display: none;
    }

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

    .login-logo-scene {
        width: min(540px, calc(100vw - 50px));
        margin-top: 0;
        transform: translateY(-14px) scale(.72);
    }

    .login-logo-scene img {
        max-height: 138px;
    }

    .login-panel-head {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .login-panel-head > span {
        width: 48px;
        height: 48px;
    }
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

select,
input,
button {
    font: inherit;
}

select,
input,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding-inline: 13px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

select:focus,
input:focus,
textarea:focus {
    border-color: rgba(15, 118, 110, 0.62);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea {
    min-height: 84px;
    padding-block: 12px;
    resize: vertical;
}

.alert,
.success {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-block-end: 16px;
    line-height: 1.6;
    border: 1px solid;
}

.alert {
    background: #fff1f2;
    color: var(--danger);
    border-color: #fecdd3;
}

.success {
    background: #ecfdf5;
    color: var(--success);
    border-color: #a7f3d0;
}

.primary-button,
.link-button {
    min-height: var(--button-height);
    border-radius: var(--radius);
    border: 1px solid rgba(29, 78, 216, 0.58);
    color: #08245d;
    font-weight: 900;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 18px;
    cursor: pointer;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.1)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.64), rgba(14, 165, 233, 0.46));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -12px 20px rgba(255, 255, 255, 0.1),
        0 14px 34px rgba(37, 99, 235, 0.24);
    backdrop-filter: blur(14px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.danger-button {
    border: 1px solid rgba(159, 18, 57, 0.45);
    min-height: var(--button-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: #7f1231;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.54), rgba(190, 18, 60, 0.38));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -12px 20px rgba(255, 255, 255, 0.1),
        0 12px 28px rgba(159, 18, 57, 0.2);
    backdrop-filter: blur(14px);
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.danger-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -12px 20px rgba(255, 255, 255, 0.16),
        0 16px 34px rgba(159, 18, 57, 0.26);
}

.primary-button:hover,
.link-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -12px 20px rgba(255, 255, 255, 0.16),
        0 18px 38px rgba(37, 99, 235, 0.28);
}

.link-button.subtle {
    min-height: var(--button-height);
    color: #0b2f78;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.08)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.58), rgba(14, 165, 233, 0.42));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -12px 20px rgba(255, 255, 255, 0.1),
        0 14px 34px rgba(37, 99, 235, 0.24);
}

.boq-create-panel .primary-button:hover,
.boq-workspace .primary-button:hover,
.boq-workspace .link-button:hover,
.boq-workspace .danger-button:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -12px 20px rgba(255, 255, 255, 0.18),
        0 18px 38px rgba(15, 23, 42, 0.16);
}

.boq-workspace .boq-print-button,
.boq-final-index-panel .icon-action[href*="print"] {
    color: #053d30;
    border-color: rgba(15, 118, 110, 0.6);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.08)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.62), rgba(16, 185, 129, 0.44));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -12px 20px rgba(255, 255, 255, 0.1),
        0 14px 34px rgba(15, 118, 110, 0.24);
}

.boq-workspace .boq-certificates-button {
    color: #08245d;
    border-color: rgba(29, 78, 216, .62);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, .1)),
        linear-gradient(135deg, rgba(29, 78, 216, .68), rgba(14, 165, 233, .48));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .98),
        inset 0 -12px 20px rgba(255, 255, 255, .1),
        0 14px 34px rgba(37, 99, 235, .24);
}

.boq-workspace .boq-save-button {
    color: #08245d;
    border-color: rgba(29, 78, 216, 0.62);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.1)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.68), rgba(14, 165, 233, 0.48));
}

.boq-cards-section .icon-action,
.boq-final-index-panel .icon-action,
.boq-workspace .icon-action {
    border-color: rgba(29, 78, 216, 0.38);
    color: #0b2f78;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.34), rgba(14, 165, 233, 0.24));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -10px 18px rgba(255, 255, 255, 0.1),
        0 10px 24px rgba(37, 99, 235, 0.14);
    backdrop-filter: blur(12px);
}

.boq-workspace .icon-action {
    width: var(--button-height);
    height: var(--button-height);
}

.boq-cards-section .icon-action.danger,
.boq-final-index-panel .icon-action.danger,
.boq-workspace .icon-action.danger {
    color: #7f1231;
    border-color: rgba(159, 18, 57, 0.38);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.16)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.34), rgba(190, 18, 60, 0.22));
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-block-end: 24px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.68);
    border-radius: 999px;
    padding: 8px 12px;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-block-end: 24px;
}

.module-card {
    padding: 16px;
    min-height: 126px;
    display: grid;
    align-content: start;
    gap: 9px;
    position: relative;
    overflow: hidden;
}

.module-card::before,
.roles-grid article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--gold));
}

.module-card > svg,
.roles-grid article > svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.module-card h2 {
    margin-block: 0;
}

.roles-panel {
    padding: 18px;
    margin-block-end: 24px;
}

.roles-panel p {
    margin-block-end: 16px;
}

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

.roles-grid article {
    padding: 14px;
    display: grid;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.roles-grid strong {
    line-height: 1.35;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.5fr);
    gap: 16px;
}

.users-page-layout {
    display: grid;
    gap: 16px;
}

.users-create-panel,
.users-table-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(14, 116, 144, .18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(240, 249, 255, .66)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.users-create-panel::before,
.users-table-panel::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 4px;
    background: linear-gradient(180deg, #0284c7, #0f766e);
}

.users-create-panel h2,
.users-table-panel h2 {
    margin: 0 0 14px;
    padding-block-end: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(14, 116, 144, .14);
    color: #164e63;
    font-size: 16px;
    line-height: 1.35;
}

.users-create-panel h2 svg,
.users-table-panel h2 svg {
    width: 18px;
    height: 18px;
}

.users-create-form {
    display: grid;
    grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.1fr) minmax(180px, .85fr) minmax(170px, .75fr);
    gap: 12px;
    align-items: end;
}

.users-create-form .field {
    gap: 6px;
}

.users-create-form .field > span {
    color: #38566a;
    font-size: 11px;
    font-weight: 850;
}

.users-create-form input,
.users-create-form select {
    min-height: 42px;
    padding: 8px 10px;
    border-color: rgba(51, 65, 85, .2);
    font-size: 12px;
    font-weight: 750;
}

.users-create-form select[multiple] {
    min-height: 132px;
    padding-block: 8px;
    line-height: 1.55;
}

.users-disciplines-field {
    grid-column: span 2;
}

.users-disciplines-field small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.55;
}

.users-password-note {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid rgba(4, 120, 87, .2);
    border-radius: var(--radius);
    color: #065f46;
    background: linear-gradient(135deg, rgba(236, 253, 245, .9), rgba(240, 253, 250, .78));
    font-size: 12px;
    font-weight: 850;
}

.users-password-note svg {
    width: 16px;
    height: 16px;
}

.users-create-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.users-create-actions .primary-button {
    min-height: 42px;
    padding-inline: 22px;
    font-size: 12px;
    white-space: nowrap;
}

.users-table-wrap {
    overflow-x: visible;
}

.users-table {
    min-width: 0;
    table-layout: fixed;
}

.users-table th,
.users-table td {
    padding: 10px 11px;
    font-size: 12px;
    line-height: 1.45;
}

.users-table th {
    color: #123c46;
    background:
        linear-gradient(180deg, rgba(224, 242, 254, .9), rgba(240, 253, 250, .9)),
        #f8fafc;
}

.users-table th:nth-child(1) { width: 15%; }
.users-table th:nth-child(2) { width: 20%; }
.users-table th:nth-child(3) { width: 13%; }
.users-table th:nth-child(4) { width: 16%; }
.users-table th:nth-child(5) { width: 22%; }
.users-table th:nth-child(6) { width: 7%; }
.users-table th:nth-child(7) { width: 7%; }

.users-table td {
    color: #243533;
    word-break: break-word;
}

.users-job-title {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-size: 10.5px;
    font-weight: 900;
}

.users-table tbody tr:nth-child(even) td {
    background: rgba(14, 116, 144, .025);
}

.users-status-pill {
    min-width: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding-inline: 9px;
    border: 1px solid rgba(4, 120, 87, .2);
    border-radius: 999px;
    color: #065f46;
    background: rgba(236, 253, 245, .84);
    font-size: 11px;
    font-weight: 900;
}

.project-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
    gap: 16px;
    margin-block-end: 18px;
}

.project-form-panel {
    position: relative;
}

.discipline-form-panel {
    align-self: start;
}

.form-grid {
    display: grid;
    gap: 12px;
}

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

.form-grid.three {
    grid-template-columns: minmax(130px, 0.7fr) minmax(220px, 1.4fr) minmax(180px, 0.9fr);
}

.resource-entry-grid {
    display: grid;
    grid-template-columns: minmax(132px, 0.85fr) minmax(132px, 0.85fr) minmax(230px, 1.45fr) minmax(84px, 0.42fr) minmax(120px, 0.74fr) minmax(112px, 0.62fr) auto;
    gap: 10px;
    align-items: end;
}

.resource-entry-grid.with-category {
    grid-template-columns: minmax(150px, 0.95fr) minmax(126px, 0.72fr) minmax(230px, 1.35fr) minmax(84px, 0.42fr) minmax(116px, 0.68fr) minmax(96px, 0.52fr) auto;
}

.resource-entry-grid.compact-unit-layout {
    grid-template-columns: minmax(110px, 0.55fr) minmax(360px, 2.2fr) minmax(76px, 0.34fr) minmax(120px, 0.68fr) minmax(92px, 0.45fr) auto;
}

.resource-entry-grid.compact-unit-layout .resource-name-field {
    min-width: 0;
}

.resource-entry-grid .unit-field input {
    padding-inline: 9px;
}

.resource-entry-grid.compact-unit-layout .unit-field input {
    padding-inline: 7px;
    text-align: center;
}

.resource-save-button {
    min-width: 132px;
    white-space: nowrap;
}

.resource-hub {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-block-end: 18px;
}

.discipline-dashboard {
    display: grid;
    gap: 16px;
}

.discipline-dashboard-hero {
    min-height: 152px;
    padding: 24px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    position: relative;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    background:
        linear-gradient(115deg, rgba(15, 118, 110, .98), rgba(30, 58, 95, .96)),
        #164e63;
    box-shadow: 0 16px 34px rgba(15, 56, 73, .18);
}

.discipline-dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255, 255, 255, .2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .2) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, #000, transparent 80%);
}

.discipline-dashboard-copy,
.discipline-dashboard-meta {
    position: relative;
    z-index: 1;
}

.discipline-dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d9f9f3;
    font-size: 11px;
    font-weight: 900;
}

.discipline-dashboard-kicker svg {
    width: 16px;
    height: 16px;
}

.discipline-dashboard-copy h1 {
    margin: 8px 0 6px;
    color: #fff;
    font-size: 28px;
    line-height: 1.25;
}

.discipline-dashboard-copy p {
    margin: 0;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
    font-weight: 800;
}

.discipline-dashboard-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discipline-dashboard-meta > div {
    min-width: 118px;
    padding: 10px 14px;
    display: grid;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 7px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
}

.discipline-dashboard-meta small {
    color: rgba(255, 255, 255, .72);
    font-size: 9px;
    font-weight: 900;
}

.discipline-dashboard-meta strong {
    color: #fff;
    font-size: 17px;
}

.discipline-dashboard-meta .link-button {
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .14);
}

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

.discipline-stats article {
    min-height: 78px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 7px 17px rgba(15, 23, 42, .055);
}

.discipline-stats article > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 7px;
}

.discipline-stats article > span.teal { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.discipline-stats article > span.blue { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }
.discipline-stats article > span.amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.discipline-stats article > span.green { background: linear-gradient(135deg, #166534, #22c55e); }

.discipline-stats svg {
    width: 19px;
    height: 19px;
}

.discipline-stats small {
    display: block;
    color: #718096;
    font-size: 10px;
    font-weight: 900;
}

.discipline-stats strong {
    display: block;
    margin-top: 2px;
    color: #233342;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.discipline-module-section {
    padding: 16px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 9px 22px rgba(15, 23, 42, .06);
}

.discipline-section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-block-end: 14px;
    padding-block-end: 11px;
    border-bottom: 1px solid #e2e8f0;
}

.discipline-section-heading > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 7px;
    background: linear-gradient(135deg, #334155, #0f766e);
}

.discipline-section-heading svg {
    width: 18px;
    height: 18px;
}

.discipline-section-heading h2 {
    margin: 0 0 3px;
    color: #263746;
    font-size: 16px;
}

.discipline-section-heading p {
    margin: 0;
    color: #718096;
    font-size: 10px;
    font-weight: 800;
}

.discipline-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.discipline-module-grid.commercial-modules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discipline-module-card {
    --module-color: #0f766e;
    --module-dark: #115e59;
    min-height: 150px;
    padding: 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    gap: 10px;
    overflow: hidden;
    position: relative;
    color: inherit;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--module-color) 24%, #d8e0e8);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .88)),
        color-mix(in srgb, var(--module-color) 8%, transparent);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.discipline-module-card::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--module-color), var(--module-dark));
}

.discipline-module-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--module-color) 45%, #d8e0e8);
    box-shadow: 0 13px 26px color-mix(in srgb, var(--module-color) 13%, transparent);
}

.discipline-module-card.blue { --module-color: #2563eb; --module-dark: #1e3a8a; }
.discipline-module-card.amber { --module-color: #d97706; --module-dark: #92400e; }
.discipline-module-card.violet { --module-color: #7c3aed; --module-dark: #4c1d95; }
.discipline-module-card.analysis { --module-color: #0f766e; --module-dark: #164e63; }
.discipline-module-card.boqs { --module-color: #b45309; --module-dark: #78350f; }
.discipline-module-card.print-settings { --module-color: #475569; --module-dark: #1e293b; }

.discipline-module-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--module-color), var(--module-dark));
}

.discipline-module-icon svg {
    width: 19px;
    height: 19px;
}

.discipline-module-content {
    min-width: 0;
}

.discipline-module-content small {
    color: #718096;
    font-size: 9px;
    font-weight: 900;
}

.discipline-module-content h3 {
    margin: 3px 0 0;
    color: #263746;
    font-size: 14px;
    line-height: 1.45;
}

.discipline-module-count {
    min-width: 34px;
    padding: 5px 8px;
    color: var(--module-dark);
    border: 1px solid color-mix(in srgb, var(--module-color) 24%, transparent);
    border-radius: 6px;
    background: color-mix(in srgb, var(--module-color) 9%, #fff);
    font-size: 16px;
    text-align: center;
}

.discipline-module-action {
    grid-column: 1 / -1;
    align-self: end;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-block-start: 9px;
    color: var(--module-dark);
    border-top: 1px solid color-mix(in srgb, var(--module-color) 18%, #e2e8f0);
    font-size: 10px;
    font-weight: 900;
}

.discipline-module-action svg {
    width: 14px;
    height: 14px;
}

.discipline-boq-counts {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.discipline-boq-counts span {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: #5f4a25;
    border: 1px solid #f1d8aa;
    border-radius: 6px;
    background: #fffaf0;
    font-size: 9px;
    font-weight: 900;
}

.discipline-boq-counts strong {
    font-size: 14px;
}

.future-section {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .88), rgba(241, 245, 249, .72));
}

.discipline-future-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.discipline-future-card {
    min-height: 58px;
    padding: 9px 11px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px dashed #cbd5e0;
    border-radius: 7px;
    background: rgba(255, 255, 255, .62);
}

.discipline-future-card > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #64748b;
    border-radius: 6px;
    background: #eef2f7;
}

.discipline-future-card svg {
    width: 16px;
    height: 16px;
}

.discipline-future-card strong {
    color: #475569;
    font-size: 11px;
}

.discipline-future-card small {
    padding: 4px 7px;
    color: #64748b;
    border-radius: 5px;
    background: #e2e8f0;
    font-size: 8px;
    font-weight: 900;
}

@media (max-width: 1050px) {
    .discipline-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .discipline-module-grid.commercial-modules,
    .discipline-future-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .discipline-dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .discipline-dashboard-meta {
        align-items: stretch;
    }

    .discipline-dashboard-meta .link-button {
        flex: 1;
    }

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

@media (max-width: 560px) {
    .discipline-dashboard-copy h1 {
        font-size: 22px;
    }

    .discipline-dashboard-meta,
    .discipline-module-grid,
    .discipline-module-grid.commercial-modules,
    .discipline-future-grid {
        grid-template-columns: 1fr;
    }

    .discipline-dashboard-meta {
        display: grid;
    }
}

.hub-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    padding: 22px;
    display: grid;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-height: 180px;
}

.hub-card > svg {
    width: 34px;
    height: 34px;
    color: var(--primary);
}

.hub-card span {
    font-size: 24px;
    font-weight: 900;
}

.hub-card p {
    margin: 0;
}

.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: 14px 18px;
}

.category-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gold-soft);
    border: 1px solid rgba(183, 121, 31, 0.2);
    color: #7c4a03;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
}

.resource-table-panel {
    display: grid;
    gap: 14px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-tab {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-inline: 12px;
    cursor: pointer;
    font-weight: 900;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.category-tab:hover {
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 118, 110, 0.2);
}

.category-tab.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 10px 22px rgba(15, 118, 110, 0.16);
}

.resource-table-wrap table {
    min-width: 860px;
}

.table-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    border-radius: 999px;
    padding-inline: 10px;
    background: var(--gold-soft);
    color: #7c4a03;
    border: 1px solid rgba(183, 121, 31, 0.18);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.resource-data-table strong {
    color: var(--text);
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 92px;
    flex-wrap: nowrap;
}

.table-actions form {
    margin: 0;
}

.table-actions .icon-action {
    width: 42px;
    height: 42px;
}

.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
    display: none;
}

.resource-modal {
    width: min(920px, 100%);
    max-height: min(680px, calc(100vh - 40px));
    overflow: auto;
    padding: 16px;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(183, 121, 31, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(18px);
}

.resource-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 16px;
}

.resource-modal-head h2 {
    margin: 0;
    font-size: 17px;
}

.resource-live-message[hidden] {
    display: none;
}

.resource-modal .stack-form {
    gap: 12px;
}

.resource-modal .resource-entry-grid,
.resource-modal .resource-entry-grid.with-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.resource-modal .field {
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
}

.resource-modal input,
.resource-modal select {
    min-height: 40px;
    height: 40px;
    padding-inline: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.resource-modal input[type="number"] {
    direction: ltr;
    text-align: start;
    font-variant-numeric: tabular-nums;
}

.resource-modal .resource-save-button {
    grid-column: 1 / -1;
    min-height: var(--button-height);
    width: max-content;
    min-width: 170px;
    justify-self: end;
    font-size: 13px;
}

.resource-page {
    --resource-accent: #0f766e;
    --resource-accent-strong: #155e75;
    --resource-accent-soft: rgba(15, 118, 110, .09);
    display: grid;
    gap: 14px;
}

.resource-page-labor {
    --resource-accent: #2563eb;
    --resource-accent-strong: #1e3a8a;
    --resource-accent-soft: rgba(37, 99, 235, .09);
}

.resource-page-equipment {
    --resource-accent: #b45309;
    --resource-accent-strong: #7c2d12;
    --resource-accent-soft: rgba(180, 83, 9, .09);
}

.resource-page-subcontractors {
    --resource-accent: #7c3aed;
    --resource-accent-strong: #4c1d95;
    --resource-accent-soft: rgba(124, 58, 237, .085);
}

.resource-page > .topbar {
    margin-block-end: 0;
}

.resource-tools-strip {
    display: grid;
    grid-template-columns: minmax(270px, .7fr) minmax(0, 1.7fr);
    gap: 12px;
    align-items: stretch;
}

.resource-tools-strip.import-only {
    grid-template-columns: 1fr;
}

.resource-tool-card {
    position: relative;
    min-height: 0;
    padding: 12px 14px;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--resource-accent) 24%, #d7dee6);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .84)),
        var(--resource-accent-soft);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .065);
}

.resource-tool-card::before,
.resource-create-panel::before,
.resource-list-panel::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--resource-accent), var(--resource-accent-strong));
}

.resource-tool-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-block-end: 9px;
}

.resource-tool-heading > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--resource-accent), var(--resource-accent-strong));
    box-shadow: 0 4px 10px color-mix(in srgb, var(--resource-accent) 25%, transparent);
}

.resource-tool-heading svg {
    width: 15px;
    height: 15px;
}

.resource-tool-heading h2 {
    margin: 0;
    color: #263746;
    font-size: 14px;
    font-weight: 900;
}

.resource-compact-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(130px, 1.25fr) auto;
    gap: 9px;
    align-items: end;
}

.category-create-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.resource-compact-form .field,
.resource-import-fields .field {
    min-width: 0;
    gap: 4px;
}

.resource-compact-form .field > span,
.resource-import-fields .field > span {
    color: #526171;
    font-size: 10px;
    font-weight: 900;
}

.resource-compact-form input,
.resource-compact-form select,
.resource-import-fields input,
.resource-import-fields select {
    min-width: 0;
    height: 38px;
    min-height: 38px;
    padding-inline: 9px;
    font-size: 11px;
    font-weight: 800;
}

.resource-compact-form input[type="file"],
.resource-import-fields input[type="file"] {
    padding: 5px 7px;
    background: rgba(255, 255, 255, .88);
}

.resource-tool-button {
    min-width: 112px;
    min-height: 38px;
    height: 38px;
    padding-inline: 13px;
    font-size: 11px;
}

.import-resource-form {
    display: grid;
    gap: 9px;
}

.resource-import-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    align-items: end;
}

.import-resource-form.with-category .resource-import-fields {
    grid-template-columns: minmax(150px, .7fr) minmax(240px, 1.3fr);
}

.resource-import-card .resource-import-help {
    min-width: 0;
    min-height: 50px;
    padding: 8px 9px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--resource-accent) 20%, #d7dee6);
    border-radius: 7px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42)),
        var(--resource-accent-soft);
}

.resource-import-card .resource-import-help-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--resource-accent-strong);
    border-radius: 6px;
    background: color-mix(in srgb, var(--resource-accent) 13%, #fff);
    border: 1px solid color-mix(in srgb, var(--resource-accent) 18%, #fff);
}

.resource-import-card .resource-import-help-icon svg {
    width: 14px;
    height: 14px;
}

.resource-import-card .resource-import-help-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.resource-import-card .resource-import-help p {
    display: block;
    margin: 0;
    color: #536273;
    font-size: 9.5px;
    font-weight: 750;
    line-height: 1.45;
}

.resource-import-card .resource-import-help code {
    min-width: 0;
    width: max-content;
    max-width: 100%;
    padding: 3px 7px;
    overflow-wrap: anywhere;
    color: var(--resource-accent-strong);
    border: 1px solid color-mix(in srgb, var(--resource-accent) 18%, #d7dee6);
    border-radius: 5px;
    background: rgba(255, 255, 255, .72);
    font-size: 9px;
}

.resource-import-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, auto));
    gap: 7px;
    align-items: center;
}

.resource-import-actions .link-button,
.resource-import-actions .resource-tool-button {
    min-width: 112px;
    min-height: 36px;
    height: 36px;
    justify-content: center;
    padding-inline: 10px;
    font-size: 10px;
    white-space: nowrap;
}

.resource-create-panel,
.resource-list-panel {
    position: relative;
    overflow: hidden;
    padding: 15px 16px;
    border-color: color-mix(in srgb, var(--resource-accent) 22%, #d7dee6);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .9)),
        var(--resource-accent-soft);
    box-shadow: 0 10px 25px rgba(15, 23, 42, .075);
}

.resource-section-heading {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-block-end: 12px;
    padding-block-end: 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--resource-accent) 18%, #d7dee6);
}

.resource-section-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--resource-accent), var(--resource-accent-strong));
    box-shadow: 0 5px 12px color-mix(in srgb, var(--resource-accent) 24%, transparent);
}

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

.resource-section-heading h2 {
    margin: 0 0 2px;
    color: #263746;
    font-size: 15px;
    font-weight: 900;
}

.resource-section-heading p {
    margin: 0;
    color: #718096;
    font-size: 10px;
    font-weight: 800;
}

.resource-create-panel .resource-entry-grid {
    padding: 11px;
    border: 1px solid color-mix(in srgb, var(--resource-accent) 17%, #d7dee6);
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
}

.resource-create-panel .field {
    gap: 4px;
}

.resource-create-panel .field > span {
    color: #526171;
    font-size: 10px;
    font-weight: 900;
}

.resource-create-panel input,
.resource-create-panel select {
    height: 40px;
    min-height: 40px;
    padding-inline: 9px;
    font-size: 11px;
    font-weight: 800;
}

.resource-create-panel .resource-save-button {
    min-height: 40px;
    height: 40px;
    font-size: 11px;
}

.resource-create-panel .form-hint {
    margin: 8px 3px 0;
    color: #718096;
    font-size: 10px;
    font-weight: 700;
}

.resource-tabs-panel {
    padding: 8px 10px;
    border-color: color-mix(in srgb, var(--resource-accent) 22%, #d7dee6);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .055);
}

.resource-tabs-panel .category-tabs {
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.resource-tabs-panel .category-tab {
    min-height: 34px;
    padding-inline: 10px;
    gap: 6px;
    border-color: rgba(100, 116, 139, .16);
    background: rgba(248, 250, 252, .9);
    font-size: 10px;
}

.resource-tabs-panel .category-tab svg {
    width: 14px;
    height: 14px;
}

.resource-tabs-panel .category-tab.active {
    border-color: rgba(255, 255, 255, .34);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), transparent),
        linear-gradient(135deg, var(--resource-accent), var(--resource-accent-strong));
    box-shadow: 0 6px 14px color-mix(in srgb, var(--resource-accent) 20%, transparent);
}

.resource-list-panel {
    gap: 0;
}

.resource-list-heading {
    margin-block-end: 12px;
}

.resource-list-panel .resource-table-wrap {
    overflow: visible;
    border: 1px solid #b7c1cc;
    border-radius: 7px;
    background: #fff;
}

.resource-list-panel .resource-data-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 11px;
}

.resource-list-panel .resource-data-table th {
    height: 42px;
    padding: 8px 6px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(135deg, #334155, var(--resource-accent-strong));
    font-size: 10px;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
}

.resource-list-panel .resource-data-table td {
    height: 48px;
    padding: 7px 6px;
    border: 1px solid #d7dee6;
    color: #334155;
    font-size: 10px;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
}

.resource-list-panel .resource-data-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--resource-accent-soft) 55%, #fff);
}

.resource-list-panel .resource-data-table tbody tr:hover {
    background: color-mix(in srgb, var(--resource-accent-soft) 88%, #fff);
}

.resource-list-panel .resource-data-table strong {
    color: #1f2937;
    font-size: 11px;
}

.resource-list-panel .table-chip {
    min-height: 26px;
    padding-inline: 8px;
    gap: 5px;
    border-radius: 6px;
    font-size: 9px;
}

.resource-list-panel .table-chip svg {
    width: 12px;
    height: 12px;
}

.resource-list-panel .table-actions {
    min-width: 0;
    justify-content: center;
    gap: 5px;
}

.resource-list-panel .table-actions .icon-action {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.resource-list-panel .table-actions .icon-action svg {
    width: 15px;
    height: 15px;
}

.resource-page-materials .resource-data-table th:nth-child(1),
.resource-page-materials .resource-data-table td:nth-child(1) { width: 15%; }
.resource-page-materials .resource-data-table th:nth-child(2),
.resource-page-materials .resource-data-table td:nth-child(2) { width: 11%; }
.resource-page-materials .resource-data-table th:nth-child(3),
.resource-page-materials .resource-data-table td:nth-child(3) { width: 29%; }
.resource-page-materials .resource-data-table th:nth-child(4),
.resource-page-materials .resource-data-table td:nth-child(4) { width: 10%; }
.resource-page-materials .resource-data-table th:nth-child(5),
.resource-page-materials .resource-data-table td:nth-child(5) { width: 13%; }
.resource-page-materials .resource-data-table th:nth-child(6),
.resource-page-materials .resource-data-table td:nth-child(6) { width: 9%; }
.resource-page-materials .resource-data-table th:nth-child(7),
.resource-page-materials .resource-data-table td:nth-child(7) { width: 13%; }

.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(1),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(1) { width: 13%; }
.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(2),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(2) { width: 39%; }
.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(3),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(3) { width: 10%; }
.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(4),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(4) { width: 15%; }
.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(5),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(5) { width: 9%; }
.resource-page:not(.resource-page-materials) .resource-data-table th:nth-child(6),
.resource-page:not(.resource-page-materials) .resource-data-table td:nth-child(6) { width: 14%; }

@media (max-width: 1180px) {
    .resource-tools-strip {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 760px) {
    .resource-compact-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-import-card .resource-import-help {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .resource-import-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-tool-button {
        width: 100%;
    }

    .resource-list-panel .resource-data-table th,
    .resource-list-panel .resource-data-table td {
        width: auto !important;
    }
}

@media (max-width: 560px) {
    .resource-compact-form,
    .category-create-form,
    .resource-import-help,
    .import-resource-form.with-category .resource-import-fields {
        grid-template-columns: 1fr;
    }

    .resource-import-card .resource-import-help-icon {
        display: none;
    }

    .resource-import-actions {
        grid-column: auto;
    }
}

.certificate-page {
    display: grid;
    gap: 14px;
}

.certificate-page > .topbar {
    margin-block-end: 0;
}

.certificate-hero {
    border-color: rgba(29, 78, 216, .22);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .92), rgba(219, 234, 254, .76)),
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(245, 158, 11, .08));
}

.certificate-selector-card,
.certificate-editor-card,
.certificate-register-card,
.certificate-preview-card {
    position: relative;
    overflow: hidden;
    padding: 15px 16px;
    border-color: rgba(37, 99, 235, .2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 250, 252, .92)),
        rgba(219, 234, 254, .16);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .075);
}

.certificate-selector-card::before,
.certificate-editor-card::before,
.certificate-register-card::before,
.certificate-preview-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #0f766e, #f59e0b);
}

.certificate-card-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-block-end: 12px;
}

.certificate-card-heading > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    box-shadow: 0 7px 15px rgba(37, 99, 235, .2);
}

.certificate-card-heading > span svg {
    width: 18px;
    height: 18px;
}

.certificate-card-heading > div {
    min-width: 0;
    flex: 1;
}

.certificate-card-heading h2,
.certificate-card-heading p {
    margin: 0;
}

.certificate-card-heading h2 {
    color: #18324d;
    font-size: 15px;
}

.certificate-card-heading p {
    margin-block-start: 3px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.5;
}

.certificate-boq-selector {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.5fr);
    gap: 12px;
    align-items: end;
}

.certificate-boq-selector label {
    display: grid;
    gap: 6px;
    color: #415b73;
    font-size: 10.5px;
    font-weight: 900;
}

.certificate-boq-selector select {
    width: 100%;
    min-height: 42px;
    border-color: rgba(37, 99, 235, .28);
    background: rgba(255, 255, 255, .94);
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 820px) {
    .certificate-boq-selector {
        grid-template-columns: 1fr;
    }
}

.certificate-empty-note {
    margin: 0;
    padding: 12px;
    border: 1px dashed rgba(37, 99, 235, .3);
    border-radius: 7px;
    background: rgba(219, 234, 254, .35);
    color: #31516f;
    font-size: 12px;
    text-align: center;
}

.certificate-contract-strip {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(120px, .7fr));
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 7px;
    overflow: hidden;
    background: rgba(236, 253, 245, .72);
    box-shadow: 0 8px 20px rgba(15, 118, 110, .07);
}

.certificate-contract-strip > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-inline-end: 1px solid rgba(15, 118, 110, .18);
}

.certificate-contract-strip > div:last-child {
    border-inline-end: 0;
}

.certificate-contract-strip small {
    color: #527067;
    font-size: 9.5px;
    font-weight: 800;
}

.certificate-contract-strip strong {
    overflow: hidden;
    color: #124e42;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-form {
    display: grid;
    gap: 12px;
}

.certificate-meta-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.8fr) minmax(155px, .7fr) minmax(250px, 1fr);
    gap: 10px;
}

.certificate-meta-grid .field {
    gap: 5px;
}

.certificate-meta-grid .field > span,
.certificate-notes-field > span {
    color: #43566a;
    font-size: 10px;
    font-weight: 900;
}

.certificate-meta-grid input {
    min-height: 40px;
    font-size: 11px;
    font-weight: 800;
}

.certificate-table-wrap {
    overflow: visible;
    border: 1px solid #111;
    border-radius: 4px;
}

.certificate-table,
.certificate-register-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.certificate-table th,
.certificate-table td,
.certificate-register-table th,
.certificate-register-table td {
    border: 1px solid #111;
    padding: 6px 4px;
    text-align: center;
    vertical-align: middle;
}

.certificate-table thead th,
.certificate-register-table thead th {
    color: #111;
    background: linear-gradient(180deg, #dbeafe, #bfdbfe);
    font-size: 9px;
    font-weight: 950;
    line-height: 1.35;
}

.certificate-table tbody td {
    color: #263746;
    background: rgba(255, 255, 255, .94);
    font-size: 9px;
}

.certificate-table tbody tr:nth-child(even) td {
    background: rgba(239, 246, 255, .55);
}

.certificate-table tbody tr.is-quantity-overrun td,
.certificate-preview-table tbody tr.is-quantity-overrun td {
    color: #7f1d1d;
    background: rgba(254, 202, 202, .64);
}

.certificate-table tbody tr.is-quantity-overrun input {
    color: #7f1d1d;
    border-color: rgba(220, 38, 38, .48);
    background: rgba(255, 241, 242, .94);
    font-weight: 900;
}

.certificate-table tbody tr.is-quantity-overrun .certificate-note-input {
    color: #991b1b;
}

.certificate-table .certificate-description {
    text-align: start;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.certificate-table .number,
.certificate-register-table .number {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.certificate-table input {
    width: 100%;
    min-width: 0;
    height: 31px;
    padding: 4px;
    border-radius: 4px;
    font-size: 9px;
    text-align: center;
}

.certificate-table input[type="number"]::-webkit-outer-spin-button,
.certificate-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.certificate-table input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.certificate-table .certificate-qty-input {
    color: #0b3b73;
    border-color: rgba(37, 99, 235, .38);
    background: #eff6ff;
    font-weight: 900;
}

.certificate-table .certificate-note-input {
    text-align: start;
    height: 36px;
    min-height: 36px;
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 9px;
    line-height: 1.35;
}

.certificate-overrun-indicator {
    display: block;
    margin-top: 4px;
    padding: 3px 5px;
    border: 1px solid rgba(185, 28, 28, .35);
    border-radius: 4px;
    background: rgba(254, 226, 226, .95);
    color: #991b1b;
    font-size: 9px;
    font-weight: 950;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.certificate-overrun-indicator.is-negative-correction {
    border-color: rgba(234, 88, 12, .42);
    background: rgba(255, 237, 213, .98);
    color: #9a3412;
    font-weight: 950;
}

.certificate-table .certificate-current-value {
    color: #075f4f;
    font-weight: 950;
}

.certificate-table tfoot th {
    padding: 8px;
    border: 1px solid #111;
    color: #111;
    background: #f6c453;
    font-size: 10px;
    font-weight: 950;
}

.certificate-table .cert-col-no { width: 4%; }
.certificate-table .cert-col-desc { width: 36%; }
.certificate-table .cert-col-contract { width: 6%; }
.certificate-table .cert-col-unit { width: 5%; }
.certificate-table .cert-col-qty { width: 6%; }
.certificate-table .cert-col-progress { width: 6%; }
.certificate-table .cert-col-price { width: 7%; }
.certificate-table .cert-col-value { width: 8%; }
.certificate-table .cert-col-notes { width: 10%; }

.certificate-table .certificate-percent-input {
    width: 100%;
    min-width: 0;
    border: 1px solid #60a5fa;
    border-radius: 5px;
    background: #eff6ff;
    color: #12335b;
    font-weight: 900;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.certificate-bottom-grid {
    display: grid;
    grid-template-columns: minmax(220px, .55fr) minmax(440px, 1fr);
    gap: 12px;
    align-items: start;
}

.certificate-notes-field {
    display: grid;
    gap: 6px;
}

.certificate-notes-field textarea {
    min-height: 175px;
    resize: vertical;
    font-size: 11px;
    line-height: 1.65;
}

.certificate-signatures-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(29, 78, 216, .2);
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(239, 246, 255, .92), rgba(255, 255, 255, .96));
}

.certificate-signatures-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.certificate-signatures-heading h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #17365d;
    font-size: 13px;
}

.certificate-signatures-heading h3 svg {
    width: 17px;
    height: 17px;
}

.certificate-signatures-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 10px;
}

.certificate-signature-grid:empty::after {
    content: "";
    display: block;
    min-height: 2px;
}

.certificate-signatures-save {
    width: min(320px, 100%);
    min-height: 42px;
    justify-self: center;
}

.certificate-summary-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
}

.certificate-summary-table th,
.certificate-summary-table td {
    border: 1px solid #111;
    padding: 8px 10px;
    font-size: 10px;
}

.certificate-summary-table th {
    text-align: start;
    background: #eff6ff;
}

.certificate-summary-table td {
    text-align: center;
    background: #fff;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.certificate-summary-table .certificate-net-row th,
.certificate-summary-table .certificate-net-row td {
    color: #111;
    background: #dbeafe;
    font-size: 12px;
}

.certificate-summary-table .certificate-previous-total-row th,
.certificate-summary-table .certificate-previous-total-row td {
    color: #111;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 950;
}

.certificate-summary-table .certificate-all-total-row th,
.certificate-summary-table .certificate-all-total-row td {
    color: #111;
    background: #f6c453;
    font-size: 12px;
    font-weight: 950;
}

.certificate-final-calculation {
    table-layout: fixed;
}

.certificate-final-calculation thead th {
    color: #111;
    background: linear-gradient(180deg, #dbeafe, #bfdbfe);
    text-align: center;
    font-weight: 950;
}

.certificate-final-calculation thead th:nth-child(1),
.certificate-final-calculation tbody th {
    width: 55%;
}

.certificate-final-calculation thead th:nth-child(2),
.certificate-final-calculation tbody td:nth-child(2) {
    width: 15%;
}

.certificate-final-calculation thead th:nth-child(3),
.certificate-final-calculation tbody td:nth-child(3) {
    width: 30%;
}

.certificate-final-calculation .certificate-before-tax-row th,
.certificate-final-calculation .certificate-before-tax-row td {
    background: #f8fafc;
    font-weight: 950;
}

.certificate-signatures-link {
    min-height: 38px;
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.03)),
        linear-gradient(135deg, #047857, #10b981);
}

.certificate-signatures-page,
.certificate-party-signatures-form {
    display: grid;
    gap: 14px;
}

.certificate-signatures-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid rgba(14, 116, 144, .2);
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(236, 254, 255, .94), rgba(255, 255, 255, .98));
}

.certificate-signatures-intro > svg {
    width: 28px;
    height: 28px;
    color: #0e7490;
}

.certificate-signatures-intro div {
    display: grid;
    gap: 3px;
}

.certificate-signatures-intro strong {
    color: #164e63;
    font-size: 12px;
}

.certificate-signatures-intro span {
    color: #64748b;
    font-size: 10px;
}

.certificate-party-row {
    display: grid;
    gap: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, .16);
    border-inline-start: 5px solid #0284c7;
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,246,255,.66)),
        #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.certificate-party-row::before {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 120px;
    height: 120px;
    opacity: .12;
    background: radial-gradient(circle, var(--party-tone, #2563eb), transparent 68%);
    content: "";
    pointer-events: none;
}

.certificate-party-row.contractor { --party-tone: #0f766e; border-inline-start-color: #0f766e; }
.certificate-party-row.consultant { --party-tone: #2563eb; border-inline-start-color: #2563eb; }
.certificate-party-row.owner { --party-tone: #b45309; border-inline-start-color: #b45309; }

.certificate-party-heading {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
}

.certificate-party-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--party-tone, #2563eb) 52%, #fff);
    border-radius: 10px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%),
        linear-gradient(180deg, color-mix(in srgb, var(--party-tone, #2563eb) 82%, #fff), var(--party-tone, #2563eb));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 8px 18px color-mix(in srgb, var(--party-tone, #2563eb) 22%, transparent);
}

.certificate-party-icon svg {
    width: 19px;
    height: 19px;
}

.certificate-party-heading h2 {
    margin: 0;
    color: color-mix(in srgb, var(--party-tone, #2563eb) 72%, #10233d);
    font-size: 14px;
    font-weight: 950;
}

.certificate-party-heading p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
}

.certificate-party-empty {
    margin: 0;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
    font-size: 10px;
}

.certificate-party-empty[hidden] {
    display: none;
}

.certificate-party-save {
    width: min(380px, 100%);
    min-height: 44px;
    justify-self: center;
}

.certificate-signatures-page :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action),
.certificate-party-signatures-form :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action) {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 15px !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 9px 18px rgba(37, 99, 235, .18) !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 950 !important;
    text-decoration: none !important;
}

.certificate-signatures-page :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action):hover,
.certificate-party-signatures-form :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action):hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, .72) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 44%),
        linear-gradient(180deg, #60a5fa 0%, #1d4ed8 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        0 12px 22px rgba(37, 99, 235, .22) !important;
}

.certificate-signatures-page :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action) svg,
.certificate-party-signatures-form :is(.primary-button, .link-button, button[type="button"], button[type="submit"]):not(.danger):not(.icon-action) svg {
    width: 16px !important;
    height: 16px !important;
    color: #fff !important;
    flex: 0 0 auto !important;
}

.certificate-save-button {
    width: min(360px, 100%);
    min-height: 42px;
    justify-self: center;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.02)),
        linear-gradient(135deg, #1d4ed8, #0ea5e9);
}

.certificate-form-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.certificate-form-actions.is-editing .certificate-save-button {
    width: min(360px, 48%);
}

.certificate-cancel-edit-button,
.certificate-cancel-edit-button:hover,
.certificate-cancel-edit-button:focus-visible {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.02)),
        linear-gradient(135deg, #dc2626, #991b1b);
    border-color: rgba(220, 38, 38, .55);
}

.certificate-count {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #075f4f;
    background: rgba(16, 185, 129, .14);
    border: 1px solid rgba(15, 118, 110, .22);
}

.certificate-register-table thead th {
    background: linear-gradient(180deg, #d1fae5, #a7f3d0);
    color: #0f172a;
    font-size: 8.8px;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    word-break: keep-all;
}

.certificate-register-table tbody td {
    padding: 7px 5px;
    color: #334155;
    background: rgba(255, 255, 255, .94);
    font-size: 9px;
    line-height: 1.35;
    text-align: center;
    vertical-align: middle;
}

.certificate-register-table {
    table-layout: fixed;
}

.certificate-register-table .cert-register-col-serial { width: 4%; }
.certificate-register-table .cert-register-col-number { width: 7%; }
.certificate-register-table .cert-register-col-title { width: 23%; }
.certificate-register-table .cert-register-col-date { width: 9%; }
.certificate-register-table .cert-register-col-money { width: 9%; }
.certificate-register-table .cert-register-col-net { width: 10%; }
.certificate-register-table .cert-register-col-status { width: 8%; }
.certificate-register-table .cert-register-col-actions { width: 12%; }

.certificate-register-table .number {
    font-size: 8.8px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.certificate-register-table tbody td:nth-child(4),
.certificate-register-table tbody td:nth-child(9) {
    white-space: nowrap;
}

.certificate-register-table tbody td:nth-child(10) {
    padding-inline: 4px;
}

.certificate-register-table tbody tr:nth-child(even) td {
    background: rgba(236, 253, 245, .5);
}

.certificate-register-table tbody tr.is-selected td {
    background: rgba(219, 234, 254, .75);
}

.certificate-register-title {
    text-align: start !important;
    font-weight: 850;
    white-space: normal;
    overflow-wrap: anywhere;
}

.certificate-number-chip,
.certificate-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
}

.certificate-number-chip {
    color: #1e3a8a;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.certificate-status {
    color: #36566f;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    font-size: 8.5px;
    font-weight: 900;
}

.certificate-status.approved,
.certificate-status.paid {
    color: #065f46;
    background: #d1fae5;
    border-color: #6ee7b7;
}

.certificate-status.cancelled {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.certificate-register-table .boq-action-buttons {
    min-height: 30px;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.certificate-register-table .boq-action-buttons form {
    margin: 0;
}

.certificate-register-table .boq-action-buttons .icon-action {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
    border-radius: 5px;
    display: inline-grid;
    place-items: center;
    line-height: 0;
}

.certificate-register-table .boq-action-buttons .icon-action svg {
    width: 12.5px;
    height: 12.5px;
    margin: 0;
}

.certificate-empty-row {
    padding: 22px !important;
    color: #64748b !important;
    text-align: center !important;
}

.certificate-preview-card {
    padding: 15px 16px;
    border-color: rgba(15, 118, 110, .24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(236, 253, 245, .68)),
        rgba(16, 185, 129, .08);
}

.certificate-preview-card::before {
    background: linear-gradient(180deg, #0f766e, #10b981);
}

.certificate-preview-card .certificate-card-heading > span {
    background: linear-gradient(135deg, #0f766e, #10b981);
    box-shadow: 0 7px 15px rgba(15, 118, 110, .18);
}

.certificate-preview-print {
    color: #075f4f;
    border-color: rgba(15, 118, 110, .32);
    background:
        linear-gradient(145deg, rgba(255,255,255,.68), rgba(255,255,255,.16)),
        linear-gradient(135deg, rgba(16,185,129,.3), rgba(15,118,110,.18));
}

.certificate-preview-table tbody td {
    background: rgba(255, 255, 255, .9);
}

.certificate-preview-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #111;
}

.certificate-preview-summary > div {
    display: grid;
    gap: 5px;
    padding: 9px 11px;
    border-inline-end: 1px solid #111;
    text-align: center;
    background: #eff6ff;
}

.certificate-preview-summary > div:last-child {
    border-inline-end: 0;
}

.certificate-preview-summary small {
    color: #526171;
    font-size: 9px;
    font-weight: 900;
}

.certificate-preview-summary strong {
    color: #18324d;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.certificate-preview-bottom {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(390px, 1fr);
    gap: 12px;
    margin-block-start: 12px;
    align-items: start;
}

.certificate-preview-calculation {
    background: #fff;
}

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

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

    .certificate-preview-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .certificate-bottom-grid {
        grid-template-columns: 1fr;
    }

    .certificate-notes-field textarea {
        min-height: 120px;
    }
}

@media (max-width: 760px) {
    .certificate-contract-strip,
    .certificate-meta-grid,
    .certificate-bottom-grid,
    .certificate-preview-summary {
        grid-template-columns: 1fr;
    }

    .certificate-table-wrap,
    .certificate-register-card > .table-wrap {
        overflow-x: auto;
    }

    .certificate-table {
        min-width: 1050px;
    }

    .certificate-register-table {
        min-width: 900px;
    }
}

.analysis-create-panel {
    margin-block-end: 18px;
    position: relative;
    z-index: 20;
}

.material-takeoff-page {
    display: grid;
    gap: 14px;
}

.material-takeoff-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
    gap: 18px;
    align-items: end;
    padding: 18px 20px;
    border: 1px solid rgba(15, 118, 110, .28);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, .96), rgba(239, 246, 255, .94)),
        #fff;
    box-shadow: 0 12px 28px rgba(15, 118, 110, .08);
}

.material-takeoff-hero > div > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f766e;
    font-size: 10px;
    font-weight: 900;
}

.material-takeoff-hero h1 {
    margin: 5px 0;
    color: #17324d;
    font-size: 24px;
}

.material-takeoff-hero p {
    margin: 0;
    color: #52677c;
    font-size: 12px;
}

.material-takeoff-hero form label {
    display: grid;
    gap: 6px;
}

.material-takeoff-hero form span {
    color: #315169;
    font-size: 10px;
    font-weight: 900;
}

.material-takeoff-hero select {
    width: 100%;
    min-height: 40px;
    border-color: rgba(15, 118, 110, .34);
    background: rgba(255, 255, 255, .9);
    font-size: 11px;
    font-weight: 800;
}

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

.material-takeoff-stats article {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,253,250,.84)),
        #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.material-takeoff-stats article > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    color: #fff;
}

.material-takeoff-stats .blue { background: #2563eb; }
.material-takeoff-stats .amber { background: #d97706; }
.material-takeoff-stats .green { background: #15803d; }
.material-takeoff-stats .teal { background: #0f766e; }
.material-takeoff-stats svg { width: 17px; height: 17px; }
.material-takeoff-stats div { min-width: 0; }
.material-takeoff-stats small { display: block; color: #64748b; font-size: 9px; font-weight: 800; }
.material-takeoff-stats strong { display: block; margin-top: 3px; color: #17324d; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.material-takeoff-panel {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 49, 95, .18);
    border-radius: 9px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.material-takeoff-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 118, 110, .24);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(37, 99, 235, .06)),
        #f8fafc;
}

.material-takeoff-toolbar > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.material-takeoff-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #17324d;
    font-size: 11px;
    font-weight: 950;
}

.material-takeoff-toolbar span svg { width: 16px; height: 16px; color: #0f766e; }
.material-takeoff-toolbar strong { padding: 3px 7px; border-radius: 4px; color: #075f4f; background: #ccfbf1; font-size: 9px; }

.material-takeoff-print-button {
    color: #fff;
    border-color: rgba(21, 128, 61, .45);
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.04)),
        linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 7px 16px rgba(21, 128, 61, .18);
}

.material-takeoff-print-frame {
    position: fixed;
    width: 1px;
    height: 1px;
    inset-inline-start: -10000px;
    bottom: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.material-takeoff-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.material-takeoff-table th,
.material-takeoff-table td {
    padding: 9px 7px;
    border: 1px solid #17324d;
    text-align: center;
    vertical-align: middle;
    font-size: 10.5px;
    line-height: 1.45;
}

.material-takeoff-table > thead th {
    color: #fff;
    background: linear-gradient(180deg, #0f3b66, #08294b);
    font-weight: 950;
}

.material-takeoff-table > thead th:nth-child(1) { width: 4%; }
.material-takeoff-table > thead th:nth-child(2) { width: 40%; }
.material-takeoff-table > thead th:nth-child(3) { width: 6%; }
.material-takeoff-table > thead th:nth-child(4) { width: 40%; }
.material-takeoff-table > thead th:nth-child(5) { width: 10%; }

.material-takeoff-table > tbody > tr:nth-child(even) td {
    background: #f8fbfc;
}

.material-name-cell {
    text-align: start !important;
    color: #17324d;
    font-weight: 950;
}

.material-symbol {
    width: 25px;
    height: 25px;
    display: inline-grid;
    place-items: center;
    margin-inline-end: 6px;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    vertical-align: middle;
}

.material-symbol svg { width: 14px; height: 14px; }
.material-takeoff-table .number {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 950;
    color: #0f315f;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}
.material-takeoff-monthly-panel {
    border-color: rgba(14, 116, 144, .22);
    background: linear-gradient(180deg, #f0fdfa, #ffffff);
}
.material-takeoff-monthly-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 12px 12px;
    padding: 10px 12px;
    border: 1px solid rgba(14, 116, 144, .2);
    border-radius: 8px;
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    color: #0f766e;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.6;
}
.material-takeoff-monthly-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
.material-takeoff-monthly-table {
    width: min(980px, 100%);
    margin-inline: auto;
}
.material-takeoff-monthly-table > thead th:nth-child(1) { width: 6%; }
.material-takeoff-monthly-table > thead th:nth-child(2) { width: 58%; }
.material-takeoff-monthly-table > thead th:nth-child(3) { width: 20%; }
.material-takeoff-monthly-table > thead th:nth-child(4) { width: 16%; }
.material-takeoff-monthly-table > thead th:nth-child(4) {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}
.takeoff-monthly-material-row td {
    background: #e6fffb !important;
    color: #0f2947;
    text-align: start;
}
.takeoff-monthly-title {
    display: block;
    margin-bottom: 6px;
    color: #0f2947;
    font-size: 12px;
    font-weight: 950;
}
.takeoff-monthly-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 7px;
}
.takeoff-monthly-metrics span {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 7px;
    padding: 3px 7px;
    background: #f8fafc;
    color: #0f766e;
    font-size: 9px;
    font-weight: 950;
}
.takeoff-monthly-month-row td:nth-child(2) {
    color: #111827;
    font-weight: 950;
    text-align: start;
}
.takeoff-monthly-month-row td:nth-child(3) strong {
    color: #111827;
}
.takeoff-monthly-month-row td:nth-child(4) strong {
    color: #0f766e;
}
.takeoff-monthly-detail-line {
    display: grid;
    grid-template-columns: minmax(90px, 140px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: #111827;
    font-weight: 950;
}
.takeoff-monthly-detail-line span {
    display: inline-flex;
    min-width: 100px;
}
.takeoff-monthly-detail-line i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}
.takeoff-monthly-detail-line i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.material-item-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.material-item-number {
    min-width: 34px;
    min-height: 27px;
    padding: 4px 7px;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    color: #1e3a8a;
    background:
        linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,255,255,.25)),
        #dbeafe;
    box-shadow: 0 3px 8px rgba(37, 99, 235, .1);
    font-size: 9px;
    font-weight: 950;
    cursor: pointer;
}

.material-item-number:hover,
.material-item-number:focus-visible {
    color: #fff;
    border-color: #2563eb;
    background: #2563eb;
    outline: none;
}

.material-item-number.appendix {
    color: #9a3412;
    border-color: #fdba74;
    background:
        linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.2)),
        #ffedd5;
}

.material-item-number.appendix:hover,
.material-item-number.appendix:focus-visible {
    color: #fff;
    border-color: #d97706;
    background: #d97706;
}

.takeoff-source {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.takeoff-source.original { color: #1e40af; background: #dbeafe; }
.takeoff-source.appendix { color: #9a3412; background: #ffedd5; }

.material-item-dialog {
    width: min(720px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: auto;
    border: 1px solid #7ca3a0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .3);
}

.material-item-dialog::backdrop { background: rgba(15, 23, 42, .56); backdrop-filter: blur(2px); }
.material-item-dialog form { display: grid; gap: 0; }

.material-item-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #94b8b3;
    background: linear-gradient(180deg, #ccfbf1, #a7f3d0);
}

.material-item-dialog header > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #134e4a;
    font-size: 12px;
    font-weight: 950;
}

.material-item-dialog header svg { width: 16px; height: 16px; }
.material-dialog-title { display: grid; gap: 7px; padding: 14px; border-bottom: 1px solid #d7e2ea; }
.material-dialog-title strong { color: #17324d; font-size: 14px; }
.material-dialog-title p { margin: 0; color: #415a70; font-size: 11px; font-weight: 750; line-height: 1.65; }
.material-dialog-title .takeoff-source { justify-self: start; }

.material-dialog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
}

.material-dialog-grid > div {
    min-width: 0;
    padding: 10px 7px;
    border: 1px solid #c8d7df;
    border-radius: 5px;
    text-align: center;
    background: #f8fbfc;
}

.material-dialog-grid small { display: block; color: #64748b; font-size: 8px; font-weight: 850; }
.material-dialog-grid strong { display: block; margin-top: 5px; color: #075f4f; font-size: 12px; font-variant-numeric: tabular-nums; }
.material-dialog-close { justify-self: center; min-width: 160px; margin: 0 14px 14px; }

.material-takeoff-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #64748b;
    text-align: center;
}

.material-takeoff-empty svg { width: 30px; height: 30px; color: #0f766e; }
.material-takeoff-empty p { margin: 0; font-weight: 800; }

.works-report-page {
    display: grid;
    gap: 12px;
}

.works-report-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr);
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid #9bd7ce;
    border-radius: 7px;
    color: #123047;
    background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(236,253,245,.84)),
        #fff;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .09);
}

.works-report-hero > div > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f766e;
    font-size: 10px;
    font-weight: 950;
}

.works-report-hero > div > span svg { width: 17px; height: 17px; }
.works-report-hero h1 { margin: 5px 0 3px; color: #17324d; font-size: 21px; }
.works-report-hero p { margin: 0; color: #5d7183; font-size: 10px; font-weight: 700; }

.works-report-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.works-report-filters label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.works-report-filters span {
    color: #466174;
    font-size: 9px;
    font-weight: 900;
}

.works-report-filters select {
    width: 100%;
    min-height: 37px;
    padding: 6px 9px;
    border: 1px solid #91cfc5;
    border-radius: 5px;
    color: #17324d;
    background: rgba(255,255,255,.92);
    font-size: 10px;
    font-weight: 850;
}

.works-report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border: 1px solid #c4d8e2;
    border-radius: 6px;
    background: #fff;
}

.works-report-toolbar > div { display: grid; gap: 2px; }
.works-report-toolbar strong { color: #17324d; font-size: 12px; }
.works-report-toolbar span { color: #64748b; font-size: 9px; font-weight: 800; }

.works-report-print {
    color: #fff;
    border-color: #15803d;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.02)),
        linear-gradient(135deg, #15803d, #22a559);
    box-shadow: 0 7px 15px rgba(21, 128, 61, .2);
}

.works-report-print-frame {
    position: fixed;
    width: 1400px;
    height: 900px;
    inset-inline-start: -20000px;
    bottom: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.works-report-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.works-report-kpis article {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #d4e1e7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 5px 13px rgba(15, 23, 42, .05);
}

.works-report-kpis article > span {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: #2563eb;
}

.works-report-kpis .teal > span { background: #0f766e; }
.works-report-kpis .green > span { background: #15803d; }
.works-report-kpis .amber > span { background: #d97706; }
.works-report-kpis .violet > span { background: #7c3aed; }
.works-report-kpis svg { width: 16px; height: 16px; }
.works-report-kpis div { min-width: 0; }
.works-report-kpis small { display: block; color: #64748b; font-size: 8px; font-weight: 850; }
.works-report-kpis strong { display: block; margin-top: 3px; overflow: hidden; color: #17324d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.works-report-section {
    padding: 0;
    overflow: visible;
    border-color: #b9cbd4;
    border-radius: 6px;
}

.works-report-section > header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-bottom: 1px solid #9fb8c4;
    background: linear-gradient(180deg, #f8fffd, #eaf8f5);
}

.works-report-section > header > span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: #0f766e;
}

.works-report-section > header svg { width: 15px; height: 15px; }
.works-report-section > header h2 { margin: 0; color: #17324d; font-size: 12px; }
.works-report-section > header p { margin: 2px 0 0; color: #64748b; font-size: 8px; font-weight: 800; }
.works-report-section .table-wrap {
    overflow: hidden;
    margin: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.works-status-table,
.works-history-table,
.works-material-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: #1e293b;
    font-size: 12px;
}

.works-status-table th,
.works-history-table th,
.works-material-table th {
    padding: 10px 8px;
    border: 0;
    border-bottom: 2px solid #e2e8f0;
    color: #1e293b;
    background: #f1f5f9;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
}

.works-status-table td,
.works-history-table td,
.works-material-table td {
    padding: 8px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
    font-size: 10px;
}

.works-status-table th:nth-child(1) { width: 5%; }
.works-status-table th:nth-child(2) { width: 25%; }
.works-status-table th:nth-child(3) { width: 8%; }
.works-status-table th:nth-child(4) { width: 5%; }
.works-status-table th:nth-child(5) { width: 9%; }
.works-status-table th:nth-child(6) { width: 9%; }
.works-status-table th:nth-child(7) { width: 8%; }
.works-status-table th:nth-child(8) { width: 13%; }
.works-status-table th:nth-child(9) { width: 9%; }
.works-status-table th:nth-child(10) { width: 9%; }
.works-status-table tbody tr:last-child td,
.works-history-table tbody tr:last-child td,
.works-material-table tbody tr:last-child td { border-bottom: 0; }

.works-status-table tbody tr,
.works-history-table tbody tr,
.works-material-table tbody tr {
    transition: background-color .18s ease;
}

.works-status-table tbody tr:hover,
.works-history-table tbody tr:hover,
.works-material-table tbody tr:hover { background: #f8fafc; }

.works-status-table tbody tr.is-quantity-overrun td {
    color: #7f1d1d;
    background: rgba(254, 202, 202, .62);
    font-weight: 800;
}

.works-status-table tbody tr.is-quantity-overrun:hover td {
    background: rgba(254, 202, 202, .78);
}

.schedule-page {
    display: grid;
    gap: 14px;
}

.schedule-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
    align-items: stretch;
    min-height: 150px;
    padding: 18px;
    border: 1px solid rgba(21, 94, 117, .2);
    border-radius: 8px;
    color: #f8fafc;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, .9), rgba(15, 118, 110, .84)),
        url("../images/banners/schedule.jpg") center 46%/cover;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
    overflow: hidden;
}

html[dir="rtl"] .schedule-hero {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .88), rgba(14, 116, 144, .9)),
        url("../images/banners/schedule-rtl.jpg") center 46%/cover;
}

.schedule-hero > div {
    display: grid;
    align-content: center;
    gap: 10px;
    max-width: 760px;
}

.schedule-hero span,
.schedule-panel-heading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.schedule-hero span {
    color: #cffafe;
    font-size: 11px;
}

.schedule-hero svg {
    width: 18px;
    height: 18px;
}

.schedule-hero h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0;
}

.schedule-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(248, 250, 252, .86);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.7;
}

.schedule-hero form {
    display: grid;
    align-content: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 8px;
    background: rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.36);
    backdrop-filter: blur(7px);
}

.schedule-hero label {
    display: grid;
    gap: 8px;
}

.schedule-hero label span {
    color: #fff;
    font-size: 10px;
}

.schedule-hero select {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 6px;
    color: #073b4c;
    background: rgba(255,255,255,.95);
    font-size: 12px;
    font-weight: 850;
}

.schedule-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.schedule-stats article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe7ee;
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(241,245,249,.82));
    box-shadow: 0 10px 22px rgba(15,23,42,.06);
}

.schedule-stats article > span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
}

.schedule-stats .blue { background: #2563eb; }
.schedule-stats .green { background: #15803d; }
.schedule-stats .amber { background: #d97706; }
.schedule-stats svg { width: 18px; height: 18px; }
.schedule-stats small { display: block; color: #64748b; font-size: 9px; font-weight: 850; }
.schedule-stats strong { display: block; margin-top: 4px; color: #17324d; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.schedule-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 34px;
    color: #475569;
    font-weight: 850;
}

.schedule-empty svg {
    width: 34px;
    height: 34px;
    color: #0f766e;
}

.schedule-gantt-panel,
.schedule-items-panel {
    overflow: hidden;
    border: 1px solid #d7e2ea;
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 26px rgba(15,23,42,.07);
}

.schedule-panel-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid #dbe7ee;
    background: linear-gradient(135deg, #ecfeff, #f8fafc);
    color: #17324d;
}

.schedule-panel-heading > div,
.schedule-panel-heading > a,
.schedule-panel-heading > button {
    flex: 0 0 auto;
}

.schedule-panel-heading > div:first-child {
    margin-inline-end: auto;
}

.schedule-panel-heading span {
    font-size: 13px;
}

.schedule-panel-heading svg {
    width: 17px;
    height: 17px;
    color: #0e7490;
}

.schedule-panel-heading strong {
    padding: 5px 9px;
    border-radius: 6px;
    color: #075985;
    background: #e0f2fe;
    font-size: 10px;
}

.schedule-gantt-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
}

.schedule-gantt-scroll.no-horizontal-scroll {
    overflow-x: hidden;
}

.schedule-gantt-scroll.no-horizontal-scroll.is-scrollable {
    overflow-x: auto;
}

.schedule-gantt {
    --week-width: 64px;
    --fit-week-width: 64px;
    --zoom-scale: 1;
    position: relative;
    width: max(100%, calc(360px + (var(--weeks) * var(--week-width))));
    min-width: calc(360px + (var(--weeks) * var(--week-width)));
}

.schedule-gantt.is-fit {
    width: 100%;
    min-width: 0;
}

.schedule-gantt.is-fit {
    --gantt-side-width: 300px;
}

.schedule-gantt.is-zoomed {
    --gantt-side-width: 300px;
    --week-width: calc(var(--fit-week-width, 64px) * var(--zoom-scale));
    width: calc(var(--gantt-side-width) + (var(--weeks) * var(--week-width)));
    min-width: calc(var(--gantt-side-width) + (var(--weeks) * var(--week-width)));
}

.schedule-gantt-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: var(--gantt-side-width, 360px) minmax(0, 1fr);
    background: #fff;
}

.schedule-gantt-side {
    display: grid;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-bottom: 1px solid #111;
    border-inline-end: 1px solid #111;
    color: #17324d;
    background: #f8fafc;
    font-size: 10px;
    font-weight: 900;
}

.schedule-time-grid {
    display: grid;
    grid-template-columns: repeat(var(--weeks), var(--week-width));
    min-width: calc(var(--weeks) * var(--week-width));
}

.schedule-gantt.is-fit .schedule-time-grid {
    grid-template-columns: repeat(var(--weeks), minmax(0, 1fr));
    min-width: 0;
}

.schedule-quarter-row,
.schedule-month-row,
.schedule-week-row {
    border-bottom: 1px solid #111;
}

.schedule-quarter,
.schedule-month,
.schedule-week-row > div {
    display: grid;
    place-items: center;
    min-height: 30px;
    border-inline-end: 1px solid #111;
    text-align: center;
    font-weight: 900;
}

.schedule-quarter {
    color: #0f172a;
    font-size: 11px;
}

.schedule-quarter.q1 { background: #dbeafe; }
.schedule-quarter.q2 { background: #dcfce7; }
.schedule-quarter.q3 { background: #ffedd5; }
.schedule-quarter.q4 { background: #f3e8ff; }

.schedule-month {
    color: #17324d;
    background: #f1f5f9;
    font-size: 8.5px;
}

.schedule-week-row > div {
    display: grid;
    align-content: center;
    gap: 1px;
    min-height: 32px;
    color: #475569;
    background: #fff;
    font-size: 8px;
}

.schedule-week-row > div strong,
.schedule-week-row > div span {
    display: block;
    overflow: hidden;
    text-overflow: clip;
    line-height: 1;
    white-space: nowrap;
}

.schedule-week-row > div strong {
    color: #17324d;
    font-size: 8px;
    font-weight: 800;
}

.schedule-week-row > div span {
    color: #111;
    font-size: 5.5px;
    font-weight: 400;
}

.schedule-gantt-body {
    position: relative;
}

.schedule-gantt-row {
    display: grid;
    grid-template-columns: var(--gantt-side-width, 360px) minmax(0, 1fr);
    min-height: calc(var(--period-count, 1) * 50px);
    border-bottom: 3px solid #111;
    box-shadow: 0 1px 0 rgba(255,255,255,.86);
}

.schedule-gantt-item {
    display: grid;
    grid-template-rows: repeat(var(--period-count, 1), 50px);
    align-content: start;
    min-height: calc(var(--period-count, 1) * 50px);
    padding: 0;
    border-inline-end: 1px solid #111;
    background: #f8fafc;
}

.schedule-gantt-item-head,
.schedule-gantt-period-label {
    display: grid;
    align-content: center;
    min-width: 0;
    padding: 4px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .32);
}

.schedule-gantt-item-head {
    background:
        linear-gradient(135deg, rgba(220,252,231,.78), rgba(240,253,244,.54)),
        linear-gradient(#fff, #f8fafc);
    box-shadow: inset 4px 0 0 rgba(22,163,74,.45);
}

.schedule-gantt-item-head strong {
    color: #075985;
    font-size: 11px;
}

.schedule-gantt-item-head span {
    display: block;
    overflow: hidden;
    color: #17324d;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-gantt-item-head em {
    display: none;
}

.schedule-gantt-period-label {
    align-content: center;
    gap: 2px;
    background: rgba(255, 255, 255, .48);
}

.schedule-gantt-period-label strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-gantt-period-label small {
    overflow: hidden;
    color: var(--status-color, #2563eb);
    font-size: 9px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-gantt-period-label span {
    overflow: hidden;
    color: #475569;
    font-size: 7px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-gantt-period-label.is-empty {
    justify-items: center;
}

.schedule-bars {
    position: relative;
    grid-template-rows: repeat(var(--period-count, 1), 50px);
    align-content: start;
    align-items: start;
    min-height: calc(var(--period-count, 1) * 50px);
    background:
        linear-gradient(to right, rgba(17,24,39,.24) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(17,24,39,.22) 1px, transparent 1px),
        linear-gradient(#fff, #f8fafc);
    background-size: var(--week-step, 64px) 100%, 100% 50px, auto;
}

.schedule-contract-value-marker,
.schedule-contract-total-marker,
.schedule-contract-grand-marker {
    position: relative;
    grid-column: 1 / -1;
    align-self: stretch;
    z-index: 7;
    min-width: 0;
    pointer-events: none;
    display: none;
}

.schedule-gantt.show-contract-markers .schedule-contract-value-marker,
.schedule-gantt.show-contract-markers .schedule-contract-total-marker,
.schedule-gantt.show-contract-markers .schedule-contract-grand-marker {
    display: block;
}

.schedule-contract-row {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: var(--contract-left, 0%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    max-width: 185px;
    min-width: 170px;
    width: 170px;
    transform: translate(14px, -50%);
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid rgba(37, 99, 235, .28);
    border-radius: 5px;
    color: #0f2f58;
    background: rgba(239, 246, 255, .96);
    box-shadow: 0 4px 12px rgba(37, 99, 235, .14);
    font-size: 8px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.schedule-contract-row::before {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 100%;
    right: 100%;
    left: auto;
    width: 14px;
    height: 2px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: #2563eb;
}

html[dir="rtl"] .schedule-contract-row {
    transform: translate(-8px, -50%);
}

html[dir="rtl"] .schedule-contract-row::before {
    inset-inline-start: auto;
    inset-inline-end: auto;
    left: 100%;
    right: auto;
    width: 8px;
}

.schedule-contract-value-marker b,
.schedule-contract-total-marker b {
    color: #1d4ed8;
    font-size: 7px;
    font-weight: 900;
}

.schedule-contract-value-marker strong,
.schedule-contract-total-marker strong {
    color: #0f172a;
    font-size: 8px;
    font-weight: 950;
}

.schedule-contract-total-marker {
    z-index: 8;
}

.schedule-contract-total-marker .schedule-contract-row,
.schedule-contract-grand-row {
    border-color: rgba(249, 115, 22, .42);
    color: #7c2d12;
    background: rgba(255, 237, 213, .98);
    box-shadow: 0 4px 12px rgba(249, 115, 22, .16);
}

.schedule-contract-total-marker .schedule-contract-row::before,
.schedule-contract-grand-row::before {
    background: #f97316;
}

.schedule-contract-total-marker b,
.schedule-contract-grand-row b {
    color: #c2410c;
}

.schedule-contract-grand-marker {
    z-index: 9;
}

.schedule-contract-grand-row {
    transform: translate(calc(-100% - 14px), -50%);
    min-width: 190px;
    width: 190px;
}

.schedule-contract-grand-row::before {
    inset-inline-start: 100%;
    inset-inline-end: auto;
    left: 100%;
    right: auto;
}

html[dir="rtl"] .schedule-contract-grand-row {
    transform: translate(calc(100% + 14px), -50%);
}

html[dir="rtl"] .schedule-contract-grand-row::before {
    inset-inline-start: auto;
    inset-inline-end: 100%;
    left: auto;
    right: 100%;
}

.schedule-gantt-grand-total-row {
    border-top: 3px solid #f97316;
    background: rgba(255, 247, 237, .45);
    display: none;
}

.schedule-gantt.show-contract-markers .schedule-gantt-grand-total-row {
    display: grid;
}

html[dir="rtl"] .schedule-bars {
    background:
        linear-gradient(to left, rgba(17,24,39,.24) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(17,24,39,.22) 1px, transparent 1px),
        linear-gradient(#fff, #f8fafc);
    background-size: var(--week-step, 64px) 100%, 100% 50px, auto;
}

.schedule-bar {
    position: relative;
    align-self: center;
    min-width: 42px;
    height: 18px;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 5px;
    border: 1.5px solid var(--status-color, #2563eb);
    border-radius: 4px;
    color: #17324d;
    background: color-mix(in srgb, var(--status-color, #2563eb) 22%, #fff);
    box-shadow: 0 2px 5px rgba(15,23,42,.12);
    overflow: visible;
}

.schedule-approved-fill {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: max(0%, min(100%, var(--approved-progress, 0%)));
    border-radius: 2px;
    background: #22c55e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
    pointer-events: none;
    z-index: 0;
}

.schedule-bar > span,
.schedule-bar > small {
    position: relative;
    z-index: 1;
}

.schedule-bar > span,
.schedule-bar > small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-bar > span {
    position: absolute;
    inset-inline-start: 1px;
    bottom: calc(100% + 2px);
    max-width: calc(100% - 2px);
    color: #172b3d;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.schedule-bar > small {
    display: none;
}

.schedule-approved-label {
    position: absolute;
    z-index: 2;
    inset-inline-start: 4px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 30px;
    padding: 1px 4px;
    border-radius: 3px;
    color: #052e16;
    background: rgba(255, 255, 255, .96);
    font-size: 7px;
    font-style: normal;
    font-weight: 950;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 1px 5px rgba(15,23,42,.12);
    pointer-events: none;
}

.schedule-overrun-note {
    position: absolute;
    z-index: 3;
    inset-inline-end: 4px;
    bottom: 3px;
    max-width: calc(100% - 8px);
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(255, 247, 237, .96);
    color: #9a3412;
    font-size: 6.5px;
    font-weight: 950;
    line-height: 1.15;
    white-space: nowrap;
    pointer-events: none;
}

.schedule-gantt.is-fit .schedule-bar {
    min-width: 0;
    padding-inline: 3px;
}

.schedule-gantt.is-fit .schedule-bar > span {
    font-size: 7px;
}

.schedule-gantt.is-fit .schedule-approved-label {
    inset-inline-start: 3px;
    min-width: 24px;
    padding-inline: 2px;
    font-size: 6px;
}

.schedule-bar-dates {
    position: absolute;
    top: calc(100% + 3px);
    inset-inline: -2px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    color: #000;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.schedule-bar-dates span,
.schedule-bar-dates strong {
    min-width: 0;
    color: #000;
    background: rgba(255,255,255,.82);
    border-radius: 2px;
    padding: 1px 2px;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.schedule-bar-dates strong {
    justify-self: center;
    text-align: center;
}

.schedule-gantt.is-fit .schedule-week-row > div {
    font-size: 8px;
}

.schedule-gantt.is-fit .schedule-week-row > div strong {
    font-size: 7px;
}

.schedule-gantt.is-fit .schedule-week-row > div span {
    font-size: 5px;
}

.schedule-bar.status-scheduling { background: linear-gradient(135deg, #0891b2, #0e7490); }
.schedule-bar.status-scheduled { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.schedule-bar.status-review { background: linear-gradient(135deg, #f59e0b, #d97706); }
.schedule-bar.status-approved { background: linear-gradient(135deg, #16a34a, #15803d); }
.schedule-bar.status-postponed { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.schedule-bar[style*="--status-color"] {
    border-color: var(--status-color, #2563eb);
    background: color-mix(in srgb, var(--status-color, #2563eb) 22%, #fff);
}

.schedule-bar.progress-advanced {
    border-color: rgba(22, 163, 74, .72);
    background: rgba(34, 197, 94, .24);
}

.schedule-bar.progress-matching {
    border-color: rgba(37, 99, 235, .62);
    background: rgba(37, 99, 235, .18);
}

.schedule-bar.progress-late {
    border-color: rgba(220, 38, 38, .70);
    background: rgba(239, 68, 68, .20);
}

.schedule-bar.progress-upcoming {
    border-color: rgba(100, 116, 139, .50);
    background: rgba(148, 163, 184, .16);
}

.schedule-gantt-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-top: 1px solid #dbe7ee;
    background: linear-gradient(135deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
}

.schedule-gantt-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #dbe7ee;
    border-radius: 999px;
    color: #17324d;
    background: #fff;
    font-size: 9px;
    font-weight: 900;
}

.schedule-gantt-legend i {
    width: 18px;
    height: 8px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.18);
}

.schedule-gantt-legend .status-scheduling { background: linear-gradient(135deg, #0891b2, #0e7490); }
.schedule-gantt-legend .status-scheduled { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.schedule-gantt-legend .status-review { background: linear-gradient(135deg, #f59e0b, #d97706); }
.schedule-gantt-legend .status-approved { background: linear-gradient(135deg, #16a34a, #15803d); }
.schedule-gantt-legend .status-postponed { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

.schedule-gantt-legend i[style*="--status-color"] {
    border: 1.5px solid var(--status-color, #2563eb);
    background: color-mix(in srgb, var(--status-color, #2563eb) 22%, #fff);
    box-shadow: none;
}

.schedule-gantt-legend .schedule-approved-legend {
    background: #22c55e;
}

.schedule-summary-bar {
    position: relative;
    align-self: center;
    height: 28px;
    margin: 0 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    color: #111827;
    font-size: 8px;
    font-weight: 950;
    z-index: 2;
}

.schedule-summary-bar::before {
    content: "";
    position: absolute;
    top: 6px;
    inset-inline: 0;
    height: 2px;
    background: #111;
    box-shadow: 0 1px 0 rgba(255,255,255,.62);
}

.schedule-summary-bar::after {
    content: "";
    position: absolute;
    top: 6px;
    inset-inline: 0;
    height: 12px;
    border-inline: 2px solid #111;
}

.schedule-summary-bar span,
.schedule-summary-bar strong {
    position: relative;
    z-index: 1;
    max-width: 100%;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 1px 4px rgba(15,23,42,.08);
    white-space: nowrap;
}

.schedule-summary-bar strong {
    justify-self: center;
    color: #0f172a;
    background: #f8fafc;
}

.schedule-summary-contract-value {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-start: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transform: translateX(-50%);
    padding: 3px 8px;
    border: 1px solid rgba(14, 165, 233, .35);
    border-radius: 5px;
    color: #0f172a;
    background: rgba(240, 249, 255, .96);
    box-shadow: 0 4px 12px rgba(14, 165, 233, .14);
    font-style: normal;
    white-space: nowrap;
}

html[dir="rtl"] .schedule-summary-contract-value {
    transform: translateX(50%);
}

.schedule-summary-contract-value b {
    color: #0369a1;
    font-size: 7px;
    font-weight: 900;
}

.schedule-summary-contract-value strong {
    padding: 0;
    color: #0f172a;
    background: transparent;
    box-shadow: none;
    font-size: 8px;
    font-weight: 950;
}

.schedule-waiting-pill {
    grid-column: 1 / span 2;
    align-self: center;
    justify-self: start;
    margin-inline-start: 10px;
    padding: 4px 8px;
    border: 1px dashed #94a3b8;
    border-radius: 999px;
    color: #64748b;
    background: rgba(248,250,252,.94);
    font-size: 9px;
    font-weight: 900;
}

.schedule-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 4;
    width: 0;
    border-inline-start: 2px solid #dc2626;
    pointer-events: none;
}

.schedule-today-line span {
    position: sticky;
    top: 0;
    display: inline-grid;
    justify-items: center;
    gap: 1px;
    transform: translateX(-50%);
    min-width: 92px;
    padding: 5px 7px;
    border-radius: 7px;
    color: #fff;
    background: #dc2626;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .22);
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.schedule-today-line span b,
.schedule-today-line span small,
.schedule-today-line span em,
.schedule-today-line span strong {
    display: block;
    line-height: 1.15;
    font-style: normal;
}

.schedule-today-line span small {
    color: rgba(255, 255, 255, .92);
    font-size: 7px;
    font-weight: 800;
}

.schedule-today-line span em {
    margin-top: 2px;
    color: #dbeafe;
    font-size: 7px;
    font-weight: 900;
}

.schedule-today-line span strong {
    color: #fff;
    font-size: 8px;
    font-weight: 950;
}

html[dir="rtl"] .schedule-today-line span {
    transform: translateX(50%);
}

.schedule-picked-date-line {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: 0;
    border-inline-start: 2px solid #2563eb;
    pointer-events: none;
}

.schedule-picked-date-line span {
    position: sticky;
    top: 4px;
    display: inline-block;
    transform: translate(calc(-100% - 10px), 0);
    padding: 4px 9px;
    border: 1px solid #1d4ed8;
    border-radius: 4px;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 6px 16px rgba(37,99,235,.24);
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.schedule-picked-date-line span::before {
    content: "";
    position: absolute;
    inset-block: 4px;
    inset-inline-end: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
}

html[dir="rtl"] .schedule-picked-date-line span {
    transform: translate(calc(100% + 10px), 0);
}

html[dir="rtl"] .schedule-picked-date-line span::before {
    inset-inline-start: auto;
    inset-inline-end: auto;
    left: 0;
    right: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
    padding: 9px 8px;
    border: 1px solid #111;
    text-align: center;
    vertical-align: middle;
    font-size: 10px;
}

.schedule-table th {
    color: #111;
    background: #dbeafe;
    font-weight: 900;
}

.schedule-table th:nth-child(1) { width: 9%; }
.schedule-table th:nth-child(2) { width: 33%; }
.schedule-table th:nth-child(3) { width: 8%; }
.schedule-table th:nth-child(4) { width: 10%; }
.schedule-table th:nth-child(5) { width: 40%; }

.schedule-description {
    text-align: start !important;
    color: #17324d;
    font-weight: 850;
    line-height: 1.5;
}

.schedule-description span {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 8px;
    font-weight: 900;
}

.schedule-period-list {
    display: grid;
    gap: 5px;
}

.schedule-period-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 26px 26px;
    gap: 4px;
    align-items: center;
    padding: 4px;
    border: 1px solid #dbe7ee;
    border-radius: 6px;
    background: #f8fafc;
}

.schedule-period-list article > div {
    min-width: 0;
    text-align: start;
}

.schedule-period-list strong,
.schedule-period-list span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-period-list strong {
    color: #17324d;
    font-size: 9px;
}

.schedule-period-list span {
    color: #64748b;
    font-size: 8px;
    font-weight: 800;
}

.schedule-period-list .schedule-period-weight {
    margin-top: 3px;
    color: #1d4ed8;
    font-size: 7.5px;
    font-weight: 900;
    white-space: normal;
}

.schedule-period-weight-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 25px;
    margin-top: 5px;
    padding: 4px 8px;
    border: 1px solid #fbbf24;
    border-radius: 5px;
    color: #92400e;
    background: #fffbeb;
    font-size: 8px;
    font-weight: 900;
}

.schedule-period-weight-summary.is-complete {
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}

.schedule-period-weight-summary strong {
    font-size: 9px;
}

.schedule-period-list form {
    margin: 0;
}

.schedule-period-cell-empty {
    display: grid;
    place-items: center;
    min-height: 30px;
}

.schedule-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.schedule-status-chip.status-waiting { color: #475569; background: #e2e8f0; }
.schedule-status-chip.status-scheduling { color: #075985; background: #cffafe; }
.schedule-status-chip.status-scheduled { color: #1d4ed8; background: #dbeafe; }
.schedule-status-chip.status-review { color: #92400e; background: #fef3c7; }
.schedule-status-chip.status-approved { color: #166534; background: #dcfce7; }
.schedule-status-chip.status-postponed { color: #6d28d9; background: #ede9fe; }

.schedule-status-chip[style*="--status-color"] {
    color: #0f172a;
    background: var(--status-color, #2563eb);
    color: color-mix(in srgb, var(--status-color, #2563eb) 72%, black);
    background: color-mix(in srgb, var(--status-color, #2563eb) 16%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--status-color, #2563eb) 28%, white);
}

.schedule-add-period {
    background:
        linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.16)),
        linear-gradient(135deg, rgba(245,158,11,.34), rgba(217,119,6,.24));
    color: #7c2d12;
    border-color: rgba(217,119,6,.42);
    margin: 8px auto 0;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.92),
        0 8px 18px rgba(217,119,6,.16);
}

.schedule-table .icon-action,
.schedule-period-list .icon-action {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    flex: 0 0 26px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    border-radius: 5px !important;
}

.schedule-table .icon-action svg,
.schedule-period-list .icon-action svg {
    width: 13px !important;
    height: 13px !important;
    stroke-width: 2;
}

.schedule-gantt-link {
    min-height: 34px;
    color: #0f172a;
}

.schedule-gantt-link svg {
    color: #d97706;
    stroke-width: 2.35;
}

.schedule-gantt-only-panel {
    min-width: 0;
}

.schedule-gantt-toolbar {
    align-items: center;
}

.schedule-gantt-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.schedule-page .link-button.schedule-gantt-link,
.schedule-page .link-button.schedule-toolbar-button,
.schedule-page .link-button.schedule-print-button,
.schedule-date-filter .link-button {
    --schedule-button-height: 34px;
    height: var(--schedule-button-height);
    min-height: var(--schedule-button-height);
    padding: 0 12px;
    border-radius: 7px;
    gap: 6px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

.schedule-page .link-button.schedule-gantt-link svg,
.schedule-page .link-button.schedule-toolbar-button svg,
.schedule-page .link-button.schedule-print-button svg,
.schedule-date-filter .link-button svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.schedule-zoom-control {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: rgba(255,255,255,.78);
}

.schedule-zoom-control button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: #475569;
    background: transparent;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}

.schedule-zoom-control > span {
    min-width: 42px;
    color: #17324d;
    text-align: center;
    font-size: 9px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.schedule-zoom-control button svg {
    width: 14px;
    height: 14px;
}

.schedule-zoom-control button.active {
    color: #0e7490;
    background: #cffafe;
    box-shadow: inset 0 0 0 1px rgba(14,116,144,.22);
}

.schedule-zoom-control button.pulse {
    color: #d97706;
    background: #ffedd5;
    box-shadow: inset 0 0 0 1px rgba(217,119,6,.28);
}

.schedule-primary-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.schedule-toolbar-button {
    color: #0f172a;
}

.schedule-toolbar-button svg {
    width: 14px;
    height: 14px;
}

.schedule-toolbar-button[href*="schedule-planning"] svg {
    color: #0e7490;
}

.schedule-toolbar-button[data-schedule-print] svg {
    color: #15803d;
}

.schedule-print-button {
    color: #0f172a;
}

.schedule-print-button svg {
    color: #15803d;
    width: 14px;
    height: 14px;
}

.schedule-print-heading {
    display: none;
}

.schedule-print-gantt-pages {
    display: none;
}

.schedule-date-filter {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 13px;
    border-bottom: 1px solid #dbe7ee;
    background: linear-gradient(135deg, rgba(236,254,255,.9), rgba(255,255,255,.98));
}

.schedule-date-filter label {
    display: grid;
    gap: 5px;
    min-width: 150px;
}

.schedule-date-filter label span {
    color: #475569;
    font-size: 9px;
    font-weight: 900;
}

.schedule-date-filter input {
    height: 34px;
    min-height: 34px;
    border: 1px solid #bfd3df;
    border-radius: 7px;
    padding: 0 10px;
    background: #fff;
    color: #17324d;
    font-size: 12px;
    font-weight: 800;
}

.schedule-date-filter-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    flex-wrap: wrap;
}

.schedule-date-filter-tools > strong {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid rgba(14,116,144,.2);
    border-radius: 7px;
    color: #075985;
    background: rgba(236,254,255,.82);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

@page scheduleLandscape {
    size: A4 landscape;
    margin: 8mm;
}

@media print {
    .side-nav,
    .app-banner,
    .content-banner,
    .app-content-banner-only > .content-banner,
    .schedule-hero,
    .schedule-panel-heading,
    .schedule-gantt-tools,
    .schedule-date-filter,
    .schedule-gantt-link,
    .schedule-toolbar-button,
    .schedule-print-button,
    .schedule-period-dialog,
    .schedule-status-dialog,
    .schedule-add-period,
    .schedule-period-list .icon-action,
    .schedule-period-list form {
        display: none !important;
    }

    .schedule-picked-date-line[hidden],
    .schedule-gantt:not(.show-contract-markers) .schedule-contract-value-marker,
    .schedule-gantt:not(.show-contract-markers) .schedule-contract-total-marker,
    .schedule-gantt:not(.show-contract-markers) .schedule-contract-grand-marker {
        display: none !important;
    }

    .schedule-picked-date-line:not([hidden]) {
        display: block !important;
        border-inline-start: 2px solid #2563eb !important;
    }

    .schedule-print-gantt-page .schedule-gantt.show-contract-markers .schedule-bars::after {
        content: "";
        position: absolute;
        inset-block: 0;
        inset-inline-start: var(--contract-left, 0%);
        width: 0;
        border-inline-start: 2px solid #2563eb;
        z-index: 6;
        pointer-events: none;
    }

    .schedule-print-gantt-page .schedule-picked-date-line:not([hidden]) {
        left: calc(var(--gantt-side-width, 270px) + ((100% - var(--gantt-side-width, 270px)) * var(--picked-ratio, 0))) !important;
        right: auto !important;
    }

    html[dir="rtl"] .schedule-print-gantt-page .schedule-picked-date-line:not([hidden]) {
        right: calc(var(--gantt-side-width, 270px) + ((100% - var(--gantt-side-width, 270px)) * var(--picked-ratio, 0))) !important;
        left: auto !important;
    }

    .schedule-picked-date-line span {
        transform: translate(calc(-100% - 8px), 0) !important;
    }

    html[dir="rtl"] .schedule-picked-date-line span {
        transform: translate(calc(100% + 8px), 0) !important;
    }

    body {
        background: #fff !important;
    }

    .app-shell,
    .app-main,
    .app-content {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .schedule-page,
    .schedule-gantt-page {
        display: block !important;
        page: scheduleLandscape;
    }

    .schedule-print-heading {
        display: block !important;
        margin: 0 0 2mm !important;
        padding: 0 0 1.5mm !important;
        border-bottom: 2px solid #111 !important;
        text-align: center !important;
        color: #111 !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .schedule-print-heading h1 {
        margin: 0 !important;
        font-size: 16pt !important;
        font-weight: 900 !important;
    }

    .schedule-print-heading h2 {
        margin: 1.5mm 0 0 !important;
        font-size: 12pt !important;
        font-weight: 800 !important;
    }

    .schedule-print-heading p {
        margin: 1mm 0 0 !important;
        font-size: 10pt !important;
        font-weight: 700 !important;
    }

    .schedule-print-meta {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 2mm !important;
        margin-top: 2mm !important;
    }

    .schedule-print-meta span {
        min-height: 10mm !important;
        display: grid !important;
        align-content: center !important;
        gap: 1mm !important;
        padding: 2mm 3mm !important;
        border: 1px solid #111 !important;
        border-radius: 2mm !important;
        background: #eff6ff !important;
        color: #111 !important;
        text-align: center !important;
    }

    .schedule-print-meta b {
        font-size: 8pt !important;
        color: #334155 !important;
    }

    .schedule-print-meta strong {
        font-size: 10pt !important;
        color: #000 !important;
        font-weight: 900 !important;
    }

    .schedule-page .schedule-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2mm !important;
        margin: 0 0 2mm !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .schedule-page .schedule-stats article {
        min-height: 14mm !important;
        display: grid !important;
        grid-template-columns: 12mm minmax(0, 1fr) !important;
        align-items: center !important;
        gap: 2mm !important;
        padding: 2.5mm !important;
        border: 1px solid #111 !important;
        border-radius: 2.5mm !important;
        background: #f8fafc !important;
        box-shadow: none !important;
        color: #111 !important;
        break-inside: avoid !important;
    }

    .schedule-page .schedule-stats article > span {
        width: 10mm !important;
        height: 10mm !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 2mm !important;
        color: #fff !important;
        background: #1d4ed8 !important;
    }

    .schedule-page .schedule-stats article > span.green { background: #15803d !important; }
    .schedule-page .schedule-stats article > span.amber { background: #d97706 !important; }

    .schedule-page .schedule-stats article svg {
        width: 5mm !important;
        height: 5mm !important;
        color: #fff !important;
        stroke: currentColor !important;
    }

    .schedule-page .schedule-stats article small {
        display: block !important;
        margin-bottom: 1mm !important;
        color: #334155 !important;
        font-size: 8pt !important;
        font-weight: 800 !important;
    }

    .schedule-page .schedule-stats article strong {
        display: block !important;
        color: #000 !important;
        font-size: 13pt !important;
        font-weight: 950 !important;
        line-height: 1.15 !important;
    }

    .schedule-items-panel,
    .schedule-gantt-panel {
        margin: 0 !important;
        border: 1px solid #111 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .schedule-gantt-panel {
        border: 0 !important;
        break-inside: auto;
        page-break-inside: auto;
    }

    .schedule-panel-heading {
        padding: 6px 8px !important;
        border-bottom: 1px solid #111 !important;
        background: #e2e8f0 !important;
        color: #111 !important;
    }

    .schedule-gantt-scroll {
        display: none !important;
    }

    .schedule-print-gantt-pages {
        display: block !important;
    }

    .schedule-print-gantt-page {
        display: block !important;
        overflow: hidden !important;
        break-after: page;
        page-break-after: always;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .schedule-print-gantt-page:last-child {
        break-after: auto;
        page-break-after: auto;
        break-inside: auto;
        page-break-inside: auto;
    }

    .schedule-gantt-panel > .schedule-gantt-legend {
        display: none !important;
    }

    .schedule-print-legend {
        display: flex !important;
        margin-top: 2mm !important;
        padding: 1.5mm 2mm !important;
        border: 1px solid #111 !important;
        background: #fff !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .schedule-print-legend span {
        min-height: 14px !important;
        padding: 1px 5px !important;
        border: 1px solid #111 !important;
        color: #000 !important;
        font-size: 5.8pt !important;
    }

    .schedule-print-legend i {
        width: 14px !important;
        height: 6px !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .schedule-gantt {
        --gantt-side-width: 270px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .schedule-gantt-head {
        position: static !important;
    }

    .schedule-gantt .schedule-time-grid {
        grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)) !important;
        min-width: 0 !important;
    }

    .schedule-gantt-side {
        font-size: 7pt !important;
        min-height: 24px !important;
        padding: 3px 5px !important;
        border: 1px solid #111 !important;
        border-top: 0 !important;
    }

    .schedule-quarter,
    .schedule-month,
    .schedule-week-row > div {
        min-height: 18px !important;
        font-size: 5.4pt !important;
        font-weight: 400 !important;
        border: 1px solid rgba(148,163,184,.58) !important;
        border-top: 0 !important;
    }

    .schedule-week-row > div strong {
        font-size: 5.5pt !important;
        font-weight: 400 !important;
    }

    .schedule-week-row > div span {
        color: #111 !important;
        font-size: 4.6pt !important;
        font-weight: 400 !important;
    }

    .schedule-gantt-row {
        grid-template-columns: var(--gantt-side-width) minmax(0, 1fr) !important;
        min-height: calc(var(--period-count, 1) * 35px) !important;
        border: 1px solid #111 !important;
        border-bottom: 2px solid #111 !important;
        border-top: 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .schedule-gantt-item {
        grid-template-rows: repeat(var(--period-count, 1), 35px) !important;
        align-content: start !important;
        min-height: calc(var(--period-count, 1) * 35px) !important;
        border-inline-end: 1px solid #111 !important;
    }

    .schedule-gantt-item-head,
    .schedule-gantt-period-label {
        padding: 2px 5px !important;
        border-bottom: 1px solid rgba(148,163,184,.45) !important;
    }

    .schedule-gantt-item-head span {
        font-size: 6.4pt !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    .schedule-gantt-item-head strong {
        font-size: 6.5pt !important;
    }

    .schedule-gantt-item-head em {
        display: none !important;
    }

    .schedule-gantt-period-label strong {
        font-size: 5.6pt !important;
        font-weight: 700 !important;
    }

    .schedule-gantt-period-label small {
        color: var(--status-color, #2563eb) !important;
        font-size: 5.6pt !important;
        font-weight: 700 !important;
    }

    .schedule-gantt-period-label span {
        font-size: 4.6pt !important;
        font-weight: 400 !important;
    }

    .schedule-bars {
        grid-template-rows: repeat(var(--period-count, 1), 35px) !important;
        align-content: start !important;
        min-height: calc(var(--period-count, 1) * 35px) !important;
        background:
            linear-gradient(to right, rgba(148,163,184,.35) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(17,24,39,.18) 1px, transparent 1px),
            linear-gradient(#fff, #f8fafc) !important;
        background-size: var(--week-step, 24px) 100%, 100% 35px, auto !important;
        border-inline-end: 1px solid #111 !important;
    }

    html[dir="rtl"] .schedule-bars {
        background:
            linear-gradient(to left, rgba(148,163,184,.35) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(17,24,39,.18) 1px, transparent 1px),
            linear-gradient(#fff, #f8fafc) !important;
        background-size: var(--week-step, 24px) 100%, 100% 35px, auto !important;
    }

    .schedule-bar {
        height: 15px !important;
        align-self: center !important;
        margin: 0 4px !important;
        padding-inline: 3px !important;
        border-width: 1px !important;
        border-radius: 3px !important;
        box-shadow: none !important;
    }

    .schedule-bar > span {
        bottom: calc(100% + 1px) !important;
        color: #111 !important;
        font-size: 5pt !important;
        line-height: 1 !important;
    }

    .schedule-bar > small {
        display: none !important;
    }

    .schedule-approved-label {
        min-width: 20px !important;
        padding: 0 2px !important;
        font-size: 4.8pt !important;
        line-height: 1.1 !important;
    }

    .schedule-summary-bar {
        align-self: center !important;
        margin: 0 5px !important;
        font-size: 5.8pt !important;
    }

    .schedule-contract-row {
        width: 112px !important;
        min-width: 112px !important;
        min-height: 15px !important;
        gap: 3px !important;
        transform: translate(9px, -50%) !important;
        padding: 1px 4px !important;
        box-shadow: none !important;
    }

    .schedule-contract-grand-row {
        width: 128px !important;
        min-width: 128px !important;
        transform: translate(calc(-100% - 9px), -50%) !important;
    }

    html[dir="rtl"] .schedule-contract-row {
        transform: translate(-6px, -50%) !important;
    }

    html[dir="rtl"] .schedule-contract-grand-row {
        transform: translate(calc(100% + 9px), -50%) !important;
    }

    .schedule-contract-row::before {
        width: 9px !important;
        height: 1.2px !important;
    }

    html[dir="rtl"] .schedule-contract-row::before {
        left: 100% !important;
        right: auto !important;
        width: 6px !important;
    }

    .schedule-contract-grand-row::before {
        left: 100% !important;
        right: auto !important;
        width: 9px !important;
    }

    html[dir="rtl"] .schedule-contract-grand-row::before {
        left: auto !important;
        right: 100% !important;
        width: 9px !important;
    }

    .schedule-contract-value-marker b,
    .schedule-contract-value-marker strong,
    .schedule-contract-total-marker b,
    .schedule-contract-total-marker strong {
        font-size: 4.5pt !important;
        line-height: 1 !important;
    }

    .schedule-bar-dates {
        top: calc(100% + 2px) !important;
        color: #000 !important;
        font-size: 4.8pt !important;
        font-weight: 900 !important;
    }

    .schedule-bar-dates span,
    .schedule-bar-dates strong {
        color: #000 !important;
        background: rgba(255,255,255,.9) !important;
        padding: 0 1px !important;
    }

    .schedule-table {
        table-layout: fixed !important;
        break-before: auto !important;
        page-break-before: auto !important;
    }

    .schedule-items-panel,
    .schedule-items-panel .table-wrap,
    .schedule-items-panel .schedule-table,
    .schedule-items-panel .schedule-table thead,
    .schedule-items-panel .schedule-table tbody,
    .schedule-items-panel .schedule-table tr:first-child {
        break-before: auto !important;
        page-break-before: auto !important;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 5px 4px !important;
        border: 1px solid #111 !important;
        font-size: 7pt !important;
    }

    .schedule-period-dates-cell svg {
        display: inline-block !important;
        color: #1d4ed8 !important;
        stroke: #1d4ed8 !important;
        fill: none !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

.schedule-period-dialog {
    width: min(620px, calc(100vw - 34px));
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15,23,42,.24);
}

.schedule-period-dialog::backdrop {
    background: rgba(15,23,42,.54);
    backdrop-filter: blur(2px);
}

.schedule-period-dialog form {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.schedule-period-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -14px -14px 0;
    padding: 12px 14px;
    border-bottom: 1px solid #dbe7ee;
    color: #17324d;
    background: linear-gradient(135deg, #ecfeff, #f8fafc);
}

.schedule-period-dialog header strong {
    font-size: 14px;
}

.schedule-period-dialog .field {
    display: grid;
    gap: 6px;
}

.schedule-period-dialog .field > span {
    color: #475569;
    font-size: 9px;
    font-weight: 900;
}

.schedule-period-dialog input,
.schedule-period-dialog select,
.schedule-period-dialog textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #17324d;
    font-size: 12px;
    font-weight: 800;
}

.schedule-period-dialog input[readonly] {
    border-color: rgba(14, 116, 144, .26);
    background: linear-gradient(135deg, rgba(240, 253, 250, .92), rgba(239, 246, 255, .82));
    color: #0f3f6f;
    font-weight: 950;
}

.schedule-period-help {
    margin: -4px 0 0;
    border: 1px solid rgba(14, 116, 144, .18);
    border-radius: 7px;
    padding: 8px 10px;
    background: rgba(240, 253, 250, .72);
    color: #334155;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.65;
}

.schedule-period-dialog textarea {
    min-height: 76px;
    resize: vertical;
}

.schedule-material-dialog {
    width: min(980px, calc(100vw - 36px));
    border: 0;
    border-radius: 12px;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.schedule-material-dialog::backdrop {
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(3px);
}

.schedule-material-dialog form {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.schedule-material-dialog header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0f2947, #0f766e);
    color: #fff;
}

.schedule-material-dialog header strong {
    display: block;
    font-size: 16px;
    font-weight: 950;
}

.schedule-material-dialog header p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .84);
    font-size: 11px;
    font-weight: 850;
}

.schedule-material-table-wrap {
    overflow: hidden;
    border: 1px solid #111827;
    border-radius: 9px;
    background: #fff;
}

.schedule-material-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11px;
}

.schedule-material-table th,
.schedule-material-table td {
    border: 1px solid #111827;
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
}

.schedule-material-table th {
    background: #0f2947;
    color: #fff;
    font-weight: 950;
}

.schedule-material-table th:nth-child(1) { width: 6%; }
.schedule-material-table th:nth-child(2) { width: 42%; }
.schedule-material-table th:nth-child(3) { width: 10%; }
.schedule-material-table th:nth-child(4) { width: 18%; }
.schedule-material-table th:nth-child(5) { width: 24%; }

.schedule-material-table td:nth-child(2) {
    text-align: start;
    color: #0f2947;
    font-weight: 950;
    line-height: 1.45;
}

.schedule-material-table input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0f766e;
}

.schedule-material-percent {
    width: min(120px, 100%);
    min-height: 34px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 950;
    text-align: center;
}

.schedule-material-percent:disabled {
    color: #94a3b8;
    background: #f1f5f9;
}

.schedule-material-remaining {
    display: block;
    margin-top: 4px;
    color: #0f766e;
    font-size: 9px;
    font-weight: 950;
    line-height: 1.3;
}

.schedule-material-empty {
    display: none;
    min-height: 96px;
    place-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.icon-action.material-link {
    position: relative;
    color: #0f766e;
    background: #ecfdf5;
}

.icon-action.material-link small {
    position: absolute;
    inset: -7px -7px auto auto;
    display: grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 999px;
    background: #d97706;
    color: #fff;
    font-size: 9px;
    font-weight: 950;
    line-height: 1;
}

.schedule-period-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.schedule-period-actions form {
    display: inline-flex;
    margin: 0;
}

.schedule-period-actions .icon-action {
    flex: 0 0 auto;
}

.schedule-period-list article {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
}

.schedule-period-list article > .schedule-period-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: auto !important;
    min-width: 86px !important;
    text-align: center !important;
}

.schedule-period-list article > .schedule-period-actions form {
    display: inline-flex !important;
    width: 26px !important;
    min-width: 26px !important;
    margin: 0 !important;
}

.schedule-period-list article > .schedule-period-actions .icon-action {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
}

.schedule-status-dialog {
    width: min(920px, calc(100vw - 34px));
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15,23,42,.24);
}

.schedule-status-dialog::backdrop {
    background: rgba(15,23,42,.54);
    backdrop-filter: blur(2px);
}

.schedule-status-dialog form {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.schedule-status-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -14px -14px 0;
    padding: 12px 14px;
    border-bottom: 1px solid #dbe7ee;
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.schedule-status-dialog header strong {
    color: #17324d;
    font-size: 14px;
    font-weight: 900;
}

.schedule-status-editor {
    display: grid;
    gap: 8px;
    max-height: min(62vh, 520px);
    overflow: auto;
    padding-inline-end: 3px;
}

.schedule-status-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(260px, 1.15fr);
    gap: 8px;
    align-items: end;
    padding: 9px;
    border: 1px solid #dbe7ee;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(248,250,252,.96), rgba(255,255,255,.98));
}

.schedule-status-row label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.schedule-status-row label > span,
.schedule-status-limit {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
}

.schedule-status-row input:not([type="hidden"]) {
    width: 100%;
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 0 9px;
    color: #17324d;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
}

.schedule-color-palette {
    display: grid;
    grid-template-columns: repeat(10, 22px);
    gap: 5px;
    align-items: center;
}

.schedule-color-palette button {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    border: 2px solid rgba(15,23,42,.12);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: inset 0 1px 2px rgba(255,255,255,.45), 0 2px 6px rgba(15,23,42,.12);
    cursor: pointer;
}

.schedule-color-palette button.active {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(14,116,144,.16), inset 0 1px 2px rgba(255,255,255,.45);
}

.schedule-status-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

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

/* Final override for BOQ table action cells: keep icons square, centered, and tidy. */
.boq-main-table td.action-icons,
.boq-document-table td.action-icons,
.boq-additions-table td.action-icons {
    padding: 5px !important;
    text-align: center !important;
    vertical-align: middle !important;
    overflow: visible;
}

.boq-main-table td.action-icons .boq-cell-actions,
.boq-document-table td.action-icons .boq-cell-actions,
.boq-additions-table td.action-icons .boq-cell-actions {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    margin-inline: auto;
    white-space: nowrap;
}

.boq-main-table td.action-icons .icon-action,
.boq-document-table td.action-icons .icon-action,
.boq-additions-table td.action-icons .icon-action,
.boq-main-table .boq-action-buttons .icon-action {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    flex: 0 0 30px !important;
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 6px !important;
    line-height: 1 !important;
    aspect-ratio: 1 / 1;
}

.boq-main-table td.action-icons .icon-action svg,
.boq-document-table td.action-icons .icon-action svg,
.boq-additions-table td.action-icons .icon-action svg,
.boq-main-table .boq-action-buttons .icon-action svg {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    transform: none !important;
    stroke-width: 2;
}

.boq-action-strip-final .link-button {
    min-height: 38px;
    align-items: center;
    gap: 7px;
}

.boq-action-strip-final .link-button svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}

@media (max-width: 1100px) {
    .schedule-hero,
    .schedule-stats {
        grid-template-columns: 1fr;
    }
}

.works-description {
    text-align: start !important;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.works-source {
    display: block;
    margin-top: 3px;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 700;
}

.works-source.appendix { color: #9a3412; }
.works-status-table .number { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.works-cell-note {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
}

.works-schedule-cell,
.works-variance-cell,
.works-material-cell {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 5px 6px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    line-height: 1.25;
}

.works-schedule-cell strong,
.works-variance-cell strong,
.works-material-cell strong {
    color: #17324d;
    font-size: 10px;
    font-weight: 950;
}

.works-schedule-cell span,
.works-schedule-cell small,
.works-variance-cell small,
.works-material-cell small,
.works-period-count {
    display: block;
    color: #475569;
    font-size: 8px;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.works-schedule-cell.behind,
.works-variance-cell.behind,
.works-material-cell.critical,
.works-material-cell.empty {
    border-color: #fca5a5;
    background: #fff1f2;
}

.works-schedule-cell.on_track,
.works-variance-cell.on_track,
.works-material-cell.ok {
    border-color: #86efac;
    background: #f0fdf4;
}

.works-schedule-cell.ahead,
.works-variance-cell.ahead {
    border-color: #93c5fd;
    background: #eff6ff;
}

.works-schedule-cell.none,
.works-material-cell.none {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.works-material-cell.low {
    border-color: #fcd34d;
    background: #fffbeb;
}

.works-stock-status.subcontractor_supply,
.works-supply-priority.subcontractor_supply {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #9a3412;
}

.works-stock-status.subcontractor_supply small,
.works-supply-priority.subcontractor_supply small {
    color: #b45309;
}

.works-progress {
    position: relative;
    height: 22px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, .14);
}

.works-progress span {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.works-progress strong {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    place-items: center;
    color: #0f172a;
    font-size: 10px;
    font-weight: 950;
    text-shadow: 0 1px 0 rgba(255,255,255,.62);
}

.works-progress.behind span { background: linear-gradient(90deg, #dc2626, #fb7185); }
.works-progress.on_track span,
.works-progress.none span { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.works-progress.ahead span { background: linear-gradient(90deg, #16a34a, #22c55e); }

.works-progress.smart::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: inherit;
    pointer-events: none;
}

.works-status {
    display: inline-flex;
    justify-content: center;
    min-width: 58px;
    padding: 3px 8px;
    border: 0;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    font-size: 9px;
    font-weight: 600;
}

.works-status.low { color: #991b1b; border-color: #fca5a5; background: #fee2e2; }
.works-status.medium { color: #92400e; border-color: #fcd34d; background: #fef3c7; }
.works-status.advanced { color: #065f46; border-color: #6ee7b7; background: #d1fae5; }
.works-status.completed { color: #166534; border-color: #86efac; background: #dcfce7; }
.works-status.behind { color: #991b1b; border-color: #fca5a5; background: #fee2e2; }
.works-status.on_track { color: #1e3a8a; border-color: #93c5fd; background: #dbeafe; }
.works-status.ahead { color: #166534; border-color: #86efac; background: #dcfce7; }
.works-status.none { color: #475569; border-color: #cbd5e1; background: #e2e8f0; }

.works-report-section .table-wrap {
    overflow-x: hidden;
}

.works-status-table,
.works-material-table,
.works-history-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.works-status-table th,
.works-status-table td,
.works-material-table th,
.works-material-table td,
.works-history-table th,
.works-history-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
    vertical-align: middle;
}

.works-status-table th {
    padding: 8px 4px;
    color: #0f2947;
    font-size: 9px;
    font-weight: 950;
    text-align: center;
}

.works-status-table td {
    padding: 7px 4px;
    font-size: 10px;
}

.works-status-table th:nth-child(1),
.works-status-table td:nth-child(1) { width: 5%; }
.works-status-table th:nth-child(2),
.works-status-table td:nth-child(2) { width: 25%; }
.works-status-table th:nth-child(3),
.works-status-table td:nth-child(3) { width: 8%; }
.works-status-table th:nth-child(4),
.works-status-table td:nth-child(4) { width: 5%; }
.works-status-table th:nth-child(5),
.works-status-table td:nth-child(5) { width: 9%; }
.works-status-table th:nth-child(6),
.works-status-table td:nth-child(6) { width: 9%; }
.works-status-table th:nth-child(7),
.works-status-table td:nth-child(7) { width: 8%; }
.works-status-table th:nth-child(8),
.works-status-table td:nth-child(8) { width: 13%; }
.works-status-table th:nth-child(9),
.works-status-table td:nth-child(9) { width: 9%; }
.works-status-table th:nth-child(10),
.works-status-table td:nth-child(10) { width: 9%; }

.works-status-table td:nth-child(3),
.works-status-table td:nth-child(5),
.works-status-table td:nth-child(6),
.works-status-table td:nth-child(9),
.works-status-table td:nth-child(10),
.works-material-table td:nth-child(n+5):nth-child(-n+10) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.works-status-table td:nth-child(2),
.works-material-table td:nth-child(2),
.works-material-table td:nth-child(3) {
    text-align: start;
}

.works-status-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    padding: 9px;
}

.works-status-summary article {
    min-width: 0;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-top: 4px solid #64748b;
    border-radius: 5px;
    text-align: center;
    background: #fff;
}

.works-status-summary .low { border-top-color: #dc2626; }
.works-status-summary .medium { border-top-color: #d97706; }
.works-status-summary .advanced { border-top-color: #059669; }
.works-status-summary .completed { border-top-color: #16a34a; }
.works-status-summary strong { display: block; color: #475569; font-size: 8px; }
.works-status-summary span { display: block; margin: 3px 0; color: #17324d; font-size: 16px; font-weight: 950; }
.works-status-summary p { margin: 0; color: #64748b; font-size: 7px; line-height: 1.45; overflow-wrap: anywhere; }

.works-history-table th:nth-child(2) { width: 26%; }
.works-material-table th:nth-child(1) { width: 3.5%; }
.works-material-table th:nth-child(2) { width: 18%; }
.works-material-table th:nth-child(3) { width: 12%; }
.works-material-table th:nth-child(4) { width: 5.5%; }
.works-material-table th:nth-child(5),
.works-material-table th:nth-child(6),
.works-material-table th:nth-child(7),
.works-material-table th:nth-child(8),
.works-material-table th:nth-child(9),
.works-material-table th:nth-child(10),
.works-material-table th:nth-child(11) { width: 7.4%; }
.works-material-table th:nth-child(12) { width: 8%; }
.works-material-table td:nth-child(2) { text-align: start; font-weight: 700; }
.works-material-table td:nth-child(n+5):nth-child(-n+10) { font-variant-numeric: tabular-nums; white-space: nowrap; }

.works-item-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
}

.works-item-tags span {
    padding: 2px 4px;
    border: 1px solid #93c5fd;
    border-radius: 3px;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 9px;
    font-weight: 700;
}

.works-stock-status {
    display: inline-grid;
    gap: 2px;
    min-width: 72px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.15;
}
.works-stock-status small { font-size: 9px; font-weight: 900; }
.works-stock-status.ok { color: #166534; background: rgba(220, 252, 231, .9); }
.works-stock-status.low { color: #92400e; background: rgba(254, 243, 199, .95); }
.works-stock-status.critical { color: #9f1239; background: rgba(255, 228, 230, .95); }
.works-stock-status.empty { color: #475569; background: rgba(226, 232, 240, .95); }

.works-supply-priority {
    display: inline-grid;
    gap: 2px;
    min-width: 72px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 950;
    line-height: 1.15;
}

.works-supply-priority small {
    display: block;
    font-size: 8px;
    font-weight: 850;
}

.works-supply-priority.ok { color: #166534; background: rgba(220, 252, 231, .9); }
.works-supply-priority.low { color: #92400e; background: rgba(254, 243, 199, .95); }
.works-supply-priority.critical { color: #9f1239; background: rgba(255, 228, 230, .95); }
.works-supply-priority.empty { color: #7f1d1d; background: rgba(254, 226, 226, .95); }
.works-supply-priority.none { color: #475569; background: rgba(226, 232, 240, .95); }

.works-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 9px;
}

.works-chart-grid article {
    min-width: 0;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
}

.works-chart-grid h3 { margin: 0 0 8px; color: #17324d; font-size: 10px; text-align: center; }
.works-chart-canvas { position: relative; width: 100%; height: 250px; }

.works-report-empty {
    display: grid;
    min-height: 170px;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #64748b;
}

.works-report-empty svg { width: 32px; height: 32px; color: #0f766e; }
.works-report-empty p { margin: 0; font-weight: 850; }

.discipline-module-card.works-report { --module-color: #0f766e; --module-dark: #134e4a; }

@media (max-width: 1150px) {
    .works-report-hero { grid-template-columns: 1fr; }
    .works-report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .works-report-filters,
    .works-chart-grid { grid-template-columns: 1fr; }
    .works-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .works-status-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .works-report-section .table-wrap { overflow-x: auto; }
    .works-status-table { min-width: 900px; }
}

@media (max-width: 1000px) {
    .material-takeoff-hero { grid-template-columns: 1fr; }
    .material-takeoff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .material-takeoff-panel > .table-wrap { overflow-x: auto; }
    .material-takeoff-table { min-width: 1050px; }
}

@media (max-width: 620px) {
    .material-takeoff-stats { grid-template-columns: 1fr; }
    .material-takeoff-toolbar { align-items: stretch; flex-direction: column; }
    .material-takeoff-print-button { width: 100%; }
    .material-dialog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.analysis-page {
    display: grid;
    gap: 14px;
}

.analysis-page > .topbar {
    margin-block-end: 0;
    border-color: rgba(32, 54, 75, .2);
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .92), rgba(236, 253, 250, .72)),
        linear-gradient(135deg, rgba(32, 54, 75, .08), rgba(8, 145, 178, .08));
    box-shadow: 0 9px 22px rgba(15, 23, 42, .07);
}

.analysis-page > .topbar h1 {
    color: #20364b;
    font-size: 23px;
}

.analysis-page > .topbar p {
    font-size: 11px;
    line-height: 1.7;
}

.analysis-page > .topbar .badges .link-button {
    border-color: rgba(15, 118, 110, .24);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .42)),
        rgba(15, 118, 110, .09);
    font-size: 11px;
}

.analysis-create-premium {
    --analysis-navy: #20364b;
    --analysis-teal: #0f766e;
    --analysis-cyan: #0891b2;
    position: relative;
    padding: 0;
    border: 1px solid rgba(32, 54, 75, .22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 250, 250, .94)),
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(8, 145, 178, .07));
    box-shadow: 0 14px 32px rgba(15, 23, 42, .1);
    overflow: visible;
}

.analysis-create-premium::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 5px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(90deg, var(--analysis-navy), var(--analysis-teal), var(--analysis-cyan));
}

.analysis-create-heading {
    min-height: 76px;
    padding: 18px 20px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(32, 54, 75, .14);
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .92), rgba(236, 253, 250, .64));
}

.analysis-create-heading-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--analysis-teal), var(--analysis-navy));
    box-shadow: 0 6px 15px rgba(15, 118, 110, .22);
}

.analysis-create-heading-icon svg {
    width: 20px;
    height: 20px;
}

.analysis-create-heading h2 {
    margin: 0 0 4px;
    color: var(--analysis-navy);
    font-size: 17px;
    font-weight: 900;
}

.analysis-create-heading small {
    color: #718096;
    font-size: 10px;
    font-weight: 900;
}

.analysis-create-premium > form {
    gap: 0;
    padding: 15px 17px 17px;
}

.analysis-description-field {
    margin: 0 0 11px;
    padding: 11px 12px;
    gap: 6px;
    border: 1px solid rgba(15, 118, 110, .17);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(240, 253, 250, .68));
}

.analysis-description-field > span {
    color: var(--analysis-navy);
    font-size: 11px;
    font-weight: 900;
}

.analysis-edit-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 8px;
    color: #1d4ed8;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 246, 255, 0.72));
    font-size: 13px;
    font-weight: 900;
}

.analysis-edit-banner[hidden] {
    display: none;
}

.analysis-edit-banner svg {
    width: 18px;
    height: 18px;
}

.analysis-description-field textarea {
    min-height: 74px;
    padding: 11px 13px;
    border: 1px solid #b8c7d3;
    border-radius: 7px;
    background: #fff;
    color: #243746;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.75;
    resize: vertical;
}

.analysis-description-field textarea:focus {
    border-color: var(--analysis-teal);
    outline: 3px solid rgba(15, 118, 110, .1);
}

.analysis-create-premium > form > .field.compact {
    width: min(180px, 100%);
    margin-block-end: 11px;
    gap: 5px;
}

.analysis-create-premium > form > .field.compact > span {
    color: #526171;
    font-size: 10px;
    font-weight: 900;
}

.analysis-create-premium > form > .field.compact select {
    height: 38px;
    min-height: 38px;
    padding-inline: 10px;
    border-color: #b8c7d3;
    background: #fff;
    font-size: 11px;
    font-weight: 900;
}

.analysis-settings-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(110px, 0.55fr) repeat(3, minmax(120px, 0.65fr));
    gap: 10px;
    align-items: end;
    margin-block-end: 14px;
}

.analysis-editor-card {
    border: 1px solid #93a4b3;
    border-radius: 8px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .075);
    position: relative;
    z-index: 25;
}

.analysis-create-table-wrap {
    border: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    overflow: visible;
    position: relative;
    z-index: 30;
}

.analysis-create-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 10px;
}

.analysis-create-table thead th {
    height: 45px;
    padding: 7px 4px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .1), transparent),
        linear-gradient(135deg, var(--analysis-navy), #285c62);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
}

.analysis-create-table th,
.analysis-create-table td {
    padding: 6px 4px;
    border: 1px solid #c7d0d9;
    text-align: center;
    vertical-align: middle;
}

.analysis-create-table tbody tr {
    background: #fff;
    transition: background .16s ease;
}

.analysis-create-table tbody tr:nth-child(even) {
    background: #f6faf9;
}

.analysis-create-table tbody tr:hover {
    background: #eef8f7;
}

.analysis-create-table th:nth-child(1),
.analysis-create-table td:nth-child(1) {
    width: 11%;
}

.analysis-create-table th:nth-child(2),
.analysis-create-table td:nth-child(2) {
    width: 13%;
}

.analysis-create-table th:nth-child(3),
.analysis-create-table td:nth-child(3) {
    width: 25%;
}

.analysis-create-table th:nth-child(4),
.analysis-create-table td:nth-child(4) {
    width: 7%;
}

.analysis-create-table th:nth-child(5),
.analysis-create-table td:nth-child(5),
.analysis-create-table th:nth-child(6),
.analysis-create-table td:nth-child(6),
.analysis-create-table th:nth-child(7),
.analysis-create-table td:nth-child(7),
.analysis-create-table th:nth-child(8),
.analysis-create-table td:nth-child(8),
.analysis-create-table th:nth-child(9),
.analysis-create-table td:nth-child(9) {
    width: 8%;
}

.analysis-create-table th:nth-child(10),
.analysis-create-table td:nth-child(10) {
    width: 4%;
}

.analysis-create-table select,
.analysis-create-table input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    height: 34px;
    padding-inline: 6px;
    border: 1px solid #b8c4cf;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
}

.analysis-create-table select:focus,
.analysis-create-table input:focus {
    border-color: var(--analysis-teal);
    outline: 2px solid rgba(15, 118, 110, .1);
}

.analysis-create-table input[type="number"] {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.analysis-create-table input[readonly] {
    border-color: #c6d8d4;
    background: #eff8f6;
    color: #155e55;
    font-weight: 900;
}

.analysis-create-table [data-row-total] {
    display: block;
    color: #172f45;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.analysis-create-table [data-remove-row] {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    margin-inline: auto;
    border-radius: 6px;
}

.analysis-create-table [data-remove-row] svg {
    width: 14px;
    height: 14px;
}

.analysis-item-picker {
    position: relative;
}

.analysis-item-picker > select {
    display: none;
}

.analysis-picker-toggle {
    width: 100%;
    min-height: 34px;
    height: 34px;
    border: 1px solid rgba(8, 145, 178, .3);
    border-radius: 5px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .22)),
        linear-gradient(135deg, rgba(8, 145, 178, .18), rgba(15, 118, 110, .12));
    color: #164e63;
    padding-inline: 7px;
    font-size: 10px;
    font-weight: 900;
    text-align: start;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 18px rgba(37, 99, 235, 0.08);
}

.analysis-picker-toggle span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analysis-picker-menu {
    position: absolute;
    z-index: 500;
    inset-inline: 0;
    top: calc(100% + 4px);
    display: none;
    min-width: 260px;
    padding: 8px;
    border: 1px solid rgba(15, 118, 110, .28);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.analysis-create-panel:has(.analysis-item-picker.is-open) {
    margin-block-end: 300px;
}

.analysis-current-panel {
    position: relative;
    z-index: 1;
}

.analysis-page .analysis-current-panel {
    padding: 16px;
    border-color: rgba(32, 54, 75, .18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(247, 250, 250, .9));
    box-shadow: 0 11px 27px rgba(15, 23, 42, .075);
}

.analysis-page .analysis-panel-head {
    min-height: 48px;
    margin: 0;
    padding-block-end: 11px;
    border-bottom: 1px solid rgba(32, 54, 75, .14);
}

.analysis-page .analysis-panel-head h2 {
    color: #20364b;
    font-size: 16px;
}

.analysis-item-picker.is-open .analysis-picker-menu {
    display: grid;
    gap: 7px;
}

.analysis-picker-menu input[type="search"] {
    min-height: 32px;
    height: 32px;
    font-size: 12px;
    background: #f8fafc;
}

.analysis-picker-list {
    display: grid;
    max-height: 220px;
    overflow-y: auto;
}

.analysis-picker-list button {
    border: 0;
    border-radius: 5px;
    background: transparent;
    padding: 8px;
    color: var(--ink);
    text-align: start;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.analysis-picker-list button:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.analysis-create-table tfoot th {
    height: 46px;
    color: #111;
    border-color: #b56b12;
    background: linear-gradient(180deg, #ffd79e, #f6a94a);
    font-size: 13px;
    font-weight: 950;
}

.analysis-create-table tfoot [data-create-total] {
    direction: ltr;
    font-family: "Courier New", monospace;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.analysis-create-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border-block-start: 1px solid #b9c6d1;
    border-radius: 0 0 8px 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(241, 247, 247, .84)),
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(8, 145, 178, .06));
}

.analysis-save-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.analysis-create-actions .link-button.subtle {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), transparent),
        linear-gradient(135deg, #0f766e, #0891b2);
    border-color: rgba(255, 255, 255, .3);
    box-shadow: 0 7px 15px rgba(8, 145, 178, .18), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.analysis-create-actions .primary-button {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), transparent),
        linear-gradient(135deg, #0f766e, #0891b2);
    border-color: rgba(255, 255, 255, .3);
    box-shadow: 0 7px 15px rgba(8, 145, 178, .18), inset 0 1px 0 rgba(255, 255, 255, .34);
}

.analysis-create-actions .primary-button:hover,
.analysis-create-actions .primary-button:focus-visible {
    color: #fff;
}

.analysis-create-actions .primary-button svg {
    color: #fff;
    stroke: currentColor;
}

.analysis-create-actions .analysis-save-actions [data-cancel-analysis-edit] {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .2), transparent),
        linear-gradient(135deg, #64748b, #334155);
    box-shadow: 0 7px 15px rgba(51, 65, 85, .16), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.analysis-create-actions button {
    min-height: 42px;
    height: 42px;
    padding-inline: 16px;
    border-radius: 7px;
    font-size: 11px;
}

.analysis-create-actions button svg {
    width: 16px;
    height: 16px;
}

.analysis-page .analysis-create-table .analysis-picker-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(15, 118, 110, .30) !important;
    border-radius: 7px !important;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%) !important;
    color: #123046 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .92),
        0 5px 12px rgba(15, 23, 42, .06) !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    text-align: start !important;
    cursor: pointer !important;
    transform: none !important;
}

.analysis-page .analysis-create-table .analysis-picker-toggle::after {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-inline-end: 2px solid #0f766e;
    border-block-end: 2px solid #0f766e;
    transform: rotate(45deg) translateY(-2px);
    opacity: .9;
}

.analysis-page .analysis-item-picker.is-open .analysis-picker-toggle {
    border-color: rgba(245, 158, 11, .72) !important;
    outline: 3px solid rgba(245, 158, 11, .14) !important;
}

.analysis-page .analysis-picker-menu {
    z-index: 3000 !important;
    min-width: min(420px, 86vw) !important;
    border-radius: 9px !important;
    border: 1px solid rgba(15, 118, 110, .26) !important;
    background: linear-gradient(180deg, #fff, #f8fbfb) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .20) !important;
}

.analysis-page .analysis-picker-menu input[type="search"] {
    border-color: rgba(15, 118, 110, .28) !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

.analysis-page .analysis-picker-list {
    gap: 3px !important;
    padding-block: 2px !important;
}

.analysis-page .analysis-picker-list button {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 9px !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #102a43 !important;
    box-shadow: none !important;
    font-size: 10.5px !important;
    font-weight: 850 !important;
    line-height: 1.45 !important;
    text-align: start !important;
    white-space: normal !important;
    transform: none !important;
}

.analysis-page .analysis-picker-list button:hover,
.analysis-page .analysis-picker-list button:focus-visible {
    border-color: rgba(5, 150, 105, .22) !important;
    background: linear-gradient(135deg, rgba(236, 253, 245, .95), rgba(240, 253, 250, .86)) !important;
    color: #047857 !important;
}

.analysis-page .analysis-create-actions [data-add-create-row] {
    border-color: rgba(5, 150, 105, .54) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 8px 18px rgba(5, 150, 105, .20) !important;
}

.analysis-page [data-cancel-analysis-edit].is-hidden {
    display: none !important;
}

.analysis-page .analysis-create-actions {
    display: grid !important;
    grid-template-columns: minmax(160px, .7fr) minmax(360px, 1fr) minmax(160px, .7fr) !important;
    align-items: center !important;
    gap: 12px !important;
}

.analysis-page .analysis-create-actions [data-add-create-row] {
    justify-self: start !important;
}

.analysis-page .analysis-create-actions .analysis-save-actions {
    grid-column: 2 !important;
    justify-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.analysis-page .analysis-create-actions .analysis-save-actions [data-save-analysis-label] {
    width: min(100%, 430px) !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 950 !important;
}

.analysis-page .analysis-create-actions .analysis-save-actions [data-cancel-analysis-edit]:not(.is-hidden) {
    flex: 0 0 auto !important;
}

.analysis-page :is(
    .print-tables-button,
    .analysis-print-toolbar .primary-button,
    .analysis-print-toolbar button,
    button[data-print-analyses],
    button[onclick*="print"],
    .print-button,
    .link-button.print,
    .primary-button.print
) {
    border-color: rgba(5, 150, 105, .56) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 9px 20px rgba(5, 150, 105, .22) !important;
}

.analysis-page :is(
    .print-tables-button,
    .analysis-print-toolbar .primary-button,
    .analysis-print-toolbar button,
    button[data-print-analyses],
    button[onclick*="print"],
    .print-button,
    .link-button.print,
    .primary-button.print
):hover {
    border-color: rgba(4, 120, 87, .68) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .20), transparent 44%),
        linear-gradient(180deg, #059669 0%, #065f46 100%) !important;
    color: #fff !important;
}

.analysis-page :is(.print-tables-button, button[data-print-analyses]) svg {
    color: #fff !important;
    stroke: currentColor !important;
}

.analysis-entry-grid,
.analysis-component-grid {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) minmax(240px, 1.4fr) minmax(86px, 0.45fr) minmax(96px, 0.5fr) repeat(3, minmax(96px, 0.52fr)) auto;
    gap: 10px;
    align-items: end;
}

.analysis-component-grid {
    grid-template-columns: minmax(120px, 0.62fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(150px, 0.75fr) minmax(220px, 1.15fr) minmax(86px, 0.45fr) repeat(4, minmax(96px, 0.5fr)) auto;
}

.analysis-title-field,
.analysis-component-grid .wide {
    min-width: 0;
}

.analysis-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-block-end: 18px;
}

.analysis-summary article {
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(183, 121, 31, 0.08));
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.analysis-summary article::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--gold));
}

.analysis-summary article.final {
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.analysis-summary svg {
    color: var(--gold);
    width: 24px;
    height: 24px;
}

.analysis-summary article.final svg,
.analysis-summary article.final span {
    color: rgba(255, 255, 255, 0.82);
}

.analysis-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.analysis-summary strong {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
}

.analysis-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 14px;
}

.analysis-panel-head form {
    margin: 0;
}

.analysis-current-panel {
    display: grid;
    gap: 16px;
}

.analysis-print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(251, 146, 60, 0.08));
}

.analysis-print-header {
    display: none;
}

.print-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.print-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.print-tables-button {
    min-height: 40px;
}

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

.analysis-table-card {
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(183, 121, 31, 0.07));
    box-shadow: var(--shadow-soft);
    padding: 14px;
    display: grid;
    gap: 14px;
}

.analysis-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.analysis-card-title {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 8px;
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.5;
    flex: 1;
}

.table-print-check {
    flex: 0 0 auto;
    padding-inline: 10px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
}

.analysis-inline-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 8px;
    align-items: start;
}

.analysis-inline-form input,
.analysis-inline-form select,
.analysis-inline-form textarea,
.analysis-component-add-form input,
.analysis-component-add-form select {
    min-height: 38px;
    font-size: 13px;
}

.analysis-inline-form textarea {
    min-height: 42px;
    padding-block: 9px;
    font-size: 14px;
    font-weight: 900;
    resize: vertical;
}

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

.analysis-component-add-form {
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.48);
}

.analysis-add-table-form {
    display: grid;
    gap: 10px;
}

.analysis-add-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: end;
    gap: 10px;
}

.analysis-add-toolbar .field {
    width: min(100%, 340px);
}

.analysis-add-table {
    min-width: 1040px;
}

.analysis-add-table .icon-action {
    margin-inline: auto;
}

.analysis-subtitle {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.analysis-empty-line {
    border: 1px dashed rgba(15, 118, 110, 0.26);
    border-radius: var(--radius);
    padding: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.52);
    text-align: center;
    font-weight: 800;
}

.analysis-tree-table td {
    vertical-align: top;
}

.analysis-tree-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 12px;
    border: 1px solid #000;
}

.analysis-table-wrap {
    overflow-x: hidden;
}

.analysis-table-wrap table,
.nested-table-shell table {
    min-width: 0;
}

.analysis-tree-table th,
.analysis-tree-table td {
    padding: 7px 6px;
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
    border: 1px solid #000;
}

.analysis-tree-table thead th {
    font-size: 11px;
    line-height: 1.35;
    font-weight: 900;
}

.analysis-tree-table th:nth-child(1),
.analysis-tree-table td:nth-child(1) {
    width: 5%;
}

.analysis-tree-table th:nth-child(2),
.analysis-tree-table td:nth-child(2) {
    width: 32%;
}

.analysis-tree-table th:nth-child(3),
.analysis-tree-table td:nth-child(3) {
    width: 9%;
}

.analysis-tree-table th:nth-child(4),
.analysis-tree-table td:nth-child(4),
.analysis-tree-table th:nth-child(5),
.analysis-tree-table td:nth-child(5),
.analysis-tree-table th:nth-child(6),
.analysis-tree-table td:nth-child(6),
.analysis-tree-table th:nth-child(7),
.analysis-tree-table td:nth-child(7),
.analysis-tree-table th:nth-child(8),
.analysis-tree-table td:nth-child(8) {
    width: 9%;
}

.analysis-tree-table tfoot th {
    text-align: center;
    color: #000;
    background: linear-gradient(180deg, #fed7aa, #fb923c);
    border-color: rgba(194, 65, 12, 0.24);
    font-size: 13px;
    font-weight: 950;
}

.analysis-tree-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-align: start;
}

.analysis-cell-text {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.row-number {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-inline: auto;
    border-radius: 999px;
    color: var(--primary-strong);
    background: var(--primary-soft);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.num-cell {
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.row-total {
    font-size: 12px;
}

.analysis-table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.analysis-table-actions form {
    margin: 0;
}

.analysis-tree-cell svg {
    color: var(--primary);
}

.tree-indent {
    width: calc(var(--level, 0) * 22px);
    flex: 0 0 calc(var(--level, 0) * 22px);
}

.analysis-parent-row > td {
    background: rgba(15, 118, 110, 0.045);
}

.analysis-nested-row > td {
    padding: 10px 14px 14px;
    background:
        linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 18px),
        rgba(248, 250, 249, 0.76);
}

.nested-table-shell {
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius);
    overflow: hidden;
    margin-inline-start: 30px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[dir="rtl"] .nested-table-shell {
    margin-inline-start: 0;
    margin-inline-end: 30px;
}

.nested-table-shell table {
    min-width: 720px;
}

.analysis-embedded-source-row > td {
    background:
        linear-gradient(180deg, rgba(239, 246, 255, .94), rgba(236, 253, 245, .76)) !important;
}

.analysis-embedded-source-row .analysis-tree-cell {
    align-items: center;
}

.embedded-analysis-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border: 1px solid rgba(37, 99, 235, .24);
    border-radius: 999px;
    color: #1d4ed8;
    background: rgba(219, 234, 254, .82);
    font-size: 9.5px;
    font-weight: 950;
    white-space: nowrap;
}

.analysis-embedded-mini-row > td {
    padding: 8px 12px 12px !important;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, .09), transparent 20px),
        rgba(239, 246, 255, .74) !important;
}

.embedded-analysis-mini-shell {
    width: min(100%, 980px);
    margin-inline-start: 34px;
    border: 1px solid rgba(37, 99, 235, .26);
    border-radius: 9px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(239,246,255,.88));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.94),
        0 9px 20px rgba(37, 99, 235, .09);
}

html[dir="rtl"] .embedded-analysis-mini-shell {
    margin-inline-start: 0;
    margin-inline-end: 34px;
}

.embedded-analysis-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    color: #0f172a;
    border-bottom: 1px solid rgba(37, 99, 235, .20);
    background:
        linear-gradient(180deg, rgba(219,234,254,.96), rgba(240,253,250,.88));
    font-size: 10.5px;
    font-weight: 950;
}

.embedded-analysis-mini-head span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d4ed8;
}

.embedded-analysis-mini-head svg {
    width: 14px;
    height: 14px;
}

.embedded-analysis-mini-head strong {
    min-width: 0;
    color: #0f766e;
    overflow-wrap: anywhere;
    text-align: end;
}

.embedded-analysis-mini-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 10px;
}

.embedded-analysis-mini-table th,
.embedded-analysis-mini-table td {
    padding: 5px 4px !important;
    border: 1px solid rgba(30, 64, 175, .32) !important;
    line-height: 1.25;
    text-align: center;
}

.embedded-analysis-mini-table thead th {
    color: #fff;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    font-size: 9.5px;
    font-weight: 950;
}

.embedded-analysis-mini-table tbody tr:nth-child(even) td {
    background: rgba(239, 246, 255, .72);
}

.embedded-analysis-mini-table tfoot th {
    color: #000;
    background: linear-gradient(180deg, #fed7aa, #fb923c);
    font-size: 10px;
    font-weight: 950;
}

.embedded-analysis-mini-table th:nth-child(1),
.embedded-analysis-mini-table td:nth-child(1) {
    width: 5%;
}

.embedded-analysis-mini-table th:nth-child(2),
.embedded-analysis-mini-table td:nth-child(2) {
    width: 34%;
}

.embedded-analysis-mini-table th:nth-child(3),
.embedded-analysis-mini-table td:nth-child(3) {
    width: 9%;
}

.mini-analysis-name {
    text-align: start !important;
    overflow-wrap: anywhere;
}

.mini-analysis-indent {
    display: inline-block;
    width: calc(var(--level, 0) * 14px);
}

@media print {
    .embedded-analysis-mini-shell {
        width: 100%;
        margin-inline-start: 18px;
        box-shadow: none;
    }

    html[dir="rtl"] .embedded-analysis-mini-shell {
        margin-inline-start: 0;
        margin-inline-end: 18px;
    }
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    flex-wrap: nowrap;
}

.row-actions form {
    margin: 0;
}

.table-input {
    min-height: 34px;
    height: 34px;
    border-radius: 6px;
    padding-inline: 8px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.78);
}

.table-input[readonly],
.analysis-inline-form textarea[readonly] {
    color: var(--ink);
    background: rgba(248, 250, 249, 0.78);
    border-color: rgba(15, 23, 42, 0.08);
    cursor: default;
}

.is-editing .table-input,
.analysis-inline-form.is-editing textarea {
    background: #fff;
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.description-input {
    width: 100%;
    min-width: 0;
}

.unit-input {
    width: 100%;
}

.number-input {
    direction: ltr;
    text-align: center;
    width: 100%;
    font-variant-numeric: tabular-nums;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding-inline: 10px;
    border-radius: 999px;
    color: var(--primary-strong);
    background: var(--primary-soft);
    border: 1px solid rgba(15, 118, 110, 0.16);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

html[dir="rtl"] .resource-modal .resource-save-button {
    justify-self: start;
}

.material-category-layout {
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.4fr);
    margin-block-end: 18px;
}

.wide-import-panel {
    grid-column: 1 / -1;
}

.form-hint {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.field.wide {
    min-width: 0;
}

.compact-row {
    max-width: 520px;
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-block-end: 18px;
}

.project-cards-showcase {
    grid-template-columns: repeat(3, minmax(290px, 1fr));
    gap: 22px;
}

.projects-page {
    position: relative;
}

.projects-page-header {
    position: relative;
    overflow: hidden;
    padding: 22px 24px;
    margin-block-end: 22px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.88)),
        repeating-linear-gradient(135deg, transparent 0 16px, rgba(15, 118, 110, 0.04) 16px 17px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.projects-page-header::after {
    content: "";
    position: absolute;
    inset-inline-end: -48px;
    inset-block-start: -90px;
    width: 250px;
    height: 250px;
    border: 42px solid rgba(15, 118, 110, 0.055);
    border-radius: 50%;
    pointer-events: none;
}

.projects-page-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.projects-page-heading h1 {
    margin-block-end: 5px;
}

.projects-page-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 44%),
        linear-gradient(135deg, #0f766e, #155e75);
    box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.projects-page-icon svg {
    width: 25px;
    height: 25px;
}

.projects-page-actions {
    position: relative;
    z-index: 1;
}

.project-card,
.empty-state {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.project-card {
    padding: 16px;
    display: grid;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.project-card-premium {
    padding: 0;
    min-height: 455px;
    align-content: stretch;
    grid-template-rows: auto 1fr auto;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98)),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a, var(--primary)) 12%, transparent), color-mix(in srgb, var(--card-b, var(--gold)) 10%, transparent));
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card-premium:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--card-a, var(--primary)) 34%, rgba(148, 163, 184, 0.24));
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.14);
}

.project-card-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(120deg, transparent 0 54%, rgba(255, 255, 255, 0.58) 54% 54.5%, transparent 54.5%),
        repeating-linear-gradient(135deg, rgba(15, 118, 110, 0.025) 0 1px, transparent 1px 14px);
    opacity: 0.9;
}

.project-card-premium::after {
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-a, var(--primary)), var(--card-b, var(--gold)), var(--card-c, var(--steel)));
}

.project-card-media {
    width: 100%;
    min-width: 0;
    height: 170px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a, var(--primary)) 88%, #ffffff 12%), color-mix(in srgb, var(--card-c, var(--steel)) 82%, #ffffff 18%));
    display: grid;
    place-items: center;
    border-block-end: 1px solid rgba(255, 255, 255, 0.58);
}

.project-card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 45%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 16px);
    mix-blend-mode: screen;
    z-index: 1;
    pointer-events: none;
}

.project-card-media > a {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    text-decoration: none;
}

.project-card-media img {
    width: 100%;
    height: 100%;
    max-height: 142px;
    object-fit: contain;
    display: block;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    z-index: 2;
    opacity: 1;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.16));
}

.project-card-media > span {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
}

.project-card-media > span svg {
    width: 13px;
    height: 13px;
}

.project-card-media .project-status {
    inset-block-start: 12px;
    inset-inline-start: 12px;
    color: #065f46;
}

.project-card-media .project-code {
    inset-block-end: 12px;
    inset-inline-end: 12px;
}

.project-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--card-a, var(--primary)), var(--card-c, var(--primary-strong)));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
    z-index: 1;
}

.project-logo-fallback svg {
    width: 52px;
    height: 52px;
}

.project-card-body {
    display: grid;
    align-content: start;
    gap: 15px;
    padding: 18px 18px 14px;
}

.project-card-actions {
    position: relative;
    inset: auto;
    z-index: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 16px;
    margin-block-start: auto;
    border-block-start: 1px solid rgba(46, 71, 68, 0.1);
    background: rgba(255, 255, 255, 0.46);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.project-card-actions form {
    margin: 0;
}

.project-open-action {
    min-height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    border: 1px solid color-mix(in srgb, var(--card-a, var(--primary)) 74%, #fff);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), transparent 42%),
        linear-gradient(135deg, var(--card-a, var(--primary)), color-mix(in srgb, var(--card-c, var(--steel)) 74%, var(--card-a, var(--primary))));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--card-a, var(--primary)) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.project-open-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px color-mix(in srgb, var(--card-a, var(--primary)) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.project-open-action svg {
    width: 17px;
    height: 17px;
}

.project-card-tools {
    display: flex;
    align-items: center;
    gap: 7px;
}

.icon-action {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid rgba(29, 78, 216, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.3), rgba(14, 165, 233, 0.2));
    color: #0b2f78;
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        inset 0 -10px 18px rgba(255, 255, 255, 0.1),
        0 10px 22px rgba(37, 99, 235, 0.12);
    backdrop-filter: blur(12px);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    border-color: rgba(29, 78, 216, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -10px 18px rgba(255, 255, 255, 0.16),
        0 14px 28px rgba(37, 99, 235, 0.18);
}

.icon-action.primary {
    color: #08245d;
    border-color: rgba(29, 78, 216, 0.52);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.1)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.58), rgba(14, 165, 233, 0.42));
}

.icon-action.edit {
    color: #053d30;
    border-color: rgba(15, 118, 110, 0.44);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.12)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.42), rgba(16, 185, 129, 0.28));
}

.icon-action.edit:hover {
    border-color: rgba(15, 118, 110, 0.58);
}

.icon-action.danger {
    color: #7f1231;
    border-color: rgba(159, 18, 57, 0.34);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.14)),
        linear-gradient(135deg, rgba(244, 63, 94, 0.3), rgba(190, 18, 60, 0.2));
}

.icon-action.danger:hover {
    border-color: rgba(159, 18, 57, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -10px 18px rgba(255, 255, 255, 0.16),
        0 14px 28px rgba(159, 18, 57, 0.18);
}

.table-actions .icon-action svg,
.analysis-table-actions .icon-action svg,
.row-actions .icon-action svg,
.action-icons .icon-action svg {
    width: 17px;
    height: 17px;
}

.action-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: nowrap;
}

/* BOQ registers use a real table cell with a centered action rail. */
.boq-register-panel {
    border: 1px solid rgba(30, 41, 59, .14);
    background: rgba(255, 255, 255, .76);
}

.boq-register-panel::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #b45309, #f59e0b, #475569);
}

.boq-final-index-panel::before {
    background: linear-gradient(90deg, #047857, #10b981, #334155);
}

.boq-register-heading {
    padding: 17px 20px;
    border-bottom-color: rgba(30, 41, 59, .12);
}

.boq-register-heading h2 {
    color: #17211f;
    font-size: 19px;
}

.boq-register-table {
    border-collapse: separate;
    border-spacing: 0;
}

.boq-register-table th {
    height: 44px;
    border-width: 0 0 1px 1px;
    border-color: rgba(255, 255, 255, .2);
    background: #334155;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .24);
}

[dir="ltr"] .boq-register-table th {
    border-width: 0 1px 1px 0;
}

.boq-draft-register .boq-register-table th {
    background: #374151;
}

.boq-final-index-panel .boq-register-table th {
    background: #1f4f46;
}

.boq-register-table td {
    height: 58px;
    border-width: 0 0 1px 1px;
    border-color: rgba(51, 65, 85, .13);
    background: transparent;
}

[dir="ltr"] .boq-register-table td {
    border-width: 0 1px 1px 0;
}

.boq-register-table tbody tr {
    background: #fff;
}

.boq-register-table tbody tr:nth-child(even) {
    background: #f6f9f8;
}

.boq-register-table tbody tr:hover {
    background: #eef6f4;
    box-shadow: inset -4px 0 0 #0f766e;
}

[dir="ltr"] .boq-register-table tbody tr:hover {
    box-shadow: inset 4px 0 0 #0f766e;
}

.boq-draft-register .boq-register-table tbody tr:hover {
    background: #fff8eb;
    box-shadow: inset -4px 0 0 #d97706;
}

[dir="ltr"] .boq-draft-register .boq-register-table tbody tr:hover {
    box-shadow: inset 4px 0 0 #d97706;
}

.boq-register-table .boq-desc-cell strong {
    color: #17211f;
    font-size: 12px;
    line-height: 1.5;
}

.boq-register-table .num-cell strong {
    color: #111827;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.boq-row-number {
    color: #64748b;
    background: rgba(51, 65, 85, .035) !important;
    font-variant-numeric: tabular-nums;
}

.boq-code {
    padding: 5px 7px;
    border: 1px solid rgba(37, 99, 235, .15);
    border-radius: 5px;
    color: #1e3a8a;
    background: #eff6ff;
}

.boq-table-status,
.boq-data-chip,
.boq-currency-chip {
    min-height: 29px;
    padding-inline: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.boq-main-table td.boq-register-actions {
    display: table-cell;
    width: 14%;
    min-width: 0;
    padding: 7px 5px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.boq-action-buttons {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.boq-main-table .boq-action-buttons .icon-action {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    line-height: 0;
}

.boq-main-table .boq-action-buttons .icon-action svg {
    position: static;
    display: block;
    width: 16px;
    height: 16px;
    margin: 0;
    transform: none;
    stroke-width: 1.9;
}

.boq-action-buttons .icon-action.view {
    color: #1e3a8a;
    border-color: rgba(37, 99, 235, .3);
    background: #eaf2ff;
}

.boq-action-buttons .icon-action.edit {
    color: #065f46;
    border-color: rgba(5, 150, 105, .3);
    background: #e9f8f2;
}

.boq-action-buttons .icon-action.print {
    color: #065f46;
    border-color: rgba(5, 150, 105, .32);
    background: #e8f7ef;
}

.boq-action-buttons .icon-action.analysis-print {
    color: #5b3b08;
    border-color: rgba(180, 83, 9, .28);
    background: #fff5df;
}

.boq-action-buttons .icon-action.danger {
    color: #9f1239;
    border-color: rgba(190, 18, 60, .28);
    background: #fff0f3;
}

.boq-action-buttons .icon-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .14), inset 0 1px 0 #fff;
}

/* BOQ registers mirror the clean document tables used by the print preview. */
.boq-print-register {
    padding: 0;
    overflow: hidden;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .09);
}

.boq-print-register::before {
    height: 5px;
    background: #2c3e50;
}

.boq-print-register.boq-final-index-panel::before {
    background: #2c3e50;
}

.boq-print-register .boq-register-heading {
    min-height: 86px;
    padding: 18px 22px;
    border-bottom: 2px solid #2c3e50;
    background: #fff;
}

.boq-register-title-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.boq-register-title-block > div {
    min-width: 0;
}

.boq-register-heading-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a5568, #2c3e50);
    box-shadow: 0 5px 13px rgba(44, 62, 80, .22);
}

.boq-register-heading-icon.final {
    background: linear-gradient(135deg, #38a169, #276749);
    box-shadow: 0 5px 13px rgba(56, 161, 105, .23);
}

.boq-register-heading-icon svg {
    width: 21px;
    height: 21px;
}

.boq-print-register .boq-register-heading h2 {
    margin: 0 0 5px;
    color: #2c3e50;
    font-size: 20px;
    line-height: 1.35;
}

.boq-print-register .boq-register-heading p {
    overflow: hidden;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boq-register-count {
    min-width: 112px;
    min-height: 48px;
    padding: 6px 13px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    color: #744210;
    border: 1px solid #f4d7a1;
    border-radius: 8px;
    background: #fffaf0;
    font-size: 11px;
    font-weight: 900;
}

.boq-register-count.final {
    color: #22543d;
    border-color: #bfe3cf;
    background: #f0fff4;
}

.boq-register-count strong {
    color: #2c3e50;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.boq-register-description {
    margin: 0;
    padding: 10px 22px;
    color: #744210;
    border-bottom: 1px solid #eadfc9;
    background: #fffaf0;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
}

.boq-register-description.final {
    color: #22543d;
    border-bottom-color: #cfe7d9;
    background: #f0fff4;
}

.boq-print-register .boq-register-wrap {
    padding: 18px 20px 20px;
    overflow: visible;
    background: #fff;
}

.boq-print-style-table {
    width: 100%;
    table-layout: fixed;
    border: 1px solid #cbd5e0;
    border-collapse: collapse;
    border-radius: 0;
    color: #2d3748;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
}

.boq-print-style-table thead,
.boq-draft-register .boq-print-style-table thead,
.boq-final-index-panel .boq-print-style-table thead {
    background: linear-gradient(135deg, #2c3e50, #2d3748);
}

.boq-print-style-table th,
.boq-draft-register .boq-print-style-table th,
.boq-final-index-panel .boq-print-style-table th {
    height: 46px;
    padding: 9px 7px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    box-shadow: none;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
}

.boq-print-style-table td,
[dir="ltr"] .boq-print-style-table td {
    height: 56px;
    padding: 9px 7px;
    color: #2d3748;
    border: 1px solid #d7dee6;
    background: transparent;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
}

.boq-print-style-table tbody tr,
.boq-final-index-panel .boq-print-style-table tbody tr {
    background: #fff;
}

.boq-print-style-table tbody tr:nth-child(even),
.boq-final-index-panel .boq-print-style-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.boq-print-style-table tbody tr:hover,
.boq-draft-register .boq-print-style-table tbody tr:hover,
.boq-final-index-panel .boq-print-style-table tbody tr:hover {
    background: rgba(66, 153, 225, .055);
    box-shadow: none;
}

/* Distinguish editable and finalized BOQ registers at a glance. */
.boq-print-register.boq-draft-register {
    border-color: rgba(14, 165, 233, .34);
    background:
        linear-gradient(180deg, rgba(240, 249, 255, .82), rgba(224, 242, 254, .46)),
        rgba(255, 255, 255, .72);
    box-shadow: 0 12px 30px rgba(2, 132, 199, .1);
}

.boq-print-register.boq-draft-register::before {
    background: linear-gradient(90deg, #0369a1, #38bdf8);
}

.boq-print-register.boq-draft-register .boq-register-heading {
    border-bottom-color: rgba(2, 132, 199, .42);
    background: rgba(240, 249, 255, .78);
}

.boq-draft-register .boq-register-heading-icon {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    box-shadow: 0 5px 14px rgba(2, 132, 199, .24);
}

.boq-draft-register .boq-register-count,
.boq-draft-register .boq-register-description {
    color: #075985;
    border-color: rgba(14, 165, 233, .3);
    background: rgba(224, 242, 254, .7);
}

.boq-print-register.boq-draft-register .boq-register-wrap {
    background: rgba(240, 249, 255, .48);
}

.boq-draft-register .boq-print-style-table {
    border-color: rgba(2, 132, 199, .42);
}

.boq-draft-register .boq-print-style-table thead {
    background: linear-gradient(135deg, #075985, #0284c7);
}

.boq-draft-register .boq-print-style-table td {
    border-color: rgba(14, 116, 144, .2);
}

.boq-draft-register .boq-print-style-table tbody tr {
    background: rgba(255, 255, 255, .88);
}

.boq-draft-register .boq-print-style-table tbody tr:nth-child(even) {
    background: rgba(224, 242, 254, .44);
}

.boq-draft-register .boq-print-style-table tbody tr:hover {
    background: rgba(186, 230, 253, .48);
}

.boq-print-register.boq-final-index-panel {
    border-color: rgba(22, 163, 74, .38);
    background:
        linear-gradient(180deg, rgba(240, 253, 244, .84), rgba(220, 252, 231, .46)),
        rgba(255, 255, 255, .72);
    box-shadow: 0 12px 30px rgba(21, 128, 61, .11);
}

.boq-print-register.boq-final-index-panel::before {
    background: linear-gradient(90deg, #166534, #22c55e);
}

.boq-print-register.boq-final-index-panel .boq-register-heading {
    border-bottom-color: rgba(22, 163, 74, .45);
    background: rgba(240, 253, 244, .8);
}

.boq-final-index-panel .boq-register-heading h2 {
    color: #14532d;
}

.boq-final-index-panel .boq-register-count.final,
.boq-final-index-panel .boq-register-description.final {
    color: #14532d;
    border-color: rgba(22, 163, 74, .3);
    background: rgba(220, 252, 231, .72);
}

.boq-print-register.boq-final-index-panel .boq-register-wrap {
    background: rgba(240, 253, 244, .5);
}

.boq-final-index-panel .boq-print-style-table {
    border-color: rgba(21, 128, 61, .48);
}

.boq-final-index-panel .boq-print-style-table thead {
    background: linear-gradient(135deg, #14532d, #15803d);
}

.boq-final-index-panel .boq-print-style-table th {
    border-color: rgba(220, 252, 231, .28);
}

.boq-final-index-panel .boq-print-style-table td {
    border-color: rgba(21, 128, 61, .22);
}

.boq-final-index-panel .boq-print-style-table tbody tr {
    background: rgba(255, 255, 255, .9);
}

.boq-final-index-panel .boq-print-style-table tbody tr:nth-child(even) {
    background: rgba(220, 252, 231, .42);
}

.boq-final-index-panel .boq-print-style-table tbody tr:hover {
    background: rgba(187, 247, 208, .46);
}

.boq-print-style-table .boq-row-number {
    color: #2c3e50;
    background: rgba(44, 62, 80, .045) !important;
    font-weight: 900;
}

.boq-print-style-table .boq-code {
    padding: 0;
    color: #2d3748;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 900;
}

.boq-print-style-table .boq-desc-cell strong {
    color: #2d3748;
    font-size: 11px;
    line-height: 1.6;
}

.boq-print-style-table .num-cell strong {
    color: #2d3748;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.boq-print-style-table .boq-table-status,
.boq-print-style-table .boq-data-chip,
.boq-print-style-table .boq-currency-chip {
    min-height: 25px;
    padding: 3px 6px;
    border-radius: 5px;
    box-shadow: none;
    font-size: 9px;
}

.boq-print-style-table .boq-data-chip {
    color: #2d3748;
    border: 0;
    background: transparent;
    font-size: 11px;
}

.boq-print-style-table .boq-currency-chip {
    color: #2d3748;
    border-color: #cbd5e0;
    background: #f7fafc;
}

.boq-print-style-table .boq-date {
    color: #4a5568;
    font-size: 10px;
}

.boq-print-style-table .boq-action-buttons {
    min-height: 34px;
    gap: 5px;
}

.boq-main-table.boq-print-style-table .boq-action-buttons .icon-action {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 5px;
    box-shadow: none;
}

.boq-main-table.boq-print-style-table .boq-action-buttons .icon-action svg {
    width: 14px;
    height: 14px;
}

/* BOQ detail tables use the same visual language as the printable document. */
.boq-document-section {
    padding: 0;
    overflow: hidden;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .07);
}

.boq-document-section-title {
    min-height: 54px;
    margin: 0 !important;
    padding: 13px 17px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #2c3e50 !important;
    border-bottom: 2px solid #2c3e50;
    background: #fff;
    font-size: 16px !important;
    font-weight: 900;
}

.boq-document-section-title svg {
    width: 20px;
    height: 20px;
    color: #2c3e50;
}

.boq-document-section > .boq-table-wrap {
    margin: 0;
    padding: 15px;
}

.boq-document-section .boq-addition-form {
    margin: 14px 15px 0;
}

.boq-document-table {
    width: 100%;
    border: 1px solid #cbd5e0;
    border-collapse: collapse;
    table-layout: fixed;
    color: #2d3748;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
}

.boq-document-table thead {
    background: linear-gradient(135deg, #2c3e50, #2d3748);
}

.boq-document-table th {
    height: 45px;
    padding: 9px 7px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.45;
    text-align: center;
    vertical-align: middle;
}

.boq-document-table td {
    height: 52px;
    padding: 9px 7px;
    color: #2d3748;
    border: 1px solid #d7dee6;
    background: transparent;
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
    vertical-align: middle;
}

.boq-document-table tbody tr {
    background: #fff;
}

.boq-document-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.boq-document-table tbody tr:hover {
    background: rgba(66, 153, 225, .05);
}

.boq-document-table .boq-desc-cell {
    color: #2d3748;
    font-weight: 800;
}

.boq-document-table .num-cell,
.boq-document-table .row-total {
    direction: ltr;
    color: #2d3748;
    font-family: "Courier New", monospace;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.boq-document-table tfoot th,
.boq-document-table tfoot td {
    height: 50px;
    color: #2c3e50;
    border: 1px solid #2c3e50;
    border-top-width: 3px;
    background: linear-gradient(135deg, rgba(44, 62, 80, .12), rgba(44, 62, 80, .06));
    font-size: 13px;
    font-weight: 900;
}

.boq-document-table tfoot [data-subtotal],
.boq-document-table tfoot [data-summary-additions] {
    direction: ltr;
    color: #2d3748;
    background: #fff;
    font-family: "Courier New", monospace;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.boq-document-table .action-icons {
    display: table-cell;
    min-width: 0;
    padding: 5px;
    text-align: center;
    vertical-align: middle;
}

.boq-cell-actions {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.boq-document-table .boq-cell-actions .icon-action {
    width: 29px;
    height: 29px;
    min-width: 29px;
    min-height: 29px;
    flex-basis: 29px;
    border-radius: 5px;
}

.boq-document-table .boq-cell-actions .icon-action svg {
    width: 14px;
    height: 14px;
}

.boq-workspace-final .boq-items-document-table th:nth-child(1),
.boq-workspace-final .boq-items-document-table td:nth-child(1) { width: 10%; }
.boq-workspace-final .boq-items-document-table th:nth-child(2),
.boq-workspace-final .boq-items-document-table td:nth-child(2) { width: 42%; }
.boq-workspace-final .boq-items-document-table th:nth-child(3),
.boq-workspace-final .boq-items-document-table td:nth-child(3) { width: 9%; }
.boq-workspace-final .boq-items-document-table th:nth-child(4),
.boq-workspace-final .boq-items-document-table td:nth-child(4) { width: 11%; }
.boq-workspace-final .boq-items-document-table th:nth-child(5),
.boq-workspace-final .boq-items-document-table td:nth-child(5),
.boq-workspace-final .boq-items-document-table th:nth-child(6),
.boq-workspace-final .boq-items-document-table td:nth-child(6) { width: 14%; }

.boq-workspace-final .boq-additions-table th:nth-child(1),
.boq-workspace-final .boq-additions-table td:nth-child(1) { width: 58%; }
.boq-workspace-final .boq-additions-table th:nth-child(2),
.boq-workspace-final .boq-additions-table td:nth-child(2),
.boq-workspace-final .boq-additions-table th:nth-child(3),
.boq-workspace-final .boq-additions-table td:nth-child(3) { width: 21%; }

.boq-final-calculation {
    width: min(100%, 920px);
    justify-self: center;
}

.boq-workspace-final .boq-calculation-panel,
.boq-workspace-final .boq-final-calculation {
    width: 100%;
    max-width: none;
}

.boq-workspace-final .boq-final-calculation .boq-document-summary-table {
    width: calc(100% - 32px);
}

.boq-workspace-final .boq-print-details {
    grid-template-columns: minmax(0, 1fr);
}

.boq-final-calculation .boq-document-summary-table {
    width: calc(100% - 32px);
    margin: 16px;
    border: 1px solid #9aa8b7;
    border-collapse: collapse;
    border-radius: 0;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    table-layout: fixed;
}

.boq-document-summary-table th,
.boq-document-summary-table td {
    height: 46px;
    padding: 10px 14px;
    border: 1px solid #aeb9c5;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.boq-document-summary-table thead th {
    width: auto;
    color: #fff;
    border-color: rgba(255, 255, 255, .24);
    background: linear-gradient(135deg, #2c3e50, #3f566d);
    font-size: 12px;
    letter-spacing: 0;
}

.boq-document-summary-table td {
    direction: ltr;
    color: #2d3748;
    background: #fff;
    font-family: "Courier New", monospace;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.boq-document-summary-table tbody tr:nth-child(even) td {
    background: #f7fafc;
}

.boq-document-summary-table td.boq-final-label {
    direction: inherit;
    background: #fff;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    text-align: start;
}

.boq-document-summary-table tbody tr:nth-child(even) td.boq-final-label {
    background: #f7fafc;
}

.boq-document-summary-table .boq-items-subtotal-row td,
.boq-document-summary-table .boq-items-subtotal-row td.boq-final-label {
    color: #15803d;
    font-size: 15px;
    font-weight: 950;
}

.boq-document-summary-table .grand td {
    color: #22543d;
    border-color: #9bc9ad;
    border-top: 3px solid #2f855a;
    background: #e9f7ef;
    font-size: 15px;
}

.boq-document-summary-table .grand .boq-final-label {
    color: #22543d;
    background: #e9f7ef;
    text-align: start;
}

.boq-print-details {
    display: grid;
    gap: 16px;
    margin-block-start: 18px;
}

.boq-notes-card,
.boq-signatures-card {
    overflow: hidden;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.boq-detail-card-heading {
    min-height: 72px;
    padding: 14px 17px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #2c3e50;
    background: #fff;
}

.boq-detail-card-heading > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a5568, #2c3e50);
    box-shadow: 0 6px 14px rgba(44, 62, 80, .2);
}

.boq-detail-card-heading > span svg {
    width: 20px;
    height: 20px;
}

.boq-detail-card-heading h3 {
    margin: 0 0 4px;
    color: #2c3e50;
    font-size: 17px;
}

.boq-detail-card-heading p {
    margin: 0;
    color: #718096;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
}

.boq-notes-form,
.boq-signatures-form {
    padding: 16px;
}

.boq-notes-form {
    display: grid;
    gap: 12px;
}

.boq-notes-form textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    padding: 14px 16px;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #fffdf7;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 2;
}

.boq-notes-form textarea:focus {
    border-color: #d69e2e;
    outline: 3px solid rgba(214, 158, 46, .13);
}

.boq-notes-form .primary-button,
.boq-signatures-save {
    width: min(100%, 260px);
    justify-self: center;
}

.boq-notes-list {
    margin: 0;
    padding: 18px 44px 20px 18px;
    display: grid;
    gap: 9px;
    color: #2d3748;
    background: #fffdf7;
    line-height: 1.75;
    font-weight: 800;
}

[dir="ltr"] .boq-notes-list {
    padding: 18px 18px 20px 44px;
}

.boq-notes-list li::marker {
    color: #d69e2e;
    font-weight: 900;
}

.boq-signatures-form {
    display: grid;
    gap: 15px;
}

.boq-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.boq-signature-editor,
.boq-signature-display {
    position: relative;
    min-height: 178px;
    padding: 14px;
    display: grid;
    align-content: start;
    gap: 11px;
    border: 1px solid #d7dee6;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.boq-signature-editor > .icon-action {
    position: absolute;
    inset-block-start: 8px;
    inset-inline-end: 8px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
}

.boq-signature-editor > .icon-action svg {
    width: 13px;
    height: 13px;
}

.boq-signature-editor label {
    display: grid;
    gap: 5px;
    padding-inline-end: 30px;
}

.boq-signature-editor label span {
    color: #4a5568;
    font-size: 11px;
    font-weight: 900;
}

.boq-signature-editor input {
    min-width: 0;
    height: 38px;
    padding: 7px 9px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 800;
}

.boq-signature-blank,
.boq-signature-display div {
    min-height: 47px;
    padding-block-start: 24px;
    color: #718096;
    border-bottom: 1px solid #4a5568;
    font-size: 11px;
    font-weight: 800;
}

.boq-signature-display {
    min-height: 135px;
    align-content: end;
    text-align: center;
}

.boq-signature-display strong {
    color: #2c3e50;
    font-size: 14px;
}

.boq-signature-display > span {
    color: #4a5568;
    font-size: 12px;
    font-weight: 800;
}

.boq-detail-empty {
    margin: 0;
    padding: 24px;
    color: #718096;
    text-align: center;
    font-weight: 800;
}

@media (max-width: 900px) {
    .boq-signature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .boq-detail-card-heading {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .boq-detail-card-heading > span {
        width: 38px;
        height: 38px;
    }

    .boq-detail-card-heading > button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .boq-signature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .boq-document-section > .boq-table-wrap {
        padding: 8px;
    }

    .boq-document-table {
        font-size: 8px;
    }

    .boq-document-table th,
    .boq-document-table td {
        height: auto;
        min-height: 38px;
        padding: 6px 2px;
        font-size: 8px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .boq-document-table .num-cell,
    .boq-document-table .row-total {
        font-size: 8px;
        white-space: normal;
    }

    .boq-document-table tfoot th,
    .boq-document-table tfoot td,
    .boq-document-table tfoot [data-subtotal],
    .boq-document-table tfoot [data-summary-additions] {
        height: 40px;
        padding: 6px 2px;
        font-size: 9px;
    }

    .boq-document-table .action-icons {
        gap: 2px;
    }

    .boq-document-table .action-icons .icon-action {
        width: 23px;
        height: 23px;
        min-width: 23px;
        min-height: 23px;
        flex-basis: 23px;
    }

    .boq-document-table .action-icons .icon-action svg {
        width: 11px;
        height: 11px;
    }

    .boq-workspace-draft .boq-items-document-table th:nth-child(1),
    .boq-workspace-draft .boq-items-document-table td:nth-child(1) { width: 9%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(2),
    .boq-workspace-draft .boq-items-document-table td:nth-child(2) { width: 31%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(3),
    .boq-workspace-draft .boq-items-document-table td:nth-child(3) { width: 8%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(4),
    .boq-workspace-draft .boq-items-document-table td:nth-child(4) { width: 10%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(5),
    .boq-workspace-draft .boq-items-document-table td:nth-child(5) { width: 12%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(6),
    .boq-workspace-draft .boq-items-document-table td:nth-child(6) { width: 13%; }
    .boq-workspace-draft .boq-items-document-table th:nth-child(7),
    .boq-workspace-draft .boq-items-document-table td:nth-child(7) { width: 17%; }

    .boq-workspace-draft .boq-additions-table th:nth-child(1),
    .boq-workspace-draft .boq-additions-table td:nth-child(1) { width: 48%; }
    .boq-workspace-draft .boq-additions-table th:nth-child(2),
    .boq-workspace-draft .boq-additions-table td:nth-child(2) { width: 15%; }
    .boq-workspace-draft .boq-additions-table th:nth-child(3),
    .boq-workspace-draft .boq-additions-table td:nth-child(3) { width: 17%; }
    .boq-workspace-draft .boq-additions-table th:nth-child(4),
    .boq-workspace-draft .boq-additions-table td:nth-child(4) { width: 20%; }

    .boq-final-calculation .boq-document-summary-table {
        width: calc(100% - 16px);
        margin: 8px;
    }

    .boq-document-summary-table th,
    .boq-document-summary-table td {
        padding: 8px;
        font-size: 10px;
    }

    .boq-document-summary-table .grand th,
    .boq-document-summary-table .grand td {
        font-size: 12px;
    }

    .boq-print-register .boq-register-heading {
        min-height: 0;
        padding: 15px;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        gap: 12px;
    }

    .boq-register-heading-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .boq-print-register .boq-register-heading h2 {
        font-size: 16px;
    }

    .boq-print-register .boq-register-heading p {
        white-space: normal;
    }

    .boq-register-count {
        min-width: 82px;
        min-height: 42px;
        padding: 5px 8px;
        grid-template-columns: auto;
        gap: 1px;
        text-align: center;
    }

    .boq-register-count strong {
        font-size: 19px;
    }

    .boq-register-description {
        padding: 9px 15px;
    }

    .boq-print-register .boq-register-wrap {
        padding: 11px;
    }

    .boq-print-style-table tbody tr {
        border-color: #cbd5e0;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 5px 14px rgba(15, 23, 42, .07);
    }

    .boq-print-style-table td,
    [dir="ltr"] .boq-print-style-table td {
        min-height: 43px;
        height: auto;
        padding: 8px 10px;
        border-width: 0 0 1px;
    }

    .boq-print-style-table td::before {
        color: #4a5568;
    }
}

.boq-frozen-analyses {
    display: grid;
    gap: 14px;
    margin-block-start: 6px;
    padding-block-start: 16px;
    border-top: 1px solid var(--line);
}

.boq-frozen-heading {
    padding: 15px 17px;
    border: 1px solid rgba(5, 150, 105, .2);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(16, 185, 129, .12), rgba(255, 255, 255, .82));
}

.boq-frozen-heading span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #065f46;
    font-size: 11px;
    font-weight: 900;
}

.boq-frozen-heading h3 {
    margin: 5px 0;
    color: #17211f;
    font-size: 18px;
}

.boq-frozen-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.boq-frozen-analysis-card {
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, .18);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}

.boq-frozen-analysis-card > header {
    display: grid;
    grid-template-columns: minmax(76px, auto) 1fr;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid rgba(5, 150, 105, .22);
    background: rgba(16, 185, 129, .1);
}

.boq-frozen-analysis-card > header strong {
    min-height: 30px;
    display: grid;
    place-items: center;
    padding-inline: 9px;
    border: 1px solid rgba(5, 150, 105, .3);
    border-radius: 6px;
    color: #065f46;
    background: #fff;
}

.boq-frozen-analysis-card > header span {
    color: #17211f;
    font-weight: 900;
}

.boq-frozen-analysis-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.boq-frozen-analysis-table th,
.boq-frozen-analysis-table td {
    padding: 7px 5px;
    border: 1px solid #263331;
    text-align: center;
    font-size: 10px;
    line-height: 1.35;
}

.boq-frozen-analysis-table thead th {
    color: #fff;
    background: #285c53;
}

.boq-frozen-analysis-table tbody tr:nth-child(even) {
    background: #f3f8f7;
}

.boq-frozen-analysis-table .component-name {
    width: 27%;
    padding-inline-start: calc(8px + var(--component-level, 0) * 16px);
    text-align: start;
    font-weight: 800;
}

.boq-frozen-analysis-table tfoot th,
.boq-frozen-analysis-table tfoot td {
    color: #000;
    background: rgba(245, 158, 11, .35);
    font-weight: 900;
}

@media print {
    .boq-frozen-analysis-card {
        break-inside: auto;
        page-break-inside: auto;
        border: 1px solid rgba(15, 118, 110, .2) !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        padding: 3mm !important;
        margin: 0 0 5mm !important;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .96)),
            linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(183, 121, 31, .07)) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .boq-frozen-analysis-card > header {
        border: 1px solid rgba(15, 118, 110, .2) !important;
        border-radius: 7px !important;
        background: rgba(255, 255, 255, .74) !important;
        padding: 2mm 2.4mm !important;
        margin-bottom: 2.2mm !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .boq-frozen-analysis-table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        font-size: 6.7pt !important;
    }

    .boq-frozen-analysis-table th,
    .boq-frozen-analysis-table td {
        padding: 1.35mm 1mm !important;
        border: .65px solid #000 !important;
        line-height: 1.15 !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        vertical-align: middle !important;
    }

    .boq-frozen-analysis-table thead th {
        background: linear-gradient(180deg, #f7faf9, #eef5f2) !important;
        color: #102a43 !important;
        font-size: 6.3pt !important;
        font-weight: 950 !important;
        white-space: normal !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .boq-frozen-analysis-table .num-cell,
    .boq-frozen-analysis-table td:nth-child(4),
    .boq-frozen-analysis-table td:nth-child(5),
    .boq-frozen-analysis-table td:nth-child(6),
    .boq-frozen-analysis-table td:nth-child(7),
    .boq-frozen-analysis-table td:nth-child(8),
    .boq-frozen-analysis-table tfoot td {
        direction: ltr !important;
        unicode-bidi: isolate !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
        font-family: "Courier New", Tahoma, Arial, sans-serif !important;
        font-size: 6pt !important;
        letter-spacing: -.12px !important;
        font-variant-numeric: tabular-nums !important;
        color: #000 !important;
        font-weight: 850 !important;
    }

    .boq-frozen-analysis-table .component-name {
        width: 32% !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.22 !important;
    }

    .boq-frozen-analysis-table tfoot th,
    .boq-frozen-analysis-table tfoot td {
        background: linear-gradient(180deg, #fed7aa, #fb923c) !important;
        color: #000 !important;
        font-weight: 950 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 760px) {
    .boq-main-table td.boq-register-actions {
        display: grid;
        width: 100%;
        grid-template-columns: minmax(105px, 36%) 1fr;
        text-align: start;
        white-space: normal;
    }

    .boq-action-buttons {
        justify-content: flex-start;
    }
}

.is-hidden {
    display: none !important;
}

.clickable-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.clickable-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.32);
    box-shadow: var(--shadow);
}

.project-card::after {
    content: "";
    position: absolute;
    inset-inline: 16px;
    inset-block-start: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 0 0 99px 99px;
}

.project-card.project-card-premium::after {
    inset-inline: 0;
    inset-block-start: 0;
    height: 4px;
    border-radius: 0;
    background: linear-gradient(90deg, var(--card-a, var(--primary)), var(--card-b, var(--gold)), var(--card-c, var(--steel)));
}

.project-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-card-title {
    min-width: 0;
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.project-card-title > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.project-card-title small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.project-card-title strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 19px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-title-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    color: var(--card-a, var(--primary));
    border: 1px solid color-mix(in srgb, var(--card-a, var(--primary)) 18%, transparent);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card-a, var(--primary)) 9%, #fff);
}

.project-title-icon svg {
    width: 19px;
    height: 19px;
}

.project-title-arrow {
    width: 17px;
    height: 17px;
    color: var(--card-a, var(--primary));
    transition: transform 0.16s ease;
}

.project-card-title:hover .project-title-arrow {
    transform: translateX(3px);
}

html[dir="rtl"] .project-card-title:hover .project-title-arrow {
    transform: translateX(-3px);
}

.project-card-head svg {
    color: var(--primary);
    width: 28px;
    height: 28px;
}

.project-card-head span {
    color: var(--primary-strong);
    background: var(--primary-soft);
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.project-card h2 {
    margin: 0;
    font-size: 22px;
}

.project-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.project-card dl div {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
}

.project-card .project-card-stats {
    gap: 8px;
}

.project-card .project-card-stats > div {
    min-width: 0;
    position: relative;
    padding: 11px 10px;
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    align-items: center;
    background: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
}

.project-card .project-card-stats svg {
    grid-row: 1 / 3;
    width: 18px;
    height: 18px;
    color: var(--card-a, var(--primary));
}

.project-card .project-card-stats dt {
    margin: 0;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card .project-card-stats dd {
    overflow: hidden;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card dt {
    color: var(--muted);
    font-size: 12px;
    margin-block-end: 5px;
}

.project-card dd {
    margin: 0;
    font-weight: 900;
}

.card-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
}

.project-card-meta {
    display: grid;
    gap: 8px;
    padding-block-start: 2px;
}

.project-card-meta p {
    min-width: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.project-card-meta p > svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: var(--card-a, var(--primary));
}

.project-card-meta p > span {
    min-width: 0;
    display: grid;
    overflow: hidden;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card-meta small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.project-create-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.6fr);
    gap: 18px;
    align-items: start;
}

.project-logo-picker {
    min-height: 258px;
    border: 1px dashed rgba(15, 118, 110, 0.42);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(183, 121, 31, 0.08));
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
}

.project-logo-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.project-logo-picker > span {
    color: var(--muted);
    font-weight: 900;
}

.project-logo-picker strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-strong);
    font-size: 18px;
}

.project-logo-picker small {
    color: var(--muted);
    line-height: 1.6;
}

.project-logo-picker-edit {
    min-height: 310px;
}

.project-logo-picker-edit img {
    width: min(100%, 220px);
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.print-settings-form {
    display: grid;
    gap: 16px;
}

.print-settings-panel {
    padding: 16px;
}

.print-logo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.print-signature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.print-signature-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.64)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(14, 165, 233, 0.08));
    box-shadow: var(--shadow-soft);
}

.print-signature-card:not(.is-editing) .print-signature-uploader em,
.print-signature-card:not(.is-editing) .print-signature-uploader small,
.print-signature-card:not(.is-editing) .form-grid {
    display: none;
}

.print-signature-card:not(.is-editing) .print-signature-uploader {
    min-height: auto;
}

.print-signature-card:not(.is-editing) .print-signature-preview {
    min-height: 74px;
}

.print-signature-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.print-signature-card-head strong {
    display: block;
    color: var(--primary-strong);
    font-size: 14px;
    line-height: 1.35;
}

.print-signature-card-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.print-signature-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex: 0 0 auto;
}

.print-signature-actions .icon-action {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
}

.print-add-signature {
    min-height: 38px;
    font-size: 12px;
}

.print-logo-uploader {
    min-height: 240px;
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 14px;
    border: 1px solid rgba(29, 78, 216, 0.18);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.06));
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.print-signature-uploader {
    position: relative;
    min-height: 172px;
    display: grid;
    gap: 10px;
    align-content: start;
    cursor: pointer;
}

.print-logo-uploader input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.print-signature-uploader input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.print-logo-uploader em {
    min-height: var(--button-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    border: 1px solid rgba(29, 78, 216, 0.42);
    color: #08245d;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.1)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.46), rgba(14, 165, 233, 0.32));
    font-style: normal;
    font-weight: 900;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 12px 26px rgba(37, 99, 235, 0.16);
}

.print-signature-uploader em {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid rgba(29, 78, 216, 0.3);
    color: #08245d;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.16)),
        linear-gradient(135deg, rgba(29, 78, 216, 0.28), rgba(14, 165, 233, 0.2));
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
}

.print-logo-uploader small {
    color: var(--muted);
    line-height: 1.6;
    font-weight: 800;
}

.print-signature-uploader small {
    color: var(--muted);
    line-height: 1.6;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.print-signature-card.is-cleared .print-signature-preview,
.print-signature-card.is-editing .print-signature-preview {
    border-style: dashed;
    border-color: rgba(37, 99, 235, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
        rgba(239, 246, 255, 0.55);
}

.print-signature-card.is-cleared .print-signature-preview span {
    color: #9f1239;
}

.print-signature-line {
    min-height: 42px;
    display: grid;
    place-items: end center;
    border-bottom: 2px solid rgba(17, 24, 39, 0.58);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.print-logo-preview {
    min-height: 118px;
    display: grid;
    gap: 8px;
    place-items: center;
    padding: 10px;
    border: 1.5px dashed rgba(15, 118, 110, 0.28);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.print-logo-preview img {
    max-width: 100%;
    max-height: 82px;
    object-fit: contain;
}

.print-logo-preview span {
    color: var(--muted);
    font-weight: 900;
}

.print-logo-preview strong {
    color: var(--primary-strong);
}

.print-signature-preview {
    min-height: 108px;
    display: grid;
    gap: 8px;
    place-items: center;
    padding: 10px;
    border: 1.5px dashed rgba(15, 118, 110, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
    text-align: center;
}

.print-signature-preview img {
    max-width: 100%;
    max-height: 68px;
    object-fit: contain;
}

.print-signature-preview span {
    color: var(--muted);
    font-weight: 900;
}

.print-signature-preview strong {
    color: var(--primary-strong);
}

.print-header-preview {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 170px;
    grid-template-areas: "contractor center parties";
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border: 2px solid #111827;
    border-radius: var(--radius);
    background: #fff;
}

.preview-party-stack {
    grid-area: parties;
    display: grid;
    gap: 10px;
}

.print-header-preview > .print-logo-preview {
    grid-area: contractor;
}

.preview-header-center {
    grid-area: center;
    display: grid;
    place-items: center;
    text-align: center;
    border-inline: 1px solid rgba(17, 24, 39, 0.16);
    padding-inline: 12px;
}

.print-header-preview p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.7;
    font-weight: 800;
}

.print-settings-actions {
    display: flex;
    justify-content: center;
}

.print-settings-actions .primary-button {
    width: min(100%, 420px);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
}

.empty-state svg {
    color: var(--gold);
    width: 34px;
    height: 34px;
}

.project-hub-page,
.project-site-page {
    display: grid;
    gap: 18px;
}

.project-hub-hero,
.project-site-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: stretch;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(217, 119, 6, 0.12)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.94));
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}

.project-hub-hero::before,
.project-site-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-linear-gradient(135deg, rgba(15, 118, 110, 0.08) 0 1px, transparent 1px 18px),
        radial-gradient(circle at 8% 12%, rgba(217, 119, 6, 0.18), transparent 34%),
        radial-gradient(circle at 92% 0%, rgba(14, 116, 144, 0.18), transparent 32%);
}

.project-hub-hero span,
.project-site-hero-copy > span,
.section-title-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 900;
}

.project-hub-hero h1,
.project-site-hero h1 {
    margin: 10px 0 8px;
    color: #0f172a;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.25;
}

.project-hub-hero p,
.project-site-hero p {
    max-width: 780px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.9;
}

.project-hub-hero p strong,
.project-site-hero p strong {
    color: var(--gold-strong);
    margin-inline-start: 8px;
}

.project-hub-actions,
.project-site-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: flex-end;
    gap: 10px;
}

.project-hub-actions > span,
.project-site-hero-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 118, 110, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.project-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-hub-card {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-rows: minmax(300px, 1fr) auto;
    isolation: isolate;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-hub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.34);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.project-hub-card::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 5px;
    z-index: 3;
    background: linear-gradient(90deg, var(--hub-a, #0f766e), var(--hub-b, #d97706), var(--hub-c, #334155));
}

.project-hub-card-technical {
    --hub-a: #0f766e;
    --hub-b: #d97706;
    --hub-c: #334155;
}

.project-hub-card-site {
    --hub-a: #b45309;
    --hub-b: #0e7490;
    --hub-c: #166534;
}

.project-hub-card figure,
.project-site-hero figure {
    margin: 0;
    overflow: hidden;
    background: #e2e8f0;
}

.project-hub-card figure {
    position: relative;
}

.project-hub-card figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(15, 23, 42, 0.14));
    pointer-events: none;
}

.project-hub-card img,
.project-site-hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-hub-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.74)),
        linear-gradient(135deg, color-mix(in srgb, var(--hub-a) 10%, transparent), color-mix(in srgb, var(--hub-b) 8%, transparent));
    border-block-start: 1px solid rgba(255, 255, 255, 0.7);
}

.project-hub-icon,
.site-foundation-note > span,
.site-module-preview-card > span {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent),
        linear-gradient(135deg, var(--hub-a, #0f766e), var(--hub-c, #334155));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 26px rgba(15, 23, 42, 0.16);
}

.project-hub-card-body small {
    color: var(--gold-strong);
    font-size: 12px;
    font-weight: 900;
}

.project-hub-card-body h2 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: 25px;
    line-height: 1.35;
}

.project-hub-card-body p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.75;
}

.project-hub-card-body strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--hub-a, #0f766e), var(--hub-c, #334155));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    white-space: nowrap;
}

.project-site-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    padding: 18px;
}

.project-site-hero-copy {
    display: grid;
    align-content: center;
    gap: 10px;
}

.project-site-hero figure {
    min-height: 260px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.project-site-hero-actions {
    justify-content: flex-start;
    margin-block-start: 6px;
}

.site-foundation-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.82), rgba(240, 253, 250, 0.82));
    box-shadow: var(--shadow-soft);
}

.site-foundation-note > span {
    --hub-a: #d97706;
    --hub-c: #0f766e;
    flex: 0 0 auto;
}

.site-foundation-note strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
    margin-block-end: 4px;
}

.site-foundation-note p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.75;
}

.site-module-preview {
    display: grid;
    gap: 12px;
}

.site-disciplines-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(14, 116, 144, .16);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(236, 253, 245, .68)),
        #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255, 255, 255, .95);
}

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

.site-discipline-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .95), rgba(240, 249, 255, .64)),
        linear-gradient(135deg, rgba(14, 116, 144, .08), rgba(15, 118, 110, .08));
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .92);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.site-discipline-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, .32);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.site-discipline-card-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0284c7);
}

.site-discipline-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-discipline-card-logo svg {
    width: 25px;
    height: 25px;
}

.site-discipline-card small {
    display: inline-flex;
    margin-block-end: 4px;
    color: #0f766e;
    font-size: 11px;
    font-weight: 900;
}

.site-discipline-card h2 {
    margin: 0 0 8px;
    color: #123c46;
    font-size: 15px;
    line-height: 1.35;
}

.site-discipline-card p {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.site-discipline-card p svg {
    width: 14px;
    height: 14px;
    color: #b7791f;
}

.site-module-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.site-module-preview-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    min-height: 132px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(217, 119, 6, 0.07));
    box-shadow: var(--shadow-soft);
}

.site-module-preview-card.is-link {
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.site-module-preview-card.is-link:hover {
    transform: translateY(-2px);
    border-color: rgba(217, 119, 6, .32);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}

.site-module-preview-card:nth-child(2n) > span {
    --hub-a: #0e7490;
    --hub-c: #b45309;
}

.site-module-preview-card:nth-child(3n) > span {
    --hub-a: #166534;
    --hub-c: #334155;
}

.site-module-preview-card h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.4;
}

.site-module-preview-card p {
    margin: 0;
    color: #475569;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.75;
}

.site-daily-page {
    display: grid;
    gap: 16px;
}

.site-daily-page .primary-button,
.site-daily-page .link-button {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    gap: 7px;
    white-space: nowrap;
}

.site-daily-page .primary-button svg,
.site-daily-page .link-button svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.site-daily-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(217, 119, 6, .2);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 247, 237, .9), rgba(240, 253, 250, .84)),
        linear-gradient(135deg, rgba(217, 119, 6, .12), rgba(15, 118, 110, .1));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
}

.site-daily-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(135deg, rgba(217, 119, 6, .08) 0 1px, transparent 1px 18px),
        radial-gradient(circle at 7% 4%, rgba(15, 118, 110, .16), transparent 30%),
        radial-gradient(circle at 94% 8%, rgba(217, 119, 6, .18), transparent 28%);
    pointer-events: none;
}

.site-daily-hero > * {
    position: relative;
    z-index: 1;
}

.site-daily-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7c2d12;
    font-size: 13px;
    font-weight: 950;
}

.site-daily-hero h1 {
    margin: 8px 0 6px;
    color: #0f172a;
    font-size: clamp(25px, 2.6vw, 38px);
}

.site-daily-hero p {
    max-width: 720px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.8;
}

.site-daily-hero .primary-button,
.site-daily-hero .link-button {
    min-height: 40px;
    padding-inline: 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .09), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.site-daily-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.site-daily-stats article {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .64)),
        linear-gradient(135deg, color-mix(in srgb, var(--stat-tone) 12%, transparent), transparent);
    box-shadow: var(--shadow-soft);
}

.site-daily-stats article.blue { --stat-tone: #2563eb; }
.site-daily-stats article.green { --stat-tone: #16a34a; }
.site-daily-stats article.amber { --stat-tone: #d97706; }
.site-daily-stats article.teal { --stat-tone: #0f766e; }

.site-daily-stats article > span {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--stat-tone), color-mix(in srgb, var(--stat-tone) 70%, #0f172a));
}

.site-daily-stats small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.site-daily-stats strong {
    display: block;
    margin-block-start: 4px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
}

.site-daily-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.site-daily-form-panel,
.site-daily-table-panel {
    border-color: rgba(217, 119, 6, .16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .74)),
        linear-gradient(135deg, rgba(217, 119, 6, .08), rgba(15, 118, 110, .06));
}

.site-daily-form-panel {
    padding: 16px;
}

.site-daily-table-panel {
    padding: 16px;
    border-color: rgba(15, 118, 110, .18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .76)),
        linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(217, 119, 6, .055));
}

.site-daily-filters {
    display: grid;
    grid-template-columns: minmax(140px, .75fr) minmax(140px, .75fr) minmax(220px, 1.15fr) minmax(170px, .8fr) auto auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0 14px;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(240, 253, 250, .82), rgba(255, 255, 255, .68));
}

.site-daily-filters .primary-button,
.site-daily-filters .link-button {
    align-self: end;
    justify-content: center;
    min-height: 38px;
    height: 38px;
    padding-inline: 12px;
    font-size: 11.5px;
}

.site-daily-create-row {
    display: flex;
    justify-content: flex-start;
    margin: -4px 0 12px;
}

.site-daily-create-row .site-daily-create-top {
    min-width: 170px;
    justify-content: center;
}

.site-daily-filters label {
    display: grid;
    gap: 5px;
}

.site-daily-filters span {
    color: #334155;
    font-size: 11.5px;
    font-weight: 800;
}

.site-daily-filters input,
.site-daily-filters select {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    padding: 8px 10px;
    font-size: 12.5px;
    color: #0f172a;
}

.site-daily-panel-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-block-end: 12px;
}

.site-daily-panel-head > span {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #d97706, #0f766e);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
}

.site-daily-panel-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
}

.site-daily-panel-head p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.site-daily-form-panel form {
    display: grid;
    gap: 13px;
}

.site-daily-form-panel form > * {
    min-width: 0;
}

.site-daily-form-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .86), rgba(255, 255, 255, .72)),
        linear-gradient(90deg, rgba(37, 99, 235, .08), rgba(14, 165, 233, .05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 8px 22px rgba(15, 23, 42, .045);
}

.daily-card-meta { order: 1; }
.daily-card-work { order: 2; }
.daily-card-contractors { order: 3; }
.daily-card-manpower { order: 4; }
.daily-card-equipment { order: 5; }
.daily-card-notes { order: 6; }
.daily-card-issues { order: 7; }
.daily-card-photos { order: 8; }
.site-daily-actions { order: 9; }

.site-daily-form-row {
    display: grid;
    grid-template-columns: 1.05fr 1fr .68fr .82fr;
    gap: 9px;
}

.site-daily-form-row.site-daily-main-row {
    grid-template-columns: minmax(160px, .75fr) minmax(240px, 1.25fr) minmax(170px, .75fr) minmax(130px, .55fr);
}

.site-daily-form-row.counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-daily-form-row.visitors-row {
    grid-template-columns: minmax(160px, 240px);
}

.site-daily-form-row label,
.site-daily-textareas label {
    display: grid;
    gap: 6px;
}

.site-daily-form-row span,
.site-daily-textareas span {
    color: #475569;
    font-size: 11.5px;
    font-weight: 900;
}

.site-daily-form-row input,
.site-daily-form-row select,
.site-daily-textareas textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    color: #0f172a;
    font: inherit;
    font-size: 12.5px;
    font-weight: 760;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.site-daily-form-row input,
.site-daily-form-row select {
    min-height: 38px;
    padding: 8px 9px;
}

.site-daily-textareas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.daily-note-card {
    min-width: 0;
    padding: 12px;
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 8px 22px rgba(15, 23, 42, .045);
}

.daily-note-card.summary {
    border: 1px solid rgba(37, 99, 235, .18);
    background: linear-gradient(135deg, rgba(239, 246, 255, .88), rgba(255, 255, 255, .72));
}

.daily-note-card.safety {
    border: 1px solid rgba(22, 163, 74, .2);
    background: linear-gradient(135deg, rgba(240, 253, 244, .9), rgba(255, 255, 255, .72));
}

.daily-note-card.plan {
    border: 1px solid rgba(217, 119, 6, .2);
    background: linear-gradient(135deg, rgba(255, 247, 237, .9), rgba(255, 255, 255, .72));
}

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

.site-daily-issue-entry {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 8px 22px rgba(15, 23, 42, .05);
}

.site-daily-issue-entry.problems {
    border: 1px solid rgba(220, 38, 38, .22);
    background: linear-gradient(135deg, rgba(254, 242, 242, .86), rgba(255, 255, 255, .72));
}

.site-daily-issue-entry.recommendations {
    border: 1px solid rgba(20, 184, 166, .25);
    background: linear-gradient(135deg, rgba(240, 253, 250, .9), rgba(255, 255, 255, .72));
}

.site-daily-issue-entry header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.site-daily-issue-entry .site-row-add {
    position: relative;
    z-index: 1;
    min-height: 34px;
    padding-inline: 11px;
    white-space: nowrap;
}

.site-daily-issue-entry h3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #0b2449;
    font-size: 13px;
    font-weight: 950;
}

.site-daily-issue-entry.problems h3 {
    color: #b91c1c;
}

.site-daily-issue-entry.recommendations h3 {
    color: #0f766e;
}

.site-issue-row-list {
    display: grid;
    gap: 8px;
}

.site-issue-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 8px;
    align-items: stretch;
}

.site-issue-index {
    display: grid;
    place-items: center;
    min-height: 42px;
    border-radius: 8px;
    background: #073364;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
}

.site-daily-issue-entry.problems .site-issue-index {
    background: #c92419;
}

.site-daily-issue-entry.recommendations .site-issue-index {
    background: #078b8c;
}

.site-issue-row textarea {
    width: 100%;
    min-height: 42px;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    color: #0f172a;
    font: inherit;
    font-size: 12.5px;
    font-weight: 760;
    line-height: 1.55;
    padding: 8px 10px;
    outline: none;
}

.site-daily-detail-block + .site-daily-detail-block {
    margin-block-start: 2px;
}

.site-daily-detail-block {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(217, 119, 6, .16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 247, 237, .78), rgba(240, 253, 250, .62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.site-daily-detail-block.work-items {
    border-color: rgba(7, 51, 100, .22);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .9), rgba(255, 255, 255, .7)),
        linear-gradient(90deg, rgba(7, 51, 100, .08), rgba(14, 165, 233, .05));
}

.site-daily-detail-block.contractors {
    border-color: rgba(217, 119, 6, .22);
    background:
        linear-gradient(135deg, rgba(255, 247, 237, .9), rgba(255, 255, 255, .72)),
        linear-gradient(90deg, rgba(217, 119, 6, .09), rgba(245, 158, 11, .05));
}

.site-daily-detail-block.manpower {
    border-color: rgba(20, 184, 166, .23);
    background:
        linear-gradient(135deg, rgba(240, 253, 250, .92), rgba(255, 255, 255, .72)),
        linear-gradient(90deg, rgba(20, 184, 166, .08), rgba(13, 148, 136, .05));
}

.site-daily-detail-block.equipment {
    border-color: rgba(79, 70, 229, .2);
    background:
        linear-gradient(135deg, rgba(238, 242, 255, .9), rgba(255, 255, 255, .72)),
        linear-gradient(90deg, rgba(79, 70, 229, .08), rgba(37, 99, 235, .05));
}

.site-daily-detail-block.site-photo-uploader-block {
    border-color: rgba(7, 51, 100, .22);
    background:
        linear-gradient(135deg, rgba(248, 250, 252, .94), rgba(255, 255, 255, .74)),
        linear-gradient(90deg, rgba(7, 51, 100, .08), rgba(15, 118, 110, .05));
}

.site-daily-detail-block header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.site-daily-detail-block h3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #0f172a;
    font-size: 14px;
}

.site-daily-detail-block h3 svg {
    color: #d97706;
    width: 16px;
    height: 16px;
}

.site-row-add {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 11.5px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-detail-table {
    display: grid;
    gap: 5px;
}

.site-detail-head,
.site-detail-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) 86px 96px minmax(220px, 1fr) 34px;
    gap: 6px;
    align-items: center;
}

.site-detail-table.equipment .site-detail-head,
.site-detail-table.equipment .site-detail-row {
    grid-template-columns: minmax(190px, 1.1fr) 76px 88px minmax(150px, .86fr) minmax(210px, 1fr) 34px;
}

.site-detail-table.contractors .site-detail-head,
.site-detail-table.contractors .site-detail-row {
    grid-template-columns: minmax(150px, .85fr) minmax(260px, 1.35fr) 120px minmax(220px, 1fr) 34px;
}

.site-detail-table.work-items .site-detail-head,
.site-detail-table.work-items .site-detail-row {
    grid-template-columns: minmax(135px, .95fr) minmax(210px, 1.3fr) minmax(150px, .95fr) 95px minmax(105px, .75fr) 82px minmax(150px, 1fr) 34px;
}

.site-detail-table.photos .site-detail-head,
.site-detail-table.photos .site-detail-row {
    grid-template-columns: minmax(260px, 1.3fr) minmax(220px, 1fr) 34px;
}

.site-photo-uploader-block {
    border-color: rgba(7, 51, 100, .2);
    background: linear-gradient(180deg, #fff, #f8fbfd);
}

.site-existing-photos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.site-existing-photos label {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #cbd5df;
    border-radius: 7px;
    background: #fff;
}

.site-existing-photos img {
    width: 100%;
    aspect-ratio: 1.55 / 1;
    object-fit: cover;
    border-radius: 5px;
}

.site-existing-photos span {
    color: #0b3767;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.35;
}

.site-existing-photos em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b42318;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
}

.site-detail-head {
    color: #6b4a1b;
    font-size: 10.5px;
    font-weight: 950;
    padding-inline: 6px;
}

.site-detail-row {
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 5px 12px rgba(15, 23, 42, .035);
}

.site-detail-row input,
.site-detail-row select {
    width: 100%;
    min-height: 31px;
    padding: 6px 7px;
    border: 1px solid rgba(148, 163, 184, .36);
    border-radius: 6px;
    background: rgba(255, 255, 255, .86);
    color: #0f172a;
    font: inherit;
    font-size: 11.5px;
    font-weight: 760;
}

.site-detail-row .icon-action {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
}

.site-daily-textareas textarea {
    min-height: 92px;
    resize: vertical;
    padding: 10px;
    line-height: 1.65;
}

@media (max-width: 1180px) {
    .site-daily-textareas {
        grid-template-columns: minmax(0, 1fr);
    }
}

.site-daily-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-block-start: 2px;
}

.site-daily-actions .primary-button {
    min-width: 220px;
    min-height: 40px;
    font-size: 12.5px;
}

.site-daily-table-wrap {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #111827;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.site-daily-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border: 0;
    background: #fff;
}

.site-daily-table th,
.site-daily-table td {
    padding: 8px 7px;
    border: 1px solid rgba(17, 24, 39, .82);
    text-align: center;
    vertical-align: middle;
    font-size: 12.3px;
    line-height: 1.45;
}

.site-daily-table th {
    color: #111827;
    background:
        linear-gradient(180deg, rgba(255, 237, 213, .98), rgba(254, 215, 170, .86)),
        linear-gradient(90deg, rgba(217, 119, 6, .14), rgba(15, 118, 110, .1));
    font-weight: 950;
    white-space: normal;
    overflow-wrap: anywhere;
}

.site-daily-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, .76);
}

.site-daily-table tbody tr:hover td {
    background: rgba(240, 253, 250, .86);
}

.site-daily-table th:nth-child(1) { width: 14%; }
.site-daily-table th:nth-child(2) { width: 18%; }
.site-daily-table th:nth-child(3) { width: 40%; }
.site-daily-table th:nth-child(4) { width: 13%; }
.site-daily-table th:nth-child(5) { width: 15%; }
.site-daily-table th:nth-child(1):nth-last-child(6) { width: 14%; }
.site-daily-table th:nth-child(2):nth-last-child(5) { width: 13%; }
.site-daily-table th:nth-child(3):nth-last-child(4) { width: 15%; }
.site-daily-table th:nth-child(4):nth-last-child(3) { width: 34%; }
.site-daily-table th:nth-child(5):nth-last-child(2) { width: 12%; }
.site-daily-table th:nth-child(6):nth-last-child(1) { width: 12%; }

.site-daily-table td strong,
.site-daily-table td small {
    display: block;
}

.site-daily-table td small {
    margin-block-start: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
}

.site-daily-summary {
    text-align: start !important;
    line-height: 1.55;
}

.site-daily-tags {
    text-align: start !important;
}

.site-daily-tags span {
    display: inline-flex;
    margin: 2px;
    padding: 3px 6px;
    border-radius: 999px;
    color: #7c2d12;
    background: #ffedd5;
    font-size: 10px;
    font-weight: 900;
}

.site-report-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10.8px;
    font-weight: 950;
    line-height: 1.15;
}

.site-report-status.draft {
    color: #475569;
    background: #e2e8f0;
}

.site-report-status.submitted {
    color: #075985;
    background: #cffafe;
}

.site-report-status.approved {
    color: #166534;
    background: #dcfce7;
}

.site-daily-table .table-actions.compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
}

.site-daily-table .table-actions.compact .icon-action {
    width: 27px;
    min-width: 27px;
    height: 27px;
    min-height: 27px;
    padding: 0;
    border-radius: 7px;
}

.site-daily-table .table-actions.compact .icon-action svg {
    width: 12.5px;
    height: 12.5px;
}

.site-daily-empty {
    padding: 26px !important;
    color: #64748b;
    font-weight: 900;
}

.side-site-link.active {
    color: #fff;
    border-color: rgba(217, 119, 6, .62);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02)),
        linear-gradient(135deg, #d97706, #0f766e);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .38),
        0 7px 16px rgba(217, 119, 6, .2);
}

.project-detail-header h1 {
    margin-block-end: 8px;
}

.project-summary-panel {
    align-self: stretch;
}

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

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

.step-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    font-weight: 800;
}

.step-list svg {
    color: var(--gold);
}

.import-help {
    display: grid;
    gap: 10px;
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.import-help code {
    direction: ltr;
    text-align: left;
    display: block;
    color: var(--primary-strong);
    background: rgba(15, 118, 110, 0.08);
    border-radius: 6px;
    padding: 8px;
    overflow-x: auto;
}

.import-help p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
}

.discipline-cards,
.resource-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.discipline-cards-showcase {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 18px;
}

.discipline-card-premium {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.92)),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a, var(--primary)) 16%, transparent), color-mix(in srgb, var(--card-b, var(--gold)) 14%, transparent));
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    overflow: hidden;
    position: relative;
    display: grid;
    min-height: 344px;
    isolation: isolate;
}

.discipline-card-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--card-a, var(--primary)) 28%, transparent), transparent 34%),
        radial-gradient(circle at 90% 2%, color-mix(in srgb, var(--card-b, var(--gold)) 28%, transparent), transparent 32%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px 12px);
    opacity: 0.72;
}

.discipline-card-premium::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-a, var(--primary)), var(--card-b, var(--gold)), var(--card-c, var(--steel)));
}

.discipline-card-media {
    min-height: 148px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--card-a, var(--primary)) 74%, #fff 26%), color-mix(in srgb, var(--card-b, var(--gold)) 70%, #fff 30%));
    border-block-end: 1px solid rgba(255, 255, 255, 0.58);
}

.discipline-card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 45%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 16px);
    mix-blend-mode: screen;
}

.discipline-card-media img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    z-index: 1;
}

.discipline-card-media > span {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-start: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-strong);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: var(--shadow-soft);
    z-index: 2;
}

.discipline-logo-fallback {
    width: 100%;
    min-height: 168px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--card-a, var(--primary)), var(--card-c, var(--primary-strong)));
    z-index: 1;
}

.discipline-logo-fallback svg {
    width: 54px;
    height: 54px;
}

.discipline-card-body {
    padding: 16px;
    display: grid;
    gap: 8px;
}

.discipline-card-body h2 {
    margin: 0;
    font-size: 22px;
}

.discipline-card-body p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
}

.discipline-card,
.resource-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 112px;
    position: relative;
    overflow: hidden;
}

.discipline-card::before,
.resource-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--gold));
}

.discipline-icon,
.resource-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.discipline-card span,
.resource-card span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.discipline-card h2,
.resource-card h2 {
    margin: 4px 0 0;
    font-size: 19px;
}

.discipline-card {
    text-decoration: none;
    color: inherit;
}

.resource-card {
    align-items: flex-start;
}

.resource-card p {
    margin: 6px 0 0;
    line-height: 1.5;
    font-size: 13px;
}

.panel {
    padding: 18px;
}

.print-preview {
    display: grid;
    gap: 16px;
    margin-block-end: 24px;
}

.print-preview article,
.principles {
    padding: 18px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.table-wrap.analysis-create-table-wrap,
.table-wrap.analysis-table-wrap {
    overflow-x: visible;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 760px;
}

.table-wrap.boq-table-wrap {
    overflow-x: visible;
}

.table-wrap.boq-table-wrap table,
.boq-main-table,
.boq-summary-table {
    min-width: 0;
}

th,
td {
    border-inline-end: 1px solid var(--line);
    border-block-end: 1px solid var(--line);
    padding: 12px;
    text-align: start;
    vertical-align: middle;
}

th:last-child,
td:last-child {
    border-inline-end: 0;
}

thead th {
    background: linear-gradient(180deg, #f7faf9, var(--surface-2));
    color: var(--text);
    font-weight: 900;
    white-space: nowrap;
}

tbody tr:hover td {
    background: rgba(15, 118, 110, 0.035);
}

tbody tr:last-child td {
    border-block-end: 0;
}

.principles ol {
    margin-block: 0;
    padding-inline-start: 22px;
    line-height: 1.9;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
        width: min(100% - 22px, 1220px);
    }

    .side-nav {
        position: relative;
        top: 0;
        min-height: auto;
    }

    .content-banner {
        min-height: 112px;
    }

    .content-banner-cash-flow {
        min-height: 184px;
        padding: 24px;
    }

    .topbar {
        display: grid;
    }

    .users-create-form {
        grid-template-columns: 1fr;
    }

    .users-disciplines-field {
        grid-column: auto;
    }

    .users-create-actions {
        justify-content: stretch;
    }

    .users-create-actions .primary-button {
        width: 100%;
    }

    .badges {
        justify-content: flex-start;
    }

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

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

    .project-hero,
    .project-cards,
    .discipline-cards,
    .resource-cards,
    .resource-hub,
    .step-list.compact {
        grid-template-columns: 1fr;
    }

    .project-cards-showcase {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }

    .project-create-layout {
        grid-template-columns: 1fr;
    }

    .form-grid.three {
        grid-template-columns: 1fr;
    }

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

    .resource-entry-grid.with-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .print-logo-grid,
    .print-signature-grid,
    .print-header-preview {
        grid-template-columns: 1fr;
    }

    .print-header-preview {
        grid-template-areas:
            "parties"
            "center"
            "contractor";
    }

    .analysis-entry-grid,
    .analysis-component-grid,
    .analysis-settings-row,
    .analysis-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-modal .resource-entry-grid,
    .resource-modal .resource-entry-grid.with-category {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-save-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(100% - 22px, 1220px);
        padding-block: 16px;
    }

    .language-options,
    .module-grid,
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .projects-page-header {
        padding: 18px;
    }

    .projects-page-heading {
        align-items: flex-start;
    }

    .projects-page-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .project-cards-showcase {
        grid-template-columns: 1fr;
    }

    .project-card-premium {
        min-height: 0;
    }

    .project-card-media {
        height: 150px;
    }

    .project-card-actions {
        align-items: stretch;
    }

    .project-open-action {
        flex: 1;
    }

    .language-panel {
        padding: 22px;
    }

    .form-grid.two,
    .form-grid.three,
    .resource-entry-grid,
    .resource-modal .resource-entry-grid,
    .resource-modal .resource-entry-grid.with-category,
    .print-logo-grid,
    .print-signature-grid,
    .print-header-preview,
    .analysis-entry-grid,
    .analysis-component-grid,
    .analysis-settings-row,
    .analysis-summary,
    .project-card dl {
        grid-template-columns: 1fr;
    }

    .analysis-create-actions {
        display: grid;
    }

    .resource-modal {
        padding: 14px;
    }

    .resource-modal .resource-save-button {
        width: 100%;
        justify-self: stretch;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 7mm;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        background: #fff;
        color: var(--text);
        font-size: 8.6pt;
    }

    body::before,
    .module-grid,
    .badges,
    .principles,
    .analysis-create-panel,
    .analysis-print-toolbar,
    .analysis-table-actions,
    .table-print-check,
    .content-banner,
    .app-content-banner-only > .content-banner,
    .side-nav,
    .sidebar,
    .app-sidebar,
    .alert,
    .success {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .app-content,
    .shell {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .analysis-current-panel {
        display: block;
        border: 0;
        box-shadow: none;
        padding: 0;
        background: #fff;
    }

    .analysis-print-header {
        display: block;
        margin: 0 0 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid #000;
        text-align: center;
    }

    .analysis-print-header h1 {
        margin: 0;
        color: #000;
        font-size: 20px;
        font-weight: 950;
    }

    .analysis-print-header p {
        margin: 4px 0 0;
        color: #000;
        font-size: 12px;
        font-weight: 800;
    }

    .analysis-current-panel > h2 {
        display: none;
    }

    .analysis-stack {
        display: block;
        counter-reset: printed-analysis;
    }

    .analysis-table-card {
        counter-increment: printed-analysis;
        break-inside: auto;
        page-break-inside: auto;
        border: 1px solid rgba(15, 118, 110, 0.2);
        border-radius: 8px;
        box-shadow: none;
        padding: 3mm;
        margin: 0 0 5mm;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.96)),
            linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(183, 121, 31, 0.07));
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .analysis-table-card:last-child {
        border-bottom: 0;
    }

    .analysis-print-filtered [data-print-excluded] {
        display: none !important;
    }

    .analysis-card-title {
        color: var(--primary-strong);
        border: 1px solid rgba(15, 118, 110, 0.2);
        border-radius: 7px;
        background: rgba(255, 255, 255, 0.74);
        font-size: 9pt;
        line-height: 1.35;
        margin-block-end: 2.2mm;
        padding: 2mm 2.4mm;
        break-after: avoid;
        page-break-after: avoid;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .print-analysis-number::before {
        content: counter(printed-analysis) ". ";
        font-weight: 950;
    }

    .analysis-table-wrap,
    .table-wrap.analysis-table-wrap,
    .nested-table-shell,
    .embedded-analysis-mini-shell {
        overflow: visible !important;
        border: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    .analysis-tree-table,
    .nested-table-shell table,
    .embedded-analysis-mini-table,
    .analysis-tree-table th,
    .analysis-tree-table td,
    .nested-table-shell table th,
    .nested-table-shell table td,
    .embedded-analysis-mini-table th,
    .embedded-analysis-mini-table td {
        border: .55px solid #000 !important;
        color: #000 !important;
    }

    .analysis-tree-table,
    .nested-table-shell table,
    .embedded-analysis-mini-table {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        font-size: 6.6pt !important;
        page-break-inside: auto;
        break-inside: auto;
    }

    .analysis-tree-table tr,
    .nested-table-shell table tr,
    .embedded-analysis-mini-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .analysis-tree-table th,
    .analysis-tree-table td,
    .nested-table-shell table th,
    .nested-table-shell table td,
    .embedded-analysis-mini-table th,
    .embedded-analysis-mini-table td {
        padding: 1.35mm 1mm !important;
        line-height: 1.15 !important;
        text-align: center !important;
        vertical-align: middle !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        white-space: normal !important;
    }

    .analysis-tree-table thead {
        display: table-header-group;
    }

    .analysis-tree-table tfoot {
        display: table-footer-group;
    }

    .analysis-tree-table thead th,
    .embedded-analysis-mini-table thead th {
        background: linear-gradient(180deg, #f7faf9, var(--surface-2)) !important;
        color: var(--text) !important;
        font-size: 6.3pt !important;
        font-weight: 950 !important;
        line-height: 1.14 !important;
        white-space: normal !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .analysis-tree-table tfoot th {
        background: linear-gradient(180deg, #fed7aa, #fb923c) !important;
        color: #000 !important;
        font-weight: 950 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .analysis-tree-table tfoot th:last-child,
    .embedded-analysis-mini-table tfoot th:last-child {
        direction: ltr !important;
        unicode-bidi: isolate !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
        font-family: "Courier New", Tahoma, Arial, sans-serif !important;
        font-size: 6.9pt !important;
        letter-spacing: 0 !important;
        font-variant-numeric: tabular-nums !important;
        color: #000 !important;
        font-weight: 950 !important;
    }

    .analysis-tree-table th:nth-child(1),
    .analysis-tree-table td:nth-child(1),
    .nested-table-shell table td:nth-child(1),
    .embedded-analysis-mini-table th:nth-child(1),
    .embedded-analysis-mini-table td:nth-child(1) {
        width: 5% !important;
    }

    .analysis-tree-table th:nth-child(2),
    .analysis-tree-table td:nth-child(2),
    .nested-table-shell table td:nth-child(2),
    .embedded-analysis-mini-table th:nth-child(2),
    .embedded-analysis-mini-table td:nth-child(2) {
        width: 32% !important;
        text-align: start !important;
    }

    .analysis-tree-table th:nth-child(3),
    .analysis-tree-table td:nth-child(3),
    .nested-table-shell table td:nth-child(3),
    .embedded-analysis-mini-table th:nth-child(3),
    .embedded-analysis-mini-table td:nth-child(3) {
        width: 8% !important;
    }

    .analysis-tree-table th:nth-child(4),
    .analysis-tree-table td:nth-child(4),
    .analysis-tree-table th:nth-child(5),
    .analysis-tree-table td:nth-child(5),
    .analysis-tree-table th:nth-child(6),
    .analysis-tree-table td:nth-child(6),
    .nested-table-shell table td:nth-child(4),
    .nested-table-shell table td:nth-child(5),
    .nested-table-shell table td:nth-child(6),
    .embedded-analysis-mini-table th:nth-child(4),
    .embedded-analysis-mini-table td:nth-child(4),
    .embedded-analysis-mini-table th:nth-child(5),
    .embedded-analysis-mini-table td:nth-child(5),
    .embedded-analysis-mini-table th:nth-child(6),
    .embedded-analysis-mini-table td:nth-child(6) {
        width: 8.5% !important;
    }

    .analysis-tree-table th:nth-child(7),
    .analysis-tree-table td:nth-child(7),
    .nested-table-shell table td:nth-child(7),
    .embedded-analysis-mini-table th:nth-child(7),
    .embedded-analysis-mini-table td:nth-child(7) {
        width: 13% !important;
    }

    .analysis-tree-table th:nth-child(8),
    .analysis-tree-table td:nth-child(8),
    .nested-table-shell table td:nth-child(8),
    .embedded-analysis-mini-table th:nth-child(8),
    .embedded-analysis-mini-table td:nth-child(8) {
        width: 16.5% !important;
    }

    .analysis-tree-table .num-cell,
    .nested-table-shell table .num-cell,
    .embedded-analysis-mini-table .num-cell {
        direction: ltr !important;
        unicode-bidi: isolate !important;
        white-space: nowrap !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
        font-family: "Courier New", Tahoma, Arial, sans-serif !important;
        font-size: 6.9pt !important;
        letter-spacing: 0 !important;
        font-variant-numeric: tabular-nums !important;
        color: #000 !important;
        font-weight: 850 !important;
    }

    .analysis-tree-table .row-total,
    .analysis-tree-table .row-total strong,
    .nested-table-shell table .row-total,
    .nested-table-shell table .row-total strong,
    .embedded-analysis-mini-table .row-total,
    .embedded-analysis-mini-table .row-total strong,
    .embedded-analysis-mini-table .num-cell strong {
        color: #000 !important;
        font-weight: 950 !important;
    }

    .analysis-tree-cell,
    .mini-analysis-name {
        gap: 1.8mm !important;
        line-height: 1.22 !important;
        text-align: start !important;
    }

    .analysis-cell-text,
    .mini-analysis-name {
        font-size: 6.5pt !important;
        line-height: 1.22 !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }

    .analysis-tree-cell svg,
    .embedded-analysis-mini-head svg {
        width: 3.4mm !important;
        height: 3.4mm !important;
        flex: 0 0 3.4mm !important;
    }

    .row-number {
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #000 !important;
        font-size: 6.4pt !important;
    }

    .tree-indent {
        width: calc(var(--level, 0) * 3mm) !important;
        flex-basis: calc(var(--level, 0) * 3mm) !important;
    }

    .analysis-nested-row > td,
    .analysis-embedded-mini-row > td {
        padding: 1mm !important;
        background: rgba(15, 118, 110, 0.035) !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .embedded-analysis-mini-head {
        padding: 1mm 1.5mm !important;
        border: .55px solid #000 !important;
        border-bottom: 0 !important;
        background: #e8f7f1 !important;
        color: #000 !important;
        font-size: 6.4pt !important;
        line-height: 1.2 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .embedded-analysis-badge {
        padding: .6mm 1.1mm !important;
        font-size: 5pt !important;
        white-space: nowrap !important;
    }

    .print-preview article {
        break-inside: avoid;
        border: 0;
        box-shadow: none;
        padding: 0;
        margin-block-end: 18px;
    }
}
.boq-appendices-section {
    margin: 14px 16px;
    padding: 14px;
    border: 1px solid rgba(14, 116, 144, .25);
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(236, 254, 255, .76), rgba(255, 255, 255, .98) 38%),
        #fff;
    box-shadow: 0 7px 18px rgba(8, 47, 73, .07);
}

.boq-appendices-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.boq-appendices-heading h3,
.boq-linked-appendices > h4,
.boq-appendix-card h4 {
    margin: 0;
    color: #0f3c4c;
}

.boq-appendices-heading h3 {
    font-size: 15px;
    line-height: 1.35;
}

.boq-linked-appendices > h4,
.boq-appendix-card h4 {
    font-size: 13px;
    line-height: 1.4;
}

.boq-appendices-heading p,
.boq-appendix-card p {
    margin: 3px 0 0;
    color: #56717b;
    font-size: 11px;
    line-height: 1.55;
}

.boq-appendices-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 6px;
    background: linear-gradient(145deg, #0891b2, #0e7490);
    box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 5px 12px rgba(14, 116, 144, .2);
}

.boq-appendices-icon svg,
.boq-appendix-meta svg,
.boq-linked-appendices > h4 svg {
    width: 15px;
    height: 15px;
}

.boq-adjusted-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 11px;
    border: 1px solid #b9dce5;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}

.boq-adjusted-totals > div {
    min-height: 52px;
    padding: 8px 12px;
    display: grid;
    align-content: center;
    gap: 2px;
    border-inline-end: 1px solid #d6e9ee;
}

.boq-adjusted-totals > div:last-child {
    border-inline-end: 0;
}

.boq-adjusted-totals span {
    color: #58717a;
    font-size: 10px;
    font-weight: 700;
}

.boq-adjusted-totals strong {
    color: #123f4e;
    font-size: 14px;
    line-height: 1.25;
}

.boq-adjusted-totals .grand {
    background: rgba(22, 163, 74, .09);
}

.boq-adjusted-totals .grand strong {
    color: #166534;
}

.boq-appendix-form {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(110px, .65fr) minmax(210px, 1.35fr) minmax(150px, .8fr) minmax(180px, .9fr);
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(14, 116, 144, .2);
    border-radius: 5px;
    background: rgba(255, 255, 255, .82);
}

.boq-appendix-form .field {
    gap: 4px;
    font-size: 10px;
}

.boq-appendix-form .field > span {
    font-size: 10px;
    line-height: 1.35;
}

.boq-appendix-form input,
.boq-appendix-form select,
.boq-appendix-form textarea {
    min-height: 34px;
    height: 34px;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 11px;
}

.boq-appendix-form .appendix-reason-field {
    grid-column: 1 / -2;
}

.boq-appendix-form textarea {
    min-height: 34px;
    resize: vertical;
}

.boq-appendix-form > .primary-button {
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 5px;
    font-size: 11px;
    justify-content: center;
}

.boq-appendix-form > .primary-button svg {
    width: 14px;
    height: 14px;
}

.boq-appendix-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 9px;
    color: #64748b;
    text-align: center;
    border: 1px dashed #bdd5dc;
    background: rgba(240, 249, 255, .68);
    font-size: 11px;
}

.boq-linked-appendices {
    margin-top: 13px;
}

.boq-linked-appendices-inline {
    display: grid;
    gap: 8px;
}

.boq-linked-appendices-inline > h3,
.boq-appendix-page .boq-linked-appendices > h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 2px 0 0;
    padding: 9px 12px;
    color: #0f3c4c;
    border: 1px solid #b8d7df;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(207, 250, 254, .72), rgba(255, 255, 255, .96));
    font-size: 13px;
}

.boq-linked-appendices-inline > h3 svg,
.boq-appendix-page .boq-linked-appendices > h3 svg {
    width: 15px;
    height: 15px;
}

.boq-linked-appendices-inline .boq-appendix-card {
    margin-top: 0;
}

.boq-linked-appendices > h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}

.boq-appendix-card {
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid #b8d7df;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(15, 60, 76, .055);
}

.boq-appendix-card > header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-bottom: 1px solid #0e7490;
    background: linear-gradient(90deg, rgba(207, 250, 254, .72), rgba(255, 255, 255, .95));
}

.boq-appendix-number {
    display: inline-flex;
    margin-bottom: 4px;
    padding: 2px 7px;
    color: #fff;
    border-radius: 5px;
    background: #0e7490;
    font-size: 10px;
    font-weight: 800;
}

.boq-appendix-meta {
    min-width: 210px;
    display: grid;
    justify-items: end;
    gap: 3px;
    color: #526d77;
    font-size: 10px;
}

.boq-appendix-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.boq-appendix-meta strong {
    color: #166534;
}

.boq-appendix-table {
    table-layout: fixed;
    font-size: 10px;
}

.boq-appendix-table th,
.boq-appendix-table td {
    height: 32px;
    padding: 5px 7px;
    font-size: 10px;
    line-height: 1.45;
}

.boq-appendix-table thead th {
    font-size: 10px;
}

.boq-appendix-table th:nth-child(1) { width: 9%; }
.boq-appendix-table th:nth-child(2) { width: 43%; }
.boq-appendix-table th:nth-child(3) { width: 9%; }
.boq-appendix-table th:nth-child(4) { width: 11%; }
.boq-appendix-table th:nth-child(5),
.boq-appendix-table th:nth-child(6) { width: 14%; }

.boq-appendix-card > form {
    display: flex;
    justify-content: flex-end;
    padding: 7px 10px;
    border-top: 1px solid #e2edf0;
}

.boq-appendix-card > form .danger-button {
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 10px;
}

.boq-appendix-card > form .danger-button svg {
    width: 13px;
    height: 13px;
}

.boq-appendix-page {
    display: grid;
    gap: 13px;
}

.boq-appendix-page > .boq-appendices-heading {
    justify-content: flex-start;
    margin-bottom: 0;
    padding-bottom: 11px;
    border-bottom: 1px solid #dbe7eb;
}

.boq-appendix-page > .boq-appendices-heading h2 {
    margin: 0;
    color: #0f3c4c;
    font-size: 17px;
}

.boq-appendix-page > .boq-appendices-heading p {
    margin: 3px 0 0;
    color: #60737b;
    font-size: 11px;
}

.boq-appendix-page > .boq-appendices-heading .link-button {
    margin-inline-start: auto;
    min-width: 0;
    max-width: 220px;
    padding-inline: 12px;
    font-size: 11px;
    white-space: nowrap;
}

.boq-adjusted-totals.appendix-page-total {
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
}

.boq-adjusted-totals.appendix-page-total > div {
    border: 0;
}

.appendix-management-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.appendix-management-card > header {
    border-bottom: 0;
}

.appendix-management-card > form {
    align-items: center;
    border-top: 0;
    border-inline-start: 1px solid #e2edf0;
}

.certificate-appendix-badge,
.appendix-mark {
    display: block;
    width: fit-content;
    margin-bottom: 4px;
    padding: 2px 6px;
    color: #0e7490;
    border: 1px solid #a5d9e5;
    border-radius: 4px;
    background: #ecfeff;
    font-size: .68rem;
    font-weight: 800;
}

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

    .boq-appendix-form .appendix-reason-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .boq-appendices-section {
        margin: 10px;
        padding: 10px;
    }

    .boq-adjusted-totals,
    .boq-appendix-form {
        grid-template-columns: 1fr;
    }

    .boq-adjusted-totals > div {
        border-inline-end: 0;
        border-bottom: 1px solid #d6e9ee;
    }

    .boq-appendix-form .appendix-reason-field {
        grid-column: auto;
    }

    .boq-appendix-card > header {
        display: grid;
    }

    .boq-appendix-meta {
        min-width: 0;
        justify-items: start;
    }
}

.boq-setup-page .boq-scope-breadcrumb {
    justify-content: center !important;
}

.boq-setup-page .boq-scope-breadcrumb > span {
    flex: 0 1 70% !important;
    justify-content: center !important;
    gap: 9px !important;
    margin-inline: auto !important;
}

.boq-setup-page .boq-scope-path-separator {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .18);
    color: #d97706;
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
}

.boq-setup-page .boq-scope-contract-count {
    min-height: 34px !important;
    padding: 7px 14px !important;
    border: 1px solid rgba(124, 58, 237, .30) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(245, 243, 255, .98), rgba(237, 233, 254, .9)),
        linear-gradient(135deg, rgba(124, 58, 237, .16), rgba(14, 165, 233, .08)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 18px rgba(88, 28, 135, .12) !important;
    color: #5b21b6 !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-scope-top-metrics,
.boq-setup-page .boq-structure-scope-summary > span:nth-child(4) {
    display: none !important;
}

.boq-setup-page .boq-structure-scope-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.boq-setup-page .boq-scope-contract-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid rgba(124, 58, 237, .28);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(245, 243, 255, .98), rgba(237, 233, 254, .86)),
        linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(14, 165, 233, .08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 18px rgba(88, 28, 135, .12);
    color: #5b21b6;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.boq-setup-page .boq-scope-breadcrumb .boq-scope-contract-count {
    background:
        linear-gradient(180deg, rgba(245, 243, 255, .98), rgba(237, 233, 254, .9)),
        linear-gradient(135deg, rgba(124, 58, 237, .16), rgba(14, 165, 233, .08));
    border-color: rgba(124, 58, 237, .30);
    color: #5b21b6;
}

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

@media (max-width: 720px) {
    .site-discipline-grid {
        grid-template-columns: 1fr;
    }
}

.site-report-view-page {
    display: grid;
    gap: 14px;
}

.site-report-document {
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, .9), rgba(255, 255, 255, .96) 38%, rgba(239, 246, 255, .9)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.site-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 2px solid rgba(15, 118, 110, .38);
    background:
        radial-gradient(circle at 8% 18%, rgba(16, 185, 129, .18), transparent 28%),
        linear-gradient(90deg, rgba(240, 253, 250, .98), rgba(255, 255, 255, .94));
}

.site-report-header span,
.site-report-section h2,
.site-report-text-grid h2 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.site-report-header span {
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
}

.site-report-header span svg,
.site-report-section h2 svg,
.site-report-text-grid h2 svg {
    width: 16px;
    height: 16px;
}

.site-report-header h1 {
    margin: 7px 0 5px;
    color: #0f172a;
    font-size: 25px;
    line-height: 1.25;
}

.site-report-header p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.site-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.site-report-actions form {
    margin: 0;
}

.site-report-actions .primary-button,
.site-report-actions .link-button {
    min-height: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: 7px;
    font-size: 12px;
}

.site-report-actions .primary-button.print {
    color: #fff;
    border-color: rgba(5, 150, 105, .72);
    background: linear-gradient(135deg, rgba(5, 150, 105, .98), rgba(20, 184, 166, .9));
}

.site-report-actions .primary-button.approve {
    color: #fff;
    border-color: rgba(29, 78, 216, .78);
    background: linear-gradient(135deg, rgba(30, 64, 175, .98), rgba(37, 99, 235, .9));
}

.site-report-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid rgba(15, 118, 110, .2);
    background: rgba(255, 255, 255, .72);
}

.site-report-meta div {
    min-width: 0;
    padding: 12px 11px;
    border-inline-end: 1px solid rgba(15, 118, 110, .16);
}

.site-report-meta div:last-child {
    border-inline-end: 0;
}

.site-report-meta small {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 800;
}

.site-report-meta strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.35;
}

.site-report-section,
.site-report-text-grid {
    margin: 14px;
}

.site-report-section {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .22);
    border-radius: 7px;
    background: #fff;
}

.site-report-section h2,
.site-report-text-grid h2 {
    margin: 0;
    color: #0f3c4c;
    font-size: 14px;
    line-height: 1.35;
}

.site-report-section > h2 {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, .22);
    background: linear-gradient(90deg, rgba(204, 251, 241, .82), rgba(255, 255, 255, .96));
}

.site-report-simple-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.site-report-simple-table th,
.site-report-simple-table td {
    padding: 8px 7px;
    border: 1px solid rgba(17, 24, 39, .82);
    color: #111827;
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

.site-report-simple-table th {
    background: linear-gradient(180deg, #fef3c7, #fde68a);
    font-weight: 900;
}

.site-report-simple-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, .85);
}

.site-report-simple-table th:first-child {
    width: 42px;
}

.site-report-simple-table td:nth-child(3),
.site-report-simple-table td:last-child {
    text-align: start;
}

.site-report-two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 14px;
}

.site-report-two-cols .site-report-section {
    margin: 0;
}

.site-report-text-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.site-report-text-grid section {
    min-height: 120px;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(240, 253, 250, .74), rgba(255, 255, 255, .96)),
        #fff;
}

.site-report-text-grid p {
    margin: 9px 0 0;
    color: #263241;
    font-size: 12px;
    line-height: 1.8;
}

.site-report-approval-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 14px 14px;
    padding: 11px 14px;
    border: 1px solid rgba(15, 118, 110, .28);
    border-radius: 7px;
    background: linear-gradient(90deg, rgba(236, 253, 245, .92), rgba(255, 255, 255, .96));
    color: #0f172a;
}

.site-report-approval-strip > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
}

.site-report-approval-strip svg {
    width: 16px;
    height: 16px;
}

.site-report-approval-strip em {
    color: #475569;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.site-report-print-signatures {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 20px 14px 18px;
}

.site-report-print-signatures div {
    width: min(280px, 42%);
    min-height: 78px;
    display: grid;
    align-content: end;
    gap: 16px;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
}

.site-report-print-signatures span {
    display: block;
    height: 1px;
    border-bottom: 1.5px solid #111827;
}

.users-auto-managers-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-color: rgba(37, 99, 235, .22);
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .92), rgba(255, 255, 255, .96)),
        #fff;
}

.users-auto-managers-panel h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: #0f2d68;
    font-size: 15px;
}

.users-auto-managers-panel h2 svg {
    width: 18px;
    height: 18px;
    color: #2563eb;
}

.users-auto-managers-panel p {
    margin: 0;
    color: #526174;
    font-size: 12px;
    line-height: 1.6;
}

.users-auto-managers-panel form {
    margin: 0;
    flex: 0 0 auto;
}

.users-auto-managers-panel .primary-button {
    min-height: 38px;
    height: 38px;
    padding-inline: 14px;
    border-radius: 7px;
    font-size: 12px;
}

.users-page .users-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding-block-end: 11px;
    border-bottom: 1px solid rgba(14, 116, 144, .16);
}

.users-page .users-panel-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.users-page .users-panel-heading p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.6;
}

.users-page .users-create-form {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 13px;
}

.users-page .users-form-section {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(14, 116, 144, .14);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(240, 253, 250, .55));
}

.users-page .users-form-section h3 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #123c46;
    font-size: 13px;
}

.users-page .users-form-section h3 svg {
    width: 16px;
    height: 16px;
    color: #0e7490;
}

.users-page .users-form-grid {
    display: grid;
    grid-template-columns: minmax(180px, .95fr) minmax(220px, 1.2fr) minmax(190px, .85fr);
    gap: 11px;
    align-items: end;
}

.users-page .users-form-grid.access-grid {
    grid-template-columns: minmax(190px, .9fr) minmax(220px, 1fr) minmax(190px, .8fr);
}

.users-page .users-project-field {
    display: none !important;
}

.users-page .users-project-field.is-visible {
    display: grid !important;
}

.users-page .users-disciplines-field {
    grid-column: auto;
}

.users-page .users-disciplines-field.is-muted,
.users-page .users-scope-field.is-muted {
    opacity: .58;
    filter: grayscale(.15);
}

.users-discipline-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 230px;
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(51, 65, 85, .16);
    border-radius: 8px;
    background: #fff;
}

.users-discipline-checks label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    min-height: 34px;
    padding: 7px 8px;
    border: 1px solid rgba(15, 118, 110, .12);
    border-radius: 7px;
    background: rgba(240, 253, 250, .5);
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
}

.users-discipline-checks label[hidden] {
    display: none !important;
}

.users-discipline-checks input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #0f766e;
}

.users-discipline-checks span {
    color: #0f172a;
}

.users-page .users-table-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, .8fr));
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid rgba(14, 116, 144, .14);
    border-radius: 8px;
    background: rgba(248, 250, 252, .78);
}

.users-page .users-table-filters label {
    display: grid;
    gap: 5px;
}

.users-page .users-table-filters span {
    color: #38566a;
    font-size: 10.5px;
    font-weight: 850;
}

.users-page .users-table-filters input,
.users-page .users-table-filters select {
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid rgba(51, 65, 85, .2);
    border-radius: 7px;
    background: rgba(255, 255, 255, .95);
    color: #0f172a;
    font-size: 12px;
}

.users-page .users-empty-filter td {
    padding: 22px !important;
    color: #64748b !important;
    text-align: center !important;
    font-weight: 800;
}

.boq-contract-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    gap: 14px;
    align-items: stretch;
    margin: 0 0 16px;
    padding: 15px;
    border: 1px solid rgba(14, 116, 144, .18);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.94), rgba(236,253,245,.76)),
        radial-gradient(circle at 10% 15%, rgba(15,118,110,.12), transparent 30%);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.boq-contract-info {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.boq-contract-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #0b4b78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
}

.boq-contract-icon svg {
    width: 25px;
    height: 25px;
}

.boq-contract-info h3 {
    margin: 0;
    color: #123c46;
    font-size: 16px;
}

.boq-contract-info p {
    margin: 5px 0 0;
    color: #526678;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.7;
}

.boq-contract-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.boq-contract-upload {
    display: grid;
    gap: 9px;
    align-content: center;
    padding: 12px;
    border: 1px dashed rgba(14, 116, 144, .35);
    border-radius: 9px;
    background: rgba(255,255,255,.74);
}

.boq-contract-upload label {
    display: grid;
    gap: 6px;
}

.boq-contract-upload span {
    color: #38566a;
    font-size: 11px;
    font-weight: 900;
}

.boq-contract-upload input {
    width: 100%;
    min-height: 38px;
    padding: 7px;
    border: 1px solid rgba(51,65,85,.18);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
}

.boq-contract-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid rgba(15,118,110,.2);
    border-radius: 7px;
    color: #0f766e;
    background: rgba(240,253,250,.82);
    text-decoration: none;
    font-size: 10px;
    font-weight: 950;
}

.boq-contract-link svg {
    width: 14px;
    height: 14px;
}

.boq-contract-file-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.boq-contract-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 8px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.86), rgba(255,255,255,.58)),
        rgba(240,253,250,.78);
}

.boq-contract-file-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #0f2f2a;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.boq-contract-file-name svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: #0f766e;
}

.boq-contract-file-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.boq-contract-file-actions .icon-action {
    width: 31px;
    min-width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
}

.boq-contract-file-actions .icon-action svg {
    width: 14px;
    height: 14px;
}

.boq-contract-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 48px;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 999px;
    color: #0f766e;
    background: rgba(240,253,250,.88);
    font-size: 11px;
    font-weight: 950;
}

.boq-contract-count svg {
    width: 14px;
    height: 14px;
}

.boq-contract-empty,
.boq-contract-empty-large {
    display: inline-flex;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.5;
}

.boq-contract-empty-large {
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(241,245,249,.9);
}

.boq-final-index-panel .boq-final-table {
    width: 100%;
    table-layout: fixed;
}

.boq-final-index-panel .boq-final-table th,
.boq-final-index-panel .boq-final-table td {
    box-sizing: border-box;
    vertical-align: middle;
    text-align: center;
}

.boq-final-index-panel .boq-final-table th:nth-child(1),
.boq-final-index-panel .boq-final-table td:nth-child(1) { width: 4%; }

.boq-final-index-panel .boq-final-table th:nth-child(2),
.boq-final-index-panel .boq-final-table td:nth-child(2) { width: 11%; }

.boq-final-index-panel .boq-final-table th:nth-child(3),
.boq-final-index-panel .boq-final-table td:nth-child(3) { width: 25%; }

.boq-final-index-panel .boq-final-table th:nth-child(4),
.boq-final-index-panel .boq-final-table td:nth-child(4) { width: 10%; }

.boq-final-index-panel .boq-final-table th:nth-child(5),
.boq-final-index-panel .boq-final-table td:nth-child(5) { width: 13%; }

.boq-final-index-panel .boq-final-table th:nth-child(6),
.boq-final-index-panel .boq-final-table td:nth-child(6) { width: 7%; }

.boq-final-index-panel .boq-final-table th:nth-child(7),
.boq-final-index-panel .boq-final-table td:nth-child(7) { width: 11%; }

.boq-final-index-panel .boq-final-table th:nth-child(8),
.boq-final-index-panel .boq-final-table td:nth-child(8) { width: 8%; }

.boq-final-index-panel .boq-final-table th:nth-child(9),
.boq-final-index-panel .boq-final-table td:nth-child(9) { width: 11%; }

.boq-final-index-panel .boq-final-table .boq-desc-cell {
    text-align: start;
}

.boq-final-index-panel .boq-final-table td.boq-register-actions {
    width: 11%;
    padding-inline: 5px;
    text-align: center;
}

.boq-final-index-panel .boq-final-table .boq-action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-height: 32px;
}

.boq-final-index-panel .boq-final-table .boq-action-buttons .icon-action {
    flex: 0 0 29px;
    width: 29px;
    min-width: 29px;
    height: 29px;
    min-height: 29px;
    padding: 0;
}

.boq-final-index-panel .boq-final-table .boq-action-buttons .icon-action svg {
    width: 13.5px;
    height: 13.5px;
}

.boq-final-index-panel .boq-final-table .boq-contract-link {
    width: 100%;
    max-width: 92px;
    min-height: 28px;
    padding-inline: 5px;
    margin-inline: auto;
    white-space: normal;
    line-height: 1.25;
}

.boq-final-index-panel .boq-final-table .boq-contract-empty {
    display: block;
    text-align: center;
    line-height: 1.35;
}

.users-edit-dialog {
    width: min(860px, calc(100vw - 34px));
    max-height: min(86vh, 760px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(14, 116, 144, .2);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.users-edit-dialog::backdrop {
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(4px);
}

.users-edit-dialog form {
    display: grid;
    max-height: inherit;
    overflow: hidden;
}

.users-edit-dialog header,
.users-edit-dialog footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(14, 116, 144, .16);
    background: linear-gradient(135deg, #eef7fb, #f0fdfa);
}

.users-edit-dialog footer {
    justify-content: flex-end;
    border-top: 1px solid rgba(14, 116, 144, .16);
    border-bottom: 0;
    background: #fff;
}

.users-edit-dialog footer .primary-button,
.users-edit-dialog footer .secondary-button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
}

.users-edit-dialog header strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #123c46;
    font-size: 15px;
}

.users-edit-dialog header svg {
    width: 18px;
    height: 18px;
    color: #0e7490;
}

.users-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    max-height: calc(86vh - 128px);
    overflow: auto;
    padding: 15px;
}

.users-edit-grid .field {
    display: grid;
    gap: 6px;
}

.users-edit-grid .field > span {
    color: #38566a;
    font-size: 11px;
    font-weight: 900;
}

.users-edit-grid input,
.users-edit-grid select {
    min-height: 39px;
    padding: 8px 10px;
    border: 1px solid rgba(51, 65, 85, .2);
    border-radius: 7px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.users-page .users-discipline-checks input[type="checkbox"],
.users-edit-grid .users-discipline-checks input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: auto;
    padding: 0;
    border-radius: 4px;
}

.users-edit-project-field {
    display: none !important;
}

.users-edit-project-field.is-visible {
    display: grid !important;
}

.users-edit-disciplines-field {
    grid-column: 1 / -1;
}

.users-edit-disciplines-field.is-muted,
.users-edit-scope-field.is-muted {
    opacity: .58;
    filter: grayscale(.15);
}

@media (max-width: 900px) {
    .boq-contract-card {
        grid-template-columns: 1fr;
    }

    .users-page .users-form-grid,
    .users-page .users-form-grid.access-grid,
    .users-page .users-table-filters,
    .users-edit-grid,
    .users-discipline-checks {
        grid-template-columns: 1fr;
    }
}

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

    body {
        background: #fff !important;
    }

    .site-report-view-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-report-view-page .site-report-document {
        border: 0 !important;
        border-radius: 0 !important;
        min-height: calc(297mm - 20mm) !important;
        display: flex !important;
        flex-direction: column !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .site-report-view-page .no-print,
    .site-report-view-page .site-report-actions {
        display: none !important;
    }

    .site-report-view-page .site-report-header {
        padding: 0 0 8px !important;
        border-bottom: 2px solid #111827 !important;
        background: #fff !important;
    }

    .site-report-view-page .site-report-header h1 {
        font-size: 19px !important;
    }

    .site-report-view-page .site-report-header p {
        font-size: 10px !important;
    }

    .site-report-view-page .site-report-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        border: 1px solid #111827 !important;
        margin-top: 8px !important;
    }

    .site-report-view-page .site-report-meta div {
        padding: 6px 8px !important;
        border: 1px solid #111827 !important;
    }

    .site-report-view-page .site-report-section,
    .site-report-view-page .site-report-text-grid {
        margin: 8px 0 !important;
        break-inside: avoid;
    }

    .site-report-view-page .site-report-two-cols {
        margin: 8px 0 !important;
        gap: 7px !important;
    }

    .site-report-view-page .site-report-simple-table th,
    .site-report-view-page .site-report-simple-table td {
        padding: 5px 4px !important;
        font-size: 9px !important;
        border-color: #111827 !important;
    }

    .site-report-view-page .site-report-text-grid {
        gap: 7px !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .site-report-view-page .site-report-text-grid section {
        min-height: 74px !important;
        padding: 8px !important;
        border-color: #111827 !important;
        background: #fff !important;
    }

    .site-report-view-page .site-report-text-grid p {
        font-size: 10px !important;
        line-height: 1.6 !important;
    }

    .site-report-view-page .site-report-approval-strip {
        margin: 8px 0 !important;
        padding: 7px 9px !important;
        border-color: #111827 !important;
        background: #fff !important;
        break-inside: avoid;
    }

    .site-report-view-page .site-report-print-signatures {
        margin: auto 0 0 !important;
        break-inside: avoid;
    }

    .site-report-view-page .site-report-print-signatures div {
        min-height: 52px !important;
        font-size: 11px !important;
    }
}
.actual-execution-page {
    display: grid;
    gap: 14px;
}

.actual-execution-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: end;
    padding: 18px 20px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(240, 253, 250, .95)),
        #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}

.actual-execution-hero span,
.actual-panel-heading span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 950;
}

.actual-execution-hero h1 {
    margin: 5px 0;
    color: #17324d;
    font-size: 24px;
}

.actual-execution-hero p {
    margin: 0;
    color: #52677c;
    font-size: 12px;
}

.actual-execution-hero form label {
    display: grid;
    gap: 6px;
}

.actual-execution-hero select {
    width: 100%;
    min-height: 40px;
    border-color: rgba(37, 99, 235, .28);
    background: rgba(255, 255, 255, .92);
    font-size: 11px;
    font-weight: 850;
}

.actual-view-only {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 11px;
}

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

.actual-stats article {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d7e2ea;
    border-radius: 6px;
    background: #fff;
}

.actual-stats article > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    color: #fff;
}

.actual-stats .blue { background: #2563eb; }
.actual-stats .green { background: #16a34a; }
.actual-stats .amber { background: #d97706; }
.actual-stats .red { background: #dc2626; }
.actual-stats small { display: block; color: #64748b; font-size: 9px; font-weight: 850; }
.actual-stats strong { display: block; margin-top: 3px; color: #17324d; font-size: 16px; }

.actual-monitor-board {
    display: grid;
    grid-template-columns: 1.35fr repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(240,249,255,.86)),
        #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.actual-monitor-title,
.actual-monitor-board article {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .24);
}

.actual-monitor-title {
    gap: 8px;
    color: #17324d;
    background: linear-gradient(135deg, rgba(219,234,254,.8), rgba(255,255,255,.86));
    font-size: 11px;
    font-weight: 950;
    text-align: center;
}

.actual-monitor-title svg {
    width: 17px;
    height: 17px;
    color: #2563eb;
}

.actual-monitor-board article {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    column-gap: 7px;
    padding: 8px;
    background: rgba(255,255,255,.84);
}

.actual-monitor-board article span {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--monitor-color, #2563eb);
    background: color-mix(in srgb, var(--monitor-color, #2563eb) 13%, #fff);
}

.actual-monitor-board article svg {
    width: 15px;
    height: 15px;
}

.actual-monitor-board article small {
    align-self: end;
    min-width: 0;
    color: #475569;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.15;
}

.actual-monitor-board article strong {
    align-self: start;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
    line-height: 1;
}

.actual-monitor-board article.behind { --monitor-color: #dc2626; }
.actual-monitor-board article.on-track { --monitor-color: #2563eb; }
.actual-monitor-board article.ahead { --monitor-color: #16a34a; }
.actual-monitor-board article.pending { --monitor-color: #f59e0b; }
.actual-monitor-board article.approved { --monitor-color: #059669; }
.actual-monitor-board article.rejected { --monitor-color: #b91c1c; }

.actual-table-panel,
.actual-history-panel,
.actual-empty {
    overflow: hidden;
    border-color: #b9c9d5;
}

.actual-history-panel.is-loading {
    opacity: .72;
    pointer-events: none;
}

.actual-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #b9c9d5;
    background: linear-gradient(180deg, #f8fafc, #eef6ff);
}

.actual-panel-actions,
.actual-history-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.actual-history-hero-actions {
    align-items: end;
}

.actual-history-hero-actions form {
    min-width: 260px;
}

.actual-log-button {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(37, 99, 235, .28);
    border-radius: 6px;
    color: #1e3a8a;
    background:
        linear-gradient(145deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .76)),
        #eff6ff;
    font-size: 10px;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(37, 99, 235, .1);
}

button.actual-log-button {
    cursor: pointer;
}

.actual-log-button:hover {
    color: #fff;
    border-color: rgba(37, 99, 235, .58);
    background: linear-gradient(180deg, rgba(37, 99, 235, .96), rgba(29, 78, 216, .98));
}

.actual-log-button svg {
    width: 14px;
    height: 14px;
}

.actual-panel-heading > strong {
    min-width: 30px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 5px;
    color: #075985;
    background: #e0f2fe;
    font-size: 10px;
}

.actual-execution-table,
.actual-history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.actual-execution-table th,
.actual-execution-table td,
.actual-history-table th,
.actual-history-table td {
    padding: 7px 5px;
    border: 1px solid #111;
    text-align: center;
    vertical-align: middle;
    font-size: 9px;
    line-height: 1.35;
}

.actual-execution-table thead th,
.actual-history-table thead th {
    color: #111;
    background: linear-gradient(180deg, #dbeafe, #bfdbfe);
    font-weight: 950;
}

.actual-execution-table tbody tr:nth-child(even) td,
.actual-history-table tbody tr:nth-child(even) td {
    background: #f8fbff;
}

.actual-execution-table tbody tr.is-overrun td {
    color: #7f1d1d;
    background: rgba(254, 202, 202, .62);
}

.actual-execution-table th:nth-child(1) { width: 5%; }
.actual-execution-table th:nth-child(2) { width: 32%; }
.actual-execution-table th:nth-child(3) { width: 10%; }
.actual-execution-table th:nth-child(4) { width: 8%; }
.actual-execution-table th:nth-child(5) { width: 45%; }

.actual-execution-table td:nth-child(3) {
    overflow-wrap: anywhere;
}

.actual-execution-table td:nth-child(3) strong[data-actual-percent] {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
}

.actual-execution-table td:nth-child(3) em {
    display: inline-block;
    max-width: 100%;
    padding: 2px 4px;
    border-radius: 4px;
    color: #7f1d1d;
    background: rgba(254, 226, 226, .88);
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.actual-item-row td {
    padding: 0 !important;
    border-top: 2px solid #0f172a !important;
    border-bottom: 1px solid #166534 !important;
    background:
        linear-gradient(90deg, rgba(220, 252, 231, .92), rgba(240, 253, 250, .96)),
        #f0fdf4 !important;
}

.actual-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    padding: 9px 10px;
    color: #123524;
}

.actual-item-titleline {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.actual-item-titleline > strong {
    min-height: 26px;
    min-width: 46px;
    display: inline-grid;
    place-items: center;
    padding: 3px 8px;
    border: 1px solid rgba(22, 101, 52, .35);
    border-radius: 5px;
    background: rgba(255, 255, 255, .72);
    color: #14532d;
    font-size: 11px;
    font-weight: 950;
}

.actual-item-head > span {
    min-width: 0;
    text-align: start;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.45;
}

.actual-item-head small,
.actual-item-head em {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 5px;
    background: rgba(255, 255, 255, .72);
    color: #334155;
    font-size: 8.5px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.actual-item-head em {
    color: #991b1b;
    background: rgba(254, 226, 226, .88);
    border-color: rgba(248, 113, 113, .55);
}

.actual-item-head .actual-appendix-badge {
    color: #7c2d12;
    background: rgba(255, 237, 213, .94);
    border-color: rgba(217, 119, 6, .46);
}

.actual-item-metric-stack {
    display: grid;
    grid-column: 1 / -1;
    width: max-content;
    max-width: 100%;
    gap: 6px;
}

.actual-item-metric-stack > em {
    display: flex;
    width: 100%;
    justify-content: center;
    color: #991b1b;
    background: rgba(254, 226, 226, .96);
    border-color: rgba(220, 38, 38, .62);
    font-weight: 950;
}

.actual-item-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, max-content));
    gap: 8px;
    align-items: center;
}

.actual-item-metric {
    min-height: 27px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
    line-height: 1.25 !important;
}

.actual-item-metric b {
    color: inherit;
    font-weight: 950;
}

.actual-item-metric.contract {
    border-color: rgba(37, 99, 235, .28) !important;
    background: rgba(219, 234, 254, .92) !important;
    color: #1e3a8a !important;
}

.actual-item-metric.executed {
    border-color: rgba(22, 163, 74, .30) !important;
    background: rgba(220, 252, 231, .92) !important;
    color: #166534 !important;
}

.actual-item-metric.progress {
    border-color: rgba(217, 119, 6, .32) !important;
    background: rgba(254, 243, 199, .96) !important;
    color: #92400e !important;
}

.actual-period-row td {
    background: #fff;
}

.actual-period-indent {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-inline-start: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    border-radius: 0 0 0 5px;
}

.actual-period-title {
    padding-inline-start: 10px !important;
    color: #334155;
    font-weight: 850;
}

.actual-period-title > strong {
    display: block;
    margin-bottom: 6px;
    color: #17324d;
    font-size: 10px;
    font-weight: 950;
}

.actual-period-meta {
    display: grid;
    gap: 4px;
    max-width: 360px;
}

.actual-period-meta span {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-height: 24px;
    padding: 4px 7px;
    border: 1px solid #d7e2ea;
    border-radius: 5px;
    color: #334155;
    background: #f8fafc;
    font-size: 8.5px;
    font-weight: 950;
    line-height: 1.25;
    white-space: normal;
}

.actual-period-meta span:first-child {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.actual-period-meta span:last-child {
    color: #14532d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.actual-period-meta .actual-status {
    margin-top: 0;
}

.actual-period-meta .actual-plan-chip {
    color: #1d4ed8;
    background: rgba(219, 234, 254, 0.88);
    border-color: #93c5fd;
}

.actual-period-meta .actual-plan-chip.ahead {
    color: #065f46;
    background: rgba(209, 250, 229, 0.9);
    border-color: #6ee7b7;
}

.actual-period-meta .actual-plan-chip.behind {
    color: #991b1b;
    background: rgba(254, 226, 226, 0.92);
    border-color: #fca5a5;
}

.actual-period-meta .actual-plan-chip.on_track {
    color: #1e40af;
    background: rgba(219, 234, 254, 0.9);
    border-color: #93c5fd;
}

.actual-period-meta svg {
    width: 12px;
    height: 12px;
}

.actual-description {
    text-align: start !important;
    color: #17324d;
    font-weight: 850;
}

.actual-date-cell,
.actual-execution-table .number,
.actual-history-table .number {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.actual-execution-table small {
    color: #64748b;
    font-size: 8px;
}

.actual-execution-table em {
    display: block;
    margin-top: 3px;
    color: #991b1b;
    font-size: 8px;
    font-style: normal;
    font-weight: 950;
}

.actual-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 5px;
    color: #334155;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.actual-status.completed { color: #065f46; background: #d1fae5; border-color: #6ee7b7; }
.actual-status.delayed { color: #991b1b; background: #fee2e2; border-color: #fca5a5; }
.actual-status.paused { color: #92400e; background: #fef3c7; border-color: #fbbf24; }
.actual-status.in_progress { color: #1e40af; background: #dbeafe; border-color: #93c5fd; }

.actual-entry-form {
    display: grid;
    grid-template-columns: 1fr .8fr .7fr 1fr;
    gap: 5px;
    padding: 6px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .86), rgba(255, 255, 255, .94)),
        #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.actual-entry-form label {
    display: grid;
    gap: 3px;
    min-width: 0;
    text-align: start;
}

.actual-entry-form label > span {
    color: #475569;
    font-size: 7.6px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.actual-entry-form input,
.actual-entry-form select {
    min-width: 0;
    height: 29px;
    padding: 4px 6px;
    border-color: rgba(148, 163, 184, .7);
    background: rgba(255, 255, 255, .96);
    color: #17324d;
    font-size: 8.8px;
    font-weight: 850;
}

.actual-entry-form input:focus,
.actual-entry-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
}

.actual-entry-form .actual-entry-notes {
    grid-column: 1 / 4;
}

.actual-entry-form button {
    grid-column: 4 / 5;
    align-self: stretch;
    min-height: 43px;
    height: 100%;
    border: 1px solid rgba(29, 78, 216, .35);
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(180deg, rgba(37, 99, 235, .96), rgba(29, 78, 216, .98));
    box-shadow: 0 8px 16px rgba(37, 99, 235, .18);
    font-size: 9px;
    font-weight: 950;
}

.actual-entry-form button svg {
    width: 13px;
    height: 13px;
}

.actual-entry-form.is-saved {
    border-color: rgba(22, 163, 74, .42);
    background:
        linear-gradient(135deg, rgba(240, 253, 244, .9), rgba(255, 255, 255, .96)),
        #fff;
}

.actual-entry-form.is-error {
    border-color: rgba(220, 38, 38, .48);
    background:
        linear-gradient(135deg, rgba(254, 242, 242, .92), rgba(255, 255, 255, .96)),
        #fff;
}

.actual-entry-form button:disabled {
    cursor: wait;
    opacity: .82;
}

.actual-history-panel {
    background:
        linear-gradient(135deg, rgba(248, 251, 255, .98), rgba(240, 249, 255, .92)),
        #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

.actual-history-table {
    color: #172033;
    background: #fff;
}

.actual-history-table th:nth-child(1) { width: 8%; }
.actual-history-table th:nth-child(2) { width: 6%; }
.actual-history-table th:nth-child(3) { width: 22%; }
.actual-history-table th:nth-child(4) { width: 12%; }
.actual-history-table th:nth-child(5) { width: 8%; }
.actual-history-table th:nth-child(6) { width: 8%; }
.actual-history-table th:nth-child(7) { width: 16%; }
.actual-history-table th:nth-child(8) { width: 13%; }
.actual-history-table th:nth-child(9) { width: 7%; }

.actual-history-table th,
.actual-history-table td {
    padding: 8px 6px;
    border-color: #27364a;
    font-size: 9.2px;
}

.actual-history-table thead th {
    color: #111827;
    background: linear-gradient(180deg, #dbeafe, #bfdbfe);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .22);
}

.actual-history-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, .98);
}

.actual-history-table tbody tr:nth-child(even) td {
    background: rgba(248, 251, 255, .98);
}

.actual-history-table tbody tr:hover td {
    background: rgba(239, 246, 255, .96);
}

.actual-history-table td:nth-child(2) strong {
    min-width: 36px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 3px 7px;
    border: 1px solid rgba(22, 101, 52, .32);
    border-radius: 5px;
    color: #14532d;
    background: rgba(220, 252, 231, .8);
    font-size: 9.5px;
    font-weight: 950;
}

.actual-history-table .actual-description {
    color: #17324d;
    font-size: 9.5px;
    font-weight: 950;
    line-height: 1.55;
}

.actual-history-item-row .actual-item-head {
    grid-template-columns: minmax(44px, auto) minmax(0, 1fr) max-content max-content;
}

.actual-history-entry-row td {
    background: #fff;
}

.actual-history-entry-row td:nth-child(2) {
    background: rgba(248, 250, 252, .96);
}

.actual-history-entry-row .actual-period-title {
    padding-inline-start: 8px !important;
}

.actual-history-period-meta {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.actual-history-table td:nth-child(4),
.actual-history-table td:nth-child(7) {
    color: #334155;
    font-weight: 850;
    line-height: 1.45;
    word-break: break-word;
}

.actual-history-table .number {
    color: #0f3f6f;
    font-size: 9.6px;
    font-weight: 950;
}

.actual-history-table td:first-child {
    color: #0f3f6f;
    font-weight: 950;
    white-space: nowrap;
}

.actual-history-table td:last-child {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(239, 246, 255, .92)),
        #f8fafc;
}

.actual-history-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.actual-history-icon-button.is-active {
    border-color: rgba(20, 184, 166, .42);
    color: #0f766e;
    background: linear-gradient(180deg, rgba(240, 253, 250, .98), rgba(204, 251, 241, .9));
    box-shadow: 0 8px 16px rgba(20, 184, 166, .12);
}

.actual-history-detail-row td {
    padding: 0 !important;
    background: linear-gradient(180deg, rgba(248, 250, 252, .98), rgba(241, 245, 249, .92)) !important;
}

.actual-history-detail-box {
    margin: 8px 10px 12px;
    border: 1px solid rgba(148, 163, 184, .38);
    border-radius: 9px;
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
    box-shadow: inset 4px 0 0 rgba(20, 184, 166, .32);
}

.actual-history-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 9px 12px;
    background: linear-gradient(90deg, rgba(240, 253, 250, .96), rgba(255, 255, 255, .84));
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.actual-history-detail-head > strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0f766e;
    font-size: 11px;
    font-weight: 950;
}

.actual-history-close-button {
    flex: 0 0 auto;
    color: #b91c1c;
    border-color: rgba(185, 28, 28, .28);
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(254, 226, 226, .92));
}

.actual-history-close-button:hover {
    border-color: rgba(185, 28, 28, .62);
    background: linear-gradient(180deg, rgba(220, 38, 38, .95), rgba(153, 27, 27, .98));
}

.actual-history-detail-box table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.actual-history-detail-box th,
.actual-history-detail-box td {
    padding: 7px 8px !important;
    border: 1px solid rgba(148, 163, 184, .28);
    font-size: 10px;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.actual-history-detail-box th {
    color: #17324d;
    background: rgba(226, 232, 240, .74);
    font-weight: 950;
}

.actual-history-detail-box td.number {
    white-space: nowrap;
}

.actual-history-icon-button {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 63, 111, .28);
    border-radius: 5px;
    color: #0f3f6f;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(219, 234, 254, .92)),
        #eff6ff;
    box-shadow: 0 6px 12px rgba(37, 99, 235, .12);
    cursor: pointer;
}

.actual-history-icon-button:hover {
    color: #fff;
    border-color: rgba(37, 99, 235, .62);
    background: linear-gradient(180deg, rgba(37, 99, 235, .95), rgba(30, 64, 175, .98));
}

.actual-history-icon-button svg {
    width: 12px;
    height: 12px;
}

.actual-history-panel .table-wrap {
    overflow-x: visible;
}

.actual-history-table {
    min-width: 0;
}

.actual-history-table th,
.actual-history-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.actual-history-table th:nth-child(1) { width: 7%; }
.actual-history-table th:nth-child(2) { width: 5%; }
.actual-history-table th:nth-child(3) { width: 25%; }
.actual-history-table th:nth-child(4) { width: 12%; }
.actual-history-table th:nth-child(5) { width: 8%; }
.actual-history-table th:nth-child(6) { width: 7%; }
.actual-history-table th:nth-child(7) { width: 16%; }
.actual-history-table th:nth-child(8) { width: 12%; }
.actual-history-table th:nth-child(9) { width: 8%; }

.actual-history-table td:first-child,
.actual-history-table .number,
.actual-history-table .actual-approval-badge {
    white-space: normal;
}

.actual-history-table td:first-child,
.actual-history-table td:nth-child(5) {
    font-size: 8.5px;
}

.actual-locked-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 7.8px;
    font-weight: 900;
    line-height: 1.2;
}

.actual-approval-cell {
    display: grid;
    gap: 5px;
    justify-items: center;
}

.actual-approval-badge {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #f1f5f9;
    font-size: 8.5px;
    font-weight: 950;
}

.actual-approval-badge.approved {
    color: #065f46;
    border-color: #86efac;
    background: #dcfce7;
}

.actual-approval-badge.rejected {
    color: #991b1b;
    border-color: #fca5a5;
    background: #fee2e2;
}

.actual-approval-cell small {
    min-height: 12px;
    color: #64748b;
    font-size: 8px;
    font-weight: 850;
}

.actual-approval-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.actual-approval-form button {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 6px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 5px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 8px;
    font-weight: 950;
    cursor: pointer;
}

.actual-approval-form button[value="approved"] {
    color: #065f46;
    background: #dcfce7;
    border-color: #86efac;
}

.actual-approval-form button[value="rejected"] {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.actual-approval-form svg {
    width: 11px;
    height: 11px;
}

.actual-edit-modal[hidden] {
    display: none;
}

.actual-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .28);
    backdrop-filter: blur(6px);
}

.actual-edit-dialog {
    width: min(760px, 96vw);
    border: 1px solid rgba(148, 163, 184, .42);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(239, 246, 255, .96)),
        #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .24);
    overflow: hidden;
}

.actual-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, .28);
    background: linear-gradient(90deg, rgba(219, 234, 254, .78), rgba(240, 249, 255, .9));
}

.actual-edit-head strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17324d;
    font-size: 13px;
    font-weight: 950;
}

.actual-edit-head button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, .45);
    border-radius: 7px;
    color: #334155;
    background: rgba(255, 255, 255, .84);
    cursor: pointer;
}

.actual-edit-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.actual-edit-form label {
    display: grid;
    gap: 5px;
}

.actual-edit-form label span {
    color: #334155;
    font-size: 9px;
    font-weight: 950;
}

.actual-edit-form input,
.actual-edit-form select,
.actual-edit-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, .58);
    border-radius: 7px;
    background: rgba(255, 255, 255, .98);
    color: #17324d;
    font-size: 10px;
    font-weight: 850;
}

.actual-edit-form input,
.actual-edit-form select {
    height: 34px;
    padding: 5px 8px;
}

.actual-edit-form textarea {
    padding: 8px;
    resize: vertical;
}

.actual-edit-notes {
    grid-column: 1 / -1;
}

.actual-edit-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 2px;
}

.actual-edit-actions button {
    min-width: 128px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 950;
    cursor: pointer;
}

.actual-edit-actions button[type="button"] {
    border: 1px solid rgba(148, 163, 184, .42);
    color: #334155;
    background: #f8fafc;
}

.actual-edit-actions button[type="submit"] {
    border: 1px solid rgba(29, 78, 216, .34);
    color: #fff;
    background: linear-gradient(180deg, rgba(37, 99, 235, .96), rgba(29, 78, 216, .98));
    box-shadow: 0 8px 16px rgba(37, 99, 235, .18);
}

.actual-history-filters {
    display: grid;
    grid-template-columns: 140px 140px minmax(260px, 1fr) auto auto;
    gap: 8px;
    align-items: end;
    padding: 10px 12px;
    border-bottom: 1px solid #b9c9d5;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(239, 246, 255, .86)),
        #fff;
}

.actual-history-filters label {
    display: grid;
    gap: 4px;
    min-width: 0;
    text-align: start;
}

.actual-history-filters label > span {
    color: #475569;
    font-size: 9px;
    font-weight: 950;
}

.actual-history-filters input,
.actual-history-filters select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid rgba(148, 163, 184, .65);
    border-radius: 6px;
    background: rgba(255, 255, 255, .96);
    color: #17324d;
    font-size: 10px;
    font-weight: 850;
}

.actual-history-item-picker {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.actual-history-item-picker summary {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    padding: 5px 28px 5px 8px;
    border: 1px solid rgba(148, 163, 184, .65);
    border-radius: 6px;
    background: rgba(255, 255, 255, .96);
    color: #17324d;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.35;
    cursor: pointer;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    text-align: start;
    overflow-x: hidden;
}

html[dir="rtl"] .actual-history-item-picker summary {
    padding: 5px 8px 5px 28px;
}

.actual-history-item-picker summary::marker {
    color: #2563eb;
}

.actual-history-item-picker > div {
    position: absolute;
    z-index: 40;
    inset-inline: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 18px 34px rgba(15, 23, 42, .18);
}

.actual-history-item-picker button {
    box-sizing: border-box;
    inline-size: calc(100% - 8px);
    max-inline-size: calc(100% - 8px);
    min-height: 30px;
    display: block;
    margin-inline: auto;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #17324d;
    background: transparent;
    text-align: start !important;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.45;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    overflow-x: hidden;
    cursor: pointer;
}

html[dir="rtl"] .actual-history-item-picker button,
html[dir="rtl"] .actual-history-item-picker summary {
    justify-content: flex-start;
    direction: rtl;
    text-align: right !important;
}

html[dir="ltr"] .actual-history-item-picker button,
html[dir="ltr"] .actual-history-item-picker summary {
    justify-content: flex-start;
    direction: ltr;
    text-align: left !important;
}

.actual-history-item-picker button:hover,
.actual-history-item-picker button.active {
    border-color: rgba(37, 99, 235, .2);
    color: #1e40af;
    background: #eff6ff;
}

.actual-history-filters button,
.actual-reset-filter {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.actual-reset-filter {
    color: #1e3a8a;
    border: 1px solid rgba(37, 99, 235, .24);
    background: #eff6ff;
}

.actual-history-filters svg,
.actual-reset-filter svg {
    width: 13px;
    height: 13px;
}

.actual-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 150px;
    color: #64748b;
    text-align: center;
}

.actual-empty svg {
    width: 34px;
    height: 34px;
    color: #2563eb;
}

.actual-empty-row {
    padding: 22px !important;
    color: #64748b;
    text-align: center !important;
}

@media (max-width: 1100px) {
    .actual-execution-hero,
    .actual-stats {
        grid-template-columns: 1fr 1fr;
    }

    .actual-execution-table {
        min-width: 1180px;
    }

    .actual-history-table {
        min-width: 0;
    }

    .actual-table-panel .table-wrap {
        overflow-x: auto;
    }

    .actual-history-panel .table-wrap {
        overflow-x: visible;
    }
}

/* Inventory module final overrides */
.inventory-page{display:grid;gap:14px}.inventory-table th,.inventory-table td{border-color:#111827}.inventory-button{background:linear-gradient(135deg,#d97706,#f59e0b)!important;color:#fff!important}.side-site-discipline-workspace .side-workspace-link.inventory.active{background:linear-gradient(135deg,#b45309,#f59e0b)!important;color:#fff!important}.side-site-discipline-workspace .side-workspace-link.inventory.active svg{color:#fff!important}
.inventory-stock-grid{display:grid;grid-template-columns:1fr 1.35fr;gap:12px}.inventory-stock-form{grid-template-columns:minmax(190px,1fr) minmax(150px,.8fr) 110px minmax(150px,.8fr) auto!important}.inventory-transfer-form{display:grid;grid-template-columns:minmax(210px,1fr) minmax(160px,.8fr) minmax(160px,.8fr) 120px minmax(160px,.8fr) auto;gap:10px;align-items:end}.inventory-transfer-form label{display:grid;gap:5px}.inventory-transfer-form label>span{color:#334155;font-size:10px;font-weight:900}.inventory-transfer-form select,.inventory-transfer-form input{width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:8px 9px;background:#fff;color:#0f172a;font-size:11px;font-weight:800}@media (max-width:1250px){.inventory-stock-grid,.inventory-transfer-form,.inventory-stock-form{grid-template-columns:1fr!important}}
.inventory-filter-panel{border:1px solid rgba(180,83,9,.16);border-radius:8px;background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(255,247,237,.78));box-shadow:0 12px 26px rgba(15,23,42,.06)}
.inventory-filter-grid{display:grid;grid-template-columns:minmax(220px,1.45fr) minmax(135px,.9fr) minmax(145px,.9fr) minmax(190px,1.15fr) minmax(145px,.85fr) minmax(115px,.65fr);gap:10px;align-items:end}
.inventory-filter-grid label{display:grid;gap:5px;min-width:0}.inventory-filter-grid label>span{color:#334155;font-size:10px;font-weight:950}.inventory-filter-grid input,.inventory-filter-grid select{width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:8px 9px;background:#fff;color:#0f172a;font-size:11px;font-weight:850;min-height:38px}.inventory-filter-actions{grid-column:1 / -1;display:flex;gap:8px;align-items:center;justify-content:flex-end;padding-top:2px}.inventory-filter-actions .secondary-button{min-height:38px;border:1px solid rgba(100,116,139,.22);border-radius:8px;padding:0 12px;background:rgba(248,250,252,.95);color:#334155;font-size:11px;font-weight:950;text-decoration:none;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.inventory-search-field input{font-weight:900}.inventory-special-option{color:#15803d!important;font-size:12.5px!important;font-weight:950!important;background:#dcfce7!important}@media (max-width:1150px){.inventory-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.inventory-filter-actions{justify-content:flex-end}}@media (max-width:900px){.inventory-filter-grid{grid-template-columns:1fr}}
.inventory-filter-actions .inventory-button{height:38px;min-height:38px;border-radius:8px;padding:0 13px;font-size:11px;font-weight:950;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;line-height:1}
.inventory-filter-actions .inventory-button svg{width:15px;height:15px}
.inventory-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.inventory-dashboard-card{position:relative;display:grid;grid-template-columns:54px minmax(0,1fr);gap:12px;align-items:center;min-height:132px;border:1px solid rgba(148,163,184,.24);border-radius:10px;padding:15px;text-decoration:none;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(248,250,252,.88));box-shadow:0 18px 38px rgba(15,23,42,.09);overflow:hidden;color:#0f2947}.inventory-dashboard-card:before{content:"";position:absolute;inset:auto -32px -42px auto;width:130px;height:130px;border-radius:999px;background:currentColor;opacity:.1}.inventory-dashboard-card:after{content:"";position:absolute;inset:0;border-inline-start:5px solid currentColor;opacity:.9}.inventory-dashboard-card>span{display:grid;place-items:center;width:54px;height:54px;border-radius:12px;color:#fff;box-shadow:0 12px 24px rgba(15,23,42,.14);z-index:1}.inventory-dashboard-card>div{position:relative;z-index:1;display:grid;gap:4px;min-width:0}.inventory-dashboard-card svg{width:25px;height:25px}.inventory-dashboard-card strong{color:#0f2947;font-size:14px;font-weight:950;line-height:1.35}.inventory-dashboard-card b{display:block;color:currentColor;font-size:22px;font-weight:950;line-height:1.15;white-space:nowrap;letter-spacing:0}.inventory-dashboard-card small{color:#475569;font-size:11px;font-weight:850;line-height:1.5}.inventory-dashboard-card.blue{color:#2563eb;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(219,234,254,.72))}.inventory-dashboard-card.red{color:#dc2626;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(254,226,226,.72))}.inventory-dashboard-card.orange{color:#d97706;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(254,243,199,.76))}.inventory-dashboard-card.teal{color:#0f766e;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(204,251,241,.72))}.inventory-dashboard-card.violet{color:#7c3aed;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(237,233,254,.72))}.inventory-dashboard-card.brown{color:#92400e;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(255,247,237,.86))}.inventory-dashboard-card.blue>span{background:#2563eb}.inventory-dashboard-card.red>span{background:#dc2626}.inventory-dashboard-card.orange>span{background:#d97706}.inventory-dashboard-card.teal>span{background:#0f766e}.inventory-dashboard-card.violet>span{background:#7c3aed}.inventory-dashboard-card.brown>span{background:#92400e}.inventory-dashboard-card:hover{transform:translateY(-2px);box-shadow:0 24px 48px rgba(15,23,42,.13)}@media (max-width:1200px){.inventory-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.inventory-contract-material-form{display:grid;grid-template-columns:minmax(250px,1fr) minmax(360px,1.5fr) 140px auto;gap:10px;align-items:end}.inventory-contract-material-form label{display:grid;gap:5px}.inventory-contract-material-form label>span{color:#334155;font-size:10px;font-weight:950}.inventory-contract-material-form select,.inventory-contract-material-form input{width:100%;border:1px solid #cbd5e1;border-radius:7px;padding:8px 9px;background:#fff;color:#0f172a;font-size:11px;font-weight:850;min-height:38px}@media (max-width:1200px){.inventory-contract-material-form{grid-template-columns:1fr}}
.inventory-stock-grid.stock-entry-grid{grid-template-columns:1fr!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-panel{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(240,253,250,.72) 48%,rgba(255,247,237,.74));border:1px solid rgba(13,148,136,.18);box-shadow:0 16px 34px rgba(15,23,42,.08)}
.inventory-stock-grid.stock-entry-grid .inventory-panel-head{padding-bottom:8px;border-bottom:1px solid rgba(15,23,42,.08)}
.inventory-stock-grid.stock-entry-grid .inventory-panel-head>span{font-size:12px;color:#0f766e}
.inventory-stock-grid.stock-entry-grid .inventory-panel-head>span svg{width:19px;height:19px}
.inventory-stock-grid.stock-entry-grid .inventory-panel-head strong{font-size:11px;color:#92400e;background:rgba(255,247,237,.92);border-color:rgba(217,119,6,.22)}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:10px;align-items:end}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(1),.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(2),.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(3){grid-column:span 4}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(4){grid-column:span 4}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(5){grid-column:span 3}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(6){grid-column:span 3}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(7){grid-column:span 3}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(8){grid-column:span 1}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(9){grid-column:span 2}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label:nth-of-type(10){grid-column:span 3}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form>button{grid-column:4 / span 6;justify-self:stretch!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-material-select-field{grid-column:span 4!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-new-material-name-field{grid-column:span 4!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-new-material-unit-field{grid-column:span 2!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-stock-quantity-field{grid-column:span 2!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-stock-notes-field{grid-column:span 6!important}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form label{display:grid;gap:5px;min-width:0}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form label>span{color:#1f2937;font-size:11px;font-weight:950}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form select,.inventory-stock-grid.stock-entry-grid .inventory-stock-form input{min-height:40px;border:1px solid #b8c3d1;border-radius:8px;background:#fff;color:#0f172a;font-size:12px;font-weight:850;padding:8px 10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form select:focus,.inventory-stock-grid.stock-entry-grid .inventory-stock-form input:focus{outline:2px solid rgba(13,148,136,.18);border-color:#0f766e}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-button{height:40px;min-height:40px;padding:0 14px;border-radius:8px;font-size:11px;font-weight:950;white-space:nowrap;background:linear-gradient(135deg,#0f766e,#14b8a6)!important;box-shadow:0 12px 22px rgba(13,148,136,.22)}
.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-button{min-width:260px}
.inventory-scope-cell{display:grid;gap:3px;text-align:start!important;min-width:120px}.inventory-scope-cell span{display:block;line-height:1.35}.inventory-scope-cell .scope-project{color:#0f766e;font-weight:950}.inventory-scope-cell .scope-discipline{color:#1d4ed8;font-weight:900}.inventory-scope-cell .scope-contract{color:#b45309;font-weight:950}
.inventory-context-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:9px 10px;border:1px solid rgba(14,116,144,.18);border-radius:8px;background:linear-gradient(135deg,rgba(240,253,250,.9),rgba(255,247,237,.78));box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.inventory-context-strip>span{display:inline-flex;align-items:center;gap:6px;color:#0f766e;font-size:11px;font-weight:950;margin-inline-end:4px}
.inventory-context-strip svg{width:15px;height:15px}
.inventory-context-strip b{display:inline-flex;align-items:center;gap:5px;max-width:100%;border:1px solid rgba(148,163,184,.24);border-radius:999px;padding:5px 9px;background:rgba(255,255,255,.72);color:#334155;font-size:10.5px;font-weight:950;line-height:1.35}
.inventory-context-strip em{font-style:normal;color:#0f3b66;overflow-wrap:anywhere}
.inventory-context-note{margin:-4px 0 10px;color:#111827;font-size:10.5px;font-weight:800;line-height:1.65}
.inventory-table-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-inline-start:auto}
.inventory-table-toolbar .inventory-button{height:38px;min-height:38px;padding:0 14px;border-radius:8px;font-size:11px;font-weight:950;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.inventory-table-toolbar .inventory-button svg{width:15px;height:15px}
.inventory-print-button{background:linear-gradient(135deg,#0f766e,#14b8a6)!important;border-color:rgba(13,148,136,.32)!important;color:#fff!important;box-shadow:0 10px 20px rgba(13,148,136,.18)!important}
.inventory-materials-panel .inventory-table-wrap{overflow-x:hidden}
.inventory-materials-panel .management-materials-table{width:100%!important;min-width:0!important;table-layout:fixed}
.inventory-materials-panel .management-materials-table th:nth-child(1),.inventory-materials-panel .management-materials-table td:nth-child(1){width:3%}
.inventory-materials-panel .management-materials-table th:nth-child(2),.inventory-materials-panel .management-materials-table td:nth-child(2){width:7%}
.inventory-materials-panel .management-materials-table th:nth-child(3),.inventory-materials-panel .management-materials-table td:nth-child(3){width:29.5%}
.inventory-materials-panel .management-materials-table th:nth-child(4),.inventory-materials-panel .management-materials-table td:nth-child(4){width:10%}
.inventory-materials-panel .management-materials-table th:nth-child(5),.inventory-materials-panel .management-materials-table td:nth-child(5){width:5%}
.inventory-materials-panel .management-materials-table th:nth-child(6),.inventory-materials-panel .management-materials-table td:nth-child(6){width:6%}
.inventory-materials-panel .management-materials-table th:nth-child(7),.inventory-materials-panel .management-materials-table td:nth-child(7){width:5.5%}
.inventory-materials-panel .management-materials-table th:nth-child(8),.inventory-materials-panel .management-materials-table td:nth-child(8){width:5.5%}
.inventory-materials-panel .management-materials-table th:nth-child(9),.inventory-materials-panel .management-materials-table td:nth-child(9){width:5.5%}
.inventory-materials-panel .management-materials-table th:nth-child(10),.inventory-materials-panel .management-materials-table td:nth-child(10){width:5.5%}
.inventory-materials-panel .management-materials-table th:nth-child(11),.inventory-materials-panel .management-materials-table td:nth-child(11){width:5.5%}
.inventory-materials-panel .management-materials-table th:nth-child(12),.inventory-materials-panel .management-materials-table td:nth-child(12){width:6.5%}
.inventory-materials-panel .management-materials-table th:nth-child(13),.inventory-materials-panel .management-materials-table td:nth-child(13){width:5.5%}
.inventory-materials-panel .management-materials-table th,.inventory-materials-panel .management-materials-table td{padding:5px 3px;font-size:9.2px;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;line-height:1.32}
.inventory-materials-panel .management-materials-table .inventory-material-name{width:29.5%!important;white-space:normal!important;line-height:1.38;text-align:start!important}
.inventory-materials-panel .management-materials-table th:nth-child(2),.inventory-materials-panel .management-materials-table td:nth-child(2){overflow:hidden}
.inventory-materials-panel .management-materials-table td:nth-child(2) .table-chip{width:100%;max-width:100%;min-width:0;box-sizing:border-box;justify-content:center;min-height:22px;padding:3px 2px;border-radius:5px;font-size:8.8px;letter-spacing:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.2}
.inventory-materials-panel .management-materials-table td:nth-child(3){overflow:hidden}
.inventory-materials-panel .management-materials-table td:nth-child(3) strong{display:block;min-width:0;overflow-wrap:anywhere;word-break:normal}
.inventory-materials-panel .management-materials-table .table-actions.compact{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:100%;min-width:0}
.inventory-materials-panel .management-materials-table .table-actions.compact .icon-action{width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;border-radius:6px;padding:0}
.inventory-materials-panel .management-materials-table .table-actions.compact .icon-action svg{width:11.5px!important;height:11.5px!important}
.inventory-pagination{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.inventory-pagination span{border:1px solid rgba(180,83,9,.18);border-radius:999px;padding:7px 12px;background:rgba(255,247,237,.84);color:#7c2d12;font-size:11px;font-weight:950}
.inventory-pagination .secondary-button{min-height:34px;border-radius:8px;padding:0 12px;font-size:11px;font-weight:950;text-decoration:none;display:inline-flex;align-items:center;gap:5px}
.inventory-pagination .secondary-button.disabled{pointer-events:none;opacity:.42;filter:grayscale(.3)}
.inventory-materials-panel .inventory-status{display:grid;gap:2px;justify-items:center;min-width:0;padding:5px 4px;line-height:1.25;white-space:normal}
.inventory-materials-panel .inventory-status{background:transparent!important;border-radius:0!important;padding:0!important}
.inventory-materials-panel .inventory-status.ok{color:#166534!important}
.inventory-materials-panel .inventory-status.low{color:#92400e!important}
.inventory-materials-panel .inventory-status.critical,.inventory-materials-panel .inventory-status.empty{color:#991b1b!important}
.inventory-materials-panel .inventory-status b{display:block;font-size:10px;color:inherit}
.inventory-materials-panel .inventory-table-wrap{overflow-x:auto!important;overflow-y:visible;max-width:100%;scrollbar-color:#0f766e #e2e8f0;scrollbar-width:thin}
.inventory-materials-panel .management-materials-table{min-width:1320px!important;width:100%!important;table-layout:fixed!important}
.inventory-materials-panel .management-materials-table.has-subcontractor-supply{min-width:1560px!important}
.inventory-materials-panel .management-materials-table th,.inventory-materials-panel .management-materials-table td{font-size:9.8px!important;padding:6px 5px!important;line-height:1.35!important}
.inventory-materials-panel .management-materials-table th{font-size:9.4px!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.22!important;vertical-align:middle!important}
.inventory-materials-panel .management-materials-table th:nth-child(1),.inventory-materials-panel .management-materials-table td:nth-child(1){width:42px!important}
.inventory-materials-panel .management-materials-table th:nth-child(2),.inventory-materials-panel .management-materials-table td:nth-child(2){width:112px!important}
.inventory-materials-panel .management-materials-table th:nth-child(3),.inventory-materials-panel .management-materials-table td:nth-child(3){width:280px!important}
.inventory-materials-panel .management-materials-table th:nth-child(4),.inventory-materials-panel .management-materials-table td:nth-child(4){width:130px!important}
.inventory-materials-panel .management-materials-table th:nth-child(5),.inventory-materials-panel .management-materials-table td:nth-child(5){width:72px!important}
.inventory-materials-panel .management-materials-table th:nth-child(6),.inventory-materials-panel .management-materials-table td:nth-child(6),
.inventory-materials-panel .management-materials-table th:nth-child(7),.inventory-materials-panel .management-materials-table td:nth-child(7),
.inventory-materials-panel .management-materials-table th:nth-child(8),.inventory-materials-panel .management-materials-table td:nth-child(8),
.inventory-materials-panel .management-materials-table th:nth-child(9),.inventory-materials-panel .management-materials-table td:nth-child(9),
.inventory-materials-panel .management-materials-table th:nth-child(10),.inventory-materials-panel .management-materials-table td:nth-child(10){width:100px!important}
.inventory-materials-panel .management-materials-table th:nth-child(11),.inventory-materials-panel .management-materials-table td:nth-child(11){width:92px!important}
.inventory-materials-panel .management-materials-table th:nth-child(12),.inventory-materials-panel .management-materials-table td:nth-child(12){width:82px!important}
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(7),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(7),
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(8),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(8),
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(9),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(9),
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(10),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(10){width:100px!important}
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(11),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(11){width:92px!important}
.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) th:nth-child(12),.inventory-materials-panel .management-materials-table:not(.has-subcontractor-supply) td:nth-child(12){width:82px!important}
.inventory-materials-panel .management-materials-table .number{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-size:9.4px!important}
.inventory-materials-panel .management-materials-table .inventory-material-name{width:auto!important;min-width:260px;text-align:start!important}
.inventory-materials-panel .management-materials-table td:nth-child(3) strong{overflow-wrap:anywhere;line-height:1.42}
.inventory-materials-panel .management-materials-table td:nth-child(2) .table-chip{font-size:9px!important;min-height:24px!important;padding:4px 3px!important}
.inventory-materials-panel .management-materials-table .table-actions.compact{gap:5px!important}
.inventory-materials-panel .management-materials-table .table-actions.compact .icon-action{width:27px!important;min-width:27px!important;height:27px!important;min-height:27px!important}
.inventory-materials-panel .management-materials-table .table-actions.compact .icon-action svg{width:13px!important;height:13px!important}
.inventory-materials-panel .management-materials-table .inventory-status span{font-size:9.6px!important;font-weight:950}
.inventory-materials-panel .management-materials-table .inventory-status b{font-size:9.8px!important}
.inventory-new-category-field[hidden],.inventory-new-material-field[hidden]{display:none!important}
@media (max-width:1250px){.inventory-stock-grid.stock-entry-grid .inventory-stock-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-stock-grid.stock-entry-grid .inventory-stock-form>label,.inventory-stock-grid.stock-entry-grid .inventory-stock-form>button{grid-column:auto!important}.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-material-select-field,.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-new-material-name-field,.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-stock-notes-field{grid-column:1 / -1!important}.inventory-stock-grid.stock-entry-grid .inventory-stock-form .inventory-button{justify-self:stretch}}
@media print{
    .inventory-page .no-print,
    .inventory-page .inventory-filter-panel,
    .inventory-page .inventory-stats,
    .inventory-page .inventory-stock-grid,
    .inventory-page .inventory-pagination,
    .inventory-page .table-actions,
    .inventory-page .inventory-table-toolbar,
    .inventory-page .modal-backdrop{
        display:none!important;
    }
    .inventory-page,
    .inventory-materials-panel{
        display:block!important;
        border:0!important;
        box-shadow:none!important;
        background:#fff!important;
        padding:0!important;
    }
    .inventory-hero{
        box-shadow:none!important;
        border:1px solid #94a3b8!important;
        background:#fff!important;
        margin-bottom:8px!important;
    }
    .inventory-materials-panel .inventory-table-wrap{
        overflow:visible!important;
        border-color:#111827!important;
    }
    .inventory-context-strip>span,
    .inventory-materials-panel .management-materials-table th:nth-child(13),
    .inventory-materials-panel .management-materials-table td:nth-child(13){
        display:none!important;
    }
    .inventory-materials-panel .management-materials-table{
        width:100%!important;
        table-layout:fixed!important;
    }
    .inventory-materials-panel .management-materials-table th,
    .inventory-materials-panel .management-materials-table td{
        border-color:#111827!important;
        color:#000!important;
        font-size:8.4px!important;
        padding:4px 3px!important;
    }
    .inventory-materials-panel .management-materials-table th{
        background:#08294b!important;
        color:#fff!important;
        font-weight:950!important;
        white-space:normal!important;
    }
    .inventory-materials-panel .management-materials-table th:nth-child(1),.inventory-materials-panel .management-materials-table td:nth-child(1){width:3%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(2),.inventory-materials-panel .management-materials-table td:nth-child(2){width:7%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(3),.inventory-materials-panel .management-materials-table td:nth-child(3){width:21%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(4),.inventory-materials-panel .management-materials-table td:nth-child(4){width:7%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(5),.inventory-materials-panel .management-materials-table td:nth-child(5){width:5%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(6),.inventory-materials-panel .management-materials-table td:nth-child(6),
    .inventory-materials-panel .management-materials-table th:nth-child(7),.inventory-materials-panel .management-materials-table td:nth-child(7),
    .inventory-materials-panel .management-materials-table th:nth-child(8),.inventory-materials-panel .management-materials-table td:nth-child(8),
    .inventory-materials-panel .management-materials-table th:nth-child(9),.inventory-materials-panel .management-materials-table td:nth-child(9),
    .inventory-materials-panel .management-materials-table th:nth-child(10),.inventory-materials-panel .management-materials-table td:nth-child(10),
    .inventory-materials-panel .management-materials-table th:nth-child(11),.inventory-materials-panel .management-materials-table td:nth-child(11){width:7.8%!important}
    .inventory-materials-panel .management-materials-table th:nth-child(12),.inventory-materials-panel .management-materials-table td:nth-child(12){width:10%!important}
    .inventory-materials-panel .management-materials-table td.number,
    .inventory-materials-panel .management-materials-table td:nth-child(n+6):nth-child(-n+11){
        white-space:nowrap!important;
        overflow-wrap:normal!important;
        word-break:normal!important;
        font-size:8px!important;
        font-variant-numeric:tabular-nums;
    }
    .inventory-materials-panel .management-materials-table td:nth-child(3),
    .inventory-materials-panel .management-materials-table td:nth-child(3) strong{
        white-space:normal!important;
        overflow-wrap:anywhere!important;
        word-break:normal!important;
    }
    .inventory-materials-panel .inventory-status,
    .inventory-materials-panel .inventory-status span,
    .inventory-materials-panel .inventory-status b{
        font-size:8px!important;
        line-height:1.12!important;
    }
    .inventory-context-strip{
        break-inside:avoid;
        box-shadow:none!important;
        border-color:#94a3b8!important;
        background:#fff!important;
    }
    .inventory-context-note{
        margin:3px 0 8px!important;
        color:#000!important;
        font-size:9px!important;
        font-weight:700!important;
    }
}
.side-management-inventory>summary{border-color:rgba(180,83,9,.26)!important;background:linear-gradient(135deg,rgba(255,247,237,.82),rgba(236,253,245,.74))!important;color:#7c2d12!important}.side-management-inventory>summary svg{color:#d97706!important}.side-management-inventory[open]>summary{background:linear-gradient(135deg,#b45309,#0f766e)!important;color:#fff!important}.side-management-inventory[open]>summary svg{color:#fff7ed!important}.side-management-link.inventory,.side-discipline-link.inventory{border-color:rgba(180,83,9,.24)!important;background:linear-gradient(135deg,rgba(255,247,237,.86),rgba(240,253,250,.66))!important;color:#7c2d12!important}.side-management-link.inventory svg,.side-discipline-link.inventory svg{color:#d97706!important}.side-management-link.inventory.active,.side-discipline-link.inventory.active{border-color:rgba(15,118,110,.45)!important;background:linear-gradient(135deg,#0f766e,#d97706)!important;color:#fff!important;box-shadow:0 10px 22px rgba(15,118,110,.2)}.side-management-link.inventory.active svg,.side-discipline-link.inventory.active svg{color:#fff!important}.side-inventory-discipline-workspace .side-workspace-label.inventory{color:#7c2d12;background:rgba(255,247,237,.9);border-color:rgba(217,119,6,.22)}.side-inventory-discipline-workspace .side-workspace-link.inventory{border-color:rgba(180,83,9,.28);background:linear-gradient(135deg,rgba(255,247,237,.92),rgba(254,243,199,.62));color:#7c2d12}.side-inventory-discipline-workspace .side-workspace-link.inventory.active{background:linear-gradient(135deg,#b45309,#f59e0b)!important;color:#fff!important}
.side-site-discipline-workspace .side-workspace-link.site-inventory-issue{border-color:rgba(217,119,6,.28);background:linear-gradient(135deg,rgba(255,247,237,.9),rgba(254,243,199,.55));color:#7c2d12}.side-site-discipline-workspace .side-workspace-link.site-inventory-issue svg{color:#d97706}.side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active{background:linear-gradient(135deg,#d97706,#f59e0b)!important;color:#fff!important;box-shadow:0 10px 20px rgba(217,119,6,.2)}.side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active svg{color:#fff!important}
.side-management-site>summary{border-color:rgba(217,119,6,.28)!important;background:linear-gradient(135deg,rgba(255,247,237,.86),rgba(236,253,245,.68))!important;color:#7c2d12!important}
.side-management-site>summary svg{color:#d97706!important}
.side-management-site[open]>summary{background:linear-gradient(135deg,#b45309,#0f766e)!important;color:#fff!important;box-shadow:0 10px 22px rgba(180,83,9,.18)!important}
.side-management-site[open]>summary svg{color:#fff7ed!important}
.side-management-link.site{min-height:34px;border-color:rgba(217,119,6,.24)!important;background:linear-gradient(135deg,rgba(255,247,237,.86),rgba(240,253,250,.66))!important;color:#7c2d12!important;font-size:11px;font-weight:900;box-shadow:inset 0 1px 0 rgba(255,255,255,.82)}
.side-management-link.site svg{color:#d97706!important;width:15px;height:15px}
.side-management-link.site:hover{color:#7c2d12!important;border-color:rgba(217,119,6,.46)!important;background:linear-gradient(135deg,rgba(255,247,237,.98),rgba(236,253,245,.82))!important;box-shadow:0 8px 18px rgba(217,119,6,.12)}
.side-management-link.site.active{border-color:rgba(15,118,110,.54)!important;background:linear-gradient(135deg,#0f766e,#b45309)!important;color:#fff!important;box-shadow:0 10px 22px rgba(15,118,110,.22)!important}
.side-management-link.site.active svg{color:#fff!important}
.side-site-branch .side-child-link{min-height:34px;border-color:rgba(217,119,6,.24)!important;background:linear-gradient(135deg,rgba(255,247,237,.84),rgba(240,253,250,.62))!important;color:#7c2d12!important;font-size:10.8px;font-weight:900}
.side-site-branch .side-child-link svg{color:#d97706!important}
.side-site-branch .side-child-link.active{border-color:rgba(15,118,110,.58)!important;background:linear-gradient(135deg,#0f766e,#b45309)!important;color:#fff!important;box-shadow:0 10px 22px rgba(15,118,110,.2)!important}
.side-site-branch .side-child-link.active svg{color:#fff!important}
.side-site-discipline-workspace .side-workspace-label.site{border:1px solid rgba(217,119,6,.22);background:linear-gradient(135deg,rgba(255,247,237,.9),rgba(254,243,199,.42));color:#7c2d12}
.side-site-discipline-workspace .side-workspace-link{min-height:31px;border-color:rgba(217,119,6,.23)!important;background:linear-gradient(135deg,rgba(255,247,237,.84),rgba(240,253,250,.58))!important;color:#7c2d12!important;font-size:10.6px;font-weight:900}
.side-site-discipline-workspace .side-workspace-link svg{color:#d97706!important}
.side-site-discipline-workspace .side-workspace-link.active{border-color:rgba(15,118,110,.52)!important;background:linear-gradient(135deg,#0f766e,#b45309)!important;color:#fff!important;box-shadow:0 8px 18px rgba(15,118,110,.18)!important}
.side-site-discipline-workspace .side-workspace-link.active svg{color:#fff!important}
.inventory-request-status.pending_purchase,.inventory-request-status.ordered{background:#ffedd5;color:#9a3412}.inventory-request-status.partially_received{background:#fef3c7;color:#92400e}.inventory-request-status.received{background:#dcfce7;color:#166534}.inventory-request-items span small{display:block;margin-top:3px;color:#475569;font-size:9px;font-weight:800;line-height:1.5}.inventory-receive-list{display:grid;gap:6px;min-width:210px}.inventory-receive-form{display:grid;grid-template-columns:minmax(120px,1fr) 30px;gap:6px;align-items:end;margin:0;padding:5px;border:1px solid rgba(217,119,6,.2);border-radius:7px;background:rgba(255,247,237,.8)}.inventory-receive-form label{display:grid;gap:3px;text-align:start}.inventory-receive-form small{color:#334155;font-size:8.5px;font-weight:900;line-height:1.35}.inventory-receive-form input{width:100%;height:28px;border:1px solid #cbd5e1;border-radius:6px;padding:4px 6px;background:#fff;color:#0f172a;font-size:10px;font-weight:900;text-align:center}.inventory-receive-form .icon-action{width:28px;height:28px;min-width:28px}.inventory-receive-form .icon-action svg{width:14px;height:14px}
.inventory-request-modal .inventory-detail-modal{width:min(1120px,94vw);max-height:86vh;overflow:auto;border-color:rgba(217,119,6,.25);box-shadow:0 28px 70px rgba(15,23,42,.28)}.inventory-detail-modal .resource-modal-head{background:linear-gradient(135deg,#08294b,#0f766e);color:#fff}.inventory-detail-modal .resource-modal-head h2{display:flex;align-items:center;gap:8px;color:#fff;font-size:15px}.inventory-detail-modal .resource-modal-head svg{width:17px;height:17px}.inventory-modal-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px;background:linear-gradient(135deg,rgba(240,253,250,.92),rgba(255,247,237,.86));border-bottom:1px solid rgba(148,163,184,.24)}.inventory-modal-summary span{border:1px solid rgba(148,163,184,.22);border-radius:8px;padding:8px 10px;background:rgba(255,255,255,.78);color:#475569;font-size:10.5px;font-weight:900}.inventory-modal-summary b{display:block;margin-top:3px;color:#0f172a;font-size:12px}.inventory-modal-table{min-width:0!important}.inventory-modal-table th,.inventory-modal-table td{font-size:10px;padding:7px 5px}.inventory-modal-actions{display:flex;justify-content:center;padding:12px}.inventory-modal-actions .inventory-button{min-width:260px}.inventory-requests-panel .inventory-table.compact th:nth-child(6),.inventory-requests-panel .inventory-table.compact td:nth-child(6){width:120px}.inventory-requests-panel .icon-action{width:29px;height:29px;min-width:29px}.inventory-requests-panel .icon-action svg{width:14px;height:14px}@media (max-width:900px){.inventory-modal-summary{grid-template-columns:1fr}.inventory-request-modal .inventory-detail-modal{width:96vw}}
.side-management-purchases>summary{border-color:rgba(13,148,136,.26)!important;background:linear-gradient(135deg,rgba(236,253,245,.9),rgba(255,247,237,.68))!important;color:#065f46!important}.side-management-purchases>summary svg{color:#0f766e!important}.side-management-purchases[open]>summary{background:linear-gradient(135deg,#0f766e,#b45309)!important;color:#fff!important;box-shadow:0 10px 22px rgba(15,118,110,.18)!important}.side-management-purchases[open]>summary svg{color:#fff!important}.side-management-link.purchase{border-color:rgba(13,148,136,.24)!important;background:linear-gradient(135deg,rgba(236,253,245,.9),rgba(255,247,237,.64))!important;color:#065f46!important}.side-management-link.purchase svg{color:#0f766e!important}.side-management-link.purchase.active{border-color:rgba(180,83,9,.48)!important;background:linear-gradient(135deg,#0f766e,#d97706)!important;color:#fff!important;box-shadow:0 10px 22px rgba(15,118,110,.22)!important}.side-management-link.purchase.active svg{color:#fff!important}

/* Final sidebar visual system: icon rail + professional tree buttons. */
.side-nav {
    border-color: rgba(15, 41, 71, .12) !important;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .82)),
        radial-gradient(circle at 15% 0%, rgba(14, 165, 233, .12), transparent 34%),
        radial-gradient(circle at 100% 28%, rgba(15, 118, 110, .12), transparent 36%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 22px 52px rgba(15, 23, 42, .12) !important;
}

.side-nav nav {
    gap: 9px !important;
}

.side-group,
.side-management-group {
    border: 1px solid rgba(15, 41, 71, .10) !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .44)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 10px 22px rgba(15, 23, 42, .045) !important;
    overflow: hidden;
}

.side-group:has(.active),
.side-management-group:has(.active) {
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 30%, transparent) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .56)),
        color-mix(in srgb, var(--side-accent, #2563eb) 7%, #fff) !important;
}

.side-link,
.side-group > summary,
.side-management-group > summary {
    min-height: 40px !important;
    padding: 9px 10px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 22%, transparent) !important;
    border-radius: 10px !important;
    color: var(--side-text, #0f2947) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .34)),
        color-mix(in srgb, var(--side-accent, #2563eb) 9%, #fff) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 8px 18px rgba(15, 23, 42, .055) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    position: relative;
}

.side-link::before,
.side-group > summary::before,
.side-management-group > summary::before {
    content: "" !important;
    width: 4px !important;
    align-self: stretch !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, var(--side-accent, #2563eb), color-mix(in srgb, var(--side-accent, #2563eb) 62%, #0f2947)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--side-accent, #2563eb) 8%, transparent) !important;
}

html[dir="rtl"] .side-link::before,
html[dir="rtl"] .side-group > summary::before,
html[dir="rtl"] .side-management-group > summary::before {
    order: 3;
}

.side-link svg,
.side-group > summary svg,
.side-management-group > summary svg,
.side-management-link svg,
.side-sub-link svg,
.side-child-link svg,
.side-workspace-link svg,
.side-resource-link svg {
    width: 16px !important;
    height: 16px !important;
    color: var(--side-accent, #2563eb) !important;
    stroke-width: 2 !important;
}

.side-link:hover,
.side-group > summary:hover,
.side-management-group > summary:hover,
.side-management-link:hover,
.side-sub-link:hover,
.side-child-link:hover,
.side-workspace-link:hover,
.side-resource-link:hover {
    transform: translateY(-1px) !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 42%, transparent) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .52)),
        color-mix(in srgb, var(--side-accent, #2563eb) 13%, #fff) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 12px 24px color-mix(in srgb, var(--side-accent, #2563eb) 14%, transparent) !important;
}

.side-link.active,
.side-group:has(.active) > summary,
.side-management-group[open] > summary,
.side-management-group:has(.active) > summary {
    color: #fff !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 68%, transparent) !important;
    background:
        linear-gradient(135deg, var(--side-accent-dark, #0f2947), var(--side-accent, #2563eb)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 13px 26px color-mix(in srgb, var(--side-accent, #2563eb) 22%, transparent) !important;
}

.side-link.active svg,
.side-group:has(.active) > summary svg,
.side-management-group[open] > summary svg,
.side-management-group:has(.active) > summary svg,
.side-link.active .side-chevron,
.side-group:has(.active) > summary .side-chevron,
.side-management-group[open] > summary .side-chevron {
    color: #fff !important;
}

.side-management-link,
.side-sub-link,
.side-child-link,
.side-workspace-link,
.side-resource-link {
    min-height: 35px !important;
    padding: 8px 9px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 18%, transparent) !important;
    border-radius: 10px !important;
    color: var(--side-text, #1e3a5f) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .28)),
        color-mix(in srgb, var(--side-accent, #2563eb) 6%, #fff) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.28 !important;
}

.side-management-link.active,
.side-sub-link.active,
.side-child-link.active,
.side-workspace-link.active,
.side-resource-link.active {
    color: #fff !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 60%, transparent) !important;
    background:
        linear-gradient(135deg, var(--side-accent-dark, #0f2947), var(--side-accent, #2563eb)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 10px 20px color-mix(in srgb, var(--side-accent, #2563eb) 20%, transparent) !important;
}

.side-management-link.active svg,
.side-sub-link.active svg,
.side-child-link.active svg,
.side-workspace-link.active svg,
.side-resource-link.active svg {
    color: #fff !important;
}

.side-management-technical,
.side-management-technical .side-sub-link,
.side-management-technical .side-child-link,
.side-management-technical .side-workspace-link,
.side-management-technical .side-resource-link {
    --side-accent: #2563eb;
    --side-accent-dark: #0f2947;
    --side-text: #12315f;
}

.side-management-site,
.side-management-site .side-management-link,
.side-management-site .side-child-link,
.side-management-site .side-workspace-link,
.side-site-branch,
.side-site-branch .side-child-link,
.side-site-discipline-workspace .side-workspace-link {
    --side-accent: #0f766e;
    --side-accent-dark: #065f46;
    --side-text: #064e3b;
}

.side-management-inventory,
.side-management-inventory .side-management-link,
.side-inventory-discipline-workspace .side-workspace-link,
.side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    --side-accent: #d97706;
    --side-accent-dark: #92400e;
    --side-text: #7c2d12;
}

.side-management-purchases,
.side-management-purchases .side-management-link {
    --side-accent: #0891b2;
    --side-accent-dark: #155e75;
    --side-text: #164e63;
}

.side-finance-group,
.side-finance-group .side-sub-link {
    --side-accent: #b7791f;
    --side-accent-dark: #7c2d12;
    --side-text: #7c2d12;
}

.side-discipline-link.active {
    background:
        linear-gradient(135deg, var(--side-accent-dark, #065f46), var(--side-accent, #0f766e)) !important;
}

.side-workspace-label {
    border-radius: 10px !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 22%, transparent) !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 9%, #fff) !important;
    color: var(--side-text, #0f2947) !important;
    font-size: 10.5px !important;
    font-weight: 950 !important;
}
.inventory-request-modal{align-items:center!important;justify-content:center!important;padding:24px!important}.inventory-request-modal .inventory-detail-modal{margin:auto!important}
.inventory-inline-note{display:block;margin-top:4px;color:#0f766e;font-size:8.5px;font-weight:950;line-height:1.25;white-space:normal}
.inventory-detail-modal .issue-detail-table th:nth-child(1),.inventory-detail-modal .issue-detail-table td:nth-child(1){width:3.5%!important}.inventory-detail-modal .issue-detail-table th:nth-child(2),.inventory-detail-modal .issue-detail-table td:nth-child(2){width:25%!important}.inventory-detail-modal .issue-detail-table th:nth-child(3),.inventory-detail-modal .issue-detail-table td:nth-child(3){width:5.5%!important}.inventory-detail-modal .issue-detail-table th:nth-child(n+4),.inventory-detail-modal .issue-detail-table td:nth-child(n+4){width:9.4%!important}
.inventory-detail-modal .issue-detail-table th:nth-child(1),.inventory-detail-modal .issue-detail-table td:nth-child(1){width:3.5%!important}.inventory-detail-modal .issue-detail-table th:nth-child(2),.inventory-detail-modal .issue-detail-table td:nth-child(2){width:29%!important}.inventory-detail-modal .issue-detail-table th:nth-child(3),.inventory-detail-modal .issue-detail-table td:nth-child(3){width:6%!important}.inventory-detail-modal .issue-detail-table th:nth-child(n+4),.inventory-detail-modal .issue-detail-table td:nth-child(n+4){width:8.8%!important}.inventory-request-status.not_issued{background:#e5e7eb;color:#374151}.inventory-request-status.waiting_supply{background:#ffedd5;color:#9a3412}
.inventory-detail-modal .inventory-received-qty{color:#15803d!important;font-weight:950!important}
.inventory-cell-updated{animation:inventoryCellPulse 1.1s ease both}@keyframes inventoryCellPulse{0%{background:#bbf7d0!important;color:#065f46!important}100%{background:transparent}}
.inventory-request-modal{position:fixed!important;inset:0!important;z-index:9999!important;display:flex!important;background:rgba(15,23,42,.46)!important;backdrop-filter:blur(10px)!important}.inventory-request-modal[hidden]{display:none!important}.inventory-request-modal .inventory-detail-modal{width:min(1280px,96vw)!important;max-height:88vh!important;overflow:auto!important;padding:0!important;border-radius:12px!important}.inventory-detail-modal .inventory-table-wrap{overflow-x:hidden!important;border-radius:0!important;border-inline:0!important}.inventory-detail-modal .inventory-modal-table{width:100%!important;min-width:0!important;table-layout:fixed!important}.inventory-detail-modal .inventory-modal-table th,.inventory-detail-modal .inventory-modal-table td{font-size:9.2px!important;padding:5px 4px!important;line-height:1.28!important;white-space:normal!important;overflow-wrap:anywhere!important}.inventory-detail-modal .inventory-modal-table .number{white-space:nowrap!important;font-size:8.8px!important}.inventory-detail-modal .inventory-modal-table th:nth-child(1),.inventory-detail-modal .inventory-modal-table td:nth-child(1){width:4%!important}.inventory-detail-modal .inventory-modal-table th:nth-child(2),.inventory-detail-modal .inventory-modal-table td:nth-child(2){width:32%!important}.inventory-detail-modal .inventory-modal-table th:nth-child(3),.inventory-detail-modal .inventory-modal-table td:nth-child(3){width:8%!important}.inventory-detail-modal .inventory-modal-table th:nth-child(n+4),.inventory-detail-modal .inventory-modal-table td:nth-child(n+4){width:11%!important}.inventory-detail-modal .inventory-modal-table th:nth-last-child(1),.inventory-detail-modal .inventory-modal-table td:nth-last-child(1){width:18%!important}.inventory-detail-modal .inventory-receive-form{min-width:0!important;grid-template-columns:minmax(74px,1fr) 28px!important;padding:4px!important}.inventory-detail-modal .inventory-receive-form input{height:26px!important;font-size:9px!important;padding:3px 4px!important}.inventory-detail-modal .inventory-receive-form small{font-size:8px!important}.inventory-detail-modal .inventory-receive-form .icon-action{width:26px!important;height:26px!important;min-width:26px!important}
.inventory-detail-modal .issue-detail-table th:nth-child(1),.inventory-detail-modal .issue-detail-table td:nth-child(1){width:4%!important}.inventory-detail-modal .issue-detail-table th:nth-child(2),.inventory-detail-modal .issue-detail-table td:nth-child(2){width:34%!important}.inventory-detail-modal .issue-detail-table th:nth-child(3),.inventory-detail-modal .issue-detail-table td:nth-child(3){width:7%!important}.inventory-detail-modal .issue-detail-table th:nth-child(n+4),.inventory-detail-modal .issue-detail-table td:nth-child(n+4){width:11%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(1),.inventory-detail-modal .purchase-detail-table td:nth-child(1){width:4%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(2),.inventory-detail-modal .purchase-detail-table td:nth-child(2){width:31%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(3),.inventory-detail-modal .purchase-detail-table td:nth-child(3){width:7%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(4),.inventory-detail-modal .purchase-detail-table td:nth-child(4),.inventory-detail-modal .purchase-detail-table th:nth-child(5),.inventory-detail-modal .purchase-detail-table td:nth-child(5),.inventory-detail-modal .purchase-detail-table th:nth-child(6),.inventory-detail-modal .purchase-detail-table td:nth-child(6){width:12%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(7),.inventory-detail-modal .purchase-detail-table td:nth-child(7){width:22%!important}
.inventory-detail-modal .purchase-detail-table th:nth-child(1),.inventory-detail-modal .purchase-detail-table td:nth-child(1){width:4%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(2),.inventory-detail-modal .purchase-detail-table td:nth-child(2){width:28%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(3),.inventory-detail-modal .purchase-detail-table td:nth-child(3){width:6%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(4),.inventory-detail-modal .purchase-detail-table td:nth-child(4),.inventory-detail-modal .purchase-detail-table th:nth-child(5),.inventory-detail-modal .purchase-detail-table td:nth-child(5),.inventory-detail-modal .purchase-detail-table th:nth-child(6),.inventory-detail-modal .purchase-detail-table td:nth-child(6){width:10%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(7),.inventory-detail-modal .purchase-detail-table td:nth-child(7){width:14%!important}.inventory-detail-modal .purchase-detail-table th:nth-child(8),.inventory-detail-modal .purchase-detail-table td:nth-child(8){width:18%!important}.inventory-received-check{display:inline-flex;align-items:center;justify-content:center;gap:4px;color:#15803d;font-size:9px;font-weight:950;line-height:1.25}.inventory-received-check svg{width:14px;height:14px;stroke-width:2.6;color:#16a34a}.inventory-receive-done{min-width:260px;background:linear-gradient(135deg,#15803d,#22c55e)!important;border-color:rgba(21,128,61,.35)!important}

/* Sidebar skin v2: override old specific rules and cover every tree button. */
.side-group-projects {
    --side-accent: #2563eb;
    --side-accent-dark: #0f2947;
    --side-text: #12315f;
}

.side-management-technical {
    --side-accent: #2563eb;
    --side-accent-dark: #0f2947;
    --side-text: #12315f;
}

.side-management-site,
.side-site-branch,
.side-site-discipline-workspace {
    --side-accent: #0f766e;
    --side-accent-dark: #064e3b;
    --side-text: #064e3b;
}

.side-management-inventory,
.side-inventory-discipline-workspace {
    --side-accent: #d97706;
    --side-accent-dark: #92400e;
    --side-text: #7c2d12;
}

.side-management-purchases {
    --side-accent: #0891b2;
    --side-accent-dark: #155e75;
    --side-text: #164e63;
}

.side-finance-group {
    --side-accent: #b7791f;
    --side-accent-dark: #7c2d12;
    --side-text: #7c2d12;
}

.side-management-costs {
    --side-accent: #0e7490;
    --side-accent-dark: #164e63;
    --side-text: #164e63;
}

.side-nav .side-group > summary,
.side-nav .side-management-group > summary,
.side-nav .side-management-site > summary,
.side-nav .side-management-inventory > summary,
.side-nav .side-management-purchases > summary,
.side-nav .side-management-costs > summary,
.side-nav .side-finance-group > summary {
    min-height: 40px !important;
    padding: 9px 10px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 24%, transparent) !important;
    border-radius: 10px !important;
    color: var(--side-text, #0f2947) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .34)),
        color-mix(in srgb, var(--side-accent, #2563eb) 10%, #fff) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .96),
        0 8px 18px rgba(15, 23, 42, .055) !important;
    font-size: 12px !important;
    font-weight: 920 !important;
}

.side-nav .side-group[open] > summary,
.side-nav .side-group:has(.active) > summary,
.side-nav .side-management-group[open] > summary,
.side-nav .side-management-group:has(.active) > summary,
.side-nav .side-management-site[open] > summary,
.side-nav .side-management-inventory[open] > summary,
.side-nav .side-management-purchases[open] > summary,
.side-nav .side-management-costs[open] > summary,
.side-nav .side-finance-group[open] > summary {
    color: #fff !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 66%, transparent) !important;
    background:
        linear-gradient(135deg, var(--side-accent-dark, #0f2947), var(--side-accent, #2563eb)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 13px 26px color-mix(in srgb, var(--side-accent, #2563eb) 22%, transparent) !important;
}

.side-nav .side-group > summary svg,
.side-nav .side-management-group > summary svg,
.side-nav .side-group > summary .side-chevron,
.side-nav .side-management-group > summary .side-chevron {
    color: var(--side-accent, #2563eb) !important;
}

.side-nav .side-group[open] > summary svg,
.side-nav .side-group:has(.active) > summary svg,
.side-nav .side-management-group[open] > summary svg,
.side-nav .side-management-group:has(.active) > summary svg,
.side-nav .side-group[open] > summary .side-chevron,
.side-nav .side-group:has(.active) > summary .side-chevron,
.side-nav .side-management-group[open] > summary .side-chevron,
.side-nav .side-management-group:has(.active) > summary .side-chevron {
    color: #fff !important;
}

.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-management-link.costs,
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-site-branch .side-child-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    min-height: 35px !important;
    padding: 8px 9px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 20%, transparent) !important;
    border-radius: 10px !important;
    color: var(--side-text, #1e3a5f) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .80), rgba(255, 255, 255, .28)),
        color-mix(in srgb, var(--side-accent, #2563eb) 7%, #fff) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 5px 12px rgba(15, 23, 42, .025) !important;
    font-size: 11px !important;
    font-weight: 880 !important;
    line-height: 1.28 !important;
}

.side-nav .side-sub-link svg,
.side-nav .side-child-link svg,
.side-nav .side-management-link svg,
.side-nav .side-workspace-link svg,
.side-nav .side-resource-link svg {
    color: var(--side-accent, #2563eb) !important;
    width: 15.5px !important;
    height: 15.5px !important;
}

.side-nav .side-sub-link:hover,
.side-nav .side-child-link:hover,
.side-nav .side-management-link:hover,
.side-nav .side-workspace-link:hover,
.side-nav .side-resource-link:hover {
    color: var(--side-text, #1e3a5f) !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 42%, transparent) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .52)),
        color-mix(in srgb, var(--side-accent, #2563eb) 13%, #fff) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 10px 20px color-mix(in srgb, var(--side-accent, #2563eb) 14%, transparent) !important;
}

.side-nav .side-sub-link.active,
.side-nav .side-child-link.active,
.side-nav .side-management-link.active,
.side-nav .side-management-link.site.active,
.side-nav .side-management-link.inventory.active,
.side-nav .side-management-link.purchase.active,
.side-nav .side-management-link.costs.active,
.side-nav .side-workspace-link.active,
.side-nav .side-resource-link.active,
.side-nav .side-site-branch .side-child-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active {
    color: #fff !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 62%, transparent) !important;
    background:
        linear-gradient(135deg, var(--side-accent-dark, #0f2947), var(--side-accent, #2563eb)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 10px 20px color-mix(in srgb, var(--side-accent, #2563eb) 20%, transparent) !important;
}

.side-nav .side-sub-link.active svg,
.side-nav .side-child-link.active svg,
.side-nav .side-management-link.active svg,
.side-nav .side-workspace-link.active svg,
.side-nav .side-resource-link.active svg {
    color: #fff !important;
}

.side-nav .side-workspace-label,
.side-nav .side-workspace-label.site,
.side-nav .side-workspace-label.inventory {
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 22%, transparent) !important;
    border-radius: 10px !important;
    color: var(--side-text, #0f2947) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .34)),
        color-mix(in srgb, var(--side-accent, #2563eb) 9%, #fff) !important;
    font-size: 10.5px !important;
    font-weight: 950 !important;
}

.side-nav .side-workspace-link.muted,
.side-nav .side-sub-link.muted,
.side-nav .side-child-link.muted {
    opacity: .62 !important;
    filter: grayscale(.12);
    cursor: default;
}

/* Sidebar polish v3: stable scroll + cleaner executive visual style. */
.side-nav {
    height: calc(100vh - 36px) !important;
    min-height: 0 !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    border-radius: 14px !important;
    overflow: visible !important;
}

.side-nav nav {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-inline-end: 7px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 41, 71, .34) rgba(226, 232, 240, .58);
}

.side-nav nav::-webkit-scrollbar,
.side-quick-rail::-webkit-scrollbar {
    width: 7px;
}

.side-nav nav::-webkit-scrollbar-track,
.side-quick-rail::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, .56);
    border-radius: 999px;
}

.side-nav nav::-webkit-scrollbar-thumb,
.side-quick-rail::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0f2947, #0f766e);
    border-radius: 999px;
}

.side-quick-rail {
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
}

.side-nav .side-group,
.side-nav .side-management-group {
    padding: 6px !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.78), rgba(248,250,252,.52)) !important;
}

.side-nav .side-group > summary,
.side-nav .side-management-group > summary {
    min-height: 38px !important;
    font-size: 11.5px !important;
    letter-spacing: 0 !important;
}

.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-workspace-link,
.side-nav .side-resource-link {
    min-height: 32px !important;
    border-radius: 9px !important;
    font-size: 10.7px !important;
    font-weight: 860 !important;
}

.side-nav .side-discipline-workspace {
    margin-block: 6px 8px !important;
    padding: 8px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 13%, transparent) !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.76), rgba(248,250,252,.54)),
        color-mix(in srgb, var(--side-accent, #2563eb) 4%, #fff) !important;
}

.side-nav .side-workspace-links {
    gap: 6px !important;
}

.side-nav .side-workspace-label {
    min-height: 26px !important;
    padding: 5px 8px !important;
    margin-block: 4px 5px !important;
}

.side-nav .side-branch {
    gap: 6px !important;
}

.side-nav .side-branch::before {
    opacity: .75 !important;
}

/* Sidebar m5 reference skin: dark icon rail, white tree panel, precise scroll. */
.app-shell {
    grid-template-columns: 338px minmax(0, 1fr) !important;
}

html[dir="ltr"] .app-shell {
    grid-template-columns: 338px minmax(0, 1fr) !important;
}

.side-nav {
    height: calc(100vh - 28px) !important;
    max-height: calc(100vh - 28px) !important;
    min-height: 0 !important;
    top: 14px !important;
    padding: 0 !important;
    gap: 0 !important;
    grid-template-columns: 58px minmax(0, 280px) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12) !important;
    overflow: hidden !important;
}

.side-quick-rail {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    width: 58px !important;
    height: 100% !important;
    max-height: 100% !important;
    padding: 10px 7px !important;
    gap: 7px !important;
    align-content: start !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        linear-gradient(180deg, #07233d 0%, #061b31 52%, #041323 100%) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
}

.side-quick-rail::-webkit-scrollbar {
    display: none !important;
}

.side-quick-action {
    width: 42px !important;
    min-height: 42px !important;
    height: 42px !important;
    display: grid !important;
    grid-template-rows: 1fr !important;
    place-items: center !important;
    gap: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 10px !important;
    color: rgba(226, 232, 240, .88) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}

.side-quick-action svg {
    width: 19px !important;
    height: 19px !important;
}

.side-quick-caption {
    display: none !important;
    width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 9px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-quick-action:hover,
.side-quick-action.active {
    color: #fff !important;
    background: linear-gradient(180deg, #1268d3, #0b53b6) !important;
    box-shadow: 0 8px 16px rgba(2, 132, 199, .28), inset 0 1px 0 rgba(255,255,255,.18) !important;
    transform: none !important;
}

.side-quick-action::after {
    display: block !important;
    content: attr(title) !important;
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-start: calc(100% + 10px) !important;
    transform: translateY(-50%) scale(.96) !important;
    min-width: max-content !important;
    max-width: 220px !important;
    padding: 6px 8px !important;
    border: 1px solid rgba(15, 41, 71, .12) !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 14px 28px rgba(15, 23, 42, .16) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .14s ease, transform .14s ease !important;
    z-index: 30 !important;
}

html[dir="rtl"] .side-quick-action::after {
    inset-inline-start: auto !important;
    inset-inline-end: calc(100% + 10px) !important;
}

.side-quick-action:hover::after,
.side-quick-action:focus-visible::after {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1) !important;
}

.side-quick-action.danger {
    margin-block-start: auto !important;
    color: rgba(226, 232, 240, .88) !important;
}

.side-quick-action.danger:hover {
    background: linear-gradient(180deg, #334155, #0f172a) !important;
}

.side-quick-action::after {
    display: none !important;
}

.side-quick-action b {
    inset-block-start: 3px !important;
    inset-inline-end: 2px !important;
    min-width: 16px !important;
    height: 16px !important;
    border: 2px solid #07233d !important;
    font-size: 8px !important;
}

.side-brand,
.side-nav nav {
    grid-column: 2 !important;
    background: #fff !important;
}

.side-brand {
    grid-row: 1 !important;
    gap: 8px !important;
    padding: 10px 10px 8px !important;
    border-inline-end: 1px solid rgba(226, 232, 240, .8) !important;
}

.side-product-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
    align-items: center;
}

.side-product-head strong {
    display: block;
    color: #0f2947 !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.side-product-head small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 9.5px;
    font-weight: 850;
    line-height: 1.25;
}

.side-product-head button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
}

.side-product-head button svg {
    width: 15px;
    height: 15px;
}

.side-project-brand {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
    padding: 7px !important;
    border: 1px solid #e5edf5 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04) !important;
}

.side-project-brand::after {
    display: none !important;
}

.side-project-logo {
    width: 58px !important;
    min-height: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    border: 0 !important;
    background: #eef6fb !important;
}

.side-project-logo img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
}

.side-project-copy small {
    color: #16a34a !important;
    font-size: 9px !important;
}

.side-project-copy strong {
    color: #0f2947 !important;
    font-size: 11.5px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 2 !important;
}

.side-user-card {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    padding: 7px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
}

.side-user-card > span {
    width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #0f766e, #0ea5e9) !important;
}

.side-user-card strong {
    font-size: 11px !important;
}

.side-user-card small {
    color: #64748b !important;
    font-size: 9px !important;
}

.side-nav nav {
    grid-row: 2 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    padding: 7px 10px 12px !important;
    border-inline-end: 1px solid rgba(226, 232, 240, .8) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: #94a3b8 #f1f5f9 !important;
}

.side-nav nav::-webkit-scrollbar {
    width: 6px !important;
}

.side-nav nav::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
}

.side-nav nav::-webkit-scrollbar-thumb {
    background: #94a3b8 !important;
    border-radius: 999px !important;
}

.side-nav .side-group,
.side-nav .side-management-group {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.side-nav .side-group > summary,
.side-nav .side-management-group > summary {
    min-height: 32px !important;
    padding: 5px 4px !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #0f2947 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.side-nav .side-group > summary::before,
.side-nav .side-management-group > summary::before {
    display: none !important;
}

.side-nav .side-group > summary span,
.side-nav .side-management-group > summary span {
    gap: 7px !important;
}

.side-nav .side-group > summary span > svg,
.side-nav .side-management-group > summary span > svg {
    width: 23px !important;
    height: 23px !important;
    padding: 5px !important;
    border-radius: 7px !important;
    color: #fff !important;
    background: var(--side-accent, #2563eb) !important;
}

.side-nav .side-chevron {
    width: 14px !important;
    height: 14px !important;
    color: #64748b !important;
}

.side-branch,
.side-workspace-links,
.side-finance-links {
    position: relative !important;
    gap: 2px !important;
    margin-inline-start: 20px !important;
    padding-inline-start: 12px !important;
}

html[dir="rtl"] .side-branch,
html[dir="rtl"] .side-workspace-links,
html[dir="rtl"] .side-finance-links {
    margin-inline-start: 0 !important;
    margin-inline-end: 20px !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 12px !important;
}

.side-branch::before,
.side-workspace-links::before,
.side-finance-links::before {
    content: "" !important;
    position: absolute !important;
    inset-block: 0 7px !important;
    inset-inline-start: 0 !important;
    width: 1px !important;
    border-radius: 999px !important;
    background: #dbe4ee !important;
    opacity: 1 !important;
}

html[dir="rtl"] .side-branch::before,
html[dir="rtl"] .side-workspace-links::before,
html[dir="rtl"] .side-finance-links::before {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
}

.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-workspace-link,
.side-nav .side-resource-link {
    min-height: 27px !important;
    padding: 4px 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #526173 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10.2px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    position: relative !important;
}

.side-nav .side-sub-link::before,
.side-nav .side-child-link::before,
.side-nav .side-management-link::before,
.side-nav .side-workspace-link::before,
.side-nav .side-resource-link::before {
    content: "" !important;
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-start: -12px !important;
    width: 10px !important;
    height: 1px !important;
    background: #dbe4ee !important;
}

html[dir="rtl"] .side-nav .side-sub-link::before,
html[dir="rtl"] .side-nav .side-child-link::before,
html[dir="rtl"] .side-nav .side-management-link::before,
html[dir="rtl"] .side-nav .side-workspace-link::before,
html[dir="rtl"] .side-nav .side-resource-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: -12px !important;
}

.side-nav .side-sub-link svg,
.side-nav .side-child-link svg,
.side-nav .side-management-link svg,
.side-nav .side-workspace-link svg,
.side-nav .side-resource-link svg {
    width: 13px !important;
    height: 13px !important;
    color: #64748b !important;
}

.side-nav .side-sub-link:hover,
.side-nav .side-child-link:hover,
.side-nav .side-management-link:hover,
.side-nav .side-workspace-link:hover,
.side-nav .side-resource-link:hover {
    color: #0f2947 !important;
    background: #f6fafe !important;
    box-shadow: none !important;
    transform: none !important;
}

.side-nav .side-sub-link.active,
.side-nav .side-child-link.active,
.side-nav .side-management-link.active,
.side-nav .side-workspace-link.active,
.side-nav .side-resource-link.active {
    color: #0f2947 !important;
    background: #eef8fb !important;
    border-inline-start: 3px solid var(--side-accent, #0ea5e9) !important;
    border-radius: 0 7px 7px 0 !important;
    box-shadow: none !important;
}

html[dir="rtl"] .side-nav .side-sub-link.active,
html[dir="rtl"] .side-nav .side-child-link.active,
html[dir="rtl"] .side-nav .side-management-link.active,
html[dir="rtl"] .side-nav .side-workspace-link.active,
html[dir="rtl"] .side-nav .side-resource-link.active {
    border-inline-start: 0 !important;
    border-inline-end: 3px solid var(--side-accent, #0ea5e9) !important;
    border-radius: 7px 0 0 7px !important;
}

.side-nav .side-sub-link.active::after,
.side-nav .side-child-link.active::after,
.side-nav .side-management-link.active::after,
.side-nav .side-workspace-link.active::after,
.side-nav .side-resource-link.active::after {
    content: "" !important;
    position: absolute !important;
    inset-inline-end: 8px !important;
    inset-block-start: 50% !important;
    width: 6px !important;
    height: 6px !important;
    border-radius: 999px !important;
    background: var(--side-accent, #0ea5e9) !important;
    transform: translateY(-50%) !important;
}

html[dir="rtl"] .side-nav .side-sub-link.active::after,
html[dir="rtl"] .side-nav .side-child-link.active::after,
html[dir="rtl"] .side-nav .side-management-link.active::after,
html[dir="rtl"] .side-nav .side-workspace-link.active::after,
html[dir="rtl"] .side-nav .side-resource-link.active::after {
    inset-inline-end: auto !important;
    inset-inline-start: 8px !important;
}

.side-nav .side-sub-link.active svg,
.side-nav .side-child-link.active svg,
.side-nav .side-management-link.active svg,
.side-nav .side-workspace-link.active svg,
.side-nav .side-resource-link.active svg {
    color: var(--side-accent, #0ea5e9) !important;
}

.side-nav .side-discipline-workspace {
    margin: 2px 0 7px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.side-nav .side-workspace-label {
    min-height: 22px !important;
    margin: 4px 0 2px !important;
    padding: 4px 6px !important;
    border: 0 !important;
    border-radius: 6px !important;
    color: #0f2947 !important;
    background: #f8fafc !important;
    font-size: 9.5px !important;
    font-weight: 950 !important;
}

.side-management-technical { --side-accent: #0ea5a3; }
.side-management-site,
.side-site-branch,
.side-site-discipline-workspace { --side-accent: #0ea5a3; }
.side-management-inventory { --side-accent: #f97316; }
.side-management-purchases { --side-accent: #f59e0b; }
.side-finance-group { --side-accent: #2563eb; }

/* Force all management branches to the same m5 tree style; only accent colors differ. */
.side-nav .side-management-group.side-management-site > summary,
.side-nav .side-management-group.side-management-inventory > summary,
.side-nav .side-management-group.side-management-purchases > summary {
    min-height: 32px !important;
    padding: 5px 4px !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #0f2947 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.side-nav .side-management-group.side-management-site[open] > summary,
.side-nav .side-management-group.side-management-inventory[open] > summary,
.side-nav .side-management-group.side-management-purchases[open] > summary,
.side-nav .side-management-group.side-management-site:has(.active) > summary,
.side-nav .side-management-group.side-management-inventory:has(.active) > summary,
.side-nav .side-management-group.side-management-purchases:has(.active) > summary {
    color: #0f2947 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.side-nav .side-management-group.side-management-site > summary span > svg,
.side-nav .side-management-group.side-management-inventory > summary span > svg,
.side-nav .side-management-group.side-management-purchases > summary span > svg {
    width: 23px !important;
    height: 23px !important;
    padding: 5px !important;
    border-radius: 7px !important;
    color: #fff !important;
    background: var(--side-accent) !important;
}

.side-nav .side-management-group.side-management-site > summary .side-chevron,
.side-nav .side-management-group.side-management-inventory > summary .side-chevron,
.side-nav .side-management-group.side-management-purchases > summary .side-chevron,
.side-nav .side-management-group.side-management-site[open] > summary .side-chevron,
.side-nav .side-management-group.side-management-inventory[open] > summary .side-chevron,
.side-nav .side-management-group.side-management-purchases[open] > summary .side-chevron {
    color: #64748b !important;
}

.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-site-branch .side-child-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    min-height: 27px !important;
    padding: 4px 7px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #526173 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10.2px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    position: relative !important;
}

.side-nav .side-management-link.site svg,
.side-nav .side-management-link.inventory svg,
.side-nav .side-management-link.purchase svg,
.side-nav .side-site-branch .side-child-link svg,
.side-nav .side-site-discipline-workspace .side-workspace-link svg,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue svg {
    width: 13px !important;
    height: 13px !important;
    color: #64748b !important;
}

.side-nav .side-management-link.site:hover,
.side-nav .side-management-link.inventory:hover,
.side-nav .side-management-link.purchase:hover,
.side-nav .side-site-branch .side-child-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue:hover {
    color: #0f2947 !important;
    background: #f6fafe !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.side-nav .side-management-link.site.active,
.side-nav .side-management-link.inventory.active,
.side-nav .side-management-link.purchase.active,
.side-nav .side-site-branch .side-child-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active {
    color: #0f2947 !important;
    background: #eef8fb !important;
    border: 0 !important;
    border-inline-start: 3px solid var(--side-accent) !important;
    border-radius: 0 7px 7px 0 !important;
    box-shadow: none !important;
}

html[dir="rtl"] .side-nav .side-management-link.site.active,
html[dir="rtl"] .side-nav .side-management-link.inventory.active,
html[dir="rtl"] .side-nav .side-management-link.purchase.active,
html[dir="rtl"] .side-nav .side-site-branch .side-child-link.active,
html[dir="rtl"] .side-nav .side-site-discipline-workspace .side-workspace-link.active,
html[dir="rtl"] .side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active {
    border-inline-start: 0 !important;
    border-inline-end: 3px solid var(--side-accent) !important;
    border-radius: 7px 0 0 7px !important;
}

.side-nav .side-management-link.site.active svg,
.side-nav .side-management-link.inventory.active svg,
.side-nav .side-management-link.purchase.active svg,
.side-nav .side-site-branch .side-child-link.active svg,
.side-nav .side-site-discipline-workspace .side-workspace-link.active svg,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active svg {
    color: var(--side-accent) !important;
}

/* Sidebar contrast pass: clearer buttons without returning to heavy cards. */
.side-nav nav {
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.side-nav .side-group > summary,
.side-nav .side-management-group > summary {
    background:
        linear-gradient(180deg, #ffffff, #f3f8fc) !important;
    border: 1px solid #dbe7f1 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        0 3px 8px rgba(15, 23, 42, .045) !important;
}

.side-nav .side-group > summary:hover,
.side-nav .side-management-group > summary:hover {
    background:
        linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--side-accent, #0ea5a3) 12%, #f3f8fc)) !important;
    border-color: color-mix(in srgb, var(--side-accent, #0ea5a3) 32%, #dbe7f1) !important;
}

.side-nav .side-group[open] > summary,
.side-nav .side-group:has(.active) > summary,
.side-nav .side-management-group[open] > summary,
.side-nav .side-management-group:has(.active) > summary,
.side-nav .side-management-group.side-management-site[open] > summary,
.side-nav .side-management-group.side-management-inventory[open] > summary,
.side-nav .side-management-group.side-management-purchases[open] > summary,
.side-nav .side-management-group.side-management-site:has(.active) > summary,
.side-nav .side-management-group.side-management-inventory:has(.active) > summary,
.side-nav .side-management-group.side-management-purchases:has(.active) > summary {
    color: #0b243f !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #0ea5a3) 17%, #ffffff), color-mix(in srgb, var(--side-accent, #0ea5a3) 12%, #eef6fb)) !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #0ea5a3) 42%, #dbe7f1) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.92),
        0 5px 12px color-mix(in srgb, var(--side-accent, #0ea5a3) 16%, transparent) !important;
}

.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-site-branch .side-child-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    margin-block: 1px !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    color: #334155 !important;
    background: #f8fbfd !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.86) !important;
}

.side-nav .side-sub-link:hover,
.side-nav .side-child-link:hover,
.side-nav .side-management-link:hover,
.side-nav .side-management-link.site:hover,
.side-nav .side-management-link.inventory:hover,
.side-nav .side-management-link.purchase:hover,
.side-nav .side-workspace-link:hover,
.side-nav .side-resource-link:hover,
.side-nav .side-site-branch .side-child-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue:hover {
    border-color: color-mix(in srgb, var(--side-accent, #0ea5a3) 24%, #dbe7f1) !important;
    color: #0f2947 !important;
    background:
        linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--side-accent, #0ea5a3) 9%, #f7fbfd)) !important;
}

.side-nav .side-sub-link.active,
.side-nav .side-child-link.active,
.side-nav .side-management-link.active,
.side-nav .side-management-link.site.active,
.side-nav .side-management-link.inventory.active,
.side-nav .side-management-link.purchase.active,
.side-nav .side-workspace-link.active,
.side-nav .side-resource-link.active,
.side-nav .side-site-branch .side-child-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active {
    color: #082f49 !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #0ea5a3) 35%, #dbe7f1) !important;
    border-inline-start: 3px solid var(--side-accent, #0ea5a3) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #0ea5a3) 15%, #ffffff), color-mix(in srgb, var(--side-accent, #0ea5a3) 10%, #eef8fb)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 4px 10px color-mix(in srgb, var(--side-accent, #0ea5a3) 13%, transparent) !important;
}

html[dir="rtl"] .side-nav .side-sub-link.active,
html[dir="rtl"] .side-nav .side-child-link.active,
html[dir="rtl"] .side-nav .side-management-link.active,
html[dir="rtl"] .side-nav .side-management-link.site.active,
html[dir="rtl"] .side-nav .side-management-link.inventory.active,
html[dir="rtl"] .side-nav .side-management-link.purchase.active,
html[dir="rtl"] .side-nav .side-workspace-link.active,
html[dir="rtl"] .side-nav .side-resource-link.active,
html[dir="rtl"] .side-nav .side-site-branch .side-child-link.active,
html[dir="rtl"] .side-nav .side-site-discipline-workspace .side-workspace-link.active,
html[dir="rtl"] .side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active {
    border-inline-start: 1px solid color-mix(in srgb, var(--side-accent, #0ea5a3) 35%, #dbe7f1) !important;
    border-inline-end: 3px solid var(--side-accent, #0ea5a3) !important;
}

.side-nav .side-branch::before,
.side-nav .side-workspace-links::before,
.side-nav .side-finance-links::before {
    background: #b8c7d6 !important;
}

.side-quick-action.danger {
    color: #fff !important;
    background:
        linear-gradient(180deg, rgba(239, 68, 68, .92), rgba(185, 28, 28, .95)) !important;
    box-shadow:
        0 8px 16px rgba(220, 38, 38, .28),
        inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

.side-quick-action.danger svg,
.side-quick-action.danger .side-quick-caption {
    color: #fff !important;
}

.side-quick-action.danger:hover,
.side-quick-action.danger:focus-visible {
    background:
        linear-gradient(180deg, #dc2626, #7f1d1d) !important;
    box-shadow:
        0 10px 20px rgba(220, 38, 38, .38),
        inset 0 1px 0 rgba(255, 255, 255, .2) !important;
}

/* Sidebar tree color audit: children inherit their owning branch color. */
.side-nav .side-management-technical,
.side-nav .side-management-technical .side-branch,
.side-nav .side-management-technical .side-discipline-workspace,
.side-nav .side-management-technical .side-workspace-links,
.side-nav .side-management-technical .side-workspace-label,
.side-nav .side-management-technical .side-sub-link,
.side-nav .side-management-technical .side-child-link,
.side-nav .side-management-technical .side-workspace-link {
    --side-accent: #2563eb !important;
    --side-accent-soft: #eaf2ff;
}

.side-nav .side-management-site,
.side-nav .side-management-site .side-branch,
.side-nav .side-management-site .side-discipline-workspace,
.side-nav .side-management-site .side-workspace-links,
.side-nav .side-management-site .side-workspace-label,
.side-nav .side-management-site .side-management-link,
.side-nav .side-management-site .side-child-link,
.side-nav .side-management-site .side-workspace-link,
.side-nav .side-management-site .side-workspace-link.site-inventory-issue {
    --side-accent: #0f766e !important;
    --side-accent-soft: #e8f7f4;
}

.side-nav .side-management-inventory,
.side-nav .side-management-inventory .side-management-link {
    --side-accent: #f97316 !important;
    --side-accent-soft: #fff3e8;
}

.side-nav .side-management-purchases,
.side-nav .side-management-purchases .side-management-link {
    --side-accent: #d97706 !important;
    --side-accent-soft: #fff7e6;
}

.side-nav .side-finance-group,
.side-nav .side-finance-group .side-finance-links,
.side-nav .side-finance-group .side-sub-link {
    --side-accent: #b7791f !important;
    --side-accent-soft: #fff7e6;
}

.side-nav .side-branch,
.side-nav .side-workspace-links,
.side-nav .side-finance-links {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--side-accent, #2563eb) 7%, transparent), transparent 58%) !important;
    border-radius: 8px !important;
}

html[dir="rtl"] .side-nav .side-branch,
html[dir="rtl"] .side-nav .side-workspace-links,
html[dir="rtl"] .side-nav .side-finance-links {
    background:
        linear-gradient(270deg, color-mix(in srgb, var(--side-accent, #2563eb) 7%, transparent), transparent 58%) !important;
}

.side-nav .side-branch::before,
.side-nav .side-workspace-links::before,
.side-nav .side-finance-links::before {
    width: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 42%, #cbd5e1) !important;
}

.side-nav .side-sub-link::before,
.side-nav .side-child-link::before,
.side-nav .side-management-link::before,
.side-nav .side-workspace-link::before,
.side-nav .side-resource-link::before {
    height: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 38%, #cbd5e1) !important;
}

.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-site-branch .side-child-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    background: color-mix(in srgb, var(--side-accent-soft, #f8fbfd) 76%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 11%, #e2e8f0) !important;
}

.side-nav .side-sub-link svg,
.side-nav .side-child-link svg,
.side-nav .side-management-link svg,
.side-nav .side-workspace-link svg,
.side-nav .side-resource-link svg {
    color: color-mix(in srgb, var(--side-accent, #2563eb) 68%, #475569) !important;
}

.side-nav .side-workspace-label,
.side-nav .side-workspace-label.site,
.side-nav .side-workspace-label.inventory {
    color: color-mix(in srgb, var(--side-accent, #2563eb) 72%, #0f2947) !important;
    background: color-mix(in srgb, var(--side-accent-soft, #f8fbfd) 82%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 16%, #e2e8f0) !important;
}

/* Discipline nodes are parent-level rows; nested workspace links stay visually smaller. */
.side-nav .side-branch {
    margin-inline-start: 0 !important;
    padding-inline-start: 0 !important;
}

html[dir="rtl"] .side-nav .side-branch {
    margin-inline-end: 0 !important;
    padding-inline-end: 0 !important;
}

.side-nav .side-branch::before {
    display: none !important;
}

.side-nav .side-discipline-link,
.side-nav .side-site-branch .side-discipline-link {
    width: 100% !important;
    min-height: 31px !important;
    padding: 5px 8px !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--side-accent-soft, #f8fbfd) 84%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 18%, #dbe7f1) !important;
    font-size: 10.7px !important;
    font-weight: 920 !important;
}

.side-nav .side-discipline-link::before,
.side-nav .side-site-branch .side-discipline-link::before {
    display: none !important;
}

.side-nav .side-discipline-link.active,
.side-nav .side-site-branch .side-discipline-link.active {
    border-inline-start: 3px solid var(--side-accent, #2563eb) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #2563eb) 15%, #fff), color-mix(in srgb, var(--side-accent, #2563eb) 9%, #eef8fb)) !important;
}

html[dir="rtl"] .side-nav .side-discipline-link.active,
html[dir="rtl"] .side-nav .side-site-branch .side-discipline-link.active {
    border-inline-start: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 18%, #dbe7f1) !important;
    border-inline-end: 3px solid var(--side-accent, #2563eb) !important;
}

.side-nav .side-discipline-workspace {
    margin-inline-start: 18px !important;
}

html[dir="rtl"] .side-nav .side-discipline-workspace {
    margin-inline-start: 0 !important;
    margin-inline-end: 18px !important;
}

/* Sidebar hierarchy normalizer: identical level sizing across all branches. */
.side-nav {
    --tree-l1-height: 34px;
    --tree-l2-height: 31px;
    --tree-l3-height: 28px;
    --tree-l4-height: 26px;
    --tree-indent: 18px;
    --tree-line: #9fb2c6;
}

.side-nav nav {
    gap: 7px !important;
}

.side-nav .side-group,
.side-nav .side-management-group {
    display: grid !important;
    gap: 5px !important;
}

/* L1: main management headers. */
.side-nav .side-group > summary,
.side-nav .side-management-group > summary,
.side-nav .side-management-group.side-management-site > summary,
.side-nav .side-management-group.side-management-inventory > summary,
.side-nav .side-management-group.side-management-purchases > summary,
.side-nav .side-finance-group > summary {
    width: 100% !important;
    min-height: var(--tree-l1-height) !important;
    height: var(--tree-l1-height) !important;
    padding: 5px 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}

.side-nav .side-group > summary span,
.side-nav .side-management-group > summary span,
.side-nav .side-finance-group > summary span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* L2: direct links and discipline parent rows. */
.side-nav .side-sub-link,
.side-nav .side-management-link,
.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-discipline-link,
.side-nav .side-site-branch .side-discipline-link {
    width: 100% !important;
    min-height: var(--tree-l2-height) !important;
    height: var(--tree-l2-height) !important;
    padding: 5px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    box-sizing: border-box !important;
}

/* L3: labels inside an opened discipline. */
.side-nav .side-workspace-label,
.side-nav .side-workspace-label.site,
.side-nav .side-workspace-label.inventory {
    width: 100% !important;
    min-height: var(--tree-l3-height) !important;
    height: var(--tree-l3-height) !important;
    padding: 5px 7px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    box-sizing: border-box !important;
}

/* L4: inner workspace links. */
.side-nav .side-child-link:not(.side-discipline-link),
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue {
    width: 100% !important;
    min-height: var(--tree-l4-height) !important;
    height: var(--tree-l4-height) !important;
    padding: 4px 7px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
}

.side-nav .side-sub-link span,
.side-nav .side-child-link span,
.side-nav .side-management-link span,
.side-nav .side-workspace-link span,
.side-nav .side-resource-link span,
.side-nav .side-workspace-label span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.side-nav .side-sub-link svg,
.side-nav .side-child-link svg,
.side-nav .side-management-link svg,
.side-nav .side-workspace-link svg,
.side-nav .side-resource-link svg,
.side-nav .side-workspace-label svg {
    flex: 0 0 auto !important;
}

/* Tree lanes: one clear trunk for each nested level. */
.side-nav .side-branch,
.side-nav .side-workspace-links,
.side-nav .side-finance-links {
    margin-block: 2px 4px !important;
    margin-inline-start: var(--tree-indent) !important;
    padding-inline-start: 14px !important;
    gap: 4px !important;
    border-radius: 0 !important;
    background: transparent !important;
}

html[dir="rtl"] .side-nav .side-branch,
html[dir="rtl"] .side-nav .side-workspace-links,
html[dir="rtl"] .side-nav .side-finance-links {
    margin-inline-start: 0 !important;
    margin-inline-end: var(--tree-indent) !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 14px !important;
}

.side-nav .side-branch::before,
.side-nav .side-workspace-links::before,
.side-nav .side-finance-links::before {
    display: block !important;
    inset-block: 0 5px !important;
    inset-inline-start: 0 !important;
    width: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, var(--tree-line)) !important;
    opacity: 1 !important;
}

html[dir="rtl"] .side-nav .side-branch::before,
html[dir="rtl"] .side-nav .side-workspace-links::before,
html[dir="rtl"] .side-nav .side-finance-links::before {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
}

.side-nav .side-sub-link::before,
.side-nav .side-child-link::before,
.side-nav .side-management-link::before,
.side-nav .side-workspace-link::before,
.side-nav .side-resource-link::before {
    display: block !important;
    inset-block-start: 50% !important;
    inset-inline-start: -14px !important;
    width: 12px !important;
    height: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, var(--tree-line)) !important;
    opacity: 1 !important;
}

html[dir="rtl"] .side-nav .side-sub-link::before,
html[dir="rtl"] .side-nav .side-child-link::before,
html[dir="rtl"] .side-nav .side-management-link::before,
html[dir="rtl"] .side-nav .side-workspace-link::before,
html[dir="rtl"] .side-nav .side-resource-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: -14px !important;
}

/* Parent discipline rows are not leaf branches, so they do not draw a connector. */
.side-nav .side-discipline-link::before,
.side-nav .side-site-branch .side-discipline-link::before {
    display: none !important;
}

.side-nav .side-discipline-workspace {
    margin-block: 4px 7px !important;
    margin-inline-start: calc(var(--tree-indent) + 4px) !important;
    padding-inline-start: 12px !important;
    position: relative !important;
}

html[dir="rtl"] .side-nav .side-discipline-workspace {
    margin-inline-start: 0 !important;
    margin-inline-end: calc(var(--tree-indent) + 4px) !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 12px !important;
}

.side-nav .side-discipline-workspace::before {
    content: "" !important;
    position: absolute !important;
    inset-block: 0 5px !important;
    inset-inline-start: 0 !important;
    width: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 45%, var(--tree-line)) !important;
}

html[dir="rtl"] .side-nav .side-discipline-workspace::before {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
}

.side-nav .side-workspace-label::before {
    content: "" !important;
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-start: -12px !important;
    width: 10px !important;
    height: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 45%, var(--tree-line)) !important;
}

html[dir="rtl"] .side-nav .side-workspace-label::before {
    inset-inline-start: auto !important;
    inset-inline-end: -12px !important;
}

.side-nav .side-workspace-label {
    position: relative !important;
}

/* Inventory and purchasing direct children align with discipline parent rows. */
.side-nav .side-management-inventory > .side-management-link,
.side-nav .side-management-purchases > .side-management-link {
    width: calc(100% - var(--tree-indent)) !important;
    min-height: var(--tree-l2-height) !important;
    height: var(--tree-l2-height) !important;
    margin-block: 4px !important;
    margin-inline-start: var(--tree-indent) !important;
    padding: 5px 8px !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--side-accent-soft, #f8fbfd) 84%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 18%, #dbe7f1) !important;
    font-size: 10.7px !important;
    font-weight: 920 !important;
    position: relative !important;
}

.side-nav .side-management-inventory > .side-management-link::before,
.side-nav .side-management-purchases > .side-management-link::before {
    display: block !important;
    inset-block-start: 50% !important;
    inset-inline-start: calc(-1 * var(--tree-indent)) !important;
    width: calc(var(--tree-indent) - 6px) !important;
    height: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, var(--tree-line)) !important;
}

html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link {
    margin-inline-start: 0 !important;
    margin-inline-end: var(--tree-indent) !important;
}

html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link::before,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: calc(-1 * var(--tree-indent)) !important;
}

.side-nav .side-management-inventory,
.side-nav .side-management-purchases {
    position: relative !important;
}

.side-nav .side-management-inventory::after,
.side-nav .side-management-purchases::after {
    content: "" !important;
    position: absolute !important;
    inset-block-start: 39px !important;
    inset-block-end: 8px !important;
    inset-inline-start: 7px !important;
    width: 2px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, var(--tree-line)) !important;
    border-radius: 999px !important;
}

html[dir="rtl"] .side-nav .side-management-inventory::after,
html[dir="rtl"] .side-nav .side-management-purchases::after {
    inset-inline-start: auto !important;
    inset-inline-end: 7px !important;
}

/* Project card image spans the full card; project name sits below it. */
.side-project-brand {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    padding: 8px !important;
    align-items: start !important;
    overflow: hidden !important;
}

.side-project-logo {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    height: 78px !important;
    padding: 7px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.side-project-logo img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    margin: auto !important;
}

.side-project-copy {
    text-align: center !important;
    position: relative !important;
    z-index: 2 !important;
    display: grid !important;
    gap: 3px !important;
    padding-block-start: 2px !important;
    background: #fff !important;
}

.side-project-copy small {
    justify-content: center !important;
}

.side-project-copy strong {
    display: block !important;
    font-size: 12px !important;
    -webkit-line-clamp: 2 !important;
}

/* Closed management headers keep their branch accent color. */
.side-nav .side-management-site > summary,
.side-nav .side-management-purchases > summary {
    color: #fff !important;
    border-color: color-mix(in srgb, var(--side-accent, #0f766e) 60%, transparent) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #0f766e) 88%, #ffffff), var(--side-accent, #0f766e)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 5px 12px color-mix(in srgb, var(--side-accent, #0f766e) 20%, transparent) !important;
}

.side-nav .side-management-site > summary .side-chevron,
.side-nav .side-management-purchases > summary .side-chevron {
    color: rgba(255,255,255,.88) !important;
}

.side-nav .side-management-site > summary span > svg,
.side-nav .side-management-purchases > summary span > svg {
    color: #fff !important;
    background: rgba(255,255,255,.18) !important;
}

/* Inventory and purchasing tree lines match the rest of the sidebar hierarchy. */
.side-nav .side-management-inventory::after,
.side-nav .side-management-purchases::after {
    inset-block-start: calc(var(--tree-l1-height) + 7px) !important;
    inset-block-end: 10px !important;
    inset-inline-start: 8px !important;
    background: color-mix(in srgb, var(--side-accent, #f97316) 52%, var(--tree-line)) !important;
}

html[dir="rtl"] .side-nav .side-management-inventory::after,
html[dir="rtl"] .side-nav .side-management-purchases::after {
    inset-inline-start: auto !important;
    inset-inline-end: 8px !important;
}

.side-nav .side-management-inventory > .side-management-link::before,
.side-nav .side-management-purchases > .side-management-link::before {
    inset-inline-start: calc(-1 * var(--tree-indent) + 8px) !important;
    width: calc(var(--tree-indent) - 8px) !important;
}

html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link::before,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: calc(-1 * var(--tree-indent) + 8px) !important;
}

.side-nav .side-management-inventory > .side-management-link.active,
.side-nav .side-management-purchases > .side-management-link.active {
    border-inline-start: 3px solid var(--side-accent, #2563eb) !important;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #2563eb) 15%, #fff), color-mix(in srgb, var(--side-accent, #2563eb) 9%, #eef8fb)) !important;
}

html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link.active,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link.active {
    border-inline-start: 1px solid color-mix(in srgb, var(--side-accent, #2563eb) 18%, #dbe7f1) !important;
    border-inline-end: 3px solid var(--side-accent, #2563eb) !important;
}

/* Final exact override for closed colored management headers. */
.side-nav details.side-management-group.side-management-site > summary,
.side-nav details.side-management-group.side-management-site[open] > summary,
.side-nav details.side-management-group.side-management-site:has(.active) > summary {
    --side-accent: #0f766e !important;
    color: #fff !important;
    border: 1px solid rgba(15, 118, 110, .45) !important;
    background:
        linear-gradient(180deg, #13947f 0%, #0f766e 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(15, 118, 110, .22) !important;
}

.side-nav details.side-management-group.side-management-purchases > summary,
.side-nav details.side-management-group.side-management-purchases[open] > summary,
.side-nav details.side-management-group.side-management-purchases:has(.active) > summary {
    --side-accent: #8b5cf6 !important;
    color: #fff !important;
    border: 1px solid rgba(139, 92, 246, .46) !important;
    background:
        linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(124, 58, 237, .22) !important;
}

.side-nav details.side-management-group.side-management-site > summary span > svg,
.side-nav details.side-management-group.side-management-site[open] > summary span > svg,
.side-nav details.side-management-group.side-management-purchases > summary span > svg,
.side-nav details.side-management-group.side-management-purchases[open] > summary span > svg {
    color: #fff !important;
    background: rgba(255,255,255,.18) !important;
}

.side-nav details.side-management-group.side-management-site > summary .side-chevron,
.side-nav details.side-management-group.side-management-site[open] > summary .side-chevron,
.side-nav details.side-management-group.side-management-purchases > summary .side-chevron,
.side-nav details.side-management-group.side-management-purchases[open] > summary .side-chevron {
    color: rgba(255,255,255,.9) !important;
}

/* Solid main management buttons for all primary departments. */
.side-nav details.side-management-group.side-management-technical > summary,
.side-nav details.side-management-group.side-management-technical[open] > summary,
.side-nav details.side-management-group.side-management-technical:has(.active) > summary {
    --side-accent: #2563eb !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    background:
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(37, 99, 235, .22) !important;
}

.side-nav details.side-management-group.side-management-inventory > summary,
.side-nav details.side-management-group.side-management-inventory[open] > summary,
.side-nav details.side-management-group.side-management-inventory:has(.active) > summary {
    --side-accent: #f97316 !important;
    color: #fff !important;
    border: 1px solid rgba(249, 115, 22, .46) !important;
    background:
        linear-gradient(180deg, #fb923c 0%, #f97316 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(249, 115, 22, .22) !important;
}

.side-nav details.side-management-group.side-management-technical > summary span > svg,
.side-nav details.side-management-group.side-management-technical[open] > summary span > svg,
.side-nav details.side-management-group.side-management-inventory > summary span > svg,
.side-nav details.side-management-group.side-management-inventory[open] > summary span > svg {
    color: #fff !important;
    background: rgba(255,255,255,.18) !important;
}

.side-nav details.side-management-group.side-management-technical > summary .side-chevron,
.side-nav details.side-management-group.side-management-technical[open] > summary .side-chevron,
.side-nav details.side-management-group.side-management-inventory > summary .side-chevron,
.side-nav details.side-management-group.side-management-inventory[open] > summary .side-chevron {
    color: rgba(255,255,255,.9) !important;
}

/* Solid primary rows: projects, project gateway, and all management headers. */
.side-nav .side-group-projects > summary,
.side-nav .side-group-projects[open] > summary,
.side-nav .side-group-projects:has(.active) > summary {
    --side-accent: #0f2947 !important;
    min-height: 41px !important;
    height: 41px !important;
    color: #fff !important;
    border: 1px solid rgba(15, 41, 71, .48) !important;
    background:
        linear-gradient(180deg, #173e67 0%, #0f2947 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 6px 14px rgba(15, 41, 71, .22) !important;
    font-size: 12.2px !important;
    font-weight: 950 !important;
}

.side-nav .side-project-hub-link {
    --side-accent: #0891b2 !important;
    width: 100% !important;
    min-height: 37px !important;
    height: 37px !important;
    color: #fff !important;
    border: 1px solid rgba(8, 145, 178, .44) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, #22d3ee 0%, #0891b2 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 5px 12px rgba(8, 145, 178, .20) !important;
    font-size: 11.5px !important;
    font-weight: 940 !important;
}

.side-nav .side-project-hub-link svg,
.side-nav .side-project-hub-link.active svg {
    color: #fff !important;
}

.side-nav .side-project-hub-link::before,
.side-nav .side-project-hub-link::after {
    display: none !important;
}

.side-nav details.side-management-group.side-management-technical > summary,
.side-nav details.side-management-group.side-management-site > summary,
.side-nav details.side-management-group.side-management-inventory > summary,
.side-nav details.side-management-group.side-management-purchases > summary,
.side-nav details.side-management-group.side-management-technical[open] > summary,
.side-nav details.side-management-group.side-management-site[open] > summary,
.side-nav details.side-management-group.side-management-inventory[open] > summary,
.side-nav details.side-management-group.side-management-purchases[open] > summary,
.side-nav details.side-management-group.side-management-technical:has(.active) > summary,
.side-nav details.side-management-group.side-management-site:has(.active) > summary,
.side-nav details.side-management-group.side-management-inventory:has(.active) > summary,
.side-nav details.side-management-group.side-management-purchases:has(.active) > summary {
    min-height: 41px !important;
    height: 41px !important;
    font-size: 12.2px !important;
    font-weight: 950 !important;
}

.side-nav .side-group-projects > summary span > svg,
.side-nav .side-group-projects[open] > summary span > svg {
    color: #fff !important;
    background: rgba(255,255,255,.18) !important;
}

.side-nav .side-group-projects > summary .side-chevron,
.side-nav .side-group-projects[open] > summary .side-chevron {
    color: rgba(255,255,255,.9) !important;
}

/* Sub-buttons below solid headers: slightly stronger tint for readability. */
.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-management-link.site,
.side-nav .side-management-link.inventory,
.side-nav .side-management-link.purchase,
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-site-branch .side-child-link,
.side-nav .side-site-discipline-workspace .side-workspace-link,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue,
.side-nav .side-management-inventory > .side-management-link,
.side-nav .side-management-purchases > .side-management-link {
    background: color-mix(in srgb, var(--side-accent, #2563eb) 12%, #fff) !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 22%, #e2e8f0) !important;
}

.side-nav .side-sub-link:hover,
.side-nav .side-child-link:hover,
.side-nav .side-management-link:hover,
.side-nav .side-management-link.site:hover,
.side-nav .side-management-link.inventory:hover,
.side-nav .side-management-link.purchase:hover,
.side-nav .side-workspace-link:hover,
.side-nav .side-resource-link:hover,
.side-nav .side-site-branch .side-child-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link:hover,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue:hover {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #2563eb) 18%, #fff), color-mix(in srgb, var(--side-accent, #2563eb) 13%, #f8fbfd)) !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 30%, #dbe7f1) !important;
}

.side-nav .side-sub-link.active,
.side-nav .side-child-link.active,
.side-nav .side-management-link.active,
.side-nav .side-management-link.site.active,
.side-nav .side-management-link.inventory.active,
.side-nav .side-management-link.purchase.active,
.side-nav .side-workspace-link.active,
.side-nav .side-resource-link.active,
.side-nav .side-site-branch .side-child-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.active,
.side-nav .side-site-discipline-workspace .side-workspace-link.site-inventory-issue.active,
.side-nav .side-management-inventory > .side-management-link.active,
.side-nav .side-management-purchases > .side-management-link.active {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--side-accent, #2563eb) 24%, #fff), color-mix(in srgb, var(--side-accent, #2563eb) 17%, #eef8fb)) !important;
    border-color: color-mix(in srgb, var(--side-accent, #2563eb) 38%, #dbe7f1) !important;
}

/* Project gateway is always a readable solid button. */
.side-nav a.side-sub-link.side-project-hub-link,
.side-nav a.side-sub-link.side-project-hub-link.active,
.side-nav a.side-sub-link.side-project-hub-link:hover,
.side-nav a.side-sub-link.side-project-hub-link:focus-visible {
    --side-accent: #0891b2 !important;
    width: 100% !important;
    min-height: 37px !important;
    height: 37px !important;
    color: #fff !important;
    border: 1px solid rgba(8, 145, 178, .44) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, #22d3ee 0%, #0891b2 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 5px 12px rgba(8, 145, 178, .20) !important;
    font-size: 11.5px !important;
    font-weight: 940 !important;
}

.side-nav a.side-sub-link.side-project-hub-link span,
.side-nav a.side-sub-link.side-project-hub-link.active span,
.side-nav a.side-sub-link.side-project-hub-link:hover span {
    color: #fff !important;
}

.side-nav a.side-sub-link.side-project-hub-link svg,
.side-nav a.side-sub-link.side-project-hub-link.active svg,
.side-nav a.side-sub-link.side-project-hub-link:hover svg {
    color: #fff !important;
}

.side-nav a.side-sub-link.side-project-hub-link::before,
.side-nav a.side-sub-link.side-project-hub-link::after {
    display: none !important;
}

/* Align main department icons and labels on one consistent starting axis. */
.side-nav .side-management-group > summary span,
.side-nav .side-group-projects > summary span {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-width: 0 !important;
}

.side-nav .side-management-group > summary span > svg,
.side-nav .side-group-projects > summary span > svg {
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;
}

.side-nav .side-management-group > summary span > :not(svg),
.side-nav .side-group-projects > summary span > :not(svg) {
    grid-column: 2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Align the vertical icon rail with the user card block. */
.side-quick-rail {
    --side-quick-rail-start: 196px;
    padding-block-start: var(--side-quick-rail-start) !important;
}

.side-quick-rail .side-quick-action:first-child {
    margin-block-start: 0 !important;
}

.side-product-head {
    min-height: 46px !important;
}

/* Final tree restore: keep solid headers, restore all nested branch lines. */
.side-nav .side-branch,
.side-nav .side-workspace-links,
.side-nav .side-finance-links {
    position: relative !important;
    margin-inline-start: var(--tree-indent) !important;
    padding-inline-start: 14px !important;
}

html[dir="rtl"] .side-nav .side-branch,
html[dir="rtl"] .side-nav .side-workspace-links,
html[dir="rtl"] .side-nav .side-finance-links {
    margin-inline-start: 0 !important;
    margin-inline-end: var(--tree-indent) !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 14px !important;
}

.side-nav .side-branch::before,
.side-nav .side-workspace-links::before,
.side-nav .side-finance-links::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset-block: 0 6px !important;
    inset-inline-start: 0 !important;
    width: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 58%, #9fb2c6) !important;
    opacity: 1 !important;
}

html[dir="rtl"] .side-nav .side-branch::before,
html[dir="rtl"] .side-nav .side-workspace-links::before,
html[dir="rtl"] .side-nav .side-finance-links::before {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
}

.side-nav .side-sub-link:not(.side-project-hub-link)::before,
.side-nav .side-child-link:not(.side-discipline-link)::before,
.side-nav .side-management-link::before,
.side-nav .side-workspace-link::before,
.side-nav .side-resource-link::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-start: -14px !important;
    width: 12px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 58%, #9fb2c6) !important;
    opacity: 1 !important;
    transform: none !important;
}

html[dir="rtl"] .side-nav .side-sub-link:not(.side-project-hub-link)::before,
html[dir="rtl"] .side-nav .side-child-link:not(.side-discipline-link)::before,
html[dir="rtl"] .side-nav .side-management-link::before,
html[dir="rtl"] .side-nav .side-workspace-link::before,
html[dir="rtl"] .side-nav .side-resource-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: -14px !important;
}

.side-nav .side-discipline-workspace {
    position: relative !important;
}

.side-nav .side-discipline-workspace::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset-block: 0 6px !important;
    inset-inline-start: 0 !important;
    width: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, #9fb2c6) !important;
}

html[dir="rtl"] .side-nav .side-discipline-workspace::before {
    inset-inline-start: auto !important;
    inset-inline-end: 0 !important;
}

.side-nav .side-workspace-label {
    position: relative !important;
}

.side-nav .side-workspace-label::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    inset-block-start: 50% !important;
    inset-inline-start: -12px !important;
    width: 10px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 52%, #9fb2c6) !important;
}

html[dir="rtl"] .side-nav .side-workspace-label::before {
    inset-inline-start: auto !important;
    inset-inline-end: -12px !important;
}

.side-nav .side-project-hub-link::before,
.side-nav .side-project-hub-link::after,
.side-nav .side-discipline-link::before {
    display: none !important;
}

/* Final horizontal tree connectors: keep branch elbows visible beside tinted buttons. */
.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-workspace-link,
.side-nav .side-resource-link {
    position: relative !important;
    overflow: visible !important;
}

.side-nav .side-sub-link span,
.side-nav .side-child-link span,
.side-nav .side-management-link span,
.side-nav .side-workspace-link span,
.side-nav .side-resource-link span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.side-nav .side-sub-link:not(.side-project-hub-link)::before,
.side-nav .side-child-link:not(.side-discipline-link)::before,
.side-nav .side-management-link::before,
.side-nav .side-workspace-link::before,
.side-nav .side-resource-link::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    inline-size: 16px !important;
    block-size: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 70%, #7f93aa) !important;
    opacity: 1 !important;
    z-index: 3 !important;
    pointer-events: none !important;
}

html:not([dir="rtl"]) .side-nav .side-sub-link:not(.side-project-hub-link)::before,
html:not([dir="rtl"]) .side-nav .side-child-link:not(.side-discipline-link)::before,
html:not([dir="rtl"]) .side-nav .side-management-link::before,
html:not([dir="rtl"]) .side-nav .side-workspace-link::before,
html:not([dir="rtl"]) .side-nav .side-resource-link::before {
    inset-inline-start: -16px !important;
}

html[dir="rtl"] .side-nav .side-sub-link:not(.side-project-hub-link)::before,
html[dir="rtl"] .side-nav .side-child-link:not(.side-discipline-link)::before,
html[dir="rtl"] .side-nav .side-management-link::before,
html[dir="rtl"] .side-nav .side-workspace-link::before,
html[dir="rtl"] .side-nav .side-resource-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: -16px !important;
}

/* Discipline rows are tree parents too, so they need the same horizontal elbow. */
.side-nav .side-child-link.side-discipline-link::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    inline-size: 16px !important;
    block-size: 2px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--side-accent, #2563eb) 72%, #72869d) !important;
    opacity: 1 !important;
    z-index: 3 !important;
    pointer-events: none !important;
}

html:not([dir="rtl"]) .side-nav .side-child-link.side-discipline-link::before {
    inset-inline-start: -16px !important;
}

html[dir="rtl"] .side-nav .side-child-link.side-discipline-link::before {
    inset-inline-start: auto !important;
    inset-inline-end: -16px !important;
}

.side-nav .side-branch::before,
.side-nav .side-workspace-links::before,
.side-nav .side-finance-links::before,
.side-nav .side-discipline-workspace::before {
    z-index: 2 !important;
}

/* Sidebar width guard for English labels: buttons stay inside the panel, text ellipses. */
.side-nav,
.side-nav * {
    box-sizing: border-box !important;
}

.side-nav nav,
.side-nav details,
.side-nav summary,
.side-nav .side-nav-body,
.side-nav .side-project-card,
.side-nav .side-branch,
.side-nav .side-discipline-workspace,
.side-nav .side-workspace-links,
.side-nav .side-finance-links {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
}

.side-nav nav {
    overflow-x: hidden !important;
}

.side-nav summary,
.side-nav .side-sub-link,
.side-nav .side-child-link,
.side-nav .side-management-link,
.side-nav .side-workspace-link,
.side-nav .side-resource-link,
.side-nav .side-project-hub-link {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
}

.side-nav .side-branch > .side-child-link,
.side-nav .side-branch > .side-management-link,
.side-nav .side-branch > .side-sub-link,
.side-nav .side-discipline-workspace > .side-workspace-link,
.side-nav .side-workspace-links > .side-workspace-link,
.side-nav .side-finance-links > .side-sub-link {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
}

.side-nav summary > span,
.side-nav a > span,
.side-nav button > span,
.side-nav .side-project-copy,
.side-nav .side-project-title,
.side-nav .side-project-meta {
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.side-nav .side-management-group > summary span,
.side-nav .side-group-projects > summary span {
    grid-template-columns: 22px minmax(0, 1fr) !important;
}

/* Final English overflow fix: discipline rows must not add child margin on top of tree indent. */
.side-nav .side-branch > .side-child-link.side-discipline-link,
.side-nav .side-branch > .side-child-link.side-discipline-link.site,
html[dir="rtl"] .side-nav .side-branch > .side-child-link.side-discipline-link,
html[dir="rtl"] .side-nav .side-branch > .side-child-link.side-discipline-link.site {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
}

.side-nav .side-branch > .side-child-link.side-discipline-link span {
    display: block !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Project Hub alignment: match the solid department buttons icon/text axis. */
.side-nav a.side-sub-link.side-project-hub-link {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    padding-inline: 10px 12px !important;
    margin-inline: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
}

.side-nav a.side-sub-link.side-project-hub-link > svg,
.side-nav a.side-sub-link.side-project-hub-link > i {
    grid-column: 1 !important;
    justify-self: center !important;
    align-self: center !important;
    margin: 0 !important;
}

.side-nav a.side-sub-link.side-project-hub-link > span {
    grid-column: 2 !important;
    display: block !important;
    min-inline-size: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Uniform vertical rhythm for all solid sidebar buttons. */
.side-nav .side-group-projects > details.side-management-group {
    margin-block: 0 !important;
}

.side-nav .side-group-projects > summary,
.side-nav .side-group-projects > a.side-project-hub-link,
.side-nav .side-group-projects > details.side-management-group > summary {
    margin-block: 5px !important;
}

.side-nav .side-group-projects > summary:first-child {
    margin-block-start: 0 !important;
}

/* Technical office sub-headings use the same blue family as the solid parent. */
.side-nav .side-management-technical .side-workspace-label.resources,
.side-nav .side-management-technical .side-workspace-label.contracts,
.side-nav .side-management-technical .side-workspace-label.reports,
.side-nav .side-management-technical .side-finance-group > summary {
    --side-accent: #2563eb !important;
    --side-accent-soft: #eff6ff !important;
    color: #174b7a !important;
    border-color: rgba(37, 99, 235, .22) !important;
    background:
        linear-gradient(180deg, rgba(239, 246, 255, .96), rgba(219, 234, 254, .70)) !important;
}

.side-nav .side-management-technical .side-workspace-label.resources svg,
.side-nav .side-management-technical .side-workspace-label.contracts svg,
.side-nav .side-management-technical .side-workspace-label.reports svg,
.side-nav .side-management-technical .side-finance-group > summary svg {
    color: #2563eb !important;
}

/* Technical office group headers as solid blue section buttons. */
.side-nav .side-management-technical .side-workspace-label.resources,
.side-nav .side-management-technical .side-workspace-label.contracts,
.side-nav .side-management-technical .side-workspace-label.reports,
.side-nav .side-management-technical .side-finance-group > summary {
    min-height: 34px !important;
    height: 34px !important;
    padding: 7px 9px !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .48) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 5px 12px rgba(37, 99, 235, .18) !important;
    font-size: 10.8px !important;
    font-weight: 950 !important;
}

.side-nav .side-management-technical .side-workspace-label.resources span,
.side-nav .side-management-technical .side-workspace-label.contracts span,
.side-nav .side-management-technical .side-workspace-label.reports span,
.side-nav .side-management-technical .side-finance-group > summary span {
    color: #fff !important;
}

.side-nav .side-management-technical .side-workspace-label.resources svg,
.side-nav .side-management-technical .side-workspace-label.contracts svg,
.side-nav .side-management-technical .side-workspace-label.reports svg,
.side-nav .side-management-technical .side-finance-group > summary svg,
.side-nav .side-management-technical .side-finance-group > summary .side-chevron {
    color: #fff !important;
}

/* Site management sub-heading uses the same solid family as its parent. */
.side-nav .side-management-site .side-workspace-label.site {
    --side-accent: #0f766e !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 7px 9px !important;
    color: #fff !important;
    border: 1px solid rgba(15, 118, 110, .50) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, #13947f 0%, #0f766e 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(15, 118, 110, .18) !important;
    font-size: 10.8px !important;
    font-weight: 950 !important;
}

.side-nav .side-management-site .side-workspace-label.site span,
.side-nav .side-management-site .side-workspace-label.site svg {
    color: #fff !important;
}

/* Purchase request child button follows the purchasing department color with transparency. */
.side-nav .side-management-purchases > .side-management-link.purchase {
    --side-accent: #7c3aed !important;
    color: #4c1d95 !important;
    border: 1px solid rgba(124, 58, 237, .24) !important;
    background:
        linear-gradient(180deg, rgba(245, 243, 255, .96), rgba(237, 233, 254, .72)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.88),
        0 3px 9px rgba(124, 58, 237, .08) !important;
}

.side-nav .side-management-purchases > .side-management-link.purchase svg {
    color: #7c3aed !important;
}

.side-nav .side-management-purchases > .side-management-link.purchase:hover,
.side-nav .side-management-purchases > .side-management-link.purchase.active {
    color: #3b0764 !important;
    border-color: rgba(124, 58, 237, .36) !important;
    background:
        linear-gradient(180deg, rgba(237, 233, 254, .98), rgba(221, 214, 254, .80)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 5px 13px rgba(124, 58, 237, .12) !important;
}

/* Actual execution readability pass: slightly larger type and unified buttons. */
.actual-execution-page {
    font-size: 11px;
}

.actual-execution-table th,
.actual-execution-table td,
.actual-history-table th,
.actual-history-table td {
    font-size: 10px !important;
    line-height: 1.42 !important;
}

.actual-execution-table thead th,
.actual-history-table thead th {
    font-size: 10.4px !important;
    color: #0f172a !important;
}

.actual-item-titleline > strong {
    font-size: 11.8px !important;
}

.actual-item-head > span {
    font-size: 10.9px !important;
}

.actual-item-head small,
.actual-item-head em,
.actual-period-meta span,
.actual-status,
.actual-execution-table small,
.actual-execution-table em {
    font-size: 9.3px !important;
}

.actual-period-title > strong {
    font-size: 10.8px !important;
}

.actual-execution-table td:nth-child(3) strong[data-actual-percent] {
    font-size: 11px !important;
}

.actual-entry-form label > span,
.actual-history-filters label > span,
.actual-edit-form label span {
    font-size: 8.8px !important;
    color: #334155 !important;
}

.actual-entry-form input,
.actual-entry-form select,
.actual-history-filters input,
.actual-history-filters select,
.actual-edit-form input,
.actual-edit-form select,
.actual-edit-form textarea {
    font-size: 10px !important;
    font-weight: 900 !important;
}

.actual-log-button,
.actual-history-filters button,
.actual-reset-filter,
.actual-entry-form button,
.actual-edit-actions button,
.actual-approval-form button {
    min-height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(37, 99, 235, .34) !important;
    color: #fff !important;
    background:
        linear-gradient(180deg, rgba(59, 130, 246, .96), rgba(37, 99, 235, .98)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 9px 18px rgba(37, 99, 235, .18) !important;
    font-size: 10.5px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
}

.actual-entry-form button {
    min-height: 46px !important;
}

.actual-log-button:hover,
.actual-history-filters button:hover,
.actual-reset-filter:hover,
.actual-entry-form button:hover,
.actual-edit-actions button:hover,
.actual-approval-form button:hover {
    transform: translateY(-1px);
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .98), rgba(29, 78, 216, 1)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .32),
        0 12px 22px rgba(37, 99, 235, .22) !important;
}

.actual-log-button svg,
.actual-history-filters button svg,
.actual-reset-filter svg,
.actual-entry-form button svg,
.actual-edit-actions button svg,
.actual-approval-form button svg {
    width: 15px !important;
    height: 15px !important;
}

.actual-reset-filter,
.actual-edit-actions button[type="button"] {
    color: #17324d !important;
    border-color: rgba(148, 163, 184, .36) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(241, 245, 249, .92)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 7px 15px rgba(15, 23, 42, .08) !important;
}

.actual-approval-form button[value="approved"] {
    border-color: rgba(22, 163, 74, .36) !important;
    background: linear-gradient(180deg, #22c55e, #16a34a) !important;
    box-shadow: 0 9px 18px rgba(22, 163, 74, .18) !important;
}

.actual-approval-form button[value="rejected"] {
    border-color: rgba(220, 38, 38, .36) !important;
    background: linear-gradient(180deg, #ef4444, #dc2626) !important;
    box-shadow: 0 9px 18px rgba(220, 38, 38, .16) !important;
}

/* Mirror tree geometry in Arabic: rails on the right, buttons flow leftward. */
html[dir="rtl"] .side-nav .side-branch,
html[dir="rtl"] .side-nav .side-workspace-links,
html[dir="rtl"] .side-nav .side-finance-links,
html[dir="rtl"] .side-nav .side-discipline-workspace {
    margin-inline-start: var(--tree-indent, 18px) !important;
    margin-inline-end: 0 !important;
    padding-inline-start: 14px !important;
    padding-inline-end: 0 !important;
}

html[dir="rtl"] .side-nav .side-branch::before,
html[dir="rtl"] .side-nav .side-workspace-links::before,
html[dir="rtl"] .side-nav .side-finance-links::before,
html[dir="rtl"] .side-nav .side-discipline-workspace::before {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
}

html[dir="rtl"] .side-nav .side-branch > .side-child-link,
html[dir="rtl"] .side-nav .side-branch > .side-management-link,
html[dir="rtl"] .side-nav .side-branch > .side-sub-link,
html[dir="rtl"] .side-nav .side-discipline-workspace > .side-workspace-link,
html[dir="rtl"] .side-nav .side-workspace-links > .side-workspace-link,
html[dir="rtl"] .side-nav .side-finance-links > .side-sub-link {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    justify-content: flex-start !important;
    text-align: start !important;
}

html[dir="rtl"] .side-nav .side-sub-link:not(.side-project-hub-link)::before,
html[dir="rtl"] .side-nav .side-child-link::before,
html[dir="rtl"] .side-nav .side-management-link::before,
html[dir="rtl"] .side-nav .side-workspace-link::before,
html[dir="rtl"] .side-nav .side-resource-link::before,
html[dir="rtl"] .side-nav .side-workspace-label::before {
    inset-inline-start: -16px !important;
    inset-inline-end: auto !important;
}

html[dir="ltr"] .side-nav .side-branch,
html[dir="ltr"] .side-nav .side-workspace-links,
html[dir="ltr"] .side-nav .side-finance-links,
html[dir="ltr"] .side-nav .side-discipline-workspace {
    margin-inline-start: var(--tree-indent, 18px) !important;
    margin-inline-end: 0 !important;
    padding-inline-start: 14px !important;
    padding-inline-end: 0 !important;
}

html[dir="ltr"] .side-nav .side-branch::before,
html[dir="ltr"] .side-nav .side-workspace-links::before,
html[dir="ltr"] .side-nav .side-finance-links::before,
html[dir="ltr"] .side-nav .side-discipline-workspace::before {
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
}

/* Standalone finance group: moved below Project Hub with a distinct gold identity. */
.side-nav .side-management-technical > .side-finance-group:not(.side-finance-standalone) {
    display: none !important;
}

.side-nav .side-finance-group.side-finance-standalone {
    --side-accent: #d97706 !important;
    --side-accent-dark: #92400e !important;
    --side-accent-soft: #fffbeb !important;
    --side-text: #78350f !important;
    margin-block: 5px 8px !important;
}

.side-nav .side-finance-group.side-finance-standalone > summary {
    min-height: 42px !important;
    height: 42px !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(217, 119, 6, .54) !important;
    border-radius: 9px !important;
    color: #fff !important;
    background:
        linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .30),
        0 6px 14px rgba(217, 119, 6, .20) !important;
    font-size: 11.2px !important;
    font-weight: 950 !important;
}

.side-nav .side-finance-group.side-finance-standalone > summary span,
.side-nav .side-finance-group.side-finance-standalone > summary svg,
.side-nav .side-finance-group.side-finance-standalone > summary .side-chevron {
    color: #fff !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-finance-links {
    --tree-indent: 18px;
    margin-block-start: 7px !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-sub-link {
    border-color: rgba(217, 119, 6, .26) !important;
    background:
        linear-gradient(180deg, rgba(255, 251, 235, .98), rgba(254, 243, 199, .78)) !important;
    color: #78350f !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-sub-link svg {
    color: #d97706 !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-sub-link:hover {
    border-color: rgba(217, 119, 6, .44) !important;
    background:
        linear-gradient(180deg, rgba(254, 243, 199, 1), rgba(253, 230, 138, .82)) !important;
    color: #78350f !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-sub-link.active {
    color: #fff !important;
    border-color: rgba(146, 64, 14, .70) !important;
    background:
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .25),
        0 8px 16px rgba(217, 119, 6, .24) !important;
}

.side-nav .side-finance-group.side-finance-standalone .side-sub-link.active span,
.side-nav .side-finance-group.side-finance-standalone .side-sub-link.active svg {
    color: #fff !important;
}

/* Inventory and purchasing direct children need the same RTL tree mirror. */
html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link {
    width: calc(100% - var(--tree-indent, 18px)) !important;
    margin-inline-start: var(--tree-indent, 18px) !important;
    margin-inline-end: 0 !important;
}

html[dir="rtl"] .side-nav .side-management-inventory::after,
html[dir="rtl"] .side-nav .side-management-purchases::after {
    inset-inline-start: 8px !important;
    inset-inline-end: auto !important;
}

html[dir="rtl"] .side-nav .side-management-inventory > .side-management-link::before,
html[dir="rtl"] .side-nav .side-management-purchases > .side-management-link::before {
    inset-inline-start: calc(-1 * var(--tree-indent, 18px) + 8px) !important;
    inset-inline-end: auto !important;
}

/* Keep inventory/purchasing elbows aligned with their vertical rail in English. */
html[dir="ltr"] .side-nav .side-management-inventory > .side-management-link,
html[dir="ltr"] .side-nav .side-management-purchases > .side-management-link {
    width: calc(100% - var(--tree-indent, 18px)) !important;
    margin-inline-start: var(--tree-indent, 18px) !important;
    margin-inline-end: 0 !important;
}

html[dir="ltr"] .side-nav .side-management-inventory::after,
html[dir="ltr"] .side-nav .side-management-purchases::after {
    inset-inline-start: 8px !important;
    inset-inline-end: auto !important;
}

html[dir="ltr"] .side-nav .side-management-inventory > .side-management-link::before,
html[dir="ltr"] .side-nav .side-management-purchases > .side-management-link::before {
    inset-inline-start: calc(-1 * var(--tree-indent, 18px) + 8px) !important;
    inset-inline-end: auto !important;
    width: calc(var(--tree-indent, 18px) - 8px) !important;
}

/* Projects dashboard premium cards. */
.projects-page {
    --projects-blue: #2563eb;
    --projects-ink: #0f172a;
    --projects-muted: #64748b;
}

.projects-page-header {
    min-height: 142px !important;
    padding: 24px 28px !important;
    border: 1px solid rgba(203, 213, 225, .62) !important;
    border-radius: 16px !important;
    background:
        radial-gradient(circle at 42% 48%, rgba(37, 99, 235, .11) 0 6px, transparent 7px),
        radial-gradient(circle at 62% 60%, rgba(245, 158, 11, .18) 0 7px, transparent 8px),
        linear-gradient(112deg, rgba(255,255,255,.98) 0 48%, rgba(239,246,255,.92) 48% 54%, rgba(255,255,255,.96) 54% 100%) !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .09) !important;
}

.projects-page-header::after {
    width: 330px !important;
    height: 330px !important;
    inset-block-start: -190px !important;
    inset-inline-end: 29% !important;
    border: 34px solid rgba(37, 99, 235, .07) !important;
}

.projects-page-heading h1 {
    color: var(--projects-ink) !important;
    font-size: 27px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
}

.projects-page-heading p {
    color: var(--projects-muted) !important;
    font-size: 13px !important;
    font-weight: 850 !important;
}

.projects-page-icon {
    width: 62px !important;
    height: 62px !important;
    flex-basis: 62px !important;
    color: #047857 !important;
    border-radius: 15px !important;
    border: 1px solid rgba(203, 213, 225, .62) !important;
    background: rgba(255,255,255,.78) !important;
    box-shadow: 0 14px 28px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.projects-page-icon svg {
    width: 29px !important;
    height: 29px !important;
}

.projects-page-actions {
    gap: 14px !important;
}

.projects-page-actions .primary-button,
.projects-page-actions .link-button {
    min-height: 58px !important;
    padding-inline: 24px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 950 !important;
}

.projects-page-actions .primary-button {
    background: linear-gradient(180deg, #2f7cff, #155ee9) !important;
    border-color: rgba(37, 99, 235, .48) !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .24), inset 0 1px 0 rgba(255,255,255,.28) !important;
}

.projects-page-actions .link-button {
    color: #174b7a !important;
    background: rgba(255,255,255,.78) !important;
    border-color: rgba(191, 219, 254, .9) !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .08), inset 0 1px 0 rgba(255,255,255,.88) !important;
}

.project-cards-showcase {
    grid-template-columns: repeat(3, minmax(310px, 1fr)) !important;
    gap: 24px !important;
}

.project-card-premium {
    min-height: 575px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    border: 1px solid rgba(203, 213, 225, .64) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .11) !important;
}

.project-card-premium:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 30px 62px rgba(15, 23, 42, .16) !important;
}

.project-card-premium::before {
    z-index: 0 !important;
    background:
        radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--card-b, #f59e0b) 24%, transparent) 0 48px, transparent 49px),
        radial-gradient(circle at 14% 14%, rgba(255,255,255,.2) 0 76px, transparent 77px) !important;
    opacity: .75 !important;
}

.project-card-premium::after {
    display: none !important;
}

.project-card-media {
    height: 188px !important;
    border-block-end: 0 !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 94%, #000 6%), color-mix(in srgb, var(--card-c) 88%, #000 12%)) !important;
}

.project-card-media::before {
    background:
        linear-gradient(135deg, rgba(255,255,255,.18), transparent 38%),
        radial-gradient(circle at 12% 18%, rgba(255,255,255,.16), transparent 34%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 14px) !important;
    mix-blend-mode: screen !important;
}

.project-card-media > a {
    padding: 20px 24px !important;
}

.project-card-media img {
    max-height: 142px !important;
    filter: drop-shadow(0 12px 16px rgba(0,0,0,.23)) !important;
}

.project-card-media > span {
    min-height: 30px !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    background: rgba(255,255,255,.92) !important;
    border-color: rgba(255,255,255,.92) !important;
}

.project-card-media .project-status {
    inset-block-start: 14px !important;
    inset-inline-end: 14px !important;
    inset-inline-start: auto !important;
    color: #047857 !important;
    background: rgba(236, 253, 245, .94) !important;
}

.project-card-media .project-code {
    inset-block-end: 14px !important;
    inset-inline-start: 14px !important;
    inset-inline-end: auto !important;
    color: #0f172a !important;
}

.project-logo-fallback {
    background:
        linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02)),
        linear-gradient(135deg, var(--card-a), var(--card-c)) !important;
}

.project-card-body {
    gap: 17px !important;
    padding: 22px 20px 16px !important;
}

.project-card-title {
    grid-template-columns: 46px minmax(0, 1fr) 22px !important;
    gap: 12px !important;
}

.project-title-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--card-a) 10%, #fff) !important;
}

.project-card-title small {
    color: #64748b !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
}

.project-card-title strong {
    color: #0f172a !important;
    font-size: 22px !important;
    font-weight: 950 !important;
}

.project-card .project-card-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 9px !important;
}

.project-card .project-card-stats > div {
    min-height: 78px !important;
    grid-template-columns: minmax(0, 1fr) 24px !important;
    grid-template-rows: auto auto !important;
    column-gap: 7px !important;
    padding: 12px 10px !important;
    border-radius: 10px !important;
    border: 1px solid #dbe7f1 !important;
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 6px 14px rgba(15,23,42,.035) !important;
}

.project-card .project-card-stats svg {
    grid-column: 2 !important;
    grid-row: 1 / 3 !important;
    justify-self: end !important;
    width: 20px !important;
    height: 20px !important;
    color: var(--card-a) !important;
}

.project-card .project-card-stats dt,
.project-card .project-card-stats dd {
    grid-column: 1 !important;
    text-align: start !important;
}

.project-card .project-card-stats dt {
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 850 !important;
}

.project-card .project-card-stats dd {
    color: #0f172a !important;
    font-size: 12.8px !important;
    font-weight: 950 !important;
}

.project-card-meta {
    gap: 10px !important;
    padding: 2px 4px 0 !important;
}

.project-card-meta p {
    justify-content: flex-start !important;
    gap: 10px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

.project-card-meta p > svg {
    width: 19px !important;
    height: 19px !important;
}

.project-card-meta small {
    font-size: 10.5px !important;
    font-weight: 850 !important;
}

.project-card-actions {
    padding: 16px 20px 18px !important;
    border-block-start: 1px solid rgba(226, 232, 240, .9) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(248,250,252,.96)) !important;
}

.project-open-action {
    min-width: 180px !important;
    min-height: 48px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #22c55e 12%), color-mix(in srgb, var(--card-a) 76%, #0f172a 24%)) !important;
    box-shadow: 0 12px 22px color-mix(in srgb, var(--card-a) 24%, transparent), inset 0 1px 0 rgba(255,255,255,.26) !important;
}

.project-card-tools {
    gap: 10px !important;
}

.project-card-tools .icon-action {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
}

.project-card-tools .icon-action svg {
    width: 20px !important;
    height: 20px !important;
}

/* Sidebar product logo replaces the text title while keeping the same header footprint. */
.side-product-head {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    padding-inline: 34px !important;
}

.side-product-head > div {
    display: none !important;
}

.side-product-logo-mark {
    display: block !important;
    width: min(269px, 100%) !important;
    max-width: 100% !important;
    height: 60px !important;
    object-fit: contain !important;
    background: transparent !important;
}

.side-product-head button {
    display: none !important;
}

/* Projects page v2: clean engineering gateway with readable crystalline cards. */
.projects-page {
    background:
        linear-gradient(180deg, rgba(248, 251, 255, .78), rgba(255,255,255,.92)) !important;
}

.projects-page-header {
    min-height: 118px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 22px !important;
    padding: 22px 26px !important;
    margin-block-end: 26px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(203, 213, 225, .72) !important;
    background:
        linear-gradient(120deg, rgba(255,255,255,.98) 0 55%, rgba(239,246,255,.72) 55% 62%, rgba(255,255,255,.95) 62% 100%) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .075) !important;
}

.projects-page-header::after {
    inset-inline-end: 24% !important;
    inset-block-start: -150px !important;
    width: 270px !important;
    height: 270px !important;
    border-width: 30px !important;
    border-color: rgba(37, 99, 235, .055) !important;
}

.projects-page-heading {
    min-width: 0 !important;
}

.projects-page-heading h1 {
    margin: 0 0 7px !important;
    color: #0f172a !important;
    font-size: 29px !important;
    font-weight: 950 !important;
}

.projects-page-heading p {
    max-width: 620px !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 13.5px !important;
    font-weight: 850 !important;
    line-height: 1.65 !important;
}

.projects-page-icon {
    width: 58px !important;
    height: 58px !important;
    flex-basis: 58px !important;
    color: #0f766e !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.78) !important;
}

.projects-page-actions .primary-button {
    min-width: 205px !important;
    min-height: 56px !important;
    border-radius: 12px !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 42%),
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    box-shadow:
        0 14px 30px rgba(37, 99, 235, .22),
        inset 0 1px 0 rgba(255,255,255,.32) !important;
}

.project-cards-showcase {
    grid-template-columns: repeat(3, minmax(320px, 1fr)) !important;
    gap: 24px !important;
}

.project-card-premium {
    min-height: 560px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    border: 1px solid rgba(203, 213, 225, .76) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96)) !important;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, .09),
        inset 0 1px 0 rgba(255,255,255,.95) !important;
}

.project-card-premium::before {
    display: block !important;
    z-index: 0 !important;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--card-a) 70%, transparent), transparent 34%),
        radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--card-a) 14%, transparent), transparent 28%) !important;
    opacity: .16 !important;
}

.project-card-media {
    height: 168px !important;
    margin: 16px 16px 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(226, 232, 240, .88) !important;
    background: rgba(255,255,255,.72) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        0 10px 24px rgba(15,23,42,.055) !important;
}

.project-card-media::before {
    background:
        linear-gradient(135deg, rgba(248,250,252,.65), rgba(255,255,255,.15)),
        radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--card-a) 8%, transparent), transparent 34%) !important;
    mix-blend-mode: normal !important;
}

.project-card-media > a {
    padding: 18px 24px !important;
}

.project-card-media img {
    width: auto !important;
    max-width: 92% !important;
    height: auto !important;
    max-height: 124px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 8px 12px rgba(15,23,42,.12)) !important;
}

.project-card-media > span {
    min-height: 29px !important;
    padding: 5px 10px !important;
    font-size: 10.8px !important;
    background: rgba(255,255,255,.92) !important;
    box-shadow: 0 8px 16px rgba(15,23,42,.08) !important;
}

.project-card-media .project-status {
    color: #047857 !important;
    background: rgba(236, 253, 245, .94) !important;
}

.project-card-media .project-code {
    color: #0f172a !important;
}

.project-card-body {
    padding: 20px 18px 14px !important;
    gap: 15px !important;
}

.project-card-title {
    grid-template-columns: 42px minmax(0, 1fr) 20px !important;
}

.project-card-title strong {
    white-space: normal !important;
    overflow: visible !important;
    color: #0f172a !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
}

.project-card-title small {
    color: #64748b !important;
    font-size: 11px !important;
}

.project-title-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
}

.project-card .project-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
}

.project-card .project-card-stats > div {
    min-height: 66px !important;
    padding: 10px 11px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.82) !important;
    border: 1px solid rgba(203, 213, 225, .74) !important;
}

.project-card .project-card-stats dt {
    white-space: normal !important;
    color: #64748b !important;
    font-size: 10.5px !important;
}

.project-card .project-card-stats dd {
    white-space: nowrap !important;
    color: #0f172a !important;
    font-size: 14px !important;
}

.project-card .project-card-stats svg {
    width: 20px !important;
    height: 20px !important;
}

.project-card-meta {
    padding: 4px 2px 0 !important;
    gap: 9px !important;
}

.project-card-meta p {
    align-items: flex-start !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
}

.project-card-meta p > span {
    white-space: normal !important;
}

.project-card-meta small {
    display: block !important;
    margin-bottom: 2px !important;
}

.project-card-actions {
    padding: 14px 18px 18px !important;
    background: rgba(255,255,255,.72) !important;
}

.project-open-action {
    min-width: 168px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 82%, #22c55e 18%), color-mix(in srgb, var(--card-a) 74%, #0f172a 26%)) !important;
}

.project-card-tools .icon-action {
    width: 46px !important;
    height: 46px !important;
    border-radius: 10px !important;
}

/* Technical-office discipline rows: mirror the horizontal elbow correctly in Arabic. */
html[dir="rtl"] .side-nav .side-management-technical .side-child-link.side-discipline-link::before {
    inset-inline-start: -16px !important;
    inset-inline-end: auto !important;
}

html[dir="ltr"] .side-nav .side-management-technical .side-child-link.side-discipline-link::before {
    inset-inline-start: -16px !important;
    inset-inline-end: auto !important;
}

/* Site-management discipline rows: mirror the horizontal elbow correctly in Arabic. */
html[dir="rtl"] .side-nav .side-management-site .side-child-link.side-discipline-link::before {
    inset-inline-start: -16px !important;
    inset-inline-end: auto !important;
}

html[dir="ltr"] .side-nav .side-management-site .side-child-link.side-discipline-link::before {
    inset-inline-start: -16px !important;
    inset-inline-end: auto !important;
}

/* Technical office project page: polished engineering discipline cards. */
.project-technical-page {
    display: grid;
    gap: 20px;
}

.project-technical-page .project-detail-header {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 24px 26px;
    border: 1px solid rgba(191, 219, 254, .72);
    border-radius: 14px;
    background:
        radial-gradient(circle at 18% 18%, rgba(14, 165, 233, .14), transparent 28%),
        radial-gradient(circle at 84% 20%, rgba(15, 118, 110, .16), transparent 30%),
        linear-gradient(115deg, rgba(255,255,255,.98), rgba(239,246,255,.88) 52%, rgba(240,253,250,.78));
    box-shadow: 0 20px 44px rgba(15, 23, 42, .085);
}

.project-technical-page .project-detail-header::before {
    content: "";
    position: absolute;
    inset-block: -55px;
    inset-inline-end: 22%;
    width: 190px;
    transform: skewX(-19deg);
    background: linear-gradient(180deg, rgba(37, 99, 235, .075), rgba(15, 118, 110, .035));
    pointer-events: none;
}

.project-technical-page .project-detail-header h1 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 950;
    letter-spacing: 0;
}

.project-technical-page .project-detail-header p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.75;
}

.project-technical-page .project-detail-header .badges {
    gap: 9px;
    align-items: center;
    justify-content: flex-end;
}

.project-technical-page .project-detail-header .link-button,
.project-technical-page .project-detail-header .primary-button,
.project-technical-page .project-detail-header .badges > span {
    min-height: 42px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 950;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 9px 18px rgba(15,23,42,.065);
}

.project-technical-page .project-detail-header .link-button {
    color: #174b7a;
    border-color: rgba(191, 219, 254, .8);
    background: rgba(255,255,255,.78);
}

.project-technical-page .project-detail-header .primary-button {
    color: #fff;
    border-color: rgba(15, 118, 110, .42);
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 42%),
        linear-gradient(180deg, #0f766e, #0e7490);
    box-shadow: 0 13px 24px rgba(15, 118, 110, .18), inset 0 1px 0 rgba(255,255,255,.28);
}

.project-technical-page .project-detail-header .badges > span {
    padding: 8px 12px;
    color: #0f766e;
    border: 1px solid rgba(15, 118, 110, .18);
    background: rgba(240,253,250,.82);
}

.project-technical-page .discipline-cards-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 20px;
}

.project-technical-page .discipline-card-premium {
    position: relative;
    overflow: hidden;
    min-height: 382px;
    display: grid;
    grid-template-rows: 150px 1fr auto;
    border: 1px solid rgba(203, 213, 225, .76);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
    box-shadow: 0 18px 40px rgba(15, 23, 42, .09), inset 0 1px 0 rgba(255,255,255,.94);
    isolation: isolate;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.project-technical-page .discipline-card-premium:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--card-a) 32%, rgba(203,213,225,.76));
    box-shadow: 0 26px 54px rgba(15, 23, 42, .14);
}

.project-technical-page .discipline-card-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 12%, transparent), transparent 48%),
        radial-gradient(circle at 88% 14%, color-mix(in srgb, var(--card-b) 20%, transparent), transparent 30%);
}

.project-technical-page .discipline-card-media {
    position: relative;
    margin: 14px 14px 0;
    border: 1px solid rgba(226, 232, 240, .86);
    border-radius: 12px;
    background: rgba(255,255,255,.78);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 10px 22px rgba(15,23,42,.055);
}

.project-technical-page .discipline-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,.5), transparent 42%),
        repeating-linear-gradient(90deg, color-mix(in srgb, var(--card-a) 8%, transparent) 0 1px, transparent 1px 18px);
    pointer-events: none;
}

.project-technical-page .discipline-card-media img {
    width: auto;
    max-width: 82%;
    height: auto;
    max-height: 108px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(15,23,42,.12));
    z-index: 1;
}

.project-technical-page .discipline-logo-fallback {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 42%),
        linear-gradient(135deg, var(--card-a), var(--card-c));
    box-shadow: 0 14px 28px color-mix(in srgb, var(--card-a) 20%, transparent);
    z-index: 1;
}

.project-technical-page .discipline-logo-fallback svg {
    width: 34px;
    height: 34px;
}

.project-technical-page .discipline-card-media > span {
    position: absolute;
    inset-block-end: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #0f172a;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(226,232,240,.9);
    box-shadow: 0 8px 16px rgba(15,23,42,.08);
    font-size: 11px;
    font-weight: 950;
}

.project-technical-page .discipline-card-body {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px 18px 12px;
}

.project-technical-page .discipline-card-body h2 {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
    line-height: 1.35;
}

.project-technical-page .discipline-card-body p {
    margin: 0;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.75;
}

.project-technical-page .project-card-actions {
    justify-content: space-between;
    padding: 14px 18px 18px;
    border-block-start: 1px solid rgba(226,232,240,.86);
    background: rgba(255,255,255,.72);
}

.project-technical-page .project-card-actions .icon-action {
    width: 46px;
    height: 46px;
    border-radius: 10px;
}

.project-technical-page .project-card-actions .icon-action.primary {
    color: #fff;
    border-color: rgba(15, 118, 110, .38);
    background: linear-gradient(180deg, #0f766e, #0e7490);
    box-shadow: 0 12px 22px rgba(15, 118, 110, .18), inset 0 1px 0 rgba(255,255,255,.24);
}

.project-technical-page .project-card-actions form {
    margin: 0;
}

@media (max-width: 1200px) {
    .project-technical-page .discipline-cards-showcase {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

/* Technical office page redesign: executive-grade discipline gateway. */
.project-technical-page {
    --tech-blue: #1d4ed8;
    --tech-cyan: #0891b2;
    --tech-ink: #0f172a;
    --tech-muted: #64748b;
}

.project-technical-page .project-detail-header {
    min-height: 118px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 20px !important;
    align-items: center !important;
    padding: 22px 24px !important;
    border: 1px solid rgba(191, 219, 254, .78) !important;
    border-radius: 16px !important;
    background:
        linear-gradient(120deg, rgba(255,255,255,.99), rgba(239,246,255,.92) 55%, rgba(236,253,245,.84)) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08) !important;
}

.project-technical-page .project-detail-header::before {
    inset-block: -80px !important;
    inset-inline-end: 20% !important;
    width: 260px !important;
    border-radius: 999px !important;
    transform: rotate(-18deg) !important;
    background: linear-gradient(90deg, rgba(37,99,235,.08), rgba(8,145,178,.04)) !important;
}

.project-technical-page .project-detail-header h1 {
    font-size: 30px !important;
    line-height: 1.25 !important;
}

.project-technical-page .project-detail-header p {
    max-width: 720px !important;
    color: #475569 !important;
    font-size: 13.5px !important;
}

.project-technical-page .project-detail-header .badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.project-technical-page .project-detail-header .link-button,
.project-technical-page .project-detail-header .primary-button,
.project-technical-page .project-detail-header .badges > span {
    min-height: 44px !important;
    border-radius: 11px !important;
    padding-inline: 13px !important;
    font-size: 11.8px !important;
}

.project-technical-page .project-detail-header .primary-button {
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%),
        linear-gradient(135deg, var(--tech-blue), var(--tech-cyan)) !important;
    border-color: rgba(29,78,216,.38) !important;
}

.project-technical-page .discipline-cards-showcase {
    grid-template-columns: repeat(3, minmax(300px, 1fr)) !important;
    gap: 22px !important;
}

.project-technical-page .discipline-card-premium {
    min-height: 360px !important;
    grid-template-rows: 126px 1fr auto !important;
    border-radius: 16px !important;
    border: 1px solid rgba(203, 213, 225, .8) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.98)) !important;
    box-shadow:
        0 20px 44px rgba(15, 23, 42, .09),
        inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.project-technical-page .discipline-card-premium::before {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 82%, #0f172a 18%) 0 34%, transparent 34%),
        radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--card-b) 32%, transparent), transparent 26%) !important;
    opacity: 1 !important;
}

.project-technical-page .discipline-card-media {
    margin: 0 !important;
    height: 126px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 92%, #020617 8%), color-mix(in srgb, var(--card-c) 88%, #020617 12%)) !important;
    box-shadow: none !important;
}

.project-technical-page .discipline-card-media::after {
    background:
        linear-gradient(135deg, rgba(255,255,255,.18), transparent 42%),
        radial-gradient(circle at 15% 18%, rgba(255,255,255,.16), transparent 34%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px) !important;
}

.project-technical-page .discipline-card-media img {
    max-width: 74% !important;
    max-height: 86px !important;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.24)) !important;
}

.project-technical-page .discipline-logo-fallback {
    width: 70px !important;
    height: 70px !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent),
        rgba(255,255,255,.12) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
}

.project-technical-page .discipline-card-media > span {
    inset-block-end: 12px !important;
    inset-inline-start: 14px !important;
    color: #0f172a !important;
    background: rgba(255,255,255,.94) !important;
}

.project-technical-page .discipline-card-body {
    padding: 20px 20px 14px !important;
}

.project-technical-page .discipline-card-body h2 {
    font-size: 22px !important;
    color: var(--tech-ink) !important;
}

.project-technical-page .discipline-card-body p {
    color: var(--tech-muted) !important;
    font-size: 13px !important;
    line-height: 1.75 !important;
}

.project-technical-page .discipline-card-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 15px 20px 18px !important;
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(248,250,252,.96)) !important;
}

.project-technical-page .discipline-open-action {
    min-height: 46px;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 16px;
    border-radius: 11px;
    color: #fff;
    text-decoration: none;
    font-size: 12.8px;
    font-weight: 950;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 42%),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 78%, #2563eb 22%), color-mix(in srgb, var(--card-c) 76%, #0891b2 24%));
    box-shadow: 0 12px 22px color-mix(in srgb, var(--card-a) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.26);
}

.project-technical-page .discipline-open-action svg {
    width: 17px;
    height: 17px;
}

.project-technical-page .discipline-card-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-technical-page .discipline-card-tools form {
    margin: 0;
}

.project-technical-page .discipline-card-tools .icon-action {
    width: 43px !important;
    height: 43px !important;
    border-radius: 10px !important;
}

/* Technical office page final polish: cleaner crystalline cards and sharper actions. */
.project-technical-page .discipline-cards-showcase {
    gap: 18px !important;
}

.project-technical-page .discipline-card-premium {
    min-height: 242px !important;
    grid-template-rows: 96px auto auto !important;
    border-radius: 12px !important;
    border: 1px solid rgba(203, 213, 225, .82) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,250,252,.98)) !important;
    box-shadow:
        0 14px 30px rgba(15, 23, 42, .085),
        inset 0 1px 0 rgba(255,255,255,.98) !important;
}

.project-technical-page .discipline-card-premium::before {
    background:
        linear-gradient(90deg, var(--card-a) 0 5px, transparent 5px),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 8%, transparent), transparent 45%) !important;
}

html[dir="rtl"] .project-technical-page .discipline-card-premium::before {
    background:
        linear-gradient(270deg, var(--card-a) 0 5px, transparent 5px),
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 8%, transparent), transparent 45%) !important;
}

.project-technical-page .discipline-card-media {
    height: 96px !important;
    margin: 12px 14px 0 !important;
    border: 1px solid rgba(226, 232, 240, .86) !important;
    border-radius: 11px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.82)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.96),
        0 8px 18px rgba(15, 23, 42, .045) !important;
}

.project-technical-page .discipline-card-media::after {
    background:
        radial-gradient(circle at 16% 18%, color-mix(in srgb, var(--card-a) 10%, transparent), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,.35), transparent 48%) !important;
}

.project-technical-page .discipline-card-media img {
    max-width: 76% !important;
    max-height: 60px !important;
    filter: drop-shadow(0 8px 12px rgba(15,23,42,.11)) !important;
}

.project-technical-page .discipline-logo-fallback {
    width: 54px !important;
    height: 54px !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 45%),
        linear-gradient(135deg, var(--card-a), color-mix(in srgb, var(--card-c) 78%, var(--card-a))) !important;
}

.project-technical-page .discipline-card-media > span {
    inset-block-end: 9px !important;
    inset-inline-start: 10px !important;
    min-height: 26px !important;
    padding: 4px 9px !important;
    border-radius: 8px !important;
    color: color-mix(in srgb, var(--card-a) 70%, #0f172a) !important;
    background: rgba(255,255,255,.94) !important;
    border: 1px solid color-mix(in srgb, var(--card-a) 20%, #e2e8f0) !important;
    font-size: 10px !important;
}

.project-technical-page .discipline-card-body {
    padding: 10px 18px 8px !important;
    gap: 4px !important;
}

.project-technical-page .discipline-card-body h2 {
    font-size: 20px !important;
    line-height: 1.32 !important;
}

.project-technical-page .discipline-card-body p {
    font-size: 11px !important;
    line-height: 1.45 !important;
}

.project-technical-page .discipline-card-actions {
    padding: 10px 16px 13px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.72), rgba(248,250,252,.98)) !important;
}

.project-technical-page .discipline-open-action {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    min-height: 38px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    border: 1px solid color-mix(in srgb, var(--card-a) 42%, #fff) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 45%),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #2563eb 12%), color-mix(in srgb, var(--card-a) 74%, #0f172a 26%)) !important;
    box-shadow:
        0 10px 20px color-mix(in srgb, var(--card-a) 20%, transparent),
        inset 0 1px 0 rgba(255,255,255,.28) !important;
}

.project-technical-page .discipline-open-action:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 25px color-mix(in srgb, var(--card-a) 25%, transparent),
        inset 0 1px 0 rgba(255,255,255,.34) !important;
}

.project-technical-page .discipline-card-tools {
    flex: 0 0 auto !important;
    gap: 7px !important;
}

.project-technical-page .discipline-card-tools .icon-action {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.92)) !important;
    border-color: rgba(203, 213, 225, .85) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        0 8px 16px rgba(15,23,42,.07) !important;
}

.project-technical-page .discipline-card-tools .icon-action.edit,
.project-technical-page .discipline-card-tools a.icon-action {
    color: #0f766e !important;
}

.project-technical-page .discipline-card-tools .icon-action.danger {
    color: #dc2626 !important;
    background:
        linear-gradient(180deg, rgba(255,241,242,.96), rgba(255,228,230,.84)) !important;
    border-color: rgba(254, 205, 211, .95) !important;
}

/* Technical-office cards: centered discipline title strip and solid-blue page actions. */
.project-technical-page .project-detail-header .badges > a.link-button,
.project-technical-page .project-detail-header .badges > a.primary-button {
    min-height: 42px !important;
    border-radius: 11px !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(37, 99, 235, .20) !important;
}

.project-technical-page .project-detail-header .badges > a.link-button svg,
.project-technical-page .project-detail-header .badges > a.primary-button svg {
    color: #fff !important;
}

.project-technical-page .discipline-card-media {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.project-technical-page .discipline-card-media img,
.project-technical-page .discipline-logo-fallback {
    opacity: .17 !important;
    transform: scale(1.06) !important;
}

.project-technical-page .discipline-card-title-strip {
    position: absolute;
    z-index: 4;
    left: 14px;
    right: 14px;
    top: 50%;
    min-height: 54px;
    transform: translateY(-50%);
    display: grid;
    grid-template-columns: 38px 1fr 18px;
    align-items: center;
    direction: ltr;
    padding: 7px 10px;
    border-radius: 13px;
    border: 1px solid color-mix(in srgb, var(--card-a) 24%, #fff);
    background:
        linear-gradient(145deg, rgba(255,255,255,.86), rgba(255,255,255,.58)),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 9%, #fff), rgba(255,255,255,.76));
    box-shadow:
        0 12px 22px rgba(15, 23, 42, .10),
        inset 0 1px 0 rgba(255,255,255,.88);
    backdrop-filter: blur(12px);
}

.project-technical-page .discipline-card-title-strip > svg {
    grid-column: 1;
    width: 31px;
    height: 31px;
    padding: 6px;
    border-radius: 10px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 45%),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #2563eb 12%), color-mix(in srgb, var(--card-c) 76%, #0f172a 24%));
    box-shadow: 0 8px 16px color-mix(in srgb, var(--card-a) 20%, transparent);
}

.project-technical-page .discipline-card-title-strip h2 {
    grid-column: 2;
    margin: 0;
    color: #0f172a;
    min-width: 0;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 950;
    text-align: center;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[dir="rtl"] .project-technical-page .discipline-card-title-strip h2 {
    direction: rtl;
}

html[dir="ltr"] .project-technical-page .discipline-card-title-strip h2 {
    direction: ltr;
}

.project-technical-page .discipline-card-body h2 {
    display: none !important;
}

.project-technical-page .discipline-card-body {
    padding-top: 14px !important;
}

/* BOQ setup page: sharper engineering cards, readable buttons, and calmer visual rhythm. */
.boq-setup-page {
    --boq-blue: #2563eb;
    --boq-blue-dark: #1d4ed8;
    --boq-teal: #0f766e;
    --boq-ink: #0f172a;
    --boq-soft-blue: rgba(37, 99, 235, .10);
    --boq-soft-teal: rgba(15, 118, 110, .10);
}

.boq-setup-page .boq-workspace {
    gap: 16px !important;
    padding: 16px !important;
    border: 1px solid rgba(148, 163, 184, .38) !important;
    border-radius: 14px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .10), transparent 26%),
        radial-gradient(circle at 94% 6%, rgba(15, 118, 110, .10), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92)) !important;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, .085),
        inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.boq-setup-page .boq-workspace-header {
    min-height: 78px;
    padding: 16px 18px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(37, 99, 235, .20) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.58)),
        linear-gradient(135deg, rgba(37,99,235,.14), rgba(15,118,110,.10)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 10px 22px rgba(37,99,235,.08) !important;
}

.boq-setup-page .boq-workspace-header h2 {
    margin: 4px 0 3px !important;
    color: var(--boq-ink) !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-workspace-header p,
.boq-setup-page .boq-workspace .field > span,
.boq-setup-page .boq-title-form .field > span {
    color: #334155 !important;
    font-size: 11.5px !important;
    font-weight: 900 !important;
}

.boq-setup-page .boq-status {
    min-height: 26px !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 6px 14px rgba(37,99,235,.16);
}

.boq-setup-page .boq-action-strip {
    padding: 12px !important;
    border-radius: 12px !important;
    border-color: rgba(37, 99, 235, .24) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.84)),
        linear-gradient(135deg, var(--boq-soft-blue), var(--boq-soft-teal)) !important;
}

.boq-setup-page .boq-action-strip .primary-button,
.boq-setup-page .boq-action-strip .link-button,
.boq-setup-page .boq-title-form .link-button,
.boq-setup-page .boq-item-form .primary-button,
.boq-setup-page .boq-addition-form .primary-button,
.boq-setup-page .boq-tax-form .link-button,
.boq-setup-page .boq-print-details .primary-button,
.boq-setup-page .boq-print-details .link-button,
.boq-setup-page .boq-contract-upload .primary-button {
    min-height: 40px !important;
    height: auto !important;
    padding: 9px 15px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    font-weight: 950 !important;
    white-space: normal !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 9px 18px rgba(37, 99, 235, .18) !important;
}

.boq-setup-page .boq-action-strip .boq-print-button,
.boq-setup-page .boq-print-actions .boq-print-button {
    border-color: rgba(5, 150, 105, .54) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 9px 18px rgba(4, 120, 87, .18) !important;
}

.boq-setup-page .boq-save-button,
.boq-setup-page [data-finalize-boq] {
    border-color: rgba(245, 158, 11, .62) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(180, 83, 9, .20) !important;
}

.boq-setup-page .boq-action-strip svg,
.boq-setup-page .boq-title-form .link-button svg,
.boq-setup-page .boq-item-form .primary-button svg,
.boq-setup-page .boq-addition-form .primary-button svg,
.boq-setup-page .boq-tax-form .link-button svg,
.boq-setup-page .boq-print-details button svg,
.boq-setup-page .boq-print-details a svg {
    width: 16px !important;
    height: 16px !important;
    color: #fff !important;
    flex: 0 0 auto;
}

.boq-setup-page .boq-title-card,
.boq-setup-page .boq-editor-panel,
.boq-setup-page .boq-mini-panel,
.boq-setup-page .boq-summary-card,
.boq-setup-page .boq-notes-card,
.boq-setup-page .boq-signatures-card,
.boq-setup-page .boq-contract-card {
    border-radius: 13px !important;
    border: 1px solid rgba(148, 163, 184, .34) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94)),
        linear-gradient(135deg, rgba(37,99,235,.045), rgba(15,118,110,.04)) !important;
    box-shadow:
        0 14px 32px rgba(15, 23, 42, .075),
        inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.boq-setup-page .boq-title-card::before,
.boq-setup-page .boq-editor-panel::before,
.boq-setup-page .boq-mini-panel::before,
.boq-setup-page .boq-summary-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 13px 0 0 13px;
    background: linear-gradient(180deg, var(--boq-blue), var(--boq-teal));
}

html[dir="rtl"] .boq-setup-page .boq-title-card::before,
html[dir="rtl"] .boq-setup-page .boq-editor-panel::before,
html[dir="rtl"] .boq-setup-page .boq-mini-panel::before,
html[dir="rtl"] .boq-setup-page .boq-summary-card::before {
    border-radius: 0 13px 13px 0;
}

.boq-setup-page .boq-workspace .boq-editor-panel > h3,
.boq-setup-page .boq-workspace .boq-mini-panel > h3,
.boq-setup-page .boq-workspace .boq-summary-card > h3,
.boq-setup-page .boq-title-card h3,
.boq-setup-page .boq-detail-card-heading {
    min-height: 34px !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    color: var(--boq-ink) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .28) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-workspace h3 svg,
.boq-setup-page .boq-title-card h3 svg {
    width: 18px !important;
    height: 18px !important;
    color: var(--boq-blue) !important;
}

.boq-setup-page .boq-title-form,
.boq-setup-page .boq-item-form,
.boq-setup-page .boq-addition-form,
.boq-setup-page .boq-tax-form {
    border-radius: 11px !important;
}

.boq-setup-page .boq-item-form {
    padding: 12px !important;
    border: 1px solid rgba(37, 99, 235, .18) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.86), rgba(248,250,252,.74)),
        linear-gradient(135deg, rgba(37,99,235,.07), rgba(15,118,110,.05)) !important;
}

.boq-setup-page input,
.boq-setup-page select,
.boq-setup-page textarea,
.boq-setup-page .boq-analysis-picker-button {
    border-radius: 9px !important;
    border-color: rgba(148, 163, 184, .54) !important;
    background-color: rgba(255,255,255,.96) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.boq-setup-page input:focus,
.boq-setup-page select:focus,
.boq-setup-page textarea:focus,
.boq-setup-page .boq-analysis-picker-button:focus {
    border-color: rgba(37, 99, 235, .72) !important;
    outline: 3px solid rgba(37, 99, 235, .12) !important;
}

.boq-setup-page .boq-analysis-picker-button {
    min-height: 40px !important;
    color: #1e3a8a !important;
    background:
        linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 6px 14px rgba(37,99,235,.08) !important;
}

.boq-setup-page .boq-form-actions {
    gap: 10px !important;
    padding-top: 8px !important;
}

.boq-setup-page .boq-form-actions .primary-button {
    width: min(420px, 100%) !important;
    min-height: 42px !important;
}

.boq-setup-page .boq-form-actions .link-button.subtle {
    min-width: 132px !important;
    color: #334155 !important;
    border-color: rgba(148, 163, 184, .46) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.92)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 7px 14px rgba(15,23,42,.07) !important;
}

.boq-setup-page .boq-main-table,
.boq-setup-page .boq-summary-table {
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15,23,42,.055);
}

.boq-setup-page .boq-main-table th {
    padding: 8px 6px !important;
    font-size: 11.5px !important;
    background:
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
}

.boq-setup-page .boq-main-table td {
    padding: 8px 6px !important;
    font-size: 11.5px !important;
    background: rgba(255,255,255,.92);
}

.boq-setup-page .boq-main-table tfoot th,
.boq-setup-page .boq-main-table tfoot td {
    color: #fff !important;
    background:
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    border-color: #111827 !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-summary-table th,
.boq-setup-page .boq-summary-table td {
    padding: 10px !important;
    font-size: 12px !important;
}

.boq-setup-page .boq-summary-table thead th {
    color: #fff !important;
    background:
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    border-color: #111827 !important;
    font-size: 11.5px !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-summary-table tbody th {
    color: #0f172a !important;
    background: rgba(239, 246, 255, .94) !important;
    border-color: #111827 !important;
}

.boq-setup-page .boq-summary-table tbody td {
    color: #0f172a !important;
    background: rgba(255, 255, 255, .96) !important;
    border-color: #111827 !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-summary-table tbody tr:nth-child(even) th {
    background: rgba(240, 253, 250, .94) !important;
}

.boq-setup-page .boq-summary-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, .98) !important;
}

.boq-setup-page .boq-summary-table .grand th,
.boq-setup-page .boq-summary-table .grand td {
    color: #fff !important;
    background:
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    border-color: #111827 !important;
    font-size: 15px !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td,
.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td.boq-final-label,
.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand .num-cell {
    color: #fff !important;
    border-color: #111827 !important;
    border-top: 1.5px solid #111827 !important;
    background:
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    font-size: 15px !important;
    font-weight: 950 !important;
}

.boq-setup-page .icon-action {
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 6px 12px rgba(15,23,42,.08) !important;
}

/* Materials page search filters. */
.resource-page-materials .resource-filter-panel {
    position: relative;
    overflow: hidden;
    padding: 14px 16px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 12px;
    background:
        radial-gradient(circle at 6% 0%, rgba(37, 99, 235, .10), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,250,252,.90));
    box-shadow: 0 14px 32px rgba(15, 23, 42, .075), inset 0 1px 0 rgba(255,255,255,.96);
}

.resource-page-materials .resource-filter-panel::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, #2563eb, #0f766e);
}

.resource-filter-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .26);
}

.resource-filter-heading > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6, #2563eb);
    box-shadow: 0 9px 18px rgba(37, 99, 235, .18);
}

.resource-filter-heading svg {
    width: 18px;
    height: 18px;
}

.resource-filter-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 950;
}

.resource-filter-heading p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.resource-filter-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.7fr) minmax(170px, .8fr) minmax(130px, .55fr) auto;
    gap: 10px;
    align-items: end;
}

.resource-filter-grid .field {
    min-width: 0;
    gap: 5px;
}

.resource-filter-grid .field > span {
    color: #334155;
    font-size: 11px;
    font-weight: 950;
}

.resource-filter-grid input,
.resource-filter-grid select {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(148, 163, 184, .56);
    border-radius: 9px;
    padding: 8px 10px;
    color: #0f172a;
    background: rgba(255,255,255,.96);
    font-size: 12px;
    font-weight: 850;
}

.resource-filter-grid input:focus,
.resource-filter-grid select:focus {
    border-color: rgba(37, 99, 235, .72);
    outline: 3px solid rgba(37, 99, 235, .12);
}

.resource-filter-search input {
    font-weight: 900;
}

.resource-filter-reset {
    min-height: 40px !important;
    border-radius: 9px !important;
    padding: 8px 13px !important;
    color: #334155 !important;
    border-color: rgba(148, 163, 184, .46) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,245,249,.92)) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.94), 0 7px 14px rgba(15,23,42,.07) !important;
}

.resource-filter-reset svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 1050px) {
    .resource-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-filter-reset {
        justify-self: end;
    }
}

/* Root fix: the text side of the sidebar must always scroll instead of clipping
   long project trees, especially on discipline warehouse issue pages. */
.side-nav nav {
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
}

/* Larger quick-rail counters for notifications/messages visibility. */
.side-quick-action b {
    inset-block-start: -2px !important;
    inset-inline-end: -3px !important;
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 6px !important;
    border-width: 2px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, .32) !important;
}

/* Inventory issue/purchase detail modals. */
.inventory-detail-modal .resource-modal-head {
    min-height: 58px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(255,255,255,.18) !important;
    background:
        linear-gradient(135deg, #08294b 0%, #0f766e 100%) !important;
}

.inventory-detail-modal .resource-modal-head h2 {
    font-size: 16px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
}

.inventory-modal-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.inventory-modal-head-actions .icon-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 9px !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.24) !important;
    background: rgba(255,255,255,.14) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.inventory-modal-head-actions .icon-action.print {
    background: linear-gradient(135deg, rgba(16,185,129,.94), rgba(5,150,105,.96)) !important;
    border-color: rgba(167,243,208,.48) !important;
}

.inventory-modal-head-actions .icon-action svg {
    width: 17px !important;
    height: 17px !important;
}

.inventory-detail-modal .inventory-request-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 13px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(20,184,166,.16), transparent 34%),
        linear-gradient(135deg, rgba(240,253,250,.94), rgba(255,247,237,.9)) !important;
}

.inventory-detail-modal .inventory-request-meta span {
    display: grid !important;
    grid-template-columns: 22px minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: start !important;
    gap: 5px !important;
    min-height: 62px !important;
    border: 1px solid rgba(15, 41, 71, .12) !important;
    border-radius: 10px !important;
    padding: 9px 10px !important;
    background: rgba(255,255,255,.86) !important;
    box-shadow: 0 7px 18px rgba(15,23,42,.055), inset 0 1px 0 rgba(255,255,255,.9) !important;
    color: #475569 !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
}

.inventory-detail-modal .inventory-request-meta span > svg {
    grid-row: 1 / span 2;
    width: 17px !important;
    height: 17px !important;
    color: #0f766e !important;
}

.inventory-detail-modal .inventory-request-meta b {
    grid-column: 2;
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    margin-top: 1px !important;
    color: #0f172a !important;
    font-size: 11.5px !important;
    font-weight: 950 !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

.inventory-detail-modal .inventory-request-meta em {
    grid-column: 2;
    display: block !important;
    color: #64748b !important;
    font-style: normal !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
}

.inventory-detail-modal .inventory-table-wrap {
    margin: 12px !important;
    border: 1px solid #0f172a !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 24px rgba(15,23,42,.08) !important;
}

.inventory-detail-modal .inventory-modal-table th {
    background: linear-gradient(180deg, #123f68, #08294b) !important;
    color: #fff !important;
    border-color: #0f172a !important;
    font-size: 10px !important;
    font-weight: 950 !important;
}

.inventory-detail-modal .inventory-modal-table td {
    border-color: #334155 !important;
    color: #0f172a !important;
    background: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
}

.inventory-detail-modal .inventory-modal-table tbody tr:nth-child(even) td {
    background: #f8fafc !important;
}

.inventory-detail-modal .inventory-modal-table .number {
    color: #000 !important;
    font-weight: 950 !important;
}

@media print {
    body.inventory-modal-printing > * {
        visibility: hidden !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing,
    body.inventory-modal-printing .inventory-request-modal.is-printing * {
        visibility: visible !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing {
        position: absolute !important;
        inset: 0 !important;
        display: block !important;
        width: 100% !important;
        min-height: auto !important;
        padding: 0 !important;
        background: #fff !important;
        backdrop-filter: none !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-detail-modal {
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .no-print,
    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-modal-actions {
        display: none !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .resource-modal-head,
    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-modal-summary,
    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-table th {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .resource-modal-head h2,
    body.inventory-modal-printing .inventory-request-modal.is-printing .resource-modal-head h2 *,
    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-table th {
        color: #fff !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-request-meta {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 7px !important;
        padding: 8px !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-request-meta span {
        min-height: 54px !important;
        padding: 7px 8px !important;
        font-size: 9.2px !important;
        line-height: 1.22 !important;
        break-inside: avoid !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-request-meta b {
        font-size: 10.2px !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere !important;
        white-space: normal !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-table-wrap {
        margin: 10px 0 0 !important;
        overflow: visible !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-modal-table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-modal-table th,
    body.inventory-modal-printing .inventory-request-modal.is-printing .inventory-modal-table td {
        font-size: 9.5px !important;
        padding: 6px 4px !important;
        color: #000 !important;
    }

    body.inventory-modal-printing .inventory-request-modal.is-printing table.inventory-modal-table thead th,
    body.inventory-modal-printing .inventory-request-modal.is-printing table.inventory-modal-table thead th *,
    body.inventory-modal-printing .inventory-request-modal.is-printing .issue-detail-table thead th,
    body.inventory-modal-printing .inventory-request-modal.is-printing .purchase-detail-table thead th {
        color: #fff !important;
        background: #08294b !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Final BOQ setup guarantees: keep item picker as dropdown, finalize orange, tables navy. */
.boq-setup-page .boq-analysis-picker{position:relative!important;overflow:visible!important}
.boq-setup-page .boq-analysis-picker-button{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;width:100%!important;min-height:42px!important;padding:8px 11px!important;border:1px solid rgba(15,118,110,.3)!important;border-radius:8px!important;background:linear-gradient(180deg,#fff,#f7fbfb)!important;color:#123046!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.92),0 6px 14px rgba(15,23,42,.06)!important;text-align:start!important;transform:none!important}
.boq-setup-page .boq-analysis-picker-button::after{content:"";flex:0 0 auto;width:8px;height:8px;border-inline-end:2px solid #0f766e;border-block-end:2px solid #0f766e;transform:rotate(45deg) translateY(-2px)}
.boq-setup-page .boq-analysis-picker-button span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:normal!important;color:#123046!important}
.boq-setup-page .boq-analysis-menu{position:absolute!important;z-index:3200!important;inset-inline:0!important;top:calc(100% + 6px)!important;display:grid!important;gap:6px!important;min-width:min(560px,88vw)!important;max-height:360px!important;padding:9px!important;border:1px solid rgba(15,118,110,.28)!important;border-radius:10px!important;background:linear-gradient(180deg,#fff,#f8fbfb)!important;box-shadow:0 22px 48px rgba(15,23,42,.22)!important;overflow-y:auto!important}
.boq-setup-page .boq-analysis-menu[hidden]{display:none!important}
.boq-setup-page .boq-analysis-menu .boq-analysis-search{position:sticky!important;top:0!important;z-index:2!important;width:100%!important;min-height:38px!important;margin:0 0 4px!important;border:1px solid rgba(15,118,110,.3)!important;border-radius:8px!important;background:#fff!important;color:#0f172a!important;box-shadow:0 5px 12px rgba(15,23,42,.06)!important}
.boq-setup-page .boq-analysis-option{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;width:100%!important;min-height:0!important;height:auto!important;padding:9px 10px!important;border:1px solid transparent!important;border-radius:8px!important;background:transparent!important;color:#102a43!important;box-shadow:none!important;text-align:start!important;transform:none!important}
.boq-setup-page .boq-analysis-option span{color:#102a43!important;font-size:11px!important;font-weight:850!important;line-height:1.45!important;white-space:normal!important}
.boq-setup-page .boq-analysis-option strong{color:#0f766e!important;font-size:11px!important;font-weight:950!important;white-space:nowrap!important}
.boq-setup-page .boq-analysis-option:hover,.boq-setup-page .boq-analysis-option.selected{border-color:rgba(5,150,105,.22)!important;background:linear-gradient(135deg,rgba(236,253,245,.95),rgba(240,253,250,.86))!important}
.boq-setup-page .boq-analysis-option:hover span,.boq-setup-page .boq-analysis-option.selected span,.boq-setup-page .boq-analysis-option:hover strong,.boq-setup-page .boq-analysis-option.selected strong{color:#047857!important}
.boq-setup-page .boq-save-button,.boq-setup-page [data-finalize-boq],.boq-setup-page [data-finalize-confirm]{width:min(100%,420px)!important;min-height:46px!important;justify-content:center!important;border-color:rgba(245,158,11,.7)!important;background:linear-gradient(145deg,rgba(255,255,255,.23),transparent 44%),linear-gradient(180deg,#f59e0b 0%,#b45309 100%)!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 12px 24px rgba(180,83,9,.24)!important;font-weight:950!important}
.boq-setup-page .boq-action-strip [data-finalize-boq]{min-width:280px!important}
.boq-setup-page :is(.boq-main-table,.boq-document-table,.boq-summary-table,.boq-document-summary-table) thead th,.boq-setup-page .boq-main-table tfoot th,.boq-setup-page .boq-main-table tfoot td,.boq-setup-page .boq-document-table tfoot th,.boq-setup-page .boq-document-table tfoot td,.boq-setup-page .boq-summary-table .grand th,.boq-setup-page .boq-summary-table .grand td,.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td,.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand td.boq-final-label,.boq-setup-page .boq-final-calculation .boq-document-summary-table tbody tr.grand .num-cell{color:#fff!important;background:linear-gradient(180deg,#0f2947,#08294b)!important;border-color:#111827!important;font-weight:950!important}

/* BOQ item dropdown readability and live filtering fix. */
.boq-setup-page .boq-analysis-option[hidden] {
    display: none !important;
}

.boq-setup-page .boq-analysis-option,
.boq-setup-page .boq-analysis-option.selected {
    background: transparent !important;
    border-color: transparent !important;
}

.boq-setup-page .boq-analysis-option span,
.boq-setup-page .boq-analysis-option.selected span {
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-option strong,
.boq-setup-page .boq-analysis-option.selected strong {
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-option:hover,
.boq-setup-page .boq-analysis-option:focus-visible {
    border-color: rgba(16, 185, 129, .16) !important;
    background: rgba(236, 253, 245, .58) !important;
}

.boq-setup-page .boq-analysis-option:hover span,
.boq-setup-page .boq-analysis-option:focus-visible span,
.boq-setup-page .boq-analysis-option:hover strong,
.boq-setup-page .boq-analysis-option:focus-visible strong {
    color: #111827 !important;
}

/* BOQ item dropdown must stay neutral: no blue fill, language-aware item/price sides. */
.boq-setup-page .boq-analysis-picker-button {
    border-color: rgba(100, 116, 139, .34) !important;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-picker-button::after {
    border-inline-end-color: #334155 !important;
    border-block-end-color: #334155 !important;
}

.boq-setup-page .boq-analysis-picker-button span {
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-menu {
    border-color: rgba(100, 116, 139, .22) !important;
}

.boq-setup-page .boq-analysis-menu .boq-analysis-search {
    border-color: rgba(100, 116, 139, .28) !important;
}

.boq-setup-page .boq-analysis-option,
.boq-setup-page .boq-analysis-option.selected,
.boq-setup-page .boq-analysis-option:hover,
.boq-setup-page .boq-analysis-option:focus-visible {
    box-shadow: none !important;
}

html[dir="rtl"] .boq-setup-page .boq-analysis-option {
    direction: rtl !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
}

html[dir="rtl"] .boq-setup-page .boq-analysis-option span {
    grid-column: 1 !important;
    text-align: right !important;
}

html[dir="rtl"] .boq-setup-page .boq-analysis-option strong {
    grid-column: 2 !important;
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .boq-setup-page .boq-analysis-option {
    direction: ltr !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
}

html[dir="ltr"] .boq-setup-page .boq-analysis-option span {
    grid-column: 1 !important;
    text-align: left !important;
}

html[dir="ltr"] .boq-setup-page .boq-analysis-option strong {
    grid-column: 2 !important;
    text-align: right !important;
    direction: ltr !important;
}

/* Stronger than the global technical-office button rule that targets button[type="button"]. */
.boq-setup-page .boq-analysis-picker button.boq-analysis-picker-button[type="button"] {
    border-color: rgba(100, 116, 139, .34) !important;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
    color: #111827 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 6px 14px rgba(15,23,42,.06) !important;
}

.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 9px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
    text-align: start !important;
    transform: none !important;
}

.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"][hidden] {
    display: none !important;
}

.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] span,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] strong {
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:hover,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:focus-visible {
    border-color: rgba(16, 185, 129, .16) !important;
    background: rgba(236, 253, 245, .58) !important;
    color: #111827 !important;
}

.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:hover span,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:hover strong,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:focus-visible span,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:focus-visible strong {
    color: #111827 !important;
}

html[dir="rtl"] .boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] span {
    grid-column: 1 !important;
    text-align: right !important;
}

html[dir="rtl"] .boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] strong {
    grid-column: 2 !important;
    text-align: left !important;
    direction: ltr !important;
}

html[dir="ltr"] .boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] span {
    grid-column: 1 !important;
    text-align: left !important;
}

html[dir="ltr"] .boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] strong {
    grid-column: 2 !important;
    text-align: right !important;
    direction: ltr !important;
}

/* Final requested polish: blue BOQ item prices, wider orange finalization, no overlap in analysis item dropdown. */
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"] strong,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:hover strong,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"]:focus-visible strong,
.boq-setup-page .boq-analysis-menu button.boq-analysis-option[type="button"].selected strong {
    color: #1d4ed8 !important;
    font-weight: 950 !important;
}

.boq-setup-page [data-finalize-boq],
.boq-setup-page [data-finalize-confirm] {
    width: min(100%, 560px) !important;
    min-width: min(100%, 360px) !important;
    min-height: 48px !important;
    padding-inline: 34px !important;
    border-color: rgba(245, 158, 11, .72) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.23), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    color: #fff !important;
    justify-content: center !important;
}

.analysis-page .analysis-picker-menu {
    min-width: min(520px, 90vw) !important;
    max-width: min(620px, 94vw) !important;
}

.analysis-page .analysis-picker-list {
    gap: 5px !important;
}

.analysis-page .analysis-picker-list button[type="button"] {
    display: block !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 9px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: rgba(240, 253, 250, .32) !important;
    color: #111827 !important;
    box-shadow: none !important;
    text-align: start !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.55 !important;
    font-size: 10.8px !important;
    font-weight: 850 !important;
    transform: none !important;
}

.analysis-page .analysis-picker-list button[type="button"]:hover,
.analysis-page .analysis-picker-list button[type="button"]:focus-visible {
    border-color: rgba(16, 185, 129, .20) !important;
    background: rgba(236, 253, 245, .46) !important;
    color: #111827 !important;
}

.analysis-page .analysis-picker-list button[type="button"]:hover,
.analysis-page .analysis-picker-list button[type="button"]:focus,
.analysis-page .analysis-picker-list button[type="button"]:focus-visible,
.analysis-page .analysis-picker-list button[type="button"].selected {
    border-color: rgba(15, 118, 110, .16) !important;
    background: rgba(240, 253, 250, .44) !important;
    color: #111827 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .07) !important;
    outline: none !important;
}

.analysis-page .analysis-picker-list button[type="button"]:hover *,
.analysis-page .analysis-picker-list button[type="button"]:focus-visible *,
.analysis-page .analysis-picker-list button[type="button"].selected * {
    color: inherit !important;
}

.analysis-page .analysis-picker-toggle span {
    white-space: normal !important;
    line-height: 1.35 !important;
}

.analysis-page .analysis-picker-toggle {
    border-color: rgba(15, 118, 110, .18) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.56)),
        linear-gradient(135deg, rgba(8,145,178,.08), rgba(15,118,110,.06)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.94),
        0 6px 14px rgba(15,23,42,.045) !important;
    color: #123046 !important;
}

.analysis-page .analysis-create-table .analysis-picker-toggle {
    min-height: 40px !important;
    height: auto !important;
    padding-block: 7px !important;
}

/* Absolute override for BOQ finalization buttons. */
.boq-setup-page .boq-action-strip .boq-management-actions button.primary-button.boq-save-button[data-finalize-boq],
.boq-setup-page .boq-action-strip button.primary-button.boq-save-button[data-finalize-boq],
.boq-setup-page button.primary-button.boq-save-button[data-finalize-boq],
.boq-setup-page .boq-finalize-modal button.primary-button.boq-save-button[data-finalize-confirm],
.boq-setup-page button.primary-button.boq-save-button[data-finalize-confirm] {
    width: min(100%, 760px) !important;
    min-width: min(100%, 560px) !important;
    min-height: 48px !important;
    padding-inline: 36px !important;
    border-color: rgba(245, 158, 11, .78) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.24), transparent 44%),
        linear-gradient(180deg, #f59e0b 0%, #b45309 100%) !important;
    background-color: #d97706 !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 12px 24px rgba(180, 83, 9, .26) !important;
    justify-content: center !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-action-strip .boq-management-actions button.primary-button.boq-save-button[data-finalize-boq]:hover,
.boq-setup-page button.primary-button.boq-save-button[data-finalize-confirm]:hover {
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #d97706 0%, #92400e 100%) !important;
    background-color: #b45309 !important;
}

/* Make the finalization action visibly double-width inside the action strip. */
.boq-setup-page .boq-action-strip:not(.boq-action-strip-final) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
}

.boq-setup-page .boq-action-strip:not(.boq-action-strip-final) .boq-management-actions {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}

.boq-setup-page .boq-action-strip:not(.boq-action-strip-final) .boq-management-actions button.primary-button.boq-save-button[data-finalize-boq] {
    width: 760px !important;
    max-width: 100% !important;
    min-width: 560px !important;
    flex: 0 1 760px !important;
}

/* Absolute final override for certificate print buttons. */
.certificate-page a.link-button.subtle.certificate-preview-print,
.certificate-page .certificate-card-heading a.link-button.subtle.certificate-preview-print,
.certificate-page .certificate-register-table .boq-action-buttons a.icon-action.print[href*="certificates/print"],
.certificate-page a.icon-action.print[href*="certificates/print"] {
    border-color: rgba(5, 150, 105, .62) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    background-color: #059669 !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 9px 18px rgba(5, 150, 105, .22) !important;
}

.certificate-page a.link-button.subtle.certificate-preview-print:hover,
.certificate-page .certificate-register-table .boq-action-buttons a.icon-action.print[href*="certificates/print"]:hover,
.certificate-page a.icon-action.print[href*="certificates/print"]:hover {
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #059669 0%, #065f46 100%) !important;
    background-color: #047857 !important;
}

.certificate-page a.link-button.subtle.certificate-preview-print svg,
.certificate-page .certificate-register-table .boq-action-buttons a.icon-action.print[href*="certificates/print"] svg,
.certificate-page a.icon-action.print[href*="certificates/print"] svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* BOQ index: create form lives inside the draft register card above the table. */
.boqs-page .boq-create-inline {
    margin: 12px 0 14px !important;
    padding: 13px !important;
    border: 1px solid rgba(14, 116, 144, .18) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, rgba(239,246,255,.92), rgba(236,253,245,.74)),
        #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 10px 22px rgba(15,23,42,.06) !important;
}

.boqs-page .boq-create-inline h3 {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 11px !important;
    color: #0f2947 !important;
    font-size: 14px !important;
    font-weight: 950 !important;
}

.boqs-page .boq-create-inline h3 svg {
    width: 17px !important;
    height: 17px !important;
    color: #0f766e !important;
}

.boqs-page .boq-create-inline .boq-create-form {
    margin: 0 !important;
}

/* Certificates archive: give actions room and make certificate print actions green. */
.certificate-page .certificate-register-table .cert-register-col-actions {
    width: 15% !important;
}

.certificate-page .certificate-register-table .cert-register-col-title {
    width: 20% !important;
}

.certificate-page .certificate-register-table tbody td:nth-child(10) {
    padding-inline: 6px !important;
}

.certificate-page .certificate-register-table .boq-action-buttons {
    gap: 5px !important;
    justify-content: center !important;
}

.certificate-page .certificate-register-table .boq-action-buttons .icon-action {
    flex-basis: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
}

.certificate-page .certificate-register-table .boq-action-buttons .icon-action.print,
.certificate-page .certificate-preview-print {
    border-color: rgba(5, 150, 105, .56) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 8px 18px rgba(5, 150, 105, .20) !important;
}

.certificate-page .certificate-register-table .boq-action-buttons .icon-action.print svg,
.certificate-page .certificate-preview-print svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Cash register: wider receivables actions and green record-payment icon. */
.cash-register-page .cash-register-card.orange .cash-register-table .actions {
    width: 140px !important;
}

.cash-register-page .cash-register-card.orange .cash-register-table td:last-child {
    min-width: 140px !important;
    padding-inline: 6px !important;
    white-space: nowrap !important;
}

.cash-register-page .cash-register-card.orange .cash-register-table td:last-child .icon-action {
    margin-inline: 2px !important;
}

.cash-register-page .cash-register-card.orange .cash-register-table .icon-action.add,
.cash-register-page .cash-register-card.orange .cash-register-table button.icon-action.add[data-payment] {
    border-color: rgba(5, 150, 105, .58) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #10b981 0%, #047857 100%) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 8px 16px rgba(5, 150, 105, .20) !important;
}

.cash-register-page .cash-register-card.orange .cash-register-table .icon-action.add svg,
.cash-register-page .cash-register-card.orange .cash-register-table button.icon-action.add[data-payment] svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Cash flow AI action must be orange, not the global blue button style. */
.cash-page .cash-btn.ai-primary,
.cash-page a.cash-btn.ai-primary,
.cash-page button.cash-btn.ai-primary,
.cash-page [data-cash-ai-generate].cash-btn {
    border-color: rgba(249, 115, 22, .72) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #f97316 0%, #d97706 100%) !important;
    background-color: #f97316 !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 9px 18px rgba(249, 115, 22, .22) !important;
}

.cash-page .cash-btn.ai-primary:hover,
.cash-page a.cash-btn.ai-primary:hover,
.cash-page button.cash-btn.ai-primary:hover,
.cash-page [data-cash-ai-generate].cash-btn:hover {
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #ea580c 0%, #b45309 100%) !important;
    background-color: #ea580c !important;
}

.cash-page .cash-btn.ai-primary svg,
.cash-page [data-cash-ai-generate].cash-btn svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Planned schedule toolbar final polish. */
.schedule-page .schedule-items-heading {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.schedule-page .schedule-items-heading > div:first-child {
    margin-inline-end: 0 !important;
}

.schedule-page .schedule-heading-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.schedule-page .schedule-heading-spacer {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 12px !important;
}

.schedule-page .schedule-items-heading .schedule-gantt-link,
.schedule-page .schedule-items-heading .schedule-toolbar-button[data-status-settings-open] {
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    border: 1px solid rgba(37, 99, 235, .34) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .18) !important;
}

.schedule-page .schedule-items-heading .schedule-gantt-link svg,
.schedule-page .schedule-items-heading .schedule-toolbar-button[data-status-settings-open] svg {
    color: #fff !important;
    stroke: #fff !important;
}

.schedule-page .schedule-print-button,
.schedule-page button[data-schedule-print],
.schedule-page .schedule-items-heading .schedule-print-button,
.schedule-gantt-page .schedule-print-button,
.schedule-gantt-page button[data-schedule-print] {
    background: linear-gradient(135deg, #15803d, #16a34a) !important;
    border: 1px solid rgba(22, 163, 74, .34) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .18) !important;
}

.schedule-page .schedule-print-button:hover,
.schedule-page .schedule-print-button:focus,
.schedule-page .schedule-print-button:focus-visible,
.schedule-page button[data-schedule-print]:hover,
.schedule-page button[data-schedule-print]:focus,
.schedule-page button[data-schedule-print]:focus-visible,
.schedule-gantt-page .schedule-print-button:hover,
.schedule-gantt-page .schedule-print-button:focus,
.schedule-gantt-page .schedule-print-button:focus-visible,
.schedule-gantt-page button[data-schedule-print]:hover,
.schedule-gantt-page button[data-schedule-print]:focus,
.schedule-gantt-page button[data-schedule-print]:focus-visible {
    background: linear-gradient(135deg, #166534, #15803d) !important;
    border-color: rgba(21, 128, 61, .52) !important;
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(22, 163, 74, .24) !important;
    outline: 2px solid rgba(34, 197, 94, .22) !important;
    outline-offset: 2px !important;
}

.schedule-page .schedule-print-button svg,
.schedule-page button[data-schedule-print] svg,
.schedule-gantt-page .schedule-print-button svg,
.schedule-gantt-page button[data-schedule-print] svg {
    color: #fff !important;
    stroke: #fff !important;
}

.schedule-page .schedule-add-period {
    background: linear-gradient(135deg, #15803d, #22c55e) !important;
    border-color: rgba(22, 163, 74, .38) !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(22, 163, 74, .16) !important;
}

.schedule-page .schedule-add-period svg {
    color: #fff !important;
    stroke: #fff !important;
}

/* Schedule requested layout refinements. */
.schedule-page .schedule-hero form {
    min-width: min(560px, 100%) !important;
}

.schedule-page .schedule-hero {
    grid-template-columns: minmax(0, 1fr) minmax(520px, 680px) !important;
}

.schedule-page .schedule-hero label,
.schedule-page .schedule-hero select {
    width: 100% !important;
}

.schedule-page .schedule-hero select {
    min-width: min(520px, 100%) !important;
}

.schedule-page .schedule-items-heading {
    flex-wrap: wrap !important;
}

.schedule-page .schedule-items-heading > div:first-child {
    flex: 0 0 100% !important;
    width: 100% !important;
}

.schedule-page .schedule-items-heading > div:first-child span {
    width: fit-content !important;
}

.schedule-page .schedule-items-heading .schedule-heading-actions {
    order: 2 !important;
}

.schedule-page .schedule-items-heading .schedule-heading-spacer {
    order: 3 !important;
}

.schedule-page .schedule-items-heading .schedule-print-button {
    order: 4 !important;
}

.schedule-page .schedule-add-period {
    width: 39px !important;
    min-width: 39px !important;
    height: 39px !important;
    min-height: 39px !important;
    flex-basis: 39px !important;
    border-radius: 10px !important;
}

.schedule-page .schedule-add-period svg {
    width: 20px !important;
    height: 20px !important;
}

@media (max-width: 980px) {
    .schedule-page .schedule-hero {
        grid-template-columns: 1fr !important;
    }

    .schedule-page .schedule-hero form,
    .schedule-page .schedule-hero select {
        min-width: 0 !important;
    }
}

@media print {
    .schedule-items-panel .schedule-table svg,
    .schedule-items-panel .schedule-table .icon-action,
    .schedule-items-panel .schedule-table button,
    .schedule-items-panel .schedule-table form,
    .schedule-items-panel .schedule-add-period {
        display: none !important;
    }
}

/* Hard lock schedule green actions against global blue button rules. */
html body .schedule-page button.link-button[data-schedule-print],
html body .schedule-page .schedule-print-button.link-button,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print],
html body .schedule-gantt-page .schedule-primary-actions button[data-schedule-print],
html body .schedule-items-panel .schedule-panel-heading button.schedule-print-button[data-schedule-print] {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
    background-color: #16a34a !important;
    border-color: rgba(21, 128, 61, .5) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .20) !important;
}

html body .schedule-page button.link-button[data-schedule-print]:hover,
html body .schedule-page button.link-button[data-schedule-print]:focus,
html body .schedule-page button.link-button[data-schedule-print]:active,
html body .schedule-page button.link-button[data-schedule-print]:focus-visible,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print]:hover,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print]:focus,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print]:active,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print]:focus-visible {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
    background-color: #15803d !important;
    border-color: rgba(21, 128, 61, .62) !important;
    color: #fff !important;
    outline-color: rgba(34, 197, 94, .28) !important;
}

html body .schedule-page button.link-button[data-schedule-print] svg,
html body .schedule-gantt-page button.link-button.subtle.schedule-toolbar-button.schedule-print-button[data-schedule-print] svg {
    color: #fff !important;
    stroke: currentColor !important;
}

html body .schedule-page a.link-button.schedule-actual-link,
html body .schedule-gantt-page a.link-button.schedule-actual-link,
html body .schedule-page .schedule-items-heading .schedule-heading-actions a.link-button.schedule-actual-link,
html body .schedule-gantt-page .schedule-primary-actions a.link-button.schedule-actual-link {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    background-color: #f97316 !important;
    border-color: rgba(234, 88, 12, .62) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(234, 88, 12, .22), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
}

html body .schedule-page a.link-button.schedule-actual-link:hover,
html body .schedule-page a.link-button.schedule-actual-link:focus,
html body .schedule-gantt-page a.link-button.schedule-actual-link:hover,
html body .schedule-gantt-page a.link-button.schedule-actual-link:focus {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    background-color: #ea580c !important;
    border-color: rgba(194, 65, 12, .72) !important;
    color: #fff !important;
}

html body .schedule-page a.link-button.schedule-actual-link svg,
html body .schedule-gantt-page a.link-button.schedule-actual-link svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Planned schedule items table redesign. */
html body main.schedule-page .schedule-items-panel .schedule-table {
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 7px !important;
}

html body main.schedule-page .schedule-items-panel .schedule-table thead th {
    white-space: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(1) { width: 6% !important; }
html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(2) { width: 30% !important; }
html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(3) { width: 19% !important; }
html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(4) { width: 17% !important; }
html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(5) { width: 13% !important; }
html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(6) { width: 15% !important; }

html body main.schedule-page .schedule-items-panel .schedule-table td {
    vertical-align: middle !important;
    border-top: 1px solid rgba(148, 163, 184, .26) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .26) !important;
}

html body main.schedule-page .schedule-items-panel .schedule-table .schedule-item-main-row td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

html body main.schedule-page .schedule-item-main-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, .28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(219, 234, 254, .82), rgba(239, 246, 255, .54)),
        rgba(255, 255, 255, .92);
    box-shadow: inset 4px 0 0 rgba(37, 99, 235, .48), 0 8px 18px rgba(15, 23, 42, .06);
}

html[dir="rtl"] body main.schedule-page .schedule-item-main-card {
    box-shadow: inset -4px 0 0 rgba(37, 99, 235, .48), 0 8px 18px rgba(15, 23, 42, .06);
}

html body main.schedule-page .schedule-item-main-text {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

html body main.schedule-page .schedule-item-main-text strong {
    flex: 0 0 auto;
    min-width: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 3px 8px;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(135deg, #0f3f6f, #2563eb);
    font-size: 11px;
    font-weight: 950;
}

html body main.schedule-page .schedule-item-main-text span {
    min-width: 0;
    color: #102a43;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html body main.schedule-page .schedule-item-main-text em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    color: #92400e;
    background: rgba(254, 243, 199, .92);
    font-style: normal;
    font-size: 9px;
    font-weight: 900;
}

html body main.schedule-page .schedule-item-main-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding-inline-end: 132px;
}

html body main.schedule-page .schedule-item-main-meta span {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid rgba(148, 163, 184, .24);
    color: #17324d;
    background: rgba(255, 255, 255, .74);
    font-size: 9px;
    font-weight: 850;
}

html body main.schedule-page .schedule-item-main-meta svg {
    width: 13px;
    height: 13px;
}

html body main.schedule-page .schedule-item-main-meta b {
    color: #0f172a;
    font-size: 10px;
    font-weight: 950;
}

html body main.schedule-page .schedule-item-main-meta .schedule-item-meta-unit {
    background: rgba(236, 253, 245, .86);
    border-color: rgba(16, 185, 129, .26);
}

html body main.schedule-page .schedule-item-main-meta .schedule-item-meta-qty {
    background: rgba(255, 251, 235, .90);
    border-color: rgba(245, 158, 11, .26);
}

html body main.schedule-page .schedule-item-main-meta .schedule-item-meta-weight {
    background: rgba(238, 242, 255, .90);
    border-color: rgba(99, 102, 241, .25);
}

html body main.schedule-page .schedule-item-main-meta .schedule-item-meta-remain {
    background: rgba(254, 242, 242, .90);
    border-color: rgba(239, 68, 68, .24);
    color: #991b1b;
}

html body main.schedule-page .schedule-item-main-card > .schedule-add-period {
    position: absolute;
    inset-inline-end: 12px;
    top: auto;
    bottom: 10px;
    width: auto !important;
    height: 34px !important;
    min-width: 116px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 0 12px !important;
    color: #fff !important;
    border-color: rgba(21, 128, 61, .55) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    box-shadow: 0 8px 16px rgba(21, 128, 61, .20) !important;
}

html body main.schedule-page .schedule-item-main-card > .schedule-add-period span {
    display: inline !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

html body main.schedule-page .schedule-item-main-card > .schedule-add-period svg {
    width: 15px !important;
    height: 15px !important;
    color: #fff !important;
    stroke: currentColor !important;
}

html body main.schedule-page .schedule-period-row td {
    background: rgba(255, 255, 255, .96) !important;
    padding: 8px 9px !important;
    font-size: 10.5px !important;
    color: #102a43 !important;
}

html body main.schedule-page .schedule-period-row td:first-child {
    border-inline-start: 3px solid rgba(37, 99, 235, .38) !important;
}

html body main.schedule-page .schedule-period-row.is-empty td {
    background: rgba(248, 250, 252, .94) !important;
}

html body main.schedule-page .schedule-period-index {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1d4ed8;
    background: rgba(219, 234, 254, .92);
    border: 1px solid rgba(37, 99, 235, .18);
    font-weight: 950;
}

html body main.schedule-page .schedule-period-name strong {
    display: block;
    color: #0f172a;
    font-size: 10.8px;
    font-weight: 950;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html body main.schedule-page .schedule-period-dates-cell {
    text-align: center;
    color: #334155 !important;
    font-weight: 850;
    white-space: normal !important;
}

html body main.schedule-page .schedule-period-dates-cell svg {
    width: 13px;
    height: 13px;
    margin-inline: 5px;
    color: #2563eb;
    vertical-align: middle;
}

html body main.schedule-page .schedule-period-share-cell {
    min-width: 0;
}

html body main.schedule-page .schedule-period-share {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

html body main.schedule-page .schedule-period-share span {
    position: relative;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(226, 232, 240, .92);
}

html body main.schedule-page .schedule-period-share span::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--share, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

html body main.schedule-page .schedule-period-share b {
    min-width: 46px;
    color: #0f172a;
    font-size: 10.5px;
    font-weight: 950;
    text-align: end;
}

html body main.schedule-page .schedule-period-empty-text {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #64748b;
    background: rgba(241, 245, 249, .96);
    font-size: 10px;
    font-weight: 900;
}

html body main.schedule-page .schedule-period-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

html body main.schedule-page .schedule-period-actions form {
    margin: 0 !important;
    display: inline-flex !important;
}

html body main.schedule-page .schedule-period-actions .icon-action {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    flex: 0 0 30px !important;
    aspect-ratio: 1 / 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
    padding: 0 !important;
}

html body main.schedule-page .schedule-period-actions .icon-action svg {
    width: 14px !important;
    height: 14px !important;
    flex: 0 0 14px !important;
}

html body main.schedule-page .schedule-period-actions .icon-action.material-link {
    color: #fff !important;
    border-color: rgba(21, 128, 61, .50) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

html body main.schedule-page .schedule-period-actions .icon-action.edit {
    color: #fff !important;
    border-color: rgba(37, 99, 235, .50) !important;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}

html body main.schedule-page .schedule-period-actions .icon-action.danger {
    color: #fff !important;
    border-color: rgba(185, 28, 28, .50) !important;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
}

html body main.schedule-page .schedule-period-actions .icon-action small {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -6px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: #ea580c;
    border: 1.5px solid #fff;
    font-size: 8px;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 3px 7px rgba(234, 88, 12, .26);
}

@media print {
    html body main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
    html body main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6) {
        display: none !important;
    }

    html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(1) { width: 7% !important; }
    html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(2) { width: 34% !important; }
    html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(3) { width: 23% !important; }
    html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(4) { width: 20% !important; }
    html body main.schedule-page .schedule-items-panel .schedule-table thead th:nth-child(5) { width: 16% !important; }

    html body main.schedule-page .schedule-item-main-card > .schedule-add-period,
    html body main.schedule-page .schedule-period-actions,
    html body main.schedule-page .schedule-period-actions form,
    html body main.schedule-page .schedule-period-actions button {
        display: none !important;
    }
}

html body .schedule-page .schedule-table button.icon-action.schedule-add-period,
html body .schedule-page button.icon-action.schedule-add-period[data-period-add] {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%) !important;
    background-color: #16a34a !important;
    border-color: rgba(21, 128, 61, .52) !important;
    color: #fff !important;
}

html body .schedule-page .schedule-table button.icon-action.schedule-add-period:hover,
html body .schedule-page button.icon-action.schedule-add-period[data-period-add]:hover,
html body .schedule-page .schedule-table button.icon-action.schedule-add-period:focus-visible,
html body .schedule-page button.icon-action.schedule-add-period[data-period-add]:focus-visible {
    background: linear-gradient(135deg, #166534 0%, #16a34a 100%) !important;
    background-color: #15803d !important;
    color: #fff !important;
}

html body .schedule-period-dialog .primary-button,
html body .schedule-period-dialog button.primary-button[type="submit"] {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
    background-color: #16a34a !important;
    border-color: rgba(21, 128, 61, .5) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .20) !important;
}

html body .schedule-period-dialog .primary-button:hover,
html body .schedule-period-dialog .primary-button:focus-visible {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
    background-color: #15803d !important;
    color: #fff !important;
}

/* Final analysis item picker color balance. */
html body main.analysis-page .analysis-item-picker > button.analysis-picker-toggle[type="button"],
html body .analysis-page .analysis-create-table .analysis-item-picker > button.analysis-picker-toggle[type="button"] {
    border-color: rgba(15, 118, 110, .16) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        linear-gradient(135deg, rgba(8,145,178,.045), rgba(15,118,110,.035)) !important;
    background-color: rgba(255,255,255,.86) !important;
    color: #123046 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        0 5px 12px rgba(15,23,42,.035) !important;
}

html body main.analysis-page .analysis-picker-list button[type="button"],
html body .analysis-page .analysis-picker-menu .analysis-picker-list button[type="button"] {
    border-color: rgba(15, 118, 110, .13) !important;
    background: rgba(204, 251, 241, .34) !important;
    background-image: none !important;
    color: #111827 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .045) !important;
}

html body main.analysis-page .analysis-picker-list button[type="button"]:hover,
html body main.analysis-page .analysis-picker-list button[type="button"]:focus,
html body main.analysis-page .analysis-picker-list button[type="button"]:focus-visible,
html body main.analysis-page .analysis-picker-list button[type="button"].selected,
html body .analysis-page .analysis-picker-menu .analysis-picker-list button[type="button"]:hover,
html body .analysis-page .analysis-picker-menu .analysis-picker-list button[type="button"]:focus,
html body .analysis-page .analysis-picker-menu .analysis-picker-list button[type="button"]:focus-visible,
html body .analysis-page .analysis-picker-menu .analysis-picker-list button[type="button"].selected {
    border-color: rgba(15, 118, 110, .22) !important;
    background: rgba(153, 246, 228, .46) !important;
    background-image: none !important;
    color: #0f172a !important;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .08) !important;
    outline: none !important;
}

/* Technical-office discipline actions. */
html body .project-technical-page .project-detail-header .badges > a.technical-print-settings-action {
    border-color: rgba(21, 128, 61, .56) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(21, 128, 61, .20) !important;
}

.project-technical-page .technical-discipline-create-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px 0 18px;
}

html body .project-technical-page .technical-discipline-create-action.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 440px);
    min-height: 50px;
    padding: 12px 28px;
    border: 1px solid rgba(234, 88, 12, .60) !important;
    border-radius: 12px;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #fb923c 0%, #ea580c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.30),
        0 12px 24px rgba(234, 88, 12, .22) !important;
    font-size: 15px;
    font-weight: 900;
}

html body .project-technical-page .technical-discipline-create-action.primary-button:hover,
html body .project-technical-page .technical-discipline-create-action.primary-button:focus-visible {
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #f97316 0%, #c2410c 100%) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

html body .project-technical-page .technical-discipline-create-action.primary-button svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

/* Distinct technical-discipline cards: larger department emblem and aligned tools. */
.project-technical-page .discipline-card-title-strip {
    grid-template-columns: 52px 1fr 18px !important;
    min-height: 62px !important;
}

.project-technical-page .discipline-card-title-strip > svg {
    width: 46px !important;
    height: 46px !important;
    padding: 9px !important;
    color: #fff !important;
    border-color: color-mix(in srgb, var(--card-a) 45%, #fff) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #2563eb 12%), color-mix(in srgb, var(--card-a) 70%, #0f172a 30%)) !important;
    box-shadow: 0 9px 18px color-mix(in srgb, var(--card-a) 26%, transparent) !important;
}

.project-technical-page .discipline-card-tools {
    gap: 6px !important;
}

.project-technical-page .discipline-card-tools .icon-action {
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.project-technical-page .discipline-card-tools a.icon-action {
    border-color: color-mix(in srgb, var(--card-a) 30%, #dbeafe) !important;
    color: var(--card-a) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        color-mix(in srgb, var(--card-a) 10%, #fff) !important;
}

.project-technical-page .discipline-card-tools .icon-action.danger {
    border-color: rgba(220, 38, 38, .30) !important;
    color: #dc2626 !important;
    background: linear-gradient(145deg, #fff7f7, #ffe5e5) !important;
}

.project-technical-page .discipline-card-tools .icon-action:hover,
.project-technical-page .discipline-card-tools .icon-action:focus-visible {
    transform: translateY(-2px) !important;
    box-shadow: 0 9px 18px rgba(15,23,42,.14) !important;
}

.project-technical-page .discipline-card-tools .icon-action svg {
    width: 17px !important;
    height: 17px !important;
}

/* Use the same solid, high-contrast action treatment as technical-office controls. */
html body .project-technical-page .discipline-card-tools a.icon-action.edit {
    border-color: color-mix(in srgb, var(--card-a) 62%, #0f172a) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, color-mix(in srgb, var(--card-a) 86%, #2563eb 14%), color-mix(in srgb, var(--card-a) 72%, #0f172a 28%)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        0 8px 16px color-mix(in srgb, var(--card-a) 24%, transparent) !important;
}

html body .project-technical-page .discipline-card-tools button.icon-action.danger {
    border-color: rgba(185, 28, 28, .66) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 8px 16px rgba(185,28,28,.20) !important;
}

html body .project-technical-page .discipline-card-tools .icon-action:hover,
html body .project-technical-page .discipline-card-tools .icon-action:focus-visible {
    filter: brightness(1.05);
    transform: translateY(-2px) !important;
}

/* Let long department names breathe instead of truncating them. */
.project-technical-page .discipline-card-title-strip,
.project-site-page .site-discipline-card-title-strip {
    min-height: 72px !important;
}

.project-technical-page .discipline-card-title-strip h2,
.project-site-page .site-discipline-card-title-strip h2 {
    display: -webkit-box !important;
    overflow: visible !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal !important;
    text-overflow: clip !important;
}

/* Site-management modules as clear, half-page action strips. */
.project-site-page .site-module-preview {
    gap: 14px;
}

.project-site-page .site-module-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-site-page .site-module-preview-card,
.project-site-page .site-module-preview-card.is-link {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 26px;
    align-items: center;
    min-height: 112px;
    gap: 14px;
    overflow: hidden;
    padding: 16px 18px;
    border: 1px solid rgba(30, 64, 175, .18);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--module-color, #2563eb) 12%, #fff), rgba(255,255,255,.93) 44%, rgba(255,255,255,.98)),
        #fff;
    box-shadow: 0 10px 22px rgba(15,23,42,.075), inset 0 1px 0 rgba(255,255,255,.95);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.project-site-page .site-module-preview-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--module-color, #2563eb), color-mix(in srgb, var(--module-color, #2563eb) 70%, #0f172a));
}

.project-site-page .site-module-preview-card::after {
    content: "";
    width: 18px;
    height: 18px;
    border-top: 2px solid var(--module-color, #2563eb);
    border-inline-end: 2px solid var(--module-color, #2563eb);
    transform: rotate(45deg);
    opacity: .76;
}

.project-site-page .site-module-preview-card:nth-child(1) { --module-color: #0f766e; }
.project-site-page .site-module-preview-card:nth-child(2) { --module-color: #2563eb; }
.project-site-page .site-module-preview-card:nth-child(3) { --module-color: #c2410c; }
.project-site-page .site-module-preview-card:nth-child(4) { --module-color: #7c3aed; }
.project-site-page .site-module-preview-card:nth-child(5) { --module-color: #15803d; }
.project-site-page .site-module-preview-card:nth-child(6) { --module-color: #0e7490; }

.project-site-page .site-module-preview-card > span {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%), linear-gradient(180deg, var(--module-color), color-mix(in srgb, var(--module-color) 72%, #0f172a));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 9px 18px color-mix(in srgb, var(--module-color) 22%, transparent);
}

.project-site-page .site-module-preview-card > span svg {
    width: 28px;
    height: 28px;
}

.project-site-page .site-module-preview-card h2 {
    margin: 0 0 5px;
    color: var(--module-color);
    font-size: 16px;
    font-weight: 950;
    line-height: 1.3;
}

.project-site-page .site-module-preview-card p {
    margin: 0;
    color: #475569;
    font-size: 11.5px;
    font-weight: 750;
    line-height: 1.55;
}

.project-site-page .site-module-preview-card.is-link:hover,
.project-site-page .site-module-preview-card.is-link:focus-visible {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--module-color) 48%, #dbeafe);
    box-shadow: 0 18px 30px rgba(15,23,42,.14);
    outline: none;
}

@media (max-width: 820px) {
    .project-site-page .site-module-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* Execution/site management buttons and icons mirror the technical-office action language. */
html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(
    .primary-button,
    .link-button,
    .actual-log-button,
    .actual-reset-filter,
    .site-material-print-btn,
    .exec-report-actions button,
    .daily-report-actions button,
    button:not(.icon-action):not(.daily-photo-open):not(.daily-photo-nav):not(.daily-photo-close),
    a.btn,
    button.btn
) {
    min-height: 42px !important;
    border-radius: 11px !important;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(37, 99, 235, .20) !important;
    font-weight: 900 !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(
    .primary-button,
    .link-button,
    .actual-log-button,
    .actual-reset-filter,
    .site-material-print-btn,
    .exec-report-actions button,
    .daily-report-actions button,
    button:not(.icon-action):not(.daily-photo-open):not(.daily-photo-nav):not(.daily-photo-close),
    a.btn,
    button.btn
) svg {
    width: 18px !important;
    height: 18px !important;
    color: currentColor !important;
    stroke-width: 2.3 !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(
    .primary-button:hover,
    .link-button:hover,
    .actual-log-button:hover,
    .actual-reset-filter:hover,
    .site-material-print-btn:hover,
    .exec-report-actions button:hover,
    .daily-report-actions button:hover,
    button:not(.icon-action):not(.daily-photo-open):not(.daily-photo-nav):not(.daily-photo-close):hover,
    a.btn:hover,
    button.btn:hover
) {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

html body .certificate-page .certificate-form-actions a.primary-button.certificate-cancel-edit-button,
html body .certificate-page .certificate-form-actions a.primary-button.certificate-cancel-edit-button:hover,
html body .certificate-page .certificate-form-actions a.primary-button.certificate-cancel-edit-button:focus-visible {
    color: #fff !important;
    border-color: rgba(220, 38, 38, .68) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 10px 20px rgba(185, 28, 28, .20) !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(
    .print,
    .site-material-print-btn,
    .schedule-print-button,
    button[onclick*="print"],
    button[data-print],
    button[data-print-report],
    a[href*="print"],
    .exec-report-actions button,
    .daily-report-actions button.print
) {
    border-color: rgba(21, 128, 61, .58) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(21, 128, 61, .22) !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(
    .icon-action,
    .action-icon,
    .table-actions a,
    .table-actions button
) {
    display: inline-grid !important;
    place-items: center !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 9px !important;
    border: 1px solid rgba(37, 99, 235, .34) !important;
    color: #2563eb !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.70)),
        rgba(219, 234, 254, .65) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 7px 14px rgba(15,23,42,.08) !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(.icon-action, .action-icon, .table-actions a, .table-actions button) svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.35 !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(.icon-action.print, .action-icon.print, a[href*="print"].icon-action) {
    border-color: rgba(21, 128, 61, .52) !important;
    color: #15803d !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        rgba(220, 252, 231, .78) !important;
}

html body :is(
    .project-site-page,
    .site-daily-page,
    .site-report-view-page,
    .actual-execution-page,
    .actual-history-page,
    .site-material-page,
    .executive-status-report
) :is(.icon-action.danger, .action-icon.danger, button.danger, a.danger) {
    border-color: rgba(220, 38, 38, .38) !important;
    color: #dc2626 !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        rgba(254, 226, 226, .78) !important;
}

/* Actual execution page exact action overrides. */
html body .actual-execution-page a.actual-log-button.print[href*="site/actual-execution/print"] {
    border-color: rgba(21, 128, 61, .58) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(21, 128, 61, .22) !important;
}

html body .actual-history-page .actual-approval-form .actual-approve-button {
    border-color: rgba(21, 128, 61, .58) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow: 0 8px 16px rgba(21,128,61,.18), inset 0 1px 0 rgba(255,255,255,.25) !important;
}

html body .actual-history-page .actual-approval-form .actual-reject-button {
    border-color: rgba(185, 28, 28, .62) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow: 0 8px 16px rgba(185,28,28,.18), inset 0 1px 0 rgba(255,255,255,.22) !important;
}

html body .actual-history-page button.actual-history-icon-button.actual-history-edit-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 7px !important;
    padding: 0 !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    color: #2563eb !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        rgba(219, 234, 254, .78) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 14px rgba(15,23,42,.08) !important;
}

html body .actual-history-page button.actual-history-icon-button.actual-history-edit-button svg {
    width: 15px !important;
    height: 15px !important;
}

/* Site discipline cards mirror the technical-office department cards. */
.project-site-page .site-discipline-grid {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)) !important;
    gap: 18px !important;
}

.project-site-page .site-discipline-card-premium {
    position: relative;
    display: grid;
    grid-template-rows: 96px minmax(48px, auto) auto;
    min-height: 228px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--card-a) 22%, #dbe7ee);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15,23,42,.09), inset 0 1px 0 rgba(255,255,255,.95);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-site-page .site-discipline-card-premium:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--card-a) 48%, #dbe7ee);
    box-shadow: 0 20px 36px rgba(15,23,42,.14);
}

.project-site-page .site-discipline-card-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 94%, #0f172a), color-mix(in srgb, var(--card-c) 80%, #0f172a));
}

.project-site-page .site-discipline-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.16), transparent 43%, rgba(255,255,255,.06));
}

.project-site-page .site-discipline-card-media > img,
.project-site-page .site-discipline-logo-fallback {
    width: 100%;
    height: 100%;
    opacity: .18;
    transform: scale(1.06);
    object-fit: cover;
}

.project-site-page .site-discipline-logo-fallback {
    display: grid;
    place-items: center;
    color: #fff;
}

.project-site-page .site-discipline-logo-fallback svg {
    width: 44px;
    height: 44px;
}

.project-site-page .site-discipline-card-media > span {
    position: absolute;
    z-index: 3;
    top: 10px;
    inset-inline-end: 11px;
    padding: 4px 9px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(15,23,42,.25);
    font-size: 10px;
    font-weight: 900;
}

.project-site-page .site-discipline-card-title-strip {
    position: absolute;
    z-index: 4;
    inset-inline: 14px;
    top: 50%;
    display: grid;
    grid-template-columns: 52px 1fr 18px;
    align-items: center;
    min-height: 62px;
    padding: 7px 10px;
    transform: translateY(-50%);
    border: 1px solid color-mix(in srgb, var(--card-a) 25%, #fff);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.62));
    box-shadow: 0 12px 22px rgba(15,23,42,.11), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(12px);
}

.project-site-page .site-discipline-card-title-strip > svg {
    width: 46px;
    height: 46px;
    padding: 9px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #2563eb 12%), color-mix(in srgb, var(--card-a) 70%, #0f172a 30%));
    box-shadow: 0 9px 18px color-mix(in srgb, var(--card-a) 26%, transparent);
}

.project-site-page .site-discipline-card-title-strip h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.25;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-site-page .site-discipline-card-body {
    padding: 14px 16px 10px;
}

.project-site-page .site-discipline-card-body h2 {
    display: none;
}

.project-site-page .site-discipline-card-body p {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.project-site-page .site-discipline-card-actions {
    padding: 10px 16px 13px;
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(248,250,252,.98));
}

.project-site-page .site-discipline-card-actions > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--card-a) 42%, #fff);
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-a) 88%, #2563eb 12%), color-mix(in srgb, var(--card-a) 74%, #0f172a 26%));
    box-shadow: 0 10px 20px color-mix(in srgb, var(--card-a) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.28);
    font-size: 12px;
    font-weight: 900;
}

.project-site-page .site-discipline-card-actions svg {
    width: 17px;
    height: 17px;
}

/* Final hard override for actual execution actions. Keep this block last. */
html body .actual-execution-page a.actual-log-button.print,
html body .actual-execution-page a.actual-log-button[href*="actual-execution%2Fprint"],
html body .actual-execution-page a.actual-log-button[href*="actual-execution/print"] {
    border-color: rgba(21, 128, 61, .62) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(21, 128, 61, .22) !important;
}

html body .actual-execution-page a.actual-log-button.print svg,
html body .actual-execution-page a.actual-log-button[href*="actual-execution%2Fprint"] svg,
html body .actual-execution-page a.actual-log-button[href*="actual-execution/print"] svg {
    color: #fff !important;
}

html body .actual-history-page .actual-approval-form button[name="decision"][value="approved"],
html body .actual-history-page .actual-approval-form button.actual-approve-button {
    border-color: rgba(21, 128, 61, .62) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 8px 16px rgba(21,128,61,.18) !important;
}

html body .actual-history-page .actual-approval-form button[name="decision"][value="rejected"],
html body .actual-history-page .actual-approval-form button.actual-reject-button {
    border-color: rgba(185, 28, 28, .66) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 8px 16px rgba(185,28,28,.18) !important;
}

html body .actual-history-page button.actual-history-icon-button[data-edit-actual-entry],
html body .actual-history-page button.actual-history-icon-button.actual-history-edit-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    padding: 0 !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    color: #2563eb !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        rgba(219,234,254,.78) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 7px 14px rgba(15,23,42,.08) !important;
}

html body .actual-history-page button.actual-history-icon-button[data-edit-actual-entry] svg,
html body .actual-history-page button.actual-history-icon-button.actual-history-edit-button svg {
    width: 15px !important;
    height: 15px !important;
}

/* Higher-specificity fixes for actual execution controls after broad site button rules. */
html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.print[href*="actual-execution%2Fprint"],
html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.print[href*="actual-execution/print"] {
    border-color: rgba(21, 128, 61, .68) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 10px 20px rgba(21,128,61,.24) !important;
}

html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.actual-schedule-button {
    border-color: rgba(234, 88, 12, .68) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #fb923c 0%, #ea580c 100%) !important;
    background-color: #f97316 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 10px 20px rgba(234,88,12,.24) !important;
}

html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.actual-schedule-button:hover,
html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.actual-schedule-button:focus {
    border-color: rgba(194, 65, 12, .76) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent 44%),
        linear-gradient(180deg, #f97316 0%, #c2410c 100%) !important;
    background-color: #ea580c !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        0 12px 22px rgba(194,65,12,.28) !important;
}

html body main.actual-execution-page section.actual-table-panel .actual-panel-heading .actual-panel-actions a.actual-log-button.actual-schedule-button svg {
    color: #fff !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-approval-cell form.actual-approval-form button.actual-approve-button[name="decision"][value="approved"] {
    border-color: rgba(21, 128, 61, .68) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e 0%, #15803d 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 8px 16px rgba(21,128,61,.20) !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-approval-cell form.actual-approval-form button.actual-reject-button[name="decision"][value="rejected"] {
    border-color: rgba(185, 28, 28, .70) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(180deg, #ef4444 0%, #b91c1c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 8px 16px rgba(185,28,28,.20) !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button[data-edit-actual-entry] {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    padding: 0 !important;
    color: #2563eb !important;
    border-color: rgba(37, 99, 235, .44) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(255,255,255,.72)),
        rgba(219,234,254,.82) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 7px 14px rgba(15,23,42,.08) !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    padding: 0 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button.is-active {
    color: #fff !important;
    border-color: rgba(37, 99, 235, .66) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 46%),
        linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 8px 15px rgba(37, 99, 235, .22) !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button.is-disabled {
    color: #64748b !important;
    border-color: rgba(148, 163, 184, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,245,249,.84)),
        #e2e8f0 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
    cursor: not-allowed !important;
    opacity: .72 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button.is-disabled:hover {
    color: #64748b !important;
    border-color: rgba(148, 163, 184, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,245,249,.84)),
        #e2e8f0 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 6px !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions .actual-locked-label {
    width: 100% !important;
    max-width: 92px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 6px !important;
    border-radius: 7px !important;
    color: #475569 !important;
    background: rgba(241, 245, 249, .96) !important;
    border: 1px solid rgba(148, 163, 184, .34) !important;
    font-size: 7.6px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    text-align: center !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions .actual-history-icon-row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-log-button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 6px !important;
    padding: 0 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-log-button.is-active {
    color: #fff !important;
    border-color: rgba(194, 65, 12, .66) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 46%),
        linear-gradient(180deg, #fb923c 0%, #ea580c 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 8px 15px rgba(234, 88, 12, .22) !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-log-button.is-disabled {
    color: #64748b !important;
    border-color: rgba(148, 163, 184, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,245,249,.84)),
        #e2e8f0 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72) !important;
    cursor: not-allowed !important;
    opacity: .72 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-log-button.is-disabled:hover {
    color: #64748b !important;
    border-color: rgba(148, 163, 184, .48) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,245,249,.84)),
        #e2e8f0 !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-log-button svg,
html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td .actual-history-actions button.actual-history-icon-button.actual-history-edit-button[data-edit-actual-entry] svg {
    width: 15px !important;
    height: 15px !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td.actual-period-title .actual-history-period-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
    justify-items: start !important;
}

html[dir="rtl"] body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td.actual-period-title .actual-history-period-meta {
    justify-items: end !important;
}

html body main.actual-execution-page.actual-history-page section.actual-history-panel table.actual-history-table td.actual-period-title .actual-history-period-meta span {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* Final overrides for planned schedule item table controls. */
html body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add] {
    top: auto !important;
    bottom: 10px !important;
    inset-inline-end: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 116px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    flex: 0 0 auto !important;
    aspect-ratio: auto !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%) !important;
    border-color: rgba(21, 128, 61, .52) !important;
    color: #fff !important;
}

html body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add] span {
    display: inline !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

html body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add] svg {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 15px !important;
    color: #fff !important;
}

html body main.schedule-page .schedule-period-actions > button.icon-action,
html body main.schedule-page .schedule-period-actions > form > button.icon-action {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    flex: 0 0 30px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
}

@media print {
    html body main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
    html body main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6),
    html body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add],
    html body main.schedule-page .schedule-items-heading .schedule-heading-actions,
    html body main.schedule-page .schedule-items-heading .schedule-print-button,
    html body main.schedule-page .schedule-items-heading .schedule-gantt-link,
    html body main.schedule-page .schedule-items-heading [data-status-settings-open],
    html body main.schedule-page [data-schedule-print],
    html body main.schedule-page .schedule-period-actions,
    html body main.schedule-page .schedule-period-actions form,
    html body main.schedule-page .schedule-period-actions button {
        display: none !important;
    }
}

html.schedule-table-printing body main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
html.schedule-table-printing body main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6),
html.schedule-table-printing body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add],
html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-heading-actions,
html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-print-button,
html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-gantt-link,
html.schedule-table-printing body main.schedule-page .schedule-items-heading [data-status-settings-open],
html.schedule-table-printing body main.schedule-page [data-schedule-print],
html.schedule-table-printing body main.schedule-page .schedule-period-actions,
html.schedule-table-printing body main.schedule-page .schedule-period-actions form,
html.schedule-table-printing body main.schedule-page .schedule-period-actions button,
body.schedule-table-printing main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
body.schedule-table-printing main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6),
body.schedule-table-printing main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add],
body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-heading-actions,
body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-print-button,
body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-gantt-link,
body.schedule-table-printing main.schedule-page .schedule-items-heading [data-status-settings-open],
body.schedule-table-printing main.schedule-page [data-schedule-print],
body.schedule-table-printing main.schedule-page .schedule-period-actions,
body.schedule-table-printing main.schedule-page .schedule-period-actions form,
body.schedule-table-printing main.schedule-page .schedule-period-actions button {
    display: none !important;
}

@media print {
    html.schedule-table-printing body main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
    html.schedule-table-printing body main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6),
    html.schedule-table-printing body main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add],
    html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-heading-actions,
    html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-print-button,
    html.schedule-table-printing body main.schedule-page .schedule-items-heading .schedule-gantt-link,
    html.schedule-table-printing body main.schedule-page .schedule-items-heading [data-status-settings-open],
    html.schedule-table-printing body main.schedule-page [data-schedule-print],
    html.schedule-table-printing body main.schedule-page .schedule-period-actions,
    html.schedule-table-printing body main.schedule-page .schedule-period-actions form,
    html.schedule-table-printing body main.schedule-page .schedule-period-actions button,
    body.schedule-table-printing main.schedule-page .schedule-items-panel .schedule-table th:nth-child(6),
    body.schedule-table-printing main.schedule-page .schedule-items-panel .schedule-table td:nth-child(6),
    body.schedule-table-printing main.schedule-page .schedule-item-main-card > button.icon-action.schedule-add-period[data-period-add],
    body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-heading-actions,
    body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-print-button,
    body.schedule-table-printing main.schedule-page .schedule-items-heading .schedule-gantt-link,
    body.schedule-table-printing main.schedule-page .schedule-items-heading [data-status-settings-open],
    body.schedule-table-printing main.schedule-page [data-schedule-print],
    body.schedule-table-printing main.schedule-page .schedule-period-actions,
    body.schedule-table-printing main.schedule-page .schedule-period-actions form,
    body.schedule-table-printing main.schedule-page .schedule-period-actions button {
        display: none !important;
    }
}

@media print {
    html body main.schedule-page .schedule-items-panel .schedule-table td.schedule-period-dates-cell svg,
    html body main.schedule-page .schedule-items-panel .schedule-table .schedule-period-dates-cell svg,
    html.schedule-table-printing body main.schedule-page .schedule-items-panel .schedule-table td.schedule-period-dates-cell svg,
    body.schedule-table-printing main.schedule-page .schedule-items-panel .schedule-table td.schedule-period-dates-cell svg {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 13px !important;
        height: 13px !important;
        color: #1d4ed8 !important;
        stroke: #1d4ed8 !important;
        fill: none !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
}

/* Final green print buttons for material takeoff and works report pages. */
html body main.material-takeoff-page button.material-takeoff-print-button,
html body main.material-takeoff-page .material-takeoff-print-button,
html body .material-takeoff-page button.material-takeoff-print-button,
html body .material-takeoff-page .material-takeoff-print-button,
html body main.works-report-page button.works-report-print,
html body main.works-report-page .works-report-print {
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 44%),
        linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important;
    background-color: #16a34a !important;
    border-color: rgba(21, 128, 61, .58) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 10px 20px rgba(21,128,61,.20) !important;
}

html body main.material-takeoff-page button.material-takeoff-print-button:hover,
html body main.material-takeoff-page button.material-takeoff-print-button:focus,
html body main.material-takeoff-page .material-takeoff-print-button:hover,
html body main.material-takeoff-page .material-takeoff-print-button:focus,
html body .material-takeoff-page button.material-takeoff-print-button:hover,
html body .material-takeoff-page button.material-takeoff-print-button:focus,
html body .material-takeoff-page .material-takeoff-print-button:hover,
html body .material-takeoff-page .material-takeoff-print-button:focus,
html body main.works-report-page button.works-report-print:hover,
html body main.works-report-page button.works-report-print:focus,
html body main.works-report-page .works-report-print:hover,
html body main.works-report-page .works-report-print:focus {
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent 44%),
        linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
    background-color: #15803d !important;
    border-color: rgba(21, 128, 61, .68) !important;
}

html body main.material-takeoff-page .material-takeoff-print-button svg,
html body .material-takeoff-page .material-takeoff-print-button svg,
html body main.works-report-page .works-report-print svg {
    color: #fff !important;
    stroke: currentColor !important;
}

.inventory-page .inventory-filter-panel{border:1px solid rgba(15,41,71,.16)!important;border-radius:10px!important;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(240,253,250,.74),rgba(255,247,237,.72))!important;box-shadow:0 14px 32px rgba(15,23,42,.08)!important}
.inventory-page .inventory-filter-panel .inventory-panel-head{margin:-2px 0 12px;padding:4px 2px 9px;border-bottom:1px solid rgba(15,41,71,.12)}
.inventory-page .inventory-filter-panel .inventory-panel-head span{display:inline-flex;align-items:center;gap:8px;color:#0f2947;font-size:13px;font-weight:950}
.inventory-page .inventory-filter-panel .inventory-panel-head span svg{width:17px;height:17px;color:#d97706}
.inventory-page .inventory-filter-panel .inventory-panel-head strong{min-width:34px;text-align:center;border-color:rgba(217,119,6,.25);background:#fff7ed;color:#b45309}
.inventory-page .inventory-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:11px!important}
.inventory-page .inventory-filter-grid label{padding:8px;border:1px solid rgba(148,163,184,.2);border-radius:8px;background:rgba(255,255,255,.82);box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.inventory-page .inventory-filter-grid input,.inventory-page .inventory-filter-grid select{border-color:#a9bac8!important;border-radius:7px!important;background:#fff!important;color:#102f45!important;font-size:11px!important;font-weight:900!important}
.inventory-page .inventory-filter-actions{padding-top:4px!important}
.inventory-page .inventory-filter-actions .inventory-button{border-radius:8px!important}
.inventory-transactions-panel .inventory-timeline{display:none!important}
.inventory-transactions-panel{border-color:rgba(15,41,71,.18)!important;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.92))!important}
.inventory-transactions-table-wrap{overflow-x:hidden!important;border-color:#0f2947!important;border-radius:9px!important}
.inventory-transactions-table{min-width:0!important;table-layout:fixed!important}
.inventory-transactions-table th{background:linear-gradient(180deg,#0f3b66,#08294b)!important;color:#fff!important;font-size:10px!important;line-height:1.25!important}
.inventory-transactions-table td{font-size:10px!important;line-height:1.35!important;padding:7px 5px!important}
.inventory-transactions-table th:nth-child(1),.inventory-transactions-table td:nth-child(1){width:4%!important}
.inventory-transactions-table th:nth-child(2),.inventory-transactions-table td:nth-child(2){width:12%!important}
.inventory-transactions-table th:nth-child(3),.inventory-transactions-table td:nth-child(3){width:12%!important}
.inventory-transactions-table th:nth-child(4),.inventory-transactions-table td:nth-child(4){width:18%!important}
.inventory-transactions-table th:nth-child(5),.inventory-transactions-table td:nth-child(5){width:9%!important}
.inventory-transactions-table th:nth-child(6),.inventory-transactions-table td:nth-child(6){width:11%!important}
.inventory-transactions-table th:nth-child(7),.inventory-transactions-table td:nth-child(7){width:18%!important}
.inventory-transactions-table th:nth-child(8),.inventory-transactions-table td:nth-child(8){width:8%!important}
.inventory-transactions-table th:nth-child(9),.inventory-transactions-table td:nth-child(9){width:8%!important}
.inventory-issue-transactions-table th:nth-child(1),.inventory-issue-transactions-table td:nth-child(1){width:4%!important}
.inventory-issue-transactions-table th:nth-child(2),.inventory-issue-transactions-table td:nth-child(2){width:11%!important}
.inventory-issue-transactions-table th:nth-child(3),.inventory-issue-transactions-table td:nth-child(3){width:11%!important}
.inventory-issue-transactions-table th:nth-child(4),.inventory-issue-transactions-table td:nth-child(4){width:20%!important}
.inventory-issue-transactions-table th:nth-child(5),.inventory-issue-transactions-table td:nth-child(5){width:8%!important}
.inventory-issue-transactions-table th:nth-child(6),.inventory-issue-transactions-table td:nth-child(6){width:6%!important}
.inventory-issue-transactions-table th:nth-child(7),.inventory-issue-transactions-table td:nth-child(7){width:10%!important}
.inventory-issue-transactions-table th:nth-child(8),.inventory-issue-transactions-table td:nth-child(8){width:17%!important}
.inventory-issue-transactions-table th:nth-child(9),.inventory-issue-transactions-table td:nth-child(9){width:8%!important}
.inventory-issue-transactions-table th:nth-child(10),.inventory-issue-transactions-table td:nth-child(10){width:5%!important}
.inventory-transaction-type{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:92px;border-radius:999px;padding:5px 8px;font-size:9px;font-weight:950;white-space:nowrap}
.inventory-transaction-type svg{width:13px;height:13px}
.inventory-transaction-type.stock_in,.inventory-transaction-type.transfer_in,.inventory-transaction-type.return_in{background:#dcfce7;color:#166534}
.inventory-transaction-type.issue_out,.inventory-transaction-type.transfer_out{background:#fff7ed;color:#b45309}
.inventory-transaction-type.adjustment{background:#dbeafe;color:#1e40af}
.inventory-transactions-table .number small{display:block;margin-top:2px;color:#475569;font-size:8px;font-weight:900}
.inventory-transaction-scope,.inventory-transaction-notes{text-align:start!important;overflow-wrap:anywhere}
@media (max-width:1150px){.inventory-page .inventory-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.inventory-transactions-table-wrap{overflow-x:auto!important}.inventory-transactions-table{min-width:980px!important}}

/* Warehouse transactions split view */
.inventory-stats-legacy{display:none!important}
.inventory-stats-counts{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin-bottom:0!important}
.inventory-stats-counts article{min-height:86px!important;border-color:rgba(15,41,71,.14)!important;background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(240,253,250,.72))!important}
.inventory-stats-counts small{color:#334155!important;font-size:11px!important}
.inventory-stats-counts strong{color:#0f2947!important;font-size:23px!important}
.inventory-transaction-tabs{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px;padding:10px;border:1px solid rgba(15,41,71,.12);border-radius:10px;background:linear-gradient(135deg,rgba(248,250,252,.98),rgba(240,253,250,.78))}
.inventory-transaction-tabs>div{display:flex;flex-wrap:wrap;gap:8px}
.inventory-transaction-tab,.inventory-transaction-print{min-height:38px;border:1px solid rgba(15,41,71,.14);border-radius:9px;padding:8px 14px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;font-weight:950;cursor:pointer;transition:.18s ease;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 10px 18px rgba(15,23,42,.08)}
.inventory-transaction-tab{background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#0f3b66}
.inventory-transaction-tab svg,.inventory-transaction-print svg{width:16px;height:16px}
.inventory-transaction-tab.active{background:linear-gradient(135deg,#0f3b66,#2563eb);color:#fff;border-color:rgba(37,99,235,.45);box-shadow:0 12px 22px rgba(37,99,235,.18)}
.inventory-transaction-print{background:linear-gradient(135deg,#15803d,#16a34a);color:#fff;border-color:rgba(21,128,61,.55)}
.inventory-transaction-print:hover,.inventory-transaction-print:focus{background:linear-gradient(135deg,#166534,#15803d);color:#fff}
.inventory-transaction-panel{display:none}
.inventory-transaction-panel.active{display:block}
.inventory-transactions-table-wrap{box-shadow:0 14px 30px rgba(15,23,42,.08)!important}
.inventory-transactions-table td{font-size:10.5px!important;color:#111827!important}
.inventory-transactions-table th{white-space:normal!important;overflow-wrap:anywhere!important}
.inventory-stockin-transactions-table th:nth-child(1),.inventory-stockin-transactions-table td:nth-child(1){width:4%!important}
.inventory-stockin-transactions-table th:nth-child(2),.inventory-stockin-transactions-table td:nth-child(2){width:12%!important}
.inventory-stockin-transactions-table th:nth-child(3),.inventory-stockin-transactions-table td:nth-child(3){width:12%!important}
.inventory-stockin-transactions-table th:nth-child(4),.inventory-stockin-transactions-table td:nth-child(4){width:22%!important}
.inventory-stockin-transactions-table th:nth-child(5),.inventory-stockin-transactions-table td:nth-child(5){width:9%!important}
.inventory-stockin-transactions-table th:nth-child(6),.inventory-stockin-transactions-table td:nth-child(6){width:6%!important}
.inventory-stockin-transactions-table th:nth-child(7),.inventory-stockin-transactions-table td:nth-child(7){width:12%!important}
.inventory-stockin-transactions-table th:nth-child(8),.inventory-stockin-transactions-table td:nth-child(8){width:18%!important}
.inventory-stockin-transactions-table th:nth-child(9),.inventory-stockin-transactions-table td:nth-child(9){width:5%!important}
@media print{
  @page{size:A4 landscape;margin:8mm}
  .inventory-transaction-tabs,.inventory-filter-panel{display:none!important}
  .inventory-transaction-panel{display:none!important}
  .inventory-transaction-panel.active{display:block!important}
  .inventory-transactions-panel{break-inside:auto!important;page-break-inside:auto!important}
  .inventory-transactions-table-wrap{overflow:visible!important;box-shadow:none!important}
  .inventory-transactions-table{width:100%!important;min-width:0!important}
  .inventory-transactions-table th{background:#0f2947!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .inventory-transactions-table td{font-size:9.2px!important;padding:5px 4px!important;line-height:1.25!important}
  .inventory-transactions-table th{font-size:9.4px!important;line-height:1.2!important;padding:5px 4px!important}
  .inventory-transaction-type{min-width:0!important;padding:4px 5px!important;font-size:8.5px!important}
  .inventory-transactions-table .number{white-space:nowrap!important}
}
@media (max-width:1150px){
  .inventory-stats-counts{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .inventory-transaction-tabs{align-items:stretch;flex-direction:column}
  .inventory-transaction-print{width:100%}
}

/* Refined warehouse movement table columns */
.inventory-transactions-print-meta{display:none}
.inventory-print-period{display:none}
.inventory-transaction-date{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:950}
.inventory-transaction-date span{display:block;color:#0f172a}
.inventory-transaction-date small{display:block;margin-top:2px;color:#2563eb;font-size:10px;font-weight:950}
.inventory-transaction-scope{text-align:start!important}
.inventory-transaction-scope span{display:block;color:#0f172a;font-weight:950;line-height:1.25}
.inventory-transaction-scope small{display:block;margin-top:3px;color:#15803d;font-size:9.5px;font-weight:950;line-height:1.25}
.inventory-transactions-table .inventory-transaction-type{min-width:0!important;width:100%;padding:5px 4px!important}
.inventory-issue-transactions-table th:nth-child(2),.inventory-issue-transactions-table td:nth-child(2){width:8%!important}
.inventory-issue-transactions-table th:nth-child(3),.inventory-issue-transactions-table td:nth-child(3){width:8%!important}
.inventory-issue-transactions-table th:nth-child(4),.inventory-issue-transactions-table td:nth-child(4){width:24%!important}
.inventory-issue-transactions-table th:nth-child(5),.inventory-issue-transactions-table td:nth-child(5){width:8%!important}
.inventory-issue-transactions-table th:nth-child(6),.inventory-issue-transactions-table td:nth-child(6){width:5%!important}
.inventory-issue-transactions-table th:nth-child(7),.inventory-issue-transactions-table td:nth-child(7){width:8%!important}
.inventory-issue-transactions-table th:nth-child(8),.inventory-issue-transactions-table td:nth-child(8){width:13%!important}
.inventory-issue-transactions-table th:nth-child(9),.inventory-issue-transactions-table td:nth-child(9){width:8%!important}
.inventory-issue-transactions-table th:nth-child(10),.inventory-issue-transactions-table td:nth-child(10){width:14%!important}
.inventory-stockin-transactions-table th:nth-child(2),.inventory-stockin-transactions-table td:nth-child(2){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(3),.inventory-stockin-transactions-table td:nth-child(3){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(4),.inventory-stockin-transactions-table td:nth-child(4){width:26%!important}
.inventory-stockin-transactions-table th:nth-child(5),.inventory-stockin-transactions-table td:nth-child(5){width:9%!important}
.inventory-stockin-transactions-table th:nth-child(6),.inventory-stockin-transactions-table td:nth-child(6){width:5%!important}
.inventory-stockin-transactions-table th:nth-child(7),.inventory-stockin-transactions-table td:nth-child(7){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(8),.inventory-stockin-transactions-table td:nth-child(8){width:14%!important}
.inventory-stockin-transactions-table th:nth-child(9),.inventory-stockin-transactions-table td:nth-child(9){width:18%!important}
@media print{
  .inventory-page .inventory-hero p{display:none!important}
  .inventory-transactions-print-meta{display:grid!important;grid-template-columns:1fr;gap:3px;margin:-4px 0 10px;padding:8px 10px;border:1px solid rgba(15,41,71,.28);border-radius:8px;background:#f8fafc;color:#0f172a;text-align:center;break-inside:avoid}
  .inventory-transactions-print-meta strong{font-size:13px;font-weight:950;color:#0f2947}
  .inventory-transactions-print-meta span{font-size:11px;font-weight:900;color:#111827}
  .inventory-transactions-print-meta small{font-size:10px;font-weight:900;color:#2563eb}
  .inventory-transactions-print-meta .inventory-print-period{display:flex!important;justify-content:center;gap:18px;align-items:center;margin-top:3px;flex-wrap:wrap}
  .inventory-transactions-print-meta .inventory-print-period b{font-size:10.5px;font-weight:950;color:#0f2947}
  .inventory-transactions-print-meta .inventory-print-period em{font-style:normal;color:#2563eb;font-weight:950}
  .inventory-transaction-date small{color:#2563eb!important;font-size:8.8px!important}
  .inventory-transaction-scope small{color:#15803d!important;font-size:8.6px!important}
  .inventory-issue-transactions-table th:nth-child(2),.inventory-issue-transactions-table td:nth-child(2){width:8%!important}
  .inventory-issue-transactions-table th:nth-child(3),.inventory-issue-transactions-table td:nth-child(3){width:7%!important}
  .inventory-issue-transactions-table th:nth-child(4),.inventory-issue-transactions-table td:nth-child(4){width:25%!important}
  .inventory-issue-transactions-table th:nth-child(8),.inventory-issue-transactions-table td:nth-child(8){width:12%!important}
  .inventory-issue-transactions-table th:nth-child(10),.inventory-issue-transactions-table td:nth-child(10){width:16%!important}
  .inventory-stockin-transactions-table th:nth-child(2),.inventory-stockin-transactions-table td:nth-child(2){width:8%!important}
  .inventory-stockin-transactions-table th:nth-child(3),.inventory-stockin-transactions-table td:nth-child(3){width:7%!important}
  .inventory-stockin-transactions-table th:nth-child(4),.inventory-stockin-transactions-table td:nth-child(4){width:28%!important}
  .inventory-stockin-transactions-table th:nth-child(8),.inventory-stockin-transactions-table td:nth-child(8){width:13%!important}
  .inventory-stockin-transactions-table th:nth-child(9),.inventory-stockin-transactions-table td:nth-child(9){width:20%!important}
}

/* Warehouse transfer creation and history */
.inventory-transfer-create-panel{border-color:rgba(21,128,61,.24)!important;background:linear-gradient(135deg,rgba(240,253,244,.96),rgba(220,252,231,.72),rgba(255,255,255,.88))!important;box-shadow:0 16px 34px rgba(15,23,42,.08)}
.inventory-transfer-layout{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
.inventory-transfer-layout>.panel{width:100%!important;min-width:0!important}
.inventory-transfer-filter-panel{width:100%!important;background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(240,253,244,.72))!important;border-color:rgba(21,128,61,.18)!important}
.inventory-transfer-form{display:grid;grid-template-columns:1fr!important;gap:12px}
.inventory-transfer-section{display:grid;gap:10px;align-items:end;padding:10px;border:1px solid rgba(15,41,71,.10);border-radius:10px;background:rgba(255,255,255,.68)}
.inventory-transfer-warehouses{grid-template-columns:repeat(3,minmax(0,1fr));background:linear-gradient(135deg,rgba(239,246,255,.92),rgba(240,253,250,.76))}
.inventory-transfer-material-row{grid-template-columns:150px minmax(320px,1fr) 110px 150px 130px}
.inventory-transfer-context-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.inventory-transfer-reason-row{grid-template-columns:220px 170px minmax(260px,1fr)}
.inventory-transfer-row{display:grid;gap:10px;align-items:end}
.inventory-transfer-row.triple{grid-template-columns:repeat(3,minmax(0,1fr))}
.inventory-transfer-row.material{grid-template-columns:minmax(360px,1fr) 120px 150px}
.inventory-transfer-row.reason{grid-template-columns:220px 170px minmax(260px,1fr)}
.inventory-transfer-form label{display:grid;gap:5px;min-width:0}
.inventory-transfer-form label>span{color:#334155;font-size:10.5px;font-weight:950}
.inventory-transfer-form select,.inventory-transfer-form input{width:100%;min-height:38px;border:1px solid #a9bac8;border-radius:8px;background:#fff;color:#0f172a;padding:8px 10px;font-size:11px;font-weight:850}
.inventory-transfer-form input[readonly]{background:#f8fafc;color:#0f3b66;border-color:#cbd5e1}
.inventory-transfer-submit{width:min(520px,100%);justify-self:center;margin-top:2px;background:linear-gradient(135deg,#15803d,#16a34a)!important;border-color:rgba(21,128,61,.55)!important}
.inventory-filter-hint{margin:-4px 0 12px;color:#475569;font-size:11px;font-weight:800}
.inventory-transfer-history-panel{border-color:rgba(15,41,71,.16)!important;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.92))!important}
.inventory-transfer-table-wrap{overflow-x:hidden!important;border-color:#0f2947!important;border-radius:9px!important;box-shadow:0 14px 30px rgba(15,23,42,.08)}
.inventory-transfer-table{min-width:0!important;table-layout:fixed!important}
.inventory-transfer-table th{background:linear-gradient(180deg,#0f3b66,#08294b)!important;color:#fff!important;font-size:9.5px!important;line-height:1.25!important;white-space:normal!important}
.inventory-transfer-table td{font-size:10px!important;line-height:1.35!important;padding:7px 5px!important;color:#111827!important}
.inventory-transfer-table th:nth-child(1),.inventory-transfer-table td:nth-child(1){width:4%!important}
.inventory-transfer-table th:nth-child(2),.inventory-transfer-table td:nth-child(2){width:8%!important}
.inventory-transfer-table th:nth-child(3),.inventory-transfer-table td:nth-child(3){width:9%!important}
.inventory-transfer-table th:nth-child(4),.inventory-transfer-table td:nth-child(4){width:16%!important}
.inventory-transfer-table th:nth-child(5),.inventory-transfer-table td:nth-child(5){width:7%!important}
.inventory-transfer-table th:nth-child(6),.inventory-transfer-table td:nth-child(6){width:5%!important}
.inventory-transfer-table th:nth-child(7),.inventory-transfer-table td:nth-child(7){width:11%!important}
.inventory-transfer-table th:nth-child(8),.inventory-transfer-table td:nth-child(8){width:11%!important}
.inventory-transfer-table th:nth-child(9),.inventory-transfer-table td:nth-child(9){width:12%!important}
.inventory-transfer-table th:nth-child(10),.inventory-transfer-table td:nth-child(10){width:7%!important}
.inventory-transfer-table th:nth-child(11),.inventory-transfer-table td:nth-child(11){width:6%!important}
.inventory-transfer-table th:nth-child(12),.inventory-transfer-table td:nth-child(12){width:10%!important}
.inventory-transfer-qty b{color:#15803d!important;font-weight:950}
.inventory-transfer-actions{text-align:center!important;vertical-align:middle!important;padding:6px 4px!important}
.inventory-transfer-actions form{display:block!important;margin:0 auto 5px!important;width:min(82px,100%)!important}
.inventory-transfer-actions form:last-child{margin-bottom:0!important}
.inventory-transfer-receipt-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:100%;min-height:25px;border-radius:7px;border:1px solid currentColor;font-size:8.4px;font-weight:950;cursor:pointer;color:#fff!important;box-shadow:0 6px 12px rgba(15,23,42,.1);white-space:nowrap}
.inventory-transfer-receipt-btn svg{width:12px;height:12px}.inventory-transfer-receipt-btn.received{background:#16a34a;border-color:#15803d}.inventory-transfer-receipt-btn.not-received{background:#dc2626;border-color:#b91c1c}
.inventory-transfer-receipt-status{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:min(86px,100%);min-height:25px;border-radius:7px;border:1px solid currentColor;padding:3px 5px;font-size:8.4px;font-weight:950;line-height:1.15;white-space:normal}
.inventory-transfer-receipt-status svg{width:13px;height:13px}.inventory-transfer-receipt-status.pending{color:#0f766e;background:#ccfbf1}.inventory-transfer-receipt-status.received{color:#166534;background:#dcfce7}.inventory-transfer-receipt-status.not_received{color:#991b1b;background:#fee2e2}
.inventory-transfers-print-meta{display:none}
.inventory-transfer-print-button{background:linear-gradient(135deg,#15803d,#16a34a)!important;color:#fff!important;border-color:rgba(21,128,61,.55)!important}
.inventory-transfer-print-button:hover,.inventory-transfer-print-button:focus{background:linear-gradient(135deg,#166534,#15803d)!important;color:#fff!important}
.inventory-transfer-print-sheet{display:none}
.inventory-transfer-reason{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#ecfeff;color:#0e7490;border:1px solid rgba(14,116,144,.22);padding:4px 7px;font-size:9px;font-weight:950}
.inventory-material-code{font-family:Consolas,monospace;color:#0f3b66!important;font-weight:950;white-space:normal!important;overflow-wrap:anywhere}
.inventory-linked-request{display:block;margin-top:5px;padding-top:0;border-top:0;color:#0f3b66;font-size:9.5px;font-weight:950;line-height:1.35}
.inventory-linked-request small{display:block;margin-top:2px;font-size:9px;font-weight:950}
.inventory-linked-request small.complete{color:#15803d}
.inventory-linked-request small.open{color:#b45309}
.inventory-issue-transactions-table th:nth-child(2),.inventory-issue-transactions-table td:nth-child(2){width:8%!important}
.inventory-issue-transactions-table th:nth-child(3),.inventory-issue-transactions-table td:nth-child(3){width:7%!important}
.inventory-issue-transactions-table th:nth-child(4),.inventory-issue-transactions-table td:nth-child(4){width:7%!important}
.inventory-issue-transactions-table th:nth-child(5),.inventory-issue-transactions-table td:nth-child(5){width:22%!important}
.inventory-issue-transactions-table th:nth-child(6),.inventory-issue-transactions-table td:nth-child(6){width:8%!important}
.inventory-issue-transactions-table th:nth-child(7),.inventory-issue-transactions-table td:nth-child(7){width:5%!important}
.inventory-issue-transactions-table th:nth-child(8),.inventory-issue-transactions-table td:nth-child(8){width:7%!important}
.inventory-issue-transactions-table th:nth-child(9),.inventory-issue-transactions-table td:nth-child(9){width:12%!important}
.inventory-issue-transactions-table th:nth-child(10),.inventory-issue-transactions-table td:nth-child(10){width:7%!important}
.inventory-issue-transactions-table th:nth-child(11),.inventory-issue-transactions-table td:nth-child(11){width:13%!important}
.inventory-stockin-transactions-table th:nth-child(2),.inventory-stockin-transactions-table td:nth-child(2){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(3),.inventory-stockin-transactions-table td:nth-child(3){width:7%!important}
.inventory-stockin-transactions-table th:nth-child(4),.inventory-stockin-transactions-table td:nth-child(4){width:7%!important}
.inventory-stockin-transactions-table th:nth-child(5),.inventory-stockin-transactions-table td:nth-child(5){width:25%!important}
.inventory-stockin-transactions-table th:nth-child(6),.inventory-stockin-transactions-table td:nth-child(6){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(7),.inventory-stockin-transactions-table td:nth-child(7){width:5%!important}
.inventory-stockin-transactions-table th:nth-child(8),.inventory-stockin-transactions-table td:nth-child(8){width:8%!important}
.inventory-stockin-transactions-table th:nth-child(9),.inventory-stockin-transactions-table td:nth-child(9){width:13%!important}
.inventory-stockin-transactions-table th:nth-child(10),.inventory-stockin-transactions-table td:nth-child(10){width:15%!important}
@media (max-width:1150px){
  .inventory-transfer-warehouses,.inventory-transfer-material-row,.inventory-transfer-context-row,.inventory-transfer-reason-row{grid-template-columns:1fr}
  .inventory-transfer-row.triple,.inventory-transfer-row.material,.inventory-transfer-row.reason{grid-template-columns:1fr}
  .inventory-transfer-table-wrap{overflow-x:auto!important}
  .inventory-transfer-table{min-width:1160px!important}
}
@media print{
  body.inventory-transfer-printing *{visibility:hidden!important}
  body.inventory-transfer-printing .inventory-transfer-history-panel,
  body.inventory-transfer-printing .inventory-transfer-history-panel *{visibility:visible!important}
  body.inventory-transfer-printing .inventory-transfer-history-panel{display:block!important;position:absolute!important;inset:0 auto auto 0!important;width:100%!important;border:0!important;box-shadow:none!important;background:#fff!important;padding:0!important;margin:0!important;z-index:9999!important}
  body.inventory-transfer-printing .inventory-transfer-history-panel .inventory-panel-head{display:none!important}
  body.inventory-transfer-printing .inventory-transfer-history-panel .inventory-table-toolbar,
  body.inventory-transfer-printing .inventory-transfer-history-panel .no-print{display:none!important;visibility:hidden!important}
  .inventory-transfer-create-panel,.inventory-filter-panel,.inventory-transfer-history-panel .no-print{display:none!important}
  .inventory-transfers-print-meta{display:grid!important;grid-template-columns:1fr;gap:3px;margin:0 0 10px;padding:8px 10px;border:1px solid rgba(15,41,71,.28);border-radius:8px;background:#f8fafc;color:#0f172a;text-align:center;break-inside:avoid}
  .inventory-transfers-print-meta strong{font-size:16px;font-weight:950;color:#0f2947}
  .inventory-transfers-print-meta span{font-size:11px;font-weight:900;color:#111827}
  .inventory-transfers-print-meta .inventory-print-period{display:flex!important;justify-content:center;gap:18px;align-items:center;margin-top:3px;flex-wrap:wrap}
  .inventory-transfers-print-meta b{font-size:10px;font-weight:950;color:#0f3b66}
  .inventory-transfers-print-meta em{font-style:normal;color:#111827}
  .inventory-transfer-table-wrap{display:block!important;overflow:visible!important;box-shadow:none!important;border:1px solid #0f2947!important;border-radius:6px!important}
  .inventory-transfer-table{display:table!important;width:100%!important;min-width:0!important;border-collapse:collapse!important;table-layout:fixed!important}
  .inventory-transfer-table thead{display:table-header-group!important}
  .inventory-transfer-table tbody{display:table-row-group!important}
  .inventory-transfer-table tr{display:table-row!important;break-inside:avoid;page-break-inside:avoid}
  .inventory-transfer-table th,.inventory-transfer-table td{display:table-cell!important;border:1px solid #cbd5e1!important;white-space:normal!important;overflow-wrap:anywhere!important;vertical-align:middle!important}
  .inventory-transfer-table th{background:#0f2947!important;color:#fff!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-size:8.4px!important}
  .inventory-transfer-table td{font-size:8px!important;padding:4px 3px!important}
  .inventory-transfer-qty b{color:#15803d!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
@media print{
  @page{size:A4 landscape;margin:8mm}
  .inventory-transfers-page > :not(.inventory-stock-grid){display:none!important}
  .inventory-transfers-page .inventory-stock-grid{display:block!important;width:100%!important;margin:0!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:none!important}
  .inventory-transfers-page .inventory-stock-grid > :not(.inventory-transfer-print-sheet){display:none!important}
  .inventory-transfers-page .inventory-transfer-print-sheet{display:block!important;background:#fff!important;color:#111827!important;width:100%!important;margin:0!important;padding:0!important}
  .inventory-transfer-print-header{display:grid!important;gap:3px;margin:0 0 8px;padding:8px 10px;border:1px solid #94a3b8;border-radius:8px;background:#f8fafc;text-align:center;break-inside:avoid;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .inventory-transfer-print-header h1{margin:0;color:#0f2947;font-size:17px;font-weight:950;line-height:1.25}
  .inventory-transfer-print-header p{margin:0;color:#111827;font-size:11px;font-weight:900;line-height:1.35}
  .inventory-transfer-print-header div{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;margin-top:2px;color:#0f3b66;font-size:10px;font-weight:950}
  .inventory-transfer-print-table{width:100%!important;border-collapse:collapse!important;table-layout:fixed!important;direction:inherit}
  .inventory-transfer-print-table thead{display:table-header-group!important}
  .inventory-transfer-print-table tr{break-inside:avoid;page-break-inside:avoid}
  .inventory-transfer-print-table th,.inventory-transfer-print-table td{border:1px solid #cbd5e1!important;padding:4px 3px!important;vertical-align:middle!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important;color:#111827!important}
  .inventory-transfer-print-table th{background:#0f2947!important;color:#fff!important;font-size:8.2px!important;font-weight:950!important;line-height:1.25!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .inventory-transfer-print-table td{font-size:7.8px!important;font-weight:800!important;line-height:1.3!important}
  .inventory-transfer-print-table small{font-size:7px!important;color:#334155!important;font-weight:850!important}
  .inventory-transfer-print-table .print-green{color:#15803d!important;font-weight:950!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .inventory-transfer-print-table th:nth-child(1),.inventory-transfer-print-table td:nth-child(1){width:4%!important}
  .inventory-transfer-print-table th:nth-child(2),.inventory-transfer-print-table td:nth-child(2){width:8%!important}
  .inventory-transfer-print-table th:nth-child(3),.inventory-transfer-print-table td:nth-child(3){width:9%!important}
  .inventory-transfer-print-table th:nth-child(4),.inventory-transfer-print-table td:nth-child(4){width:16%!important}
  .inventory-transfer-print-table th:nth-child(5),.inventory-transfer-print-table td:nth-child(5){width:7%!important}
  .inventory-transfer-print-table th:nth-child(6),.inventory-transfer-print-table td:nth-child(6){width:5%!important}
  .inventory-transfer-print-table th:nth-child(7),.inventory-transfer-print-table td:nth-child(7){width:11%!important}
  .inventory-transfer-print-table th:nth-child(8),.inventory-transfer-print-table td:nth-child(8){width:11%!important}
  .inventory-transfer-print-table th:nth-child(9),.inventory-transfer-print-table td:nth-child(9){width:12%!important}
  .inventory-transfer-print-table th:nth-child(10),.inventory-transfer-print-table td:nth-child(10){width:7%!important}
  .inventory-transfer-print-table th:nth-child(11),.inventory-transfer-print-table td:nth-child(11){width:6%!important}
  .inventory-transfer-print-table th:nth-child(12),.inventory-transfer-print-table td:nth-child(12){width:10%!important}
}
.side-management-subcontractors,
.side-management-subcontractors .side-management-link,
.side-management-subcontractors .side-sub-link {
    --side-accent: #9a3412 !important;
    --side-accent-dark: #7c2d12 !important;
    --side-accent-soft: #fff7ed !important;
    --side-text: #7c2d12 !important;
}
.side-nav details.side-management-group.side-management-subcontractors > summary,
.side-nav details.side-management-group.side-management-subcontractors[open] > summary,
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary {
    --side-accent: #9a3412 !important;
    --side-accent-dark: #7c2d12 !important;
}
.side-nav .side-management-link.subcontractor {
    --side-accent: #9a3412 !important;
    --side-accent-dark: #7c2d12 !important;
    --side-text: #7c2d12 !important;
    background: color-mix(in srgb, #9a3412 12%, #fff) !important;
    border-color: color-mix(in srgb, #9a3412 24%, #e2e8f0) !important;
}
.side-nav .side-management-link.subcontractor svg {
    color: #9a3412 !important;
}
.side-nav .side-management-link.subcontractor:hover,
.side-nav .side-management-link.subcontractor.active {
    background: linear-gradient(180deg, color-mix(in srgb, #9a3412 24%, #fff), color-mix(in srgb, #9a3412 17%, #fff7ed)) !important;
    border-color: color-mix(in srgb, #9a3412 40%, #dbe7f1) !important;
}
.side-nav .side-management-link.subcontractor.active {
    color: #7c2d12 !important;
}

/* Subcontractor management must behave like the other solid primary sidebar departments. */
.side-nav details.side-management-group.side-management-subcontractors > summary,
.side-nav details.side-management-group.side-management-subcontractors[open] > summary,
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary {
    --side-accent: #9a3412 !important;
    --side-accent-dark: #7c2d12 !important;
    min-height: 41px !important;
    height: 41px !important;
    color: #fff !important;
    border: 1px solid rgba(154, 52, 18, .50) !important;
    border-radius: 8px !important;
    background:
        linear-gradient(180deg, #c05621 0%, #9a3412 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 5px 12px rgba(154, 52, 18, .24) !important;
    font-size: 12.2px !important;
    font-weight: 950 !important;
}

.side-nav details.side-management-group.side-management-subcontractors > summary span,
.side-nav details.side-management-group.side-management-subcontractors[open] > summary span,
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary span,
.side-nav details.side-management-group.side-management-subcontractors > summary span > :not(svg),
.side-nav details.side-management-group.side-management-subcontractors[open] > summary span > :not(svg),
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary span > :not(svg) {
    color: #fff !important;
}

.side-nav details.side-management-group.side-management-subcontractors > summary span > svg,
.side-nav details.side-management-group.side-management-subcontractors[open] > summary span > svg,
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary span > svg {
    color: #fff !important;
    background: rgba(255,255,255,.18) !important;
}

.side-nav details.side-management-group.side-management-subcontractors > summary .side-chevron,
.side-nav details.side-management-group.side-management-subcontractors[open] > summary .side-chevron,
.side-nav details.side-management-group.side-management-subcontractors:has(.active) > summary .side-chevron {
    color: rgba(255,255,255,.92) !important;
}

.side-nav .side-management-subcontractors > .side-management-link.subcontractor {
    min-height: 31px !important;
    background: color-mix(in srgb, #9a3412 12%, #fff) !important;
    border-color: color-mix(in srgb, #9a3412 24%, #e2e8f0) !important;
    color: #7c2d12 !important;
}

.inventory-materials-panel .management-materials-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
}
.inventory-materials-panel .inventory-table-wrap{overflow-x:hidden!important}
.inventory-materials-panel .management-materials-table th:nth-child(1),
.inventory-materials-panel .management-materials-table td:nth-child(1) { width: 3.4% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(2),
.inventory-materials-panel .management-materials-table td:nth-child(2) { width: 8.2% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(3),
.inventory-materials-panel .management-materials-table td:nth-child(3) { width: 19% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(4),
.inventory-materials-panel .management-materials-table td:nth-child(4) { width: 8.2% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(5),
.inventory-materials-panel .management-materials-table td:nth-child(5) { width: 4.8% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(6),
.inventory-materials-panel .management-materials-table td:nth-child(6),
.inventory-materials-panel .management-materials-table th:nth-child(7),
.inventory-materials-panel .management-materials-table td:nth-child(7),
.inventory-materials-panel .management-materials-table th:nth-child(8),
.inventory-materials-panel .management-materials-table td:nth-child(8),
.inventory-materials-panel .management-materials-table th:nth-child(9),
.inventory-materials-panel .management-materials-table td:nth-child(9),
.inventory-materials-panel .management-materials-table th:nth-child(10),
.inventory-materials-panel .management-materials-table td:nth-child(10),
.inventory-materials-panel .management-materials-table th:nth-child(11),
.inventory-materials-panel .management-materials-table td:nth-child(11) { width: 6.5% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(12),
.inventory-materials-panel .management-materials-table td:nth-child(12) { width: 10% !important; }
.inventory-materials-panel .management-materials-table th:nth-child(13),
.inventory-materials-panel .management-materials-table td:nth-child(13) { width: 6% !important; }
.inventory-materials-panel .management-materials-table th{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
}
.inventory-materials-panel .management-materials-table td.number{
    white-space:nowrap!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    font-size:8.8px!important;
}
.inventory-materials-panel .management-materials-table td{
    font-size:9px!important;
    padding:5px 3px!important;
}
.inventory-materials-panel .management-materials-table .inventory-status.subcontractor_supply{
    color:#1d4ed8!important;
}
.inventory-materials-panel .management-materials-table .inventory-status .subcontractor-name{
    color:#1d4ed8!important;
    font-size:8.8px!important;
    line-height:1.18!important;
}
.stock-status-subcontractor_supply td{background:rgba(239,246,255,.72)!important}

.inventory-materials-panel .inventory-issue-materials-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
}
.inventory-materials-panel .inventory-issue-materials-table th,
.inventory-materials-panel .inventory-issue-materials-table td{
    padding:6px 4px!important;
    font-size:9.5px!important;
    line-height:1.28!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
}
.inventory-materials-panel .inventory-issue-materials-table th{
    font-size:9.2px!important;
    line-height:1.18!important;
}
.inventory-materials-panel .inventory-issue-materials-table td.number{
    white-space:nowrap!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
    font-size:8.8px!important;
}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(1),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(1){width:3%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(2),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(2){width:8%!important}
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(2) .table-chip{
    font-size:7.6px!important;
    line-height:1.12!important;
    padding:2px 2px!important;
    letter-spacing:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(3),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(3){width:20%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(4),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(4){width:9%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(5),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(5){width:5%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(6),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(6),
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(7),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(7),
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(8),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(8),
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(9),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(9),
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(10),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(10),
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(11),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(11){width:7%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(12),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(12){width:8%!important}
.inventory-materials-panel .inventory-issue-materials-table th:nth-child(13),
.inventory-materials-panel .inventory-issue-materials-table td:nth-child(13){width:6.5%!important}
.inventory-materials-panel .inventory-issue-materials-table .inventory-issue-input{
    max-width:88px!important;
    min-height:30px!important;
    padding:5px 4px!important;
    font-size:9px!important;
}
.inventory-materials-panel .inventory-issue-materials-table .inventory-issue-input::-webkit-outer-spin-button,
.inventory-materials-panel .inventory-issue-materials-table .inventory-issue-input::-webkit-inner-spin-button{
    -webkit-appearance:none!important;
    margin:0!important;
}
.inventory-materials-panel .inventory-issue-materials-table .inventory-issue-input{
    -moz-appearance:textfield!important;
    appearance:textfield!important;
}

@media print {
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(13),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(13),
    .inventory-requests-panel .inventory-issue-requests-table th:nth-child(8),
    .inventory-requests-panel .inventory-issue-requests-table td:nth-child(8){
        display:none!important;
    }
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(3),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(3){width:23%!important}
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(6),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(6),
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(7),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(7),
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(8),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(8),
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(9),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(9),
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(10),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(10),
    .inventory-materials-panel .inventory-issue-materials-table th:nth-child(11),
    .inventory-materials-panel .inventory-issue-materials-table td:nth-child(11){width:7.6%!important}
}

@media print {
  @page {
    size: A4 landscape;
    margin: 7mm;
  }

  .inventory-materials-panel .management-materials-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  .inventory-materials-panel .management-materials-table th,
  .inventory-materials-panel .management-materials-table td {
    padding: 3px 2px !important;
    font-size: 7.4px !important;
    line-height: 1.18 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .inventory-materials-panel .management-materials-table th {
    background: #08294b !important;
    color: #fff !important;
    font-weight: 950 !important;
    overflow-wrap: anywhere !important;
  }

  .inventory-materials-panel .management-materials-table th:last-child,
  .inventory-materials-panel .management-materials-table td:last-child {
    display: none !important;
  }

  .inventory-materials-panel .management-materials-table th:nth-child(1),
  .inventory-materials-panel .management-materials-table td:nth-child(1) { width: 3.2% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(2),
  .inventory-materials-panel .management-materials-table td:nth-child(2) { width: 8.2% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(3),
  .inventory-materials-panel .management-materials-table td:nth-child(3) { width: 19% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(4),
  .inventory-materials-panel .management-materials-table td:nth-child(4) { width: 8.6% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(5),
  .inventory-materials-panel .management-materials-table td:nth-child(5) { width: 5.5% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(6),
  .inventory-materials-panel .management-materials-table td:nth-child(6),
  .inventory-materials-panel .management-materials-table th:nth-child(7),
  .inventory-materials-panel .management-materials-table td:nth-child(7),
  .inventory-materials-panel .management-materials-table th:nth-child(8),
  .inventory-materials-panel .management-materials-table td:nth-child(8),
  .inventory-materials-panel .management-materials-table th:nth-child(9),
  .inventory-materials-panel .management-materials-table td:nth-child(9),
  .inventory-materials-panel .management-materials-table th:nth-child(10),
  .inventory-materials-panel .management-materials-table td:nth-child(10),
  .inventory-materials-panel .management-materials-table th:nth-child(11),
  .inventory-materials-panel .management-materials-table td:nth-child(11) { width: 7.2% !important; }
  .inventory-materials-panel .management-materials-table th:nth-child(12),
  .inventory-materials-panel .management-materials-table td:nth-child(12) { width: 12.3% !important; }

  .inventory-materials-panel .management-materials-table td.number,
  .inventory-materials-panel .management-materials-table td:nth-child(6),
  .inventory-materials-panel .management-materials-table td:nth-child(7),
  .inventory-materials-panel .management-materials-table td:nth-child(8),
  .inventory-materials-panel .management-materials-table td:nth-child(9),
  .inventory-materials-panel .management-materials-table td:nth-child(10),
  .inventory-materials-panel .management-materials-table td:nth-child(11) {
    white-space: nowrap !important;
    font-size: 7px !important;
    font-variant-numeric: tabular-nums;
  }

  .inventory-materials-panel .management-materials-table td:nth-child(3),
  .inventory-materials-panel .management-materials-table td:nth-child(3) strong {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .inventory-materials-panel .management-materials-table .table-chip {
    border: 0 !important;
    background: transparent !important;
    color: #000 !important;
    padding: 0 !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
  }

  .inventory-materials-panel .management-materials-table .inventory-status span,
  .inventory-materials-panel .management-materials-table .inventory-status b {
    font-size: 7px !important;
    line-height: 1.12 !important;
  }
}

/* Final sidebar primary department icons: larger, no icon tile background. */
.side-nav .side-group-projects > summary span > svg,
.side-nav .side-group-projects[open] > summary span > svg,
.side-nav details.side-management-group.side-management-technical > summary span > svg,
.side-nav details.side-management-group.side-management-site > summary span > svg,
.side-nav details.side-management-group.side-management-inventory > summary span > svg,
.side-nav details.side-management-group.side-management-purchases > summary span > svg,
.side-nav details.side-management-group.side-management-subcontractors > summary span > svg,
.side-nav details.side-finance-group.side-finance-standalone > summary span > svg,
.side-nav details.side-management-group[open].side-management-technical > summary span > svg,
.side-nav details.side-management-group[open].side-management-site > summary span > svg,
.side-nav details.side-management-group[open].side-management-inventory > summary span > svg,
.side-nav details.side-management-group[open].side-management-purchases > summary span > svg,
.side-nav details.side-management-group[open].side-management-subcontractors > summary span > svg,
.side-nav details.side-finance-group[open].side-finance-standalone > summary span > svg,
.side-nav .side-project-hub-link > svg,
.side-nav .side-project-hub-link span > svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: currentColor !important;
}

/* Final projects dashboard cards: colorful, tighter, and more presentation-ready. */
.projects-page {
    --project-card-radius: 14px;
}

.projects-page .project-cards-showcase {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)) !important;
    gap: 18px !important;
}

.projects-page .project-card-premium {
    min-height: 0 !important;
    border-radius: var(--project-card-radius) !important;
    border: 1px solid color-mix(in srgb, var(--card-a, #2563eb) 22%, #dbeafe) !important;
    background:
        radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--card-b, #f59e0b) 22%, transparent) 0 78px, transparent 79px),
        radial-gradient(circle at 8% 18%, color-mix(in srgb, var(--card-a, #2563eb) 14%, transparent) 0 82px, transparent 83px),
        linear-gradient(145deg, color-mix(in srgb, var(--card-a, #2563eb) 11%, #fff) 0%, #fff 42%, color-mix(in srgb, var(--card-b, #f59e0b) 9%, #f8fafc) 100%) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12) !important;
}

.projects-page .project-card-premium:hover {
    transform: translateY(-4px) !important;
    border-color: color-mix(in srgb, var(--card-a, #2563eb) 42%, #fff) !important;
    box-shadow: 0 26px 58px rgba(15, 23, 42, .18) !important;
}

.projects-page .project-card-premium::before {
    background:
        linear-gradient(112deg, transparent 0 55%, rgba(255,255,255,.42) 55% 55.8%, transparent 55.8%),
        repeating-linear-gradient(135deg, color-mix(in srgb, var(--card-a, #2563eb) 8%, transparent) 0 1px, transparent 1px 16px) !important;
    opacity: .9 !important;
}

.projects-page .project-card-media {
    height: 142px !important;
    margin: 12px 12px 0 !important;
    width: auto !important;
    border-radius: 13px !important;
    border: 1px solid rgba(255,255,255,.5) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--card-a) 92%, #020617 8%), color-mix(in srgb, var(--card-c) 84%, #020617 16%)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 26px color-mix(in srgb, var(--card-a) 18%, transparent) !important;
}

.projects-page .project-card-media > a {
    padding: 15px 18px !important;
}

.projects-page .project-card-media img {
    max-height: 104px !important;
    max-width: 78% !important;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,.28)) !important;
}

.projects-page .project-logo-fallback svg {
    width: 46px !important;
    height: 46px !important;
}

.projects-page .project-card-media > span {
    min-height: 26px !important;
    padding: 4px 9px !important;
    font-size: 10.5px !important;
    border-radius: 999px !important;
}

.projects-page .project-card-media .project-status {
    inset-block-start: 10px !important;
    inset-inline-end: 10px !important;
}

.projects-page .project-card-media .project-code {
    inset-block-end: 10px !important;
    inset-inline-start: 10px !important;
}

.projects-page .project-card-body {
    padding: 13px 14px 10px !important;
    gap: 10px !important;
}

.projects-page .project-card-title {
    grid-template-columns: 40px minmax(0, 1fr) 18px !important;
    gap: 9px !important;
    padding: 9px 10px !important;
    border: 1px solid color-mix(in srgb, var(--card-a) 20%, #e2e8f0) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.68) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.projects-page .project-title-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, var(--card-a), var(--card-b)) !important;
    color: #fff !important;
}

.projects-page .project-card-title small {
    font-size: 9.5px !important;
    color: color-mix(in srgb, var(--card-a) 72%, #334155) !important;
}

.projects-page .project-card-title strong {
    font-size: 18px !important;
    line-height: 1.25 !important;
}

.projects-page .project-card-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
}

.projects-page .project-card-stats > div {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 34px !important;
    padding: 5px 9px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.66)),
        color-mix(in srgb, var(--card-a) 7%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--card-a) 16%, #e2e8f0) !important;
    box-shadow: 0 7px 16px rgba(15,23,42,.045) !important;
}

.projects-page .project-card-stats svg {
    display: grid !important;
    width: 24px !important;
    height: 24px !important;
    padding: 5px !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--card-a), var(--card-b)) !important;
    box-shadow: 0 7px 14px color-mix(in srgb, var(--card-a) 24%, transparent) !important;
}

.projects-page .project-card-stats dt {
    min-width: 0 !important;
    color: #475569 !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

.projects-page .project-card-stats dd {
    margin: 0 !important;
    min-width: max-content !important;
    color: #0f172a !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
    text-align: end !important;
}

.projects-page .project-card-meta {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
}

.projects-page .project-card-meta p {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 34px !important;
    padding: 5px 9px !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--card-b) 8%, #fff) !important;
    border: 1px solid color-mix(in srgb, var(--card-b) 18%, #e2e8f0) !important;
}

.projects-page .project-card-meta p > svg {
    flex: 0 0 24px !important;
    box-sizing: border-box !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 5px !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--card-b), var(--card-a)) !important;
    box-shadow: 0 7px 14px color-mix(in srgb, var(--card-b) 22%, transparent) !important;
}

.projects-page .project-card-meta p > span {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
    font-size: 12.5px !important;
    font-weight: 950 !important;
}

.projects-page .project-card-meta small {
    display: inline !important;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
}

html[dir="rtl"] .projects-page .project-card-stats > div {
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
}

html[dir="rtl"] .projects-page .project-card-stats dd,
html[dir="rtl"] .projects-page .project-card-meta p > span {
    text-align: left !important;
}

html[dir="ltr"] .projects-page .project-card-stats > div {
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
}

html[dir="ltr"] .projects-page .project-card-stats dd,
html[dir="ltr"] .projects-page .project-card-meta p > span {
    text-align: right !important;
}

.projects-page .project-card-stats > div {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
}

.projects-page .project-card-stats dt,
.projects-page .project-card-stats dd {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.projects-page .project-card-stats dt {
    flex: 0 0 auto !important;
}

.projects-page .project-card-stats dd {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    text-align: start !important;
}

.projects-page .project-card-meta p {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
}

.projects-page .project-card-meta p > span {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    text-align: start !important;
}

html[dir="rtl"] .projects-page .project-card-stats > div,
html[dir="rtl"] .projects-page .project-card-meta p,
html[dir="rtl"] .projects-page .project-card-meta p > span {
    direction: rtl !important;
}

html[dir="ltr"] .projects-page .project-card-stats > div,
html[dir="ltr"] .projects-page .project-card-meta p,
html[dir="ltr"] .projects-page .project-card-meta p > span {
    direction: ltr !important;
}

.projects-page .project-card-actions {
    padding: 10px 14px 13px !important;
    border-block-start: 1px solid color-mix(in srgb, var(--card-a) 16%, #e2e8f0) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.48), color-mix(in srgb, var(--card-a) 7%, #fff)) !important;
}

.projects-page .project-open-action {
    min-height: 38px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    padding: 0 14px !important;
}

.projects-page .project-card-tools .icon-action {
    width: 36px !important;
    height: 36px !important;
    border-radius: 9px !important;
}

.projects-page .project-card-tools .icon-action.edit {
    border-color: color-mix(in srgb, var(--card-a, #2563eb) 74%, #fff) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .24), transparent 42%),
        linear-gradient(135deg, var(--card-a, #2563eb), color-mix(in srgb, var(--card-c, #0f172a) 74%, var(--card-a, #2563eb))) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px color-mix(in srgb, var(--card-a, #2563eb) 24%, transparent), inset 0 1px 0 rgba(255,255,255,.34) !important;
}

.projects-page .project-card-tools .icon-action.danger,
.projects-page .project-card-tools button.icon-action.danger {
    border-color: #b91c1c !important;
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(185, 28, 28, .22), inset 0 1px 0 rgba(255,255,255,.28) !important;
}

@media (max-width: 760px) {
    .projects-page .project-cards-showcase {
        grid-template-columns: 1fr !important;
    }

    .projects-page .project-card-stats,
    .projects-page .project-card-meta {
        grid-template-columns: 1fr !important;
    }
}

/* Actual execution input table - final professional layout */
html body main.actual-execution-page section.actual-table-panel {
    border: 1px solid rgba(14, 116, 144, .18);
    background: linear-gradient(135deg, rgba(240, 249, 255, .92), rgba(255, 255, 255, .98)), #fff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .075);
}

html body main.actual-execution-page section.actual-table-panel .table-wrap {
    overflow-x: visible;
}

html body main.actual-execution-page table.actual-execution-table {
    border-collapse: separate;
    border-spacing: 0 6px;
    table-layout: fixed;
    color: #102033;
}

html body main.actual-execution-page table.actual-execution-table thead th {
    padding: 10px 8px;
    border: 1px solid rgba(15, 49, 95, .18);
    background: linear-gradient(135deg, #0f315f, #174b72) !important;
    color: #fff !important;
    font-size: 10.5px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
}

html body main.actual-execution-page table.actual-execution-table thead tr.actual-period-group-head th {
    padding: 12px 8px;
    background: linear-gradient(135deg, #08345f, #0f766e) !important;
    font-size: 12px;
    letter-spacing: 0;
}

html body main.actual-execution-page table.actual-execution-table thead tr.actual-period-sub-head th {
    padding: 8px 8px;
    background: linear-gradient(135deg, #174b72, #216b90) !important;
    font-size: 10px;
}

html body main.actual-execution-page .actual-head-stack {
    display: grid;
    gap: 2px;
    justify-items: center;
    line-height: 1.25;
}

html body main.actual-execution-page .actual-head-stack b,
html body main.actual-execution-page .actual-head-stack small {
    color: #fff;
    font-weight: 950;
}

html body main.actual-execution-page .actual-head-stack b {
    font-size: 11px;
}

html body main.actual-execution-page .actual-head-stack small {
    font-size: 9px;
}

html body main.actual-execution-page table.actual-execution-table th:nth-child(1) { width: 4.5%; }
html body main.actual-execution-page table.actual-execution-table th:nth-child(2) { width: 38%; }
html body main.actual-execution-page table.actual-execution-table th:nth-child(3) { width: 13.5%; }
html body main.actual-execution-page table.actual-execution-table th:nth-child(4) { width: 44%; }

html body main.actual-execution-page table.actual-execution-table td {
    padding: 9px 8px;
    border-block: 1px solid rgba(203, 213, 225, .82);
    border-inline: 0;
    background: rgba(255, 255, 255, .96);
    font-size: 10px;
    line-height: 1.45;
    vertical-align: top;
    min-width: 0;
}

html body main.actual-execution-page table.actual-execution-table tr.actual-period-row td:first-child {
    border-inline-start: 1px solid rgba(203, 213, 225, .82);
    border-start-start-radius: 9px;
    border-end-start-radius: 9px;
}

html body main.actual-execution-page table.actual-execution-table tr.actual-period-row td:last-child {
    border-inline-end: 1px solid rgba(203, 213, 225, .82);
    border-start-end-radius: 9px;
    border-end-end-radius: 9px;
}

html body main.actual-execution-page table.actual-execution-table tbody tr:nth-child(even) td {
    background: rgba(248, 251, 255, .96);
}

html body main.actual-execution-page table.actual-execution-table .number {
    white-space: normal;
}

html body main.actual-execution-page table.actual-execution-table .number > strong {
    display: block;
    color: #0f315f;
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

html body main.actual-execution-page .actual-total-preview {
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding: 5px 6px;
    border: 1px solid rgba(14, 165, 233, .26);
    border-radius: 7px;
    background: rgba(240, 249, 255, .92);
    color: #075985;
    font-size: 8.5px;
    font-weight: 900;
    line-height: 1.25;
}

html body main.actual-execution-page .actual-total-preview b {
    color: #0f315f;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

html body main.actual-execution-page .actual-last-update-preview {
    display: grid;
    gap: 2px;
    margin-top: 5px;
    padding: 5px 6px;
    border: 1px solid rgba(100, 116, 139, .24);
    border-radius: 7px;
    background: rgba(248, 250, 252, .96);
    color: #475569;
    font-size: 8.2px;
    font-weight: 900;
    line-height: 1.25;
}

html body main.actual-execution-page .actual-last-update-preview b {
    color: #0f315f;
    font-size: 9.4px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

html body main.actual-execution-page tr.actual-item-row td {
    border: 1px solid rgba(15, 49, 95, .18) !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, rgba(219, 234, 254, .88), rgba(240, 253, 250, .96)), #f8fbff !important;
    box-shadow: inset 5px 0 0 #0f766e, 0 8px 18px rgba(15, 23, 42, .055);
}

html body main.actual-execution-page tr.actual-period-title-row td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

html body main.actual-execution-page tr.actual-period-title-row .actual-period-title-band {
    padding: 8px 12px !important;
    border: 1px solid rgba(146, 64, 14, .34) !important;
    border-radius: 10px 10px 6px 6px !important;
    background: #f59e0b !important;
    box-shadow: 0 8px 16px rgba(217, 119, 6, .14), inset 0 1px 0 rgba(255, 255, 255, .24);
    text-align: start;
}

html body main.actual-execution-page tr.actual-period-title-row + tr.actual-period-row td {
    border-top-color: rgba(217, 119, 6, .28);
}

html body main.actual-execution-page tr.actual-period-title-row .actual-period-title-band strong {
    display: block;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html body main.actual-execution-page .actual-period-number {
    display: inline-grid;
    width: 22px;
    height: 22px;
    margin-inline-end: 8px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    vertical-align: middle;
}

html[dir="rtl"] body main.actual-execution-page tr.actual-item-row td {
    box-shadow: inset -5px 0 0 #0f766e, 0 8px 18px rgba(15, 23, 42, .055);
}

html body main.actual-execution-page .actual-item-head {
    gap: 7px;
    padding: 11px 13px;
}

html body main.actual-execution-page .actual-item-head > span {
    color: #102033;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

html body main.actual-execution-page .actual-item-titleline > strong {
    min-width: 54px;
    color: #fff;
    border-color: rgba(15, 49, 95, .18);
    background: linear-gradient(135deg, #0f315f, #174b72);
    font-size: 12px;
}

html body main.actual-execution-page .actual-item-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(760px, 100%);
}

html body main.actual-execution-page .actual-item-metric {
    justify-content: center;
    white-space: normal;
    text-align: center;
}

html body main.actual-execution-page .actual-period-indent {
    width: 20px;
    height: 20px;
    border-color: #0e7490;
}

html body main.actual-execution-page .actual-period-title {
    padding-inline-start: 8px !important;
}

html body main.actual-execution-page .actual-period-title > strong {
    color: #0f315f;
    font-size: 11.5px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

html body main.actual-execution-page .actual-period-meta {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

html body main.actual-execution-page .actual-period-meta span,
html body main.actual-execution-page .actual-period-meta .actual-status,
html body main.actual-execution-page .actual-plan-chip {
    min-width: 0;
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 9px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
}

html body main.actual-execution-page .actual-period-meta .actual-plan-chip.weight {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fed7aa;
}

html body main.actual-execution-page .actual-period-meta .actual-percent-chip {
    font-weight: 950;
}

html body main.actual-execution-page .actual-period-meta .actual-percent-chip b {
    color: inherit;
    font-size: 10px;
    font-weight: 950;
    white-space: nowrap;
}

html body main.actual-execution-page .actual-total-percent-chip {
    display: grid;
    gap: 2px;
    margin-bottom: 5px;
    padding: 6px;
    border: 1px solid #93c5fd;
    border-radius: 7px;
    background: rgba(219, 234, 254, .92);
    color: #1e40af;
    font-size: 8.7px;
    font-weight: 950;
    line-height: 1.25;
    text-align: center;
}

html body main.actual-execution-page table.actual-execution-table tr.actual-period-row td:nth-child(3) {
    padding-top: 9px;
}

html body main.actual-execution-page .actual-total-percent-chip b {
    color: inherit;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

html body main.actual-execution-page .actual-total-percent-chip svg {
    display: none;
}

html body main.actual-execution-page .actual-total-percent-chip.ahead {
    color: #065f46;
    background: rgba(209, 250, 229, .92);
    border-color: #6ee7b7;
}

html body main.actual-execution-page .actual-total-percent-chip.behind {
    color: #991b1b;
    background: rgba(254, 226, 226, .94);
    border-color: #fca5a5;
}

html body main.actual-execution-page .actual-total-percent-chip.on_track {
    color: #1e40af;
    background: rgba(219, 234, 254, .92);
    border-color: #93c5fd;
}

html body main.actual-execution-page .actual-percent-legacy {
    display: none !important;
}

html body main.actual-execution-page .actual-period-meta .actual-date-chip {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: center;
    column-gap: 6px;
    row-gap: 2px;
}

html body main.actual-execution-page .actual-period-meta .actual-date-chip svg {
    grid-row: 1 / span 2;
}

html body main.actual-execution-page .actual-period-meta .actual-date-chip b {
    color: #1e3a8a;
    font-size: 8.8px;
    font-weight: 950;
    line-height: 1.1;
}

html body main.actual-execution-page .actual-period-meta .actual-date-chip em {
    color: #0f315f;
    font-size: 9.6px;
    font-style: normal;
    font-weight: 950;
    line-height: 1.15;
    white-space: nowrap;
}

html body main.actual-execution-page .actual-period-meta .actual-previous-chip.completed {
    color: #065f46;
    background: #d1fae5;
    border-color: #6ee7b7;
}

html body main.actual-execution-page .actual-period-meta .actual-previous-chip.delayed {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

html body main.actual-execution-page .actual-period-meta .actual-previous-chip.paused {
    color: #92400e;
    background: #fef3c7;
    border-color: #fbbf24;
}

html body main.actual-execution-page .actual-period-meta .actual-previous-chip.in_progress {
    color: #1e40af;
    background: #dbeafe;
    border-color: #93c5fd;
}

html body main.actual-execution-page .actual-period-meta .actual-previous-chip.not_started {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

html body main.actual-execution-page .actual-entry-form {
    grid-template-columns: .92fr .82fr .86fr .9fr;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(14, 116, 144, .22);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(236, 253, 245, .76), rgba(255, 255, 255, .98)), #fff;
}

html body main.actual-execution-page .actual-entry-form label > span {
    min-height: 13px;
    color: #334155;
    font-size: 8.7px;
    white-space: normal;
}

html body main.actual-execution-page .actual-entry-form input {
    height: 34px;
    border-radius: 7px;
    font-size: 10px;
}

html body main.actual-execution-page .actual-entry-form input[readonly] {
    color: #0f315f;
    background: #f8fafc;
}

html body main.actual-execution-page .actual-entry-form .actual-entry-notes {
    grid-column: 1 / 4;
}

html body main.actual-execution-page .actual-entry-form button {
    min-height: 50px;
    border-radius: 8px;
    background: linear-gradient(180deg, #16a34a, #15803d);
    border-color: rgba(21, 128, 61, .42);
    box-shadow: 0 10px 18px rgba(21, 128, 61, .18);
    font-size: 10px;
}

@media (max-width: 1280px) {
    html body main.actual-execution-page section.actual-table-panel .table-wrap {
        overflow-x: auto;
    }

    html body main.actual-execution-page table.actual-execution-table {
        min-width: 1180px;
    }
}

.boq-structure-scope-card {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.98));
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.boq-structure-scope-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.boq-structure-scope-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #0f4c81;
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.24);
}

.boq-structure-scope-head h3 {
    margin: 0;
    color: #0f2f5f;
    font-size: 1.15rem;
}

.boq-structure-scope-head p {
    margin: 4px 0 0;
    color: #475569;
    font-weight: 700;
}

.boq-structure-scope-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.boq-structure-scope-summary span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 13px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.boq-structure-scope-summary small {
    color: #64748b;
    font-weight: 800;
}

.boq-structure-scope-summary strong {
    color: #0f4c81;
    font-size: 1rem;
}

.boq-structure-scope-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.boq-structure-scope-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #0f172a;
    font-weight: 900;
}

.boq-structure-scope-form input,
.boq-structure-scope-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(15, 76, 129, 0.2);
    border-radius: 12px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    font-weight: 800;
}

.boq-structure-save {
    min-height: 46px;
    border-radius: 14px;
    background: #16a34a !important;
    border-color: #16a34a !important;
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.2);
}

@media (max-width: 980px) {
    .boq-structure-scope-summary,
    .boq-structure-scope-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .boq-structure-scope-summary,
    .boq-structure-scope-form {
        grid-template-columns: 1fr;
    }
}

/* Final BOQ structure scope - aligned with BOQ setup visual system */
.boq-setup-page .boq-structure-scope-card {
    position: relative;
    overflow: hidden;
    margin: 0 0 16px !important;
    padding: 15px !important;
    border: 1px solid rgba(37, 99, 235, .22) !important;
    border-radius: 12px !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .13), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(15, 118, 110, .12), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(248, 250, 252, .92)) !important;
    box-shadow:
        0 18px 38px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .96) !important;
}

.boq-setup-page .boq-structure-scope-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #2563eb, #0f766e);
}

html[dir="rtl"] .boq-setup-page .boq-structure-scope-card::before {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

.boq-setup-page .boq-structure-scope-head {
    min-height: 62px;
    margin: 0 0 12px !important;
    padding: 12px 14px !important;
    border-radius: 11px !important;
    border: 1px solid rgba(37, 99, 235, .2) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.58)),
        linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(15, 118, 110, .10)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 10px 22px rgba(37,99,235,.08) !important;
}

.boq-setup-page .boq-structure-scope-icon {
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 20px rgba(37, 99, 235, .18) !important;
}

.boq-setup-page .boq-structure-scope-icon svg {
    width: 23px;
    height: 23px;
}

.boq-setup-page .boq-structure-scope-head h3 {
    margin: 0 !important;
    color: var(--boq-ink, #0f172a) !important;
    font-size: 17px !important;
    line-height: 1.35 !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-structure-scope-head p {
    max-width: 920px;
    margin: 4px 0 0 !important;
    color: #475569 !important;
    font-size: 12px !important;
    line-height: 1.65 !important;
    font-weight: 800 !important;
}

.boq-setup-page .boq-structure-scope-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin: 0 0 12px !important;
}

.boq-setup-page .boq-structure-scope-summary span {
    min-height: 62px;
    padding: 9px 11px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(37, 99, 235, .16) !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.9)),
        linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(15, 118, 110, .06)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(15, 23, 42, .05);
}

.boq-setup-page .boq-structure-scope-summary small {
    color: #475569 !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
}

.boq-setup-page .boq-structure-scope-summary strong {
    overflow: hidden;
    color: #1d4ed8 !important;
    font-size: 14px !important;
    line-height: 1.35;
    font-weight: 950 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boq-setup-page .boq-structure-scope-form {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
    padding: 12px !important;
    border: 1px dashed rgba(37, 99, 235, .24);
    border-radius: 11px;
    background: rgba(255,255,255,.72);
}

.boq-setup-page .boq-structure-scope-form label {
    gap: 6px !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.boq-setup-page .boq-structure-scope-form label:nth-child(1),
.boq-setup-page .boq-structure-scope-form label:nth-child(2),
.boq-setup-page .boq-structure-scope-form label:nth-child(3) {
    grid-column: span 2;
}

.boq-setup-page .boq-structure-scope-form label:nth-child(5) {
    grid-column: span 2;
}

.boq-setup-page .boq-structure-scope-form input,
.boq-setup-page .boq-structure-scope-form select {
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(51, 65, 85, .18) !important;
    color: #0f172a !important;
    background: #fff !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="phase_name"]),
.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="zone_name"]),
.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="building_name"]),
.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="building_repeat_count"]) {
    display: none !important;
}

.boq-scope-readonly-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-self: stretch;
}

.boq-scope-readonly-metrics span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 40px;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid rgba(37, 99, 235, .14);
    background: linear-gradient(180deg, #fff, rgba(239, 246, 255, .68));
}

.boq-scope-readonly-metrics small {
    color: #64748b;
    font-size: 9.5px;
    font-weight: 900;
}

.boq-scope-readonly-metrics strong {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 950;
}

.boq-setup-page .boq-structure-save {
    grid-column: span 2;
    justify-self: stretch;
    min-height: 40px !important;
    padding: 9px 16px !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    border: 1px solid rgba(21, 128, 61, .5) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 9px 18px rgba(21, 128, 61, .18) !important;
}

@media (max-width: 1200px) {
    .boq-setup-page .boq-structure-scope-form {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .boq-setup-page .boq-structure-scope-form label,
    .boq-setup-page .boq-structure-scope-form label:nth-child(1),
    .boq-setup-page .boq-structure-scope-form label:nth-child(2),
    .boq-setup-page .boq-structure-scope-form label:nth-child(3),
    .boq-setup-page .boq-structure-scope-form label:nth-child(5),
    .boq-setup-page .boq-structure-save {
        grid-column: span 1;
    }
}

@media (max-width: 820px) {
    .boq-setup-page .boq-structure-scope-summary,
    .boq-setup-page .boq-structure-scope-form {
        grid-template-columns: 1fr !important;
    }
}

/* Advanced final-BOQ scope link layout. */
.boq-setup-page .boq-structure-scope-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .11), transparent 30%),
        radial-gradient(circle at bottom right, rgba(217, 119, 6, .10), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.boq-setup-page .boq-structure-scope-card .boq-structure-scope-summary {
    display: none !important;
}

.boq-setup-page .boq-structure-scope-head {
    order: 0;
}

.boq-setup-page .boq-scope-breadcrumb {
    order: 1;
}

.boq-setup-page .boq-scope-top-metrics {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: -2px 0 10px;
}

.boq-setup-page .boq-scope-top-metrics span {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.88)),
        linear-gradient(135deg, rgba(37,99,235,.12), rgba(15,118,110,.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 8px 18px rgba(15,23,42,.05);
}

.boq-setup-page .boq-scope-top-metrics span:nth-child(1) {
    border-color: rgba(37, 99, 235, .25);
    background:
        linear-gradient(180deg, rgba(239,246,255,.98), rgba(219,234,254,.82));
}

.boq-setup-page .boq-scope-top-metrics span:nth-child(2) {
    border-color: rgba(217, 119, 6, .26);
    background:
        linear-gradient(180deg, rgba(255,247,237,.98), rgba(254,215,170,.46));
}

.boq-setup-page .boq-scope-top-metrics span:nth-child(3) {
    border-color: rgba(15, 118, 110, .25);
    background:
        linear-gradient(180deg, rgba(240,253,250,.98), rgba(204,251,241,.56));
}

.boq-setup-page .boq-scope-top-metrics small {
    color: #475569;
    font-size: 10px;
    font-weight: 950;
}

.boq-setup-page .boq-scope-top-metrics strong {
    color: #1d4ed8;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 950;
}

.boq-setup-page .boq-scope-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, .25);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,247,237,.88), rgba(255,251,235,.78));
    color: #7c2d12;
    font-size: 12px;
    font-weight: 950;
}

.boq-setup-page .boq-scope-breadcrumb > span {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    overflow-wrap: anywhere;
}

.boq-setup-page .boq-scope-path-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    box-shadow: 0 8px 16px rgba(15,23,42,.10);
}

.boq-setup-page .boq-scope-path-chip-1 {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

.boq-setup-page .boq-scope-path-chip-2 {
    background: linear-gradient(180deg, #d97706, #b45309);
}

.boq-setup-page .boq-scope-path-chip-3 {
    background: linear-gradient(180deg, #0f766e, #0f5f59);
}

.boq-setup-page .boq-scope-path-separator {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 950;
}

.boq-setup-page .boq-scope-breadcrumb svg {
    width: 17px;
    height: 17px;
    color: #d97706;
}

.boq-setup-page .boq-scope-edit-trigger {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 9px;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.boq-setup-page .boq-scope-edit-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, .24);
}

.boq-setup-page .boq-scope-edit-trigger svg {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.boq-setup-page .boq-scope-warning,
.boq-setup-page .boq-scope-limit-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid rgba(217, 119, 6, .28);
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 950;
}

.boq-setup-page .boq-scope-warning {
    order: 3;
}

.boq-setup-page .boq-scope-limit-warning[hidden] {
    display: none !important;
}

.boq-scope-modal[hidden] {
    display: none !important;
}

body.boq-scope-modal-open {
    overflow: hidden;
}

.boq-scope-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(10px);
}

.boq-scope-modal:not([hidden]) {
    display: flex !important;
}

.boq-scope-modal-card {
    width: min(920px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border: 1px solid rgba(37, 99, 235, .2);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 34%),
        #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.boq-scope-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    color: #fff;
    background:
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%);
}

.boq-scope-modal-head > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.boq-scope-modal-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}

.boq-scope-modal-icon svg,
.boq-scope-modal-close svg {
    width: 20px;
    height: 20px;
}

.boq-scope-modal-head h3 {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 950;
}

.boq-scope-modal-head p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 800;
}

.boq-scope-modal-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
}

.boq-scope-modal-body {
    padding: 16px;
}

.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
    padding: 14px !important;
    border: 1px solid rgba(37, 99, 235, .12) !important;
    border-radius: 14px !important;
    background: rgba(248, 250, 252, .86) !important;
}

.boq-scope-modal .boq-structure-scope-form label {
    gap: 6px !important;
    color: #334155 !important;
    font-size: 11px !important;
    font-weight: 950 !important;
}

.boq-scope-modal .boq-structure-scope-form input,
.boq-scope-modal .boq-structure-scope-form select {
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(51, 65, 85, .18) !important;
    color: #0f172a !important;
    background: #fff !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-select-field {
    grid-column: span 3 !important;
}

.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-readonly-metrics {
    display: none !important;
}

.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="phase_name"]),
.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="zone_name"]),
.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="building_name"]),
.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="building_repeat_count"]),
.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(select[name="quantity_mode"]) {
    display: none !important;
}

.boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="repetition_count"]) {
    grid-column: span 3 !important;
}

.boq-scope-modal .boq-scope-operation-box {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.2fr);
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(239,246,255,.74), rgba(219,234,254,.46));
}

.boq-scope-modal .boq-scope-operation-box label {
    min-width: 0;
}

.boq-scope-modal .boq-scope-operation-box input,
.boq-scope-modal .boq-scope-operation-box select {
    background: rgba(255,255,255,.96) !important;
}

.boq-scope-modal .boq-scope-limit-warning {
    grid-column: 1 / -1;
    margin: 0 !important;
}

.boq-scope-modal .boq-structure-save {
    grid-column: 4 / span 6 !important;
    justify-self: stretch !important;
    min-height: 40px !important;
    padding: 9px 16px !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    border: 1px solid rgba(21, 128, 61, .5) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 9px 18px rgba(21, 128, 61, .18) !important;
}

@media (max-width: 900px) {
    .boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-select-field,
    .boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="repetition_count"]) {
        grid-column: span 6 !important;
    }
}

@media (max-width: 640px) {
    .boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-select-field,
    .boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] label:has(input[name="repetition_count"]),
    .boq-scope-modal .boq-structure-save {
        grid-column: 1 / -1 !important;
    }
}

.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
}

.boq-setup-page .boq-scope-modal .boq-structure-scope-form[data-boq-scope-form] {
    padding: 14px !important;
    border: 1px solid rgba(37, 99, 235, .12) !important;
    border-radius: 14px !important;
    background: rgba(248, 250, 252, .86) !important;
}

.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-select-field {
    grid-column: span 4 !important;
}

.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-readonly-metrics {
    display: none !important;
}

.boq-setup-page .boq-scope-operation-box {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.2fr);
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(239,246,255,.74), rgba(219,234,254,.46));
}

.boq-setup-page .boq-scope-operation-box label {
    min-width: 0;
}

.boq-setup-page .boq-scope-operation-box input,
.boq-setup-page .boq-scope-operation-box select {
    background: rgba(255,255,255,.96) !important;
}

.boq-setup-page .boq-scope-limit-warning {
    grid-column: 1 / -1;
    margin: 0 !important;
}

.boq-setup-page .boq-structure-scope-form[data-boq-scope-form] .boq-structure-save {
    grid-column: 4 / span 6 !important;
    justify-self: stretch !important;
}

@media (max-width: 980px) {
    .boq-setup-page .boq-scope-top-metrics,
    .boq-setup-page .boq-scope-operation-box {
        grid-template-columns: 1fr;
    }

    .boq-setup-page .boq-structure-scope-form[data-boq-scope-form] > .boq-scope-select-field,
    .boq-setup-page .boq-structure-scope-form[data-boq-scope-form] .boq-structure-save {
        grid-column: 1 / -1 !important;
    }
}

.project-structure-page {
    --structure-blue: #1d4ed8;
    --structure-green: #0f766e;
    --structure-ink: #0f172a;
}

.project-structure-hero {
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .14), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(15, 118, 110, .14), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
    box-shadow: 0 22px 48px rgba(15, 23, 42, .08);
}

.project-structure-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    font-size: 12px;
    font-weight: 950;
}

.project-structure-form-card,
.project-structure-phase {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,250,252,.94));
    box-shadow: 0 18px 38px rgba(15, 23, 42, .075);
}

.project-structure-card-title,
.project-structure-phase > header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(15,118,110,.08));
    border: 1px solid rgba(37, 99, 235, .16);
}

.project-structure-card-title > span,
.project-structure-phase > header > span {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}

.project-structure-card-title h2,
.project-structure-phase h2 {
    margin: 0;
    color: var(--structure-ink);
    font-size: 18px;
    font-weight: 950;
}

.project-structure-card-title p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.project-structure-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(180px, .8fr);
    gap: 10px;
    align-items: end;
}

.project-structure-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 11px;
    font-weight: 950;
}

.project-structure-form input {
    min-height: 42px;
    border: 1px solid rgba(51, 65, 85, .18);
    border-radius: 10px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    font-size: 12px;
    font-weight: 850;
}

.project-structure-save {
    min-height: 42px;
    border-radius: 11px !important;
    color: #fff !important;
    background: linear-gradient(180deg, #16a34a, #15803d) !important;
    border-color: rgba(21, 128, 61, .5) !important;
}

.project-structure-zone {
    padding: 12px;
    border-inline-start: 4px solid var(--structure-green);
    border-radius: 13px;
    background: rgba(240, 253, 250, .5);
}

html[dir="rtl"] .project-structure-zone {
    border-inline-start: 0;
    border-inline-end: 4px solid var(--structure-green);
}

.project-structure-zone + .project-structure-zone {
    margin-top: 12px;
}

.project-structure-zone h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #0f766e;
    font-size: 15px;
    font-weight: 950;
}

.project-structure-zone-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}

.project-structure-zone-display {
    flex: 1;
}

.project-structure-page [hidden] {
    display: none !important;
}

.project-structure-zone-edit {
    flex: 1;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 34px;
    grid-template-rows: repeat(2, 30px);
    align-items: stretch;
    gap: 8px;
    color: #0f766e;
}

.project-structure-zone-edit > svg,
.project-structure-zone-edit > i {
    grid-row: 1 / 3;
    align-self: center;
}

.project-structure-zone-edit input,
.project-structure-building-edit input {
    min-height: 34px;
    width: 100%;
    border: 1px solid rgba(15, 118, 110, .2);
    border-radius: 9px;
    padding: 0 10px;
    color: #0f172a;
    background: #fff;
    font-size: 11.5px;
    font-weight: 900;
}

.project-structure-zone-edit input {
    grid-row: 1 / 3;
}

.project-structure-zone-edit .project-structure-action {
    grid-column: 3;
}

.project-structure-buildings {
    display: grid;
    gap: 9px;
}

.project-structure-building {
    display: grid;
    grid-template-columns: minmax(300px, 1.55fr) repeat(3, minmax(96px, .55fr)) 38px;
    gap: 8px;
    align-items: stretch;
    padding: 9px;
    border: 1px solid rgba(37, 99, 235, .13);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.project-structure-building.linked {
    border-color: rgba(37, 99, 235, .22);
    background: linear-gradient(180deg, #fff, rgba(239, 246, 255, .68));
}

.project-structure-building-edit {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(100px, .45fr) 34px;
    grid-template-rows: repeat(2, 30px);
    gap: 8px;
    min-width: 0;
}

.project-structure-building-edit .building-name,
.project-structure-building-edit span {
    grid-row: 1 / 3;
}

.project-structure-building-edit .project-structure-action {
    grid-column: 3;
}

.project-structure-building-display,
.project-structure-building-summary {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(100px, .45fr);
    gap: 8px;
    min-width: 0;
}

.project-structure-building .building-name,
.project-structure-building span {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.project-structure-building .building-name {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    color: #0f172a;
    font-size: 13px;
}

.project-structure-building small {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
}

.project-structure-building b {
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 950;
}

.project-structure-building-delete {
    display: flex;
    align-items: stretch;
}

.project-structure-row-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 34px;
    min-width: 34px;
}

.project-structure-row-actions form {
    margin: 0;
}

.project-structure-action {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 1px solid rgba(37, 99, 235, .28);
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 12px rgba(37,99,235,.14);
    cursor: pointer;
}

.project-structure-action svg {
    width: 14px;
    height: 14px;
}

.project-structure-action.save {
    border-color: rgba(22, 163, 74, .36);
    background: linear-gradient(180deg, #22c55e, #16a34a);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 12px rgba(22,163,74,.14);
}

.project-structure-action.cancel {
    border-color: rgba(100, 116, 139, .32);
    color: #334155;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 6px 12px rgba(100,116,139,.08);
}

.project-structure-action.danger {
    border-color: rgba(220, 38, 38, .38);
    background: linear-gradient(180deg, #ef4444, #dc2626);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 12px rgba(220,38,38,.12);
}

.project-structure-action.disabled,
.project-structure-action:disabled {
    opacity: .38;
    filter: grayscale(.25);
    cursor: not-allowed;
    box-shadow: none;
}

.project-structure-empty {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .project-structure-form,
    .project-structure-building {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-structure-building-edit {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .project-structure-form,
    .project-structure-building {
        grid-template-columns: 1fr;
    }
}

/* Project structure: polished technical-office visual system. */
.project-structure-page {
    --structure-office-blue: #2563eb;
    --structure-office-blue-dark: #153e91;
    --structure-office-cyan: #0e7490;
    --structure-office-green: #16865b;
    --structure-office-gold: #d97706;
    --structure-border: rgba(37, 99, 235, .18);
    --structure-shadow: 0 18px 38px rgba(15, 23, 42, .085);
    display: grid;
    gap: 14px;
}

.project-structure-page .project-structure-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px !important;
    border: 1px solid rgba(37, 99, 235, .22) !important;
    border-radius: 14px !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.94) 0%, rgba(239,246,255,.92) 48%, rgba(236,253,245,.86) 100%) !important;
    box-shadow: var(--structure-shadow) !important;
}

.project-structure-page .project-structure-hero::before {
    content: "";
    position: absolute;
    inset-block: -70px;
    inset-inline-end: 10%;
    width: 220px;
    transform: rotate(18deg);
    border-inline: 32px solid rgba(37, 99, 235, .06);
    pointer-events: none;
}

.project-structure-page .project-structure-hero h1 {
    margin: 8px 0 5px;
    color: #0f2947;
    font-size: 25px;
    font-weight: 950;
    letter-spacing: 0;
}

.project-structure-page .project-structure-project-name {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 7px;
    padding: 5px 12px;
    border: 1px solid rgba(37, 99, 235, .22);
    border-radius: 999px;
    background: rgba(239, 246, 255, .88);
    color: #153e91;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.25;
}

.project-structure-page .project-structure-hero p {
    margin: 0;
    max-width: 820px;
    color: #425466;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.7;
}

.project-structure-page .project-structure-kicker {
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, .35);
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #3b82f6, #2563eb) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 20px rgba(37,99,235,.16);
}

.project-structure-page .project-structure-kicker svg {
    width: 16px;
    height: 16px;
}

.project-structure-page .badges {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-structure-page .badges .link-button {
    min-height: 40px !important;
    border-radius: 10px !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 20px rgba(37,99,235,.17) !important;
}

.project-structure-page .badges .project-structure-print-button {
    cursor: pointer;
    border-color: rgba(21, 128, 61, .5) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 20px rgba(21,128,61,.18) !important;
}

.project-structure-print-heading {
    display: none;
}

.project-structure-page .project-structure-form-card,
.project-structure-page .project-structure-phase {
    overflow: hidden;
    margin-top: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--structure-border) !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: var(--structure-shadow) !important;
}

.project-structure-page .project-structure-card-title,
.project-structure-page .project-structure-phase > header {
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(37, 99, 235, .16) !important;
    border-radius: 0 !important;
    background:
        linear-gradient(135deg, #0f2947 0%, #153e91 55%, #0e7490 100%) !important;
    color: #fff;
}

.project-structure-page .project-structure-card-title > span,
.project-structure-page .project-structure-phase > header > span {
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: rgba(255,255,255,.14) !important;
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.project-structure-page .project-structure-card-title svg,
.project-structure-page .project-structure-phase > header svg {
    width: 24px;
    height: 24px;
}

.project-structure-page .project-structure-card-title h2,
.project-structure-page .project-structure-phase h2 {
    color: #fff !important;
    font-size: 18px !important;
}

.project-structure-page .project-structure-card-title p {
    color: rgba(255,255,255,.84) !important;
    font-size: 11.5px !important;
    line-height: 1.55;
}

.project-structure-page .project-structure-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(220px, .8fr) !important;
    gap: 10px !important;
    padding: 14px 16px 16px;
    background:
        linear-gradient(180deg, rgba(248,250,252,.98), #fff);
}

.project-structure-page .project-structure-form label {
    gap: 6px !important;
    color: #334155 !important;
    font-size: 11px !important;
}

.project-structure-page .project-structure-form input,
.project-structure-page .project-structure-zone-edit input,
.project-structure-page .project-structure-building-edit input {
    min-height: 39px !important;
    border: 1px solid rgba(148, 163, 184, .58) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #fff, #f8fafc) !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
}

.project-structure-page .project-structure-form input:focus,
.project-structure-page .project-structure-zone-edit input:focus,
.project-structure-page .project-structure-building-edit input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, .75) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10), inset 0 1px 2px rgba(15,23,42,.04);
}

.project-structure-page .project-structure-save {
    justify-content: center;
    min-height: 41px !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 44%),
        linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
    border: 1px solid rgba(21, 128, 61, .5) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 10px 20px rgba(21,128,61,.18) !important;
}

.project-structure-page .project-structure-tree {
    display: grid;
    gap: 14px;
}

.project-structure-page .project-structure-phase > header {
    min-height: 72px;
}

.project-structure-page .project-structure-zone {
    position: relative;
    margin: 14px !important;
    padding: 12px !important;
    border: 1px solid rgba(14, 116, 144, .22) !important;
    border-inline-start: 5px solid var(--structure-office-cyan) !important;
    border-radius: 12px !important;
    background:
        linear-gradient(180deg, rgba(236,253,245,.74), rgba(240,249,255,.72)) !important;
}

html[dir="rtl"] .project-structure-page .project-structure-zone {
    border-inline-start: 1px solid rgba(14, 116, 144, .22) !important;
    border-inline-end: 5px solid var(--structure-office-cyan) !important;
}

.project-structure-page .project-structure-zone-toolbar {
    min-height: 48px;
    margin-bottom: 11px !important;
    padding: 8px 10px;
    border: 1px solid rgba(217, 119, 6, .32);
    border-radius: 10px;
    background: rgba(249, 115, 22, .40);
}

.project-structure-page .project-structure-zone h3 {
    margin: 0 !important;
    color: #0f2947 !important;
    font-size: 15px !important;
}

.project-structure-page .project-structure-zone h3 svg,
.project-structure-page .project-structure-zone-edit > svg {
    width: 24px !important;
    height: 24px !important;
    color: var(--structure-office-cyan) !important;
}

.project-structure-page .project-structure-buildings {
    gap: 16px !important;
}

.project-structure-page .project-structure-building {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
    border: 2px solid rgba(37, 99, 235, .24) !important;
    border-radius: 11px !important;
    background:
        linear-gradient(180deg, #fff, rgba(248,250,252,.94)) !important;
    box-shadow: 0 10px 22px rgba(15,23,42,.055) !important;
}

.project-structure-page .project-structure-building.linked {
    border-color: rgba(37, 99, 235, .34) !important;
    background:
        linear-gradient(180deg, rgba(239,246,255,.96), #fff) !important;
}

.project-structure-page .project-structure-building-summary {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(86px, 112px)) 82px !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.project-structure-page .project-structure-building .building-name,
.project-structure-page .project-structure-building span {
    min-height: 48px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 9px !important;
    background: rgba(37, 99, 235, .08) !important;
}

.project-structure-page .project-structure-building-summary .building-name,
.project-structure-page .project-structure-building-summary > span {
    border: 2px solid rgba(37, 99, 235, .42) !important;
}

.project-structure-page .project-structure-building .building-name {
    justify-content: flex-start !important;
    gap: 12px !important;
    color: #0f2947 !important;
    font-size: 12.5px !important;
    font-weight: 950;
}

.project-structure-page .project-structure-building .building-name svg {
    flex: 0 0 auto;
    width: 25px !important;
    height: 25px !important;
    color: var(--structure-office-blue) !important;
}

.project-structure-page .project-structure-building small {
    color: #64748b !important;
    font-size: 9.5px !important;
}

.project-structure-page .project-structure-building b {
    color: var(--structure-office-blue-dark) !important;
    font-size: 14px !important;
}

.project-structure-page .project-structure-building > span:nth-of-type(1) b {
    color: var(--structure-office-gold) !important;
}

.project-structure-page .project-structure-building > span:nth-of-type(2) b {
    color: var(--structure-office-green) !important;
}

.project-structure-page .project-structure-building > span:nth-of-type(3) b {
    color: var(--structure-office-blue) !important;
}

.project-structure-page .project-structure-building-summary > span:nth-of-type(1) b {
    color: var(--structure-office-gold) !important;
}

.project-structure-page .project-structure-building-summary > span:nth-of-type(2) b {
    color: var(--structure-office-green) !important;
}

.project-structure-page .project-structure-building-summary > span:nth-of-type(3) b {
    color: var(--structure-office-blue) !important;
}

.project-structure-page .project-structure-building > span:not(.project-structure-linked-contracts) {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.project-structure-page .project-structure-building-summary > span {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.project-structure-page .project-structure-linked-contracts {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    background: #fff !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    text-align: start;
}

.project-structure-page .project-structure-building > .project-structure-linked-contracts {
    background: #fff !important;
}

.project-structure-page .project-structure-linked-contracts ol {
    width: 100%;
    margin: 0;
    padding-inline-start: 0;
    list-style-position: inside;
    color: var(--structure-office-blue-dark);
    font-size: 11px;
    line-height: 1.45;
    font-weight: 900;
}

html[dir="rtl"] .project-structure-page .project-structure-linked-contracts ol {
    padding-inline-start: 0;
    padding-inline-end: 0;
}

.project-structure-page .project-structure-linked-contracts li {
    overflow-wrap: anywhere;
    padding: 2px 0;
}

.project-structure-page .project-structure-contract-groups {
    display: grid;
    gap: 7px;
    width: 100%;
}

.project-structure-page .project-structure-contract-groups section {
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 9px;
    background: #fbfaf7;
}

.project-structure-page .project-structure-contract-groups section > strong {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(37, 99, 235, .12);
    color: #0f2947;
    background: #e2e8f0;
    font-size: 10.5px;
    font-weight: 950;
}

.project-structure-page .project-structure-contract-groups section > strong span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    flex-direction: row;
    flex-wrap: nowrap;
}

.project-structure-page .project-structure-print-context {
    display: none;
}

.project-structure-page .project-structure-contract-groups section > strong span svg {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    color: var(--structure-office-blue);
}

.project-structure-page .project-structure-contract-groups section > strong em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 3px 8px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 999px;
    color: var(--structure-office-green);
    background: rgba(240, 253, 250, .92);
    font-size: 9.5px;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.project-structure-page .project-structure-contract-groups ol {
    counter-reset: structure-contract;
    display: grid;
    gap: 4px;
    padding: 6px !important;
    list-style: none;
}

.project-structure-page .project-structure-contract-groups li {
    counter-increment: structure-contract;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    min-height: 28px;
    padding: 4px 6px !important;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
}

.project-structure-page .project-structure-contract-groups li::before {
    content: counter(structure-contract);
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    background: var(--structure-office-blue);
    font-size: 10px;
    font-weight: 950;
}

.project-structure-page .project-structure-contract-groups li span {
    display: block !important;
    min-height: 0 !important;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #17324d;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.35;
}

.project-structure-page .project-structure-contract-groups li em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 23px;
    padding: 3px 8px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 999px;
    color: var(--structure-office-green);
    background: rgba(240, 253, 250, .92);
    font-size: 10.5px;
    font-style: normal;
    font-weight: 950;
    white-space: nowrap;
}

.project-structure-page .project-structure-row-actions {
    grid-column: auto !important;
    grid-row: auto !important;
    flex-direction: row !important;
    width: 82px !important;
    min-width: 82px !important;
    gap: 6px !important;
    align-self: stretch !important;
}

.project-structure-page .project-structure-action {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    border-radius: 9px !important;
    color: #fff !important;
    border: 1px solid rgba(37, 99, 235, .42) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 16px rgba(37,99,235,.15) !important;
}

.project-structure-page .project-structure-action svg {
    width: 15px !important;
    height: 15px !important;
}

.project-structure-page .project-structure-action.save {
    border-color: rgba(22, 163, 74, .42) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #22c55e, #16a34a) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 16px rgba(22,163,74,.14) !important;
}

.project-structure-page .project-structure-action.cancel {
    color: #334155 !important;
    border-color: rgba(148, 163, 184, .46) !important;
    background:
        linear-gradient(180deg, #fff, #e2e8f0) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 16px rgba(100,116,139,.08) !important;
}

.project-structure-page .project-structure-action.danger {
    border-color: rgba(220, 38, 38, .42) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.20), transparent 44%),
        linear-gradient(180deg, #ef4444, #dc2626) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 16px rgba(220,38,38,.13) !important;
}

.project-structure-page .project-structure-action.disabled,
.project-structure-page .project-structure-action:disabled {
    color: #64748b !important;
    border-color: rgba(148, 163, 184, .34) !important;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0) !important;
    opacity: .58 !important;
}

.project-structure-page .project-structure-zone-edit {
    grid-template-columns: 28px minmax(0, 1fr) 34px 34px !important;
    grid-template-rows: 36px !important;
    align-items: center !important;
}

.project-structure-page .project-structure-zone-edit > svg,
.project-structure-page .project-structure-zone-edit > i {
    grid-row: auto !important;
}

.project-structure-page .project-structure-zone-edit input {
    grid-row: auto !important;
}

.project-structure-page .project-structure-zone-edit .project-structure-action {
    grid-column: auto !important;
}

.project-structure-page .project-structure-building-edit {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(86px, 112px)) 34px 34px !important;
    grid-template-rows: minmax(58px, auto) !important;
    align-items: center;
    overflow: visible !important;
}

.project-structure-page .project-structure-building-edit[hidden],
.project-structure-page .project-structure-building-summary[hidden] {
    display: none !important;
}

.project-structure-page .project-structure-building-edit .building-name,
.project-structure-page .project-structure-building-edit span {
    grid-row: auto !important;
}

.project-structure-page .project-structure-building-edit .project-structure-action {
    grid-column: auto !important;
}

@media (max-width: 1180px) {
    .project-structure-page .project-structure-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .project-structure-page .project-structure-save {
        grid-column: 1 / -1;
    }

    .project-structure-page .project-structure-building {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .project-structure-page .project-structure-row-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .project-structure-page .project-structure-hero,
    .project-structure-page .project-structure-zone-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .project-structure-page .project-structure-form,
    .project-structure-page .project-structure-building,
    .project-structure-page .project-structure-building-display,
    .project-structure-page .project-structure-building-summary,
    .project-structure-page .project-structure-building-edit,
    .project-structure-page .project-structure-zone-edit {
        grid-template-columns: 1fr !important;
    }

    .project-structure-page .project-structure-row-actions {
        width: auto !important;
        min-width: 0 !important;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .sidebar-shell,
    .sidebar,
    .mobile-topbar,
    .topbar:not(.project-structure-hero),
    .project-structure-page .project-structure-hero,
    .project-structure-page .project-structure-form-card,
    .project-structure-page .project-structure-row-actions,
    .project-structure-page .project-structure-building-delete,
    .project-structure-page .project-structure-action,
    .project-structure-page form,
    .project-structure-page button,
    .project-structure-page .project-structure-row-actions svg,
    .project-structure-page .project-structure-row-actions i,
    .project-structure-page .project-structure-action svg,
    .project-structure-page .project-structure-action i {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .app-layout,
    .page-content,
    .shell.project-structure-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .project-structure-page {
        display: block !important;
        color: #0f172a !important;
    }

    .project-structure-print-heading {
        display: grid !important;
        gap: 5px;
        margin: 0 0 10px !important;
        padding: 12px 16px !important;
        border: 1px solid rgba(37, 99, 235, .35) !important;
        border-radius: 12px !important;
        background:
            linear-gradient(145deg, rgba(255,255,255,.12), transparent 44%),
            linear-gradient(135deg, #0f2947 0%, #153e91 58%, #0e7490 100%) !important;
        color: #fff !important;
        text-align: center;
        break-inside: avoid;
        box-shadow: 0 10px 22px rgba(15, 23, 42, .12) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-print-heading strong {
        color: #fff !important;
        font-size: 18pt;
        font-weight: 950;
        line-height: 1.2;
    }

    .project-structure-print-heading span {
        color: rgba(255,255,255,.9) !important;
        font-size: 10pt;
        font-weight: 900;
    }

    .project-structure-page .project-structure-tree {
        display: grid !important;
        gap: 6px !important;
    }

    .project-structure-page .project-structure-phase {
        margin: 0 0 8px !important;
        border: 1px solid #cbdbe8 !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        overflow: visible !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .project-structure-page .project-structure-phase > header {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-height: 0 !important;
        padding: 8px 11px !important;
        border-bottom: 1px solid #cbdbe8 !important;
        background: linear-gradient(135deg, #0f2947, #164c73) !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-phase > header > span {
        display: grid !important;
        width: 28px !important;
        height: 28px !important;
        place-items: center !important;
        border-radius: 8px !important;
        background: rgba(255,255,255,.14) !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-phase > header svg,
    .project-structure-page .project-structure-zone h3 svg,
    .project-structure-page .project-structure-building .building-name svg,
    .project-structure-page .project-structure-contract-groups section > strong svg {
        display: inline-block !important;
        width: 14px !important;
        height: 14px !important;
    }

    .project-structure-page .project-structure-phase h2 {
        color: #fff !important;
        font-size: 12pt !important;
    }

    .project-structure-page .project-structure-zone {
        margin: 7px !important;
        padding: 7px !important;
        border: 1px solid #b8d2dc !important;
        border-inline-start: 4px solid #0e7490 !important;
        border-radius: 9px !important;
        background: #f7fbfd !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html[dir="rtl"] .project-structure-page .project-structure-zone {
        border-inline-start: 1px solid #b8d2dc !important;
        border-inline-end: 4px solid #0e7490 !important;
    }

    .project-structure-page .project-structure-zone-toolbar {
        min-height: 0 !important;
        margin: 0 0 6px !important;
        padding: 6px 8px !important;
        border: 1px solid rgba(217, 119, 6, .35) !important;
        border-radius: 8px !important;
        background: rgba(255, 247, 237, .95) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    .project-structure-page .project-structure-zone h3 {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: #0f2947 !important;
        font-size: 9pt !important;
    }

    .project-structure-page .project-structure-buildings {
        display: block !important;
        gap: 0 !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .project-structure-page .project-structure-building {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 4px !important;
        padding: 4px !important;
        border: 1.5px solid #a9c4df !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: none !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        page-break-before: auto !important;
        break-before: auto !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-building + .project-structure-building {
        margin-top: 9px !important;
    }

    .project-structure-page .project-structure-buildings {
        break-before: auto !important;
        page-break-before: auto !important;
    }

    .project-structure-page .project-structure-building-display,
    .project-structure-page .project-structure-building-summary {
        display: none !important;
    }

    .project-structure-page .project-structure-building > span:not(.project-structure-linked-contracts) {
        display: none !important;
    }

    .project-structure-page .project-structure-building .building-name,
    .project-structure-page .project-structure-building span {
        min-height: 34px !important;
        padding: 5px 6px !important;
        border: 1px solid #dce7ee !important;
        border-radius: 7px !important;
        background: #fff !important;
    }

    .project-structure-page .project-structure-building .building-name {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 8.2pt !important;
    }

    .project-structure-page .project-structure-building small {
        font-size: 6pt !important;
    }

    .project-structure-page .project-structure-building b {
        font-size: 8pt !important;
    }

    .project-structure-page .project-structure-linked-contracts {
        display: table !important;
        table-layout: fixed !important;
        width: 100% !important;
        grid-column: 1 / -1 !important;
    }

    .project-structure-page .project-structure-contract-groups {
        display: table-row-group !important;
        gap: 4px !important;
    }

    .project-structure-page .project-structure-contract-groups section {
        border-radius: 7px !important;
        break-inside: avoid;
    }

    .project-structure-page .project-structure-contract-groups section > strong {
        grid-template-columns: minmax(0, 1fr) auto !important;
        min-height: 20px !important;
        padding: 3px 5px !important;
        font-size: 6.5pt !important;
        background: #eff6ff !important;
        color: #0f2947 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-contract-groups section > strong span {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .project-structure-page .project-structure-building > .project-structure-print-context {
        display: grid !important;
        grid-column: 1 / -1 !important;
        grid-template-columns: minmax(120px, 1fr) repeat(3, 54px) !important;
        gap: 3px !important;
        padding: 3px !important;
        border: 1px solid #d8e4ec !important;
        border-radius: 7px !important;
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-print-context-row {
        display: contents !important;
    }

    .project-structure-page .project-structure-linked-contracts > small {
        display: table-caption !important;
        caption-side: top;
        margin-bottom: 3px;
        color: #64748b !important;
        font-size: 6pt !important;
        font-weight: 900 !important;
    }

    .project-structure-page .project-structure-print-context-row > span {
        display: flex !important;
        min-height: 24px !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 4px 5px !important;
        border: 1px solid #dce7ee !important;
        border-radius: 6px !important;
        background: #fff !important;
        text-align: center !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-print-context-row > span:not(.building-name) {
        width: auto !important;
    }

    .project-structure-page .project-structure-print-context-row > .building-name {
        width: auto !important;
        color: #0f2947 !important;
        font-size: 6.8pt !important;
        font-weight: 950 !important;
        text-align: start !important;
        white-space: nowrap !important;
    }

    .project-structure-page .project-structure-print-context-row > .building-name svg {
        width: 12px !important;
        height: 12px !important;
        margin-inline-end: 3px !important;
        vertical-align: -2px !important;
    }

    .project-structure-page .project-structure-print-context small {
        display: block !important;
        color: #64748b !important;
        font-size: 5pt !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        min-height: 10.5pt !important;
    }

    .project-structure-page .project-structure-print-context b {
        display: block !important;
        color: #153e91 !important;
        font-size: 6.4pt !important;
        font-weight: 950 !important;
    }

    .project-structure-page .project-structure-contract-groups section > strong em {
        min-width: 36px !important;
        padding: 2px 5px !important;
        font-size: 5.6pt !important;
        background: #dcfce7 !important;
        color: #166534 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-contract-groups ol {
        gap: 3px !important;
        padding: 4px !important;
    }

    .project-structure-page .project-structure-contract-groups li {
        grid-template-columns: 18px minmax(0, 1fr) 42px !important;
        min-height: 23px !important;
        padding: 3px 4px !important;
        gap: 4px !important;
        border-radius: 6px !important;
    }

    .project-structure-page .project-structure-contract-groups li::before {
        width: 18px !important;
        height: 18px !important;
        border-radius: 5px !important;
        font-size: 6.5pt !important;
        background: #2563eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .project-structure-page .project-structure-contract-groups li span {
        font-size: 6.7pt !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .project-structure-page .project-structure-contract-groups li em {
        min-width: 0 !important;
        width: 42px !important;
        min-height: 18px !important;
        padding: 2px 6px !important;
        font-size: 6.8pt !important;
        background: #dcfce7 !important;
        color: #166534 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.project-costs-page {
    --project-costs-main: #0f766e;
    --project-costs-dark: #115e59;
    --project-costs-soft: #ecfdf5;
    display: grid;
    gap: 14px;
    color: #123047;
}

.project-costs-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(15, 118, 110, .24);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(15,118,110,.12), rgba(255,255,255,.94)),
        #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .075);
}

.project-costs-hero > div {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.project-costs-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--project-costs-dark), var(--project-costs-main));
    box-shadow: 0 12px 20px rgba(15, 118, 110, .18);
}

.project-costs-icon svg {
    width: 29px;
    height: 29px;
}

.project-costs-hero h1 {
    margin: 0;
    color: var(--project-costs-dark);
    font-size: 22px;
    font-weight: 950;
}

.project-costs-hero p {
    margin: 5px 0 0;
    color: #51697a;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.7;
}

.project-costs-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid rgba(15, 118, 110, .72);
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--project-costs-dark), var(--project-costs-main));
    text-decoration: none;
    font-size: 12px;
    font-weight: 950;
}

.project-costs-scope-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.project-costs-scope-grid article,
.project-costs-placeholder {
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .055);
}

.project-costs-scope-grid article {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 14px;
    text-align: center;
}

.project-costs-scope-grid article svg {
    width: 28px;
    height: 28px;
    color: var(--project-costs-main);
}

.project-costs-scope-grid article strong {
    color: #123047;
    font-size: 13px;
    font-weight: 950;
}

.project-costs-placeholder {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(236,253,245,.92), rgba(255,255,255,.92)),
        #fff;
}

.project-costs-placeholder > svg {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    color: var(--project-costs-main);
}

.project-costs-placeholder h2 {
    margin: 0;
    color: var(--project-costs-dark);
    font-size: 17px;
    font-weight: 950;
}

.project-costs-placeholder p {
    margin: 5px 0 0;
    color: #536b7c;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .project-costs-hero,
    .project-costs-placeholder {
        align-items: stretch;
        flex-direction: column;
    }

    .project-costs-scope-grid {
        grid-template-columns: 1fr;
    }
}

/* Project Cost Management sidebar group: keep it visually aligned with main management buttons. */
.side-nav .side-management-costs {
    --side-accent: #0e7490;
    --side-accent-dark: #164e63;
    --side-text: #164e63;
}

.side-nav .side-management-costs:not(.side-management-costs-clean) {
    display: none !important;
}

.side-nav .side-management-costs > summary,
.side-nav .side-management-costs > summary:hover,
.side-nav .side-management-costs[open] > summary,
.side-nav .side-management-costs:has(.active) > summary {
    min-height: 40px !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(14, 116, 144, .46) !important;
    border-radius: 10px !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent 44%),
        linear-gradient(135deg, #164e63, #0e7490) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 12px 24px rgba(14, 116, 144, .18) !important;
    font-size: 12px !important;
    font-weight: 950 !important;
    transform: none !important;
}

.side-nav .side-management-costs > summary span {
    gap: 9px !important;
}

.side-nav .side-management-costs > summary span > svg {
    width: 25px !important;
    height: 25px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: transparent !important;
}

.side-nav .side-management-costs > summary .side-chevron {
    color: #fff !important;
}

.side-nav .side-costs-branch {
    margin-top: 5px !important;
}

.side-nav .side-management-link.costs {
    min-height: 33px !important;
    border: 1px solid rgba(14, 116, 144, .18) !important;
    border-radius: 8px !important;
    color: #164e63 !important;
    background: rgba(14, 116, 144, .08) !important;
    font-weight: 900 !important;
}

.side-nav .side-management-link.costs svg {
    color: #0e7490 !important;
}

.side-nav .side-management-link.costs:hover,
.side-nav .side-management-link.costs.active {
    color: #164e63 !important;
    border-color: rgba(14, 116, 144, .34) !important;
    background: rgba(14, 116, 144, .14) !important;
}

.side-nav .side-management-link.costs:hover svg,
.side-nav .side-management-link.costs.active svg {
    color: #0e7490 !important;
}

/* Industrial olive inventory identity. */
.side-nav .side-management-inventory,
.side-nav .side-management-inventory .side-management-link,
.side-nav .side-management-inventory .side-branch,
.side-nav .side-management-inventory .side-workspace-links {
    --side-accent: #4d7c0f !important;
    --side-accent-dark: #365314 !important;
    --side-text: #365314 !important;
}

.side-nav .side-management-inventory > summary,
.side-nav .side-management-inventory > summary:hover,
.side-nav .side-management-inventory[open] > summary,
.side-nav .side-management-inventory:has(.active) > summary {
    border-color: rgba(77, 124, 15, .52) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.16), transparent 44%),
        linear-gradient(135deg, #365314, #4d7c0f) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        0 12px 24px rgba(77, 124, 15, .18) !important;
}

.side-nav .side-management-inventory > summary span > svg,
.side-nav .side-management-inventory > summary .side-chevron {
    color: #fff !important;
    background: transparent !important;
}

.side-nav .side-management-link.inventory,
.side-nav .side-management-inventory .side-management-link,
.side-nav .side-management-inventory .side-sub-link,
.side-nav .side-management-inventory .side-workspace-link {
    color: #365314 !important;
}

.side-nav .side-management-link.inventory:hover,
.side-nav .side-management-link.inventory.active,
.side-nav .side-management-inventory .side-management-link:hover,
.side-nav .side-management-inventory .side-management-link.active,
.side-nav .side-management-inventory .side-sub-link:hover,
.side-nav .side-management-inventory .side-sub-link.active,
.side-nav .side-management-inventory .side-workspace-link:hover,
.side-nav .side-management-inventory .side-workspace-link.active {
    color: #365314 !important;
    border-color: rgba(77, 124, 15, .32) !important;
    background: rgba(77, 124, 15, .13) !important;
}

.side-nav .side-management-link.inventory svg,
.side-nav .side-management-inventory .side-management-link svg,
.side-nav .side-management-inventory .side-sub-link svg,
.side-nav .side-management-inventory .side-workspace-link svg {
    color: #4d7c0f !important;
}

.side-nav .side-finance-standalone,
.side-nav .side-management-technical > .side-finance-group {
    display: none !important;
}

.side-nav .side-costs-finance {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.side-nav .side-costs-finance > summary {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
}

.side-nav .side-costs-finance > summary::-webkit-details-marker {
    display: none !important;
}

.side-nav .side-costs-finance > summary span {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 7px !important;
}

.side-nav .side-costs-finance .side-chevron {
    width: 13px !important;
    height: 13px !important;
    color: #0e7490 !important;
}

.side-nav .side-costs-finance[open] > summary .side-chevron {
    transform: rotate(180deg) !important;
}

.side-nav .side-management-costs .side-costs-finance-title {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-height: 35px !important;
    margin-inline: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    padding: 8px 9px !important;
    border: 1px solid rgba(14, 116, 144, .62) !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: #0e7490 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 20px rgba(14,116,144,.16) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
}

.side-nav .side-management-costs .side-costs-finance-title svg,
.side-nav .side-management-costs .side-costs-finance-title i,
.side-nav .side-management-costs .side-costs-finance-title span {
    color: #fff !important;
}

.side-nav .side-management-costs .side-costs-finance-title svg,
.side-nav .side-management-costs .side-costs-finance-title i {
    justify-self: center !important;
    width: 16px !important;
    height: 16px !important;
}

html[dir="ltr"] .side-nav .side-costs-finance-links > .side-sub-link {
    margin-inline-start: 0 !important;
}

html[dir="ltr"] .side-nav .side-costs-finance-links > .side-sub-link::before {
    inset-inline-start: -14px !important;
    width: 14px !important;
}

/* Final BOQ scope path polish */
html body .boq-setup-page .boq-scope-breadcrumb {
    justify-content: center !important;
}

html body .boq-setup-page .boq-scope-breadcrumb > span {
    flex: 0 1 85% !important;
    width: 85% !important;
    max-width: 980px !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-inline: auto !important;
}

html body .boq-setup-page .boq-scope-path-chip {
    min-width: 155px !important;
    min-height: 38px !important;
    padding: 8px 18px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}

html body .boq-setup-page .boq-scope-path-chip-4,
html body .boq-setup-page .boq-scope-contract-count {
    min-width: 210px !important;
    min-height: 38px !important;
    padding: 8px 18px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: linear-gradient(180deg, #7c3aed, #5b21b6) !important;
    box-shadow: 0 8px 16px rgba(91, 33, 182, .16) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
}

html body .boq-setup-page .boq-scope-path-separator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .86) !important;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .22), 0 5px 12px rgba(15, 23, 42, .06) !important;
    color: #d97706 !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

html body .boq-setup-page .boq-scope-link-action {
    display: flex !important;
    justify-content: center !important;
    margin: 12px 0 2px !important;
}

html body .boq-setup-page .boq-scope-link-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: min(520px, 72%) !important;
    min-height: 46px !important;
    padding: 11px 24px !important;
    border: 1px solid rgba(21, 128, 61, .45) !important;
    border-radius: 12px !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), transparent 45%),
        linear-gradient(180deg, #22c55e, #15803d) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 12px 24px rgba(21, 128, 61, .20) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 950 !important;
    text-decoration: none !important;
}

html body .boq-setup-page .boq-scope-link-button:hover {
    transform: translateY(-1px);
    background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%),
        linear-gradient(180deg, #16a34a, #166534) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 15px 28px rgba(21, 128, 61, .24) !important;
}

html body .boq-setup-page .boq-scope-link-button svg {
    width: 19px !important;
    height: 19px !important;
    stroke-width: 2.5 !important;
}

html body .boq-setup-page .boq-structure-scope-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    text-align: center !important;
    padding-block: 6px 10px !important;
}

html body .boq-setup-page .boq-structure-scope-head > p {
    max-width: 760px !important;
    margin: 0 auto !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.8 !important;
    text-align: center !important;
}

html body .boq-setup-page .boq-action-strip-final {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    direction: inherit !important;
    overflow: visible !important;
}

html body .boq-setup-page .boq-action-strip-final .boq-management-actions {
    order: 1 !important;
    flex: 1 1 520px !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
}

html body .boq-setup-page .boq-action-strip-final .boq-print-actions {
    order: 2 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    margin-inline-start: auto !important;
    padding-inline-start: 14px !important;
    padding-inline-end: 0 !important;
    border-inline-start: 1px solid rgba(15, 118, 110, .18) !important;
    border-inline-end: 0 !important;
}

html[dir="rtl"] body .boq-setup-page .boq-action-strip-final .boq-print-actions {
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 14px !important;
    border-inline-start: 0 !important;
    border-inline-end: 1px solid rgba(15, 118, 110, .18) !important;
}

html body .boq-setup-page .boq-action-strip-final .boq-print-actions .boq-print-button {
    min-width: 170px !important;
    white-space: nowrap !important;
}
.project-hub-page {
    --hub-blue: #2563eb;
    --hub-blue-dark: #1d4ed8;
    --hub-line: rgba(37, 99, 235, .20);
    gap: 15px;
}

.project-hub-page .project-hub-hero {
    min-height: 154px;
    padding: 18px;
    border: 1px solid rgba(37, 99, 235, .20);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .92)),
        repeating-linear-gradient(135deg, rgba(37, 99, 235, .08) 0 1px, transparent 1px 18px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
}

.project-hub-page .project-hub-hero::before {
    opacity: .72;
    background:
        radial-gradient(circle at 10% 15%, rgba(37, 99, 235, .18), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(15, 118, 110, .14), transparent 30%);
}

.project-hub-page .project-hub-hero span {
    color: var(--hub-blue-dark);
    font-size: 12px;
    letter-spacing: 0;
}

.project-hub-page .project-hub-hero h1 {
    margin: 8px 0 6px;
    color: #0f2947;
    font-size: clamp(25px, 2.5vw, 36px);
    font-weight: 950;
}

.project-hub-page .project-hub-hero p {
    max-width: 860px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.75;
}

.project-hub-page .project-hub-actions .link-button {
    min-height: 39px;
    padding: 8px 14px;
    border: 1px solid rgba(37, 99, 235, .46) !important;
    border-radius: 8px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--hub-blue-dark), var(--hub-blue)) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .20);
}

.project-hub-page .project-hub-actions .link-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, .26);
}

.project-hub-page .project-hub-actions > span {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 118, 110, .22);
    border-radius: 9px;
    background: rgba(255, 255, 255, .82);
}

.project-hub-page .project-hub-actions > span svg {
    grid-row: 1 / 3;
    color: #0f766e;
}

.project-hub-page .project-hub-actions > span small {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.project-hub-page .project-hub-actions > span b {
    color: #0f2947;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.1;
}

.project-hub-page .project-hub-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.project-hub-page .project-hub-card {
    min-height: 0;
    grid-template-rows: 230px auto;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .09);
}

.project-hub-page .project-hub-card::after {
    height: 4px;
    background: linear-gradient(90deg, var(--hub-a), var(--hub-b));
}

.project-hub-page .project-hub-card-technical {
    --hub-a: #1d4ed8;
    --hub-b: #0f766e;
    --hub-c: #0f2947;
}

.project-hub-page .project-hub-card-site {
    --hub-a: #0f766e;
    --hub-b: #d97706;
    --hub-c: #123a5a;
}

.project-hub-page .project-hub-card-unit-cost {
    --hub-a: #7c3aed;
    --hub-b: #0f766e;
    --hub-c: #1e3a8a;
}

.project-hub-page .project-hub-card figure {
    border-bottom: 1px solid rgba(15, 41, 71, .12);
}

.project-hub-page .project-hub-card figure::after {
    background:
        linear-gradient(180deg, rgba(15, 41, 71, .02), rgba(15, 41, 71, .34)),
        linear-gradient(90deg, color-mix(in srgb, var(--hub-a) 24%, transparent), transparent 54%);
}

.project-hub-page .project-hub-card img {
    transform: scale(1.01);
    transition: transform .22s ease;
}

.project-hub-page .project-hub-card:hover img {
    transform: scale(1.045);
}

.project-hub-page .project-hub-card-body {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .72)),
        linear-gradient(135deg, color-mix(in srgb, var(--hub-a) 10%, transparent), color-mix(in srgb, var(--hub-b) 7%, transparent));
}

.project-hub-page .project-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--hub-a), var(--hub-c));
}

.project-hub-page .project-hub-card-body small {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid color-mix(in srgb, var(--hub-b) 26%, #dbeafe);
    border-radius: 999px;
    color: var(--hub-a);
    background: rgba(255, 255, 255, .76);
    font-size: 10px;
    font-weight: 950;
}

.project-hub-page .project-hub-card-body h2 {
    margin: 7px 0 5px;
    color: #0f2947;
    font-size: 20px;
    line-height: 1.25;
}

.project-hub-page .project-hub-card-body p {
    color: #475569;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.65;
}

.project-hub-page .project-hub-card-body strong {
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--hub-a), var(--hub-c));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--hub-a) 22%, transparent);
}

@media (max-width: 980px) {
    .project-hub-page .project-hub-hero {
        grid-template-columns: 1fr;
    }

    .project-hub-page .project-hub-actions {
        justify-content: flex-start;
    }

    .project-hub-page .project-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .sidebar-shell,
    .sidebar,
    .mobile-topbar,
    .topbar,
    .unit-cost-actions,
    .unit-cost-filter-card {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .app-layout,
    .page-content,
    .shell.unit-cost-report-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 5mm !important;
    }

    .unit-cost-report-page .unit-cost-hero {
        margin: 0 0 8px !important;
        padding: 12px 14px !important;
        border-radius: 0 !important;
        border: 1px solid #d8e4ec !important;
        background: linear-gradient(135deg, #0b1f38, #124d70) !important;
        color: #fff !important;
        break-inside: avoid;
    }

    .unit-cost-report-page .unit-cost-hero span,
    .unit-cost-report-page .unit-cost-hero h1,
    .unit-cost-report-page .unit-cost-hero p {
        color: #fff !important;
    }

    .unit-cost-visual-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        margin: 0 auto 7px !important;
        gap: 10px !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .unit-cost-chart-card,
    .unit-cost-building-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .unit-cost-chart-card,
    .unit-cost-stack-card,
    .unit-cost-table-card {
        overflow: hidden !important;
        border: 1px solid #cbdbe8 !important;
        border-radius: 12px !important;
        background: linear-gradient(180deg, #ffffff, #f8fbfd) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-table-card {
        margin-top: 4px !important;
        break-before: page !important;
        page-break-before: always !important;
        box-shadow: none !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        overflow: visible !important;
    }

    .unit-cost-chart-card > header,
    .unit-cost-stack-card > header,
    .unit-cost-table-card > header {
        min-height: 38px !important;
        padding: 9px 12px !important;
        border-bottom: 1px solid rgba(15, 41, 71, .16) !important;
        background: linear-gradient(135deg, #0f2947, #164c73) !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-chart-card > header h2,
    .unit-cost-stack-card > header h2,
    .unit-cost-table-card > header h2,
    .unit-cost-chart-card > header i,
    .unit-cost-stack-card > header i,
    .unit-cost-table-card > header i {
        color: #fff !important;
    }

    .unit-cost-chart-card > header i,
    .unit-cost-stack-card > header i,
    .unit-cost-table-card > header i {
        width: 23px !important;
        height: 23px !important;
        display: inline-grid !important;
        place-items: center !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, .14) !important;
    }

    .unit-cost-chart-card > header svg,
    .unit-cost-stack-card > header svg,
    .unit-cost-table-card > header svg {
        width: 15px !important;
        height: 15px !important;
    }

    .unit-cost-table-card > header {
        margin-bottom: 0 !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }

    .unit-cost-chart-card {
        min-height: 0 !important;
    }

    .unit-cost-bars,
    .unit-cost-stack-card,
    .unit-cost-stack-list,
    .unit-cost-donut-wrap {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-stack-card {
        margin: 0 0 6px !important;
        border-radius: 11px !important;
        box-shadow: none !important;
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-stack-list {
        gap: 5px !important;
        padding: 7px 8px !important;
    }

    .unit-cost-stack-list article {
        grid-template-columns: 118px minmax(0, 1fr) minmax(230px, .95fr) !important;
        gap: 6px !important;
        padding: 6px !important;
        border-radius: 9px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-stack-list article > strong {
        font-size: 8px !important;
    }

    .unit-cost-stack-track {
        height: 12px !important;
    }

    .unit-cost-stack-values {
        gap: 4px !important;
    }

    .unit-cost-stack-values em {
        padding: 4px 5px !important;
        border-radius: 7px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-stack-values small {
        font-size: 6.2px !important;
    }

    .unit-cost-stack-values b {
        font-size: 6.5px !important;
    }

    .unit-cost-control-strip {
        margin: 0 0 6px !important;
        border: 1px solid #cbdbe8 !important;
        border-radius: 11px !important;
        box-shadow: none !important;
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-control-strip > header {
        min-height: 32px !important;
        padding: 7px 10px !important;
        background: linear-gradient(135deg, #0f2947, #164c73) !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-control-strip > header h2,
    .unit-cost-control-strip > header i {
        color: #fff !important;
    }

    .unit-cost-control-strip > div {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        padding: 7px 8px !important;
    }

    .unit-cost-control-strip span {
        grid-template-columns: 26px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon label"
            "icon value"
            "icon name" !important;
        gap: 3px 6px !important;
        padding: 6px !important;
        border-radius: 9px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-control-strip span > i {
        width: 25px !important;
        height: 25px !important;
        border-radius: 8px !important;
    }

    .unit-cost-control-strip small,
    .unit-cost-control-strip em {
        font-size: 7.2px !important;
    }

    .unit-cost-control-strip b {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        font-size: 6.8px !important;
        line-height: 1.18 !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
    }

    .unit-cost-donut {
        width: 128px !important;
        height: 128px !important;
    }

    .unit-cost-donut::after {
        inset: 31px !important;
    }

    .unit-cost-donut span {
        font-size: 13px !important;
        line-height: 1 !important;
    }

    .unit-cost-donut-wrap {
        grid-template-columns: 132px 1fr !important;
        gap: 9px !important;
        padding: 10px !important;
    }

    .unit-cost-legend span,
    .unit-cost-bar-row {
        break-inside: avoid;
    }

    .unit-cost-building-card {
        margin-top: 4px !important;
        border: 1px solid #d8e4ec !important;
        border-radius: 10px !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        overflow: visible !important;
    }

    .unit-cost-building-list {
        display: block !important;
        padding: 4px 0 0 !important;
        margin: 0 !important;
    }

    .unit-cost-building-card summary {
        grid-template-columns: 36px minmax(0, 1fr) !important;
        padding: 8px 10px !important;
        break-inside: avoid;
        break-after: auto !important;
        page-break-after: auto !important;
    }

    .building-rank {
        width: 34px !important;
        height: 34px !important;
        border-radius: 9px !important;
    }

    .unit-cost-building-title strong {
        font-size: 14px !important;
    }

    .unit-cost-building-title small {
        font-size: 9px !important;
    }

    .unit-cost-building-metrics {
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        gap: 6px !important;
        padding: 7px 9px !important;
    }

    .unit-cost-building-metrics span {
        grid-template-columns: 18px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon label"
            "value value" !important;
        gap: 3px 5px !important;
        padding: 6px !important;
    }

    .unit-cost-building-metrics span > i {
        width: 18px !important;
        height: 18px !important;
        margin-bottom: 3px !important;
        border-radius: 6px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-building-metrics span > i svg {
        width: 11px !important;
        height: 11px !important;
    }

    .unit-cost-building-metrics small {
        font-size: 7.5px !important;
    }

    .unit-cost-building-metrics b {
        max-width: 100% !important;
        overflow: hidden !important;
        font-size: 6.6px !important;
        line-height: 1.18 !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
    }

    .unit-cost-discipline-grid {
        padding: 8px 9px !important;
        gap: 16px !important;
    }

    .unit-cost-discipline-grid article {
        border-color: color-mix(in srgb, var(--discipline-color) 32%, #dbe7ef) !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .unit-cost-discipline-grid article + article {
        margin-top: 18px !important;
    }

    .unit-cost-discipline-grid article + article::before {
        display: block !important;
        height: 2px !important;
        margin: 0 auto !important;
        background: linear-gradient(90deg, transparent, var(--discipline-color), #0f2947, transparent) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .unit-cost-discipline-grid article > header {
        grid-template-columns: 34px minmax(0, 1fr) minmax(360px, auto) !important;
        padding: 7px 8px !important;
        background: color-mix(in srgb, var(--discipline-color) 11%, #fff) !important;
    }

    .unit-cost-discipline-values {
        grid-template-columns: repeat(2, minmax(170px, 1fr)) !important;
        gap: 6px !important;
    }

    .unit-cost-discipline-values em {
        min-height: 38px !important;
        padding: 6px 7px !important;
        border-radius: 10px !important;
    }

    .unit-cost-discipline-values em::before {
        height: 24px !important;
    }

    .unit-cost-discipline-values em small {
        font-size: 7.5px !important;
    }

    .unit-cost-discipline-values em b {
        min-width: 52px !important;
        padding: 5px 7px !important;
        font-size: 10px !important;
    }

    .unit-cost-contract-table {
        overflow: visible !important;
    }

    .unit-cost-contract-table table {
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .unit-cost-contract-table th:nth-child(1),
    .unit-cost-contract-table td:nth-child(1) {
        width: 26% !important;
    }

    .unit-cost-contract-table th:nth-child(2),
    .unit-cost-contract-table td:nth-child(2) {
        width: 10% !important;
    }

    .unit-cost-contract-table th:nth-child(3),
    .unit-cost-contract-table td:nth-child(3) {
        width: 14% !important;
    }

    .unit-cost-contract-table th:nth-child(4),
    .unit-cost-contract-table td:nth-child(4) {
        width: 10% !important;
    }

    .unit-cost-contract-table th:nth-child(5),
    .unit-cost-contract-table td:nth-child(5) {
        width: 16% !important;
    }

    .unit-cost-contract-table th:nth-child(6),
    .unit-cost-contract-table td:nth-child(6) {
        width: 15% !important;
    }

    .unit-cost-contract-table th:nth-child(7),
    .unit-cost-contract-table td:nth-child(7) {
        width: 9% !important;
    }

    .unit-cost-contract-table th,
    .unit-cost-contract-table td {
        padding: 4px !important;
        font-size: 7pt !important;
        line-height: 1.35 !important;
    }

    .unit-cost-contract-table thead {
        display: table-header-group;
    }

    .unit-cost-contract-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html body .shell.project-structure-page,
    html body main.project-structure-page,
    html body .project-structure-page {
        width: 70% !important;
        max-width: 70% !important;
        margin-inline: auto !important;
        padding: 0 !important;
    }

    html body .project-structure-page .project-structure-print-heading,
    html body .project-structure-page .project-structure-tree,
    html body .project-structure-page .project-structure-phase,
    html body .project-structure-page .project-structure-zone,
    html body .project-structure-page .project-structure-buildings,
    html body .project-structure-page .project-structure-building {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    body:has(.unit-cost-report-page) {
        background: #eef4f8 !important;
    }

    body:has(.unit-cost-report-page) .sidebar-shell,
    body:has(.unit-cost-report-page) .sidebar,
    body:has(.unit-cost-report-page) .mobile-topbar,
    body:has(.unit-cost-report-page) .topbar,
    body:has(.unit-cost-report-page) .app-banner,
    body:has(.unit-cost-report-page) .content-banner,
    body:has(.unit-cost-report-page) .unit-cost-actions,
    body:has(.unit-cost-report-page) .unit-cost-filter-card {
        display: none !important;
    }

    body:has(.unit-cost-report-page) .app-layout,
    body:has(.unit-cost-report-page) .page-content,
    body:has(.unit-cost-report-page) .shell.unit-cost-report-page {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-report-page {
        display: grid !important;
        gap: 18px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-hero {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 18px !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 18px 20px !important;
        border: 1px solid rgba(29, 78, 216, .18) !important;
        border-radius: 14px !important;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(239, 246, 255, .86)),
            linear-gradient(90deg, rgba(29, 78, 216, .08), rgba(15, 118, 110, .06)),
            #fff !important;
        color: inherit !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .075), inset 0 1px 0 rgba(255, 255, 255, .94) !important;
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body:has(.unit-cost-report-page) .unit-cost-hero span {
        color: #1d4ed8 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-hero h1 {
        color: #0f2947 !important;
        font-size: clamp(25px, 2.3vw, 34px) !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-hero p {
        color: #52677a !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-visual-grid {
        display: grid !important;
        grid-template-columns: .95fr 1.05fr !important;
        gap: 14px !important;
        width: 100% !important;
        margin: 0 !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-chart-card,
    body:has(.unit-cost-report-page) .unit-cost-table-card,
    body:has(.unit-cost-report-page) .unit-cost-stack-card,
    body:has(.unit-cost-report-page) .unit-cost-building-card {
        border: 1px solid rgba(15, 41, 71, .12) !important;
        border-radius: 18px !important;
        background: rgba(255, 255, 255, .94) !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .07) !important;
        overflow: hidden !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body:has(.unit-cost-report-page) .unit-cost-table-card {
        margin-top: 0 !important;
        break-before: auto !important;
        page-break-before: auto !important;
        overflow: visible !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-chart-card > header,
    body:has(.unit-cost-report-page) .unit-cost-stack-card > header,
    body:has(.unit-cost-report-page) .unit-cost-table-card > header {
        display: flex !important;
        align-items: center !important;
        min-height: auto !important;
        padding: 13px 14px !important;
        border-bottom: 1px solid rgba(15, 41, 71, .1) !important;
        background: rgba(248, 250, 252, .92) !important;
        color: #0f2947 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-chart-card > header h2,
    body:has(.unit-cost-report-page) .unit-cost-stack-card > header h2,
    body:has(.unit-cost-report-page) .unit-cost-table-card > header h2 {
        color: #0f2947 !important;
        font-size: 15px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-chart-card > header i,
    body:has(.unit-cost-report-page) .unit-cost-stack-card > header i,
    body:has(.unit-cost-report-page) .unit-cost-table-card > header i {
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #0f766e !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip {
        margin: 0 !important;
        border: 1px solid rgba(15, 41, 71, .1) !important;
        border-radius: 18px !important;
        background: rgba(255, 255, 255, .95) !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .07) !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip > header {
        min-height: auto !important;
        padding: 11px 15px !important;
        background:
            linear-gradient(135deg, rgba(15, 41, 71, .06), rgba(15, 118, 110, .08)),
            #fff !important;
        color: #0f2947 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip > header h2,
    body:has(.unit-cost-report-page) .unit-cost-control-strip > header i {
        color: #0f2947 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip > div {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 10px 12px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip span {
        grid-template-columns: 34px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon label"
            "icon value"
            "icon name" !important;
        gap: 4px 9px !important;
        padding: 10px 11px !important;
        border-radius: 13px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip span > i {
        width: 34px !important;
        height: 34px !important;
        border-radius: 11px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip small,
    body:has(.unit-cost-report-page) .unit-cost-control-strip em {
        font-size: 10px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-control-strip b {
        padding: 5px 7px !important;
        font-size: clamp(7px, .68vw, 10px) !important;
        line-height: 1.15 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-wrap {
        border: 1px solid rgba(15, 41, 71, .1) !important;
        border-radius: 18px !important;
        background:
            linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .68)),
            #fff !important;
        box-shadow: 0 16px 34px rgba(15, 23, 42, .07) !important;
        break-inside: avoid;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-wrap > header {
        padding: 10px 12px 0 !important;
        gap: 8px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-wrap > header i {
        width: 28px !important;
        height: 28px !important;
        border-radius: 10px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-wrap h2 {
        font-size: 13px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis.unit-cost-kpis-comprehensive {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 9px 12px 12px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive article {
        grid-template-columns: 24px minmax(0, 1fr) !important;
        gap: 5px !important;
        min-height: 58px !important;
        padding: 6px 7px !important;
        border-radius: 11px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive i {
        width: 24px !important;
        height: 24px !important;
        border-radius: 9px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive svg {
        width: 12px !important;
        height: 12px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive span {
        font-size: 8px !important;
        line-height: 1.2 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive strong {
        margin-top: 1px !important;
        padding: 4px 5px !important;
        border-radius: 8px !important;
        font-size: 7.2px !important;
        line-height: 1.1 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive strong.fit-sm {
        font-size: 6.8px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-kpis-comprehensive strong.fit-xs {
        font-size: 6.3px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-donut-wrap {
        display: grid !important;
        grid-template-columns: 170px minmax(0, 1fr) !important;
        gap: 16px !important;
        align-items: center !important;
        padding: 16px !important;
        background:
            linear-gradient(135deg, rgba(248, 250, 252, .9), rgba(236, 253, 245, .48)),
            #fff !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-donut {
        width: 164px !important;
        height: auto !important;
        aspect-ratio: 1 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-donut::after {
        inset: 38px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-donut span {
        font-size: 17px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bars {
        display: grid !important;
        gap: 12px !important;
        padding: 16px !important;
        background:
            linear-gradient(135deg, rgba(248, 250, 252, .9), rgba(236, 253, 245, .48)),
            #fff !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bar-row {
        grid-template-columns: 210px minmax(0, 1fr) 148px !important;
        gap: 12px !important;
        padding: 10px !important;
        border-radius: 14px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bar-row span {
        height: 16px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bar-row em {
        padding: 6px 9px !important;
        border-radius: 12px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bar-row em small {
        font-size: 9px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-bar-row em b {
        font-size: 10.5px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-list {
        display: grid !important;
        gap: 12px !important;
        padding: 14px !important;
        margin: 0 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-card summary {
        display: grid !important;
        grid-template-columns: 46px minmax(0, 1fr) !important;
        gap: 11px !important;
        padding: 13px 14px !important;
    }

    body:has(.unit-cost-report-page) .building-rank {
        width: 42px !important;
        height: 42px !important;
        border-radius: 13px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-title strong {
        font-size: 15px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-title small {
        font-size: 11px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics-split {
        display: block !important;
        padding: 12px 14px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics-main {
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics-added {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-top: 9px !important;
        padding-top: 9px !important;
        border-top: 1px dashed rgba(15, 41, 71, .16) !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics span {
        grid-template-columns: 24px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon label"
            "value value" !important;
        gap: 5px 7px !important;
        padding: 10px 11px !important;
        border-radius: 12px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics span > i {
        width: 24px !important;
        height: 24px !important;
        border-radius: 8px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics small {
        font-size: 10px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-building-metrics b {
        font-size: clamp(7px, .72vw, 11px) !important;
        line-height: 1.18 !important;
        padding: 5px 6px !important;
        border-radius: 9px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-grid {
        display: grid !important;
        gap: 10px !important;
        padding: 12px 14px 14px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-grid article {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-grid article + article {
        margin-top: 0 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-grid article + article::before {
        display: block !important;
        height: 2px !important;
        margin: 8px auto 10px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-grid article > header {
        grid-template-columns: 42px minmax(0, 1fr) minmax(320px, auto) !important;
        padding: 10px 12px !important;
        background: color-mix(in srgb, var(--discipline-color) 9%, #fff) !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-values {
        grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
        gap: 8px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-discipline-values em {
        min-height: 54px !important;
        padding: 9px 11px !important;
        border-radius: 14px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table table {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(1),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(1) { width: 21.3% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(2),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(2) { width: 7% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(3),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(3) { width: 9% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(4),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(4) { width: 6.5% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(5),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(5) { width: 10.2% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(6),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(6) { width: 9.5% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(7),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(7) { width: 10.1% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(8),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(8) { width: 9.5% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(9),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(9) { width: 9% !important; }
    body:has(.unit-cost-report-page) .unit-cost-contract-table th:nth-child(10),
    body:has(.unit-cost-report-page) .unit-cost-contract-table td:nth-child(10) { width: 7.9% !important; }

    body:has(.unit-cost-report-page) .unit-cost-contract-table th {
        padding: 8px 5px !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table td {
        padding: 8px 5px !important;
        font-size: 10.5px !important;
        line-height: 1.28 !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table td:not(.name) {
        font-size: clamp(8.2px, .62vw, 10px) !important;
        white-space: nowrap !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table td.name strong {
        font-size: 11px !important;
    }

    body:has(.unit-cost-report-page) .unit-cost-contract-table td.name small,
    body:has(.unit-cost-report-page) .unit-cost-contract-table td small {
        font-size: 9px !important;
    }
}

/* Final inventory main button color override: industrial olive. */
.side-nav details.side-management-group.side-management-inventory {
    --side-accent: #4d7c0f !important;
    --side-accent-dark: #365314 !important;
    --side-text: #365314 !important;
}

.side-nav details.side-management-group.side-management-inventory > summary,
.side-nav details.side-management-group.side-management-inventory > summary:hover,
.side-nav details.side-management-group.side-management-inventory[open] > summary,
.side-nav details.side-management-group.side-management-inventory[open] > summary:hover,
.side-nav details.side-management-group.side-management-inventory:has(.active) > summary,
.side-nav details.side-management-group.side-management-inventory:has(.active) > summary:hover {
    border-color: rgba(77, 124, 15, .55) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .16), transparent 44%),
        linear-gradient(135deg, #365314, #4d7c0f) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 12px 24px rgba(77, 124, 15, .2) !important;
}

.side-nav details.side-management-group.side-management-inventory > summary span,
.side-nav details.side-management-group.side-management-inventory > summary span > svg,
.side-nav details.side-management-group.side-management-inventory > summary .side-chevron {
    color: #fff !important;
    background: transparent !important;
}

/* Final purchasing main button color override: muted olive-gold, close to inventory but distinct. */
.side-nav details.side-management-group.side-management-purchases {
    --side-accent: #8a6f16 !important;
    --side-accent-dark: #5f4b0b !important;
    --side-text: #5f4b0b !important;
}

.side-nav details.side-management-group.side-management-purchases > summary,
.side-nav details.side-management-group.side-management-purchases > summary:hover,
.side-nav details.side-management-group.side-management-purchases[open] > summary,
.side-nav details.side-management-group.side-management-purchases[open] > summary:hover,
.side-nav details.side-management-group.side-management-purchases:has(.active) > summary,
.side-nav details.side-management-group.side-management-purchases:has(.active) > summary:hover {
    border-color: rgba(138, 111, 22, .55) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .17), transparent 44%),
        linear-gradient(135deg, #5f4b0b, #8a6f16) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 12px 24px rgba(138, 111, 22, .2) !important;
}

.side-nav details.side-management-group.side-management-purchases > summary span,
.side-nav details.side-management-group.side-management-purchases > summary span > svg,
.side-nav details.side-management-group.side-management-purchases > summary .side-chevron {
    color: #fff !important;
    background: transparent !important;
}

.side-nav details.side-management-group.side-management-purchases > .side-management-link.purchase,
.side-nav details.side-management-group.side-management-purchases > .side-management-link.purchase:hover,
.side-nav details.side-management-group.side-management-purchases > .side-management-link.purchase.active {
    color: #5f4b0b !important;
    border-color: rgba(138, 111, 22, .32) !important;
    background: rgba(138, 111, 22, .13) !important;
}

.side-nav details.side-management-group.side-management-purchases > .side-management-link.purchase svg {
    color: #8a6f16 !important;
}

/* Reports center direct button: same project-hub shape with a distinct reporting blue. */
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link,
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link:hover,
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link:focus-visible,
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link.active {
    border-color: rgba(2, 132, 199, .55) !important;
    color: #fff !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .17), transparent 44%),
        linear-gradient(135deg, #075985, #0284c7) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 12px 24px rgba(2, 132, 199, .2) !important;
}

.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link span,
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link svg,
.side-nav a.side-sub-link.side-project-hub-link.side-reports-center-main-link i {
    color: #fff !important;
    background: transparent !important;
}

/* English alignment for the Technical Office "Disciplines" collapsible row. */
html:not([dir="rtl"]) .side-nav .side-management-technical > .side-technical-disciplines-group {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

html:not([dir="rtl"]) .side-nav .side-management-technical > .side-technical-disciplines-group > summary {
    margin-inline: 0 !important;
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    min-inline-size: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 16px !important;
    align-items: center !important;
}

html:not([dir="rtl"]) .side-nav .side-management-technical > .side-technical-disciplines-group > summary > span {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-inline-size: 0 !important;
}

/* Indirect costs page. */
.indirect-costs-page {
    --costs-main: #0f766e;
    --costs-dark: #115e59;
    --costs-blue: #2563eb;
    --costs-green: #16a34a;
    --costs-amber: #d97706;
    --costs-red: #dc2626;
    --costs-ink: #102033;
    --costs-muted: #64748b;
    display: grid;
    gap: 18px;
    font-size: 13px;
}

.indirect-costs-hero,
.indirect-cost-card,
.indirect-kpi-grid article {
    border: 1px solid rgba(15, 118, 110, .14);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(240, 253, 250, .84)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 47, 72, .08);
}

.indirect-costs-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
}

.indirect-costs-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.indirect-costs-title > span,
.indirect-cost-card > header > i,
.indirect-kpi-grid article > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, var(--costs-dark), var(--costs-main));
    box-shadow: 0 12px 24px rgba(15, 118, 110, .18);
}

.indirect-costs-title > span {
    width: 54px;
    height: 54px;
    border-radius: 16px;
}

.indirect-costs-title small {
    display: block;
    margin-bottom: 3px;
    color: var(--costs-main);
    font-weight: 900;
}

.indirect-costs-title h1 {
    margin: 0;
    color: var(--costs-ink);
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
}

.indirect-costs-title p {
    margin: 6px 0 0;
    color: var(--costs-muted);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.65;
}

.indirect-costs-actions,
.indirect-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 15px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1;
    transition: transform .18s ease, box-shadow .18s ease;
}

.pc-btn:hover {
    transform: translateY(-1px);
}

.pc-btn svg,
.pc-btn i {
    width: 16px;
    height: 16px;
}

.pc-btn-blue {
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 12px 22px rgba(37, 99, 235, .2);
}

.pc-btn-print {
    color: #fff;
    background: linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 12px 22px rgba(34, 197, 94, .2);
}

.pc-btn-costs {
    width: min(420px, 100%);
    justify-self: center;
    margin: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--costs-dark), var(--costs-main));
    box-shadow: 0 14px 24px rgba(15, 118, 110, .22);
}

.pc-btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    box-shadow: 0 12px 22px rgba(239, 68, 68, .18);
}

.pc-btn-light {
    color: #334155;
    background: #f8fafc;
    border: 1px solid #dbe7ef;
}

.indirect-form-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
}

.indirect-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.indirect-kpi-grid article {
    --kpi-main: #0f766e;
    --kpi-soft: rgba(15, 118, 110, .12);
    --kpi-glow: rgba(15, 118, 110, .22);
    position: relative;
    overflow: hidden;
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "value value";
    align-items: center;
    gap: 10px 12px;
    min-height: 116px;
    padding: 16px 17px 15px;
    border: 1px solid color-mix(in srgb, var(--kpi-main) 18%, #dbe8ee);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% -18%, var(--kpi-glow), transparent 42%),
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.8)),
        linear-gradient(135deg, color-mix(in srgb, var(--kpi-main) 9%, #ffffff), #f8fbfd) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 14px 30px rgba(15,47,72,.08);
}

.indirect-kpi-grid article::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--kpi-main), color-mix(in srgb, var(--kpi-main) 70%, #ffffff));
    pointer-events: none;
}

.indirect-kpi-grid article:nth-child(1) { --kpi-main: #0f766e; --kpi-glow: rgba(20, 184, 166, .22); }
.indirect-kpi-grid article:nth-child(2) { --kpi-main: #166534; --kpi-glow: rgba(34, 197, 94, .2); }
.indirect-kpi-grid article:nth-child(3) { --kpi-main: #b45309; --kpi-glow: rgba(245, 158, 11, .24); }
.indirect-kpi-grid article:nth-child(4) { --kpi-main: #b91c1c; --kpi-glow: rgba(239, 68, 68, .22); }
.indirect-kpi-grid article:nth-child(5) { --kpi-main: #1d4ed8; --kpi-glow: rgba(56, 189, 248, .22); }
.indirect-kpi-grid article:nth-child(6) { --kpi-main: #6d28d9; --kpi-glow: rgba(167, 139, 250, .22); }

.indirect-kpi-grid article > i {
    grid-area: icon;
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin-inline-end: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--kpi-main), color-mix(in srgb, var(--kpi-main) 72%, #ffffff));
    box-shadow: 0 10px 18px color-mix(in srgb, var(--kpi-main) 22%, transparent);
}

.indirect-kpi-grid article.good > i {
    background: linear-gradient(135deg, #15803d, #22c55e);
}

.indirect-kpi-grid article.danger > i {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.indirect-kpi-grid small {
    grid-area: label;
    display: flex;
    align-items: center;
    min-height: 42px;
    color: #263847;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.25;
}

.indirect-kpi-grid strong {
    grid-area: value;
    display: block;
    min-width: 0;
    width: 100%;
    margin-top: 3px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--kpi-main) 16%, #dbe8ee);
    border-radius: 12px;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(255,255,255,.95), color-mix(in srgb, var(--kpi-main) 7%, #ffffff));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    font-size: clamp(12px, .9vw, 15px);
    font-weight: 1000;
    white-space: nowrap;
    direction: ltr;
    text-align: center;
    letter-spacing: 0;
}

.indirect-costs-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

.indirect-cost-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 20px;
}

.indirect-cost-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--costs-dark), var(--costs-main), #38bdf8);
}

.indirect-entry-card {
    background:
        radial-gradient(circle at 6% 10%, rgba(20, 184, 166, .18), transparent 31%),
        radial-gradient(circle at 96% 0%, rgba(37, 99, 235, .1), transparent 28%),
        linear-gradient(135deg, #ffffff, #f0fdfa 68%, #eefbff) !important;
    border-color: rgba(15, 118, 110, .2) !important;
}

.indirect-filter-card {
    background:
        radial-gradient(circle at 96% 8%, rgba(37, 99, 235, .13), transparent 28%),
        linear-gradient(135deg, #ffffff, #f8fbff 74%, #eef6ff) !important;
}

.indirect-table-card {
    background:
        radial-gradient(circle at 6% 0%, rgba(17, 94, 89, .11), transparent 28%),
        linear-gradient(135deg, #ffffff, #fbfdff) !important;
}

.indirect-chart-card,
.indirect-month-card {
    background:
        radial-gradient(circle at 94% 0%, rgba(217, 119, 6, .12), transparent 28%),
        linear-gradient(135deg, #ffffff, #fffdf7 70%, #f7fffb) !important;
}

.indirect-cost-card > header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 8px 10px;
    border: 1px solid rgba(15, 118, 110, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .68);
    backdrop-filter: blur(10px);
}

.indirect-cost-card > header > i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.indirect-cost-card h2 {
    margin: 0;
    color: var(--costs-ink);
    font-size: 16.5px;
}

.indirect-cost-card p {
    margin: 4px 0 0;
    color: var(--costs-muted);
    font-size: 12.3px;
    font-weight: 750;
    line-height: 1.6;
}

.indirect-form-grid,
.indirect-filter-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.indirect-entry-sections {
    display: grid;
    gap: 14px;
}

.indirect-entry-section {
    margin: 0;
    padding: 15px;
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: 18px;
    background: rgba(255, 255, 255, .68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), 0 10px 24px rgba(15, 47, 72, .04);
}

.indirect-entry-section legend {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--costs-dark), var(--costs-main));
    box-shadow: 0 8px 16px rgba(15, 118, 110, .18);
    font-size: 12px;
    font-weight: 950;
}

.section-registration { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(240,253,250,.72)); }
.section-scope { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(239,246,255,.72)); }
.section-money { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,251,235,.72)); }
.section-description { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(248,250,252,.76)); }

.indirect-form-grid label,
.indirect-filter-grid label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 11.8px;
    font-weight: 900;
}

.section-registration .indirect-form-grid label,
.indirect-filter-grid label {
    grid-column: span 3;
}

.section-scope .indirect-form-grid label {
    grid-column: span 3;
}

.section-scope .indirect-form-grid .contract-field {
    grid-column: span 6;
}

.section-money .indirect-form-grid .amount-field {
    grid-column: span 3;
}

.section-money .indirect-form-grid .currency-field {
    grid-column: span 1;
}

.section-money .indirect-form-grid label {
    grid-column: span 3;
}

.section-money .indirect-form-grid .indirect-upload-field {
    grid-column: span 5;
}

.section-description .indirect-form-grid .description-field {
    grid-column: span 8;
}

.section-description .indirect-form-grid label:not(.description-field):not(.notes-field) {
    grid-column: span 4;
}

.section-description .indirect-form-grid .notes-field {
    grid-column: 1 / -1;
}

.indirect-form-grid input,
.indirect-form-grid select,
.indirect-form-grid textarea,
.indirect-filter-grid input,
.indirect-filter-grid select {
    width: 100%;
    min-height: 39px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 10px;
    padding: 8px 10px;
    color: #0f172a;
    background: rgba(255, 255, 255, .9);
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), 0 8px 18px rgba(15, 47, 72, .04);
}

.indirect-form-grid input:focus,
.indirect-form-grid select:focus,
.indirect-form-grid textarea:focus,
.indirect-filter-grid input:focus,
.indirect-filter-grid select:focus {
    outline: 3px solid rgba(15, 118, 110, .13);
    border-color: rgba(15, 118, 110, .55);
}

.indirect-form-grid textarea {
    resize: vertical;
}

.indirect-form-grid .wide {
    grid-column: span 6;
}

.indirect-form-grid .small-field {
    max-width: 150px;
}

.indirect-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
}

.indirect-upload-field {
    padding: 10px;
    border: 1px dashed rgba(15, 118, 110, .34);
    border-radius: 14px;
    background: rgba(255, 255, 255, .62);
}

.indirect-upload-field input[type="file"] {
    padding: 7px;
    background: #fff;
}

.indirect-upload-field span {
    color: #0f766e;
    font-size: 11px;
    font-weight: 900;
}

.indirect-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    text-decoration: none;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.indirect-attachment-link svg {
    width: 13px;
    height: 13px;
}

.indirect-no-attachment {
    color: #94a3b8;
    font-weight: 950;
}

.indirect-bars {
    display: grid;
    gap: 12px;
}

.indirect-bars > div {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.5fr) minmax(140px, auto);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(15, 118, 110, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
}

.indirect-bars span {
    color: var(--costs-ink);
    font-size: 12.5px;
    font-weight: 900;
}

.indirect-bars em,
.indirect-month-grid em {
    display: block;
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #e7f1f3;
}

.indirect-bars b,
.indirect-month-grid i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--costs-main), #38bdf8);
}

.indirect-bars strong {
    color: var(--costs-main);
    font-size: 12px;
    white-space: nowrap;
}

.indirect-table-wrap {
    overflow-x: auto;
    border: 1px solid #dce9ef;
    border-radius: 16px;
    background: #fff;
}

.indirect-filter-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 118, 110, .14);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(240, 253, 250, .72));
}

.indirect-filter-summary > div:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #115e59;
    font-size: 12px;
    font-weight: 950;
}

.indirect-filter-summary svg {
    width: 16px;
    height: 16px;
}

.indirect-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.indirect-filter-chips span,
.indirect-filter-chips em {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbe7ef;
    font-size: 11.5px;
    font-style: normal;
    font-weight: 900;
}

.indirect-filter-chips em {
    color: #fff;
    background: linear-gradient(135deg, #115e59, #0f766e);
    border-color: transparent;
}

.indirect-cost-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
}

.indirect-cost-table th {
    padding: 10px 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--costs-dark), var(--costs-main));
    font-size: 11.5px;
    line-height: 1.35;
    text-align: start;
}

.indirect-cost-table th:first-child {
    border-start-start-radius: 12px;
}

.indirect-cost-table th:last-child {
    border-start-end-radius: 12px;
}

.indirect-cost-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #e5eef3;
    color: #172033;
    font-size: 11.8px;
    font-weight: 800;
    vertical-align: middle;
}

.indirect-cost-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10.8px;
    font-weight: 800;
    line-height: 1.45;
}

.indirect-cost-table .amount-cell {
    color: var(--costs-main);
    font-weight: 950;
    white-space: nowrap;
}

.indirect-cost-table th:nth-child(7),
.indirect-cost-table td:nth-child(7),
.indirect-cost-table th:nth-child(8),
.indirect-cost-table td:nth-child(8),
.indirect-cost-table th:nth-child(9),
.indirect-cost-table td:nth-child(9) {
    width: 82px;
    text-align: center;
}

.indirect-cost-table th:nth-child(2),
.indirect-cost-table td:nth-child(2) {
    width: 104px;
    white-space: nowrap;
}

.indirect-costs-page .indirect-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.indirect-costs-page .indirect-row-actions form {
    margin: 0;
}

.indirect-costs-page .icon-action {
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.indirect-costs-page .icon-action.edit {
    background: #2563eb;
}

.indirect-costs-page .icon-action.view {
    background: #0f766e;
}

.indirect-costs-page .icon-action.disabled {
    cursor: not-allowed;
    opacity: .45;
    filter: grayscale(.35);
}

.indirect-costs-page .icon-action.danger {
    background: #dc2626;
}

.indirect-costs-page .icon-action svg {
    width: 14px;
    height: 14px;
}

.indirect-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 10.8px;
    font-weight: 950;
}

.indirect-status.planned {
    color: #1d4ed8;
    background: #dbeafe;
}

.indirect-status.approved {
    color: #0f766e;
    background: #ccfbf1;
}

.indirect-status.paid {
    color: #15803d;
    background: #dcfce7;
}

.indirect-status.cancelled {
    color: #64748b;
    background: #f1f5f9;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}

.icon-action.danger {
    color: #fff;
    background: #dc2626;
}

.indirect-empty,
.indirect-empty-cell {
    color: #64748b !important;
    font-weight: 900;
    text-align: center;
}

.indirect-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.indirect-month-grid article {
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, .12);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(240, 253, 250, .62)),
        #fff;
    box-shadow: 0 12px 24px rgba(15, 47, 72, .05);
}

.indirect-month-grid article > strong {
    display: block;
    margin-bottom: 9px;
    color: var(--costs-dark);
    font-size: 15px;
}

.indirect-month-grid span {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
}

.indirect-month-grid b {
    color: #334155;
    font-size: 11px;
}

.indirect-month-grid small {
    color: #0f172a;
    font-size: 10.8px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .indirect-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .indirect-costs-layout {
        grid-template-columns: 1fr;
    }

    .indirect-form-grid label:nth-child(n),
    .indirect-filter-grid label {
        grid-column: span 6;
    }

    .section-scope .indirect-form-grid .contract-field,
    .section-money .indirect-form-grid .indirect-upload-field,
    .section-description .indirect-form-grid .description-field,
    .section-description .indirect-form-grid .notes-field {
        grid-column: span 12;
    }

    .indirect-form-grid .wide {
        grid-column: span 12;
    }
}

@media (max-width: 780px) {
    .indirect-costs-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .indirect-kpi-grid,
    .indirect-form-grid,
    .indirect-filter-grid {
        grid-template-columns: 1fr;
    }

    .indirect-form-grid label:nth-child(n),
    .indirect-filter-grid label,
    .indirect-form-grid .wide,
    .indirect-form-grid .small-field {
        grid-column: auto;
        max-width: none;
    }

    .indirect-bars > div {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    .indirect-costs-page {
        gap: 12px !important;
    }

    .indirect-costs-page .no-print {
        display: none !important;
    }

    .indirect-costs-hero,
    .indirect-cost-card,
    .indirect-kpi-grid article {
        margin-bottom: 8px !important;
        box-shadow: none !important;
        border-color: #cbd5e1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .indirect-kpi-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    .indirect-kpi-grid article {
        grid-template-columns: 34px minmax(0, 1fr) !important;
        gap: 6px 8px !important;
        min-height: 72px !important;
        padding: 9px 10px !important;
        border: 1px solid #b9d7dc !important;
        border-radius: 13px !important;
        break-inside: avoid;
        background:
            linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.82)),
            radial-gradient(circle at 100% 0%, rgba(15,118,110,.16), transparent 42%),
            linear-gradient(135deg, #f8fffd, #eef7ff) !important;
        box-shadow: none !important;
    }

    .indirect-kpi-grid article::after {
        width: 4px !important;
    }

    .indirect-kpi-grid article > i {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
        margin-inline-end: 0 !important;
    }

    .indirect-kpi-grid small {
        min-height: 32px !important;
        color: #1f2937 !important;
        font-size: 10.2px !important;
        font-weight: 950 !important;
        line-height: 1.25 !important;
    }

    .indirect-kpi-grid strong {
        margin-top: 2px !important;
        padding: 6px 8px !important;
        border-radius: 10px !important;
        color: #0f172a !important;
        background: rgba(255,255,255,.88) !important;
        font-size: 12px !important;
        font-weight: 1000 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .indirect-costs-hero {
        padding: 10px !important;
        border-radius: 12px !important;
    }

    .indirect-costs-title > span {
        width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
    }

    .indirect-costs-title h1 {
        font-size: 17px !important;
    }

    .indirect-costs-title p {
        font-size: 9px !important;
        line-height: 1.35 !important;
    }

    .indirect-costs-layout {
        grid-template-columns: 1fr !important;
    }

    .indirect-chart-card {
        padding: 9px !important;
        break-after: auto;
        page-break-after: auto;
        margin-top: 10px !important;
        margin-bottom: 12px !important;
    }

    .indirect-chart-card > header {
        margin-bottom: 7px !important;
        padding: 5px 7px !important;
        border-radius: 10px !important;
    }

    .indirect-chart-card > header > i {
        width: 30px !important;
        height: 30px !important;
        border-radius: 9px !important;
    }

    .indirect-chart-card h2 {
        font-size: 13px !important;
    }

    .indirect-chart-card p {
        font-size: 8px !important;
        line-height: 1.25 !important;
    }

    .indirect-bars {
        gap: 5px !important;
    }

    .indirect-bars > div {
        grid-template-columns: minmax(120px, .9fr) minmax(160px, 1.4fr) minmax(90px, auto) !important;
        gap: 6px !important;
        padding: 5px 6px !important;
        border-radius: 9px !important;
    }

    .indirect-bars span,
    .indirect-bars strong {
        font-size: 8.5px !important;
    }

    .indirect-bars em {
        height: 7px !important;
    }

    .indirect-table-card {
        break-before: auto !important;
        page-break-before: auto !important;
        padding: 9px !important;
        margin-top: 6px !important;
    }

    .indirect-filter-summary {
        grid-template-columns: auto minmax(0, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 7px !important;
        padding: 6px 7px !important;
        border-radius: 9px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .indirect-filter-summary > div:first-child {
        font-size: 8.5pt !important;
    }

    .indirect-filter-chips {
        gap: 4px !important;
    }

    .indirect-filter-chips span,
    .indirect-filter-chips em {
        min-height: 19px !important;
        padding: 3px 6px !important;
        font-size: 7.5pt !important;
    }

    .indirect-table-wrap {
        overflow: visible !important;
    }

    .indirect-cost-table {
        min-width: 0 !important;
        table-layout: fixed !important;
    }

    .indirect-cost-table th:nth-child(1),
    .indirect-cost-table td:nth-child(1) {
        width: 4% !important;
        text-align: center !important;
    }

    .indirect-cost-table th:nth-child(2),
    .indirect-cost-table td:nth-child(2) {
        width: 9% !important;
        white-space: nowrap !important;
    }

    .indirect-cost-table th:nth-child(3),
    .indirect-cost-table td:nth-child(3) {
        width: 14% !important;
    }

    .indirect-cost-table th:nth-child(4),
    .indirect-cost-table td:nth-child(4) {
        width: 17% !important;
    }

    .indirect-cost-table th:nth-child(5),
    .indirect-cost-table td:nth-child(5) {
        width: 26% !important;
    }

    .indirect-cost-table th:nth-child(6),
    .indirect-cost-table td:nth-child(6) {
        width: 10% !important;
        white-space: nowrap !important;
    }

    .indirect-cost-table th:nth-child(7),
    .indirect-cost-table td:nth-child(7) {
        width: 8% !important;
    }

    .indirect-cost-table th:nth-child(8),
    .indirect-cost-table td:nth-child(8) {
        width: 6% !important;
        text-align: center !important;
    }

    .indirect-cost-table th,
    .indirect-cost-table td {
        padding: 5px !important;
        font-size: 8pt !important;
        line-height: 1.35 !important;
    }

    .indirect-attachment-link {
        padding: 3px 5px !important;
        font-size: 7.5pt !important;
    }

    .indirect-cost-table thead {
        display: table-header-group;
    }

    .indirect-month-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Final fix: align the English Technical Office Disciplines row with sibling sub-links. */
html[dir="ltr"] .side-nav .side-management-technical > .side-technical-disciplines-group {
    margin-inline-start: 12px !important;
    margin-inline-end: 0 !important;
    inline-size: calc(100% - 12px) !important;
    max-inline-size: calc(100% - 12px) !important;
}

html[dir="ltr"] .side-nav .side-management-technical > .side-technical-disciplines-group > summary {
    min-height: 35px !important;
    padding: 8px 9px !important;
}

/* Technical Office Disciplines title: static solid heading, branch always visible. */
.side-nav .side-management-technical .side-technical-disciplines-title {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-height: 35px !important;
    margin-inline-start: 12px !important;
    margin-inline-end: 0 !important;
    inline-size: calc(100% - 12px) !important;
    max-inline-size: calc(100% - 12px) !important;
    padding: 8px 9px !important;
    border: 1px solid rgba(37, 99, 235, .78) !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: #2563eb !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 20px rgba(37,99,235,.16) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
}

html[dir="rtl"] .side-nav .side-management-technical .side-technical-disciplines-title {
    margin-inline-start: 0 !important;
    margin-inline-end: 12px !important;
}

.side-nav .side-management-technical .side-technical-disciplines-title svg,
.side-nav .side-management-technical .side-technical-disciplines-title i,
.side-nav .side-management-technical .side-technical-disciplines-title span {
    color: #fff !important;
}

.side-nav .side-management-technical .side-technical-disciplines-title svg,
.side-nav .side-management-technical .side-technical-disciplines-title i {
    justify-self: center !important;
    width: 16px !important;
    height: 16px !important;
}

/* Site Management Disciplines title: static solid heading matching the site section. */
.side-nav .side-management-site .side-site-disciplines-title {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-height: 35px !important;
    margin-inline-start: 12px !important;
    margin-inline-end: 0 !important;
    inline-size: calc(100% - 12px) !important;
    max-inline-size: calc(100% - 12px) !important;
    padding: 8px 9px !important;
    border: 1px solid color-mix(in srgb, var(--side-accent, #0ea5a3) 78%, transparent) !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: var(--side-accent, #0ea5a3) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 20px color-mix(in srgb, var(--side-accent, #0ea5a3) 18%, transparent) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
}

html[dir="rtl"] .side-nav .side-management-site .side-site-disciplines-title {
    margin-inline-start: 0 !important;
    margin-inline-end: 12px !important;
}

.side-nav .side-management-site .side-site-disciplines-title svg,
.side-nav .side-management-site .side-site-disciplines-title i,
.side-nav .side-management-site .side-site-disciplines-title span {
    color: #fff !important;
}

.side-nav .side-management-site .side-site-disciplines-title svg,
.side-nav .side-management-site .side-site-disciplines-title i {
    justify-self: center !important;
    width: 16px !important;
    height: 16px !important;
}

.boq-item-number-wrap{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0}
.boq-analysis-trigger{display:inline-grid!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;flex:0 0 30px!important;place-items:center!important;border:1px solid #fb923c!important;border-radius:6px!important;background:linear-gradient(135deg,#fff7ed,#ffedd5)!important;color:#c2410c!important;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.9)}
.boq-analysis-trigger.active{border-color:#fb923c!important;background:linear-gradient(135deg,#fff7ed,#ffedd5)!important;color:#c2410c!important}
.boq-analysis-trigger.active:hover{transform:translateY(-1px);background:linear-gradient(135deg,#f97316,#ea580c)!important;color:#fff!important;box-shadow:0 10px 18px rgba(234,88,12,.2)}
.boq-analysis-trigger.is-open{border-color:#f97316!important;background:linear-gradient(135deg,#f97316,#ea580c)!important;color:#fff!important;box-shadow:0 8px 16px rgba(234,88,12,.18)}
.boq-analysis-trigger.disabled,.boq-analysis-trigger:disabled{border-color:#cbd5e1!important;background:#f1f5f9!important;color:#94a3b8!important;cursor:not-allowed;opacity:.72}
.boq-analysis-trigger svg{width:15px;height:15px}
.boq-analysis-detail-row>td{padding:0!important;background:linear-gradient(180deg,rgba(255,247,237,.98),rgba(248,250,252,.95))!important}
.boq-analysis-detail-box{margin:8px 10px 12px;border:1px solid rgba(251,146,60,.35);border-radius:9px;overflow:hidden;background:rgba(255,255,255,.96);box-shadow:inset 4px 0 0 rgba(249,115,22,.38),0 10px 22px rgba(15,23,42,.06)}
.boq-analysis-detail-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-bottom:1px solid rgba(251,146,60,.22);background:linear-gradient(90deg,rgba(255,247,237,.98),rgba(255,255,255,.88))}
.boq-analysis-detail-head>strong{display:inline-flex;align-items:center;gap:7px;min-width:0;color:#c2410c;font-size:11px;font-weight:950;line-height:1.35}
.boq-analysis-detail-head>strong svg{width:15px;height:15px;flex:0 0 15px}
.boq-analysis-close-button{display:inline-grid;width:30px;height:30px;min-width:30px;min-height:30px;flex:0 0 30px;place-items:center;padding:0;border:1px solid rgba(185,28,28,.7);border-radius:6px;background:linear-gradient(180deg,#dc2626,#991b1b);color:#fff;cursor:pointer;box-shadow:0 8px 16px rgba(185,28,28,.2)}
.boq-analysis-close-button:hover{border-color:rgba(127,29,29,.9);background:linear-gradient(180deg,#ef4444,#7f1d1d);color:#fff}
.boq-analysis-close-button svg{width:15px;height:15px}
.boq-analysis-detail-table-wrap{padding:9px 10px 10px;overflow-x:hidden}
.boq-analysis-detail-table{width:100%;border-collapse:collapse;table-layout:fixed}
.boq-analysis-detail-table th,.boq-analysis-detail-table td{height:30px;padding:4px 5px;border:1px solid rgba(148,163,184,.28);font-size:9px;line-height:1.2;text-align:center;vertical-align:middle;overflow-wrap:anywhere}
.boq-analysis-detail-table th{background:#0f2947;color:#fff;font-weight:950}
.boq-analysis-detail-table tbody tr:nth-child(even) td{background:#f8fafc}
.boq-analysis-detail-table th:nth-child(1),.boq-analysis-detail-table td:nth-child(1){width:4%}
.boq-analysis-detail-table th:nth-child(2),.boq-analysis-detail-table td:nth-child(2){width:31%}
.boq-analysis-detail-table th:nth-child(3),.boq-analysis-detail-table td:nth-child(3){width:10%}
.boq-analysis-detail-table th:nth-child(4),.boq-analysis-detail-table td:nth-child(4){width:8%}
.boq-analysis-detail-table th:nth-child(5),.boq-analysis-detail-table td:nth-child(5),.boq-analysis-detail-table th:nth-child(6),.boq-analysis-detail-table td:nth-child(6),.boq-analysis-detail-table th:nth-child(7),.boq-analysis-detail-table td:nth-child(7){width:8%}
.boq-analysis-detail-table th:nth-child(8),.boq-analysis-detail-table td:nth-child(8),.boq-analysis-detail-table th:nth-child(9),.boq-analysis-detail-table td:nth-child(9){width:11.5%}
.boq-analysis-detail-table .component-name{text-align:start}
.boq-analysis-detail-table .component-name span{display:block;padding-inline-start:calc(var(--level,0) * 18px);color:#0f2947;font-weight:950}
.boq-analysis-detail-table .component-type{display:inline-flex;justify-content:center;min-width:62px;padding:3px 6px;border:1px solid #bae6fd;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:8.5px;font-style:normal;font-weight:950;white-space:nowrap}
.boq-analysis-detail-table .component-type.analysis{border-color:#fed7aa;background:#fff7ed;color:#c2410c}
.boq-analysis-detail-table tfoot th{background:#0f2947;color:#fff}
.boq-analysis-detail-table.analysis-tree-table th,.boq-analysis-detail-table.analysis-tree-table td{border:1px solid #000!important}
.boq-analysis-detail-table.analysis-tree-table thead th{background:linear-gradient(180deg,#fed7aa,#fb923c)!important;color:#000!important;border-color:rgba(194,65,12,.24)!important}
.boq-analysis-detail-table.analysis-tree-table th:nth-child(1),.boq-analysis-detail-table.analysis-tree-table td:nth-child(1){width:5%!important}
.boq-analysis-detail-table.analysis-tree-table th:nth-child(2),.boq-analysis-detail-table.analysis-tree-table td:nth-child(2){width:34%!important}
.boq-analysis-detail-table.analysis-tree-table th:nth-child(3),.boq-analysis-detail-table.analysis-tree-table td:nth-child(3){width:9%!important}
.boq-analysis-detail-table.analysis-tree-table th:nth-child(4),.boq-analysis-detail-table.analysis-tree-table td:nth-child(4),.boq-analysis-detail-table.analysis-tree-table th:nth-child(5),.boq-analysis-detail-table.analysis-tree-table td:nth-child(5),.boq-analysis-detail-table.analysis-tree-table th:nth-child(6),.boq-analysis-detail-table.analysis-tree-table td:nth-child(6),.boq-analysis-detail-table.analysis-tree-table th:nth-child(7),.boq-analysis-detail-table.analysis-tree-table td:nth-child(7),.boq-analysis-detail-table.analysis-tree-table th:nth-child(8),.boq-analysis-detail-table.analysis-tree-table td:nth-child(8){width:8.6%!important}
.boq-analysis-detail-table.analysis-tree-table tfoot th{background:linear-gradient(180deg,#fed7aa,#fb923c)!important;color:#000!important;border-color:rgba(194,65,12,.24)!important}
.boq-analysis-detail-table .analysis-tree-cell{align-items:center}
.boq-analysis-detail-table .embedded-analysis-mini-shell{max-width:980px}
.boq-analysis-detail-table .embedded-analysis-mini-table th:nth-child(2),.boq-analysis-detail-table .embedded-analysis-mini-table td:nth-child(2){width:34%!important}
@media print{.boq-analysis-trigger,.boq-analysis-detail-row,.boq-actions-col,.boq-items-document-table .action-icons,.boq-items-document-table .no-print{display:none!important}}

html body .boq-items-document-table .action-icons .boq-analysis-trigger.icon-action,
html body .boq-main-table .action-icons .boq-analysis-trigger.icon-action {
    border-color: #f97316 !important;
    background: linear-gradient(180deg, #fb923c, #ea580c) !important;
    color: #fff !important;
    box-shadow: 0 8px 15px rgba(234, 88, 12, .22) !important;
}

html body .boq-items-document-table .action-icons .boq-analysis-trigger.icon-action:hover,
html body .boq-main-table .action-icons .boq-analysis-trigger.icon-action:hover,
html body .boq-items-document-table .action-icons .boq-analysis-trigger.icon-action.is-open,
html body .boq-main-table .action-icons .boq-analysis-trigger.icon-action.is-open {
    border-color: #c2410c !important;
    background: linear-gradient(180deg, #f97316, #c2410c) !important;
    color: #fff !important;
}

html body .boq-appendix-table th:last-child,
html body .boq-appendix-table td.action-icons {
    width: 7% !important;
    min-width: 48px !important;
    padding-inline: 5px !important;
    text-align: center !important;
}

html body .boq-appendix-table td.action-icons .boq-cell-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 6px !important;
}

html body .boq-analysis-detail-head .boq-analysis-close-button {
    display: inline-grid !important;
    inline-size: 30px !important;
    block-size: 30px !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    flex: 0 0 30px !important;
    padding: 0 !important;
    place-items: center !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
    border-color: #991b1b !important;
    background: linear-gradient(180deg, #ef4444, #b91c1c) !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(185, 28, 28, .24) !important;
}

html body .boq-analysis-detail-head .boq-analysis-close-button svg {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    min-height: 15px !important;
}

html body .boq-analysis-detail-head .boq-analysis-close-button:hover {
    border-color: #7f1d1d !important;
    background: linear-gradient(180deg, #dc2626, #7f1d1d) !important;
    color: #fff !important;
}

/* Final BOQ appendices use the exact visual geometry of the main BOQ table. */
html body .boq-workspace-final .boq-appendix-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    color: #2d3748 !important;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif !important;
    font-size: 12px !important;
}

html body .boq-workspace-final .boq-appendix-card > .boq-table-wrap {
    margin: 0 !important;
    padding: 15px !important;
}

html body .boq-workspace-final .boq-appendix-table th {
    height: 45px !important;
    padding: 8px 6px !important;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
}

html body .boq-workspace-final .boq-appendix-table td {
    height: 52px !important;
    padding: 8px 6px !important;
    font-size: 11.5px !important;
    line-height: 1.55 !important;
}

html body .boq-workspace-final .boq-appendix-table tfoot th,
html body .boq-workspace-final .boq-appendix-table tfoot td {
    height: 50px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

html body .boq-workspace-final .boq-appendix-table th:nth-child(1),
html body .boq-workspace-final .boq-appendix-table td:nth-child(1) { width: 10% !important; }
html body .boq-workspace-final .boq-appendix-table th:nth-child(2),
html body .boq-workspace-final .boq-appendix-table td:nth-child(2) { width: 42% !important; }
html body .boq-workspace-final .boq-appendix-table th:nth-child(3),
html body .boq-workspace-final .boq-appendix-table td:nth-child(3) { width: 9% !important; }
html body .boq-workspace-final .boq-appendix-table th:nth-child(4),
html body .boq-workspace-final .boq-appendix-table td:nth-child(4) { width: 11% !important; }
html body .boq-workspace-final .boq-appendix-table th:nth-child(5),
html body .boq-workspace-final .boq-appendix-table td:nth-child(5),
html body .boq-workspace-final .boq-appendix-table th:nth-child(6),
html body .boq-workspace-final .boq-appendix-table td:nth-child(6) { width: 14% !important; }
html body .boq-workspace-final .boq-appendix-table th:nth-child(7),
html body .boq-workspace-final .boq-appendix-table td:nth-child(7) {
    width: 10% !important;
    min-width: 76px !important;
}

html body .boq-workspace-final .boq-appendix-table .boq-analysis-trigger.icon-action {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    flex: 0 0 30px !important;
    padding: 0 !important;
    border-radius: 6px !important;
}

html body .boq-workspace-final .boq-appendix-table .boq-analysis-trigger.icon-action svg {
    width: 15px !important;
    height: 15px !important;
}

/* Compact item-analysis panels without affecting the parent BOQ tables. */
html body .boq-document-table .boq-analysis-detail-table thead th,
html body .boq-document-table .boq-analysis-detail-table tfoot th {
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
}

html body .boq-document-table .boq-analysis-detail-table tbody > tr > td {
    height: 27px !important;
    min-height: 27px !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
}

html body .boq-document-table .boq-analysis-detail-table
    :is(.embedded-analysis-mini-table, .nested-table-shell table) th,
html body .boq-document-table .boq-analysis-detail-table
    :is(.embedded-analysis-mini-table, .nested-table-shell table) tfoot th {
    height: 26px !important;
    min-height: 26px !important;
    padding: 2px 4px !important;
    font-size: 8.5px !important;
    line-height: 1.15 !important;
}

html body .boq-document-table .boq-analysis-detail-table
    :is(.embedded-analysis-mini-table, .nested-table-shell table) td {
    height: 25px !important;
    min-height: 25px !important;
    padding: 2px 4px !important;
    font-size: 8.5px !important;
    line-height: 1.15 !important;
}

/* Keep the items subtotal visually distinct inside the final calculation table. */
html body .boq-setup-page .boq-final-calculation
    .boq-document-summary-table tbody tr.boq-items-subtotal-row td,
html body .boq-setup-page .boq-final-calculation
    .boq-document-summary-table tbody tr.boq-items-subtotal-row td.boq-final-label,
html body .boq-setup-page .boq-final-calculation
    .boq-document-summary-table tbody tr.boq-items-subtotal-row .num-cell {
    color: #15803d !important;
    background: #f0fdf4 !important;
    border-color: #86efac !important;
    font-size: 16px !important;
    font-weight: 950 !important;
}
