:root {
  --bg: #eef2f1;
  --ink: #14201c;
  --muted: #5c6b66;
  --line: #d5e0dc;
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.12);
  --danger: #b42318;
  --surface: #ffffff;
  --radius: 12px;
  --font: "Segoe UI", "IBM Plex Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 10% -10%, rgba(13, 148, 136, 0.16), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(13, 148, 136, 0.08), transparent 50%),
    var(--bg);
}

.shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.brand h1 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.28);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(20, 32, 28, 0.03), 0 12px 32px rgba(20, 32, 28, 0.05);
}

.card + .card { margin-top: 14px; }

.hidden { display: none !important; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  margin-bottom: 12px;
  background: #fbfcfc;
  color: var(--ink);
}

button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

button.primary {
  background: var(--teal);
  color: #fff;
}

button.primary.active {
  background: #0f766e;
}

button.wide { width: 100%; }

button.danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.35);
}

button.danger-outline.active {
  background: rgba(180, 35, 24, 0.08);
}

button.ghost {
  background: transparent;
  color: var(--teal);
  border: none;
  padding: 4px 8px;
  font-weight: 600;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 600;
}

.pill.off {
  background: #f2f4f3;
  color: var(--muted);
}

.pill.hot {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

#device-label {
  margin: -8px 0 14px;
  min-height: 1.2em;
}

.muted { color: var(--muted); font-size: 0.85rem; }

.actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.meter {
  height: 8px;
  border-radius: 999px;
  background: #e7eeeb;
  overflow: hidden;
  margin-bottom: 18px;
}

#level {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  transition: width 60ms linear;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.row-between h2 {
  margin: 0;
  font-size: 1rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.list a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 0;
}
