:root {
  color-scheme: dark;
  --panel: rgba(255, 255, 255, 0.08);
  --dashboard-background: radial-gradient(circle at top left, rgba(115, 210, 222, 0.16), transparent 34%), linear-gradient(135deg, #214b8f, #12346a);
  --panel-opacity: 1;
  --panel-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  --panel-radius: 8px;
  --side-menu-background: rgba(26, 49, 91, 0.97);
  --config-center-background: rgba(30, 64, 116, 0.98);
  --overlay-opacity: 0.62;
  --section-font-family: system-ui;
  --section-font-size: 23px;
  --section-font-color: #f5f7fb;
  --section-font-weight: 800;
  --helper-font-family: system-ui;
  --helper-font-size: 16px;
  --helper-font-color: #c9d6f2;
  --helper-font-weight: 400;
  --panel-soft: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f7fb;
  --muted: #aeb7c8;
  --line: rgba(255, 255, 255, 0.15);
  --accent: #73d2de;
  --accent-2: #f2b84b;
  --good: #63d471;
  --bad: #ff6b6b;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  --panel-accent: rgba(115, 210, 222, 0.75);
  --panel-accent-soft: rgba(115, 210, 222, 0.13);
  --font-family-base: "Segoe UI", Arial, sans-serif;
  --font-size-base: 16px;
  --panel-blur: 0px;
  --wallpaper-background: transparent;
  --wallpaper-opacity: 0;
  --wallpaper-position: center center;
  --wallpaper-size: cover;
  --wallpaper-blur: 0px;
  --wallpaper-dim: 0;
  --gallery-accent: #60beff;
  --gallery-accent-soft: rgba(96, 190, 255, 0.12);
  --music-accent: #ff5f5f;
  --music-accent-soft: rgba(255, 95, 95, 0.12);
  --weather-accent: #73d2de;
  --weather-accent-soft: rgba(115, 210, 222, 0.13);
  --monitoring-accent: #63d471;
  --monitoring-accent-soft: rgba(99, 212, 113, 0.12);
  --energy-accent: #f2b84b;
  --energy-accent-soft: rgba(242, 184, 75, 0.13);
  --alerts-accent: #ff8f70;
  --alerts-accent-soft: rgba(255, 143, 112, 0.13);
  --button-background: #75d5e3;
  --button-text: #06131e;
  --input-background: rgba(255, 255, 255, 0.11);
  --input-text: #f5f7fb;
  --hover: rgba(255, 255, 255, 0.14);
  --focus: #73d2de;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--dashboard-background);
  isolation: isolate;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: var(--wallpaper-opacity);
  background: var(--wallpaper-background);
  background-position: var(--wallpaper-position);
  background-size: var(--wallpaper-size);
  background-repeat: no-repeat;
  filter: blur(var(--wallpaper-blur));
  transform: scale(1.03);
}

body::after {
  background: rgba(0, 0, 0, var(--wallpaper-dim));
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 38px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.home-link:hover {
  color: var(--accent);
}

.weather {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  font-size: 1.02rem;
  font-weight: 720;
  white-space: nowrap;
}

.weather-temp {
  color: #fff;
}

.weather-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.clock {
  min-width: 210px;
  text-align: right;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.time {
  font-size: 2.2rem;
  font-weight: 760;
  line-height: 1;
}

.date {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.98rem;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 26px;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  padding: 0 16px;
}

.search-icon {
  color: var(--muted);
  font-size: 1.15rem;
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 1.02rem;
}

input::placeholder {
  color: #c4cad7;
}

.search-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #172025;
  background: var(--accent);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.search-button:hover {
  filter: brightness(1.06);
}

.dashboard-stack {
  display: grid;
  gap: 20px;
}

.app-layout,
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--panel);
  opacity: var(--panel-opacity);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(var(--panel-blur));
  padding: 18px;
}

.panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--panel-accent), transparent 72%);
  content: "";
}

.panel::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--panel-accent-soft), transparent 42%);
  pointer-events: none;
  content: "";
}

.panel > * {
  position: relative;
  z-index: 1;
}


.panel-home {
  --panel-accent: rgba(99, 212, 113, 0.78);
  --panel-accent-soft: rgba(99, 212, 113, 0.12);
}

.panel-site {
  --panel-accent: rgba(166, 177, 255, 0.78);
  --panel-accent-soft: rgba(166, 177, 255, 0.12);
}

.panel-tools {
  --panel-accent: rgba(70, 217, 200, 0.78);
  --panel-accent-soft: rgba(70, 217, 200, 0.12);
}


.panel-gallery {
  --panel-accent: var(--gallery-accent);
  --panel-accent-soft: var(--gallery-accent-soft);
}

.panel-youtube {
  --panel-accent: var(--music-accent);
  --panel-accent-soft: var(--music-accent-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.media-panel {
  min-height: 290px;
}

.slideshow-tile,
.youtube-frame {
  display: grid;
  min-height: 290px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.slideshow-tile:hover {
  border-color: var(--panel-accent);
  background-color: var(--panel-strong);
}

.slideshow-image {
  display: grid;
  place-items: center;
  min-height: 290px;
  background:
    linear-gradient(135deg, rgba(115, 210, 222, 0.36), rgba(242, 184, 75, 0.24)),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 32%);
  background-position: center;
  background-size: cover;
}

.slideshow-placeholder {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font-weight: 760;
}

.slideshow-placeholder[hidden] {
  display: none;
}

.slideshow-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 13px 15px;
}

.youtube-frame {
  position: relative;
  place-items: stretch;
}
.media-header {
  align-items: center;
}

.youtube-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: min(620px, 76%);
}

.youtube-search {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 34px;
  align-items: center;
  gap: 6px;
}

.youtube-search input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font: inherit;
  outline: none;
}

.youtube-search input::placeholder {
  color: var(--muted);
}

.youtube-search input:focus {
  border-color: var(--panel-accent);
  background: rgba(255, 255, 255, 0.16);
}

.youtube-search button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: var(--panel-accent-soft);
  color: var(--text);
  cursor: pointer;
}

.youtube-search button:hover {
  border-color: var(--panel-accent);
  background: var(--panel-strong);
}
.youtube-autoplay {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.youtube-autoplay input {
  width: 16px;
  height: 16px;
  accent-color: rgb(255, 95, 95);
}

#youtube-player,
.youtube-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 290px;
  border: 0;
}
.youtube-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 290px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.youtube-empty .youtube-logo {
  width: 62px;
  height: 62px;
  font-size: 1.5rem;
}
.youtube-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.youtube-results:empty {
  display: none;
  margin-top: 0;
}

.youtube-result {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.youtube-result:hover {
  border-color: var(--panel-accent);
  background: rgba(255, 255, 255, 0.13);
}

.youtube-result img {
  width: 86px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  object-fit: cover;
}

.youtube-result span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
}

.youtube-message {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.youtube-message.error {
  border-color: rgba(255, 95, 95, 0.45);
  color: #ffd3d3;
}

.youtube-logo {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 95, 95, 0.28);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}
.panel-monitoring {
  --panel-accent: var(--monitoring-accent);
  --panel-accent-soft: var(--monitoring-accent-soft);
}

.panel-energy {
  --panel-accent: var(--energy-accent);
  --panel-accent-soft: var(--energy-accent-soft);
}


/* Compact EcoFlow tile on the default dashboard and full energy page. */
.energy-home-tile {
  cursor: pointer;
  min-height: 0;
}

.energy-home-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.energy-home-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px 0 2px;
}

.energy-home-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  color: #ffc928;
}

.energy-home-icon svg,
.ecoflow-icon svg,
.ecoflow-statusbar svg,
.panel-energy .panel-icon svg {
  width: 1.4em;
  height: 1.4em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.energy-home-icon svg {
  width: 54px;
  height: 54px;
}

.energy-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  padding: 44px 24px;
  background: rgba(16, 43, 87, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.energy-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.energy-overlay-shell {
  width: min(1180px, 100%);
}

.energy-overlay-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--text);
  text-align: center;
}

.energy-overlay-topbar h2,
.energy-overlay-topbar p {
  margin: 0;
}

.energy-overlay-topbar h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
}

.energy-overlay-topbar p {
  color: var(--muted);
}

.energy-overlay-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.energy-overlay-button:hover {
  border-color: var(--accent);
  background: var(--panel-strong);
}

.energy-overlay .ecoflow-panel {
  display: grid;
  gap: 16px;
  max-height: none;
}

.ecoflow-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: stretch;
}

.ecoflow-today,
.ecoflow-week,
.ecoflow-card,
.ecoflow-statusbar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 18px;
}

.ecoflow-chart-placeholder {
  display: grid;
  min-height: 112px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: var(--muted);
}

.ecoflow-source {
  margin-top: 0;
}

.ecoflow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ecoflow-card {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-height: 210px;
  text-align: center;
}

.ecoflow-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--panel-accent);
}

.ecoflow-icon svg {
  width: 48px;
  height: 48px;
}

.ecoflow-label {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ecoflow-main {
  font-size: 2.2rem;
  font-weight: 850;
}

.ecoflow-main small,
.ecoflow-sub {
  color: var(--muted);
}

.ecoflow-sub {
  display: grid;
  gap: 3px;
}

.ecoflow-sub strong,
.ecoflow-statusbar strong {
  color: var(--good);
}

.ecoflow-statusbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.ecoflow-statusbar div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  align-items: center;
}

.ecoflow-statusbar span {
  grid-row: span 2;
  color: var(--muted);
}

.ecoflow-statusbar small {
  color: var(--muted);
  font-size: 0.78rem;
}

.ecoflow-card-pv .ecoflow-icon { color: #ffc928; }
.ecoflow-card-home .ecoflow-icon { color: #59d98e; }
.ecoflow-card-battery .ecoflow-icon { color: #82e184; }
.ecoflow-card-grid .ecoflow-icon { color: #29a8ff; }





.panel-alerts {
  --panel-accent: var(--alerts-accent);
  --panel-accent-soft: var(--alerts-accent-soft);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title {
  display: inline-flex;
  font-family: var(--section-font-family);
  font-size: var(--section-font-size);
  color: var(--section-font-color);
  font-weight: var(--section-font-weight);
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--panel-accent);
  background: var(--panel-accent-soft);
  font-size: 1rem;
}

.section-count,
.panel-note {
  color: var(--helper-font-color);
  font-family: var(--helper-font-family);
  font-size: var(--helper-font-size);
  font-weight: var(--helper-font-weight);
  font-size: 0.86rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 13px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(115, 210, 222, 0.5);
  background: var(--panel-strong);
}

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.45rem;
  line-height: 1;
}

.icon img {
  display: block;
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
}

.name {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 730;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status::before,
.state-dot::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.checking {
  color: var(--accent-2);
}

.online,
.good {
  color: var(--good);
}

.offline,
.bad {
  color: var(--bad);
}

.warn {
  color: var(--accent-2);
}

.hidden {
  display: none !important;
}

.empty {
  display: none;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
}

body.no-results .empty {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.metric {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  text-align: center;
}

.metric-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 10px auto 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from -90deg, var(--accent) calc(var(--value) * 1%), transparent 0);
}

.ring span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: inherit;
  background: rgba(30, 60, 114, 0.95);
  font-weight: 760;
}
.metric-sub {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.state-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.energy-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
}

.energy-value {
  font-size: 2rem;
  font-weight: 780;
}

.energy-value small {
  color: var(--muted);
  font-size: 0.95rem;
}

.energy-change {
  margin-top: 8px;
  color: var(--good);
  font-weight: 720;
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 9px;
  min-height: 128px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 4px 4px 12px;
}

.bar {
  display: grid;
  align-items: end;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.bar::before {
  display: block;
  height: var(--height);
  min-height: 18px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(to top, #4fb8f2, #8bdcf0);
  content: "";
}

.alert-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.alert-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.alert-row:last-child {
  border-bottom: 0;
}

.alert-text {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.alert-time {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}









.weather-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 47, 96, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.weather-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.weather-panel {
  width: min(1320px, 96vw);
  max-height: min(860px, 94vh);
  overflow-y: auto;
  border: 1px solid rgba(134, 193, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(38, 77, 139, 0.98), rgba(23, 54, 110, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  padding: 16px;
  color: #fff;
}

.weather-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.weather-back {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 11px;
  font: inherit;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.weather-back:hover {
  border-color: rgba(115, 210, 222, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.weather-panel-location {
  margin-top: 0;
  color: var(--muted);
  font-weight: 700;
}

.weather-panel-main {
  display: grid;
  place-items: center;
  min-height: 188px;
  margin: 8px 0 16px;
  text-align: center;
}

.weather-panel-icon {
  font-size: 3.4rem;
  line-height: 1;
}

.weather-panel-temp {
  font-size: clamp(4.2rem, 9vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
}

.weather-panel-desc {
  margin-top: 5px;
  color: #cfe4ff;
  font-size: 1rem;
  font-weight: 700;
}

.weather-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.weather-panel-grid div {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.weather-panel-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-panel-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1rem;
}


.weather-forecast-section {
  margin-top: 16px;
}

.weather-forecast-section h2 {
  margin: 0 0 9px;
  color: #eaf4ff;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.weather-hourly-grid-wrapper {
  --hourly-gap: 12px;
  width: 100%;
  overflow-x: auto;
}

.weather-chart {
  min-width: calc(8 * 74px + 7 * var(--hourly-gap));
  height: 112px;
  margin-bottom: var(--hourly-gap);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.weather-chart svg {
  display: block;
  width: 100%;
  height: 112px;
}

.weather-hourly,
.weather-daily {
  display: grid;
  gap: 9px;
}

.weather-hourly {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--hourly-gap);
  min-width: calc(8 * 74px + 7 * var(--hourly-gap));
  overflow-x: visible;
  padding-bottom: 4px;
}

.weather-hour-item,
.weather-day-item {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 7px;
  text-align: center;
}

.weather-hour-time,
.weather-day-name {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.weather-hour-icon,
.weather-day-icon {
  margin-top: 5px;
  font-size: 1.05rem;
  line-height: 1;
}

.weather-hour-temp,
.weather-day-max {
  margin-top: 5px;
  font-size: 0.96rem;
  font-weight: 800;
}

.weather-hour-rain,
.weather-day-rain,
.weather-day-min {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.weather-daily {
  grid-template-columns: repeat(7, minmax(74px, 1fr));
}

.weather-day-item.today {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(134, 193, 255, 0.34);
}










/* Weather visual polish */
.weather-overlay {
  transition: opacity 280ms ease;
}

.weather-overlay.open .weather-panel {
  transform: translateY(0) scale(1);
}

.weather-panel {
  transform: translateY(10px) scale(0.985);
  transition: transform 280ms ease;
}

.weather-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.weather-updated {
  color: rgba(218, 232, 255, 0.7);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: right;
}

.weather-updated span,
.weather-updated strong {
  display: block;
}

.weather-updated strong {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.weather-panel-main {
  display: grid;
  place-items: center;
  min-height: 210px;
  margin: 6px 0 18px;
  text-align: center;
}

.weather-panel-current {
  display: grid;
  place-items: center;
}

.weather-panel-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.weather-panel-icon {
  font-size: 5.2rem;
  filter: drop-shadow(0 8px 18px rgba(255, 204, 80, 0.16));
}

.weather-panel-desc {
  margin-top: 8px;
  font-size: 1.08rem;
}

.weather-panel-location {
  margin-top: 8px;
  color: rgba(218, 232, 255, 0.72);
}

.weather-panel-grid div {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  padding: 12px 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.weather-panel-grid strong {
  font-size: 1.18rem;
}

.weather-panel-grid div:hover,
.weather-hour-item:hover,
.weather-day-item:hover {
  transform: translateY(-1px);
  border-color: rgba(115, 210, 222, 0.42);
}

.weather-chart {
  opacity: 0;
  transform: translateY(4px);
  animation: weatherChartIn 280ms ease forwards;
}

.weather-hour-item,
.weather-day-item {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.weather-hour-item.now,
.weather-day-item.today {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(134, 193, 255, 0.46);
  box-shadow: 0 0 22px rgba(115, 210, 222, 0.12);
}

@keyframes weatherChartIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Weather compact temperature/location adjustment */
.weather-panel-main {
  min-height: 150px;
  margin: 0 0 12px;
}

.weather-panel-primary {
  gap: 18px;
}

.weather-panel-temp {
  font-size: clamp(3.4rem, 7vw, 5.6rem);
}

.weather-panel-icon {
  font-size: 4.6rem;
}

.weather-panel-side {
  max-width: 260px;
  text-align: left;
}

.weather-panel-side .weather-panel-location {
  margin-top: 0;
  color: rgba(218, 232, 255, 0.76);
  font-size: 1rem;
  line-height: 1.3;
}

.weather-panel-desc {
  margin-top: 4px;
}

.weather-forecast-section {
  margin-top: 13px;
}



/* Weather final spacing adjustment */
.weather-panel-main {
  min-height: 132px;
  margin: -4px 0 10px;
}

.weather-panel-primary {
  gap: 34px;
  transform: translateX(-54px);
}

.weather-panel-temp {
  font-size: clamp(3.15rem, 6.4vw, 5.1rem);
}

.weather-panel-icon {
  font-size: 4.1rem;
}

.weather-panel-side {
  min-width: 310px;
  transform: translateX(28px);
}

.weather-panel-side .weather-panel-location {
  font-size: 0.96rem;
}

.weather-panel-desc {
  margin-top: 2px;
}

/* Weather description alignment */
.weather-panel-desc {
  transform: translateX(-54px);
  text-align: center;
}

/* Weather description final center under temperature */
.weather-panel-desc {
  transform: translateX(-164px);
}

/* Collapsible app sections */
.collapsible-section {
  overflow: hidden;
}

.collapsible-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.collapsible-trigger.panel-header {
  margin-bottom: 0;
  padding: 0;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.section-arrow {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  transition: transform 280ms ease, color 180ms ease;
}

.collapsible-section.is-expanded .section-arrow {
  color: #fff;
}

.collapsible-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 300ms ease, opacity 220ms ease, transform 300ms ease;
}

.collapsible-section.is-expanded .collapsible-content {
  opacity: 1;
  transform: translateY(0);
}

.collapsible-content .app-grid {
  padding-top: 14px;
}

/* Independent collapsible sections fix */
.app-layout {
  align-items: start;
}

.collapsible-section {
  align-self: start;
  height: auto;
  min-height: 0;
}

.collapsible-section.is-collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.collapsible-section.is-expanded .collapsible-content {
  pointer-events: auto;
}

/* Native gallery overlay */
.gallery-panel {
  display: flex;
  flex-direction: column;
  width: min(1500px, 96vw);
  height: min(900px, 94vh);
  max-height: min(900px, 94vh);
  overflow: hidden;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.gallery-actions {
  display: flex;
  gap: 8px;
}

.gallery-nav-button {
  width: 44px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.gallery-nav-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.gallery-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.gallery-heading strong {
  color: #fff;
  font-size: 18px;
}

.gallery-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.gallery-breadcrumb button {
  border: 0;
  background: transparent;
  color: #dbeafe;
  padding: 3px 0;
  font: inherit;
  cursor: pointer;
}

.gallery-breadcrumb span {
  color: rgba(255, 255, 255, 0.45);
}

.gallery-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.gallery-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
}

.gallery-state-card {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.gallery-state-card a {
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.gallery-section-title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  color: #fff;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(115, 209, 230, 0.62);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: rgba(17, 43, 88, 0.72);
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-folder-icon,
.gallery-video-icon {
  font-size: 42px;
  opacity: 0.72;
}

.gallery-card-label {
  padding: 10px 12px 12px;
  display: grid;
  gap: 3px;
}

.gallery-card-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.gallery-card-meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.gallery-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(1, 10, 28, 0.9);
  padding: 56px 72px;
}

.gallery-preview.open {
  display: flex;
}

.gallery-preview img {
    display: block;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.gallery-preview-action,
.gallery-preview-close,
.gallery-preview-arrow {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(36, 73, 132, 0.86);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-preview-actions {
  position: fixed;
  top: 22px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.gallery-preview-action,
.gallery-preview-close {
  position: static;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.gallery-preview-action {
  font-size: 0;
}

.gallery-preview-close {
  font-size: 25px;
}

.gallery-preview-action:hover,
.gallery-preview-close:hover {
  border-color: rgba(115, 210, 222, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.gallery-preview-action:disabled,
.gallery-preview-close:disabled {
  opacity: 0.55;
  cursor: default;
}

.gallery-preview-action span {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

#gallery-preview-slideshow span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

#gallery-preview-slideshow.is-running span::before,
#gallery-preview-slideshow.is-running span::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 5px;
  height: 14px;
  border: 0;
  background: currentColor;
}

#gallery-preview-slideshow.is-running span::before {
  left: 4px;
}

#gallery-preview-slideshow.is-running span::after {
  right: 4px;
}

#gallery-preview-download span::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 2px;
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: currentColor;
}

#gallery-preview-download span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
}

#gallery-preview-download.is-loading span::before,
#gallery-preview-download.is-loading span::after {
  content: "";
  position: absolute;
  inset: 3px;
  width: auto;
  height: auto;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  background: transparent;
  transform: none;
  animation: galleryPreviewSpin 900ms linear infinite;
}

#gallery-preview-download.is-loading span::after {
  display: none;
}

@keyframes galleryPreviewSpin {
  to { transform: rotate(360deg); }
}

.gallery-preview-arrow {
  top: 50%;
  width: 46px;
  height: 64px;
  transform: translateY(-50%);
  font-size: 44px;
}

.gallery-preview-prev {
  left: 20px;
}

.gallery-preview-next {
  right: 20px;
}

.gallery-preview-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}




/* Side menu */
.side-menu-toggle {
  position: fixed;
  top: 28px;
  left: max(18px, calc((100vw - 1280px) / 2 - 112px));
  z-index: 45;
  margin: 0;
  display: grid;
  gap: 5px;
  place-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.side-menu-toggle:hover,
.side-menu-toggle:focus-visible {
  border-color: rgba(115, 210, 222, 0.7);
  background: rgba(255, 255, 255, 0.16);
  outline: 0;
  transform: translateY(-1px);
}

.side-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.side-menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7, 18, 38, var(--overlay-opacity));
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.side-menu-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 90;
  width: min(370px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--side-menu-background);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  transform: translateX(calc(-100% - 28px));
  transition: transform 260ms ease;
}

.side-menu.is-open {
  transform: translateX(0);
}

.side-menu:focus {
  outline: 0;
}

.side-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px;
}

.side-menu-header p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.side-menu-header h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.side-menu-close,
.side-menu-back,
.side-menu-primary,
.side-menu-secondary,
.side-menu-item {
  font: inherit;
}

.side-menu-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.side-menu-close:hover,
.side-menu-back:hover,
.side-menu-secondary:hover,
.side-menu-item:hover {
  background: rgba(255, 255, 255, 0.14);
}

.side-menu-view {
  display: none;
  height: calc(100% - 82px);
  overflow-y: auto;
  padding: 18px 20px 22px;
}

.side-menu-view.is-active {
  display: block;
}

#side-menu-main.is-active {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.side-menu-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
}

.side-menu-item-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(115, 210, 222, 0.35);
  border-radius: 8px;
  background: rgba(115, 210, 222, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.side-menu-item strong,
.side-menu-item small {
  display: block;
}

.side-menu-item small {
  margin-top: 4px;
  color: var(--muted);
}

.side-menu-back {
  min-height: 38px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  cursor: pointer;
}

.side-menu-section {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.side-menu-section h3 {
  margin: 0;
  font-size: 1rem;
}

.side-menu-section label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.side-menu-section input,
.side-menu-section select {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  padding: 0 11px;
  font: inherit;
}

.side-menu-section select option {
  color: #172025;
}

.side-menu-app-slots {
  display: grid;
  gap: 12px;
}

.side-menu-app-slots label {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px;
}

.side-menu-note {
  min-height: 22px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.9rem;
}

.side-menu-actions {
  display: flex;
  gap: 9px;
}

.side-menu-primary,
.side-menu-secondary {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
}

.side-menu-primary {
  border: 0;
  color: #172025;
  background: var(--accent);
  font-weight: 760;
}

.side-menu-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.side-menu-about dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.side-menu-about dl div {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 10px;
}

.side-menu-about dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.side-menu-about dd {
  margin: 3px 0 0;
  font-weight: 720;
}

.side-menu-about p {
  margin: 4px 0 0;
  color: #dbe6ff;
  line-height: 1.45;
}








.settings-accordion {
  display: grid;
  gap: 9px;
}

.settings-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.settings-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  text-align: left;
}

.settings-group-trigger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.settings-group-arrow {
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-group-body {
  display: none;
  gap: 12px;
  padding: 12px;
}

.settings-group.is-open .settings-group-body {
  display: grid;
}

.settings-fields {
  display: grid;
  gap: 9px;
}

.settings-fields.two-columns {
  grid-template-columns: 1fr 1fr;
}

.settings-full-row {
  grid-column: 1 / -1;
}

.settings-item {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.settings-item-title {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 760;
}

.settings-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}



.settings-color-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.settings-color-row input[type="color"] {
  width: 48px;
  min-width: 48px;
  min-height: 40px;
  padding: 3px;
  cursor: pointer;
}

.settings-color-row code {
  min-height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 9px 11px;
  font: inherit;
  font-size: 0.9rem;
  text-overflow: ellipsis;
}

.about-edit-form {
  display: grid;
  gap: 12px;
}

.about-edit-form textarea {
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  padding: 10px 11px;
  font: inherit;
}

.about-actions {
  margin-top: 12px;
}

.side-menu-auth {
  min-width: 58px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  line-height: 1;
}

.side-menu-auth:hover,
.side-menu-auth:focus-visible {
  border-color: rgba(115, 210, 222, 0.7);
  background: rgba(255, 255, 255, 0.14);
  outline: 0;
}

.eva-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 18, 38, var(--overlay-opacity));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.eva-login-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.eva-login-dialog {
  width: min(100%, 360px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: var(--config-center-background);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42);
  transform: translateY(8px) scale(0.985);
  transition: transform 180ms ease;
}

.eva-login-overlay.is-open .eva-login-dialog {
  transform: translateY(0) scale(1);
}

.eva-login-dialog:focus {
  outline: 0;
}

.eva-login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 20px;
}

.eva-login-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.eva-login-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
}

.eva-login-close:hover,
.eva-login-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: 0;
}

.eva-login-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.eva-login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.eva-login-form input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--input-text);
  background: var(--input-background);
  font: inherit;
}

.eva-login-form input:focus {
  border-color: var(--accent);
  outline: 0;
}

.eva-login-submit {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--button-text);
  background: var(--button-background);
  cursor: pointer;
  font: inherit;
  font-weight: 760;
}

.eva-login-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.eva-login-message {
  margin: 0;
  color: var(--bad);
  font-size: 0.84rem;
}

.eva-about-overlay {
  position: fixed;
  inset: 0;
  z-index: 131;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 18, 38, var(--overlay-opacity));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.eva-about-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.eva-about-dialog {
  width: min(100%, 540px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: var(--config-center-background);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42);
  transform: translateY(8px) scale(0.985);
  transition: transform 180ms ease;
}

.eva-about-overlay.is-open .eva-about-dialog {
  transform: translateY(0) scale(1);
}

.eva-about-dialog:focus {
  outline: 0;
}

.eva-about-header {
  position: relative;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 24px 64px 20px;
  text-align: center;
}

.eva-about-heading {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.eva-about-logo {
  display: block;
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.eva-about-header h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}

.eva-about-header p {
  margin: 0;
  color: var(--muted);
}

.eva-about-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
}

.eva-about-close:hover,
.eva-about-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: 0;
}

.eva-about-content {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.eva-about-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}

.eva-about-facts div {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 9px;
}

.eva-about-facts dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.eva-about-facts dd {
  margin: 0;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.eva-about-description {
  margin: 0;
  color: #dbe6ff;
  line-height: 1.45;
}
/* Configuration center */
.config-center-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(7, 18, 38, var(--overlay-opacity));
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.config-center-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.config-center-dialog {
  display: grid;
  backdrop-filter: blur(var(--panel-blur));
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(90vw, 1480px);
  height: min(90vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--config-center-background);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42);
  transform: translateY(10px) scale(0.985);
  transition: transform 240ms ease;
}

.config-center-overlay.is-open .config-center-dialog {
  transform: translateY(0) scale(1);
}

.config-center-dialog:focus {
  outline: 0;
}

.config-center-header,
.config-center-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 22px;
}

.config-center-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
}

.config-center-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.config-center-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
}

.config-center-close:hover,
.config-center-nav button:hover,
.config-center-nav button.is-active {
  background: rgba(255, 255, 255, 0.14);
}

.config-center-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 0;
}

.config-center-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px;
}

.config-center-nav button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.config-center-nav button.is-active {
  color: #fff;
  font-weight: 760;
}

.config-center-content {
  min-width: 0;
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.config-section-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.config-placeholder {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.05rem;
}

.config-center-note {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  font-size: 0.92rem;
}

.config-center-footer > div {
  display: flex;
  gap: 9px;
}



.settings-wide-field {
  grid-column: 1 / -1;
}

.settings-checkbox-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-checkbox-field input {
  width: 20px;
  height: 20px;
  accent-color: #73d2de;
}

.settings-color-code {
  min-width: 0;
  width: 100%;
}





/* Configuration form controls polish */
.config-center-content input,
.config-center-content textarea,
.config-center-content select,
.side-menu-section input,
.side-menu-section textarea,
.side-menu-section select {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 9px 11px;
  font: inherit;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.config-center-content textarea,
.side-menu-section textarea {
  resize: vertical;
}

.config-center-content select option,
.side-menu-section select option {
  color: #172025;
}

.config-center-content input:hover,
.config-center-content textarea:hover,
.config-center-content select:hover,
.side-menu-section input:hover,
.side-menu-section textarea:hover,
.side-menu-section select:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.09));
}

.config-center-content input:focus,
.config-center-content textarea:focus,
.config-center-content select:focus,
.side-menu-section input:focus,
.side-menu-section textarea:focus,
.side-menu-section select:focus {
  outline: 0;
  border-color: var(--panel-accent, #73d2de);
  box-shadow: 0 0 0 3px rgba(115, 210, 222, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.config-center-content input::placeholder,
.side-menu-section input::placeholder {
  color: rgba(226, 235, 255, 0.58);
}

.config-center-content input[type="checkbox"],
.side-menu-section input[type="checkbox"] {
  min-height: 0;
  padding: 0;
  box-shadow: none;
}

.config-center-content input[type="color"],
.side-menu-section input[type="color"] {
  padding: 3px;
}

.appearance-settings .appearance-subtitle {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 0.86rem;
  letter-spacing: 0;
}

.appearance-color-field input[type="color"] {
  width: 100%;
  cursor: pointer;
}

.appearance-range-field input[type="range"] {
  width: 100%;
  padding-inline: 0;
  accent-color: var(--accent);
}

.appearance-range-field output {
  float: right;
  color: var(--muted);
}

.weather-location-field {
  position: relative;
}

.weather-location-combobox {
  position: relative;
  display: grid;
  gap: 6px;
}

.weather-location-combobox.is-invalid input[type="text"] {
  border-color: rgba(255, 110, 110, 0.74);
  box-shadow: 0 0 0 3px rgba(255, 95, 95, 0.14);
}

.weather-location-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-location-status[data-state="error"],
.weather-location-combobox.is-invalid .weather-location-status {
  color: #ffb2b2;
}

.weather-location-status[data-state="ok"] {
  color: #7df0a1;
}

.weather-location-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(115, 210, 222, 0.42);
  border-radius: 8px;
  background: rgba(28, 58, 105, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.weather-location-results:empty {
  display: none;
}

.weather-location-option {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.weather-location-option:last-child {
  border-bottom: 0;
}

.weather-location-option span {
  color: var(--muted);
  font-size: 0.86rem;
}

.weather-location-option:hover,
.weather-location-option.is-active {
  background: rgba(115, 210, 222, 0.16);
}


.theme-builder {
  display: grid;
  gap: 16px;
}

.theme-builder-header,
.theme-builder-row,
.theme-builder-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-builder-header,
.theme-builder-row {
  justify-content: space-between;
}

.theme-builder-header h4,
.theme-builder-form h4 {
  margin: 0 0 4px;
}

.theme-builder-header p,
.theme-builder-row small {
  display: block;
  color: var(--muted);
}

.theme-builder-list {
  display: grid;
  gap: 9px;
}

.theme-builder-row {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 12px;
}

.theme-builder-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-builder-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.theme-import-label {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  cursor: pointer;
}

.theme-builder-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.theme-builder-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.theme-color-grid {
  display: grid;
  gap: 8px;
}

.theme-color-editor {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 46px minmax(90px, 120px) minmax(150px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.theme-color-editor > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.theme-color-editor input[type="color"] {
  width: 46px;
  min-width: 46px;
}

.theme-preview {
  position: sticky;
  top: 0;
}

.theme-preview-box {
  min-height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 18px;
}

.theme-preview-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.theme-preview-card {
  border: 1px solid;
  padding: 14px;
}

.theme-preview button,
.theme-preview input {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
}



/* Theme Creator: isolated administrator tool */
.theme-creator-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  background: rgba(8, 22, 48, 0.96);
  color: var(--text);
  font-family: system-ui, "Segoe UI", sans-serif;
}
.theme-creator-overlay.is-open { display: block; }
.theme-creator-shell {
  width: min(1760px, 96vw);
  height: min(980px, 94vh);
  margin: 3vh auto;
  display: flex;
  flex-direction: column;
  background: rgba(30, 64, 116, 0.98);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,.35);
}
.theme-creator-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.theme-creator-top h2 { margin: 0 16px 0 0; font-size: 22px; }
.theme-creator-top select,
.theme-creator-top button,
.theme-creator-file {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}
.theme-creator-top button[data-tc-save] { background: var(--button-background); color: var(--button-text); font-weight: 800; }
.theme-creator-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) minmax(360px, .9fr);
  gap: 0;
}
.theme-creator-body nav {
  overflow: auto;
  padding: 14px;
  border-right: 1px solid rgba(255,255,255,.16);
}
.theme-creator-body nav button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.theme-creator-body nav button:hover,
.theme-creator-body nav button.is-active {
  color: var(--text);
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}
.theme-creator-body main {
  overflow: auto;
  padding: 20px;
}
.theme-creator-body aside {
  border-left: 1px solid rgba(255,255,255,.16);
  padding: 20px;
  background: rgba(0,0,0,.12);
}
.theme-creator-body iframe {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: #10264f;
}
.theme-css-editor {
  width: 100%;
  min-height: 560px;
  font-family: Consolas, "Cascadia Mono", monospace;
  line-height: 1.45;
}
.theme-assets-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.theme-creator-note {
  min-height: 24px;
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid rgba(255,255,255,.16);
  color: var(--muted);
}


/* Theme Creator form polish */
.theme-creator-form-section {
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
}
.theme-creator-form-section h4 {
  margin: 0 0 14px;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.theme-creator-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.theme-creator-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.theme-creator-label {
  font-weight: 800;
  color: var(--text);
  font-size: 14px;
}
.theme-creator-field small {
  color: rgba(230,238,255,.58);
  font-size: 11px;
  line-height: 1.2;
}
.theme-creator-control,
.theme-creator-field select,
.theme-creator-field input[type="text"],
.theme-creator-field input[type="number"] {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.11);
  color: var(--text);
  padding: 9px 11px;
  font: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.theme-creator-control:hover,
.theme-creator-field select:hover,
.theme-creator-field input:hover {
  border-color: rgba(255,255,255,.36);
  background: rgba(255,255,255,.14);
}
.theme-creator-control:focus,
.theme-creator-field select:focus,
.theme-creator-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(115,210,222,.18);
}
.theme-creator-composite-control {
  display: flex;
  align-items: center;
  gap: 9px;
}
.theme-creator-color-preview {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
.theme-creator-toggle {
  min-height: 74px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
}
.theme-creator-toggle input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}
.theme-creator-info-box {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid rgba(115,210,222,.28);
  background: rgba(115,210,222,.10);
  color: rgba(235,244,255,.78);
  font-size: 13px;
  line-height: 1.45;
}
.theme-creator-field input[readonly] {
  opacity: .72;
  cursor: not-allowed;
}





/* Custom theme layout replaces the default home content while keeping global menu/settings. */
body.has-custom-layout .topbar,
body.has-custom-layout .search-row,
body.has-custom-layout .empty {
  display: none !important;
}

.page.has-custom-layout {
  width: min(100%, calc(100% - 32px));
  max-width: none;
  padding: 0;
}

body.has-custom-layout #dashboard {
  min-height: 100vh;
}

/* Theme layout renderer: generic hooks used only when a theme provides layout.json */
.theme-layout-stack {
  min-width: 0;
}

.theme-layout-page {
  min-width: 0;
}

.theme-layout-grid {
  display: grid;
  gap: var(--layout-gap, 20px);
}

.theme-layout-flex {
  display: flex;
  gap: var(--layout-gap, 20px);
}

.theme-layout-absolute {
  position: relative;
}

.theme-layout-item {
  min-width: 0;
}

.theme-layout-absolute > .theme-layout-item {
  position: absolute;
}

.theme-app-launcher {
  display: grid;
  gap: 16px;
}

.theme-app-button {
  text-decoration: none;
}

#dashboard-app .wr-module-list-page .wr-app-grid.wr-app-grid-filtered {
  grid-template-columns: repeat(auto-fit, minmax(132px, 166px));
  justify-content: center;
}

@media (max-width: 620px) {
  #dashboard-app .wr-module-list-page .wr-app-grid.wr-app-grid-filtered {
    grid-template-columns: repeat(auto-fit, minmax(92px, 132px));
  }
}

.theme-app-button img,
.wr-app-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.panel-lights {
  --panel-accent: var(--lights-accent, #f59e0b);
  --panel-accent-soft: rgba(245, 158, 11, 0.16);
}

.panel-lights .panel-icon svg,
.lights-card svg {
  width: 1.35em;
  height: 1.35em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lights-module {
  width: min(100%, 1080px);
  margin-inline: auto;
}

.lights-module-content {
  display: grid;
  gap: 18px;
}

body.has-custom-layout .lights-module-content {
  max-height: calc(100dvh - 190px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

.lights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 190px));
  justify-content: center;
  gap: 16px;
}

.lights-card {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.lights-card:hover,
.lights-card:focus-visible {
  border-color: var(--panel-accent);
  background: var(--panel-strong);
  outline: 0;
}

.lights-card span {
  font-weight: 760;
}

.lights-card small,
.lights-status {
  color: var(--muted);
}

.lights-status.is-on {
  color: #4fe27a;
}

.lights-status.is-off {
  color: #ff5f5f;
}

.lights-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.lights-empty.error {
  color: #ffb3b3;
}

.lights-small-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 9px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lights-control {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 20px;
}

.lights-control label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.lights-control input[type="range"] {
  width: 100%;
  accent-color: var(--panel-accent);
}

.lights-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.lights-control-note {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
}
.lights-config-section {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.lights-config-title,
.lights-config-header,
.lights-config-room,
.lights-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.lights-config-title h4 {
  margin: 0;
}

.lights-config-title small {
  color: var(--muted);
}

.lights-config-block,
.lights-assignment-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}

.lights-config-rooms,
.lights-assignment-list {
  display: grid;
  gap: 9px;
}

.lights-config-room {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.lights-config-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lights-config-actions button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.lights-config-actions button:hover,
.lights-config-actions button:focus-visible {
  border-color: var(--panel-accent, var(--accent));
  outline: 0;
}

.lights-assignment-row {
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(220px, 1fr) 110px;
  align-items: center;
}

.lights-assignment-row > div {
  display: grid;
  gap: 4px;
}



/* Hue room view */
.lights-module {
  width: min(100%, 1380px);
}

body.has-custom-layout .lights-module {
  margin-inline: auto;
}

.lights-room-view-heading {
  display: grid;
  place-items: center;
  gap: 4px;
  margin: -8px 0 30px;
  text-align: center;
}

.lights-room-view-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lights-room-view-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.lights-room-layout {
  --lights-detail-width: 340px;
  --lights-room-gap: 30px;
  display: grid;
  grid-template-columns: minmax(0, calc(100% - var(--lights-detail-width) - var(--lights-room-gap))) var(--lights-detail-width);
  gap: var(--lights-room-gap);
  align-items: start;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.lights-room-layout:not(.has-detail) {
  grid-template-columns: minmax(0, 1fr);
}

.lights-room-main {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.lights-scenes-section h3 {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: .06em;
  font-weight: 650;
}

.lights-scenes-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}

.lights-scene-card {
  width: 94px;
  min-width: 94px;
  height: 84px;
  display: grid;
  grid-template-rows: 34px 1fr;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(222, 232, 255, .34);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.lights-scene-svg {
  width: 34px;
  height: 34px;
  color: currentColor;
}

.lights-scene-card small {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: .92rem;
}

.lights-scene-card:hover,
.lights-scene-card:focus-visible,
.lights-row:hover,
.lights-row:focus-within {
  border-color: var(--panel-accent, var(--accent));
  outline: 0;
}

.lights-scene-add,
.lights-scene-card:disabled {
  cursor: default;
  opacity: .85;
}

.lights-row-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
  padding-right: 8px;
}

.lights-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 58px minmax(170px, 240px) 22px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(222, 232, 255, .34);
  border-radius: 14px;
  background: rgba(8, 20, 44, .42);
  padding: 12px 14px;
}

.lights-row.is-selected {
  border-color: rgba(255, 255, 255, .92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.lights-row-info {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  min-width: 0;
}

.lights-row-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffe37a;
}

.lights-light-svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 12px rgba(255, 218, 111, .25));
}

.lights-row-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.12rem;
  font-weight: 750;
}

.lights-row-info small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: .96rem;
}

.lights-switch {
  position: relative;
  display: inline-grid;
  width: 58px;
  height: 32px;
  cursor: pointer;
}

.lights-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lights-switch span {
  border-radius: 999px;
  background: rgba(150, 165, 190, .34);
  transition: background .18s ease;
}

.lights-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f7f9ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: transform .18s ease;
}

.lights-switch input:checked + span {
  background: linear-gradient(135deg, #168bff, #61c6ff);
}

.lights-switch input:checked + span::after {
  transform: translateX(26px);
}

.lights-brightness,
.lights-kelvin-row {
  display: grid;
  grid-template-columns: 24px minmax(72px, 1fr) 24px auto;
  gap: 9px;
  align-items: center;
  color: var(--text);
}

.lights-kelvin-row {
  grid-template-columns: 24px minmax(90px, 1fr) 24px;
}

.lights-brightness > span,
.lights-kelvin-row > span {
  display: grid;
  place-items: center;
}

.lights-brightness-icon {
  width: 24px;
  height: 24px;
  color: rgba(222, 232, 255, .88);
}

.lights-brightness-icon.is-small {
  width: 20px;
  height: 20px;
}

.lights-brightness-icon.is-cool {
  color: #54c7ff;
}

.lights-brightness input,
.lights-kelvin-row input {
  width: 100%;
  min-height: 28px;
  accent-color: #ffa52c;
}

.lights-brightness strong {
  min-width: 42px;
  text-align: right;
  font-weight: 750;
}

.lights-row-arrow,
.lights-detail-close,
.lights-detail-edit {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.lights-row-arrow svg,
.lights-detail-action-svg {
  width: 24px;
  height: 24px;
}

.lights-detail {
  grid-column: 2;
  position: sticky;
  top: 0;
  display: grid;
  gap: 16px;
  width: var(--lights-detail-width);
  max-width: var(--lights-detail-width);
  min-width: 0;
  border: 1px solid rgba(222, 232, 255, .34);
  border-radius: 22px;
  background: rgba(8, 20, 44, .58);
  padding: 22px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, .28);
}

.lights-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
}

.lights-detail-head h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 720;
}

.lights-detail-section h4,
.lights-white-panel h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: .82rem;
  letter-spacing: .06em;
}

.lights-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(222, 232, 255, .2);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.lights-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  padding: 12px;
  font: inherit;
  cursor: pointer;
}

.lights-tabs button.is-active {
  color: #36a7ff;
  border-bottom-color: #36a7ff;
}

.lights-color-panel,
.lights-white-panel {
  display: grid;
  gap: 16px;
}

.lights-color-wheel {
  position: relative;
  width: min(230px, 100%);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: conic-gradient(red, magenta, blue, cyan, lime, yellow, red);
  box-shadow: inset 0 0 32px rgba(255, 255, 255, .35);
  cursor: crosshair;
}

.lights-color-wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, #fff 0 8%, rgba(255,255,255,.72) 18%, transparent 58%);
}

.lights-color-wheel span {
  position: absolute;
  z-index: 1;
  left: var(--wheel-x, 74%);
  top: var(--wheel-y, 50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wheel-color, #fff);
  border: 3px solid #fff;
  transform: translate(-50%, -50%);
}

.lights-color-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.lights-color-preset {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: var(--preset-color);
  justify-self: center;
  cursor: pointer;
}






/* Ring custom layout: Hue room page rebuilt as reference two-column room view. */
body.has-custom-layout .theme-layout-page.is-lights-room-active {
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

body.has-custom-layout .theme-layout-page.is-lights-room-active > :is(.wr-apps-header, .wr-page-header, .theme-page-header, header) {
  display: none !important;
}

body.has-custom-layout .lights-module.is-room-view.panel,
body.has-custom-layout .lights-module.is-room-view.panel.panel-lights {
  width: min(1360px, calc(100vw - 260px));
  max-width: min(1360px, calc(100vw - 260px));
  height: calc(100svh - 112px);
  max-height: calc(100svh - 112px);
  margin: 28px auto 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

body.has-custom-layout .lights-module.is-room-view.panel::before,
body.has-custom-layout .lights-module.is-room-view.panel::after,
body.has-custom-layout .lights-module.is-room-view > .panel-header {
  display: none !important;
}

body.has-custom-layout .lights-module.is-room-view .lights-module-content {
  height: 100%;
  min-height: 0;
  overflow: visible;
}

body.has-custom-layout .lights-room-view {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

body.has-custom-layout .lights-room-view-heading {
  flex: 0 0 auto;
  margin: 0 0 40px;
  padding: 0;
  text-align: center;
}

body.has-custom-layout .lights-room-view-heading h2 {
  margin: 0;
  color: var(--theme-text-primary, #f8fbff);
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
}

body.has-custom-layout .lights-room-view-heading p {
  margin: 6px 0 0;
  color: var(--theme-text-secondary, rgba(248, 251, 255, .72));
  font-size: clamp(18px, 1.5vw, 24px);
}

body.has-custom-layout .lights-room-layout {
  width: min(1040px, 100%);
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
  align-items: start;
  gap: 0;
  overflow: visible;
}

body.has-custom-layout .lights-room-layout.has-detail {
  width: min(1360px, 100%);
  grid-template-columns: minmax(0, 920px) 360px;
  column-gap: 34px;
}

body.has-custom-layout .lights-room-main {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.has-custom-layout .lights-scenes-section {
  flex: 0 0 auto;
  margin: 0 0 20px;
  min-width: 0;
  overflow: hidden;
}

body.has-custom-layout .lights-scenes-section h3 {
  margin: 0 0 14px;
  color: var(--theme-text-secondary, rgba(248, 251, 255, .74));
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

body.has-custom-layout .lights-scenes-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  overflow: hidden;
}

body.has-custom-layout .lights-scene-card {
  width: 100%;
  min-width: 0;
  height: 86px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  color: var(--theme-text-primary, #f8fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

body.has-custom-layout .lights-scene-card span:first-child {
  font-size: 30px;
  line-height: 1;
}

body.has-custom-layout .lights-scene-card span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

body.has-custom-layout .lights-row-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px 0 0;
  scrollbar-width: thin;
}

body.has-custom-layout .lights-row {
  min-height: 84px;
  display: grid !important;
  grid-template-columns: minmax(300px, 1fr) 74px minmax(300px, 390px);
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 12px;
  background: rgba(0, 10, 28, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

body.has-custom-layout .lights-room-layout.has-detail .lights-row {
  grid-template-columns: minmax(280px, 1fr) 70px minmax(260px, 350px);
}

body.has-custom-layout .lights-row.is-selected {
  border-color: rgba(255, 255, 255, .88);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 0 22px rgba(255, 255, 255, .12);
}

body.has-custom-layout .lights-row-info {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0;
  color: inherit;
  text-align: left;
}

body.has-custom-layout .lights-row-info strong {
  display: block;
  overflow: hidden;
  color: var(--theme-text-primary, #f8fbff);
  font-size: 21px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.has-custom-layout .lights-row-info small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--theme-text-secondary, rgba(248, 251, 255, .72));
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.has-custom-layout .lights-row-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: #ffe36f;
  font-size: 38px;
}

body.has-custom-layout .lights-row-arrow {
  display: none !important;
}

body.has-custom-layout .lights-toggle {
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: rgba(119, 136, 163, .45);
}

body.has-custom-layout .lights-toggle::after {
  width: 26px;
  height: 26px;
}

body.has-custom-layout .lights-toggle.is-on {
  background: linear-gradient(135deg, #238cff, #64bdff);
}

body.has-custom-layout .lights-brightness.is-compact {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(150px, 1fr) 22px 54px;
  align-items: center;
  gap: 9px;
}

body.has-custom-layout .lights-brightness-icon {
  color: rgba(255, 255, 255, .76);
  font-size: 22px;
  line-height: 1;
}

body.has-custom-layout .lights-brightness.is-compact input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: #ff9f1c;
}

/* Ring: light pages use regular text weights; keep layout and controls unchanged. */
body.has-custom-layout .lights-module .panel-title,
body.has-custom-layout .lights-module .lights-card span,
body.has-custom-layout .lights-module .lights-scenes-section h3,
body.has-custom-layout .lights-module .lights-row-info strong,
body.has-custom-layout .lights-module .lights-brightness strong,
body.has-custom-layout .lights-module .lights-detail-head h3,
body.has-custom-layout .lights-module .lights-detail-section h4,
body.has-custom-layout .lights-module .lights-white-panel h4,
body.has-custom-layout .lights-module .lights-white-panel strong,
body.has-custom-layout .lights-module .lights-control-label,
body.has-custom-layout .lights-module .lights-temperature-label {
  font-weight: 400;
}


body.has-custom-layout .lights-brightness-value {
  color: var(--theme-text-primary, #f8fbff);
  font-size: 18px;
  font-weight: 800;
  text-align: right;
}

body.has-custom-layout .lights-detail {
  grid-column: 2;
  align-self: start;
  width: 360px;
  max-width: 360px;
  max-height: calc(100svh - 172px);
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 22px;
  background: rgba(0, 11, 31, .56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 38px rgba(0, 0, 0, .18);
  overflow: hidden;
}

body.has-custom-layout .lights-detail-header h3 {
  color: var(--theme-text-primary, #f8fbff);
  font-size: 26px;
  font-weight: 800;
}

body.has-custom-layout .lights-detail-actions button {
  color: var(--theme-text-primary, #f8fbff);
}

body.has-custom-layout .lights-detail .lights-toggle {
  margin: 14px 0 20px;
}

body.has-custom-layout .lights-control-label,
body.has-custom-layout .lights-temperature-label {
  color: var(--theme-text-primary, #f8fbff);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

body.has-custom-layout .lights-detail-tabs {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

body.has-custom-layout .lights-detail-tabs button {
  color: var(--theme-text-primary, #f8fbff);
  max-width: 100%;
  font-size: 14px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.has-custom-layout .lights-detail-tabs button.is-active {
  color: #4db4ff;
  border-bottom: 2px solid #2aa8ff;
}

body.has-custom-layout .lights-color-wheel {
  width: 206px;
  height: 206px;
  margin: 18px auto 14px;
}

body.has-custom-layout .lights-color-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}

body.has-custom-layout .lights-color-presets button {
  width: 30px;
  height: 30px;
}

body.has-custom-layout .lights-temperature-control {
  margin-top: 10px;
}

body.has-custom-layout .lights-detail input[type="range"] {
  accent-color: #ff9f1c;
}




/* Hue room detail state only: keep base room view unchanged. */
body.has-custom-layout .lights-module.is-room-view:has(.lights-room-view.has-details) {
  width: min(1360px, calc(100vw - 320px));
  max-width: min(1360px, calc(100vw - 320px));
  height: calc(100svh - 112px);
  max-height: calc(100svh - 112px);
  margin: 56px auto 104px;
  overflow: visible;
}

body.has-custom-layout .lights-room-view.has-details {
  --hue-room-open-shift-x: -90px;
  --hue-room-left-width: 920px;
  --hue-room-gap: 24px;
  --hue-room-detail-scale: 0.67;
  --hue-room-detail-base-width: 426px;
  --hue-room-detail-visual-width: 285px;
  --hue-room-work-width: calc(var(--hue-room-left-width) + var(--hue-room-gap) + var(--hue-room-detail-visual-width));
  padding-top: 126px;
}

body.has-custom-layout .lights-room-view.has-details .lights-room-view-heading {
  position: fixed;
  top: 52px;
  left: 50%;
  width: min(520px, 90vw);
  margin: 0;
  transform: translateX(-50%);
  z-index: 8;
  pointer-events: none;
}

body.has-custom-layout .lights-room-view.has-details .lights-room-layout.has-detail {
  width: min(var(--hue-room-work-width), calc(100vw - 320px));
  max-width: min(var(--hue-room-work-width), calc(100vw - 320px));
  display: grid;
  grid-template-columns: minmax(0, var(--hue-room-left-width)) var(--hue-room-detail-visual-width);
  column-gap: var(--hue-room-gap);
  align-items: stretch;
  justify-content: center;
  margin-inline: auto;
  overflow: visible;
  transform: translateX(var(--hue-room-open-shift-x));
}

body.has-custom-layout .lights-room-view.has-details .lights-room-main {
  min-width: 0;
  width: 100%;
  transform-origin: top left;
  zoom: 0.72;
}

@supports not (zoom: 1) {
  body.has-custom-layout .lights-room-view.has-details .lights-room-main {
    transform: scale(0.72);
    width: 138.89%;
  }
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip {
  flex-wrap: nowrap;
  overflow: hidden;
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-section,
body.has-custom-layout .lights-room-view.has-details .lights-rows {
  width: 100%;
  max-width: 100%;
}

body.has-custom-layout .lights-room-view.has-details .lights-row {
  min-width: 0;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail {
  width: var(--hue-room-detail-base-width);
  max-width: var(--hue-room-detail-base-width);
  height: 179.1%;
  max-height: none;
  min-height: 0;
  padding: 18px 20px;
  border-radius: 20px;
  overflow: hidden;
  align-self: stretch;
  box-sizing: border-box;
  transform: scale(var(--hue-room-detail-scale));
  transform-origin: top left;
  justify-self: start;
  margin-top: -64px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail-header h3 {
  font-size: 24px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail-actions {
  gap: 12px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail-actions button {
  width: 30px;
  height: 30px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail .switch {
  width: 62px;
  height: 32px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail .switch span {
  width: 24px;
  height: 24px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail .switch.is-on span {
  transform: translateX(28px);
}

body.has-custom-layout .lights-room-view.has-details .lights-detail .lights-brightness {
  grid-template-columns: 24px minmax(0, 1fr) 24px 52px;
  gap: 9px;
  margin: 8px 0 16px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail .lights-brightness .lucide {
  width: 20px;
  height: 20px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail-tabs {
  height: 48px;
  margin-bottom: 14px;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail-tabs button {
  font-size: 16px;
}

body.has-custom-layout .lights-room-view.has-details .lights-color-wheel {
  width: 196px;
  height: 196px;
  margin: 0 auto 16px;
}

body.has-custom-layout .lights-room-view.has-details .lights-color-presets {
  grid-template-columns: repeat(5, 34px);
  gap: 12px 16px;
  justify-content: center;
  margin-bottom: 14px;
}

body.has-custom-layout .lights-room-view.has-details .lights-color-preset {
  width: 30px;
  height: 30px;
}

body.has-custom-layout .lights-room-view.has-details .lights-temperature-control {
  gap: 8px;
}

body.has-custom-layout .lights-room-view.has-details .lights-temperature-control h4,
body.has-custom-layout .lights-room-view.has-details .lights-detail h4 {
  font-size: 14px;
  margin: 0 0 8px;
}


/* Hue scene gallery and room navigation. */
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header {
  display: flex !important;
}
.lights-scene-gallery {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 24px 0 40px;
}
.lights-scene-gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.lights-scene-gallery-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}
.lights-scene-gallery-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}
.lights-scene-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 4px 8px 8px 0;
}
.lights-scene-gallery-card {
  min-height: 132px;
  display: grid;
  grid-template-rows: 48px auto auto;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 1px solid rgba(222, 232, 255, .34);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.lights-scene-gallery-card:hover,
.lights-scene-gallery-card:focus-visible {
  border-color: var(--panel-accent, var(--accent));
  outline: 0;
  transform: translateY(-1px);
}
.lights-scene-gallery-icon .lights-scene-svg {
  width: 44px;
  height: 44px;
}
.lights-scene-gallery-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  text-align: center;
}
.lights-scene-gallery-card small {
  color: var(--muted);
  font-size: .78rem;
}

/* Hue room navigation sides. */
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: block !important;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header .wr-apps-title {
  display: none;
}
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header .wr-apps-back,
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header .wr-apps-home {
  position: absolute;
  top: 46px;
  pointer-events: auto;
}
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header .wr-apps-back {
  left: 4.5vw;
}
body.has-custom-layout .theme-layout-page.is-lights-room-active > .wr-apps-header .wr-apps-home {
  right: 4.5vw;
}
/* Final Hue scene gallery presentation. */
body.has-custom-layout .lights-scene-gallery-heading { display: block; text-align: center; }
body.has-custom-layout .lights-scene-gallery-heading-copy { width: 100%; }
body.has-custom-layout .lights-scene-gallery-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
body.has-custom-layout .lights-scene-gallery-card { min-height: 148px; position: relative; overflow: hidden; background-color: rgba(255,255,255,.055); background-image: linear-gradient(180deg, rgba(4,15,40,.10), rgba(4,15,40,.88)), var(--scene-image, none); background-position: center; background-size: cover; }
body.has-custom-layout .lights-scene-gallery-card .lights-scene-gallery-icon { position: relative; z-index: 1; }
body.has-custom-layout .lights-scene-gallery-card .lights-scene-gallery-name { position: relative; z-index: 1; margin-top: auto; text-shadow: 0 2px 10px rgba(0,0,0,.75); }
body.has-custom-layout .lights-scene-gallery-card small { display: none; }
/* Hue scene gallery group labels. */
body.has-custom-layout .lights-scene-gallery-card .lights-scene-gallery-group { display: block !important; position: relative; z-index: 1; margin-top: -2px; color: rgba(235,242,255,.72); font-size: .7rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* EcoFlow seven-day production history. */
.ecoflow-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-height: 112px;
  align-items: end;
  padding: 12px 10px 8px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 10px;
}

.ecoflow-chart-state {
  display: grid;
  min-height: 86px;
  place-items: center;
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
}

.ecoflow-chart-day {
  display: grid;
  grid-template-rows: 18px 86px 18px;
  gap: 3px;
  min-width: 0;
  align-items: end;
  text-align: center;
}

.ecoflow-chart-value,
.ecoflow-chart-day small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecoflow-chart-value {
  color: var(--text);
  font-size: 0.68rem;
}

.ecoflow-chart-bar-track {
  display: flex;
  height: 86px;
  align-items: end;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.ecoflow-chart-bar {
  display: block;
  width: min(24px, 70%);
  height: var(--bar-height);
  min-height: 2px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #ffd35a, var(--energy-accent));
  box-shadow: 0 0 12px rgba(242, 184, 75, 0.28);
}

.ecoflow-chart-bar.is-empty {
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}


/* EcoFlow gentle chart scaling for shorter viewports */



/* FeinGrav Blue dashboard light preview */
.lights-dashboard-content { display: grid; gap: 8px; }
.lights-dashboard-row { display: grid; grid-template-columns: 28px minmax(90px, 1fr) minmax(100px, 1.4fr) 42px; align-items: center; gap: 12px; min-height: 42px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); }
.lights-dashboard-bulb { color: #8ea0ba; display: inline-flex; }
.lights-dashboard-bulb.is-on { color: #63d471; }
.lights-dashboard-bulb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lights-dashboard-bulb:not(.is-on) { opacity: 1; }
.lights-dashboard-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lights-dashboard-brightness { width: 100%; accent-color: var(--panel-accent, #f59e0b); }
.lights-dashboard-toggle { display: inline-flex; justify-content: flex-end; cursor: pointer; }
.lights-dashboard-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.lights-dashboard-toggle span { width: 38px; height: 22px; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.32); position: relative; transition: .16s ease; }
.lights-dashboard-toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #dce6f5; transition: .16s ease; }
.lights-dashboard-toggle input:checked + span { background: #4285f4; }
.lights-dashboard-toggle input:checked + span::after { transform: translateX(16px); background: #fff; }
.lights-dashboard-footer { justify-content: flex-end; }
.lights-dashboard-link { border: 0; background: none; color: inherit; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.lights-dashboard-link:hover, .lights-dashboard-link:focus-visible { color: var(--panel-accent, #f59e0b); }
.lights-page-overlay { position: fixed; inset: 0; z-index: 1400; overflow: auto; background: var(--page-background, #214b8f); color: var(--text-primary, #f5f7fb); }
.lights-page-shell { min-height: 100%; padding: clamp(18px, 3vw, 48px) clamp(16px, 5vw, 96px) 48px; }
.lights-page-header { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 18px; max-width: 1400px; margin: 0 auto clamp(22px, 4vh, 48px); }
.lights-page-header h1 { margin: 0; text-align: center; font-size: clamp(28px, 3vw, 48px); }
.lights-page-header p { margin: 4px 0 0; text-align: center; color: var(--text-secondary, #c9d6f2); }
.lights-page-nav { width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: inherit; font-size: 28px; cursor: pointer; }
.lights-page-nav:hover, .lights-page-nav:focus-visible { background: rgba(255,255,255,.18); }
.lights-page-content { max-width: 1400px; margin: 0 auto; }
.lights-page-content > .lights-module { width: 100%; }
.lights-page-content .lights-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.lights-page-content .lights-card { min-height: 110px; }
.lights-page-content .lights-zone-back { margin: 10px 0 18px; }



/* Hue zone and room power controls */
.lights-card-title { font-weight: 760; }
.lights-group-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.lights-group-toggle-track { display: inline-flex; width: 42px; height: 24px; padding: 2px; align-items: center; border-radius: 999px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.32); transition: .16s ease; }
.lights-group-toggle-knob { width: 18px; height: 18px; border-radius: 50%; background: #dce6f5; transition: .16s ease; }
.lights-group-toggle.is-on .lights-group-toggle-track { background: #4285f4; }
.lights-group-toggle.is-on .lights-group-toggle-knob { transform: translateX(18px); background: #fff; }
.lights-card .lights-group-toggle:hover .lights-group-toggle-track, .lights-card .lights-group-toggle:focus-visible .lights-group-toggle-track { box-shadow: 0 0 0 2px rgba(66,133,244,.35); }

/* Compact administration layout for the configuration center */
.config-center-overlay {
  place-items: stretch;
  padding: 12px;
}

.config-center-dialog {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: var(--panel-radius, 8px);
}

.config-center-header,
.config-center-footer {
  gap: 10px;
  padding: 9px 14px;
}

.config-center-header h2 {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.config-center-close {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  font-size: 1.2rem;
}

.config-center-layout {
  grid-template-columns: 214px minmax(0, 1fr);
}

.config-center-nav {
  align-content: start;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.config-nav-section {
  display: grid;
  gap: 2px;
}

.config-nav-section + .config-nav-section {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.config-nav-section h3 {
  margin: 0 8px 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.config-center-nav button {
  min-height: 30px;
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.2;
}

.config-center-nav button:hover,
.config-center-nav button.is-active {
  border-left: 3px solid var(--panel-accent, var(--accent));
  padding-left: 5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.config-center-content {
  padding: 12px 16px 16px;
}

.config-section-title {
  margin: 0 0 9px;
  font-size: 1.05rem;
}

.settings-accordion {
  gap: 6px;
}

.settings-group {
  border-radius: 5px;
}

.settings-group-trigger {
  min-height: 32px;
  gap: 8px;
  padding: 6px 9px;
  font-size: 0.86rem;
}

.settings-group-body {
  gap: 8px;
  padding: 8px;
}

.settings-fields {
  gap: 6px;
}

.settings-item {
  gap: 6px;
  border-radius: 5px;
  padding: 7px;
}

.settings-item-title {
  font-size: 0.84rem;
}

.config-center-content input,
.config-center-content textarea,
.config-center-content select,
.side-menu-section input,
.side-menu-section textarea,
.side-menu-section select {
  min-height: 32px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 0.84rem;
}

.config-center-content textarea,
.side-menu-section textarea {
  min-height: 58px;
}

.settings-checkbox-field {
  min-height: 32px;
  gap: 8px;
}

.settings-checkbox-field input {
  width: 17px;
  height: 17px;
}

.settings-color-row {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
}

.settings-color-row input[type="color"],
.settings-color-row code {
  min-height: 32px;
}

.settings-color-row input[type="color"] {
  width: 38px;
  min-width: 38px;
}

.config-center-footer > div {
  gap: 6px;
}

.config-center-footer button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.84rem;
}





/* Flat administrative form hierarchy: one level of emphasis, compact rows. */
#dashboard-app .config-center-content {
  font-size: 0.82rem;
}

#dashboard-app .config-center-content .settings-fields {
  column-gap: 18px;
  row-gap: 4px;
}

#dashboard-app .config-center-content .settings-fields > label,
#dashboard-app .config-center-content .settings-wide-field,
#dashboard-app .config-center-content .settings-color-field {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

#dashboard-app .config-center-content .settings-fields > label > span:first-child,
#dashboard-app .config-center-content .settings-wide-field > span:first-child,
#dashboard-app .config-center-content .settings-color-field > span:first-child {
  min-width: 0;
}

#dashboard-app .config-center-content input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
#dashboard-app .config-center-content select,
#dashboard-app .config-center-content textarea {
  min-height: 28px;
  height: 28px;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 0.82rem;
  line-height: 1.2;
}

#dashboard-app .config-center-content textarea {
  height: auto;
  min-height: 48px;
}

#dashboard-app .config-center-content .settings-checkbox-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 30px;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

#dashboard-app .config-center-content .settings-checkbox-field input {
  width: 16px;
  height: 16px;
}

#dashboard-app .config-center-content .settings-color-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 5px;
}

#dashboard-app .config-center-content .settings-color-row input[type="color"],
#dashboard-app .config-center-content .settings-color-row .settings-color-code {
  min-height: 28px;
  height: 28px;
}

#dashboard-app .config-center-content .settings-group {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

#dashboard-app .config-center-content .settings-group-trigger {
  min-height: 30px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 5px 0;
  font-size: 0.82rem;
  font-weight: 700;
}

#dashboard-app .config-center-content .settings-group-trigger:hover {
  background: var(--panel-soft);
}

#dashboard-app .config-center-content .settings-group-body {
  gap: 6px;
  padding: 6px 0 10px;
}

#dashboard-app .config-center-content .settings-item {
  grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1.5fr) minmax(100px, 0.65fr);
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 5px 0;
}

#dashboard-app .config-center-content .settings-item-title {
  align-self: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

#dashboard-app .config-center-content .settings-item > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

#dashboard-app .config-center-content .settings-item > label > span {
  white-space: nowrap;
}

#dashboard-app .config-center-content .side-menu-app-slots {
  gap: 0;
}

#dashboard-app .config-center-content .side-menu-app-slots label {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 5px 0;
}

#dashboard-app .config-center-content .lights-config-section {
  gap: 6px;
  margin-top: 12px;
}

#dashboard-app .config-center-content .lights-config-title {
  min-height: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
}

#dashboard-app .config-center-content .lights-config-title h4 {
  font-size: 0.82rem;
}

#dashboard-app .config-center-content .lights-config-block {
  display: grid;
  gap: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0;
}

#dashboard-app .config-center-content .lights-config-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 5px 0;
}

#dashboard-app .config-center-content .lights-config-rooms {
  gap: 0;
}

#dashboard-app .config-center-content .lights-config-room {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.65fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 5px 0 5px 18px;
}

#dashboard-app .config-center-content .lights-config-room label,
#dashboard-app .config-center-content .lights-config-header label,
#dashboard-app .config-center-content .lights-assignment-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

#dashboard-app .config-center-content .lights-config-room label > span,
#dashboard-app .config-center-content .lights-config-header label > span,
#dashboard-app .config-center-content .lights-assignment-row label > span {
  white-space: nowrap;
}

#dashboard-app .config-center-content .lights-config-actions {
  gap: 4px;
}

#dashboard-app .config-center-content .lights-config-actions button,
#dashboard-app .config-center-content .lights-small-button {
  min-height: 27px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
}

#dashboard-app .config-center-content .lights-assignment-list {
  gap: 0;
}

#dashboard-app .config-center-content .lights-assignment-row {
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1fr) minmax(150px, 0.8fr) 90px;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 5px 0;
}

#dashboard-app .config-center-content .lights-assignment-row > div {
  gap: 2px;
  font-size: 0.76rem;
}




/* Keep boolean settings aligned as a compact label/value row. */
#dashboard-app .config-center-content .settings-fields > label.settings-checkbox-field {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* E.V.A. shared page heading size */
body.has-custom-layout .lights-room-view-heading h2 {
  font-size: clamp(25px, 2.1vw, 34px);
  font-weight: 500;
  letter-spacing: .02em;
}

body.has-custom-layout .lights-room-view-heading p {
  margin: .35em 0 0;
  font-size: clamp(15px, 1.15vw, 19px);
}

.energy-settings,
.energy-settings-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.energy-settings-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.6fr) repeat(2, minmax(82px, .55fr)) minmax(150px, 1fr) minmax(105px, .7fr) minmax(125px, .8fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line, rgba(255,255,255,.18));
  border-radius: 10px;
  background: var(--panel-soft, rgba(255,255,255,.05));
}
.energy-settings-row label,
.energy-settings-parameter {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.energy-settings-row label > span,
.energy-settings-parameter small,
.energy-settings-heading span,
.energy-settings-no-unit {
  color: var(--muted, #aebbd1);
  font-size: .72rem;
}
.energy-settings-parameter strong {
  overflow-wrap: anywhere;
}
.energy-settings-row input,
.energy-settings-row select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.energy-settings-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: start;
}
.energy-settings-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.config-help {
  grid-column: 1 / -1;
  color: var(--muted, #aebbd1);
}




/* Custom light groups in the room view. */
.lights-group-main-row { grid-template-columns: minmax(180px, 1fr) 58px minmax(170px, 240px); }
.lights-group-main-row .lights-row-info { min-width: 0; }
.lights-group-members-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; padding: 8px 0 0 74px; }
.lights-group-member { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; min-width: 0; border: 1px solid rgba(222,232,255,.26); border-radius: 10px; background: rgba(255,255,255,.045); padding: 7px; }
.lights-group-member.is-selected { border-color: rgba(255,255,255,.9); }
.lights-group-member-info { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 6px; align-items: center; min-width: 0; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.lights-group-member-info .lights-row-icon { width: 26px; height: 26px; }
.lights-group-member-info .lights-light-svg { width: 24px; height: 24px; }
.lights-group-member-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.lights-group-member .lights-switch { width: 42px; height: 24px; }
.lights-group-member .lights-switch span::after { width: 16px; height: 16px; top: 4px; left: 4px; }
.lights-group-member .lights-switch input:checked + span::after { transform: translateX(18px); }



.lights-group-block { display: grid; gap: 0; min-width: 0; }
.lights-group-block .lights-group-members-grid { padding-top: 8px; }


/* Responsive module-page scrolling for tablets and phones. */


/* BEVAHG scene library and scene pages. */
.lights-bevahg-favorite-card { overflow: hidden; }
.lights-bevahg-favorite-image { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(255,255,255,.08); }
.lights-bevahg-favorite-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lights-bevahg-favorite-image .lights-scene-svg { width: 30px; height: 30px; }
.lights-bevahg-favorite-card.is-unavailable { opacity: .45; cursor: not-allowed; }
.lights-bevahg-scenes-page { width: min(100%, 1180px); margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(12px, 2vw, 24px) clamp(26px, 4vw, 50px); color: var(--text); }
.lights-bevahg-scenes-page.is-embedded { width: min(100%, 1080px); }
.lights-bevahg-scenes-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.lights-bevahg-scenes-heading h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.35rem); }
.lights-bevahg-scenes-heading p { margin: 5px 0 0; color: var(--muted); }
.lights-bevahg-scenes-heading small { display: block; margin-top: 10px; color: var(--muted); }
.lights-bevahg-category-filter { display: grid; gap: 5px; min-width: min(260px, 100%); color: var(--muted); }
.lights-bevahg-category-filter select { min-height: 38px; }
.lights-bevahg-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.lights-bevahg-gallery-card { min-width: 0; min-height: 190px; display: grid; grid-template-rows: minmax(116px, 1fr) auto auto; gap: 8px; padding: 0 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--panel-radius, 10px); background: var(--panel-strong, rgba(255,255,255,.06)); color: var(--text); font: inherit; cursor: pointer; transition: border-color .18s ease, transform .18s ease, opacity .18s ease; }
.lights-bevahg-gallery-card:hover, .lights-bevahg-gallery-card:focus-visible { border-color: var(--panel-accent, var(--accent)); outline: 0; transform: translateY(-1px); }
.lights-bevahg-gallery-card.is-unavailable { opacity: .42; cursor: not-allowed; }
.lights-bevahg-gallery-image { min-height: 116px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(255,255,255,.06); }
.lights-bevahg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.lights-bevahg-gallery-image .lights-scene-svg { width: 48px; height: 48px; }
.lights-bevahg-gallery-name { padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.lights-bevahg-gallery-card small { padding: 0 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lights-bevahg-category-row { display: grid; grid-template-columns: minmax(180px, 1fr) 130px 130px auto; gap: 12px; align-items: end; margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--panel-radius, 8px); }
.lights-bevahg-categories { margin: 18px 0 24px; }





/* Room view reference layout for Ring themes. Keep theme colors and controls intact. */
body.has-custom-layout .lights-room-view:not(.has-details) {
  width: 100%;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-layout {
  width: min(1250px, 100%);
}

body.has-custom-layout .lights-room-view-heading {
  margin-bottom: clamp(18px, 2.6vh, 30px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-main {
  width: 100%;
}

body.has-custom-layout .lights-scenes-section,
body.has-custom-layout .lights-targets-section {
  width: 100%;
  min-width: 0;
}

body.has-custom-layout .lights-scenes-section h3,
body.has-custom-layout .lights-targets-section h3 {
  margin: 0 0 10px;
  color: var(--theme-text-secondary, rgba(248, 251, 255, .78));
  font-size: clamp(15px, 1.25vw, 21px);
  font-weight: 400;
  letter-spacing: .04em;
  text-align: left;
}

body.has-custom-layout .lights-targets-section {
  margin-top: clamp(2px, .5vh, 8px);
}

body.has-custom-layout .lights-favorites-panel {
  width: 100%;
  box-sizing: border-box;
  padding: clamp(8px, .7vw, 12px) clamp(12px, 1.05vw, 18px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(0, 5, 25, .22);
}

body.has-custom-layout .lights-scenes-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(106px, .84fr);
  gap: clamp(8px, .7vw, 14px);
  width: 100%;
  padding: 0;
  overflow: visible;
}

body.has-custom-layout .lights-scenes-strip .lights-scene-card {
  min-width: 0;
  height: clamp(132px, 11vw, 176px);
  padding: 8px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

body.has-custom-layout .lights-bevahg-favorite-card {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
}

body.has-custom-layout .lights-bevahg-favorite-image {
  width: clamp(78px, 8vw, 138px);
  height: clamp(78px, 8vw, 138px);
  border: 2px solid var(--module-accent, var(--panel-accent, var(--accent, rgba(255,255,255,.22))));
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 7px 18px rgba(0, 0, 0, .18);
}

body.has-custom-layout .lights-bevahg-favorite-image img {
  border-radius: 50%;
}

body.has-custom-layout .lights-bevahg-favorite-image .lights-scene-svg {
  width: clamp(32px, 3vw, 52px);
  height: clamp(32px, 3vw, 52px);
}

body.has-custom-layout .lights-scenes-strip .lights-bevahg-favorite-card small {
  max-width: 100%;
  color: var(--theme-text-primary, #f8fbff);
  font-size: clamp(14px, 1.1vw, 19px);
  font-weight: 400;
  line-height: 1.15;
}

body.has-custom-layout .lights-scenes-strip .lights-scene-more,
body.has-custom-layout .lights-scenes-strip .lights-scene-add {
  align-self: stretch;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .015);
}

body.has-custom-layout .lights-scenes-apps-icon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: clamp(38px, 3.4vw, 58px);
  height: clamp(38px, 3.4vw, 58px);
}

body.has-custom-layout .lights-scenes-apps-icon i {
  display: block;
  border: 2px solid currentColor;
  border-radius: 3px;
}

body.has-custom-layout .lights-scenes-strip .lights-scene-add small {
  color: var(--theme-text-primary, #f8fbff);
  font-size: clamp(14px, 1.1vw, 19px);
  font-weight: 400;
}

body.has-custom-layout .lights-row-list {
  gap: clamp(8px, .65vw, 12px);
  padding-right: 0;
}

body.has-custom-layout .lights-row {
  min-height: clamp(82px, 7.5vw, 96px);
  grid-template-columns: minmax(0, 1fr) 58px minmax(360px, 1fr);
  gap: clamp(12px, 1.1vw, 20px);
  padding: 10px clamp(12px, 1.05vw, 20px);
  border-radius: 14px;
}

body.has-custom-layout .lights-row-info {
  grid-template-columns: 30px 70px minmax(0, 1fr);
  gap: clamp(10px, .9vw, 16px);
}

body.has-custom-layout .lights-row-selection-indicator {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

body.has-custom-layout .lights-row-selection-indicator.is-selected {
  border-color: var(--module-accent, var(--panel-accent, var(--accent, #8b2cff)));
  background: var(--module-accent, var(--panel-accent, var(--accent, #8b2cff)));
  box-shadow: 0 0 12px color-mix(in srgb, var(--panel-accent, #8b2cff) 55%, transparent);
}

body.has-custom-layout .lights-row.is-selected {
  border-color: var(--module-accent, var(--panel-accent, var(--accent, #8b2cff)));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--panel-accent, #8b2cff) 45%, transparent), 0 0 18px color-mix(in srgb, var(--panel-accent, #8b2cff) 18%, transparent);
}

body.has-custom-layout .lights-row-info strong {
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 400;
}

body.has-custom-layout .lights-row-info small {
  margin-top: 4px;
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 400;
}

body.has-custom-layout .lights-row-icon {
  width: 62px;
  height: 62px;
}

body.has-custom-layout .lights-row-icon .lights-light-svg {
  width: clamp(42px, 3.6vw, 64px);
  height: clamp(42px, 3.6vw, 64px);
}

body.has-custom-layout .lights-row .lights-switch {
  justify-self: center;
}

body.has-custom-layout .lights-row .lights-brightness.is-compact {
  grid-template-columns: 22px minmax(110px, 1fr) 22px 58px;
  gap: clamp(6px, .55vw, 10px);
}

body.has-custom-layout .lights-row .lights-brightness.is-compact strong {
  font-size: clamp(15px, 1.15vw, 20px);
  font-weight: 400;
}







/* Compact room view: keep the complete light list reachable and preserve group expansion. */
body.has-custom-layout .theme-layout-page.is-lights-room-active:has(.lights-room-view:not(.has-details)),
body.has-custom-layout .theme-layout-page.is-lights-room-active:has(.lights-room-view:not(.has-details)) > .theme-layout-item {
  height: auto !important;
  min-height: 100svh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.has-custom-layout .lights-module.is-room-view:not(:has(.lights-room-view.has-details)) {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-top: 14px;
  margin-bottom: 36px;
  overflow: visible !important;
}

body.has-custom-layout .lights-module.is-room-view:not(:has(.lights-room-view.has-details)) .lights-module-content,
body.has-custom-layout .lights-room-view:not(.has-details),
body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-layout,
body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-main {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-layout {
  flex: 0 0 auto;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-room-view-heading {
  margin-bottom: clamp(12px, 1.5vh, 18px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-section {
  margin-bottom: clamp(8px, 1vh, 14px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-section h3,
body.has-custom-layout .lights-room-view:not(.has-details) .lights-targets-section h3 {
  margin-bottom: clamp(6px, .7vh, 10px);
  font-size: clamp(14px, 1.05vw, 18px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-list {
  flex: none;
  max-height: none !important;
  overflow: visible !important;
  gap: clamp(6px, .55vw, 9px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-favorites-panel {
  height: clamp(72px, 5.8vw, 86px);
  min-height: 0;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-strip {
  display: flex;
  align-items: stretch;
  gap: clamp(6px, .65vw, 10px);
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: visible;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-strip .lights-bevahg-favorite-card {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 2px 4px;
  gap: 3px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-bevahg-favorite-image {
  width: clamp(48px, 4vw, 64px);
  height: clamp(48px, 4vw, 64px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-strip .lights-bevahg-favorite-card small {
  font-size: clamp(12px, .95vw, 16px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-strip .lights-scene-add {
  flex: 0 0 clamp(78px, 7vw, 96px);
  width: clamp(78px, 7vw, 96px);
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  place-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .015);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-apps-icon {
  width: clamp(30px, 2.6vw, 40px);
  height: clamp(30px, 2.6vw, 40px);
  gap: 3px;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-scenes-strip .lights-scene-add small {
  font-size: clamp(12px, .95vw, 16px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row {
  min-height: clamp(72px, 5.8vw, 86px);
  grid-template-columns: minmax(0, 1fr) clamp(48px, 3.6vw, 58px) minmax(240px, .9fr);
  gap: clamp(10px, .8vw, 16px);
  padding: clamp(6px, .55vw, 8px) clamp(10px, .85vw, 16px);
  border-radius: 12px;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-info {
  grid-template-columns: 28px 52px minmax(0, 1fr);
  gap: clamp(8px, .7vw, 12px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-selection-indicator {
  width: 24px;
  height: 24px;
  font-size: 15px;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-info strong {
  font-size: clamp(16px, 1.25vw, 20px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-info small {
  margin-top: 2px;
  font-size: clamp(13px, .95vw, 16px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-icon {
  width: 48px;
  height: 48px;
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row-icon .lights-light-svg {
  width: clamp(36px, 3vw, 50px);
  height: clamp(36px, 3vw, 50px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row .lights-brightness.is-compact {
  grid-template-columns: 18px minmax(100px, 1fr) 18px 48px;
  gap: clamp(5px, .45vw, 8px);
}

body.has-custom-layout .lights-room-view:not(.has-details) .lights-row .lights-brightness.is-compact strong {
  font-size: clamp(13px, 1vw, 17px);
}






/* Compact scene strip while a light/group detail panel is open. */
body.has-custom-layout .lights-room-view.has-details .lights-favorites-panel {
  height: clamp(72px, 5.8vw, 86px);
  min-height: 0;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip {
  display: flex;
  align-items: stretch;
  gap: clamp(6px, .65vw, 10px);
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: visible;
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip .lights-bevahg-favorite-card {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 2px 4px;
  gap: 3px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.has-custom-layout .lights-room-view.has-details .lights-bevahg-favorite-image {
  width: clamp(56px, 4vw, 72px);
  height: clamp(56px, 4vw, 72px);
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip .lights-bevahg-favorite-card small,
body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip .lights-scene-add small {
  font-size: clamp(12px, .95vw, 16px);
  line-height: 1.1;
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-strip .lights-scene-add {
  flex: 0 0 clamp(78px, 7vw, 96px);
  width: clamp(78px, 7vw, 96px);
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  place-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

body.has-custom-layout .lights-room-view.has-details .lights-scenes-apps-icon {
  width: clamp(30px, 2.6vw, 40px);
  height: clamp(30px, 2.6vw, 40px);
  gap: 3px;
}




/* Hide room-view scrollbars while preserving touch/mouse scrolling. */
body.has-custom-layout .theme-layout-page.is-lights-room-active,
body.has-custom-layout .theme-layout-page.is-lights-room-active .lights-room-view,
body.has-custom-layout .theme-layout-page.is-lights-room-active .lights-row-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.has-custom-layout .theme-layout-page.is-lights-room-active::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active .lights-room-view::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active .lights-row-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


/* Align detail-state scene tiles with the detail panel. */
body.has-custom-layout .lights-room-view.has-details .lights-scenes-section {
  margin-top: clamp(-160px, -8vw, -108px);
  margin-bottom: clamp(6px, 1vh, 12px);
}

/* Hide every room-view scrollbar while preserving touch/mouse scrolling. */
body.has-custom-layout:has(.theme-layout-page.is-lights-room-active),
html:has(.theme-layout-page.is-lights-room-active),
body.has-custom-layout .theme-layout-page.is-lights-room-active,
body.has-custom-layout .theme-layout-page.is-lights-room-active > *,
body.has-custom-layout .theme-layout-page.is-lights-room-active * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.has-custom-layout:has(.theme-layout-page.is-lights-room-active)::-webkit-scrollbar,
html:has(.theme-layout-page.is-lights-room-active)::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active > *::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


/* Restore favorites visibility after detail-state scene alignment. */
body.has-custom-layout .lights-room-view.has-details .lights-scenes-section {
  margin-top: 0 !important;
  transform: none !important;
  position: relative;
  z-index: 2;
  overflow: visible !important;
}

/* Fallback scrollbar rules without :has(), for embedded/older browser engines. */
body.has-custom-layout .theme-layout-page.is-lights-room-active,
body.has-custom-layout .theme-layout-page.is-lights-room-active > *,
body.has-custom-layout .theme-layout-page.is-lights-room-active * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.has-custom-layout .theme-layout-page.is-lights-room-active::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active > *::-webkit-scrollbar,
body.has-custom-layout .theme-layout-page.is-lights-room-active *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}


/* Lift the left favorites block to the marked detail-panel line. */
body.has-custom-layout .lights-room-view.has-details .lights-scenes-section {
  --hue-scenes-lift: clamp(108px, 8vw, 160px);
  position: relative;
  top: calc(-1 * var(--hue-scenes-lift));
  margin-top: 0 !important;
  margin-bottom: calc(clamp(6px, 1vh, 12px) - var(--hue-scenes-lift)) !important;
  z-index: 2;
  overflow: visible !important;
}


/* Keep favorites visible and let the full detail-state room content flow. */
body.has-custom-layout .lights-room-view.has-details .lights-scenes-section {
  position: relative;
  top: 0 !important;
  margin-top: 0 !important;
  margin-bottom: clamp(6px, 1vh, 12px) !important;
  z-index: 2;
  overflow: visible !important;
}

body.has-custom-layout .theme-layout-page.is-lights-room-active:has(.lights-room-view.has-details) {
  height: auto;
  min-height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
}

body.has-custom-layout .lights-module.is-room-view:has(.lights-room-view.has-details) {
  height: auto;
  max-height: none;
  margin-bottom: 104px;
  overflow: visible !important;
}

body.has-custom-layout .lights-room-view.has-details .lights-room-main {
  height: auto;
  min-height: 0;
  overflow: visible !important;
}

body.has-custom-layout .lights-room-view.has-details .lights-row-list {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible !important;
}

body.has-custom-layout .lights-room-view.has-details .lights-detail {
  height: auto;
  max-height: none;
}

/* Fallback for engines without :has(): the room view itself still expands. */
body.has-custom-layout .lights-room-view.has-details {
  height: auto;
  min-height: 0;
}

/* BEVAHG gallery page */
body .lights-bevahg-scenes-page:not(.is-embedded) { width: min(100%, 1488px); max-width: 1488px; margin: 0 auto; padding: clamp(18px, 2.1vw, 32px) clamp(12px, 1.8vw, 28px) 42px; box-sizing: border-box; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-scenes-heading { display: block; text-align: center; margin: 0 0 clamp(16px, 2vw, 28px); }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-scenes-heading h2 { margin: 0; font-size: clamp(30px, 3.1vw, 46px); letter-spacing: .04em; text-transform: uppercase; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-scenes-heading p { margin: 8px 0 0; font-size: clamp(16px, 1.45vw, 23px); }
body .lights-bevahg-category-nav { display: flex; gap: clamp(8px, 1vw, 16px); overflow-x: auto; scrollbar-width: none; margin: 0 0 clamp(16px, 1.7vw, 26px); padding: 2px 0 5px; }
body .lights-bevahg-category-nav::-webkit-scrollbar { display: none; }
body .lights-bevahg-category-button { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 8px 18px; border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); border-radius: 13px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
body .lights-bevahg-category-button svg { width: 22px; height: 22px; }
body .lights-bevahg-category-button.is-active { border-color: var(--accent, #8c28ff); background: color-mix(in srgb, var(--accent, #8c28ff) 32%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent, #8c28ff) 35%, transparent); }
body .lights-bevahg-gallery-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1vw, 17px); }
body .lights-bevahg-gallery-card { position: relative; min-width: 0; aspect-ratio: 1.48; overflow: hidden; border: 1px solid color-mix(in srgb, var(--text) 20%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--panel, #182846) 86%, transparent); }
body .lights-bevahg-gallery-activate { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
body .lights-bevahg-gallery-activate:disabled { cursor: not-allowed; opacity: .48; }
body .lights-bevahg-gallery-image { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
body .lights-bevahg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
body .lights-bevahg-gallery-image > svg { width: 28%; height: 28%; opacity: .8; }
body .lights-bevahg-gallery-name { position: absolute; right: 48px; bottom: 12px; left: 14px; overflow: hidden; color: #fff; font-size: clamp(13px, 1.05vw, 19px); font-weight: 500; line-height: 1.15; text-overflow: ellipsis; text-shadow: 0 1px 4px #000; white-space: nowrap; }
body .lights-bevahg-gallery-card::after { position: absolute; right: 0; bottom: 0; left: 0; height: 46%; background: linear-gradient(transparent, rgba(0,0,0,.72)); content: ''; pointer-events: none; }
body .lights-bevahg-favorite-toggle { position: absolute; z-index: 2; right: 10px; bottom: 9px; display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 3px #000); }
body .lights-bevahg-favorite-toggle svg { width: 25px; height: 25px; }
body .lights-bevahg-favorite-toggle.is-favorite { color: var(--accent, #ffd13d); }
body .lights-bevahg-pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: clamp(14px, 1.6vw, 24px); font-size: 20px; }
body .lights-bevahg-pagination button.lights-bevahg-page-arrow { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: none; }
body .lights-bevahg-pagination button.lights-bevahg-page-arrow:hover:not(:disabled) { color: var(--accent, #8c28ff); transform: scale(1.08); }
body .lights-bevahg-pagination button.lights-bevahg-page-arrow:disabled { opacity: .35; cursor: default; }
body .lights-bevahg-pagination .lights-bevahg-page-indicator strong { font-weight: 800; }




/* BEVAHG gallery size correction: only the dedicated gallery page. */
body .lights-bevahg-scenes-page:not(.is-embedded) { width: min(100%, 1488px) !important; max-width: 1488px !important; box-sizing: border-box; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-scenes-heading { display: none !important; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-gallery-grid { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; align-items: stretch; width: 100%; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-gallery-card { display: block !important; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 1.48; box-sizing: border-box; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-gallery-card small { display: none; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-gallery-activate { display: block; }





/* BEVAHG category navigation refinement 20260830 */
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-nav { width: 100%; box-sizing: border-box; justify-content: flex-start; align-items: stretch; gap: clamp(10px, 1.05vw, 18px); margin: 0 0 clamp(18px, 2vw, 28px); padding: 0 0 4px; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-button { min-height: clamp(48px, 3.2vw, 62px); padding: 9px clamp(16px, 1.45vw, 25px); border-radius: 14px; border-color: color-mix(in srgb, var(--text) 24%, transparent); font-size: clamp(14px, 1.05vw, 18px); letter-spacing: .01em; white-space: nowrap; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-button svg { width: clamp(20px, 1.45vw, 26px); height: clamp(20px, 1.45vw, 26px); flex: 0 0 auto; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-button.is-active { border-color: var(--accent, #8c28ff); background: color-mix(in srgb, var(--accent, #8c28ff) 34%, transparent); }


/* BEVAHG category strip: compact independent controls with overflow arrow */
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-strip { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 clamp(16px, 1.7vw, 26px); }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-strip .lights-bevahg-category-nav { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0 0 4px; gap: 8px; overflow-x: auto; }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-strip .lights-bevahg-category-button { min-height: 40px; padding: 6px 12px; gap: 6px; border-radius: 10px; font-size: clamp(12px, .82vw, 15px); }
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-category-strip .lights-bevahg-category-button svg { width: 18px; height: 18px; }
body .lights-bevahg-category-next { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid color-mix(in srgb, var(--text) 24%, transparent); border-radius: 50%; background: transparent; color: var(--text); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
body .lights-bevahg-category-next[hidden] { display: none; }

/* BEVAHG dedicated page: lift the gallery slightly and keep pagination below it. */
body #dashboard-app .wr-module-page:has(.lights-bevahg-scenes-page:not(.is-embedded)) {
  padding-top: clamp(20px, 2.7vw, 44px);
}
body .lights-bevahg-scenes-page:not(.is-embedded) {
  padding-top: clamp(12px, 1.6vw, 24px);
}
body .lights-bevahg-scenes-page:not(.is-embedded) .lights-bevahg-pagination {
  display: flex;
  visibility: visible;
  margin-top: clamp(14px, 1.6vw, 24px);
  margin-bottom: clamp(8px, 1vw, 14px);
}

/* BEVAHG admin inner accordions */
.lights-bevahg-categories, .lights-bevahg-scenes-accordion { margin: 18px 0 24px; border: 1px solid var(--line); border-radius: var(--panel-radius, 8px); overflow: hidden; }
.lights-bevahg-categories > summary, .lights-bevahg-scenes-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: color-mix(in srgb, var(--line) 42%, transparent); color: var(--text); cursor: pointer; list-style: none; }
.lights-bevahg-categories > summary::-webkit-details-marker, .lights-bevahg-scenes-accordion > summary::-webkit-details-marker { display: none; }
.lights-bevahg-categories > summary::after, .lights-bevahg-scenes-accordion > summary::after { content: '▸'; font-size: 16px; transition: transform .16s ease; }
.lights-bevahg-categories[open] > summary::after, .lights-bevahg-scenes-accordion[open] > summary::after { transform: rotate(90deg); }
.lights-bevahg-categories > summary span, .lights-bevahg-scenes-accordion > summary span { display: grid; gap: 3px; }
.lights-bevahg-categories > summary small, .lights-bevahg-scenes-accordion > summary small { color: var(--muted); font-weight: 400; }
.lights-bevahg-accordion-body { padding: 0 12px 12px; }
.lights-bevahg-scenes-accordion .lights-bevahg-list { margin: 0; }

/* BEVAHG color_temperature layout */
.lights-bevahg-temperatures { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.lights-bevahg-temperatures-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lights-bevahg-temperatures-head strong { font-weight: 700; }
.lights-bevahg-temperatures-head button { flex: 0 0 auto; }
.lights-bevahg-temperature { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 8px 0; }
.lights-bevahg-temperature label { display: grid; gap: 4px; }
.lights-bevahg-temperature label span { color: var(--muted); font-size: .9em; }
.lights-bevahg-temperature > button { margin-bottom: 0; }


/* BEVAHG admin scene list: compact cards with one expanded editor. */
.lights-bevahg-scenes-accordion .lights-bevahg-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.lights-bevahg-scenes-accordion .lights-bevahg-card { min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--panel-radius, 8px); background: color-mix(in srgb, var(--line) 18%, transparent); }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-toggle { position: relative; display: grid; grid-template-rows: 112px auto; width: 100%; min-height: 174px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-toggle:hover, .lights-bevahg-scenes-accordion .lights-bevahg-scene-card-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-image { display: grid; place-items: center; width: 100%; height: 112px; overflow: hidden; color: var(--muted); }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-image img { width: 100%; height: 100%; object-fit: cover; }

.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-caption { display: grid; align-content: center; gap: 3px; min-width: 0; padding: 10px 34px 10px 12px; }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-caption strong, .lights-bevahg-scenes-accordion .lights-bevahg-scene-card-caption small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-caption small { color: var(--muted); }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-chevron { position: absolute; right: 12px; bottom: 14px; color: var(--muted); transition: transform .16s ease; }
.lights-bevahg-scenes-accordion [data-bevahg-scene].is-expanded { grid-column: 1 / -1; }
.lights-bevahg-scenes-accordion [data-bevahg-scene].is-expanded .lights-bevahg-scene-card-chevron { transform: rotate(90deg); }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-editor-body { padding: 12px; border-top: 1px solid var(--line); }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-editor-body[hidden] { display: none; }
.lights-bevahg-scenes-accordion [data-bevahg-scene].is-expanded .lights-bevahg-scene-card-toggle { grid-template-rows: 86px auto; min-height: 148px; }
.lights-bevahg-scenes-accordion [data-bevahg-scene].is-expanded .lights-bevahg-scene-card-image { height: 86px; }



/* BEVAHG admin scene card layout correction */
.lights-bevahg-scenes-accordion .lights-bevahg-card { display: block; }
.lights-bevahg-scenes-accordion .lights-bevahg-scene-card-image img { display: block; max-width: 100%; max-height: 100%; object-fit: cover; }

@media (min-width: 1100px) {
  .config-center-content .settings-fields.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-center-content .settings-fields.two-columns > .settings-wide-field,
  .config-center-content .settings-fields.two-columns > .settings-full-row {
    grid-column: 1 / -1;
  }
}

/* E.V.A. account panel: isolated from the existing login popup and menu items. */
.side-menu-profile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.side-menu-profile:hover,
.side-menu-profile:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: rgba(255, 255, 255, 0.13);
  outline: 0;
}
.side-menu-profile[hidden] { display: none; }
.side-menu-profile-copy { min-width: 0; display: grid; gap: 4px; }
.side-menu-profile-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-menu-profile-copy small { color: var(--muted); }
.side-menu-profile-arrow { color: var(--muted); font-size: 1.7rem; line-height: 1; }
.eva-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.1);
  background-position: center;
  background-size: cover;
  font-weight: 800;
}
.eva-avatar-menu { width: 44px; height: 44px; }
.eva-account-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  justify-items: end;
  align-items: stretch;
  padding: 18px;
  background: rgba(7, 18, 38, var(--overlay-opacity));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.eva-account-overlay.is-open { opacity: 1; pointer-events: auto; }
.eva-account-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(680px, 100%);
  max-height: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--config-center-background) 94%, #08051d 6%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: translateX(24px);
  transition: transform 180ms ease;
}
.eva-account-overlay.is-open .eva-account-dialog { transform: translateX(0); }
.eva-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.eva-account-header h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.eva-account-header p { margin: 4px 0 0; color: var(--muted); }
.eva-account-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}
.eva-account-form { overflow: auto; padding: 18px 24px 24px; }
.eva-account-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}
.eva-account-identity { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; align-items: center; }
.eva-avatar-editor { position: relative; width: 126px; height: 126px; margin: auto; }
.eva-avatar-large { width: 126px; height: 126px; font-size: 2rem; }
.eva-avatar-upload {
  position: absolute;
  right: -2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--config-center-background);
  border-radius: 50%;
  color: var(--text);
  background: var(--accent);
  cursor: pointer;
}
.eva-account-fields, .eva-account-password-grid, .eva-account-preferences { display: grid; gap: 12px; }
.eva-account-fields label, .eva-account-password-grid label, .eva-account-preferences label { display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }
.eva-account-fields input, .eva-account-password-grid input, .eva-account-preferences select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--input-background);
  padding: 0 11px;
  font: inherit;
}
.eva-account-preferences select option { color: #172025; }
.eva-account-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.eva-account-section-heading h3 { margin: 0; font-size: 1.05rem; }
.eva-account-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.eva-account-section-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 50%; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); font-size: 1.2rem; }
.eva-account-secondary, .eva-account-primary { min-height: 40px; margin-top: 14px; padding: 0 14px; border-radius: 9px; font: inherit; cursor: pointer; }
.eva-account-secondary { border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, 0.08); }
.eva-account-primary { border: 0; color: var(--button-text); background: var(--button-background); font-weight: 760; }
.eva-account-actions { display: flex; justify-content: flex-end; }
.eva-account-message { min-height: 20px; margin: 4px 0 0; color: var(--accent); }
.eva-account-message.is-error { color: var(--error); }
@media (min-width: 620px) {
  .eva-account-password-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eva-account-preferences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 619px) {
  .eva-account-overlay { padding: 0; }
  .eva-account-dialog { width: 100%; border-radius: 0; }
  .eva-account-header { padding: 18px 16px 14px; }
  .eva-account-form { padding: 14px 16px 20px; }
  .eva-account-identity { grid-template-columns: 1fr; }
  .eva-avatar-editor { margin: 0 auto; }
}

/* Kompaktowe okno „Moje konto” bez zmiany pozostałych paneli. */
.eva-account-dialog {
  width: min(460px, calc(100% - 24px));
}
.eva-account-header {
  gap: 10px;
  padding: 16px 18px 12px;
}
.eva-account-header h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.eva-account-header p { margin-top: 2px; font-size: .82rem; }
.eva-account-close {
  width: 34px;
  height: 34px;
  font-size: 1.25rem;
}
.eva-account-form { padding: 12px 18px 16px; }
.eva-account-card {
  margin-bottom: 8px;
  padding: 10px;
  border-radius: 10px;
}
.eva-account-identity {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}
.eva-avatar-editor,
.eva-avatar-large { width: 82px; height: 82px; }
.eva-avatar-large { font-size: 1.35rem; }
.eva-avatar-upload {
  width: 24px;
  height: 24px;
  font-size: .8rem;
}
.eva-account-fields,
.eva-account-password-grid,
.eva-account-preferences { gap: 7px; }
.eva-account-fields label,
.eva-account-password-grid label,
.eva-account-preferences label {
  gap: 3px;
  font-size: .78rem;
}
.eva-account-fields input,
.eva-account-password-grid input,
.eva-account-preferences select {
  min-height: 32px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: .86rem;
}
.eva-account-section-heading {
  gap: 8px;
  margin-bottom: 8px;
}
.eva-account-section-heading h3 { font-size: .92rem; }
.eva-account-section-heading p { margin-top: 1px; font-size: .78rem; }
.eva-account-section-icon {
  width: 30px;
  height: 30px;
  font-size: .9rem;
}
.eva-account-secondary,
.eva-account-primary {
  min-height: 32px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: .86rem;
}
.eva-account-message { min-height: 16px; margin: 2px 0 0; font-size: .8rem; }

@media (max-width: 619px) {
  .eva-account-dialog {
    width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    border-radius: 12px;
  }
  .eva-account-header { padding: 12px 14px 10px; }
  .eva-account-form { padding: 10px 14px 12px; }
}

@media (max-width: 599px) {
  .eva-about-overlay {
    align-items: center;
    overflow-y: auto;
    padding: 10px;
  }
  .eva-about-dialog {
    width: min(100%, 360px);
    max-height: calc(100dvh - 20px);
    border-radius: 10px;
  }
  .eva-about-header {
    padding: 12px 44px 10px;
  }
  .eva-about-heading {
    gap: 4px;
  }
  .eva-about-logo {
    width: 52px;
    height: 52px;
  }
  .eva-about-header h2 {
    margin-top: 1px;
    font-size: .98rem;
    line-height: 1.15;
  }
  .eva-about-header p {
    font-size: .76rem;
    line-height: 1.2;
  }
  .eva-about-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 1.1rem;
  }
  .eva-about-content {
    gap: 8px;
    max-height: calc(100dvh - 122px);
    overflow-y: auto;
    padding: 12px;
  }
  .eva-about-facts {
    gap: 5px;
  }
  .eva-about-facts div {
    grid-template-columns: minmax(72px, .55fr) minmax(0, 1fr);
    gap: 8px;
    padding-bottom: 5px;
  }
  .eva-about-facts dt,
  .eva-about-facts dd {
    font-size: .76rem;
    line-height: 1.2;
  }
  .eva-about-description {
    color: #000;
    font-size: .74rem;
    line-height: 1.3;
  }
}
/* Compact typography for the E.V.A. information dialog only. */
.eva-about-dialog {
  font-size: 1rem;
}
.eva-about-header h2 {
  font-size: 1.12rem;
}
.eva-about-header p {
  font-size: 0.9rem;
}
.eva-about-facts dt {
  font-size: 0.84rem;
}
.eva-about-facts dd,
.eva-about-description {
  font-size: 1rem;
}
.eva-about-description {
  line-height: 1.35;
}
