/* Extracted from app.css — dark theme overrides. */
 /* Dark theme: rgba grey borders vanish on navy — use light edges + lifted field wells. */
    html[data-theme="dark"] #deal-form-modal #form,
    html[data-theme="dark"] .nf-actions-sticky {
        background: var(--tg-theme-secondary-bg-color, #2b3949);
    }
    html[data-theme="dark"] #deal-form-modal #form {
        border: 1px solid rgba(255,255,255,.14);
        box-shadow: 0 4px 18px rgba(0,0,0,.38);
    }
    html[data-theme="dark"] .nf-actions-sticky {
        border-top-color: rgba(255,255,255,.12);
    }
    html[data-theme="dark"] .frow > label { opacity: .92; }
    html[data-theme="dark"] .frow > input,
    html[data-theme="dark"] .frow > select,
    html[data-theme="dark"] .frow > textarea,
    html[data-theme="dark"] .ecosystem-grow-field,
    html[data-theme="dark"] .ecosystem-field-row > :is(input, select, textarea),
    .overlay[data-theme="dark"] .ecosystem-grow-field,
    .overlay[data-theme="dark"] .ecosystem-field-row > :is(input, select, textarea) {
        background: rgba(0,0,0,.22);
        border: 1px solid rgba(255,255,255,.22);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
        color: var(--tg-theme-text-color, #f5f5f5);
    }
    html[data-theme="dark"] .frow > input:focus,
    html[data-theme="dark"] .frow > select:focus,
    html[data-theme="dark"] .frow > textarea:focus,
    html[data-theme="dark"] .ecosystem-grow-field:focus,
    html[data-theme="dark"] .ecosystem-field-row > :is(input, select, textarea):focus,
    .overlay[data-theme="dark"] .ecosystem-grow-field:focus,
    .overlay[data-theme="dark"] .ecosystem-field-row > :is(input, select, textarea):focus {
        border-color: var(--tg-theme-link-color, #62a0db);
        box-shadow: 0 0 0 2px rgba(98,160,219,.28);
        outline: none;
    }
 /* .nf-section dark surface — see dedicated block below (with deal-form panel). */
    html[data-theme="dark"] #filters select,
    html[data-theme="dark"] #filters input {
        background: rgba(0,0,0,.18);
        border-color: rgba(255,255,255,.20);
    }
    html[data-theme="dark"] .rk:not(.active) {
        background: rgba(255,255,255,.07);
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
    }
    html[data-theme="dark"] .rk.active { box-shadow: none; }
 /* #nf-cancel dark tone lives with .rk.ecosystem-secondary in ecosystem.css */
    html[data-theme="dark"] .fin,
    html[data-theme="dark"] .fin.tight.lead { color: var(--tg-theme-hint-color, #8fa3b5); opacity: 1; }
    html[data-theme="dark"] .overlay,
    .overlay[data-theme="dark"] {
        background: rgba(0, 0, 0, 0.62);
    }
    html[data-theme="dark"] .modal,
    .overlay[data-theme="dark"] .modal {
        background: var(--tg-theme-bg-color, #17212b);
        color: var(--tg-theme-text-color, #f5f5f5);
        border-color: rgba(255,255,255,.12);
        box-shadow: 0 16px 48px rgba(0,0,0,.55);
    }
 /* Opaque head — transparent color-mix + blur bled light surfaces on open. */
    html[data-theme="dark"] .modal-head,
    .overlay[data-theme="dark"] .modal-head {
        background: var(--tg-theme-bg-color, #17212b);
        border-bottom-color: rgba(255,255,255,.10);
        color: var(--tg-theme-text-color, #f5f5f5);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    html[data-theme="dark"] .dcard,
    html[data-theme="dark"] .rcard,
    html[data-theme="dark"] .dash-sec,
    html[data-theme="dark"] #settings-bar .collap,
    html[data-theme="dark"] #platform-bar .collap {
        border-color: rgba(255,255,255,.12);
    }

