/* KTG DARK — LEGACY / SPECIALIZED WORKSPACES
 * Dark compatibility for custom CSS workspaces that predate the global theme.
 */

/* --------------------------------------------------------------------------
   Client contract summary / billing basis
   -------------------------------------------------------------------------- */
html.dark body .client-contract-summary-grid .client-contract-basis-card {
    border-color: #315071 !important;
    background: linear-gradient(180deg, #15263b 0%, #111e30 100%) !important;
}
html.dark body .client-contract-summary-grid .client-contract-basis-primary {
    color: #9ec8ff !important;
}
html.dark body .client-contract-summary-grid .client-contract-basis-secondary {
    color: #91a5bc !important;
}

html.dark body .contract-basis-edit-button {
    border-color: #354b65 !important;
    background: #142338 !important;
    color: #cfe3fb !important;
    box-shadow: none !important;
}
html.dark body .contract-basis-edit-button:hover {
    border-color: #527092 !important;
    background: #1a2d46 !important;
}
html.dark body .contract-basis-dialog {
    background: #101c2d !important;
    color: #dbe5f0 !important;
}
html.dark body .contract-basis-head {
    border-color: #2b3e56 !important;
    background: #111f32 !important;
}
html.dark body .contract-basis-head h2,
html.dark body .contract-basis-card strong {
    color: #f1f5f9 !important;
}
html.dark body .contract-basis-head p:not(.contract-basis-eyebrow),
html.dark body .contract-basis-current span,
html.dark body .contract-basis-card p {
    color: #9fb0c5 !important;
}
html.dark body .contract-basis-close {
    background: #1a2a40 !important;
    color: #b8c7d9 !important;
}
html.dark body .contract-basis-current {
    border-color: #315071 !important;
    background: #14263c !important;
}
html.dark body .contract-basis-current strong {
    color: #cfe3fb !important;
}
html.dark body .contract-basis-card {
    border-color: #31455f !important;
    background: #121f32 !important;
}
html.dark body .contract-basis-option input:checked + .contract-basis-card {
    border-color: #5f94cf !important;
    background: #172c46 !important;
    box-shadow: 0 0 0 3px rgba(95, 148, 207, .12) !important;
}
html.dark body .contract-basis-radio { border-color: #62768f !important; }
html.dark body .contract-basis-warning {
    border-color: rgba(245, 158, 11, .34) !important;
    background: rgba(217, 119, 6, .13) !important;
    color: #f7c870 !important;
}
html.dark body .contract-basis-foot {
    border-color: #2b3e56 !important;
    background: #0f1b2b !important;
}
html.dark body .contract-basis-cancel {
    border-color: #354b65 !important;
    background: #142338 !important;
    color: #d6e0eb !important;
}
html.dark body .contract-basis-save {
    background: #315d91 !important;
    color: #fff !important;
}

/* --------------------------------------------------------------------------
   IPC Quantity Workspace
   -------------------------------------------------------------------------- */
html.dark body #add-ab-claim-line.ipc-qw-dialog {
    background: #0e1929 !important;
    border: 1px solid #2d415a !important;
    color: #dce6f2 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-scroll {
    scrollbar-color: #45617f #0d1828 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-scroll::-webkit-scrollbar-track {
    background: #0d1828 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-scroll::-webkit-scrollbar-thumb {
    border-color: #0d1828 !important;
    background: #45617f !important;
}
html.dark body #add-ab-claim-line .ipc-qw-table thead th:first-child {
    background: #18283d !important;
    box-shadow: 1px 0 0 #30445d, 12px 0 18px -20px #000 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-table tr[data-ipc-item] td:first-child {
    background: #101c2d !important;
    box-shadow: 1px 0 0 #30445d, 12px 0 18px -20px #000 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-table tr[data-ipc-item]:hover td:first-child,
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-active,
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-active td:first-child {
    background: #172a41 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-invalid,
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-invalid td:first-child {
    background: #291923 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-complete,
html.dark body #add-ab-claim-line .ipc-qw-table tr.ipc-qw-row-complete td:first-child {
    background: #10271f !important;
}
html.dark body #add-ab-claim-line .ipc-qw-max-btn,
html.dark body #add-ab-claim-line .ipc-qw-tool-btn,
html.dark body #add-ab-claim-line .ipc-qw-filter-select,
html.dark body #add-ab-claim-line .ipc-qw-group-toggle {
    border-color: #354b65 !important;
    background: #132238 !important;
    color: #d7e7fa !important;
}
html.dark body #add-ab-claim-line .ipc-qw-max-btn:hover,
html.dark body #add-ab-claim-line .ipc-qw-tool-btn:hover,
html.dark body #add-ab-claim-line .ipc-qw-group-toggle:hover {
    border-color: #527092 !important;
    background: #1a2d46 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-unsaved {
    background: rgba(217,119,6,.16) !important;
    color: #f7c56d !important;
}
html.dark body #add-ab-claim-line .ipc-qw-paste-panel {
    border-color: #354b65 !important;
    background: #101c2d !important;
    box-shadow: 0 24px 60px rgba(0,0,0,.38) !important;
}
html.dark body #add-ab-claim-line .ipc-qw-paste-panel textarea {
    border-color: #354b65 !important;
    background: #0d1828 !important;
    color: #eaf1f8 !important;
}
html.dark body #add-ab-claim-line .ipc-qw-key-hint { color: #91a4bb !important; }
html.dark body #add-ab-claim-line .ipc-qw-key-hint kbd {
    border-color: #3c526d !important;
    background: #16263b !important;
    color: #d8e3ef !important;
}

/* --------------------------------------------------------------------------
   VO create / variation modal
   -------------------------------------------------------------------------- */
html.dark body #create-vo {
    background: #101c2d !important;
    border: 1px solid #2d415a !important;
    color: #dbe5f0 !important;
}
html.dark body #create-vo > form > div:first-of-type {
    background: #111f32 !important;
    border-color: #2b3e56 !important;
}
html.dark body #create-vo > form > div:nth-of-type(2) {
    scrollbar-color: #45617f transparent !important;
}
html.dark body #create-vo > form > div:nth-of-type(2)::-webkit-scrollbar-thumb {
    background: #45617f !important;
    border-color: #101c2d !important;
}
html.dark body #create-vo > form > div:last-of-type {
    background: rgba(14, 25, 41, .98) !important;
    border-color: #2b3e56 !important;
    box-shadow: 0 -8px 24px rgba(0,0,0,.16) !important;
}
html.dark body #create-vo .vo-field-help,
html.dark body #create-vo .vo-money-preview,
html.dark body #create-vo .vo-summary-kicker,
html.dark body #create-vo .vo-summary-variance {
    color: #91a4bb !important;
}
html.dark body #create-vo .vo-money-unit {
    background: #1a2b41 !important;
    color: #aebed1 !important;
}
html.dark body #create-vo .vo-copy-money { color: #8fc3ff !important; }
html.dark body #create-vo .vo-value-summary {
    border-color: #30455f !important;
    background: linear-gradient(180deg, #15243a 0%, #111e30 100%) !important;
}
html.dark body #create-vo .vo-summary-increase { color: #5ee0ae !important; }
html.dark body #create-vo .vo-summary-decrease { color: #ff8e99 !important; }
html.dark body #create-vo .vo-approval-summary,
html.dark body #create-vo .vo-effect-badge {
    background: rgba(5,150,105,.14) !important;
    color: #65ddb0 !important;
}
html.dark body #create-vo .vo-approval-summary[data-effect="decrease"],
html.dark body #create-vo .vo-effect-badge[data-effect="decrease"] {
    background: rgba(190,30,45,.14) !important;
    color: #ff8e99 !important;
}

/* Generic VO custom panels: raise contrast without changing layout. */
html.dark body [class^="vo-"][class*="summary"],
html.dark body [class*=" vo-"][class*="summary"] {
    border-color: #30455f;
}
