html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body { background:#f1f5f9 !important; color:#0f172a !important; }
html[data-theme="light"] .bg-slate-950 { background-color:#f8fafc !important; }
html[data-theme="light"] .bg-slate-900 { background-color:#ffffff !important; }
html[data-theme="light"] .bg-slate-900\/60 { background-color:rgba(255,255,255,.88) !important; }
html[data-theme="light"] .bg-slate-800 { background-color:#e2e8f0 !important; }
html[data-theme="light"] .bg-slate-800\/40 { background-color:rgba(226,232,240,.55) !important; }
html[data-theme="light"] .text-slate-100 { color:#0f172a !important; }
html[data-theme="light"] .text-slate-300 { color:#334155 !important; }
html[data-theme="light"] .text-slate-400 { color:#475569 !important; }
html[data-theme="light"] .text-slate-500 { color:#64748b !important; }
html[data-theme="light"] .border-slate-800 { border-color:#cbd5e1 !important; }
html[data-theme="light"] .border-slate-700 { border-color:#cbd5e1 !important; }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea { background-color:#fff !important; color:#0f172a !important; border-color:#cbd5e1 !important; }
html[data-theme="light"] .mapping-table thead th { background:#e2e8f0 !important; color:#0f172a !important; }
html[data-theme="light"] .mapping-table tbody td { background-color:#fff !important; color:#0f172a; border-color:#e2e8f0 !important; }
html[data-theme="light"] .mapping-table tbody tr:hover td { background:#f1f5f9 !important; }
html[data-theme="light"] .mapping-row:has(.mapping-select:checked) td { background:#dbeafe !important; }
html[data-theme="light"] .mapping-lane { color:#0f172a !important; }
html[data-theme="light"] .mapping-lane.bg-emerald-950\/50 { background:#d1fae5 !important; }
html[data-theme="light"] .mapping-lane.bg-amber-950\/50 { background:#fef3c7 !important; }
html[data-theme="light"] #address-choice-dialog,
html[data-theme="light"] #row-dialog { background:#fff !important; color:#0f172a !important; }
html[data-theme="light"] .text-emerald-300 { color:#047857 !important; }
html[data-theme="light"] .text-amber-300 { color:#b45309 !important; }
html[data-theme="light"] .text-sky-400 { color:#0369a1 !important; }
html[data-theme="light"] .text-sky-300 { color:#0369a1 !important; }
html[data-theme="light"] .bg-amber-950\/40 { background:rgba(254,243,199,.8) !important; }
html[data-theme="light"] .border-amber-700\/60 { border-color:#d97706 !important; }
html[data-theme="light"] .text-amber-200 { color:#78350f !important; }

.app-shell { display:flex; flex-direction:column; min-height:100vh; }
.app-sidebar { display:none; }
.app-main { min-width:0; width:100%; flex:1 1 0%; }
.app-theme-bar { display:none; min-height:3rem; }
.app-mobile-header { display:flex; }
.app-sidebar nav { display:flex; flex-direction:column; gap:.25rem; }
.app-caution { margin-top:2rem; }
.app-content { min-width:0; padding:1rem; }
@media (min-width:640px) {
  .app-content { padding:1.5rem; }
}
@media (min-width:1024px) {
  .app-shell { display:grid; grid-template-columns:16rem minmax(0,1fr); align-items:start; }
  .app-sidebar { box-sizing:border-box; position:sticky; top:0; display:flex; width:16rem; height:100vh; min-height:0; overflow-y:auto; flex-direction:column; }
  .app-caution { margin-top:auto; }
  .app-mobile-header { display:none; }
  .app-main { min-width:0; width:100%; }
  .app-theme-bar { display:flex; }
  .app-content { min-width:0; padding:2rem; }
}

.theme-switch { min-height:36px; cursor:pointer; }
.theme-bulb { width:25px; height:25px; overflow:visible; fill:none; stroke:#cbd5e1; stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; transition:stroke .2s ease,fill .2s ease,filter .2s ease; }
.theme-switch[aria-checked="true"] .theme-bulb { fill:#fde047; stroke:#facc15; filter:drop-shadow(0 0 5px rgba(250,204,21,.9)) drop-shadow(0 0 11px rgba(250,204,21,.5)); }
.theme-switch[aria-checked="false"] .theme-bulb { fill:transparent; stroke:#cbd5e1; filter:none; }
html[data-theme="light"] .theme-switch[aria-checked="false"] .theme-bulb { stroke:#475569; }

*,*::before,*::after { animation-duration:.06s !important; animation-delay:0s !important; transition-duration:.06s !important; transition-delay:0s !important; scroll-behavior:auto !important; }
[data-theme-toggle] { transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
html[data-theme="light"] [data-theme-toggle] { border-color:#cbd5e1; color:#334155; }
html[data-theme="light"] [data-theme-toggle]:hover { background:#e2e8f0; }
.sync-solvynx-button { border-color:#6d28d9; background:#6d28d9; color:#fff; }
.sync-solvynx-button:hover:not(:disabled) { border-color:#5b21b6; background:#5b21b6; }
.sync-solvynx-button:focus-visible { outline:3px solid #c4b5fd; outline-offset:2px; }
.sync-solvynx-button:disabled { cursor:wait; opacity:.7; }
html[data-theme="light"] .sync-solvynx-button { border-color:#4c1d95; background:#5b21b6; color:#fff; }
html[data-theme="light"] .sync-solvynx-button:hover:not(:disabled) { border-color:#3b0764; background:#4c1d95; }
html[data-theme="light"] .bg-slate-900\/70,
html[data-theme="light"] .bg-slate-900\/80,
html[data-theme="light"] .mapping-summary,
html[data-theme="light"] .mapping-page-header { background:#fff !important; }
html[data-theme="light"] .mapping-table tbody tr.approval-approved td,
html[data-theme="light"] .mapping-table tbody tr.approval-pending td,
html[data-theme="light"] .mapping-table tbody tr.approval-rejected td { background:#fff !important; color:#334155 !important; }
html[data-theme="light"] .mapping-table tbody tr:hover td { background:#f1f5f9 !important; }
.modbus-group-badge { display:inline-flex; min-width:2rem; justify-content:center; border:1px solid transparent; border-radius:9999px; padding:.2rem .55rem; font-size:10px; font-weight:750; letter-spacing:.04em; font-variant-numeric:tabular-nums; }
.modbus-group-badge { background:hsl(var(--group-hue,210deg) 52% 23%); color:hsl(var(--group-hue,210deg) 90% 88%); border-color:hsl(var(--group-hue,210deg) 38% 38%); }
.mapping-table td[title^="Bit index"] { background:rgb(14 116 144 / .16); color:#bae6fd; font-weight:700; }
html[data-theme="light"] .mapping-table .modbus-group-badge { background:hsl(var(--group-hue,210deg) 80% 93%); color:hsl(var(--group-hue,210deg) 62% 29%); border-color:hsl(var(--group-hue,210deg) 55% 76%); }
html[data-theme="light"] .mapping-table td[title^="Bit index"] { background:#cffafe !important; color:#164e63 !important; }
