/* Nevilo — day / night theme */

.sidebar__theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  padding: 0.35rem 0.45rem;
  border-radius: 12px;
  background: rgba(12, 116, 105, 0.05);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.sidebar__theme-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.15rem;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.theme-toggle__btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.theme-toggle__btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.theme-toggle__btn.is-active {
  color: var(--teal-deep);
  background: var(--teal-soft);
}

html[data-nevilo-theme="dark"] {
  --ink: #e8f4f0;
  --ink-soft: #c5d9d3;
  --muted: #8aa39c;
  --muted-2: #6d8480;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --bg: #050d0c;
  --surface: #0a1614;
  --white: #101f1c;
  --teal-soft: rgba(12, 116, 105, 0.22);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html[data-nevilo-theme="dark"] body {
  background:
    radial-gradient(900px 520px at 10% -15%, rgba(12, 116, 105, 0.12) 0%, transparent 55%),
    radial-gradient(720px 420px at 100% 0%, rgba(12, 116, 105, 0.08) 0%, transparent 50%),
    linear-gradient(168deg, #071412 0%, var(--bg) 48%, #0a1816 100%);
}

html[data-nevilo-theme="dark"] .device {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 8px rgba(0, 0, 0, 0.35),
    0 40px 100px rgba(0, 0, 0, 0.45);
}

html[data-nevilo-theme="dark"] .ambient {
  background:
    radial-gradient(340px 200px at 92% 6%, rgba(12, 116, 105, 0.18), transparent 60%),
    radial-gradient(280px 180px at 0% 38%, rgba(194, 82, 61, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 22%);
}

html[data-nevilo-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #101f1c 0%, #0a1614 100%);
  border-left-color: var(--line);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.35);
}

html[data-nevilo-theme="dark"] .sidebar__theme {
  background: rgba(255, 255, 255, 0.03);
}

html[data-nevilo-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.04);
}

html[data-nevilo-theme="dark"] .strip {
  background: rgba(255, 255, 255, 0.04);
}

html[data-nevilo-theme="dark"] .btn-icon,
html[data-nevilo-theme="dark"] .burger {
  background: var(--white);
  border-color: var(--line);
}

html[data-nevilo-theme="dark"] .metric {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

html[data-nevilo-theme="dark"] .metric.is-on {
  background: var(--white);
}

html[data-nevilo-theme="dark"] .tabbar {
  background: rgba(16, 31, 28, 0.88);
  border-color: var(--line);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

html[data-nevilo-theme="dark"] .row {
  background: var(--white);
}

html[data-nevilo-theme="dark"] .vital-chart {
  background: linear-gradient(180deg, var(--white) 0%, var(--surface) 100%);
}

html[data-nevilo-theme="dark"] .vital-chart-period {
  background: var(--white);
}

html[data-nevilo-theme="dark"] .vital-chart-period__btn.is-active {
  background: rgba(12, 116, 105, 0.22);
}

html[data-nevilo-theme="dark"] .gauge .track {
  stroke: rgba(255, 255, 255, 0.08);
}

html[data-nevilo-theme="dark"] .row-action--delete {
  background: rgba(194, 82, 61, 0.12);
}

html[data-nevilo-theme="dark"] .row-action--analyze {
  box-shadow: 0 4px 14px rgba(12, 116, 105, 0.35);
}

html[data-nevilo-theme="dark"] .row--record.is-selected {
  box-shadow: 0 0 0 1px rgba(120, 240, 200, 0.18);
}

html[data-nevilo-theme="dark"] .profile-option span {
  background: var(--white);
}

html[data-nevilo-theme="dark"] .profile-option input:checked + span {
  background: var(--teal-soft);
}

html[data-nevilo-theme="dark"] .vital--heart .vital__ico {
  background: rgba(194, 82, 61, 0.15);
}

html[data-nevilo-theme="dark"] .vital--bp .vital__ico { background: rgba(37, 105, 135, 0.18); }
html[data-nevilo-theme="dark"] .vital--o2 .vital__ico { background: rgba(12, 116, 105, 0.18); }
html[data-nevilo-theme="dark"] .vital--gl .vital__ico { background: rgba(176, 125, 31, 0.18); }
html[data-nevilo-theme="dark"] .vital--ecg .vital__ico { background: rgba(194, 82, 61, 0.15); }
html[data-nevilo-theme="dark"] .vital--bmi .vital__ico { background: rgba(12, 116, 105, 0.18); }

html[data-nevilo-theme="dark"] .home-menu__item {
  background: var(--white);
}

html[data-nevilo-theme="dark"] .lang-sheet__panel {
  background: #101f1c;
  color: var(--ink);
  border-color: var(--line);
}

html[data-nevilo-theme="dark"] .lang-sheet__close {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

html[data-nevilo-theme="dark"] .lang-sheet__item {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

html[data-nevilo-theme="dark"] .lang-sheet__head h2 {
  color: var(--muted);
}
