/* ==========================================================================
   QuidOwl theme (Seb, 16 Nov 2026): light purple boxes, and a night version.
   Night: html[data-theme="dark"], switched with the moon / sun button (kept per browser).
   The fixed-colour overrides at the bottom are GENERATED by _build files/_qo_src9/sh1/theme-gen.js: re-run it after big CSS changes.
   ========================================================================== */
:root { --box: #F8F6FF; --box-border: #E7E2FA; }
.card, .kpi { background: var(--box); border-color: var(--box-border); }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F0E17; --surface: #18161F; --surface-2: #211E2B; --box: #1C1A27; --box-border: #2E2A3D;
  --border: #2E2A3D; --border-strong: #3D3852;
  --text: #ECEAF5; --text-2: #C2BFD2; --muted: #9A96AE; --faint: #77728C;
  --accent: #8B83F6; --accent-hover: #A39CF8; --accent-soft: #252148; --accent-ring: rgba(139, 131, 246, .40);
  --pos: #34D399; --pos-soft: #10291F; --neg: #F87171; --neg-soft: #2E1517; --warn: #FBBF24; --warn-soft: #2B2210;
  --info: #60A5FA; --info-soft: #14213A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 16px -4px rgba(0,0,0,.6), 0 2px 4px rgba(0,0,0,.4);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] img { opacity: .92; }
html[data-theme="dark"] .sb-logo-full, html[data-theme="dark"] .sb-logo-mark, html[data-theme="dark"] img[src*="quidowl-wordmark"] { opacity: 1; background: #F8F6FF; border-radius: 8px; padding: 3px 6px; box-sizing: content-box; }   /* logo keeps its colours */
html[data-theme="dark"] .pt-img, html[data-theme="dark"] .arb-prod img { background: #fff; }   /* product photos keep their white */
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background-color: var(--surface); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] ::placeholder { color: var(--faint); }

html[data-tint="green"] { --box: #F3FBF6; --box-border: #DCF1E4; }
html[data-theme="dark"][data-tint="green"] { --box: #17221D; --box-border: #26362E; }
html[data-tint="grey"] { --box: #F6F7F9; --box-border: #E3E6EB; }
html[data-theme="dark"][data-tint="grey"] { --box: #1C1D21; --box-border: #2E3036; }
html[data-tint="blue"] { --box: #F4F8FF; --box-border: #DFE8FA; }
html[data-theme="dark"][data-tint="blue"] { --box: #161D2A; --box-border: #25304A; }
html[data-tint="sand"] { --box: #FCF9F3; --box-border: #EFE7D6; }
html[data-theme="dark"][data-tint="sand"] { --box: #221E17; --box-border: #373026; }
html[data-tint="pink"] { --box: #FFF6FA; --box-border: #F6E0EA; }
html[data-theme="dark"][data-tint="pink"] { --box: #261920; --box-border: #3D2833; }
html[data-tint="white"] { --box: #FFFFFF; --box-border: #E2E8F0; }
html[data-theme="dark"][data-tint="white"] { --box: #18161F; --box-border: #2E2A3D; }
.qo-tints { display: flex; gap: 8px; flex-wrap: wrap; }
.qo-tint { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-strong); cursor: pointer; padding: 0; position: relative; }
.qo-tint.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* Night background: navy is the default; html[data-night="purple"] keeps the first purple-black version */
html[data-theme="dark"]:not([data-night="purple"]) {
  --bg: #0B1220; --surface: #111A2B; --surface-2: #18233A;
  --border: #24324D; --border-strong: #33456A;
  --text: #E8EDF6; --text-2: #BCC6D8; --muted: #8E9AB3; --faint: #6B7893;
  --accent-soft: #1E2550;
}
html[data-theme="dark"]:not([data-night="purple"]):not([data-tint]) { --box: #142036; --box-border: #24324D; }
html[data-theme="dark"]:not([data-night="purple"])[data-tint="grey"] { --box: #161C27; --box-border: #283143; }
html[data-theme="dark"]:not([data-night="purple"])[data-tint="white"] { --box: #111A2B; --box-border: #24324D; }

/* theme button */
.qo-theme-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-2); cursor: pointer; }
.qo-theme-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ---- generated: fixed colours, night versions ---- */
html[data-theme="dark"] .connect-banner{border:0.5px solid #374a5c}
html[data-theme="dark"] .tip .t-date{color:#b8c6d6}
html[data-theme="dark"] .tip .t-row span{color:#b5c4d9}
html[data-theme="dark"] .badge-success{border-color:#395f4e}
html[data-theme="dark"] .badge-danger{border-color:#573434}
html[data-theme="dark"] .badge-warning{border-color:#635b3b}
html[data-theme="dark"] .badge-info{border-color:#354559}
html[data-theme="dark"] .alert-warning{border-color:#635b3b}
html[data-theme="dark"] .alert-danger{border-color:#573434}
html[data-theme="dark"] .alert-info{border-color:#354559}
html[data-theme="dark"] .alert-success{border-color:#395f4e}
html[data-theme="dark"] .sk{background:linear-gradient(90deg, var(--surface-2) 25%, #172333 37%, var(--surface-2) 63%)}
html[data-theme="dark"] .cogs-banner{border:1px solid #635b3b}
html[data-theme="dark"] tr.pending td{background:#2d2711}
html[data-theme="dark"] .import-card{border-color:#343b57}
html[data-theme="dark"] .scan-img{background:#1c1c1c}
html[data-theme="dark"] .su-cam-btn.on{color:#dadada}
html[data-theme="dark"] .sh-img{background:#1c1c1c}
html[data-theme="dark"] .pair-qr svg,html[data-theme="dark"] .pair-qr img{background:#1c1c1c}
html[data-theme="dark"] .m-row img,html[data-theme="dark"] .m-row-img{background:#1c1c1c}
html[data-theme="dark"] .rp-stop{border-color:#5e3838}
html[data-theme="dark"] .rp-ai-tag{background:#221332;color:#a172f2}
html[data-theme="dark"] .hm-row img,html[data-theme="dark"] .hm-row-img{background:#1c1c1c}
html[data-theme="dark"] .rp-src.ext{color:#ddb698}
html[data-theme="dark"] .src-amz{background:#302312;color:#dba893}
html[data-theme="dark"] .src-pred{background:#221332;color:#a172f2}
html[data-theme="dark"] .qo-tag{color:#aab7d2}
html[data-theme="dark"] .arb-steps li.done{border-color:#395f4e}
html[data-theme="dark"] .arb-steps li.now{color:var(--text, #b9c8e8)}
html[data-theme="dark"] .arb-prod img,html[data-theme="dark"] .arb-noimg{background:#1c1c1c}
html[data-theme="dark"] .arb-ag-pm{color:#a691da}
html[data-theme="dark"] .arb-ag-inventory{color:#acdee3}
html[data-theme="dark"] .arb-ag-listings{color:#e0c8a3}
html[data-theme="dark"] .arb-track li{background:var(--color-bg-subtle, #171d2d);color:var(--color-muted, #8b919e)}
html[data-theme="dark"] .arb-track li.done{background:#153725;color:#a8e2c8}
html[data-theme="dark"] .arb-prod-row > td{background:var(--color-bg-subtle, #11172d)}
html[data-theme="dark"] .arb-prod-t2{background:#1c1c1c}
html[data-theme="dark"] .amz-sold-t thead th{background:var(--card, #1c1c1c)}
html[data-theme="dark"] .amz-best-on{color:var(--accent, #827ced) !important}
html[data-theme="dark"] th.amz-best-on{color:var(--accent, #827ced) !important}
html[data-theme="dark"] .amz-month-t tbody tr:not(.row-total):hover td{background:var(--color-bg-subtle, #11172d)}
html[data-theme="dark"] .amz-o-kpis .k-l{color:var(--muted, #8b919e)}
html[data-theme="dark"] .amz-o-lines td{border-top:1px solid var(--border, #3b414d)}
html[data-theme="dark"] .amz-ch.fba{background:#131f31;color:#4b74e7}
html[data-theme="dark"] .amz-ch.fbm{background:#352814;color:#ddb698}
html[data-theme="dark"] .amz-scan{color:var(--accent, #827ced)}
html[data-theme="dark"] .amz-rec.lvl-high .amz-rec-ic{background:#351414;color:#da9191}
html[data-theme="dark"] .amz-rec.lvl-medium .amz-rec-ic{color:#ddb698}
html[data-theme="dark"] .amz-ai{background:var(--accent-soft, #12192f)}
html[data-theme="dark"] .pl-img{background:#1c1c1c}
html[data-theme="dark"] .sr-chip.on{background:var(--accent-soft, #12192f)}
html[data-theme="dark"] .hm-scan-btns a{background:var(--accent-soft, #12192f)}
html[data-theme="dark"] .ship-profit.pos{background:var(--pos-soft,#143526);color:var(--pos,#a3e0cd)}
html[data-theme="dark"] .ship-profit.neg{background:var(--neg-soft,#311313);color:var(--neg,#e55b5b)}
html[data-theme="dark"] .si-asin{color:var(--primary, #827ced)}
html[data-theme="dark"] .ob-bar{background:var(--border, #23272e)}
html[data-theme="dark"] .ob-dot{background:var(--surface-2, #14222f);color:var(--text-2, #b0bbca);border:1px solid var(--border, #334155)}
html[data-theme="dark"] .ob-tag{color:var(--muted, #8593a7)}
html[data-theme="dark"] .ob-tag.req{color:#ddb698}
html[data-theme="dark"] .ob-step.is-done .ob-tag{color:#a4e1bb}
html[data-theme="dark"] .ob-step.is-open .ob-sb{border-top:1px solid var(--border, #313f51)}
html[data-theme="dark"] .ob-p{color:var(--text-2, #b7c3d4)}
html[data-theme="dark"] .ob-hint{color:var(--muted, #8593a7)}
html[data-theme="dark"] .ob-conn{border-bottom:1px solid var(--border, #313f51)}
html[data-theme="dark"] .ob-ok{color:#a4e1bb}
html[data-theme="dark"] .hp-g{color:var(--muted, #8593a7)}
html[data-theme="dark"] .hp-l{color:var(--text, #c1cde9)}
html[data-theme="dark"] .hp-l:hover{background:var(--surface-2, #14222f)}
html[data-theme="dark"] .hp-l.on{background:var(--primary-soft, #12192f);color:var(--primary, #827ced)}
html[data-theme="dark"] .hp-crumb{color:var(--muted, #8593a7)}
html[data-theme="dark"] .hp-body td,html[data-theme="dark"] .hp-body th{border:1px solid var(--border, #334155)}
html[data-theme="dark"] .hp-body blockquote{background:var(--surface-2, #121f2b)}
html[data-theme="dark"] .hp-foot{border-top:1px solid var(--border, #313f51);color:var(--muted, #8593a7)}
html[data-theme="dark"] .hp-card,html[data-theme="dark"] .hp-hit{border:1px solid var(--border, #334155);color:var(--text, #c1cde9)}
html[data-theme="dark"] .hp-card span,html[data-theme="dark"] .hp-hit span{color:var(--muted, #8593a7)}
html[data-theme="dark"] .hp-fab{border:1px solid var(--border, #334155);background:var(--surface, #1c1c1c);color:var(--primary, #827ced)}
html[data-theme="dark"] .ig-pill{background:var(--surface-2, #14222f);color:var(--muted, #8593a7)}
html[data-theme="dark"] .ig-pill.on{background:#153821;color:#a4e1bb}
html[data-theme="dark"] .ig-row input{border:1px solid var(--border, #37485c)}
html[data-theme="dark"] .ig-more summary{color:var(--primary, #827ced)}
html[data-theme="dark"] .m-bk-prod img{background:#1c1c1c}
html[data-theme="dark"] .pt-img{background:#1c1c1c}
html[data-theme="dark"] .pl-pick-row img,html[data-theme="dark"] .pl-pick-noimg{background:#1c1c1c}
html[data-theme="dark"] .ws-form .pk-field.is-off .pk-input{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ws-cats tbody tr:hover td{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ws-cats tbody tr.is-open td{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ws-cats tr.ws-exp>td{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ws-cats tr.ws-exp:hover td{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ws-exp-in{background:var(--surface,#1c1c1c)}
html[data-theme="dark"] .qg-sugg{background:var(--surface,#1c1c1c)}
html[data-theme="dark"] .qg-sugg button:hover{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .sp-ev-ic{background:var(--surface-2,#1e1e25)}
html[data-theme="dark"] .sp-ev-ic.pos{background:var(--pos-soft,#143526);color:var(--pos,#a3e0cd)}
html[data-theme="dark"] .sp-ug-head{background:var(--surface-2,#1b1b24)}
html[data-theme="dark"] .ebl-prod img{background:#1c1c1c}
html[data-theme="dark"] .ws-cats .ws-del:hover{color:var(--neg,#e55b5b)}
html[data-theme="dark"] #ws-delsel{color:var(--neg,#e55b5b)}

/* Phone scanner bars at night (Seb, 20 Nov 2026) */
html[data-theme="dark"] .m-top, html[data-theme="dark"] .m-tabs { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .m-top .m-icon, html[data-theme="dark"] .m-tabs button { color: var(--muted); }
html[data-theme="dark"] .m-tabs button.on { color: var(--accent); }
.m-top { justify-content: flex-start; } .m-top .m-top-actions { margin-left: auto; }
html[data-theme="dark"] .m-sheet-bar { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .lp-nav, html[data-theme="dark"] .lp-mobile { background: rgba(17, 26, 43, .92); border-color: var(--border); }
html[data-theme="dark"] body.lp, html[data-theme="dark"] .lp-hero { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .lp-alt { background: var(--surface); }
html[data-theme="dark"] .lp-brand .qo-lock { background: #F8F6FF; border-radius: 12px; padding: 4px 10px 4px 6px; }
html[data-theme="dark"] .lp-brand .qo-lock img, html[data-theme="dark"] .lp-foot .brand-logo { opacity: 1; }
html[data-theme="dark"] .lp-foot .brand-logo { background: #F8F6FF; border-radius: 12px; padding: 6px 10px; }
