/* Consistent dark mode for the complete application (including added panels). */
body.theme-dark,body.dark{color-scheme:dark;--primary:#a5b4fc;--primary-dark:#818cf8;--bg-body:#0b1220;--bg-panel:#172237;--border:#38475f;--text-main:#f8fafc;--text-muted:#bbc8dc;--input-bg:#111d30;--grid-dot:#44536d;--grid-bg:#0d1729}
body.theme-dark .qr-card,body.theme-dark .history-item,body.theme-dark .history-pagination,body.theme-dark .history-wrap,body.theme-dark .expert-seccc{background:var(--bg-panel)!important;color:var(--text-main)!important;border-color:var(--border)!important}
body.theme-dark input:not([type=color]):not([type=checkbox]):not([type=radio]),body.theme-dark textarea,body.theme-dark select,body.theme-dark .qr-mini-input{background:var(--input-bg)!important;color:var(--text-main)!important;border-color:var(--border)!important}
body.theme-dark input::placeholder,body.theme-dark textarea::placeholder{color:#94a3b8!important}
body.theme-dark .history-item:hover,body.theme-dark .bb-history-entry:hover{background:#263754!important}
body.theme-dark .btn-outline,body.theme-dark .qr-action-btn{color:var(--text-main);border-color:var(--border)}
body.theme-dark .qr-action-btn.primary,body.theme-dark .btn-primary{color:#0b1220}
body.theme-dark .qr-card-head,body.theme-dark .label,body.theme-dark .form-header,body.theme-dark .subheader{color:var(--text-main)}
body.theme-dark .qr-info-box code{background:#0b1220;border-color:var(--border)}
.bb-save-name{width:100%;margin:8px 0;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--input-bg);color:var(--text-main);font:inherit}
.bb-history-entry{border:1px solid var(--border);background:var(--bg-panel);border-radius:10px;padding:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;width:100%;text-align:left;color:var(--text-main);margin:5px 0}
.bb-history-entry strong{font-size:12px;overflow-wrap:anywhere}.bb-history-entry small{display:block;font-size:11px;color:var(--text-muted);margin-top:3px}.bb-history-entry:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.bb-history-actions{display:flex;gap:5px;align-items:center}.bb-history-actions button{border:1px solid var(--border);border-radius:7px;background:var(--input-bg);color:var(--text-main);padding:6px 8px;cursor:pointer}
.bb-history-actions button:hover{border-color:var(--primary)}.bb-history-none{font-size:12px;color:var(--text-muted);padding:10px}
.bb-history-page{display:flex;justify-content:center;gap:8px;padding:8px}.bb-history-page button{border:1px solid var(--border);background:var(--input-bg);color:var(--text-main);border-radius:6px;padding:5px 9px}.bb-history-page button:disabled{opacity:.45}
