/* TankPlug themes (shared by /account, /admin and /app). Variables on html[data-theme]; "system" follows the OS. Loaded after panel.css / app.css. */
:root[data-theme=midnight]{--bg:#070b1a;--bg2:#0a1028;--card:#0e1430;--ink:#e6e9f7;--mut:#9aa6cf;--line:#1c2550;--brand:#8b5cf6;--brand2:#7c3aed;--green:#34d399;--ok:#123a35;--warn:#3d2f12;--bad:#4a1c2c;--evc:#1d2558;--sh:0 1px 2px #0008,0 10px 30px #0009}
:root[data-theme=ocean]{--bg:#eef6fb;--bg2:#e0eef6;--card:#fff;--ink:#0b2a3c;--mut:#4a6577;--line:#d6e7f1;--brand:#0284c7;--brand2:#0369a1;--green:#0f766e;--ok:#d6f3ef;--warn:#fff1d6;--bad:#fde2df;--evc:#dbeafe;--sh:0 1px 2px #0c4a6e14,0 8px 24px #0c4a6e14}
:root[data-theme=forest]{--bg:#f1f6f1;--bg2:#e3efe4;--card:#fff;--ink:#10251a;--mut:#4d6455;--line:#d9e7da;--brand:#15803d;--brand2:#166534;--green:#15803d;--ok:#dcfce7;--warn:#fef3c7;--bad:#fde2df;--evc:#dbeafe;--sh:0 1px 2px #14532d14,0 8px 24px #14532d14}
:root[data-theme=sunset]{--bg:#fff7ef;--bg2:#fcebdc;--card:#fff;--ink:#2a1408;--mut:#7a5240;--line:#f6dfcb;--brand:#ea580c;--brand2:#c2410c;--green:#15803d;--ok:#dcfce7;--warn:#ffedd5;--bad:#fde2df;--evc:#e0e7ff;--sh:0 1px 2px #9a341214,0 8px 24px #be185d14}
:root[data-theme=contrast]{--bg:#fff;--bg2:#f3f3f3;--card:#fff;--ink:#000;--mut:#1f2937;--line:#000;--brand:#0000cc;--brand2:#000099;--green:#006400;--ok:#ccffcc;--warn:#ffff99;--bad:#ffcccc;--evc:#cce0ff;--sh:none}
:root[data-theme=contrast] a{text-decoration:underline}:root[data-theme=contrast] *:focus-visible{outline:3px solid #ff0 !important;outline-offset:2px}:root[data-theme=contrast] .card{border:2px solid #000}
/* map tiles: dark themes invert, light/coloured themes never do (even when the OS is dark) */
:root[data-theme=midnight] .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9)}
:root:is([data-theme=ocean],[data-theme=forest],[data-theme=sunset],[data-theme=contrast]) .leaflet-tile-pane{filter:none !important}
/* brand logo: the real mark (logo.svg) on light themes; the real app icon (mark on its dark tile) on dark / saturated / high-contrast themes */
.lg-d{display:none;border-radius:22%}
:root:is([data-theme=dark],[data-theme=midnight],[data-theme=sunset],[data-theme=contrast]) .lg-l{display:none}
:root:is([data-theme=dark],[data-theme=midnight],[data-theme=sunset],[data-theme=contrast]) .lg-d{display:inline-block}
@media (prefers-color-scheme:dark){:root:is(:not([data-theme]),[data-theme=system]) .lg-l{display:none}:root:is(:not([data-theme]),[data-theme=system]) .lg-d{display:inline-block}}
/* swatch picker (modeled on NestQueue) */
.swatches{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sw{position:relative;margin:0;font-weight:600;font-size:13px;color:var(--ink);display:block}.sw input{position:absolute;inset:0;opacity:0;pointer-events:none;width:1px;height:1px;min-height:0;margin:0;padding:0}
.sw span{display:flex;gap:8px;align-items:center;padding:7px 8px;border-radius:10px;border:1px solid var(--line);background:var(--card);cursor:pointer}.sw input:checked+span{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 35%,transparent)}.sw input:focus-visible+span{outline:2px solid var(--brand)}
.sw i{width:18px;height:18px;border-radius:50%;flex:none;border:1px solid #0002}
.sw[data-sw=system] i{background:linear-gradient(135deg,#fff 50%,#0d1512 50%)}.sw[data-sw=light] i{background:linear-gradient(135deg,#f7f8f6 50%,#ff7a00 50%)}.sw[data-sw=dark] i{background:linear-gradient(135deg,#16231e 50%,#ff7a00 50%)}
.sw[data-sw=ocean] i{background:linear-gradient(135deg,#eef6fb 50%,#0284c7 50%)}.sw[data-sw=forest] i{background:linear-gradient(135deg,#f1f6f1 50%,#15803d 50%)}.sw[data-sw=sunset] i{background:linear-gradient(135deg,#fff7ef 50%,#ea580c 50%)}
.sw[data-sw=midnight] i{background:linear-gradient(135deg,#0e1430 50%,#8b5cf6 50%)}.sw[data-sw=contrast] i{background:linear-gradient(135deg,#fff 50%,#000 50%)}
.themepick{position:relative}.themepick>summary{list-style:none;cursor:pointer;display:grid;place-items:center;border:1px solid var(--line);color:var(--ink);border-radius:10px;width:36px;height:36px;font-size:16px}.themepick>summary::-webkit-details-marker{display:none}
.themepick .tpop{position:absolute;right:0;top:44px;z-index:80;width:260px;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:0 12px 34px #0003}.themepick .tpop b{display:block;margin:0 0 8px;font-size:13px}
.themepick.fixed{position:fixed;top:calc(14px + env(safe-area-inset-top,0px));right:calc(14px + env(safe-area-inset-right,0px));z-index:60}
.themepick .tpop{max-width:calc(100vw - 28px)}
