/* theme.css — Dark mode overrides & colour-scheme tokens
   Duplicates removed: generic .qe-ab-btn--primary (superseded by #qe-lib-action-bar),
   redundant .macos-titlebar box-shadow (already in compound rule)
   ---------------------------------------------------------------- */
html.dark .nav-bottom-note { color: rgba(255,255,255,.40); }
 html.dark .qe-lib-search-icon, html.dark .qe-lib-bar .qe-lib-search-icon, html.dark .qe-lib-bar.search-open .qe-lib-search-icon { color: rgba(255,255,255,0.45) !important; }
/* dark mode */ html.dark .qe-bracket-btn, html.dark .qe-syntax-hl-btn, html.dark .qe-tpl-expand-btn { border-color: transparent; color: var(--txt3); background: transparent; }
html.dark .qe-bracket-btn:hover, html.dark .qe-syntax-hl-btn:hover, html.dark .qe-tpl-expand-btn:hover { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: var(--txt2); }
html.dark .qe-bracket-btn.active, html.dark .qe-syntax-hl-btn.active, html.dark .qe-tpl-expand-btn.active { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.11); color: var(--txt); }
html.dark .qe-parse-status .dot { background:rgba(255,255,255,.30); }
html.dark .qe-parse-status.found .dot { background:#6BCA6B; box-shadow:0 0 6px rgba(107,202,107,.4); }
html.dark .sh-bracket { color: #89C4FF; }
html.dark .sh-dm-sq { color: #89C4FF; }
html.dark .sh-dm-cu { color: inherit; }
html.dark .sh-dm-an { color: inherit; }
html.dark .sh-dm-ro { color: inherit; }
html.dark .sh-sep { color: #F5BC5A; }
html.dark .sh-note-txt { color: #E0A870; }
html.dark .qe-link-lib-btn.has-pinned { background: rgba(255,255,255,.12); border-color: transparent; color: var(--txt); }
html.dark .qe-link-lib-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
html.dark .qe-link-lib-item:hover { background: rgba(100,160,255,.08); border-color: rgba(100,160,255,.25); }
html.dark .qe-link-lib-item.pinned { background: rgba(100,160,255,.10); border-color: rgba(100,160,255,.30); }
html.dark .qe-link-lib-item-pin-btn:hover, html.dark .qe-link-lib-item.pinned .qe-link-lib-item-pin-btn { background: rgba(100,160,255,.15); border-color: rgba(100,160,255,.35); color: #89C4FF; }
html.dark .qe-link-lib-item-count-badge { background: rgba(100,160,255,.15); color: #89C4FF; }
html.dark .qe-bp-bracket { color: #7BBEFF; }
html.dark .qe-bp-bracket-empty { color: rgba(123,190,255,.50); }
/* dark mode unified */ html.dark .qe-btn-ghost, html.dark .qe-lib-inline-btn, html.dark .qe-save-tpl-btn { border-color: transparent; color: var(--txt3); }
html.dark .qe-btn-ghost:hover, html.dark .qe-lib-inline-btn:hover, html.dark .qe-save-tpl-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: var(--txt); }
html.dark .qe-lib-inline-count { color: rgba(255,255,255,.45); }
html.dark .qe-lib-inline-pakai, html.dark .qe-lib-inline-detail, html.dark .qe-lib-inline-edit, html.dark .qe-lib-inline-fav, html.dark .qe-lib-inline-dupe, html.dark .qe-lib-inline-move, html.dark .qe-lib-inline-del { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); color: rgba(255,255,255,.70); }
html.dark .qe-lib-inline-pakai { background: rgba(255,255,255,.92); color: #1C1C1E; border-color: transparent; }
html.dark .qe-lib-inline-pakai:hover { opacity: .88; }
html.dark .qe-lib-inline-detail:hover, html.dark .qe-lib-inline-edit:hover, html.dark .qe-lib-inline-dupe:hover, html.dark .qe-lib-inline-move:hover { background: rgba(255,255,255,.12); color: rgba(255,255,255,.92); border-color: rgba(255,255,255,.18); }
html.dark .qe-lib-inline-fav.pinned { color: #F5A623; }
html.dark .qe-lib-inline-fav:hover { background: rgba(245,166,35,.15); color: #F5A623; }
html.dark .qe-lib-inline-del:hover { background: rgba(255,59,48,.12); color: #ff6b6b; border-color: rgba(255,59,48,.25); }
html.dark .qe-em3-btn-save { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; border: none !important; box-shadow: none !important; }
html.dark .qe-em3-btn-save:hover { background: rgba(235,235,245,.96) !important; box-shadow: none !important; }
html.dark #nav-lib-folders > .nav-lib-folder > .nav-lib-items > div > .nav-lib-tree-wrap { background-image: linear-gradient(to bottom, rgba(255,255,255,.22) 100%, transparent 100%) !important; }
html.dark #nav-lib-folders::before { background: rgba(255,255,255,.18) !important; }
html.dark #nav-lib-folders > .nav-lib-folder > .nav-lib-items > div > .nav-lib-tree-wrap > .nav-lib-folder > .nav-lib-items > div > .nav-lib-tree-wrap { background-image: linear-gradient(to bottom, rgba(255,255,255,.22) 100%, transparent 100%) !important; }
html.dark .aff2-card { background: #1C1C1E; border-color: rgba(255,255,255,.08); }
html.dark .aff2-card::before { background: rgba(255,255,255,.15); }
html.dark .aff2-headline .aff2-green { color: #F2F2F7; text-decoration-color: rgba(255,255,255,.28); }
html.dark .aff2-stat { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
html.dark .aff2-stat:hover { border-color: rgba(255,255,255,.16); }
html.dark .aff2-stat-val.green { color: #F2F2F7; }
html.dark .aff2-flow-step { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.07); }
html.dark .aff2-flow-label { color: rgba(255,255,255,.65); }
html.dark .aff2-via-pill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); color: rgba(255,255,255,.7); }
 html.dark #qe-step1-card, html.dark .qe-card { background: #252528 !important; border-color: rgba(255,255,255,.10) !important; }
html.dark #qe-template { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.28) !important; }
html.dark #qe-template:focus { border-color: rgba(255,255,255,.24) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.04) !important; outline: none !important; }
/* ── Step 2: Fields card ── */ html.dark #qe-step2 { background: #252528 !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-field-card { background: #252528 !important; border-color: rgba(255,255,255,.09) !important }
html.dark .qe-field-input, html.dark .qe-field-textarea, html.dark .qe-dropdown-text-input, html.dark .qe-dropdown-select, html.dark .qe-dd-input, html.dark .qe-color-hex, html.dark .qe-date-native { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; box-shadow: inset 0 1px 3px rgba(
html.dark .qe-dd-chevron { color: rgba(255,255,255,.35) !important; }0,0,0,.28) !important; }
html.dark .qe-field-input:focus, html.dark .qe-field-textarea:focus, html.dark .qe-dropdown-text-input:focus, html.dark .qe-dropdown-select:focus { background: #1A1A1C !important; border-color: rgba(255,255,255,.24) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.04) !important; outline: none !important; }
html.dark .qe-field-input::placeholder, html.dark .qe-field-textarea::placeholder, html.dark .qe-dropdown-text-input::placeholder { color: rgba(255,255,255,.20) !important; }
html.dark .qe-field-input.qe-field-empty-highlight { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important }
html.dark .qe-result-wrap, html.dark .qe-result-text, html.dark #qe-output { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; box-shadow: inset 0 1px 3px rgba(0,0,0,.28) !important; }
html.dark .lic-header-icon { background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.07)) !important; border-color: rgba(255,255,255,.14) !important; box-shadow: 0 2px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.10) !important; }
html.dark ::selection { background: rgba(255,255,255,.22); color: var(--txt); }
html.dark { color-scheme: dark; --bg: #1A1A1C; --bg2: #2C2C2E; --bg3: #222224; --bg4: #3A3A3C; --bg5: #48484A; --txt: #F2F2F7; --txt2: #EBEBF5; --txt3: #8E8E93; --txt4: #AEAEB2; --border: rgba(255,255,255,.08); --border2: rgba(255,255,255,.12); --border3: rgba(255,255,255,.18); --ui-muted: #48484A; --shadow-modal: 0 4px 32px rgba(0,0,0,.48), 0 1px 8px rgba(0,0,0,.32); --danger-bg: #2C1C1C; --link: #5E9CF5; }
html.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18) !important }
html.dark #tb-darkmode-btn .icon-moon { display: none; }
html.dark #tb-darkmode-btn .icon-sun { display: block !important; }
html.dark .qe-lib-modal { background: #1C1C1E !important; box-shadow: 0 24px 80px rgba(0,0,0,.5) }
html.dark .fw-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09) }
html.dark body { background: var(--bg); color: var(--txt); }
html.dark input, html.dark textarea, html.dark select { background: var(--bg4); color: var(--txt); border-color: var(--border2); }
html.dark input::placeholder, html.dark textarea::placeholder { color: var(--txt3) !important }
html.dark .tb-search-dd { background: #2C2C2E; border-color: rgba(255,255,255,.10); box-shadow: 0 8px 32px rgba(0,0,0,.4) }
html.dark code { background: var(--bg4); color: var(--txt2); }
html.dark .qe-cine-overlay { background: rgba(0,0,0,.72); }
html.dark .tb-search-wrap, html.dark #tb-search-wrap { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.10); }
html.dark #tb-search-input { background: transparent; color: var(--txt); }
html.dark .left-nav { background: #222224; border-right-color: rgba(255,255,255,.08); }
html.dark .nav-item:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important; }
html.dark .nav-item.active { background: rgba(255,255,255,.13) !important; border-color: rgba(255,255,255,.16) !important; }
html.dark .nav-section-label { color: rgba(255,255,255,.32) !important }
html.dark #nav-lib-open-btn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt3) !important }
html.dark #nav-lib-open-btn:hover { background: rgba(255,255,255,.13) !important; border-color: rgba(255,255,255,.25) !important; color: var(--txt) !important }
html.dark .nav-profile { border-bottom-color: rgba(255,255,255,.06); }
html.dark .nav-avatar-ring { background: var(--bg4); }
html.dark .hv-icon-btn { border-color: rgba(255,255,255,.12) !important; color: var(--txt3) !important; }
html.dark .hv-icon-btn:hover { background: rgba(255,255,255,.07) !important; }
html.dark .right-panel { background: #222224; border-left-color: rgba(255,255,255,.08); }
html.dark .rp-divider { background: rgba(255,255,255,.07); }
html.dark .rp-collapsible-head { background: var(--bg2) !important; border-top-color: rgba(255,255,255,.07); border-bottom-color: rgba(255,255,255,.07); }
html.dark .rp-collapsible-head:hover { background: rgba(255,255,255,.05) !important; }
html.dark .rp-collapsible-head.open { background: var(--bg2) !important; border-bottom-color: rgba(255,255,255,.09); }
html.dark .rp-collapsible-head.open:hover { background: rgba(255,255,255,.07) !important; }
html.dark .rp-collapsible-head:not(.open) { background: var(--bg2) !important; border-top-color: rgba(255,255,255,.07); }
html.dark .rp-collapsible-body.open { background: transparent; border-bottom-color: rgba(255,255,255,.07); }
html.dark /* Icon badges inside the heads */ .rp-section-icon { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.11); }
html.dark .rp-collapsible-head:hover .rp-section-icon { background: rgba(255,255,255,.13); }
html.dark .rp-section-icon-badge { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: var(--txt3); }
html.dark /* Chevron button */ .rp-collapsible-head-chev { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.10); }
html.dark .rp-collapsible-head:hover .rp-collapsible-head-chev { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.16); }
html.dark .rp-collapsible-head.open .rp-collapsible-head-chev { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.18); }
html.dark .fw-card:hover { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
html.dark .fw-card.fw-card-open { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
html.dark .funnel-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
html.dark .funnel-card:hover { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
html.dark .funnel-card.funnel-card-open { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); }
html.dark .fw-badge { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important }
html.dark .funnel-badge { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important }
html.dark .fw-head:hover { background: rgba(255,255,255,.04); }
html.dark .qnote-wrap { background: #222224 !important; border-color: rgba(255,255,255,.09) }
html.dark .qnote-header { background: #2C2C2E !important }
html.dark .qnote-header:hover { background: #3A3A3C !important }
html.dark .qnote-textarea { background: transparent; color: var(--txt); }
html.dark .qnote-slide-dot { background: rgba(255,255,255,.18); }
html.dark .qnote-slide-dot.active { background: rgba(255,255,255,.7); }
html.dark .qnote-slide-dot.has-content { background: rgba(255,255,255,.32); }
html.dark .lp-hero { background: #222224 !important; }
html.dark .lp-hero-headline mark { background: rgba(255,255,255,.08) !important; color: var(--txt) !important }
html.dark .lp-stat-card, html.dark .beranda-stat-card { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .lp-section-line { background: rgba(255,255,255,.08); }
html.dark .lp-how-step { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important }
html.dark .lp-step-num { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: var(--txt3); }
html.dark .lp-contact-item { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .lp-contact-label { color: var(--txt3); }
html.dark .lp-contact-val { color: var(--txt2); }
html.dark .lp-bottom-cta-eyebrow { color: rgba(255,255,255,.35) !important; }
html.dark .lp-bottom-cta-title { color: var(--txt) !important; }
html.dark .lp-bottom-cta-sub { color: var(--txt3) !important; }
html.dark .lp-bottom-cta-btn { background: rgba(255,255,255,.12) !important; color: var(--txt) !important; border: 1px solid rgba(255,255,255,.18) !important }
html.dark .lp-bottom-cta-btn:hover { background: rgba(255,255,255,.18) !important }
html.dark .lp-cta-primary { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important }
html.dark .lp-cta-secondary { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important; }
html.dark .qe-lib-head { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important; box-shadow: none !important }
html.dark .qe-lib-head-icon { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; }

html.dark .qe-lib-manage-btn:hover { background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.20) !important; color: var(--txt) !important }
html.dark .qe-lib-close { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.10) !important }
html.dark .qe-lib-bar { background: #1C1C1E !important; border-bottom-color: rgba(255,255,255,.07) !important }
html.dark .qe-lib-search { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important }
html.dark .qe-lib-search:focus { border-color: rgba(100,160,255,.4) !important; box-shadow: 0 0 0 3px rgba(100,160,255,.10) !important; background: #2C2C2E !important }
html.dark .qe-lib-tags-row, html.dark .qe-lib-tagbar-row { background: #1C1C1E !important; border-bottom-color: rgba(255,255,255,.06) !important; }
html.dark .qe-lib-tag-chip { color: var(--txt3) !important; border-color: rgba(255,255,255,.10) !important; background: rgba(255,255,255,.04) !important; }
html.dark .qe-lib-tag-chip:hover { background: rgba(255,255,255,.07) !important; color: var(--txt) !important; border-color: rgba(255,255,255,.18) !important }
html.dark .qe-lib-tag-chip.active { background: var(--txt) !important; color: #1C1C1E !important; border-color: var(--txt) !important }
html.dark .qe-lib-tag-chip .qe-lib-tag-count { color: var(--txt3) !important; }

html.dark .qe-lib-folder-item { color: rgba(255,255,255,.60) !important }
html.dark .qe-lib-folder-item:hover { background: rgba(255,255,255,.07) !important; color: rgba(255,255,255,.88) !important }
html.dark .qe-lib-folder-item.active { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.14) !important; color: rgba(255,255,255,.95) !important; box-shadow: none !important }
html.dark .qe-lib-fi-count { background: rgba(255,255,255,.09) !important; color: rgba(255,255,255,.45) !important }
html.dark .qe-lib-add-folder-btn { border-color: rgba(255,255,255,.18) !important; color: var(--txt3) !important }
html.dark .qe-lib-add-folder-btn:hover { border-color: rgba(255,255,255,.30) !important; color: var(--txt2) !important; background: rgba(255,255,255,.04) !important }
html.dark .qe-lib-body { background: #1C1C1E !important }
html.dark .qe-lib-content-wrap { background: #1C1C1E !important; }
html.dark .qe-lib-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14) !important; }

html.dark .qe-finder-row { background: #1C1C1E !important; border-bottom-color: rgba(255,255,255,.055) !important }
html.dark .qe-finder-row:hover { background: #2C2C2E !important }
html.dark .qe-lib-storage-bar { background: #222224 !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-sidebar-wrap { background: #222224 !important; border-right-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-sb-storage { border-top-color: rgba(255,255,255,.06) !important; }
html.dark .qe-lib-sb-track { background: rgba(255,255,255,.08) !important; }
html.dark .qe-lib-sb-detail-toggle:hover { color: rgba(255,255,255,.55) !important; }
html.dark .qe-lib-sb-tool-panel { border-top-color: rgba(255,255,255,.06) !important; }
html.dark .qe-lib-sb-tool-body { border-top-color: rgba(255,255,255,.05) !important; }
html.dark .qe-lib-sb-tool-head:hover { background: rgba(255,255,255,.04) !important; }
html.dark .qe-lib-sb-tool-head--danger:hover { background: rgba(217,48,37,.08) !important; }
html.dark .qe-lib-sb-sweep-info { background: rgba(60,120,220,.08) !important; border-color: rgba(60,120,220,.15) !important; }
html.dark .qe-lib-sb-scan-btn { border-color: rgba(255,255,255,.10) !important; color: rgba(255,255,255,.38) !important; }
html.dark .qe-lib-sb-scan-btn:hover { background: rgba(217,48,37,.10) !important; border-color: rgba(217,48,37,.30) !important; color: #ff6b6b !important; }
html.dark .qe-lib-sb-danger-btn { background: rgba(217,48,37,.06) !important; border-color: rgba(217,48,37,.20) !important; color: #ff6b6b !important; }
html.dark .qe-lib-sb-danger-btn:hover { background: rgba(217,48,37,.14) !important; border-color: rgba(217,48,37,.35) !important; }
html.dark .qe-lib-footer-tools { background: #1C1C1E !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lft-panel { border-bottom-color: rgba(255,255,255,.06) !important; }
html.dark .qe-lib-del-sel-btn { border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important }
html.dark .qe-lib-del-sel-btn:hover { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important }
html.dark .qe-lib-del-sel-btn.qe-lib-add-tpl-btn { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; border-color: transparent !important }
html.dark .qe-lib-del-sel-btn.danger { color: #ff6b6b !important; border-color: rgba(255,80,60,.25) !important; }
html.dark #qe-lib-storage-detail { background: rgba(30,30,32,0.97) !important; border-top-color: rgba(255,255,255,.08) !important; }
html.dark[class*="-overlay"]:not(#rp-drawer-overlay):not(#nav-overlay):not(#fullview-overlay):not(#qe-edit-tpl-overlay):not(#qe-lib-overlay):not(.qe-lib-overlay):not(#qe-save-tpl-overlay):not(.qe-save-tpl-overlay):not(#qe-detail-modal-overlay):not(#qe-preview-modal-overlay):not(#qe-lib-meta-modal):not(#qe-recycle-overlay):not(#qe-mp-overlay):not(#nav-profile-edit-overlay):not(#nav-factory-reset-overlay):not(#ai-manage-overlay):not(#qe-custom-input-overlay):not(#ctr-abd-overlay) { background: rgba(0,0,0,.40) !important; }
html.dark .qe-area { background: #1A1A1C; border-color: rgba(255,255,255,.10); }
html.dark #qe-output { background: #1A1A1C !important; color: var(--txt); }
html.dark .qe-tag-chip { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: var(--txt2); }
html.dark .qe-tag-chip.active { background: var(--txt); color: var(--bg); }
html.dark input:not([type="checkbox"]):not([type="radio"]), html.dark textarea, html.dark select { background: #1A1A1C !important; color: var(--txt) !important; border-color: rgba(255,255,255,.10) !important; }
html.dark input:focus, html.dark textarea:focus { border-color: rgba(255,255,255,.24) !important; }
html.dark .qe-breadcrumb-bar { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important }
html.dark .qe-breadcrumb-back { background: #3A3A3C !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important }
html.dark .qe-breadcrumb-back:hover { background: #48484A !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important }
html.dark .qe-move-checkbox { border-color: rgba(255,255,255,.30) !important; background: transparent !important }
html.dark .qe-move-checkbox.checked { background: var(--txt) !important; border-color: var(--txt) !important }
html.dark .qe-move-checkbox.checked::after { color: #1C1C1E !important }
html.dark .qe-move-mode-btn { color: rgba(255,255,255,.55) !important; border-color: rgba(255,255,255,.18) !important }
html.dark .qe-move-mode-btn:hover { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.28) !important; color: rgba(255,255,255,.85) !important }
html.dark .qe-move-row-selected > .qe-finder-row { background: rgba(255,255,255,.06) !important }
html.dark .ctr-gi { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
html.dark .ctr-gi-wrap:hover .ctr-gi { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
html.dark .ctr-gi-wrap:has(.ctr-gi-desc.open) .ctr-gi { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); border-width: 1.5px; border-bottom-width: 0.5px; border-bottom-color: rgba(255,255,255,.08); background: rgba(255,255,255,.06); }
html.dark .ctr-gi-dot { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); }
html.dark .ctr-gi-dot.done { background: #28C840; border-color: #28C840; }
html.dark .ctr-gi-desc { background: rgba(0,0,0,.20); border-color: rgba(255,255,255,.18); border-top-color: rgba(255,255,255,.07); border-width: 1.5px; border-top-width: 0.5px; }
html.dark .ctr-gi-sub code { background: rgba(255,255,255,.08); color: var(--txt2); }
html.dark .ctr-gi-desc-inner code { background: rgba(255,255,255,.08); color: var(--txt2); }
html.dark [id*="profile"][id*="modal"], html.dark [id*="modal-profile"] { background: #2C2C2E; border-color: rgba(255,255,255,.10); }
html.dark .qe-toast { background: #3A3A3C; color: var(--txt); border-color: rgba(255,255,255,.10); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
html.dark .tb-search-item:hover, html.dark .tb-search-item.active { background: rgba(255,255,255,.07) !important }
html.dark .tb-search-wrap .tb-search-kbd, html.dark [class*="tb-search-kbd"] { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt3) !important; }
html.dark .funnel-card-open .funnel-head { background: rgba(255,255,255,.06) !important; border-bottom-color: rgba(255,255,255,.08) !important }
html.dark .funnel-body { background: #252527 !important }
html.dark .funnel-inner { border-top-color: rgba(255,255,255,.07) !important; }
html.dark .fw-card-open .fw-head { background: rgba(255,255,255,.06) !important; border-bottom-color: rgba(255,255,255,.08) !important }
html.dark .fw-body { background: #252527 !important }
html.dark .fw-inner { border-top-color: rgba(255,255,255,.07) !important; background: #252527 !important }
html.dark .fw-example { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.08) !important; color: var(--txt2) !important }
html.dark .fw-tag { border-color: rgba(255,255,255,.10) !important; color: var(--txt3) !important }
html.dark .qe-ab-btn:hover { background: #3A3A3C !important; border-color: rgba(255,255,255,.20) !important; color: var(--txt) !important; box-shadow: none !important }
html.dark #qe-mp-overlay > div { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark #qe-mp-overlay button[onclick*="qeMpDeactivate"] { background: #3A3A3C !important; border-color: rgba(255,255,255,.18) !important; color: var(--txt2) !important; }
html.dark #qe-mp-overlay button[onclick*="qeMpDeactivate"]:hover { background: #48484A !important; color: var(--txt) !important; }
html.dark #qe-mp-search { background: #3A3A3C !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt) !important; }
html.dark #qe-mp-overlay > div > div:last-child { border-top-color: rgba(255,255,255,.08) !important; }
html.dark #qe-mp-active-bar { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark #qe-mp-inactive-bar { border-color: rgba(255,255,255,.35) !important; opacity: 1 !important; }
/* ── Quick Engine: Detail Modal ── */ html.dark .qe-detail-modal-box { background: #1C1C1E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-detail-modal-titlebar { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important; }
html.dark .qe-detail-modal-identity { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important; }
html.dark .qe-detail-modal-head, html.dark [class*="qe-detail-modal-head"] { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.08) !important; }
html.dark .qe-detail-modal-content { background: #1C1C1E !important; }
html.dark .qe-detail-modal-footer { background: #2C2C2E !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-detail-prompt-text { background: #2C2C2E !important; border-color: rgba(255,255,255,.09) !important; color: var(--txt) !important; }
html.dark .qe-detail-tpl-text { background: #2C2C2E !important; border-color: rgba(255,255,255,.09) !important; color: var(--txt) !important; }
html.dark .qe-detail-copy-btn, html.dark .qe-detail-edit-btn { background: var(--bg3) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important }
html.dark .qe-detail-copy-btn:hover, html.dark .qe-detail-edit-btn:hover { background: var(--bg4) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important }
html.dark .qe-dm-tool-btn { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt3) !important; }
html.dark .qe-dm-tool-btn:hover, html.dark .qe-dm-tool-btn.active { background: #48484A !important; border-color: rgba(255,255,255,.16) !important; color: var(--txt2) !important; }
html.dark #qe-edit-tpl-overlay .qe-em3-wrap, html.dark [id*="qe-edit"] .qe-em3-wrap, html.dark [id*="qe-save"] .qe-em3-wrap { background: #1C1C1E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-edit-modal-v3 { background: #1C1C1E !important; border-color: transparent !important; }
html.dark .qe-em3-col-left { background: #222224 !important; border-right-color: rgba(255,255,255,.07) !important; }
html.dark .qe-em3-col-right { background: #1C1C1E !important; }
html.dark .qe-em3-left-panel { background: #1C1C1E !important; border-right-color: rgba(255,255,255,.07) !important; }
html.dark .qe-em3-right-panel { background: #1C1C1E !important; }
html.dark .qe-em3-content-area { background: #222224 !important; }
html.dark .qe-em3-label { color: var(--txt3) !important; }
html.dark .qe-em3-input { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important; }
html.dark .qe-em3-input:focus { background: #2C2C2E !important; border-color: rgba(255,255,255,.25) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.06) !important; }
html.dark .qe-em3-meta-group { background: #2C2C2E !important; border-color: rgba(255,255,255,.09) !important; }
html.dark .qe-em3-meta-expanded { background: #2C2C2E !important; }
html.dark .qe-em3-sel-row:hover { background: rgba(255,255,255,.04) !important; }
html.dark .qe-em3-sel-label { color: var(--txt3) !important; }
html.dark .qe-em3-sel-preview { color: var(--txt) !important; }
html.dark .qe-em3-sel-preview.muted { color: var(--txt3) !important; }
html.dark .qe-em3-sel-chevron { color: var(--ui-muted) !important; }
html.dark .qe-em3-panel { background: #2C2C2E !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-em3-sel-divider { background: rgba(255,255,255,.07) !important; }
html.dark .qe-em3-textarea, html.dark .qe-em3-content-textarea { background: #2C2C2E !important; border-color: rgba(255,255,255,.09) !important; color: var(--txt) !important; }
html.dark .qe-em3-footer { background: #2C2C2E !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-em3-cancel-btn, html.dark .qe-em3-btn-cancel { background: #2C2C2E !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important; }
html.dark .qe-em3-cancel-btn:hover, html.dark .qe-em3-btn-cancel:hover { background: #3A3A3C !important; color: var(--txt) !important; }
html.dark #qe-edit-tpl-overlay .qe-save-tpl-emoji { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; }
html.dark #qe-edit-tpl-overlay .qe-save-tpl-emoji:hover { background: #48484A !important; border-color: rgba(255,255,255,.18) !important; }
html.dark #qe-edit-tpl-overlay .qe-save-tpl-tag-btn { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt3) !important; }
html.dark #qe-edit-tpl-overlay .qe-save-tpl-tag-btn:hover { background: #48484A !important; border-color: rgba(255,255,255,.18) !important; color: var(--txt2) !important; }
html.dark #qe-edit-tpl-overlay .qe-save-tpl-tag-btn.sel { background: var(--txt) !important; color: var(--bg) !important; border-color: var(--txt) !important; }
html.dark #qe-edit-tpl-overlay [class*="folder-btn"], html.dark #qe-edit-tpl-overlay [class*="cat-btn"] { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt3) !important; }
html.dark #qe-edit-tpl-overlay [class*="folder-btn"]:hover, html.dark #qe-edit-tpl-overlay [class*="cat-btn"]:hover { background: #3A3A3C !important; color: var(--txt2) !important; }
html.dark .qe-result-text { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .rp-ratio-box { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .macos-window-title { color: var(--txt2) !important; }
html.dark .macos-tbtn { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; }
html.dark .macos-tbtn:hover { background: #3A3A3C !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important; box-shadow: none !important; }
html.dark .macos-tbtn.filled { background: var(--txt) !important; color: var(--bg) !important; border-color: transparent !important; }
html.dark .macos-tbtn.filled:hover { background: #EBEBF5 !important; }
html.dark .qe-lib-search::placeholder { color: var(--txt3) !important; }
/* ── Library: finder header row ── */ html.dark .qe-finder-header { background: #1C1C1E !important; border-bottom-color: rgba(255,255,255,.07) !important; color: var(--txt3) !important; }
/* ── Library: finder icon box ── */ html.dark .qe-finder-icon-box { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .mp-category-card.active { background: #2C2C2E !important; border-color: rgba(255,255,255,.22) !important }
html.dark .mp-category-card { background: #222224 !important; border-color: rgba(255,255,255,.08) !important }
html.dark .mp-category-card:hover { border-color: rgba(255,255,255,.20) !important }
html.dark .qe-lib-bar.search-open .qe-lib-search { background: #2C2C2E !important; border-color: rgba(100,160,255,.40) !important; box-shadow: 0 0 0 3px rgba(100,160,255,.10) !important; }
html.dark [class*="-modal-box"]:not(.qe-em3-wrap), html.dark [class*="-modal-inner"] { background: #2C2C2E; border-color: rgba(255,255,255,.10); }
html.dark .qe-finder-ctx-menu { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; box-shadow: 0 10px 40px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.35) !important }
html.dark .qe-finder-ctx-item { color: rgba(255,255,255,.75) !important }
html.dark .qe-finder-ctx-item:hover { background: rgba(255,255,255,.08) !important; color: var(--txt) !important }
html.dark .qe-finder-ctx-divider { background: rgba(255,255,255,.08) !important }
/* ── Topbar: fix hardcoded white bg ── */ html.dark .topbar { background: rgba(28,28,30,.97) !important }
html.dark html.dark .topbar-search { background: rgba(255,255,255,.07) !important; border-color: transparent !important; }
html.dark .topbar-search:hover { background: rgba(255,255,255,.10) !important; }
html.dark .topbar-search:focus-within { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.18) !important; }
html.dark html.dark html.dark .qe-active-tpl-banner { background: var(--bg2) !important; border-color: rgba(255,255,255,.09) !important; }
html.dark .qe-active-tpl-open-btn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: rgba(255,255,255,.65) !important; }
html.dark .qe-active-tpl-open-btn:hover { background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important; }
html.dark .qe-lib-actions-dd { background: rgba(44,44,46,0.98) !important; border-color: rgba(255,255,255,0.12) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.55), 0 2px 10px rgba(0,0,0,0.35) !important }
html.dark .qe-lib-actions-dd-item:hover { background: rgba(255,255,255,0.09) !important; color: rgba(255,255,255,0.95) !important }
html.dark .qe-lib-actions-dd-item.danger:hover { background: rgba(255,59,48,0.18) !important; color: #ff8a80 !important }
html.dark .qe-lib-actions-dd-sep { background: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-tag-chip.active .qe-lib-tag-count { color: rgba(0,0,0,.55) !important; }
/* ── Library: folder sidebar ── */ html.dark .qe-lib-folder-sidebar { background: #222224 !important; border-right-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-folder-item.active .qe-lib-fi-count { background: rgba(255,255,255,.13) !important; color: rgba(255,255,255,.60) !important }
html.dark .qe-finder-row:nth-child(even) { background: #1C1C1E !important; }
html.dark .qe-finder-row-selected { background: #3A3A3C !important; }
html.dark .qe-finder-row-wrap:not(:last-child) { border-bottom-color: rgba(255,255,255,.055) !important; }
html.dark .qe-finder-row-wrap.expanded > .qe-finder-row { background: #222224 !important; border-bottom-color: rgba(255,255,255,.07) !important }
/* ── Library: drag indicators ── */ /* ── Library: selection checkboxes ── */ html.dark .qe-finder-row .qe-block-chk { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.25) !important; }
html.dark .qe-finder-row.block-selected .qe-block-chk { background: var(--txt) !important; border-color: var(--txt) !important; }
html.dark .qe-finder-row .qe-hover-check { background: rgba(255,255,255,0.12) !important; border-color: rgba(255,255,255,0.30) !important }
html.dark .qe-finder-row.block-selected .qe-hover-check { background: #F2F2F7 !important; border-color: #F2F2F7 !important }
/* ── Library: inline expand panel ── */ html.dark .qe-lib-inline-expand { background: #222224 !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-inline-footer { background: #2C2C2E !important; border-top-color: rgba(255,255,255,.06) !important; }
/* ── Library: status bar ── */ html.dark .qe-lib-status-bar { background: #1C1C1E !important; border-top-color: rgba(255,255,255,.07) !important; }
html.dark .qe-lib-status-dot { background: rgba(255,255,255,.2) !important; }
html.dark .qe-lib-status-hint { color: rgba(255,255,255,.2) !important; }
html.dark .qe-lib-preview-pop { background: rgba(44,44,46,.99) !important; border-color: rgba(255,255,255,.10) !important; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 4px 16px rgba(0,0,0,.3) !important; }
html.dark .qe-lib-preview-pop-head { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important; }
html.dark #qe-lib-preview-content { color: var(--txt2) !important; }
html.dark .qe-lib-tags-row { background: #1C1C1E !important; border-bottom-color: rgba(255,255,255,.06) !important; }
/* ── Library: manage/close buttons ── */ html.dark .qe-lib-manage-btn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; }
/* ── Library: move/rename modals ── */ html.dark .qe-lib-move-item:hover { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important; }
html.dark .qe-lib-move-item.active { background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.18) !important; color: var(--txt) !important; }
html.dark .qe-move-modal-inner { background: #2C2C2E !important; border: 1.5px solid rgba(255,255,255,.14) !important; box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.07) !important; }
html.dark .qe-breadcrumb-link { color: var(--txt2) !important; }
html.dark .qe-breadcrumb-link:hover { color: var(--txt) !important; background: rgba(255,255,255,.07) !important; }
/* ── Quick Engine: hint box ── */ html.dark .qe-hint { background: rgba(255,255,255,.04) !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .qe-hint code { background: rgba(255,255,255,.08) !important; color: var(--txt2) !important; }
html.dark .qe-field-textarea:focus { background: #1A1A1C !important; border-color: rgba(255,255,255,.24) !important }
/* ── Quick Engine: color field ── */ html.dark .qe-color-field { background: var(--bg3) !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-color-field:focus-within { border-color: rgba(255,255,255,.22) !important; }
html.dark .qe-field-expand-btn { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt3) !important; }
html.dark .qe-field-expand-btn:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.20) !important; color: var(--txt) !important; }
html.dark .qe-field-expand-btn.active { background: rgba(255,255,255,.12) !important; border-color: rgba(255,255,255,.25) !important; color: var(--txt) !important; }
/* ── Quick Engine: reset button ── */ html.dark .qe-reset-btn { border-color: transparent !important; color: var(--txt3) !important; }
html.dark .qe-reset-btn:hover { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.18) !important; color: var(--txt2) !important; }
/* ── Quick Engine: lib pill ── */ html.dark .qe-lib-pill { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; }
html.dark .qe-lib-pill:hover { background: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
/* ── Quick Engine: btn-outline ── */ html.dark .qe-btn-outline { border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important; }
html.dark .qe-btn-outline:hover { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important; }
/* ── Quick Engine: logo icon ── */ html.dark .qe-logo { background: var(--bg4) !important; border-color: var(--border2) !important; }
/* ── Quick Engine: flow steps ── */ html.dark .qe-flow-step { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt2) !important; }
html.dark .qe-step-num { background: #3A3A3C !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important; }
html.dark .qe-card { border-color: rgba(255,255,255,.10) !important; background: #2C2C2E !important }
html.dark .qe-sel-bar { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-sel-bar.danger { background: #2C1C1C !important; border-color: rgba(217,48,37,.45) !important; }
html.dark .qe-sel-bar-btn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; }
html.dark .qe-sel-bar-btn:hover { background: rgba(255,255,255,.12) !important; color: var(--txt) !important; }
html.dark .qe-sel-bar-dismiss:hover { background: rgba(255,255,255,.08) !important; color: var(--txt) !important; }
html.dark .qe-sel-bar-count { color: rgba(255,255,255,0.88) !important; background: rgba(255,255,255,0.10) !important; border-color: rgba(255,255,255,0.18) !important; }
/* FIX: sel-bar-dismiss visible in dark */ html.dark .qe-sel-bar-dismiss { color: rgba(255,255,255,0.55) !important; }
html.dark .qe-finder-row.block-selected .qe-hover-check::after { color: #1C1C1E !important; }
html.dark .nav-avatar-inner { color: rgba(255,255,255,.75) !important; }
/* ── Nav: chevron colors ── */ html.dark .nav-item .nav-item-chevron { color: rgba(255,255,255,.18) !important; }
html.dark .nav-item.active .nav-item-chevron { color: rgba(255,255,255,.35) !important; }
/* ── Nav lib: subfolder link color ── */ html.dark .qe-lib-fi-ctx-item.subfolder-action { color: #5E9CF5 !important; }
html.dark .qe-lib-fi-ctx-item.subfolder-action .qe-lib-fi-ctx-icon { color: #5E9CF5 !important; }
html.dark .nav-lib-tpl-item.nav-tpl-active { background: rgba(255,255,255,.08) !important; }
html.dark .nav-lib-tpl-item.nav-tpl-active::after { background: rgba(255,255,255,.40) !important; }
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark 
html.dark .ctr-storage-meter { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .ctr-sm-track { background: #3A3A3C !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .ctr-sm-bar { background: rgba(255,255,255,.25) !important; }
html.dark .ctr-sm-breakdown { background: #1C1C1E !important; border-color: rgba(255,255,255,.07) !important; }
html.dark .ctr-sm-dot { background: rgba(255,255,255,.30) !important; }
html.dark .ctr-sm-footer { border-top-color: rgba(255,255,255,.07) !important; }
html.dark .ctr-sm-refresh { border-color: rgba(255,255,255,.14) !important; color: var(--txt3) !important; }
html.dark .ctr-sm-refresh:hover { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt2) !important; }
html.dark .qe-row-preview-tip { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-row-preview-tip-footer { border-top-color: rgba(255,255,255,.08) !important; }
html.dark .qe-row-preview-tip-tag { background: #3A3A3C !important; border-color: rgba(255,255,255,.08) !important; }
html.dark .ctr-dl-toast { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .ctr-dl-toast-icon { background: #3A3A3C !important; border-color: rgba(255,255,255,.12) !important; }
html.dark .ctr-dl-toast-close { border-color: rgba(255,255,255,.12) !important; color: var(--txt3) !important; }
html.dark .ctr-dl-toast-close:hover { background: rgba(255,255,255,.08) !important; color: var(--txt) !important; }
html.dark .hv-subtle:hover { background: rgba(255,255,255,.06) !important; }
html.dark .hv-subtle-txt:hover { background: rgba(255,255,255,.06) !important; color: var(--txt2) !important; }
/* --- EXPORT MODAL — DARK MODE FIX --- */ html.dark .ctr-export-box { background: #222224; border-color: rgba(255,255,255,.10); }
html.dark .ctr-modal-head { background: #2C2C2E; border-bottom-color: rgba(255,255,255,.08); }
html.dark .ctr-modal-icon-wrap { background: #3A3A3C; border-color: rgba(255,255,255,.12); }
html.dark .ctr-modal-close { border-color: rgba(255,255,255,.12); color: var(--txt3); }
html.dark .ctr-modal-close:hover { background: rgba(255,80,80,.15); border-color: rgba(255,80,80,.28); color: #ff7070; }
html.dark .ctr-export-section { border-bottom-color: rgba(255,255,255,.07); }
html.dark .ctr-step-num { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.16); color: var(--txt2); }
html.dark .ctr-select-all-btn { border-color: rgba(255,255,255,.12); color: var(--txt3); }
html.dark .ctr-select-all-btn:hover { background: rgba(255,255,255,.07); color: var(--txt2); border-color: rgba(255,255,255,.20); }
/* Folder rows */ html.dark .ctr-folder-row { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
html.dark .ctr-folder-row:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
html.dark .ctr-folder-row.checked { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }
html.dark .ctr-folder-check { border-color: rgba(255,255,255,.20); }
html.dark .ctr-folder-row.checked .ctr-folder-check { background: var(--txt2); border-color: var(--txt2); color: #1C1C1E; }
/* Export summary */ html.dark .ctr-export-summary { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: var(--txt3); }
/* Field inputs */ html.dark .ctr-field-input { background: #3A3A3C; border-color: rgba(255,255,255,.12); color: var(--txt); }
html.dark .ctr-field-input:focus { border-color: rgba(255,255,255,.25); background: #48484A; }
/* Author note */ html.dark .ctr-author-note { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); color: var(--txt3); }
/* Toggle pill */ html.dark .ctr-toggle-pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
html.dark .ctr-toggle-pill::after { background: rgba(255,255,255,.55); }
html.dark .ctr-toggle-label input:checked ~ .ctr-toggle-pill { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.38); }
html.dark .ctr-toggle-label input:checked ~ .ctr-toggle-pill::after { background: var(--txt); }
/* Mode cards (Structured / Readable) */ html.dark .ctr-mode-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
html.dark .ctr-mode-card:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
html.dark .ctr-mode-card.active { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.30); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
html.dark .ctr-mode-card[data-mode="baca"] { border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.04); }
html.dark .ctr-mode-card[data-mode="baca"]:hover { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
html.dark .ctr-mode-card[data-mode="baca"].active { border-color: rgba(255,255,255,.30); background: rgba(255,255,255,.11); }
/* Format buttons */ html.dark .ctr-fmt-btn { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
html.dark .ctr-fmt-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
html.dark .ctr-fmt-btn.active { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.30); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
html.dark .ctr-fmt-icon { color: var(--txt2); }
html.dark .ctr-fmt-btn.active .ctr-fmt-icon { color: var(--txt); }
html.dark .ctr-fmt-name { color: var(--txt2); }
html.dark .ctr-fmt-btn.active .ctr-fmt-name { color: var(--txt); }
html.dark .ctr-fmt-btn[data-fmt="docx"] { border-color: rgba(100,160,255,.22); }
html.dark .ctr-fmt-btn[data-fmt="docx"]:hover { border-color: rgba(100,160,255,.42); background: rgba(100,160,255,.07); }
html.dark .ctr-fmt-btn[data-fmt="docx"].active { border-color: rgba(100,160,255,.55); background: rgba(100,160,255,.10); }
/* Extension chips */ html.dark .ctr-ext-chip { border-color: rgba(255,255,255,.12); color: var(--txt3); background: transparent; }
html.dark .ctr-ext-chip:hover { border-color: rgba(255,255,255,.22); color: var(--txt2); background: rgba(255,255,255,.06); }
html.dark .ctr-ext-chip.active { border-color: rgba(255,255,255,.32); color: var(--txt); background: rgba(255,255,255,.10); }
/* pwd section separator */ html.dark #ctr-export-pwd-section { border-top-color: rgba(255,255,255,.07); }
/* Footer */ html.dark .ctr-modal-foot { border-top-color: rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
/* Download button */ html.dark .ctr-export-btn { background: var(--txt); color: #1C1C1E; }
/* Preview rows */ html.dark .ctr-preview-folder-row { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
html.dark .ctr-preview-stat { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.10); }

/* ── collapsible rp section icon */ html.dark .rp-collapsible-head.open .rp-section-icon { background: rgba(255,255,255,.92) !important; border-color: rgba(255,255,255,.30) !important; color: #1C1C1E !important; }
html.dark #fullview-overlay { background: rgba(0,0,0,.55) !important; }
html.dark .qe-lib-ab-icon-btn { color: rgba(255,255,255,.65) !important; background: transparent !important; border-color: transparent !important }
html.dark .qe-lib-ab-icon-btn:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.16) !important; color: rgba(255,255,255,.92) !important }
html.dark .qe-lib-ab-icon-btn:active { background: rgba(255,255,255,.15) !important; color: #fff !important }
html.dark .qe-lib-ab-icon-btn.danger { color: #FF6B6B !important }
html.dark .qe-lib-ab-icon-btn.danger:hover { background: rgba(255,107,107,.14) !important; border-color: rgba(255,107,107,.28) !important }
html.dark .qe-lib-ab-sep { background: rgba(255,255,255,.13) !important; }
html.dark .qe-detail-use-btn { color: #1C1C1E !important; background: rgba(235,235,245,.88) !important }
html.dark .funnel-inner > div[style*="background:#F2F2F7"], html.dark .funnel-inner > div[style*="background: #F2F2F7"] { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt2) !important; }
html.dark .nav-lib-folder-name { color: var(--txt3) !important; }
html.dark .nav-lib-folder-head:hover .nav-lib-folder-name { color: var(--txt) !important; }
html.dark .nav-lib-folder-cnt { background: rgba(255,255,255,.09) !important; color: var(--txt3) !important; }
html.dark .nav-lib-folder-head:hover { background: rgba(255,255,255,.05) !important; }
html.dark .nav-lib-folder-toggle-chev { color: var(--txt3) !important; }
html.dark #nav-lib-toggle-btn .ni-badge { background: rgba(255,255,255,.09) !important; color: var(--txt3) !important; }
html.dark #nav-lib-toggle-btn:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt) !important; }
html.dark #nav-lib-toggle-btn:hover .ni-icon { opacity: .90 !important; }
html.dark .qe-result-card { background: #252528 !important; border-color: rgba(255,255,255,.10) !important; }
html.dark .qe-card-head, html.dark .qe-step1-head { background: #252528 !important; }
html.dark .qe-result-head { background: #252528 !important; }
html.dark .qe-card-body { background: #252528 !important; }
html.dark .qe-result-card .qe-card-body, html.dark .qe-result-card > div:not(.qe-result-head) { background: #252528 !important; }
/* Fields section (Step 2) */ html.dark .qe-fields-wrap { background: #212123 !important; }
html.dark #qe-fast-mode-toggle, html.dark #qe-realtime-toggle { background: rgba(255,255,255,.18) !important; }
html.dark #qe-fast-mode-knob, html.dark #qe-realtime-knob { background: #AEAEB2 !important; box-shadow: 0 1px 3px rgba(0,0,0,.4) !important; }
/* When active/on — brighter */ html.dark #qe-fast-mode-toggle[aria-pressed="true"], html.dark #qe-realtime-toggle[aria-pressed="true"] { background: rgba(255,255,255,.80) !important; }
html.dark #qe-fast-mode-toggle[aria-pressed="true"] #qe-fast-mode-knob, html.dark #qe-realtime-toggle[aria-pressed="true"] #qe-realtime-knob { background: #1C1C1E !important; box-shadow: 0 1px 4px rgba(0,0,0,.5) !important; }
html.dark #qe-fast-mode-row > span[style*="background:rgba(0,0,0,.13)"] { background: rgba(255,255,255,.15) !important; }
/* Placeholder toggle dark mode */
html.dark #qe-placeholder-toggle { background: rgba(255,255,255,.18) !important; }
html.dark #qe-placeholder-knob { background: #AEAEB2 !important; box-shadow: 0 1px 3px rgba(0,0,0,.4) !important; }
html.dark #qe-placeholder-toggle[aria-pressed="true"] { background: rgba(255,255,255,.80) !important; }
html.dark #qe-placeholder-toggle[aria-pressed="true"] #qe-placeholder-knob { background: #1C1C1E !important; box-shadow: 0 1px 4px rgba(0,0,0,.5) !important; }
/* Reset button dark mode */
html.dark #qe-fast-mode-row .qe-row-reset-btn { border-color: rgba(255,255,255,.15) !important; color: var(--txt3) !important; }
html.dark #qe-fast-mode-row .qe-row-reset-btn:hover { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.25) !important; color: var(--txt2) !important; }
html.dark .cr-glitch-layer { color: #F2F2F7 !important }
html.dark .cr-reveal-layer { color: #F2F2F7 !important }
html.dark .cr-reveal-word { color: #F2F2F7 !important }
html.dark .cr-anchor { color: #F2F2F7 !important }
html.dark .cr-cursor { background: #F2F2F7 !important; }
html.dark .qe-textarea-wrap { background: #1C1C1E !important; border-color: rgba(255,255,255,.12) !important; }
html.dark .qe-textarea-wrap:focus-within { border-color: rgba(255,255,255,.28) !important; background: #1C1C1E !important; box-shadow: 0 0 0 3px rgba(255,255,255,.05) !important; }
html.dark .qe-textarea { background: transparent !important; color: var(--txt) !important; }
html.dark .qe-field-input { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .qe-field-input:focus { background: #1A1A1C !important; border-color: rgba(255,255,255,.24) !important; box-shadow: 0 0 0 3px rgba(255,255,255,.04) !important; outline: none !important; }
html.dark .qe-field-input::placeholder { color: var(--txt3) !important; }
html.dark .qe-dropdown-select { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .qe-dropdown-text-input { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .qe-dropdown-text-input:focus { background: #1A1A1C !important; border-color: rgba(255,255,255,.24) !important; }
html.dark .qe-dropdown-text-input::placeholder { color: var(--txt3) !important; }
/* ── FIX: Date field in dark mode — icon kustom selalu kontras, terlihat jelas ── */ html.dark .qe-date-field { background: #1A1A1C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .qe-date-field:hover { border-color: rgba(255,255,255,.18) !important; }
html.dark .qe-date-field:focus-within { border-color: rgba(255,255,255,.24) !important; }
html.dark .qe-date-icon { color: var(--txt2) !important; }
html.dark .qe-date-field:hover .qe-date-icon, html.dark .qe-date-field:focus-within .qe-date-icon { color: var(--txt) !important; }
html.dark .qe-date-native { background: transparent !important; color: var(--txt) !important; }
html.dark .qe-date-display { color: var(--txt) !important; }
html.dark .qe-date-display.qe-date-placeholder { color: var(--txt3) !important; }
/* ── FIX: Color field hex input ── */ html.dark .qe-color-hex { background: transparent !important; color: var(--txt) !important; }
html.dark .qe-field-mode-badge { background: rgba(255,255,255,.07) !important; color: var(--txt3) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark .qe-finder-ctx-icon { color: var(--txt3) !important; opacity: 1 !important }
html.dark .qe-ab-btn.sort-btn { background: transparent !important; border-color: transparent !important; color: rgba(255,255,255,.55) !important; }
html.dark .qe-ab-btn.sort-btn:hover { background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.16) !important; color: rgba(255,255,255,.88) !important; }
html.dark .qe-lib-del-sel-btn.sort-btn { background: transparent !important; border-color: transparent !important; color: rgba(255,255,255,.55) !important; }
html.dark .qe-lib-del-sel-btn.sort-btn:hover { background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.16) !important; color: rgba(255,255,255,.88) !important; }
html.dark .macos-nav-section { color: rgba(255,255,255,.32) !important }
html.dark .qe-lib-fi-more { color: rgba(255,255,255,.50) !important }
html.dark .qe-lib-fi-more:hover { background: rgba(255,255,255,.10) !important; color: var(--txt) !important; }
html.dark .qe-finder-ctx-item.danger { color: #ff6b6b !important }
html.dark .qe-finder-ctx-item.danger:hover { background: rgba(255,59,48,.12) !important; }
html.dark .pe-input { background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.12); }
html.dark .pe-input:focus { border-color:rgba(255,255,255,.30); box-shadow:0 0 0 3px rgba(255,255,255,.07); }
html.dark .pe-divider { background:rgba(255,255,255,.08); }
html.dark .pe-toggle-row { border-color:rgba(255,255,255,.10); }
html.dark .pe-bypass-warn { background:rgba(255,59,48,.12); color:#ff6b6b; }
/* Profile action buttons dark mode */ html.dark .pe-btn-cancel { border-color: rgba(255,255,255,.15) !important; background: rgba(255,255,255,.06) !important; color: var(--txt3) !important; }
html.dark .pe-btn-cancel:hover { background: rgba(255,255,255,.11) !important; color: var(--txt2) !important; }
html.dark .pe-btn-save { border-color: rgba(255,255,255,.18) !important; background: rgba(255,255,255,.08) !important; color: var(--txt2) !important; }
html.dark .pe-btn-save:hover { background: rgba(255,255,255,.14) !important; color: var(--txt) !important; }
html.dark .qe-finder-ctx-menu, html.dark .qe-lib-fi-ctx, html.dark #qe-lib-folder-ctx { background: rgba(44,44,46,0.98) !important; border-color: rgba(255,255,255,0.12) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.55), 0 2px 10px rgba(0,0,0,0.35) !important; }
html.dark .qe-finder-ctx-item, html.dark .qe-lib-fi-ctx-item { color: rgba(255,255,255,0.85) !important; }
html.dark .qe-finder-ctx-item:hover, html.dark .qe-lib-fi-ctx-item:hover { background: rgba(255,255,255,0.09) !important; color: rgba(255,255,255,0.95) !important; }
html.dark .qe-finder-ctx-item.danger:hover, html.dark .qe-lib-fi-ctx-item.danger:hover { background: rgba(255,59,48,0.18) !important; color: #ff8a80 !important; }
html.dark .qe-finder-ctx-divider, html.dark .qe-lib-fi-ctx-sep { background: rgba(255,255,255,0.09) !important; }
html.dark #qe-lib-folder-ctx, html.dark #qe-finder-ctx { background: rgba(44,44,46,0.98) !important; border-color: rgba(255,255,255,0.12) !important; box-shadow: 0 10px 40px rgba(0,0,0,0.55), 0 2px 10px rgba(0,0,0,0.35) !important; }
html.dark .qe-lib-actions-dd-item { color: rgba(255,255,255,0.78) !important; }
html.dark .qe-lib-actions-dd-item.danger { color: #ff6b6b !important; }
html.dark .qe-lib-actions-dd-item--active { color: rgba(255,255,255,0.95) !important; }
html.dark #qe-sort-trigger { background: transparent !important; border-color: transparent !important; color: rgba(255,255,255,.55) !important; }
html.dark #qe-sort-trigger:hover { background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.16) !important; color: rgba(255,255,255,.88) !important; }
html.dark #qe-sort-trigger:active { background: rgba(255,255,255,.14) !important; }
/* Dark mode */ html.dark .qe-sort-dropdown { background: var(--bg2); border-color: var(--border2); box-shadow: 0 8px 24px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.18); }
html.dark .qe-sort-opt:hover, html.dark .qe-sort-opt.active { background: rgba(255,255,255,.07); }
 @media (max-width: 600px) { html.dark #qe-lib-search-toggle-btn { color: rgba(255,255,255,0.60) !important; }
html.dark #qe-lib-search-toggle-btn:hover { background: rgba(255,255,255,0.10) !important; color: rgba(255,255,255,0.90) !important; }
html.dark #qe-lib-search-clear-btn { background: rgba(255,255,255,0.15) !important; color: rgba(255,255,255,0.70) !important; }
/* ── +P and all toolbar icon buttons ── */ html.dark .qe-lib-ab-icon-btn { color: rgba(255,255,255,.60) !important; background: transparent !important; border-color: transparent !important; }
html.dark .qe-lib-ab-overflow-trigger { color: rgba(255,255,255,.65) !important; background: transparent !important; border-color: transparent !important }
html.dark .qe-lib-ab-overflow-trigger:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.16) !important; color: rgba(255,255,255,.92) !important }
html.dark .qe-lib-bc-name { color: rgba(255,255,255,.88) !important }
html.dark .qe-lib-bc-sep { background: rgba(255,255,255,.14) !important }
html.dark .qe-lib-bc-count { background: rgba(255,255,255,.09) !important; color: var(--txt3) !important; }
html.dark .qe-generate-btn { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; box-shadow: 0 2px 12px rgba(0,0,0,.35) !important; }
html.dark .qe-generate-btn:hover:not(:disabled) { background: rgba(235,235,245,.96) !important; box-shadow: 0 4px 18px rgba(0,0,0,.4) !important; }
html.dark .qe-generate-btn:disabled { background: rgba(255,255,255,.12) !important; color: rgba(255,255,255,.35) !important; box-shadow: none !important; }
html.dark .qe-copy-btn { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; border-color: transparent !important; }
html.dark .qe-copy-btn:hover { background: rgba(235,235,245,.96) !important; opacity: 1 !important; }
html.dark .lp-cta-primary:hover { background: rgba(235,235,245,.96) !important; opacity: 1 !important; }
html.dark .mp-card-lib-tag { color: rgba(255,255,255,.65) !important; background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.18) !important; }
html.dark .mep-linked .mp-card-lib-tag { background: rgba(52,199,89,.12) !important; color: rgba(52,199,89,.85) !important; border-color: rgba(52,199,89,.28) !important; }
html.dark .mp-card-unlinked-badge { color: rgba(255,255,255,.55) !important; background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.16) !important; }
html.dark .mp-card-status-dot { border-color: rgba(255,255,255,.25) !important; }
html.dark .lp-how-step-num { background: #3A3A3C !important; color: rgba(255,255,255,.75) !important; border-color: rgba(255,255,255,.12) !important; }
html.dark {
  --num-bg: #F2F2F7;
  --num-fg: #1C1C1E;
}
/* REMOVED individual overrides — now uses CSS variables */
html.dark .lp-flow { background: #2C2C2E !important; border-color: rgba(255,255,255,.08) !important; }
/* lp-strip-step dark: warna teks cukup dari inherit var(--txt) tanpa !important — supaya lp-strip-num bebas set warnanya sendiri */
/* lp-strip-num dark mode handled via --num-bg/--num-fg */
html.dark .lp-flow-step { border-bottom-color: rgba(255,255,255,.07) !important; }
html.dark .lp-flow-step-code { background: #3A3A3C !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt2) !important; }
html.dark .mp-page-header-icon { background: var(--bg4) !important; border-color: var(--border2) !important; box-shadow: none !important; }
html.dark .lp-how-step-title { color: var(--txt) !important; }
html.dark .lp-how-step-desc { color: var(--txt3) !important; }
html.dark .lp-how-step-chip { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.12) !important; color: rgba(255,255,255,.6) !important; }
html.dark .mp-shortcut-item { background: #2C2C2E !important; border-color: rgba(255,255,255,.10) !important; color: var(--txt2) !important; }
html.dark .mp-shortcut-item:hover { background: #3A3A3C !important; border-color: rgba(255,255,255,.18) !important; color: var(--txt) !important; }
html.dark .mp-shortcut-folder { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; }
html.dark .mp-shortcut-folder:hover { background: #3A3A3C !important; border-color: rgba(255,255,255,.20) !important; }
html.dark .qe-save-btn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: var(--txt2) !important; }
html.dark .qe-save-btn:hover { background: rgba(255,255,255,.11) !important; border-color: rgba(255,255,255,.22) !important; color: var(--txt) !important; }
html.dark .qe-open-ai-btn { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt3) !important; }
html.dark .qe-open-ai-btn:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.20) !important; color: var(--txt) !important; }
html.dark .qe-gen-spinner { border-color: rgba(28,28,30,.3) !important; border-top-color: #1C1C1E !important; }
html.dark .qe-lib-del-sel-btn.qe-lib-add-tpl-btn:hover { background: rgba(235,235,245,.96) !important; }
html.dark .qe-detail-use-btn:hover { background: rgba(235,235,245,.96) !important; }
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28) !important; }
.mp-cat-section-label { color: rgba(0,0,0,.28); }
html.dark .mp-cat-section-label { color: rgba(255,255,255,.45) !important; }
html.dark .qe-save-tpl-confirm, html.dark .qe-modal-btn-save, html.dark .qe-ipreview-pakai-btn { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; border-color: transparent !important; box-shadow: none !important; }
html.dark .qe-save-tpl-confirm:hover, html.dark .qe-modal-btn-save:hover, html.dark .qe-ipreview-pakai-btn:hover { background: rgba(235,235,245,.96) !important; opacity: 1 !important; }
/* Engine Bank inline button */ html.dark [onclick*="drive.google.com"] { background: rgba(235,235,245,.88) !important; color: #1C1C1E !important; border-color: transparent !important; }
html.dark [onclick*="drive.google.com"]:hover { background: rgba(235,235,245,.96) !important; }
 html.dark #qe-mp-active-bar { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.13) !important; }
html.dark #qe-mp-active-bar:hover { background: rgba(255,255,255,.11) !important; border-color: rgba(255,255,255,.20) !important; }
html.dark #qe-mp-active-bar .hv-close-danger { color: rgba(255,255,255,.35) !important; }
html.dark #qe-mp-active-bar .hv-close-danger:hover { color: rgba(255,80,80,.8) !important; background: rgba(255,60,60,.12) !important; }
html.dark #qe-mp-inactive-bar:hover { background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.18) !important; }
html.dark .qe-lib-ab-overflow-trigger::before, html.dark #qe-lib-actions-trigger::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 13' fill='none'%3E%3Crect x='0' y='0' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3Crect x='6.5' y='0' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3Crect x='13' y='0' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3Crect x='0' y='6' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3Crect x='6.5' y='6' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3Crect x='13' y='6' width='4' height='4' rx='1.1' fill='%23AEAEB2'/%3E%3C/svg%3E") !important; }
html.dark .qe-lib-ab-overflow-trigger:hover::before, html.dark #qe-lib-actions-trigger:hover::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 13' fill='none'%3E%3Crect x='0' y='0' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3Crect x='6.5' y='0' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3Crect x='13' y='0' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3Crect x='0' y='6' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3Crect x='6.5' y='6' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3Crect x='13' y='6' width='4' height='4' rx='1.1' fill='%23F2F2F7'/%3E%3C/svg%3E") !important; }
html.dark .qe-ab-btn { background: #2C2C2E !important; border-color: rgba(255,255,255,.12) !important; color: var(--txt2) !important; box-shadow: none !important; }
html.dark .qe-ab-btn:active { background: #48484A !important; box-shadow: none !important; }
html.dark #qe-lib-actions-trigger, html.dark .qe-lib-ab-overflow-trigger { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
html.dark #qe-lib-actions-trigger:hover, html.dark .qe-lib-ab-overflow-trigger:hover { background: rgba(255,255,255,.10) !important; border-color: rgba(255,255,255,.14) !important; }
html.dark .qe-lib-action-bar .qe-lib-ab-sep:last-of-type, .qe-lib-action-bar .qe-lib-ab-sep:last-of-type { display: none !important; }
#qe-edit-tpl-overlay, html.dark #qe-edit-tpl-overlay { background: rgba(0,0,0,.48); backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
/* Dark mode — macOS native sheet look */ html.dark #qe-generic-confirm-modal { --qe-gc-border: rgba(255,255,255,.18) !important; --qe-gc-shadow: 0 0 0 1px rgba(255,255,255,.09), /* inner border glow tipis */ 0 8px 32px rgba(0,0,0,.55), /* shadow medium */ 0 32px 96px rgba(0,0,0,.72), /* shadow dalam & jauh */ 0 2px 4px rgba(0,0,0,.40) /* shadow dekat tajam */ !important; background: rgba(0,0,0,.70) !important; /* backdrop lebih pekat di dark */ }
html.dark #qe-generic-confirm-modal > div { background: #2C2C2E !important; border: 1px solid rgba(255,255,255,.16) !important; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 8px 32px rgba(0,0,0,.55), 0 32px 96px rgba(0,0,0,.72), 0 2px 4px rgba(0,0,0,.40) !important; }
html.dark #qe-generic-confirm-modal > div > div:first-child { /* area judul di dark mode */ background: #2C2C2E !important; }
/* Warning box di dark mode */ html.dark #qe-generic-confirm-modal > div > div[style*="danger-bg"] { border-color: rgba(220,50,40,.30) !important; }
html.dark #qe-generic-confirm-modal > div > div[style*="border-top"] { border-top-color: rgba(255,255,255,.09) !important; }
html.dark #qe-generic-confirm-modal > div > div[style*="border-top"] > button:first-child { border-right-color: rgba(255,255,255,.09) !important; color: rgba(235,235,245,.60) !important; }
html.dark .macos-titlebar, html.dark .qe-detail-modal-titlebar, html.dark .qe-em3-header { background: #2C2C2E !important; border-bottom-color: rgba(255,255,255,.07) !important; box-shadow: none !important; }
html.dark .macos-window-title, html.dark .qe-detail-modal-titlebar-title, html.dark .qe-em3-title { color: rgba(235,235,245,.75) !important; }
html.dark .qe-lib-modal, html.dark .qe-detail-modal-box, html.dark .qe-edit-modal-v3 { border-color: rgba(255,255,255,.10) !important; }
/* FIX: white line top titlebar di dark mode — hapus inset white box-shadow dari semua canonical titlebar block */
/* FIX: +P button text masih hitam di dark mode — override selector lebih spesifik */
html.dark .qe-lib-action-bar .qe-ab-btn { color: rgba(255,255,255,.55) !important; }
html.dark .qe-lib-action-bar .qe-ab-btn:hover { color: rgba(255,255,255,.90) !important; background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.12) !important; }
/* ── Dark mode support ── */ html.dark .qe-lib-inline-export, html.dark .qe-lib-inline-edit { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.13); color: rgba(255,255,255,.70); }
html.dark .qe-lib-inline-export:hover, html.dark .qe-lib-inline-edit:hover { background: rgba(255,255,255,.12); color: rgba(255,255,255,.92); }
html.dark .qe-lib-inline-close { border-color: rgba(255,255,255,.10); color: rgba(255,255,255,.38); }
html.dark .qe-lib-inline-close:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.60); }
html.dark .macos-btn-max, html.dark .qe-detail-modal-traffic .dm-max, html.dark .qe-em3-tl-max, html.dark #mac-btn-max { background: #C8C8CA !important; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12) !important; filter: none !important; }

/* Dark mode: 2 bug di Template Library */

/* FIX 1 — Hapus inset white box-shadow di macos-titlebar saat dark mode. */
html.dark #qe-lib-overlay .macos-titlebar {
  box-shadow: none !important;
}

/* Juga cover modal lain yang punya macos-titlebar (export, meta, recycle, dll) */
html.dark .qe-lib-overlay .macos-titlebar,
html.dark #qe-lib-overlay .macos-titlebar,
html.dark #qe-export-modal .macos-titlebar,
html.dark #qe-lib-meta-modal .macos-titlebar {
  box-shadow: none !important;
  background: #2C2C2E !important;
  border-bottom-color: rgba(255,255,255,.07) !important;
}

/* FIX 2 — Tombol "+P" di action bar: paksa warna teks terang di dark mode. */
html.dark #qe-lib-action-bar .qe-ab-btn--primary {
  color: rgba(255,255,255,.65) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html.dark #qe-lib-action-bar .qe-ab-btn--primary:hover {
  color: rgba(255,255,255,.92) !important;
  background: rgba(255,255,255,.09) !important;
  border-color: rgba(255,255,255,.16) !important;
}
html.dark #qe-lib-action-bar .qe-ab-btn--primary:active {
  background: rgba(255,255,255,.14) !important;
  transform: scale(.97) !important;
}
