body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0 0 40px 0;
    background: #F7F7F8;
    color: #111827;
}
header {
    background: #222;
    color: #fff;
    padding: 10px 20px;
}
header h1 { margin: 0; }
nav a {
    color: #fff;
    margin-right: 15px;
    text-decoration: none;
}
main { padding: 20px; }
table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    margin-top: 10px;
}
table th, table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 14px;
    text-align: left;
}
table th {
    background: #eee;
    vertical-align: bottom;
    line-height: 1.35;
}
button { padding: 6px 10px; }
.flash-container {
    margin: 0 0 14px 0;
}
.flash {
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #DADDE3;
    background: #F8FAFC;
    color: #111827;
    font-weight: 700;
    line-height: 1.4;
}
.flash.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #14532d;
}
.flash.danger,
.flash.error {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #7F1D1D;
}
.flash.warning {
    background: #FFFBEB;
    border-color: #FCD34D;
    color: #78350F;
}
.flash.info {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #1E3A8A;
}
.form-error-summary {
    margin: 0 0 14px 0;
    padding: 14px 16px;
    border: 1px solid #FCA5A5;
    border-left: 5px solid #DC2626;
    border-radius: 8px;
    background: #FEF2F2;
    color: #7F1D1D;
    font-weight: 700;
    line-height: 1.45;
}
.form-error-summary ul {
    margin: 8px 0 0 18px;
    padding: 0;
    font-weight: 600;
}
.is-invalid {
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12) !important;
    background: #FFF7F7 !important;
}
.field-error {
    display: block;
    margin-top: 4px;
    color: #B91C1C;
    font-size: 12px;
    font-weight: 700;
}
.card {
    display: inline-block;
    background: #fff;
    padding: 10px;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}
tr.danger { background: #ffe5e5; }

.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    min-height: 64px;
    background: #FFFFFF;
    color: #111827;
    border-bottom: 1px solid #DADDE3;
    overflow: visible;
    position: relative;
    z-index: 50;
}
.top-bar .logo {
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-right: 24px;
    color: #002FA7;
}
.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}
.nav-group {
    position: relative;
}
.nav-direct-link,
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 64px;
    border: 0;
    border-left: 1px solid #DADDE3;
    border-radius: 0;
    padding: 0 14px;
    background: #FFFFFF;
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
.nav-group-toggle::after {
    content: "▾";
    margin-left: 8px;
    font-size: 11px;
    opacity: 0.8;
}
.nav-group:hover .nav-group-toggle,
.nav-group:focus-within .nav-group-toggle {
    background: #F7F7F8;
    color: #002FA7;
}
.top-bar .nav-direct-link:hover {
    background: #F7F7F8;
    color: #002FA7;
}
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    padding: 0;
    border: 1px solid #DADDE3;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    z-index: 100;
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
    display: block;
}
.top-bar .nav-menu a,
.nav-disabled {
    display: block;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #DADDE3;
    padding: 11px 12px;
    color: #111827;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}
.top-bar .nav-menu a:hover {
    background: #F7F7F8;
    color: #002FA7;
}
.nav-disabled {
    color: #7b8794;
    cursor: default;
}
.top-bar a {
    color: #111827;
    text-decoration: none;
}
.top-bar a:hover {
    color: #002FA7;
}
.user-info {
    margin-left: auto;
    font-size: 13px;
    color: #374151;
}
.content {
    padding: 22px;
}
footer {
    padding: 16px 22px 28px;
    color: #52606d;
}

.erp-dashboard {
    display: grid;
    gap: 18px;
    color: #111827;
}
.erp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    min-height: 260px;
    padding: 32px 36px;
    background: #FFFFFF;
    border: 1px solid #DADDE3;
}
.erp-hero-copy {
    max-width: 900px;
}
.erp-eyebrow {
    margin: 0 0 10px;
    color: #002FA7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.erp-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(48px, 8vw, 112px);
    line-height: 0.92;
    letter-spacing: 0;
}
.erp-hero p {
    margin: 18px 0 0;
    max-width: 760px;
    color: #374151;
    font-size: 18px;
    line-height: 1.45;
}
.erp-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 160px));
    border: 1px solid #DADDE3;
}
.erp-hero-actions a,
.erp-command-card a,
.erp-module-links a,
.erp-panel-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #002FA7;
    border-radius: 0;
    padding: 0 16px;
    color: #002FA7;
    background: #FFFFFF;
    font-weight: 800;
    text-decoration: none;
}
.erp-hero-actions a {
    border: 0;
    border-right: 1px solid #DADDE3;
    color: #111827;
}
.erp-hero-actions a:last-child {
    border-right: 0;
}
.erp-hero-actions a:hover,
.erp-command-card a:hover,
.erp-module-links a:hover,
.erp-panel-head a:hover {
    background: #002FA7;
    color: #FFFFFF;
}
.erp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #DADDE3;
    border-left: 1px solid #DADDE3;
    background: #FFFFFF;
}
.erp-kpi-card {
    min-height: 150px;
    padding: 22px;
    border-right: 1px solid #DADDE3;
    border-bottom: 1px solid #DADDE3;
}
.erp-kpi-card span {
    display: block;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}
.erp-kpi-card strong {
    display: block;
    margin-top: 12px;
    color: #111827;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}
.erp-kpi-card p {
    margin: 14px 0 0;
    color: #4B5563;
}
.erp-command-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
}
.erp-command-card,
.erp-module-card,
.erp-panel {
    background: #FFFFFF;
    border: 1px solid #DADDE3;
}
.erp-command-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    min-height: 190px;
    padding: 24px;
}
.erp-command-primary {
    border-left: 8px solid #002FA7;
}
.erp-command-card h2,
.erp-module-card h2,
.erp-panel-head h2 {
    margin: 0;
    color: #111827;
    font-size: 34px;
    line-height: 1;
}
.erp-command-card p,
.erp-module-card p {
    margin: 12px 0 0;
    color: #374151;
    line-height: 1.5;
}
.erp-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.erp-module-card {
    min-height: 250px;
    padding: 22px;
}
.erp-module-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid #DADDE3;
}
.erp-module-head span {
    max-width: 170px;
    color: #374151;
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}
.erp-module-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}
.tone-commercial,
.tone-technical,
.tone-financial {
    border-top: 6px solid #002FA7;
}
.erp-panel {
    padding: 24px;
}
.erp-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    padding-bottom: 20px;
    border-bottom: 1px solid #DADDE3;
}
.erp-table {
    display: grid;
}
.erp-table-row {
    display: grid;
    grid-template-columns: 110px minmax(240px, 1fr) 140px 140px 160px;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #DADDE3;
    align-items: center;
}
.erp-table-head {
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.erp-empty {
    margin: 18px 0 0;
    color: #4B5563;
}

.home-hub {
    display: grid;
    gap: 20px;
    color: #11253b;
}
.home-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding: 30px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(255, 222, 138, 0.28), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(103, 183, 255, 0.22), transparent 24%),
        linear-gradient(135deg, #153149, #1a4663 55%, #2d627c);
    color: #fff;
    box-shadow: 0 24px 50px rgba(17, 37, 59, 0.16);
}
.home-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.home-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.04;
}
.home-subtitle {
    max-width: 720px;
    margin: 14px 0 0;
    color: rgba(255,255,255,0.84);
    font-size: 15px;
    line-height: 1.6;
}
.home-stat-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.home-stat-chip {
    min-width: 112px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    text-align: center;
}
.home-stat-chip strong {
    display: block;
    font-size: 28px;
    line-height: 1;
}
.home-stat-chip span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.hub-orbit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.hub-orbit-card {
    position: relative;
    min-height: 460px;
    padding: 24px;
    border-radius: 32px;
    background: #fff;
    border: 1px solid #e3edf6;
    box-shadow: 0 22px 46px rgba(17, 37, 59, 0.08);
    overflow: hidden;
}
.hub-orbit-card::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 32px;
    border: 1px dashed rgba(38, 69, 102, 0.15);
}
.hub-orbit-stage {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 310px;
    z-index: 1;
}
.hub-orbit-top {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}
.hub-orbit-core {
    position: relative;
    margin: 18px auto 0;
    width: 168px;
    height: 168px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    color: #fff;
    box-shadow: 0 18px 34px rgba(17, 37, 59, 0.2);
}
.hub-orbit-core h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1;
}
.hub-orbit-core p {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
}
.hub-orbit-kicker {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}
.hub-orbit-links {
    position: relative;
    min-height: 300px;
}
.hub-orbit-link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: #18314a;
    background: #f5f9fd;
    border: 1px solid #d9e7f2;
    box-shadow: 0 12px 24px rgba(17, 37, 59, 0.08);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.hub-orbit-link:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(17, 37, 59, 0.14);
}
.hub-orbit-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(23, 69, 106, 0.08);
    font-size: 12px;
    font-weight: 800;
}
.hub-orbit-link strong {
    font-size: 13px;
    line-height: 1.25;
}
.hub-orbit-link.top-link {
    width: 104px;
    height: 104px;
}
.hub-orbit-bottom {
    display: grid;
    gap: 12px;
    align-items: center;
    padding: 12px 8px 0;
}
.hub-orbit-bottom.bottom-count-1 {
    grid-template-columns: minmax(0, 120px);
    justify-content: center;
}
.hub-orbit-bottom.bottom-count-2 {
    grid-template-columns: repeat(2, minmax(0, 120px));
    justify-content: space-between;
}
.hub-orbit-bottom.bottom-count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hub-orbit-bottom.bottom-count-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hub-orbit-bottom .hub-orbit-link {
    width: auto;
    min-height: 102px;
    height: auto;
    border-radius: 28px;
}
.hub-orbit-copy {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    margin: 0;
    color: #5d7084;
    font-size: 14px;
    line-height: 1.5;
}
.tone-commercial .hub-orbit-core {
    background: linear-gradient(135deg, #1a4f77, #2d82a7);
}
.tone-technical .hub-orbit-core {
    background: linear-gradient(135deg, #225d49, #3ca37e);
}
.tone-financial .hub-orbit-core {
    background: linear-gradient(135deg, #725420, #c18b2d);
}
.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.home-quick-card,
.home-recent-panel {
    background: #fff;
    border: 1px solid #e3edf6;
    border-radius: 24px;
    box-shadow: 0 16px 32px rgba(17, 37, 59, 0.06);
}
.home-quick-card {
    display: block;
    padding: 22px;
    text-decoration: none;
    color: #17324a;
}
.home-quick-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #587089;
}
.home-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 22px 24px 0;
}
.home-panel-head h3 {
    margin: 0;
    font-size: 28px;
}
.home-panel-head a {
    color: #1b4f7c;
    text-decoration: none;
    font-weight: 700;
}
.home-recent-list {
    padding: 18px 24px 24px;
}
.home-recent-row {
    display: grid;
    grid-template-columns: 2fr 140px 120px 160px;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #edf3f8;
}
.home-recent-row:first-child {
    border-top: 0;
    padding-top: 0;
}
.home-recent-row strong,
.home-recent-row span {
    display: block;
}
.home-recent-row span {
    margin-top: 4px;
    color: #5d7084;
}
.home-empty {
    margin: 0;
    color: #6b7e91;
}
.client-primary-link.muted {
    background: #eef4f8;
    color: #23445e;
}
.supplier-actions-cell {
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 1200px) {
    .hub-orbit-grid {
        grid-template-columns: 1fr;
    }
    .hub-orbit-card {
        min-height: 420px;
    }
}

@media (max-width: 900px) {
    .home-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .home-stat-bar {
        justify-content: flex-start;
    }
    .home-recent-row {
        grid-template-columns: 1fr;
    }
    .hub-orbit-core {
        width: auto;
        height: auto;
        min-height: 160px;
        border-radius: 28px;
        margin: 16px auto 0;
        max-width: 280px;
    }
    .hub-orbit-bottom,
    .hub-orbit-bottom.bottom-count-1,
    .hub-orbit-bottom.bottom-count-2,
    .hub-orbit-bottom.bottom-count-3,
    .hub-orbit-bottom.bottom-count-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hub-orbit-copy {
        position: static;
        margin-top: 16px;
    }
}

.cockpit-page {
    --cockpit-ink: #132238;
    --cockpit-muted: #66768a;
    --cockpit-line: #d9e2ec;
    --cockpit-bg: #f3f7fb;
    --cockpit-blue: #204c73;
    --cockpit-gold: #936b16;
    --cockpit-teal: #0e6b68;
    --cockpit-rose: #8b3658;
    color: var(--cockpit-ink);
}
.cockpit-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding: 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 208, 99, 0.24), transparent 34%),
        linear-gradient(135deg, #17324a, #1d4560 50%, #295b74);
    color: #fff;
    box-shadow: 0 24px 50px rgba(18, 37, 54, 0.16);
}
.cockpit-kicker,
.panel-kicker,
.metric-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.cockpit-hero h1,
.cockpit-panel h2 {
    margin: 0;
    line-height: 1.1;
}
.cockpit-hero h1 {
    max-width: 640px;
    font-size: clamp(30px, 5vw, 46px);
}
.cockpit-subtitle {
    max-width: 760px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
}
.cockpit-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.hero-pill,
.stage-pill,
.token,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.hero-pill {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.cockpit-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.cockpit-filter-bar {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-field span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52606d;
}
.filter-field input,
.filter-field select {
    height: 42px;
    border-radius: 12px;
    border: 1px solid #d8e2ec;
    padding: 0 12px;
    background: #f8fbfd;
    color: #102a43;
}
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.filter-actions button,
.filter-actions a {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}
.filter-actions button {
    border: 0;
    background: #17456a;
    color: #fff;
}
.filter-actions a {
    background: #eef4f8;
    color: #294861;
}
.cockpit-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.chart-stack {
    display: grid;
    gap: 14px;
}
.chart-row {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(150px, 1fr) 56px;
    gap: 12px;
    align-items: center;
}
.chart-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    font-size: 13px;
    color: #334e68;
}
.chart-meta span {
    min-width: 0;
}
.chart-track {
    height: 11px;
    border-radius: 999px;
    overflow: hidden;
    background: #e7eef5;
}
.chart-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #275d8c, #52b8b3);
}
.chart-fill.tone-open { background: linear-gradient(90deg, #5c7fa3, #89a6c2); }
.chart-fill.tone-planning_pending { background: linear-gradient(90deg, #8664a8, #b898d5); }
.chart-fill.tone-planning_active { background: linear-gradient(90deg, #bf8a20, #ecc15c); }
.chart-fill.tone-planning { background: linear-gradient(90deg, #5c7fa3, #89a6c2); }
.chart-fill.tone-design { background: linear-gradient(90deg, #2f6f88, #64abc1); }
.chart-fill.tone-production { background: linear-gradient(90deg, #1a7f79, #4fc2b8); }
.chart-fill.tone-warehouse { background: linear-gradient(90deg, #596b2d, #a1ba47); }
.chart-fill.tone-partial { background: linear-gradient(90deg, #b87912, #efc65a); }
.chart-fill.tone-other { background: linear-gradient(90deg, #6a4b84, #a88bc0); }
.chart-fill.tone-good { background: linear-gradient(90deg, #1f7a55, #56c08d); }
.chart-fill.tone-watch { background: linear-gradient(90deg, #a56f12, #e2b145); }
.chart-fill.tone-risk { background: linear-gradient(90deg, #a1362f, #f07a6f); }
.chart-fill.tone-neutral { background: linear-gradient(90deg, #66768a, #9cadc0); }
.chart-pct {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #334e68;
    font-variant-numeric: tabular-nums;
}
.capacity-year-form {
    display: flex;
    align-items: end;
    gap: 10px;
}
.capacity-year-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.capacity-year-form span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52606d;
}
.capacity-year-form select {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d8e2ec;
    background: #f8fbfd;
    color: #102a43;
    font: inherit;
}
.capacity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.capacity-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334e68;
    font-size: 13px;
    font-weight: 700;
}
.capacity-legend-item::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: #7b8794;
}
.capacity-legend-item.tone-karbon::before,
.capacity-segment.tone-karbon {
    background: linear-gradient(180deg, #3a6b8f, #78a9cf);
}
.capacity-legend-item.tone-paslanmaz::before,
.capacity-segment.tone-paslanmaz {
    background: linear-gradient(180deg, #3f7c57, #73c18e);
}
.capacity-legend-item.tone-diger::before,
.capacity-segment.tone-diger {
    background: linear-gradient(180deg, #9a6a15, #e3b34d);
}
.capacity-legend-item.tone-backlog::before,
.capacity-segment.tone-backlog {
    background: linear-gradient(180deg, #9b2f55, #d97999);
}
.capacity-legend-item.tone-due::before,
.capacity-segment.tone-due {
    background: linear-gradient(180deg, #2f6f88, #6fb4c8);
}
.capacity-legend-item.tone-try::before,
.value-bar.tone-try {
    background: linear-gradient(180deg, #2f5f87, #76a9cf);
}
.capacity-legend-item.tone-usd::before,
.value-bar.tone-usd {
    background: linear-gradient(180deg, #2f7c59, #6fc691);
}
.capacity-legend-item.tone-eur::before,
.value-bar.tone-eur {
    background: linear-gradient(180deg, #8a6a1c, #e2bd5d);
}
.capacity-chart {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 320px;
}
.value-chart {
    display: grid;
    grid-template-columns: repeat(13, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 280px;
    margin-bottom: 18px;
}
.value-month {
    display: grid;
    gap: 8px;
    align-items: end;
}
.value-bar-wrap {
    height: 210px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #dbe5ee;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}
.value-bar-col {
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.value-bar {
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 4px 4px 2px 2px;
}
.value-total-chip {
    display: block;
    font-size: 11px;
    line-height: 1.3;
}
.capacity-month {
    display: grid;
    gap: 8px;
    align-items: end;
}
.capacity-total,
.capacity-label {
    text-align: center;
    font-size: 12px;
    color: #52606d;
}
.capacity-total {
    min-height: 32px;
    font-weight: 700;
}
.capacity-bar {
    height: 240px;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #dbe5ee;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%);
    display: flex;
    flex-direction: column-reverse;
    gap: 3px;
    justify-content: flex-start;
}
.capacity-segment {
    display: block;
    width: 100%;
    min-height: 0;
    border-radius: 3px;
}
.capacity-meta {
    margin: 14px 0 0;
    color: #52606d;
    font-size: 13px;
    line-height: 1.5;
}
.forecast-capacity-chart {
    margin-bottom: 20px;
}
.section-subhead {
    margin: 18px 0 12px;
}
.section-subhead:first-child {
    margin-top: 0;
}
.section-subhead h3 {
    margin: 4px 0 0;
    color: #102a43;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.delivered-value-summary .snapshot-title {
    font-size: 18px;
    font-weight: 800;
    color: #102a43;
}
.delivered-value-summary .token-row {
    gap: 12px;
}
.delivered-value-summary .token {
    font-size: 18px;
    font-weight: 800;
    padding: 10px 14px;
}
.resource-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 20px;
}
.resource-chart-card {
    min-width: 0;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #dbe5ee;
    background: #f8fbfd;
}
.resource-chart-card .capacity-legend {
    margin-bottom: 10px;
}
.compact-chart,
.compact-value-chart {
    min-height: 220px;
    gap: 8px;
    margin-bottom: 0;
}
.compact-chart .capacity-bar,
.compact-value-chart .value-bar-wrap {
    height: 150px;
}
.single-bar-chart .capacity-bar {
    align-items: stretch;
}
.single-bar-chart .capacity-segment {
    background: linear-gradient(180deg, #4d657a, #9bb0c0);
}
.forecast-month {
    align-self: stretch;
}
.forecast-month-meta {
    display: grid;
    gap: 4px;
    min-height: 54px;
    text-align: center;
    color: #52606d;
    font-size: 12px;
    line-height: 1.35;
}
.forecast-project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.forecast-project-title {
    margin: 26px 0 14px;
}
.forecast-project-title h2 {
    margin: 0;
    color: #102a43;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
}
.forecast-project-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 8px;
    background: #f8fbfd;
    border: 1px solid #dbe5ee;
    align-content: start;
}
.forecast-card-head,
.forecast-card-meta,
.forecast-project-main {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}
.forecast-date-note {
    color: #52606d;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.forecast-card-head strong,
.forecast-project-main strong {
    color: #102a43;
}
.forecast-project-identity {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    min-width: 0;
    align-items: baseline;
}
.forecast-project-identity span {
    color: #334e68;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.forecast-card-meta,
.forecast-project-sub {
    color: #52606d;
    font-size: 12px;
    line-height: 1.45;
}
.forecast-project-list {
    display: grid;
    gap: 10px;
}
.forecast-project-item {
    display: grid;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid #e1e9f0;
}
.forecast-project-item:first-child {
    padding-top: 0;
    border-top: 0;
}
.cockpit-metric {
    min-height: 188px;
    padding: 22px 22px 24px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 18px 38px rgba(16, 32, 51, 0.06);
}
.cockpit-metric.tone-blue { border-top: 5px solid var(--cockpit-blue); }
.cockpit-metric.tone-gold { border-top: 5px solid var(--cockpit-gold); }
.cockpit-metric.tone-teal { border-top: 5px solid var(--cockpit-teal); }
.cockpit-metric.tone-rose { border-top: 5px solid var(--cockpit-rose); }
.metric-value {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    color: #061a33;
}
.metric-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 10px;
    margin: 8px 0 12px;
}
.metric-breakdown-item {
    padding: 12px 14px;
    border-radius: 8px;
    background: #f2f6fa;
    border: 1px solid #d9e4ef;
    color: #18324a;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}
.metric-label {
    margin-top: 8px;
    color: #0b2238;
    font-size: 15px;
    font-weight: 800;
}
.metric-meta {
    margin: 12px 0 0;
    color: #31495f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}
.metric-meta-lines {
    display: grid;
    gap: 0;
    margin-top: 14px;
    padding: 4px 12px;
    border: 1px solid #e1e9f0;
    border-radius: 12px;
    background: #f8fbfd;
}
.metric-meta-lines div {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #e5edf3;
    color: #31495f;
    font-size: 12px;
}
.metric-meta-lines div:last-child {
    border-bottom: 0;
}
.metric-meta-lines .is-breakdown {
    margin: 0 -12px;
    padding: 7px 12px 7px 26px;
    background: #eef5f9;
    color: #36566f;
}
.metric-meta-lines .is-breakdown span::before {
    content: "↳";
    margin-right: 7px;
    color: #7891a5;
    font-weight: 800;
}
.metric-meta-lines strong {
    color: #071d34;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}
.metric-meta-note {
    display: inline-block;
    margin: 8px 0 0;
    color: #7a4b12;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}
.metric-meta-note:hover {
    color: #9a5d0b;
    text-decoration: underline;
}
.order-lines-table tbody tr:target {
    background: #fff3cd;
    box-shadow: inset 4px 0 0 #d99000;
}
.order-lines-table tbody tr:target input[name^="net_weight_kg_"] {
    border-color: #d99000;
    box-shadow: 0 0 0 3px rgba(217, 144, 0, 0.18);
}
.cockpit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
    gap: 18px;
    margin-top: 18px;
}
.cockpit-panel {
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 16px 32px rgba(16, 32, 51, 0.06);
}
.cockpit-panel-wide {
    grid-column: span 2;
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.panel-link {
    color: #1d4f91;
    font-weight: 700;
    text-decoration: none;
}
.panel-link:hover {
    text-decoration: underline;
}
.stage-strip,
.token-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stage-strip {
    margin-bottom: 14px;
}
.stage-pill {
    padding: 8px 12px;
    background: var(--cockpit-bg);
    color: #34526b;
}
.cockpit-table-wrap {
    overflow-x: auto;
}
.cockpit-table {
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: transparent;
}
.cockpit-table th,
.cockpit-table td {
    padding: 14px 12px;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    vertical-align: top;
}
.cockpit-table thead th {
    position: sticky;
    top: 0;
    background: #f7fafc;
    color: #4d5c6b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cockpit-table tbody tr:hover {
    background: #f8fbfe;
}
.cockpit-table tbody tr.risk-warn {
    background: #fff8e7;
}
.cockpit-table tbody tr.risk-danger {
    background: #fff0ef;
}
.cell-sub,
.alert-muted,
.empty-copy {
    display: block;
    margin-top: 4px;
    color: var(--cockpit-muted);
    font-size: 13px;
    line-height: 1.45;
}
.progress-line {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-track,
.mini-progress {
    position: relative;
    height: 10px;
    flex: 1;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef5;
}
.progress-fill,
.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f6aa5, #42a39b);
}
.action-cell a {
    display: block;
    margin-bottom: 6px;
    color: #1d4f91;
    font-weight: 700;
    text-decoration: none;
}
.badge {
    margin-top: 6px;
    padding: 7px 11px;
    border: 1px solid transparent;
}
.badge-stable,
.badge-neutral {
    background: #eef5fb;
    color: #3f5f7d;
}
.badge-warn {
    background: #fff4cf;
    color: #8d5f00;
}
.badge-danger {
    background: #ffe0de;
    color: #9b2d28;
}
.badge-good {
    background: #dff6e8;
    color: #116149;
}
.task-status-cell {
    display: grid;
    gap: 8px;
    align-content: start;
}
.task-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.task-status-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e3ecf5;
    color: #29445f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.task-status-badge {
    white-space: nowrap;
    margin-top: 0;
    padding: 9px 14px;
    border-width: 1px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 6px 18px rgba(30, 62, 98, .08);
}
.alert-list,
.delivery-grid {
    display: grid;
    gap: 12px;
}
.project-drawer {
    display: grid;
    gap: 16px;
}
.drawer-top,
.drawer-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.drawer-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.drawer-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.drawer-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
}
.drawer-line span {
    color: #66768a;
}
.alert-card,
.delivery-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--cockpit-line);
    background: linear-gradient(180deg, #fff, #fafcfe);
}
.alert-card-top,
.delivery-top,
.alert-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.alert-foot {
    margin-top: 12px;
    font-size: 13px;
}
.alert-foot a {
    color: #1d4f91;
    text-decoration: none;
    font-weight: 700;
}
.snapshot-block + .snapshot-block {
    margin-top: 16px;
}
.snapshot-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #4d5c6b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.token {
    padding: 8px 12px;
    background: #f2f6fa;
    color: #36516a;
}
.empty-token {
    opacity: 0.8;
}
.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}
.year-volume-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.year-volume-card {
    padding: 16px;
    border: 1px solid #e6edf5;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}
.year-volume-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.year-volume-head strong {
    font-size: 22px;
    color: #18324d;
}
.year-volume-head span {
    color: #5a6d80;
    font-size: 13px;
    font-weight: 700;
}
.snapshot-block.compact + .snapshot-block.compact {
    margin-top: 12px;
}
.snapshot-stat {
    padding: 12px;
    border-radius: 16px;
    background: #f7fafc;
}
.snapshot-stat span {
    display: block;
    color: var(--cockpit-muted);
    font-size: 12px;
    margin-bottom: 4px;
}
.snapshot-stat strong {
    display: block;
    font-size: 20px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}
.snapshot-stat small {
    display: block;
    margin-top: 7px;
    color: var(--cockpit-muted);
    font-size: 11px;
    line-height: 1.35;
}
.delivery-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 12px 0;
    font-size: 13px;
    color: #334e68;
}
.empty-state {
    text-align: center;
    color: var(--cockpit-muted);
    padding: 24px;
}

@media (max-width: 1100px) {
    .erp-hero,
    .erp-command-grid,
    .erp-command-card,
    .erp-module-grid {
        grid-template-columns: 1fr;
    }
    .erp-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .erp-hero-actions {
        width: 100%;
    }
    .erp-table-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .cockpit-filter-bar,
    .cockpit-chart-grid,
    .cockpit-grid {
        grid-template-columns: 1fr;
    }
    .cockpit-metric-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
    .cockpit-panel-wide {
        grid-column: span 1;
    }
    .user-info {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .cockpit-metric-grid {
        grid-template-columns: 1fr;
    }
    .cockpit-metric {
        min-height: auto;
    }
    .metric-value {
        font-size: 32px;
    }
    .metric-breakdown-item {
        font-size: 20px;
    }
    .metric-detail-lines div {
        grid-template-columns: 1fr;
    }
    .metric-detail-lines strong {
        text-align: left;
    }
    .metric-meta-lines div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .metric-meta-lines strong {
        text-align: left;
        white-space: normal;
    }
    .top-bar {
        align-items: stretch;
        padding: 0 14px;
    }
    .top-bar .logo {
        width: 100%;
        min-height: 52px;
        display: flex;
        align-items: center;
        margin-right: 0;
        border-bottom: 1px solid #DADDE3;
    }
    .main-nav {
        width: 100%;
    }
    .nav-direct-link,
    .nav-group-toggle {
        min-height: 48px;
        border-left: 0;
        border-right: 1px solid #DADDE3;
    }
    .nav-menu {
        min-width: 210px;
    }
    .erp-hero {
        min-height: 0;
        padding: 22px;
    }
    .erp-hero h1 {
        font-size: 46px;
    }
    .erp-hero-actions,
    .erp-kpi-grid {
        grid-template-columns: 1fr;
    }
    .erp-hero-actions a {
        border-right: 0;
        border-bottom: 1px solid #DADDE3;
    }
    .erp-hero-actions a:last-child {
        border-bottom: 0;
    }
    .content {
        padding: 14px;
    }
    .cockpit-hero {
        padding: 20px;
        border-radius: 20px;
    }
    .drawer-grid,
    .drawer-columns,
    .snapshot-grid,
    .delivery-meta {
        grid-template-columns: 1fr;
    }
    .cockpit-table th,
    .cockpit-table td {
        padding: 12px 10px;
    }
    .capacity-chart {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .capacity-bar {
        height: 180px;
    }
    .workorder-close-hero,
    .workorder-close-topline {
        flex-direction: column;
        align-items: stretch;
    }
    .workorder-close-summary,
    .close-checklist-stack,
    .close-item-stats,
    .close-item-grid {
        grid-template-columns: 1fr;
    }
    .close-field-wide {
        grid-column: span 1;
    }
}

.offer-page {
    color: #132238;
}
.offer-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 213, 128, 0.22), transparent 32%),
        linear-gradient(135deg, #17324a, #214c5f 55%, #365768);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.offer-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.offer-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.06;
}

.workorder-close-page {
    color: #132238;
}
.workorder-close-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 130, 0.18), transparent 34%),
        linear-gradient(135deg, #17324a, #214c5f 55%, #365768);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.workorder-close-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.workorder-close-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.06;
}
.workorder-close-subtitle {
    margin: 12px 0 0;
    max-width: 760px;
    line-height: 1.5;
}
.workorder-close-version {
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.86);
}
.workorder-close-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.close-meta-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
}
.workorder-close-shell {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.workorder-close-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.workorder-close-topline p {
    margin: 8px 0 0;
    color: #52606d;
    line-height: 1.5;
}
.workorder-close-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    background: #eef4f8;
    color: #294861;
    text-decoration: none;
    font-weight: 700;
}
.workorder-close-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.close-summary-card {
    padding: 16px;
    border-radius: 16px;
    background: #f8fbfd;
    border: 1px solid #dde7f0;
}
.close-summary-card span {
    display: block;
    margin-bottom: 6px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.close-summary-card strong {
    font-size: 28px;
    color: #132238;
}
.close-summary-card small {
    display: block;
    margin-top: 6px;
    color: #66768a;
    line-height: 1.4;
}
.close-checklist-panel + .close-checklist-panel {
    margin-top: 18px;
}
.close-checklist-panel {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dfe8f1;
    background: #fbfdff;
}
.close-checklist-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.checklist-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fbfd;
    border: 1px solid #dde7f0;
}
.checklist-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checklist-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #17456a;
}
.checklist-toggle span {
    font-weight: 800;
    color: #132238;
}
.checklist-card p,
.checklist-card small {
    margin: 0;
    color: #52606d;
    line-height: 1.5;
}
.checklist-card input[type="file"] {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d8e2ec;
    background: #fff;
    color: #102a43;
    font: inherit;
}
.checklist-file-link,
.checklist-file-list a {
    color: #1d4f91;
    font-weight: 700;
    text-decoration: none;
}
.checklist-file-link:hover,
.checklist-file-list a:hover {
    text-decoration: underline;
}
.checklist-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.close-scrap-field {
    margin-top: 14px;
}
.workorder-close-items {
    display: grid;
    gap: 16px;
}
.close-item-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #dfe8f1;
    background: #fbfdff;
}
.close-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.close-item-index {
    margin: 0 0 6px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.close-item-head h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}
.close-item-status {
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf4fa;
    color: #294861;
    font-size: 13px;
    font-weight: 700;
}
.close-item-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}
.close-item-stats div {
    padding: 12px;
    border-radius: 12px;
    background: #f2f6fa;
}
.close-item-stats span {
    display: block;
    color: #66768a;
    font-size: 12px;
}
.close-item-stats strong {
    display: block;
    margin-top: 4px;
    color: #132238;
    font-size: 18px;
}
.close-item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.close-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.close-field-wide {
    grid-column: span 4;
}
.close-label {
    font-size: 12px;
    font-weight: 700;
    color: #52606d;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.close-field input {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d8e2ec;
    background: #f8fbfd;
    color: #102a43;
    font: inherit;
}
.close-field input[readonly] {
    background: #edf3f8;
    color: #52606d;
}
.close-field small {
    color: #66768a;
    line-height: 1.4;
}
.close-target-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.close-target-option {
    position: relative;
}
.close-target-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.close-target-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #d8e2ec;
    background: #f8fbfd;
    color: #294861;
    font-weight: 700;
    cursor: pointer;
}
.close-target-option input:checked + span {
    background: #17456a;
    border-color: #17456a;
    color: #fff;
}
.workorder-close-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}
.workorder-close-actions button,
.workorder-close-actions a {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}
.workorder-close-actions button {
    border: 0;
    background: #17456a;
    color: #fff;
}
.workorder-close-actions a {
    background: #eef4f8;
    color: #294861;
}
.close-empty-state {
    padding: 24px;
    text-align: center;
    color: #66768a;
    border: 1px dashed #d5dfe8;
    border-radius: 16px;
}
.offer-subtitle {
    margin: 12px 0 0;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
}
.offer-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.client-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.qdms-template-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.78);
    color: #17374d;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(8, 27, 42, 0.18);
}
.qdms-template-link:hover {
    background: #f5fbff;
    color: #0c2f47;
}
.client-danger-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 8px;
    background: #b42318;
    border: 1px solid #b42318;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.invoice-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: #0f4165;
    border: 1px solid #0f4165;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.invoice-action-button:hover {
    background: #0a314d;
    border-color: #0a314d;
    color: #fff;
}
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.row-actions form {
    display: inline;
    margin: 0;
}
.link-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: #0f4165;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.danger-text {
    color: #b42318;
}
.money-summary-card {
    gap: 10px;
}
.money-pill-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.money-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef5fb;
    color: #08233f;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}
.money-pill small {
    color: #48647e;
    font-size: 12px;
    letter-spacing: 0;
}
.money-pill.muted {
    color: #8aa0b4;
}
.offer-toolbar {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.offer-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.offer-tab {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f2f6fa;
    color: #36516a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.offer-tab.active {
    background: #163b59;
    color: #fff;
}
.offer-filter-bar {
    display: grid;
    grid-template-columns: 1.6fr minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.offer-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.offer-filter-field span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52606d;
}
.offer-filter-field input,
.offer-filter-field select {
    height: 42px;
    border-radius: 12px;
    border: 1px solid #d8e2ec;
    padding: 0 12px;
    background: #f8fbfd;
    color: #102a43;
}
.offer-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.offer-inline-input {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    padding: 0;
}
.offer-page .client-table input,
.offer-page .client-table select,
.offer-page .client-table textarea {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #d8e2ec;
    padding: 8px 10px;
    background: #f8fbfd;
    color: #102a43;
    font: inherit;
    box-sizing: border-box;
}
.offer-page .client-table td {
    vertical-align: middle;
}
.offer-lines-table {
    table-layout: fixed;
    width: 2032px;
    min-width: 2032px;
}
.offer-lines-table th:nth-child(1),
.offer-lines-table td:nth-child(1) {
    width: 52px;
}
.offer-lines-table th:nth-child(2),
.offer-lines-table td:nth-child(2) {
    width: 110px;
}
.offer-lines-table th:nth-child(3),
.offer-lines-table td:nth-child(3) {
    width: 360px;
}
.offer-lines-table th:nth-child(4),
.offer-lines-table td:nth-child(4) {
    width: 220px;
}
.offer-lines-table th:nth-child(5),
.offer-lines-table td:nth-child(5) {
    width: 150px;
}
.offer-lines-table th:nth-child(6),
.offer-lines-table td:nth-child(6),
.offer-lines-table th:nth-child(7),
.offer-lines-table td:nth-child(7),
.offer-lines-table th:nth-child(8),
.offer-lines-table td:nth-child(8),
.offer-lines-table th:nth-child(9),
.offer-lines-table td:nth-child(9),
.offer-lines-table th:nth-child(10),
.offer-lines-table td:nth-child(10) {
    width: 110px;
}
.offer-lines-table th:nth-child(11),
.offer-lines-table td:nth-child(11) {
    width: 110px;
}
.offer-lines-table th:nth-child(12),
.offer-lines-table td:nth-child(12),
.offer-lines-table th:nth-child(13),
.offer-lines-table td:nth-child(13),
.offer-lines-table th:nth-child(14),
.offer-lines-table td:nth-child(14) {
    width: 88px;
    min-width: 88px;
    white-space: nowrap;
}
.offer-lines-table th:nth-child(15),
.offer-lines-table td:nth-child(15) {
    width: 76px;
    min-width: 76px;
}
.offer-lines-table .cell-desc textarea,
.offer-lines-table .cell-desc input {
    min-height: 66px;
    resize: vertical;
}
.offer-lines-table .cell-ref input {
    min-width: 90px;
}
.offer-lines-table .line-unit {
    min-width: 100px;
}
.offer-lines-table .line-weight[readonly] {
    background: #eef4f8;
    color: #48637b;
    font-weight: 700;
}
.order-lines-table {
    table-layout: fixed;
    min-width: 1760px;
}
.order-lines-table th,
.order-lines-table td {
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-lines-table th:nth-child(1),
.order-lines-table td:nth-child(1) {
    width: 48px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}
.order-lines-table th:nth-child(2),
.order-lines-table td:nth-child(2) {
    width: 120px;
    position: sticky;
    left: 48px;
    z-index: 2;
    background: #fff;
}
.order-lines-table th:nth-child(3),
.order-lines-table td:nth-child(3) {
    width: 300px;
}
.order-lines-table th:nth-child(4),
.order-lines-table td:nth-child(4) {
    width: 140px;
}
.order-lines-table th:nth-child(5),
.order-lines-table td:nth-child(5) {
    width: 140px;
}
.order-lines-table th:nth-child(6),
.order-lines-table td:nth-child(6),
.order-lines-table th:nth-child(7),
.order-lines-table td:nth-child(7),
.order-lines-table th:nth-child(8),
.order-lines-table td:nth-child(8),
.order-lines-table th:nth-child(9),
.order-lines-table td:nth-child(9) {
    width: 96px;
}
.order-lines-table th:nth-child(10),
.order-lines-table td:nth-child(10),
.order-lines-table th:nth-child(11),
.order-lines-table td:nth-child(11) {
    width: 112px;
}
.order-lines-table th:nth-child(12),
.order-lines-table td:nth-child(12) {
    width: 140px;
}
.order-lines-table th:nth-child(13),
.order-lines-table td:nth-child(13),
.order-lines-table th:nth-child(14),
.order-lines-table td:nth-child(14) {
    width: 150px;
}
.order-lines-table th:nth-child(6),
.order-lines-table td:nth-child(6),
.order-lines-table th:nth-child(7),
.order-lines-table td:nth-child(7),
.order-lines-table th:nth-child(8),
.order-lines-table td:nth-child(8),
.order-lines-table th:nth-child(10),
.order-lines-table td:nth-child(10),
.order-lines-table th:nth-child(11),
.order-lines-table td:nth-child(11) {
    text-align: right;
}
.order-lines-table th:nth-child(1),
.order-lines-table td:nth-child(1),
.order-lines-table th:nth-child(9),
.order-lines-table td:nth-child(9),
.order-lines-table th:nth-child(12),
.order-lines-table td:nth-child(12),
.order-lines-table th:nth-child(13),
.order-lines-table td:nth-child(13),
.order-lines-table th:nth-child(14),
.order-lines-table td:nth-child(14) {
    text-align: center;
}
.order-lines-table td:nth-child(3) {
    white-space: normal;
    line-height: 1.4;
}
.order-lines-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.order-lines-table thead th:nth-child(1),
.order-lines-table thead th:nth-child(2) {
    z-index: 3;
    background: #f7fafc;
}
.order-lines-table input,
.order-lines-table select {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid #c7d8ea;
    border-radius: 6px;
    background: #f8fbfd;
    box-sizing: border-box;
}
.order-lines-table input[readonly] {
    background: #eef4f8;
    color: #48637b;
    font-weight: 700;
}
.order-lines-table td:nth-child(3) input {
    min-width: 320px;
}
.order-lines-table td:nth-child(2) input,
.order-lines-table td:nth-child(4) select,
.order-lines-table td:nth-child(5) input {
    min-width: 150px;
}
.order-lines-table tfoot td {
    background: #f8fbfd;
    border-top: 1px solid #d8e2ec;
    border-bottom: 0;
}
.order-lines-table tfoot td:nth-child(1),
.order-lines-table tfoot td:nth-child(2) {
    background: #f8fbfd;
}
.order-add-line-btn {
    width: auto;
    min-width: 118px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.order-add-line-btn:hover {
    text-decoration: none;
}
.offer-page .client-panel + .client-panel {
    margin-top: 18px;
}
.offer-filter-actions button,
.offer-filter-actions a {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}
.offer-filter-actions button {
    border: 0;
    background: #17456a;
    color: #fff;
}
.offer-filter-actions a {
    background: #eef4f8;
    color: #294861;
}
.offer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.offer-summary-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5edf5;
}
.offer-summary-card span {
    display: block;
    margin-bottom: 6px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.offer-summary-card strong {
    font-size: 22px;
}
.offer-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}
.kv-grid p {
    margin: 0;
    color: #234;
}
.offer-inline-input {
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    font: inherit;
    color: inherit;
}
.offer-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 16px 32px rgba(16, 32, 51, 0.06);
}
.offer-table {
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.offer-list-table {
    table-layout: fixed;
    min-width: 1280px;
}
.offer-list-table th,
.offer-list-table td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offer-list-table th:nth-child(1),
.offer-list-table td:nth-child(1) {
    width: 110px;
}
.offer-list-table th:nth-child(2),
.offer-list-table td:nth-child(2) {
    width: 300px;
}
.offer-list-table th:nth-child(3),
.offer-list-table td:nth-child(3) {
    width: 310px;
}
.offer-list-table th:nth-child(4),
.offer-list-table td:nth-child(4) {
    width: 100px;
    text-align: center;
}
.offer-list-table th:nth-child(5),
.offer-list-table td:nth-child(5),
.offer-list-table th:nth-child(6),
.offer-list-table td:nth-child(6),
.offer-list-table th:nth-child(7),
.offer-list-table td:nth-child(7) {
    width: 140px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.offer-list-table th:nth-child(8),
.offer-list-table td:nth-child(8) {
    width: 120px;
    text-align: center;
}
.offer-list-table th:nth-child(9),
.offer-list-table td:nth-child(9) {
    width: 100px;
    text-align: center;
}
.offer-list-table td:nth-child(1),
.offer-list-table td:nth-child(2),
.offer-list-table td:nth-child(3) {
    white-space: normal;
    line-height: 1.35;
}
.offer-table th,
.offer-table td {
    border: 0;
    border-bottom: 1px solid #edf2f7;
    padding: 14px 12px;
    vertical-align: top;
    text-align: left;
}
.offer-table thead th {
    background: #f7fafc;
    color: #4d5c6b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.35;
    vertical-align: bottom;
}
.offer-table tbody tr:hover {
    background: #f8fbfe;
}
.offer-subcell {
    display: block;
    margin-top: 4px;
    color: #66768a;
    font-size: 13px;
}
.offer-num {
    text-align: right;
    white-space: nowrap;
}
.offer-num.positive {
    color: #1b6d49;
    font-weight: 700;
}
.offer-num.negative {
    color: #a0352f;
    font-weight: 700;
}
.offer-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.offer-badge-taslak {
    background: #eef5fb;
    color: #36516a;
}
.offer-badge-teklif_verildi {
    background: #e1f3ef;
    color: #146255;
}
.offer-badge-kaybedildi,
.offer-badge-iptal {
    background: #ffe6e3;
    color: #9c3028;
}
.offer-badge-isi_aldik {
    background: #fff2cf;
    color: #8f6205;
}
.offer-detail-link {
    color: #1d4f91;
    font-weight: 700;
    text-decoration: none;
}
.offer-empty {
    padding: 24px;
    text-align: center;
    color: #66768a;
}
.order-page {
    color: #132238;
}
.order-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 213, 128, 0.22), transparent 32%),
        linear-gradient(135deg, #17324a, #214c5f 55%, #365768);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.order-toolbar {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.order-summary {
    margin-top: 18px;
}
.order-table {
    width: 100%;
    min-width: 1820px;
    table-layout: fixed;
}
.order-table th,
.order-table td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 11px 8px;
    font-size: 12px;
}
.order-table th:nth-child(1),
.order-table td:nth-child(1) {
    width: 62px;
}
.order-table th:nth-child(2),
.order-table td:nth-child(2) {
    width: 94px;
}
.order-table th:nth-child(3),
.order-table td:nth-child(3) {
    width: 82px;
}
.order-table th:nth-child(4),
.order-table td:nth-child(4) {
    width: 178px;
}
.order-table th:nth-child(5),
.order-table td:nth-child(5) {
    width: 190px;
}
.order-table th:nth-child(6),
.order-table td:nth-child(6),
.order-table th:nth-child(7),
.order-table td:nth-child(7) {
    width: 92px;
}
.order-table th:nth-child(8),
.order-table td:nth-child(8) {
    width: 118px;
}
.order-table th:nth-child(9),
.order-table td:nth-child(9) {
    width: 132px;
}
.order-table th:nth-child(10),
.order-table td:nth-child(10) {
    width: 102px;
}
.order-table th:nth-child(11),
.order-table td:nth-child(11) {
    width: 86px;
}
.order-table th:nth-child(12),
.order-table td:nth-child(12) {
    width: 94px;
}
.order-table th:nth-child(13),
.order-table td:nth-child(13) {
    width: 100px;
}
.order-table th:nth-child(14),
.order-table td:nth-child(14) {
    width: 104px;
}
.order-table th:nth-child(15),
.order-table td:nth-child(15) {
    width: 96px;
}
.order-table th:nth-child(16),
.order-table td:nth-child(16) {
    width: 86px;
}
.order-table th:nth-child(17),
.order-table td:nth-child(17) {
    width: 96px;
}
.order-table th:nth-child(18),
.order-table td:nth-child(18) {
    width: 116px;
}
.order-table th:nth-child(6),
.order-table td:nth-child(6),
.order-table th:nth-child(7),
.order-table td:nth-child(7),
.order-table th:nth-child(8),
.order-table td:nth-child(8),
.order-table th:nth-child(9),
.order-table td:nth-child(9),
.order-table th:nth-child(10),
.order-table td:nth-child(10),
.order-table th:nth-child(11),
.order-table td:nth-child(11),
.order-table th:nth-child(12),
.order-table td:nth-child(12),
.order-table th:nth-child(13),
.order-table td:nth-child(13),
.order-table th:nth-child(14),
.order-table td:nth-child(14),
.order-table th:nth-child(15),
.order-table td:nth-child(15) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.order-table th:nth-child(16),
.order-table td:nth-child(16),
.order-table th:nth-child(17),
.order-table td:nth-child(17),
.order-table th:nth-child(18),
.order-table td:nth-child(18) {
    text-align: center;
}
.order-table th:nth-child(4),
.order-table td:nth-child(4),
.order-table th:nth-child(5),
.order-table td:nth-child(5),
.order-table th:nth-child(14),
.order-table td:nth-child(14),
.order-table th:nth-child(17),
.order-table td:nth-child(17),
.order-table th:nth-child(18),
.order-table td:nth-child(18) {
    white-space: normal;
    line-height: 1.35;
}
.order-table .offer-subcell {
    white-space: normal;
}
.order-table td.order-money-stack {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.35;
}
.order-table .order-money-stack span {
    display: block;
}
.order-table tbody tr {
    cursor: pointer;
}
.workorder-table {
    width: 100%;
    min-width: 1600px;
    table-layout: fixed;
}
.workorder-table th,
.workorder-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.workorder-table th:nth-child(1),
.workorder-table td:nth-child(1) {
    width: 110px;
}
.workorder-table th:nth-child(2),
.workorder-table td:nth-child(2) {
    width: 300px;
}
.workorder-table th:nth-child(3),
.workorder-table td:nth-child(3) {
    width: 150px;
}
.workorder-table th:nth-child(4),
.workorder-table td:nth-child(4) {
    width: 130px;
}
.workorder-table th:nth-child(5),
.workorder-table td:nth-child(5) {
    width: 220px;
}
.workorder-table th:nth-child(6),
.workorder-table td:nth-child(6) {
    width: 190px;
}
.workorder-table th:nth-child(7),
.workorder-table td:nth-child(7) {
    width: 150px;
}
.workorder-table th:nth-child(8),
.workorder-table td:nth-child(8) {
    width: 150px;
}
.workorder-table th:nth-child(9),
.workorder-table td:nth-child(9) {
    width: 170px;
}
.workorder-table th:nth-child(10),
.workorder-table td:nth-child(10) {
    width: 130px;
}
.workorder-table th:nth-child(4),
.workorder-table td:nth-child(4),
.workorder-table th:nth-child(5),
.workorder-table td:nth-child(5),
.workorder-table th:nth-child(6),
.workorder-table td:nth-child(6),
.workorder-table th:nth-child(7),
.workorder-table td:nth-child(7) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.workorder-table th:nth-child(2),
.workorder-table td:nth-child(2),
.workorder-table th:nth-child(3),
.workorder-table td:nth-child(3),
.workorder-table th:nth-child(8),
.workorder-table td:nth-child(8),
.workorder-table th:nth-child(9),
.workorder-table td:nth-child(9),
.workorder-table th:nth-child(10),
.workorder-table td:nth-child(10) {
    white-space: normal;
    line-height: 1.35;
}
.workorder-table .offer-subcell {
    white-space: normal;
}
.workorder-table tbody tr.clickable-workorder-row {
    cursor: pointer;
}
.order-row-warning {
    background: #fff6cf;
}
.order-row-overdue {
    background: #ffe1de;
}
.order-badge-open,
.order-badge-in_production {
    background: #eef5fb;
    color: #36516a;
}
.order-badge-in_planning {
    background: #e1f3ef;
    color: #146255;
}
.order-badge-in_warehouse,
.order-badge-partial_delivered {
    background: #fff2cf;
    color: #8f6205;
}
.order-badge-delivered {
    background: #dff6e8;
    color: #116149;
}
.order-badge-cancelled {
    background: #ffe6e3;
    color: #9c3028;
}
.employee-page {
    color: #132238;
}
.employee-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 130, 0.18), transparent 32%),
        linear-gradient(135deg, #163347, #1f4f68 55%, #2f6977);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.employee-hero-actions,
.employee-detail-actions,
.employee-actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.employee-toolbar {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.employee-actions-row {
    margin-top: 14px;
}
.employee-secondary-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e2ec;
    background: #eef4f8;
    color: #294861;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}
.employee-secondary-btn.danger {
    background: #ffe6e3;
    color: #9c3028;
    border-color: #f4c8c2;
}
.employee-import-copy {
    margin-top: 6px;
    font-size: 12px;
    color: #66768a;
}
.employee-summary {
    margin-top: 18px;
}
.employee-table tbody tr {
    cursor: pointer;
}
.employee-table {
    table-layout: fixed;
}
.employee-table th,
.employee-table td {
    vertical-align: middle;
}
.employee-col-sicil {
    width: 110px;
}
.employee-col-name {
    width: 260px;
}
.employee-col-hours {
    width: 430px;
}
.employee-hours-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(78px, 1fr));
    gap: 8px;
    min-width: 360px;
}
.employee-hours-grid span {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f7fafc;
    border: 1px solid #e5edf5;
    text-align: right;
}
.employee-hours-grid small {
    display: block;
    margin-bottom: 3px;
    color: #66768a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.employee-hours-grid strong {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.employee-row-inactive {
    background: #f7fafc;
    opacity: 0.86;
}
.employee-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}
.employee-year-input {
    width: 110px;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid #d8e2ec;
    padding: 0 12px;
    background: #f8fbfd;
    color: #102a43;
}
.employee-attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.employee-attendance-card {
    padding: 14px;
    border-radius: 16px;
    background: #f7fafc;
}
.employee-attendance-card span {
    display: block;
    margin-bottom: 4px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.employee-attendance-card strong {
    font-size: 24px;
}
.employee-edit-link-row {
    margin-top: 14px;
}
.employee-month-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    border-top: 1px solid #dfe8f0;
    border-left: 1px solid #dfe8f0;
}
.employee-month-card {
    padding: 16px;
    border-right: 1px solid #dfe8f0;
    border-bottom: 1px solid #dfe8f0;
    background: #f7f7f8;
}
.employee-month-card.has-hours {
    background: #fff;
    box-shadow: inset 4px 0 0 #1f5f85;
}
.employee-month-card h3 { margin: 0 0 10px; font-size: 14px; }
.employee-month-card > strong { display: block; color: #163f5a; font-size: 25px; font-variant-numeric: tabular-nums; }
.employee-month-card > small { color: #66768a; }
.employee-month-card dl { margin: 14px 0 0; }
.employee-month-card dl div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #e5edf5; }
.employee-month-card dl .employee-raw-row { margin-bottom: 5px; padding: 7px 0; border-top-color: #1f5f85; border-bottom: 1px solid #dfe8f0; color: #163f5a; }
.employee-month-card dt { color: #66768a; font-size: 11px; }
.employee-month-card dd { margin: 0; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.employee-panel-note { margin: 6px 0 0; color: #66768a; font-size: 12px; }
.employee-rate-legend { display: flex; gap: 6px; }
.employee-rate-legend span, .master-data-count { padding: 5px 8px; border: 1px solid #d8e2ec; color: #31556f; font-size: 11px; font-weight: 700; }
.employee-table-scroll { overflow-x: auto; }
.employee-table-scroll .client-table { min-width: 1180px; }
.employee-attendance-table-wrap { margin-top: 22px; overflow-x: auto; }
.employee-attendance-table-wrap h3 { margin: 0 0 12px; font-size: 16px; }
.employee-monthly-attendance { min-width: 980px; }
.employee-monthly-attendance { table-layout: fixed; }
.employee-monthly-attendance th:first-child,
.employee-monthly-attendance td:first-child { width: 10%; text-align: left !important; }
.employee-monthly-attendance th:nth-child(n+2),
.employee-monthly-attendance td:nth-child(n+2) { width: 11.25%; text-align: right !important; font-variant-numeric: tabular-nums; }
.employee-monthly-attendance .is-empty-month { color: #8996a5; background: #f7f7f8; }
.employee-project-table { table-layout: fixed; }
.employee-project-table th:nth-child(1) { width: 6%; }
.employee-project-table th:nth-child(2) { width: 22%; }
.employee-project-table th:nth-child(3) { width: 32%; }
.employee-project-table th:nth-child(4) { width: 10%; }
.employee-project-table th:nth-child(5) { width: 4%; }
.employee-project-table th:nth-child(6) { width: 6%; }
.employee-project-table th:nth-child(7) { width: 5%; }
.employee-project-table th:nth-child(8) { width: 9%; }
.employee-project-table th:nth-child(9) { width: 6%; }
.employee-project-table th:nth-child(n+5):nth-child(-n+8),
.employee-project-table td:nth-child(n+5):nth-child(-n+8) { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.master-data-create { margin-top: 18px; }
.master-data-form, .master-data-row { display: grid; grid-template-columns: 1.3fr 1.3fr 1.3fr 1fr 90px auto; gap: 10px; align-items: end; }
.master-data-form label, .master-data-row label { display: grid; gap: 5px; }
.master-data-form label span, .master-data-row label span { color: #66768a; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.master-data-form input, .master-data-form select, .master-data-row input, .master-data-row select { min-height: 40px; border: 1px solid #d8e2ec; border-radius: 8px; padding: 8px 10px; background: #fff; }
.master-data-form button, .master-data-row button { min-height: 40px; }
.master-data-groups { display: grid; gap: 16px; margin-top: 16px; }
.master-data-list { display: grid; gap: 8px; }
.master-data-row { grid-template-columns: 1.5fr 1.5fr 1fr 80px auto auto; padding: 12px; border: 1px solid #e5edf5; background: #f7f7f8; }
.master-data-row.is-inactive { opacity: .55; }

@media (max-width: 960px) {
    .offer-filter-bar,
    .offer-summary,
    .employee-toolbar,
    .employee-attendance-grid {
        grid-template-columns: 1fr;
    }
    .employee-month-strip { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .master-data-form, .master-data-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .offer-hero,
    .order-hero,
    .employee-hero {
        padding: 20px;
        border-radius: 20px;
    }
    .employee-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .employee-month-strip, .master-data-form, .master-data-row { grid-template-columns: 1fr; }
}

.client-page {
    color: #132238;
}
.client-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 205, 143, 0.18), transparent 30%),
        linear-gradient(135deg, #1a3147, #245266 55%, #315f73);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.client-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.client-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.06;
}
.client-subtitle {
    margin: 12px 0 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.84);
}
.client-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}
.client-hero-side {
    display: grid;
    justify-items: end;
    gap: 12px;
}
.client-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.client-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
}
.client-meta-grid,
.client-kpi-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.client-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.client-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.client-kpi-grid.narrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.client-meta-card,
.client-kpi-card {
    padding: 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.client-meta-card span,
.client-kpi-card p {
    display: block;
    margin: 0 0 6px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.client-meta-card strong,
.client-kpi-card strong {
    font-size: 26px;
    line-height: 1.1;
}
.client-meta-card p,
.client-kpi-card span {
    margin: 8px 0 0;
    color: #52606d;
    font-size: 13px;
}
.client-kpi-breakdown {
    display: grid;
    gap: 4px;
    margin-top: 10px;
}
.client-kpi-breakdown span {
    margin: 0;
    color: #334e68;
    font-size: 13px;
}
.client-kpi-card.tone-blue { border-top: 5px solid #245f89; }
.client-kpi-card.tone-green { border-top: 5px solid #1f7a55; }
.client-kpi-card.tone-gold { border-top: 5px solid #a56f12; }
.client-kpi-card.tone-red { border-top: 5px solid #a1362f; }
.client-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 12px 26px rgba(16, 32, 51, 0.05);
}
.client-filter-bar label {
    display: grid;
    gap: 6px;
}
.client-filter-bar label span {
    color: #66768a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.client-filter-bar select {
    min-width: 140px;
    min-height: 42px;
    border: 1px solid #d5e3ef;
    border-radius: 8px;
    padding: 0 12px;
    background: #f8fbfe;
    color: #102033;
}
.client-filter-bar button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 0 18px;
    background: #0f4165;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.client-hero-actions button.client-primary-link {
    font: inherit;
    cursor: pointer;
}
.client-reconciliation-card {
    border-top: 5px solid #1f7a55;
}
@media print {
    .top-bar,
    footer,
    .client-filter-bar,
    .client-hero-actions,
    .client-panel:not(.client-reconciliation-card) {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .content {
        padding: 0;
    }
    .client-hero,
    .client-reconciliation-card {
        box-shadow: none;
        border-radius: 0;
    }
    .client-hero {
        color: #102033;
        background: #fff;
        border-bottom: 2px solid #102033;
    }
    .client-subtitle {
        color: #52606d;
    }
}
.client-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}
.client-panel {
    padding: 20px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 16px 32px rgba(16, 32, 51, 0.06);
}
.client-panel-wide {
    grid-column: span 2;
}
.client-chart-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.client-table {
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.client-table th,
.client-table td {
    border: 0;
    border-bottom: 1px solid #edf2f7;
    padding: 12px 10px;
    vertical-align: top;
    text-align: left;
}
.client-table thead th {
    background: #f7fafc;
    color: #4d5c6b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.35;
    vertical-align: bottom;
}
.client-table .num {
    text-align: right;
    white-space: nowrap;
}
.client-table th.offer-num,
.client-table td.offer-num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.invoice-allocation-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e6eef6;
    border-radius: 14px;
}
.invoice-allocation-table {
    min-width: 980px;
    table-layout: fixed;
}
.invoice-allocation-table .alloc-col-receipt { width: 13%; }
.invoice-allocation-table .alloc-col-type { width: 8%; }
.invoice-allocation-table .alloc-col-cost-type { width: 12%; }
.invoice-allocation-table .alloc-col-target { width: 15%; }
.invoice-allocation-table .alloc-col-note { width: 22%; }
.invoice-allocation-table .alloc-col-method { width: 8%; }
.invoice-allocation-table .alloc-col-percent { width: 7%; }
.invoice-allocation-table .alloc-col-money { width: 7.5%; }
.invoice-allocation-table th,
.invoice-allocation-table td {
    overflow-wrap: anywhere;
}
.invoice-allocation-table .offer-num {
    text-align: right;
    white-space: nowrap;
}
.invoice-allocation-note {
    color: #27445f;
    line-height: 1.35;
}
.client-empty {
    color: #66768a;
    margin: 0;
}
.client-stack-list,
.client-activity-list {
    display: grid;
    gap: 12px;
}
.client-mini-card,
.client-profit-card,
.client-activity-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #e5edf5;
    background: linear-gradient(180deg, #ffffff, #f8fbfe);
}
.client-mini-top,
.client-profit-head,
.client-activity-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.client-mini-top strong,
.client-profit-head strong,
.client-activity-top strong {
    display: block;
    font-size: 16px;
}
.client-mini-top span,
.client-mini-meta span,
.client-profit-head span,
.client-activity-top span,
.client-activity-body p,
.client-mini-stats span,
.client-profit-grid span {
    color: #52606d;
    font-size: 13px;
}
.client-mini-meta,
.client-mini-stats,
.client-profit-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.client-mini-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.client-mini-stats,
.client-profit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.client-mini-stats div,
.client-profit-grid div {
    padding: 12px;
    border-radius: 14px;
    background: #f2f6fa;
}
.client-mini-stats strong,
.client-profit-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    color: #132238;
}
.client-profit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.profit-positive {
    color: #146255;
    font-weight: 700;
}
.profit-negative {
    color: #9c3028;
    font-weight: 700;
}
.client-activity-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.client-activity-dot {
    width: 12px;
    height: 12px;
    margin-top: 6px;
    border-radius: 999px;
    background: #7b8794;
    box-shadow: 0 0 0 6px rgba(123, 135, 148, 0.14);
}
.client-activity-dot.kind-offer {
    background: #245f89;
    box-shadow: 0 0 0 6px rgba(36, 95, 137, 0.14);
}
.client-activity-dot.kind-order {
    background: #a56f12;
    box-shadow: 0 0 0 6px rgba(165, 111, 18, 0.14);
}
.client-activity-dot.kind-workorder {
    background: #1f7a55;
    box-shadow: 0 0 0 6px rgba(31, 122, 85, 0.14);
}
.client-activity-body p {
    margin: 6px 0 0;
    line-height: 1.5;
}
.client-list-page,
.client-form-page {
    color: #132238;
}
.client-list-hero,
.client-form-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 130, 0.2), transparent 34%),
        linear-gradient(135deg, #1a3147, #245266 55%, #315f73);
    color: #fff;
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}
.client-list-toolbar,
.client-form-shell {
    margin-top: 18px;
    padding: 18px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.client-list-toolbar {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
}
.planning-filter-panel {
    position: relative;
    grid-template-columns: minmax(260px, 1.7fr) repeat(4, minmax(145px, 1fr)) auto;
}
.planning-filter-panel[aria-busy="true"]::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #1d6fa5, transparent);
    background-size: 45% 100%;
    animation: planning-filter-progress .8s linear infinite;
}
.planning-filter-panel button:disabled {
    cursor: wait;
    opacity: .72;
}
.offer-tab.is-loading {
    cursor: wait;
    opacity: .68;
}
@keyframes planning-filter-progress {
    from { background-position: -60% 0; }
    to { background-position: 160% 0; }
}
.client-filter-field,
.client-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.client-filter-field span,
.client-form-field span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52606d;
}
.client-filter-field input,
.client-filter-field select,
.client-form-field input,
.client-form-field select,
.client-form-field textarea {
    border-radius: 12px;
    border: 1px solid #d8e2ec;
    padding: 10px 12px;
    background: #f8fbfd;
    color: #102a43;
    font: inherit;
}
.client-filter-field input,
.client-filter-field select,
.client-form-field input,
.client-form-field select {
    min-height: 42px;
}
.client-filter-actions,
.client-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.client-filter-actions button,
.client-filter-actions a,
.client-form-actions button,
.client-form-actions a {
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
}
.client-filter-actions button,
.client-form-actions button {
    border: 0;
    background: #17456a;
    color: #fff;
}

.receipt-page .client-list-toolbar {
    grid-template-columns: minmax(280px, 1.4fr) minmax(240px, 1fr) auto;
}

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

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

.receipt-table-wrap {
    overflow-x: auto;
}

.receipt-table {
    min-width: 1180px;
}

.receipt-table input,
.receipt-table select {
    width: 100%;
    min-width: 120px;
}

.receipt-table td:last-child {
    min-width: 220px;
}

.receipt-table td:last-child input + input {
    margin-top: 6px;
}

.po-line-actions {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.po-inline-invoice-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.po-inline-invoice-form button {
    grid-column: 1 / -1;
}

.receipt-list-table td {
    vertical-align: top;
}
.client-filter-actions a,
.client-form-actions a {
    background: #eef4f8;
    color: #294861;
}
.client-list-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.client-list-summary-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.client-summary-card {
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 14px 30px rgba(16, 32, 51, 0.06);
}
.client-summary-card span {
    display: block;
    margin-bottom: 6px;
    color: #66768a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.client-summary-card strong {
    font-size: 28px;
}
.client-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #e5edf5;
    box-shadow: 0 16px 32px rgba(16, 32, 51, 0.06);
}

.client-master-table {
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
}
.client-master-table th,
.client-master-table td {
    border: 0;
    border-bottom: 1px solid #edf2f7;
    padding: 14px 12px;
    vertical-align: top;
    background: transparent;
    text-align: left;
}
.client-master-table th.offer-num,
.client-master-table td.offer-num {
    text-align: right;
}
.client-master-table thead th {
    background: #f7fafc;
    color: #4d5c6b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.35;
    vertical-align: bottom;
}
.client-master-table tbody tr:hover {
    background: #f8fbfe;
}
.client-master-table tbody tr[data-href] {
    cursor: pointer;
}
.supplier-invoice-list-table {
    min-width: 1350px;
    table-layout: fixed;
}
.supplier-invoice-list-table .invoice-number-col {
    width: 13%;
}
.supplier-invoice-list-table .invoice-description-col {
    width: 15%;
}
.supplier-invoice-list-table .invoice-scope-col {
    width: 7%;
}
.supplier-invoice-list-table .invoice-cost-type-col {
    width: 10%;
}
.supplier-invoice-list-table .invoice-target-col {
    width: 11%;
}
.supplier-invoice-list-table .invoice-po-col {
    width: 7%;
}
.supplier-invoice-list-table .invoice-amount-col {
    width: 10%;
}
.supplier-invoice-list-table .invoice-currency-col {
    width: 5%;
}
.supplier-invoice-list-table th,
.supplier-invoice-list-table td {
    overflow-wrap: anywhere;
    vertical-align: top;
}
.supplier-invoice-list-table td.offer-num {
    white-space: nowrap;
}
.supplier-invoice-list-table tbody tr[data-href]:focus-visible {
    outline: 3px solid #1d6fa5;
    outline-offset: -3px;
}
.supplier-invoice-filter-panel {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    border-radius: 0;
    border-color: #d7dde5;
    box-shadow: none;
}
.supplier-invoice-filter-panel .filter-search {
    grid-column: span 2;
}
.supplier-invoice-filter-panel .filter-supplier {
    grid-column: span 2;
}
.supplier-invoice-filter-panel .client-filter-actions {
    grid-column: span 2;
    justify-content: flex-end;
}
.supplier-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 16px;
    padding: 10px 12px;
    border: 1px solid #d7dde5;
    background: #fff;
}
.supplier-active-filters strong,
.supplier-active-filters span {
    font-size: 12px;
}
.supplier-active-filters span {
    padding: 5px 9px;
    border: 1px solid #002fa7;
    color: #002fa7;
    background: #fff;
}
@media (max-width: 1200px) {
    .supplier-invoice-filter-panel { grid-template-columns: repeat(3, minmax(170px, 1fr)); }
}
@media (max-width: 760px) {
    .supplier-invoice-filter-panel { grid-template-columns: 1fr; }
    .supplier-invoice-filter-panel .filter-search,
    .supplier-invoice-filter-panel .filter-supplier,
    .supplier-invoice-filter-panel .client-filter-actions { grid-column: span 1; }
}

/* Work-order open actions: dense Swiss-style operational tracking */
.action-board {
    margin-top: 20px;
    border-radius: 0;
    border: 1px solid #CFD9E4;
    box-shadow: none;
    background: #FFFFFF;
}

.action-board-head {
    border-bottom: 1px solid #CFD9E4;
    padding-bottom: 16px;
}

.action-create-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) 150px auto auto;
    gap: 12px;
    align-items: end;
    padding: 18px 0;
    border-bottom: 1px solid #CFD9E4;
}

.action-blocker-check {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #16324F;
    font-weight: 700;
    font-size: 13px;
}

.action-blocker-check input { width: auto; }
.action-blocker-check.compact { align-self: end; }

.action-list {
    display: grid;
}

.action-row {
    display: grid;
    grid-template-columns: 78px minmax(240px, 2fr) minmax(150px, 1fr) 160px 145px minmax(210px, 1.4fr) 70px auto;
    gap: 10px;
    align-items: end;
    padding: 14px 0;
    border-bottom: 1px solid #DFE6ED;
}

.action-row:last-child { border-bottom: 0; }
.action-row.is-closed { opacity: .62; }
.action-row.is-overdue { background: #FFF4F2; }

.action-row-signal {
    min-height: 42px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 7px 9px;
    border-left: 4px solid #6B7C8E;
    background: #F4F7FA;
    color: #42566A;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.action-row-signal.is-blocker {
    border-left-color: #002FA7;
    background: #EEF3FF;
    color: #002FA7;
}

.action-row-signal strong { color: #B42318; letter-spacing: 0; }
.action-empty { padding: 28px 12px; color: #607286; text-align: center; }

.action-overview-shell { max-width: 1840px; }
.action-overview-hero { border-radius: 0; background: #163F63; }

.action-overview-create {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    margin-top: 18px;
    border: 1px solid #002FA7;
    background: #FFFFFF;
}

.action-overview-create-title {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    color: #FFFFFF;
    background: #002FA7;
}

.action-overview-create-title span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.action-overview-create-title strong { font-size: 18px; }

.action-overview-create form {
    display: grid;
    grid-template-columns: minmax(300px, 1.6fr) minmax(260px, 1.5fr) minmax(160px, .8fr) 145px auto auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.action-metric-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    margin-top: 18px;
    border: 1px solid #CFD9E4;
    background: #FFFFFF;
}

.action-metric {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    min-height: 72px;
    padding: 17px 18px;
    border-right: 1px solid #CFD9E4;
    color: #16324F;
    text-decoration: none;
}

.action-metric:last-child { border-right: 0; }
.action-metric strong { font-size: 28px; font-variant-numeric: tabular-nums; }
.action-metric.active { color: #FFFFFF; background: #002FA7; }

.action-filter-bar {
    margin: 14px 0;
    border-radius: 0;
    box-shadow: none;
}

.action-overview-list {
    border: 1px solid #CFD9E4;
    background: #FFFFFF;
}

.action-overview-row {
    display: grid;
    grid-template-columns: 180px minmax(300px, 2fr) 190px 130px minmax(250px, 1fr);
    min-height: 104px;
    border-bottom: 1px solid #CFD9E4;
}

.action-overview-row:last-child { border-bottom: 0; }
.action-overview-row.is-blocker { border-left: 6px solid #002FA7; }
.action-overview-row.is-overdue { background: #FFF4F2; }
.action-overview-row.is-closed { opacity: .62; }

.action-project-cell,
.action-topic-cell,
.action-meta-cell,
.action-quick-update {
    padding: 16px;
    border-right: 1px solid #DFE6ED;
}

.action-project-cell {
    display: grid;
    align-content: center;
    gap: 4px;
    color: #002FA7;
    text-decoration: none;
}

.action-project-cell span,
.action-project-cell small,
.action-topic-cell small,
.action-meta-cell span { color: #607286; }

.action-topic-cell { display: grid; align-content: center; gap: 8px; }
.action-topic-cell > strong { font-size: 17px; color: #102A43; }
.action-topic-flags { display: flex; gap: 6px; }
.action-flag { padding: 3px 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.action-flag.blocker { color: #FFFFFF; background: #002FA7; }
.action-flag.overdue { color: #FFFFFF; background: #B42318; }
.action-meta-cell { display: grid; align-content: center; gap: 6px; }
.action-quick-update { display: flex; align-items: end; gap: 8px; border-right: 0; }
.action-quick-update label { flex: 1; display: grid; gap: 5px; }
.action-quick-update label span { color: #607286; font-size: 12px; }

.workorder-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #CFD9E4;
    background: #FFFFFF;
    color: #16324F;
    font-variant-numeric: tabular-nums;
}

.workorder-pagination div { display: flex; gap: 8px; }
.workorder-pagination a {
    padding: 7px 11px;
    border: 1px solid #002FA7;
    color: #002FA7;
    text-decoration: none;
    font-weight: 700;
}
.workorder-pagination a:hover { color: #FFFFFF; background: #002FA7; }

@media (max-width: 1300px) {
    .action-create-grid,
    .action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .action-row-signal { grid-column: 1 / -1; }
    .action-overview-row { grid-template-columns: 150px minmax(260px, 2fr) 170px 120px; }
    .action-quick-update { grid-column: 1 / -1; border-top: 1px solid #DFE6ED; }
    .action-overview-create { grid-template-columns: 150px minmax(0, 1fr); }
    .action-overview-create form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .action-create-grid,
    .action-row,
    .action-overview-row,
    .action-metric-strip { grid-template-columns: 1fr; }
    .action-metric { border-right: 0; border-bottom: 1px solid #CFD9E4; }
    .action-project-cell,
    .action-topic-cell,
    .action-meta-cell { border-right: 0; border-bottom: 1px solid #DFE6ED; }
    .action-overview-create,
    .action-overview-create form { grid-template-columns: 1fr; }
}
.client-master-table tbody tr.is-overdue {
    background: #fff0ef;
}
.client-name-link,
.client-report-link {
    color: #1d4f91;
    font-weight: 700;
    text-decoration: none;
}
.client-cell-sub {
    display: block;
    margin-top: 4px;
    color: #66768a;
    font-size: 13px;
    line-height: 1.45;
}
.client-empty-row {
    text-align: center;
    color: #66768a;
    padding: 24px;
}
.client-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.client-form-field-wide {
    grid-column: span 2;
}
.ncr-photo-list {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}
.ncr-photo-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #d8e5ef;
    border-radius: 8px;
    background: #f8fbfd;
}
.ncr-photo-item strong {
    color: #103c5a;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.client-form-section + .client-form-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
}
.client-form-actions {
    margin-top: 18px;
}

@media (max-width: 980px) {
    .client-meta-grid,
    .client-kpi-grid,
    .client-kpi-grid.narrow,
    .client-grid,
    .client-chart-row,
    .client-list-toolbar,
    .client-list-summary,
    .client-form-grid {
        grid-template-columns: 1fr;
    }
    .client-panel-wide {
        grid-column: span 1;
    }
    .client-form-field-wide {
        grid-column: span 1;
    }
    .client-mini-meta,
    .client-mini-stats,
    .client-profit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1450px) and (min-width: 981px) {
    .planning-filter-panel {
        grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(160px, 1fr));
    }
    .planning-filter-panel .client-filter-actions {
        grid-column: span 3;
    }
}

@media (max-width: 720px) {
    .client-hero,
    .client-list-hero,
    .client-form-hero {
        padding: 20px;
        border-radius: 20px;
    }
}

.daily-shell,
.workorder-shell {
    --erp-panel: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    --erp-line: #d7e4ef;
}
.page-shell {
    display: grid;
    gap: 18px;
}
.section-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    padding: 26px 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 205, 120, 0.22), transparent 28%),
        linear-gradient(135deg, #14314a, #1f4d68 55%, #2b6b7c);
    color: #fff;
    box-shadow: 0 20px 40px rgba(18, 34, 56, 0.15);
}
.section-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
}
.section-subtitle {
    max-width: 780px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.6;
}
.hero-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.workorder-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.workorder-hero {
    order: -20;
}

.workorder-kpis {
    order: -19;
}

.workorder-flow-note {
    order: -18;
}

.workorder-next-panel {
    order: -17;
}

.workorder-tabs {
    order: -16;
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid #d7e4ef;
    border-radius: 18px;
    background: rgba(248, 251, 253, 0.94);
    box-shadow: 0 12px 24px rgba(16, 32, 51, 0.08);
    backdrop-filter: blur(10px);
}

.workorder-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cfe0ec;
    border-radius: 12px;
    background: #ffffff;
    color: #183a55;
    font-weight: 800;
    cursor: pointer;
}

.workorder-tab:hover {
    border-color: #94bfd9;
}

.workorder-tab.is-active {
    border-color: #154b72;
    background: #154b72;
    color: #ffffff;
}

.workorder-next-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr);
    gap: 14px;
}

.workorder-next-card {
    display: grid;
    gap: 8px;
    width: 100%;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #cfe0ec;
    border-left: 5px solid #154b72;
    border-radius: 16px;
    background: #ffffff;
    color: #11293d;
    text-align: left;
    cursor: pointer;
}

.workorder-next-card:hover {
    border-color: #91bbd5;
    box-shadow: 0 12px 24px rgba(16, 54, 79, 0.08);
}

.workorder-next-card.is-alert {
    border-left-color: #c97916;
    background: #fffaf0;
}

.workorder-next-card span,
.workorder-next-mini span,
.workorder-status-chip {
    color: #5f7388;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workorder-next-card strong {
    font-size: 20px;
    color: #10263a;
}

.workorder-next-card small {
    color: #61758a;
    line-height: 1.45;
}

.workorder-next-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.workorder-next-mini div {
    padding: 14px;
    border: 1px solid #e0eaf2;
    border-radius: 14px;
    background: #f8fbfd;
}

.workorder-next-mini strong {
    display: block;
    margin-top: 8px;
    color: #11293d;
    font-size: 18px;
}

.workorder-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eaf4f1;
    color: #126046;
}

.workorder-section-hidden {
    display: none !important;
}

.workorder-labor-plan {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #d7e2ea;
    border-left: 4px solid #1c6b8c;
    border-radius: 8px;
    background: #f8fbfd;
}

.workorder-labor-plan.is-over {
    border-left-color: #b7791f;
    background: #fffaf0;
}

.workorder-labor-plan.is-under,
.workorder-labor-plan.is-aligned {
    border-left-color: #19826b;
}

.workorder-labor-plan.is-missing-commercial,
.workorder-labor-plan.is-missing-operation {
    border-left-color: #718096;
}

.workorder-labor-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.workorder-labor-plan-head h4 {
    margin: 5px 0 0;
    font-size: 20px;
}

.workorder-labor-plan-head > p {
    max-width: 620px;
    margin: 0;
    color: #40566b;
    text-align: right;
}

.workorder-labor-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.workorder-labor-plan-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe5ec;
    border-radius: 8px;
    background: #fff;
}

.workorder-labor-plan-card span,
.workorder-labor-plan-card small {
    display: block;
    color: #61758a;
}

.workorder-labor-plan-card strong {
    display: block;
    margin: 5px 0;
    font-size: 24px;
    line-height: 1.2;
}

.workorder-labor-plan-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
    color: #40566b;
}

.workorder-labor-plan-foot span {
    padding: 10px 12px;
    border-top: 1px solid #dbe5ec;
}

.workorder-cost-live {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 1.25fr);
    gap: 14px;
    margin-bottom: 14px;
}

.workorder-cost-primary,
.workorder-cost-meter,
.workorder-cost-breakdown article {
    border: 1px solid #dce8f1;
    border-radius: 16px;
    background: #ffffff;
}

.workorder-cost-primary {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border-left: 5px solid #15705a;
}

.workorder-cost-live.is-overrun .workorder-cost-primary {
    border-left-color: #c7452b;
}

.workorder-cost-primary span,
.workorder-cost-meter-head span,
.workorder-cost-breakdown span {
    color: #60778d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workorder-cost-primary strong {
    color: #10263a;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.workorder-cost-primary small {
    color: #61758a;
}

.workorder-cost-meter {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.workorder-cost-meter-head,
.workorder-cost-meter-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.workorder-cost-meter-head strong {
    color: #10263a;
    font-size: 24px;
}

.workorder-cost-bar {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eff5;
}

.workorder-cost-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #15705a;
}

.workorder-cost-live.is-overrun .workorder-cost-bar span {
    background: #c7452b;
}

.workorder-cost-meter-foot {
    color: #4d657c;
    font-size: 13px;
    font-weight: 700;
}

.workorder-cost-breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.workorder-cost-breakdown article {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: #f8fbfd;
}

.workorder-cost-breakdown strong {
    color: #17324a;
    font-size: 14px;
    font-weight: 800;
}

.customer-order-tech-panel {
    order: 3;
}

.workorder-budget-panel {
    order: 10;
}

.workorder-action-panel {
    order: 4;
}

.workorder-info-grid {
    order: 5;
}

.workorder-ops-panel {
    order: 8;
    scroll-margin-top: 92px;
}

.workorder-quality-panel {
    order: 7;
    scroll-margin-top: 92px;
}

.workorder-procurement-panel {
    order: 6;
    scroll-margin-top: 92px;
}

.workorder-invoice-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

.workorder-invoice-table .invoice-col-no { width: 11%; }
.workorder-invoice-table .invoice-col-date { width: 7%; }
.workorder-invoice-table .invoice-col-supplier { width: 24%; }
.workorder-invoice-table .invoice-col-po { width: 5%; }
.workorder-invoice-table .invoice-col-source { width: 7%; }
.workorder-invoice-table .invoice-col-desc { width: 17%; }
.workorder-invoice-table .invoice-col-money { width: 11%; }
.workorder-invoice-table .invoice-col-action { width: 7%; }

.workorder-invoice-table th,
.workorder-invoice-table td {
    overflow-wrap: anywhere;
}

.workorder-invoice-table .invoice-description-cell {
    color: #27445f;
    line-height: 1.35;
}

.workorder-invoice-table .offer-num small {
    display: block;
    margin-top: 3px;
    color: #49647c;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
}

.workorder-loading-panel {
    order: 9;
    scroll-margin-top: 92px;
}

.workorder-bom-grid {
    order: 10;
}

.workorder-delivery-panel {
    order: 11;
    scroll-margin-top: 92px;
}

.workorder-weight-panel {
    order: 12;
    scroll-margin-top: 92px;
}

.workorder-collapsible-head {
    cursor: pointer;
    user-select: none;
}

.workorder-collapsible-head:hover h3 {
    color: #154b72;
}

.workorder-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #cfe0ec;
    border-radius: 999px;
    background: #ffffff;
    color: #12324c;
    font-weight: 800;
    cursor: pointer;
}

.workorder-collapsible-head > .workorder-collapse-toggle {
    width: 34px;
    min-width: 34px;
    padding: 0;
    gap: 0;
    margin-left: auto;
    pointer-events: none;
}

.workorder-collapse-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #154b72;
    color: #fff;
    line-height: 1;
}

.workorder-collapsible-body,
.workorder-inline-body {
    display: none;
}

.workorder-collapsible-body.is-open,
.workorder-inline-body.is-open {
    display: block;
}

.workorder-inline-collapse {
    border: 1px solid #dfeaf3;
    border-radius: 14px;
    background: #fbfdff;
    padding: 12px;
}

.workorder-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.workorder-action-card {
    display: grid;
    gap: 8px;
    min-height: 128px;
    padding: 16px;
    border: 1px solid #dbe8f2;
    border-radius: 14px;
    background: #f8fbfd;
    color: #142f47;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.workorder-action-card:hover {
    border-color: #9fc6dd;
    box-shadow: 0 12px 24px rgba(16, 54, 79, 0.08);
    transform: translateY(-1px);
}

.workorder-action-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #154b72;
    color: #fff;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.workorder-action-card strong {
    font-size: 15px;
    line-height: 1.25;
}

.workorder-action-card small {
    color: #5c7388;
    line-height: 1.45;
}

.workorder-delivery-panel .client-form-card,
.workorder-weight-panel .client-form-shell {
    background: #fbfdff;
    border: 1px solid #dfeaf3;
    border-radius: 18px;
}

.workorder-delivery-panel .erp-table th,
.workorder-weight-panel .erp-table th,
.workorder-ops-panel .erp-table th {
    font-size: 11px;
}

.workorder-delivery-panel .erp-table td,
.workorder-weight-panel .erp-table td {
    vertical-align: middle;
}

.workorder-delivery-panel input,
.workorder-delivery-panel select,
.workorder-weight-panel input,
.workorder-weight-panel select {
    min-height: 34px;
}

.workorder-close-sticky {
    position: sticky;
    top: 76px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}
.panel-card {
    padding: 22px;
    border-radius: 24px;
    background: var(--erp-panel, #fff);
    border: 1px solid var(--erp-line, #d7e4ef);
    box-shadow: 0 14px 28px rgba(16, 32, 51, 0.06);
}
.table-card {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid #e3edf5;
    background: #fff;
}
table.erp-table {
    display: table;
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
}
table.erp-table th,
table.erp-table td {
    border: 0;
    border-bottom: 1px solid #ebf1f6;
    padding: 14px 12px;
    vertical-align: top;
    color: #16324c;
    text-align: left;
}
table.erp-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f8fb;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #567086;
    line-height: 1.35;
    vertical-align: bottom;
}
table.erp-table input,
table.erp-table select,
table.erp-table textarea {
    max-width: 100%;
    box-sizing: border-box;
}
table.erp-table input[type="checkbox"],
table.erp-table input[type="radio"] {
    width: auto;
}
table.erp-table tbody tr:hover {
    background: #f9fbfd;
}
.input-like {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    border: 1px solid #d8e3ed;
    border-radius: 12px;
    padding: 0 12px;
    background: #fbfdff;
    color: #132238;
}
.hours-input {
    min-width: 90px;
    text-align: right;
}
.table-subline {
    margin-top: 4px;
    font-size: 12px;
    color: #66788a;
}
.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.metric-chip {
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e1eaf2;
    box-shadow: 0 10px 24px rgba(17, 36, 56, 0.05);
}
.metric-chip-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #63788f;
}
.metric-chip strong {
    font-size: 28px;
    letter-spacing: -0.04em;
    color: #11293d;
}
.daily-toolbar .muted-inline {
    padding: 10px 12px;
    border-radius: 14px;
    background: #f5f9fc;
    color: #546b81;
    line-height: 1.5;
}
.daily-table {
    width: 2160px;
    min-width: 2160px;
    table-layout: fixed;
}
.daily-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}
.daily-table th,
.daily-table td {
    vertical-align: middle;
    white-space: nowrap;
}
.daily-table th:nth-child(1),
.daily-table td:nth-child(1) {
    width: 250px;
    white-space: normal;
}
.daily-table th:nth-child(2),
.daily-table td:nth-child(2) {
    width: 116px;
}
.daily-table th:nth-child(3),
.daily-table td:nth-child(3),
.daily-table th:nth-child(6),
.daily-table td:nth-child(6),
.daily-table th:nth-child(9),
.daily-table td:nth-child(9) {
    width: 210px;
}
.daily-table th:nth-child(4),
.daily-table td:nth-child(4),
.daily-table th:nth-child(7),
.daily-table td:nth-child(7),
.daily-table th:nth-child(10),
.daily-table td:nth-child(10) {
    width: 160px;
}
.daily-table th:nth-child(5),
.daily-table td:nth-child(5),
.daily-table th:nth-child(8),
.daily-table td:nth-child(8),
.daily-table th:nth-child(11),
.daily-table td:nth-child(11),
.daily-table th:nth-child(12),
.daily-table td:nth-child(12),
.daily-table th:nth-child(13),
.daily-table td:nth-child(13),
.daily-table th:nth-child(14),
.daily-table td:nth-child(14),
.daily-table th:nth-child(15),
.daily-table td:nth-child(15) {
    width: 92px;
}
.daily-table .status-select {
    min-width: 92px;
}
.daily-table .wo-select {
    min-width: 210px;
}
.daily-table .task-select {
    min-width: 136px;
}
.daily-table .metric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-right: 16px;
}
.daily-table .metric-total {
    background: #eef7ff;
}
.daily-table .metric-normal {
    background: #f1f9f3;
}
.daily-table .metric-ot {
    background: #fff6dd;
}
.daily-table .metric-effective {
    background: #e8fbf0;
    color: #15643f;
}

.daily-note-panel {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 16px;
    border-left: 5px solid #155b75;
}

.daily-note-panel label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #10233a;
}

.daily-note-panel label span {
    color: #63788f;
    font-size: 12px;
}

.daily-note-panel textarea {
    width: 100%;
    min-height: 78px;
    resize: vertical;
    padding: 11px 12px;
    border: 1px solid #cdddea;
    border-radius: 9px;
    background: #f8fbfd;
    color: #10233a;
    font: inherit;
    line-height: 1.45;
}

.daily-note-panel textarea:focus {
    border-color: #155b75;
    outline: 3px solid rgba(21, 91, 117, 0.12);
}

/* Hidden project expenses: Swiss financial ledger */
.hidden-expenses-page {
    --hex-blue: #002FA7;
    --hex-ink: #111827;
    --hex-muted: #5F6B7A;
    --hex-line: #DADDE3;
    width: 100%;
    color: var(--hex-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.hidden-expenses-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 32%);
    min-height: 230px;
    background: #FFFFFF;
    border: 1px solid var(--hex-line);
    border-top: 8px solid var(--hex-blue);
}

.hidden-expenses-hero-copy {
    padding: 30px 36px 32px;
}

.hidden-expenses-access,
.hidden-expenses-section-head > div > span,
.hidden-expenses-filter > div > span {
    display: block;
    margin-bottom: 12px;
    color: var(--hex-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.hidden-expenses-hero h1 {
    margin: 0;
    color: var(--hex-ink);
    font-size: clamp(42px, 5vw, 68px);
    line-height: .9;
    letter-spacing: -.055em;
}

.hidden-expenses-hero-copy p {
    max-width: 790px;
    margin: 24px 0 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.hidden-expenses-hero-total {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 34px;
    color: #FFFFFF;
    background: var(--hex-blue);
}

.hidden-expenses-hero-total span,
.hidden-expenses-hero-total small {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.hidden-expenses-hero-total strong {
    margin: 12px 0 8px;
    font-size: clamp(30px, 3.4vw, 52px);
    line-height: 1;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}

.hidden-expenses-entry,
.hidden-expenses-ledger {
    margin-top: 18px;
    background: #FFFFFF;
    border: 1px solid var(--hex-line);
}

.hidden-expenses-section-head,
.hidden-expenses-filter {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--hex-line);
}

.hidden-expenses-section-head h2,
.hidden-expenses-filter h2 {
    margin: 0;
    font-size: 23px;
    letter-spacing: -.025em;
}

.hidden-expenses-section-head p {
    max-width: 460px;
    margin: 0;
    color: var(--hex-muted);
    font-size: 12px;
    text-align: right;
}

.hidden-expenses-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0;
    padding: 0 26px 26px;
}

.hidden-expenses-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 19px 16px 0 0;
}

.hidden-expenses-field > span,
.hidden-expenses-filter label > span {
    color: #374151;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hidden-expenses-field input,
.hidden-expenses-field select,
.hidden-expenses-filter select {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid #BFC5CF;
    border-radius: 0;
    outline: 0;
    background: #FFFFFF;
    color: var(--hex-ink);
    font: inherit;
    font-size: 13px;
}

.hidden-expenses-field input:focus,
.hidden-expenses-field select:focus,
.hidden-expenses-filter select:focus {
    border-color: var(--hex-blue);
    box-shadow: inset 0 -3px 0 var(--hex-blue);
}

.hidden-expenses-project { grid-column: span 5; }
.hidden-expenses-date { grid-column: span 2; }
.hidden-expenses-type { grid-column: span 2; }
.hidden-expenses-amount { grid-column: span 2; }
.hidden-expenses-currency { grid-column: span 1; padding-right: 0; }
.hidden-expenses-description { grid-column: span 4; }
.hidden-expenses-paid-check {
    display: flex;
    grid-column: span 2;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin: 19px 16px 0 0;
    padding: 0 12px;
    border: 1px solid #BFC5CF;
    background: #FFFFFF;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}
.hidden-expenses-paid-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--hex-blue); }
.hidden-expenses-receipt { grid-column: span 4; }
.hidden-expenses-receipt input[type="file"] { padding: 9px 10px; }

.hidden-expenses-submit {
    display: flex;
    grid-column: span 2;
    align-items: flex-end;
    justify-content: flex-end;
    padding-top: 19px;
}

.hidden-expenses-submit .btn {
    width: 100%;
    height: 44px;
    border-radius: 0;
    background: var(--hex-blue);
}

.hidden-expenses-filter label {
    display: grid;
    grid-template-columns: auto minmax(220px, 320px);
    align-items: center;
    gap: 14px;
}

.hidden-expenses-table-wrap {
    overflow-x: auto;
}

.hidden-expenses-table {
    width: 100%;
    min-width: 1420px;
    border-collapse: collapse;
    font-size: 12px;
}

.hidden-expenses-table th,
.hidden-expenses-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--hex-line);
    text-align: left;
    vertical-align: middle;
}

.hidden-expenses-table th {
    background: #F7F7F8;
    color: #4B5563;
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.hidden-expenses-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hidden-expenses-table td:first-child strong,
.hidden-expenses-table td:first-child small {
    display: block;
}

.hidden-expenses-table td:first-child strong {
    color: var(--hex-blue);
}

.hidden-expenses-table td:first-child small {
    max-width: 260px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--hex-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden-expenses-delete {
    padding: 0;
    border: 0;
    border-bottom: 1px solid #B42318;
    background: transparent;
    color: #B42318;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.hidden-expenses-payment-badge {
    display: inline-flex;
    min-width: 78px;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid currentColor;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hidden-expenses-payment-badge.is-paid { background: #ECFDF3; color: #067647; }
.hidden-expenses-payment-badge.is-unpaid { background: #FFF7ED; color: #B54708; }

.hidden-expenses-receipt-link {
    display: block;
    max-width: 260px;
    margin-bottom: 8px;
    overflow: hidden;
    color: var(--hex-blue);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden-expenses-payment-form {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.hidden-expenses-payment-form label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.hidden-expenses-payment-form input[type="checkbox"] { accent-color: var(--hex-blue); }
.hidden-expenses-payment-form input[type="file"] { max-width: 210px; font-size: 11px; }
.hidden-expenses-payment-form button {
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--hex-blue);
    background: #FFFFFF;
    color: var(--hex-blue);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.hidden-expenses-payment-form button:hover { background: var(--hex-blue); color: #FFFFFF; }

.hidden-expenses-empty {
    display: grid;
    gap: 7px;
    min-height: 120px;
    align-content: center;
    padding: 26px;
    border-left: 8px solid var(--hex-blue);
}

.hidden-expenses-empty strong {
    font-size: 18px;
}

.hidden-expenses-empty span {
    color: var(--hex-muted);
    font-size: 13px;
}

/* Project closure: fixed accounting columns */
.closure-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.closure-summary-strip .metric-chip {
    min-width: 0;
}

.closure-summary-strip .metric-chip strong,
.closure-summary-strip .metric-chip small {
    display: block;
    overflow-wrap: anywhere;
}

.closure-summary-strip .metric-chip strong {
    font-size: clamp(20px, 1.55vw, 28px);
    font-variant-numeric: tabular-nums;
}

.closure-tax-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 4px solid #002FA7;
    background: #F7F7F8;
    color: #4B5563;
    font-size: 12px;
    line-height: 1.5;
}

.closure-accounting-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #DADDE3;
    border-left: 1px solid #DADDE3;
}

.closure-accounting-group {
    min-width: 0;
    border-right: 1px solid #DADDE3;
    border-bottom: 1px solid #DADDE3;
    background: #FFFFFF;
}

.closure-accounting-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 13px 16px;
    border-bottom: 4px solid #002FA7;
}

.closure-accounting-group-head span {
    color: #002FA7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.closure-accounting-group-head strong {
    color: #111827;
    font-size: 16px;
}

.closure-accounting-group dl {
    margin: 0;
}

.closure-accounting-group dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 8px 16px;
    border-bottom: 1px solid #E5E7EB;
}

.closure-accounting-group dl > div:last-child {
    border-bottom: 0;
}

.closure-accounting-group dt {
    color: #4B5563;
    font-size: 12px;
    line-height: 1.35;
}

.closure-accounting-group dd {
    margin: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.closure-accounting-group .closure-accounting-total {
    background: #EEF3FF;
}

.closure-accounting-state .closure-accounting-group-head {
    color: #FFFFFF;
    background: #002FA7;
}

.closure-accounting-state .closure-accounting-group-head span,
.closure-accounting-state .closure-accounting-group-head strong {
    color: #FFFFFF;
}

.closure-subtable-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-bottom: 10px;
    border-bottom: 1px solid #DADDE3;
}

.closure-subtable-head h3 {
    margin: 0;
    font-size: 18px;
}

.closure-subtable-head span {
    color: #5F6B7A;
    font-size: 12px;
}

table.closure-tax-table {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
}

table.closure-tax-table th,
table.closure-tax-table td {
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.closure-tax-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.closure-sales-table col:nth-child(1) { width: 17%; }
.closure-sales-table col:nth-child(2) { width: 10%; }
.closure-sales-table col:nth-child(n+3) { width: 12.16%; }
.closure-purchase-table { min-width: 1680px !important; }
.closure-purchase-table col:nth-child(1) { width: 10%; }
.closure-purchase-table col:nth-child(2) { width: 7%; }
.closure-purchase-table col:nth-child(3) { width: 16%; }
.closure-purchase-table col:nth-child(4) { width: 9%; }
.closure-purchase-table col:nth-child(5) { width: 12%; }
.closure-purchase-table col:nth-child(n+6) { width: 6.57%; }

@media (max-width: 1100px) {
    .closure-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .closure-accounting-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .closure-summary-strip { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .hidden-expenses-project { grid-column: span 12; padding-right: 0; }
    .hidden-expenses-date,
    .hidden-expenses-type,
    .hidden-expenses-amount,
    .hidden-expenses-currency { grid-column: span 3; }
    .hidden-expenses-description,
    .hidden-expenses-receipt { grid-column: span 4; }
    .hidden-expenses-paid-check,
    .hidden-expenses-submit { grid-column: span 2; }
    .hidden-expenses-currency { padding-right: 0; }
}

@media (max-width: 760px) {
    .hidden-expenses-hero { grid-template-columns: 1fr; }
    .hidden-expenses-hero-total { min-height: 120px; }
    .hidden-expenses-section-head,
    .hidden-expenses-filter { align-items: stretch; flex-direction: column; }
    .hidden-expenses-section-head p { text-align: left; }
    .hidden-expenses-date,
    .hidden-expenses-type,
    .hidden-expenses-amount,
    .hidden-expenses-currency,
    .hidden-expenses-description,
    .hidden-expenses-paid-check,
    .hidden-expenses-receipt,
    .hidden-expenses-submit { grid-column: span 12; padding-right: 0; }
    .hidden-expenses-paid-check { margin-right: 0; }
    .hidden-expenses-filter label { grid-template-columns: 1fr; }
}

.daily-save-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid #d8e6f0;
    border-left: 5px solid #155b75;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 36, 56, 0.06);
}

.daily-save-bar .daily-save-button {
    order: -1;
    flex: 0 0 auto;
}

.daily-save-bar > div {
    flex: 1 1 auto;
}

.daily-save-bar strong {
    display: block;
    color: #10233a;
    font-size: 15px;
}

.daily-save-bar span {
    display: block;
    margin-top: 3px;
    color: #5d7185;
    font-size: 12px;
}

.daily-save-bar-bottom {
    position: sticky;
    bottom: 10px;
    z-index: 5;
}

.daily-save-button {
    min-width: 210px;
    min-height: 46px;
    justify-content: center;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(21, 91, 117, 0.28);
}

.daily-save-button span {
    color: #ffffff;
    margin-top: 0;
    font-size: 14px;
}

.daily-save-button:hover {
    transform: translateY(-1px);
}

.daily-save-button:active {
    transform: translateY(0);
}
.person-cell {
    min-width: 170px;
}
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.kpi-card {
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e1eaf2;
    box-shadow: 0 12px 24px rgba(16, 32, 51, 0.05);
}
.kpi-card-warn {
    border-color: #f0c36f;
    background: linear-gradient(180deg, #fffdf8 0%, #fff5dc 100%);
}
.kpi-label {
    display: block;
    margin-bottom: 6px;
    color: #61758a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}
.kpi-card strong {
    display: block;
    font-size: 28px;
    letter-spacing: -0.05em;
    color: #12273a;
}
.kpi-foot {
    display: block;
    margin-top: 8px;
    color: #66798d;
    font-size: 13px;
}
.detail-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.panel-span-two {
    grid-column: 1 / -1;
}
.delivery-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
}
.erp-table td[colspan="11"] {
    padding: 18px;
    background: #f7fbff !important;
}
.erp-table td[colspan="11"] .delivery-action-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.1fr) minmax(240px, 0.9fr);
    gap: 18px;
}
.erp-table td[colspan="11"] .client-form-card {
    height: 100%;
    border-radius: 18px;
    border: 1px solid #dbe8f2;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 36, 56, 0.04);
}
.erp-table td[colspan="11"] .client-form-card strong {
    font-size: 17px;
    color: #14314a;
}
.erp-table td[colspan="11"] .client-form-field input,
.erp-table td[colspan="11"] .client-form-field select,
.erp-table td[colspan="11"] .client-form-field textarea {
    min-height: 46px;
    border-radius: 14px;
    background: #fbfdff;
}
.erp-table td[colspan="11"] .note-box + .note-box {
    margin-top: 10px;
}
.erp-table thead th {
    white-space: nowrap;
}
.erp-table tbody td {
    font-size: 14px;
}
.section-head-inline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.detail-list div {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f7fafc;
    border: 1px solid #e4ecf4;
}
.detail-list span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #667a8f;
    font-weight: 700;
}
.detail-list strong {
    color: #132238;
}
.note-box {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f7fafc;
    border: 1px solid #e3edf5;
    color: #466079;
    line-height: 1.6;
}
.alert-banner {
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(90deg, #fff7d9, #fff1bf);
    border: 1px solid #f1d57a;
    color: #76530e;
    font-weight: 600;
}
.cell-warn {
    color: #9f3b2e;
    font-weight: 700;
}
.sticky-form-actions {
    display: flex;
    justify-content: flex-end;
    position: sticky;
    bottom: 12px;
    z-index: 4;
}
.sticky-form-actions .btn {
    box-shadow: 0 12px 22px rgba(20, 72, 109, 0.22);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 0;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary {
    background: #154b72;
    color: #fff;
}
.btn-secondary {
    background: #eef4f8;
    color: #234764;
}
.hero-actions,
.form-actions-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}
.text-link {
    color: #1a5e90;
    font-weight: 700;
    text-decoration: none;
}
.text-link:hover {
    text-decoration: underline;
}

.reports-shell {
    --reports-blue: #002FA7;
    --reports-line: #DADDE3;
    --reports-muted: #5F6B7A;
}

.reports-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 118px;
    padding: 24px 28px;
    border: 1px solid var(--reports-line);
    border-radius: 0;
    background: #fff;
    color: #111827;
}

.reports-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.02;
    letter-spacing: 0;
}

.reports-hero .section-subtitle {
    margin: 10px 0 0;
    max-width: 760px;
    color: #374151;
}

.reports-shell .eyebrow {
    color: var(--reports-blue);
}

.reports-alert-chip {
    border-top: 4px solid var(--reports-blue);
}

.reports-date-value {
    font-size: 22px !important;
    letter-spacing: 0 !important;
}

.reports-filter-panel .muted-inline {
    padding: 10px 12px;
    border: 1px solid var(--reports-line);
    background: #fff;
    color: var(--reports-muted);
    line-height: 1.45;
}

.reports-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--reports-line);
}

.reports-panel-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.reports-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--reports-line);
    background: #fff;
    color: #111827;
    font-weight: 800;
}

.reports-table {
    min-width: 920px;
}

.reports-table-wrap {
    overflow-x: auto;
}

.reports-alert-table {
    min-width: 980px;
}

.reports-alert-table td {
    vertical-align: top;
}

.reports-warning-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #E1B12C;
    background: #FFF9E8;
    color: #5D4200;
    font-weight: 800;
}

.reports-empty {
    display: grid;
    gap: 6px;
    padding: 24px;
    border: 1px dashed var(--reports-line);
    background: #fff;
    color: #111827;
}

.reports-empty span {
    color: var(--reports-muted);
}

.reports-rule-panel {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    border-radius: 0;
}

.reports-rule-panel h2 {
    margin: 0;
    font-size: 24px;
}

.reports-rule-panel p {
    margin: 0;
    color: var(--reports-muted);
    line-height: 1.55;
}

.reports-matrix-wrap {
    overflow: auto;
    max-width: 100%;
    border: 1px solid var(--reports-line);
    background: #fff;
}

.reports-matrix {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: #fff;
}

.reports-matrix th,
.reports-matrix td {
    border: 0;
    border-right: 1px solid var(--reports-line);
    border-bottom: 1px solid var(--reports-line);
    padding: 0;
    text-align: left;
    vertical-align: middle;
}

.reports-matrix th {
    position: sticky;
    top: 0;
    z-index: 3;
    min-width: 82px;
    height: 48px;
    background: #F7F7F8;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    text-align: center;
}

.reports-matrix th.is-weekend {
    background: #EEF2F7;
}

.reports-matrix .reports-person-col {
    position: sticky;
    left: 0;
    z-index: 4;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    background: #fff;
}

.reports-matrix thead .reports-person-col {
    z-index: 5;
    background: #F7F7F8;
    padding-left: 14px;
}

.reports-matrix .reports-total-col {
    position: sticky;
    left: 280px;
    z-index: 4;
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    background: #fff;
    text-align: center;
}

.reports-matrix thead .reports-total-col {
    z-index: 5;
    background: #F7F7F8;
}

.reports-matrix tbody .reports-person-col {
    padding: 12px 14px;
}

.reports-person-col strong,
.reports-person-col span,
.reports-person-col small {
    display: block;
}

.reports-person-col strong {
    color: #111827;
    font-size: 14px;
}

.reports-person-col span,
.reports-person-col small {
    margin-top: 4px;
    color: var(--reports-muted);
    font-size: 12px;
}

.reports-total-col strong {
    font-size: 20px;
    color: #111827;
}

.reports-day-cell {
    width: 82px;
    min-width: 82px;
    height: 58px;
    text-align: center !important;
}

.reports-day-cell a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    color: inherit;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.reports-day-missing {
    background: #FFF4E8;
    color: #8A3C00;
    box-shadow: inset 0 0 0 2px #FF4F00;
}

.reports-day-ok {
    background: #F7F7F8;
    color: #5F6B7A;
}

.reports-day-excused {
    background: #EEF3FF;
    color: var(--reports-blue);
}

.reports-matrix tbody tr.has-missing .reports-person-col,
.reports-matrix tbody tr.has-missing .reports-total-col {
    background: #FFFBF6;
}

.reports-matrix tbody tr:hover td {
    background-color: #F9FAFC;
}

.reports-matrix tbody tr:hover .reports-day-missing {
    background-color: #FFEAD6;
}

.reports-day-list {
    display: grid;
    gap: 12px;
}

.reports-day-card {
    display: grid;
    grid-template-columns: minmax(170px, .7fr) minmax(120px, .35fr) minmax(240px, 1.4fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--reports-line);
    border-left: 4px solid #FF4F00;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(17, 36, 56, 0.04);
}

.reports-day-date,
.reports-day-count,
.reports-day-people {
    display: grid;
    gap: 4px;
}

.reports-day-date span,
.reports-day-count span,
.reports-day-people span {
    color: var(--reports-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.reports-day-date strong {
    color: #11293d;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.reports-day-count strong {
    color: #8A3C00;
    font-size: 28px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.reports-day-people strong {
    color: #11293d;
    font-size: 15px;
    line-height: 1.35;
}

.reports-day-action {
    justify-self: end;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .reports-day-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .reports-day-action {
        justify-self: stretch;
        text-align: center;
    }
}

@media (max-width: 1100px) {
    .forecast-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .workorder-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .detail-grid.two-col {
        grid-template-columns: 1fr;
    }
    .panel-span-two {
        grid-column: auto;
    }
    .delivery-action-grid {
        grid-template-columns: 1fr;
    }
    .erp-table td[colspan="11"] .delivery-action-grid {
        grid-template-columns: 1fr;
    }
    .detail-list {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .capacity-chart {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .forecast-project-grid {
        grid-template-columns: 1fr;
    }
    .section-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-stack,
    .hero-actions {
        justify-content: flex-start;
    }
    .workorder-action-grid {
        grid-template-columns: 1fr;
    }
    .workorder-next-grid,
    .workorder-next-mini,
    .workorder-labor-plan-grid,
    .workorder-labor-plan-foot,
    .workorder-cost-live,
    .workorder-cost-breakdown {
        grid-template-columns: 1fr;
    }
    .workorder-labor-plan-head {
        display: block;
    }
    .workorder-labor-plan-head > p {
        margin-top: 10px;
        text-align: left;
    }
    .workorder-tabs {
        top: 0;
        border-radius: 14px;
    }
    .sticky-form-actions {
        position: static;
    }
}

/* Professional dashboard shell */
.top-bar .logo {
    min-height: 64px;
    display: inline-flex;
    align-items: center;
    max-width: 230px;
    margin-right: 10px;
    color: #16324a;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: none;
}

.erp-dashboard {
    --dash-ink: #10243a;
    --dash-muted: #5a6d80;
    --dash-line: #d9e2ea;
    --dash-surface: #ffffff;
    --dash-soft: #f3f7fa;
    --dash-primary: #155b75;
    --dash-accent: #0f8f72;
    display: grid;
    gap: 16px;
    color: var(--dash-ink);
}

.erp-dashboard .erp-hero,
.erp-dashboard .erp-kpi-grid,
.erp-dashboard .erp-command-card,
.erp-dashboard .erp-module-card,
.erp-dashboard .erp-panel {
    border: 1px solid var(--dash-line);
    border-radius: 8px;
    background: var(--dash-surface);
    box-shadow: 0 12px 30px rgba(16, 36, 58, 0.06);
}

.erp-dashboard .erp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: auto;
    padding: 28px 32px;
    border-left: 6px solid var(--dash-primary);
}

.erp-dashboard .erp-hero-copy {
    max-width: 900px;
}

.erp-dashboard .erp-eyebrow {
    margin: 0 0 8px;
    color: var(--dash-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.erp-dashboard .erp-hero h1 {
    margin: 0;
    max-width: 900px;
    color: var(--dash-ink);
    font-size: 46px;
    line-height: 1.06;
    letter-spacing: 0;
}

.erp-dashboard .erp-hero p {
    margin: 14px 0 0;
    max-width: 840px;
    color: var(--dash-muted);
    font-size: 16px;
    line-height: 1.55;
}

.erp-dashboard .erp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    border: 0;
}

.erp-dashboard .erp-hero-actions a,
.erp-dashboard .erp-command-card a,
.erp-dashboard .erp-module-links a,
.erp-dashboard .erp-panel-head a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--dash-primary);
    border-radius: 8px;
    padding: 0 16px;
    background: #ffffff;
    color: var(--dash-primary);
    font-weight: 800;
    text-decoration: none;
}

.erp-dashboard .erp-hero-actions a:first-child,
.erp-dashboard .erp-command-primary a {
    background: var(--dash-primary);
    color: #ffffff;
}

.erp-dashboard .erp-hero-actions a:hover,
.erp-dashboard .erp-command-card a:hover,
.erp-dashboard .erp-module-links a:hover,
.erp-dashboard .erp-panel-head a:hover {
    background: #0f4358;
    border-color: #0f4358;
    color: #ffffff;
}

.erp-dashboard .erp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
}

.erp-dashboard .erp-kpi-card {
    min-height: 126px;
    padding: 20px 22px;
    border: 0;
    border-right: 1px solid var(--dash-line);
}

.erp-dashboard .erp-kpi-card:last-child {
    border-right: 0;
}

.erp-dashboard .erp-kpi-card span {
    display: block;
    color: var(--dash-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.erp-dashboard .erp-kpi-card strong {
    display: block;
    margin-top: 12px;
    color: var(--dash-ink);
    font-size: 46px;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.erp-dashboard .erp-kpi-card p {
    margin: 10px 0 0;
    color: var(--dash-muted);
    font-size: 14px;
}

.erp-dashboard .erp-command-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.erp-dashboard .erp-command-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 144px;
    padding: 22px;
}

.erp-dashboard .erp-command-primary {
    border-left: 6px solid var(--dash-accent);
}

.erp-dashboard .erp-command-card h2,
.erp-dashboard .erp-module-card h2,
.erp-dashboard .erp-panel-head h2 {
    margin: 0;
    color: var(--dash-ink);
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: 0;
}

.erp-dashboard .erp-command-card p,
.erp-dashboard .erp-module-card p {
    margin: 10px 0 0;
    color: var(--dash-muted);
    line-height: 1.5;
}

.erp-dashboard .erp-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.erp-dashboard .erp-module-card {
    min-height: 218px;
    padding: 22px;
}

.erp-dashboard .erp-module-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--dash-line);
}

.erp-dashboard .erp-module-head span {
    max-width: 170px;
    color: var(--dash-muted);
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}

.erp-dashboard .erp-module-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.erp-dashboard .tone-commercial {
    border-top: 5px solid #155b75;
}

.erp-dashboard .tone-technical {
    border-top: 5px solid #0f8f72;
}

.erp-dashboard .tone-financial {
    border-top: 5px solid #9a7418;
}

.erp-dashboard .erp-panel {
    padding: 22px;
}

.erp-dashboard .erp-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--dash-line);
}

.erp-dashboard .erp-table {
    display: grid;
}

.erp-dashboard .erp-table-row {
    display: grid;
    grid-template-columns: 110px minmax(240px, 1fr) 140px 140px 160px;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--dash-line);
    align-items: center;
}

.erp-dashboard .erp-table-head {
    color: var(--dash-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .erp-dashboard .erp-hero,
    .erp-dashboard .erp-command-card {
        grid-template-columns: 1fr;
    }
    .erp-dashboard .erp-hero-actions {
        justify-content: flex-start;
    }
    .erp-dashboard .erp-kpi-grid,
    .erp-dashboard .erp-module-grid,
    .erp-dashboard .erp-command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .erp-dashboard .erp-hero h1 {
        font-size: 34px;
    }
    .erp-dashboard .erp-kpi-grid,
    .erp-dashboard .erp-module-grid,
    .erp-dashboard .erp-command-grid {
        grid-template-columns: 1fr;
    }
    .erp-dashboard .erp-kpi-card {
        border-right: 0;
        border-bottom: 1px solid var(--dash-line);
    }
    .erp-dashboard .erp-table-row {
        grid-template-columns: 1fr;
    }
}

.itp-edit-table {
    min-width: 1180px;
}

.itp-edit-table th {
    vertical-align: top;
    white-space: normal;
}

.itp-edit-table td {
    vertical-align: top;
}

.itp-edit-table textarea,
.itp-edit-table input,
.itp-edit-table select {
    width: 100%;
    min-width: 120px;
    box-sizing: border-box;
    font: inherit;
}

.itp-edit-table textarea {
    resize: vertical;
    min-height: 52px;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    font-weight: 700;
    color: #14314a;
}

.inline-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.rfq-line-table {
    min-width: 980px;
    table-layout: fixed;
}

.rfq-line-table th:nth-child(1),
.rfq-line-table td:nth-child(1) {
    width: 150px;
}

.rfq-line-table th:nth-child(2),
.rfq-line-table td:nth-child(2) {
    width: 180px;
}

.rfq-line-table th:nth-child(4),
.rfq-line-table td:nth-child(4),
.rfq-line-table th:nth-child(5),
.rfq-line-table td:nth-child(5) {
    width: 140px;
}

.rfq-line-table th:nth-child(6),
.rfq-line-table td:nth-child(6) {
    width: 92px;
}

.rfq-line-table input,
.rfq-line-table select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.rfq-detail-table {
    table-layout: fixed;
}

.rfq-detail-table th:nth-child(1),
.rfq-detail-table td:nth-child(1) {
    width: 170px;
}

.rfq-detail-table th:nth-child(2),
.rfq-detail-table td:nth-child(2) {
    width: 190px;
}

.rfq-detail-table th:nth-child(4),
.rfq-detail-table td:nth-child(4),
.rfq-detail-table th:nth-child(5),
.rfq-detail-table td:nth-child(5) {
    width: 120px;
}

.rfq-supplier-picker {
    display: grid;
    gap: 6px;
    max-height: 230px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #d7e4ef;
    border-radius: 8px;
    background: #f8fbfd;
}

.rfq-supplier-search {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.po-supplier-picker { position: relative; width: 100%; }
.po-supplier-search { width: 100%; box-sizing: border-box; }
.po-supplier-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #bfd2e2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(18, 47, 70, .16);
}
.po-supplier-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #102a43;
    text-align: left;
    cursor: pointer;
}
.po-supplier-option:hover, .po-supplier-option.is-active { background: #eaf3f8; }
.po-supplier-option[hidden] { display: none; }
.po-supplier-empty { margin: 0; padding: 12px; color: #657789; }

.rfq-supplier-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 6px;
    color: #10233a;
    font-weight: 700;
}

.rfq-supplier-option:hover {
    background: #eaf2f8;
}

.rfq-supplier-option input {
    width: 16px;
    height: 16px;
}

.metric-detail-lines {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(20, 49, 74, 0.12);
    font-size: 13px;
    color: #28465f;
}

/* Detailed BOM tracking: Swiss grid, fixed hierarchy columns. */
.bom-flow-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:18px; }
.bom-flow-step { position:relative; display:flex; flex-direction:column; gap:16px; min-height:220px; padding-top:58px; border-radius:0; box-shadow:none; }
.bom-step-no { position:absolute; top:18px; right:20px; color:#0b3aa4; font-size:30px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; }
.bom-flow-step h2 { margin:3px 0 10px; }
.bom-flow-step p { line-height:1.55; }
.bom-upload-form { display:grid; gap:10px; margin-top:auto; }
.bom-operation-strip { display:flex; flex-wrap:wrap; gap:8px; }
.bom-operation-strip span { display:inline-flex; align-items:center; gap:8px; padding:8px 11px; border:1px solid #cad8e4; background:#fff; }
.bom-operation-strip b { color:#0b3aa4; font-variant-numeric:tabular-nums; }
.bom-filter-bar { display:grid; grid-template-columns:minmax(280px,2fr) minmax(160px,.7fr) auto auto; align-items:end; gap:10px; margin:18px 0 12px; padding:14px; border:1px solid #cad8e4; background:#fff; }
.bom-filter-bar label { display:grid; gap:6px; }
.bom-filter-bar label span { color:#52677a; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.bom-filter-bar input,.bom-filter-bar select { width:100%; }
.bom-filter-bar a { padding:10px 4px; color:#0b3aa4; font-weight:700; }
.bom-matrix-shell { overflow:auto; max-height:calc(100vh - 290px); border:1px solid #bfcddd; background:#fff; }
.bom-matrix { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; font-size:12px; }
.bom-matrix th,.bom-matrix td { min-width:92px; padding:9px 10px; border-right:1px solid #dbe3eb; border-bottom:1px solid #dbe3eb; vertical-align:middle; background:#fff; }
.bom-matrix thead th { position:sticky; top:0; z-index:8; height:46px; background:#0b3aa4; color:#fff; text-align:left; }
.bom-matrix thead th b,.bom-matrix thead th span { display:block; }
.bom-matrix thead th span { margin-top:3px; font-size:10px; font-weight:500; white-space:normal; }
.bom-matrix .sticky-col { position:sticky; z-index:5; }
.bom-matrix .sticky-path { left:0; min-width:105px; max-width:105px; }
.bom-matrix .sticky-desc { left:125px; min-width:320px; max-width:320px; }
.bom-matrix thead .sticky-col { z-index:12; background:#082d82; }
.bom-matrix tbody tr:hover td { background:#f4f7fb; }
.bom-matrix tbody tr:hover .sticky-col { background:#eef3fb; }
.bom-tree-label { display:flex; align-items:flex-start; gap:9px; padding-left:calc(var(--bom-depth) * 18px); }
.bom-tree-mark { flex:0 0 9px; width:9px; height:9px; margin-top:4px; border:2px solid #0b3aa4; background:#fff; }
.bom-tree-label strong,.bom-tree-label small { display:block; }
.bom-tree-label small { margin-top:3px; color:#607286; line-height:1.35; white-space:normal; }
.bom-progress-cell { text-align:center; }
.bom-progress-cell select { min-width:76px; border:0; background:transparent; color:#0b3aa4; font-weight:800; text-align:center; }
.bom-progress-cell.is-na { background:#f0f2f4; }
.bom-progress-cell.is-na select { color:#7b8794; }
.bom-row-total { color:#0b3aa4; font-size:13px; font-weight:800; font-variant-numeric:tabular-nums; }
@media (max-width:1100px) { .bom-flow-grid { grid-template-columns:1fr; } .bom-filter-bar { grid-template-columns:1fr 1fr; } }

.metric-detail-lines div {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.metric-detail-lines strong {
    color: #071d34;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.planning-tech-cell {
    min-width: 190px;
    max-width: 230px;
}

.planning-order-brief {
    display: grid;
    gap: 3px;
    padding: 6px 0;
    border-bottom: 1px solid #e4edf5;
}

.planning-order-brief:last-child {
    border-bottom: 0;
}

.planning-order-brief span {
    color: #63788f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.planning-order-brief strong {
    color: #10233a;
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
}

.customer-order-tech-panel {
    margin-top: 16px;
}

.budget-detail-table {
    table-layout: fixed;
    width: 100%;
}

.budget-detail-table .budget-cost-type-col {
    width: 18%;
}

.budget-detail-table .budget-cost-desc-col {
    width: 28%;
}

.budget-detail-table .budget-money-col {
    width: 16%;
}

.budget-detail-table .budget-qty-col {
    width: 10%;
}

.budget-detail-table .budget-unit-col {
    width: 12%;
}

.budget-detail-table th.offer-num,
.budget-detail-table td.offer-num {
    text-align: right;
}

.budget-detail-table th:nth-child(5),
.budget-detail-table td:nth-child(5) {
    text-align: left;
}

.customer-order-tech-summary {
    margin-top: 12px;
}

.technical-note-box {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbe7f1;
    border-left: 4px solid #155b75;
    border-radius: 8px;
    background: #f7fbfe;
    color: #14314a;
}

.technical-note-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.technical-note-box p {
    margin: 0;
    line-height: 1.45;
}

.customer-order-tech-table {
    margin-top: 14px;
    overflow-x: auto;
}

.customer-order-tech-table table {
    min-width: 920px;
}

.customer-order-item-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.customer-order-item-card {
    display: grid;
    grid-template-columns: minmax(320px, 1.5fr) minmax(520px, 2fr);
    gap: 18px;
    align-items: stretch;
    padding: 14px 16px;
    border: 1px solid #dfeaf3;
    border-radius: 14px;
    background: #fff;
}

.customer-order-item-main,
.customer-order-item-meta > div {
    min-width: 0;
}

.customer-order-item-label,
.customer-order-item-meta span {
    display: block;
    margin-bottom: 5px;
    color: #567086;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.customer-order-item-main strong,
.customer-order-item-meta strong {
    color: #10233a;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.customer-order-item-main p {
    margin: 5px 0 0;
    color: #49677f;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.customer-order-item-meta {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(100px, .8fr) minmax(120px, .9fr) minmax(180px, 1.2fr);
    gap: 12px;
}

.customer-order-item-meta > div {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7fbfe;
    border: 1px solid #edf3f8;
}

.customer-order-item-meta small {
    display: block;
    margin-top: 4px;
    color: #66788a;
}

@media (max-width: 1180px) {
    .customer-order-item-card {
        grid-template-columns: 1fr;
    }

    .customer-order-item-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .customer-order-item-meta {
        grid-template-columns: 1fr;
    }
}

.daily-report-shell {
    display: grid;
    gap: 18px;
}

.daily-report-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid var(--reports-line, #DADDE3);
    background: #fff;
}

.daily-report-hero h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: 0;
}

.daily-report-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.daily-report-date-form {
    display: grid;
    grid-template-columns: 150px auto;
    gap: 6px 10px;
    align-items: end;
}

.daily-report-date-form label,
.daily-report-note-grid label,
.daily-report-upload-row label {
    display: grid;
    gap: 7px;
    color: #263D56;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.daily-report-date-form label {
    grid-column: 1 / -1;
}

.daily-report-date-form input,
.daily-report-upload-row input,
.daily-report-upload-row select,
.daily-report-notes textarea {
    width: 100%;
    border: 1px solid #D7E3EF;
    background: #F8FBFD;
    color: #001B38;
    font: inherit;
}

.daily-report-date-form input,
.daily-report-upload-row input,
.daily-report-upload-row select {
    min-height: 42px;
    padding: 8px 10px;
}

.daily-report-summary {
    display: grid;
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    gap: 10px;
}

.daily-report-summary .metric-card {
    min-height: 82px;
    padding: 14px;
    border-radius: 8px;
}

.daily-report-summary .metric-card span {
    display: block;
    color: #52657A;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.daily-report-summary .metric-card strong {
    display: block;
    margin-top: 6px;
    font-size: 25px;
    line-height: 1.1;
}

.daily-report-board {
    margin: 0;
}

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

.daily-report-notes textarea {
    min-height: 112px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.daily-report-upload-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr 1.2fr 1.2fr;
    gap: 12px;
    margin-top: 14px;
    align-items: end;
}

.daily-workorder-list {
    display: grid;
    gap: 14px;
}

.daily-workorder-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #D7E3EF;
    border-radius: 8px;
    background: #fff;
}

.daily-workorder-card header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #E6EDF5;
}

.daily-workorder-card h3,
.daily-workorder-card p {
    margin: 0;
}

.daily-workorder-card h3 {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.2;
}

.daily-project {
    color: var(--reports-blue, #002FA7);
    font-weight: 900;
}

.daily-progress {
    min-width: 118px;
    padding: 10px 12px;
    border: 1px solid #BFD5E8;
    background: #F5FAFE;
    text-align: right;
}

.daily-progress strong,
.daily-progress span,
.daily-workorder-metrics span,
.daily-workorder-metrics strong,
.daily-photo-card span,
.daily-photo-card strong {
    display: block;
}

.daily-progress strong {
    font-size: 24px;
}

.daily-progress span,
.daily-workorder-card header span,
.daily-workorder-metrics span,
.muted {
    color: #5B6E82;
}

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

.daily-workorder-metrics div {
    padding: 10px 12px;
    border: 1px solid #E0E8F1;
    background: #F8FBFD;
}

.daily-workorder-metrics strong {
    margin-top: 4px;
    font-size: 18px;
}

.daily-report-columns {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 14px;
}

.daily-report-columns h4 {
    margin: 0 0 8px;
    font-size: 14px;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
}

.mini-table td {
    padding: 7px 0;
    border-bottom: 1px solid #EDF2F7;
    vertical-align: top;
}

.mini-table .num {
    text-align: right;
    font-weight: 800;
}

.signal-line {
    margin: 0 0 7px;
    padding: 8px 10px;
    border-left: 3px solid #8DA7C0;
    background: #F7FAFC;
    color: #15324F;
}

.signal-line.is-positive {
    border-left-color: #219653;
    background: #F1FAF5;
}

.signal-line.is-warning {
    border-left-color: #D69E2E;
    background: #FFF8E8;
}

.daily-report-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.daily-photo-grid,
.daily-photo-strip {
    display: grid;
    gap: 10px;
}

.daily-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.daily-photo-strip {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.daily-photo-card,
.daily-photo-strip a {
    display: grid;
    gap: 7px;
    color: #132C45;
    text-decoration: none;
}

.daily-photo-card img,
.daily-photo-strip img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #D7E3EF;
    background: #EEF4F8;
}

.daily-photo-card span {
    color: #5B6E82;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .daily-report-summary {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
    .daily-report-note-grid,
    .daily-report-upload-row,
    .daily-report-columns,
    .daily-report-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .daily-report-hero,
    .daily-workorder-card header {
        align-items: stretch;
        flex-direction: column;
    }
    .daily-report-summary,
    .daily-workorder-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .daily-report-date-form {
        grid-template-columns: 1fr;
    }
}
