/* Themes: chosen per company (Settings → Company & brand) and per user (menu → Appearance).
   html[data-theme=...] picks the palette; html[data-mode=light|dark] forces a mode (otherwise the device decides).
   Generated; Aurora (violet) is the default in modern.css. */
html[data-theme="ocean"] { --accent: #0e7c86; --accent-2: #2a78d6; --accent-soft: #e3f3f4; --bg: #f1f6f7; --line: #dde8ea; --muted: #5c7178; --side: #052a33; --side-2: #0a3c48; --side-text: #a6c8ce; --ring: 0 0 0 4px rgba(14,124,134,.18); }
@media (prefers-color-scheme: dark) { html[data-theme="ocean"]:not([data-mode="light"]) { --accent: #2bb3bd; --accent-2: #5ea0ff; --accent-soft: #10333a; --bg: #061316; --panel: #0c1e23; --line: #1a3940; --text: #e3f1f3; --muted: #8fb0b6; --side: #030d10; --side-2: #08191d; --side-text: #9fc2c8; --ring: 0 0 0 4px rgba(43,179,189,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); } }
html[data-theme="ocean"][data-mode="dark"] { --accent: #2bb3bd; --accent-2: #5ea0ff; --accent-soft: #10333a; --bg: #061316; --panel: #0c1e23; --line: #1a3940; --text: #e3f1f3; --muted: #8fb0b6; --side: #030d10; --side-2: #08191d; --side-text: #9fc2c8; --ring: 0 0 0 4px rgba(43,179,189,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); }
html[data-theme="desert"] { --accent: #a8701a; --accent-2: #8a1c3a; --accent-soft: #f7eedb; --bg: #f7f2ea; --panel: #fffdf9; --line: #e8ddc9; --text: #2a2116; --muted: #7a6a55; --side: #3b0e1d; --side-2: #561528; --side-text: #e9d0a8; --ring: 0 0 0 4px rgba(168,112,26,.18); }
@media (prefers-color-scheme: dark) { html[data-theme="desert"]:not([data-mode="light"]) { --accent: #d9a441; --accent-2: #c24467; --accent-soft: #2e2312; --bg: #13100b; --panel: #1c1711; --line: #33291c; --text: #f1e8da; --muted: #b2a38c; --side: #190810; --side-2: #290c18; --side-text: #e0c79c; --ring: 0 0 0 4px rgba(217,164,65,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); } }
html[data-theme="desert"][data-mode="dark"] { --accent: #d9a441; --accent-2: #c24467; --accent-soft: #2e2312; --bg: #13100b; --panel: #1c1711; --line: #33291c; --text: #f1e8da; --muted: #b2a38c; --side: #190810; --side-2: #290c18; --side-text: #e0c79c; --ring: 0 0 0 4px rgba(217,164,65,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); }
html[data-theme="emerald"] { --accent: #0f9361; --accent-2: #0a7c8c; --accent-soft: #e3f5ec; --bg: #f2f7f4; --line: #dbe9e1; --muted: #5d7468; --side: #052417; --side-2: #0a3826; --side-text: #a7ccb9; --ring: 0 0 0 4px rgba(15,147,97,.18); }
@media (prefers-color-scheme: dark) { html[data-theme="emerald"]:not([data-mode="light"]) { --accent: #34c98a; --accent-2: #3bb3c3; --accent-soft: #10301f; --bg: #07120d; --panel: #0e1c15; --line: #1b3327; --text: #e2f2ea; --muted: #93b8a5; --side: #030b07; --side-2: #091911; --side-text: #9ec7b2; --ring: 0 0 0 4px rgba(52,201,138,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); } }
html[data-theme="emerald"][data-mode="dark"] { --accent: #34c98a; --accent-2: #3bb3c3; --accent-soft: #10301f; --bg: #07120d; --panel: #0e1c15; --line: #1b3327; --text: #e2f2ea; --muted: #93b8a5; --side: #030b07; --side-2: #091911; --side-text: #9ec7b2; --ring: 0 0 0 4px rgba(52,201,138,.22); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); }
html[data-theme="classic"] { --accent: #1f5fbf; --accent-2: #1f5fbf; --accent-soft: #e8eef9; --bg: #f4f5f7; --panel: #ffffff; --line: #d3d8e0; --text: #111827; --muted: #4b5563; --side: #1f2937; --side-2: #273244; --side-text: #d6dae1; --grad: var(--accent); --radius: 10px; --ring: 0 0 0 3px rgba(31,95,191,.25); }
@media (prefers-color-scheme: dark) { html[data-theme="classic"]:not([data-mode="light"]) { --accent: #6ea2ff; --accent-2: #6ea2ff; --accent-soft: #1a2740; --bg: #0f1218; --panel: #171b23; --line: #2a303c; --text: #eef1f6; --muted: #a3acbb; --side: #0b0e13; --side-2: #141922; --side-text: #c9cfda; --grad: var(--accent); --ring: 0 0 0 3px rgba(110,162,255,.3); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); } }
html[data-theme="classic"][data-mode="dark"] { --accent: #6ea2ff; --accent-2: #6ea2ff; --accent-soft: #1a2740; --bg: #0f1218; --panel: #171b23; --line: #2a303c; --text: #eef1f6; --muted: #a3acbb; --side: #0b0e13; --side-2: #141922; --side-text: #c9cfda; --grad: var(--accent); --ring: 0 0 0 3px rgba(110,162,255,.3); --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); }
html[data-theme="midnight"] { --accent: #e0457b; --accent-2: #8b5cf6; --accent-soft: #2a1630; --bg: #0c1016; --panel: #151a24; --line: #252e3e; --text: #e6e9f0; --muted: #8f99ad; --side: #080b10; --side-2: #10141d; --side-text: #a8b1c4; --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.5); --ring: 0 0 0 4px rgba(224,69,123,.25); }

/* the sign-in screen, license screen and sidebar take the theme's menu colours */
html[data-theme] .login-screen, html[data-theme] .license-lock { background: radial-gradient(700px 400px at 15% 10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
  radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 60%), linear-gradient(160deg, var(--side), var(--side-2)); }
html[data-theme] .sidebar { background: linear-gradient(180deg, var(--side), var(--side-2)); }
html[data-theme="classic"] body { background: var(--bg); }
html[data-theme="classic"] .card, html[data-theme="classic"] .kpi { box-shadow: none; }
html[data-theme="classic"] .sidebar a.active, html[data-theme="classic"] .tabbar a.active { box-shadow: none; }
html[data-theme="desert"] h1 { letter-spacing: -.01em; }

/* theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.theme-card { border: 2px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: var(--panel);
  text-align: left; font: inherit; color: var(--text); }
.theme-card.active { border-color: var(--accent); box-shadow: var(--ring); }
.theme-card .th-sw { display: grid; grid-template-columns: 26% 1fr; height: 64px; }
.theme-card .th-sw i { display: block; }
.theme-card .th-sw .main { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.theme-card .th-sw .main b { display: block; height: 8px; border-radius: 4px; }
.theme-card span { display: block; padding: 6px 10px 8px; font-size: 13px; font-weight: 650; }
.theme-card small { display: block; padding: 0 10px 8px; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: -6px; }

