/* ─────────────────────────────────────────────
   Apple Design System — Miner Portal
   SF Pro · frosted glass · restrained blue accent
   ───────────────────────────────────────────── */

:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-grouped: #ffffff;
  --bg-sidebar: rgba(255, 255, 255, 0.72);
  --fill-quaternary: rgba(116, 116, 128, 0.08);
  --fill-tertiary: rgba(116, 116, 128, 0.12);
  --fill-secondary: rgba(116, 116, 128, 0.16);
  --separator: rgba(60, 60, 67, 0.12);
  --label: #1d1d1f;
  --label-secondary: rgba(60, 60, 67, 0.6);
  --label-tertiary: rgba(60, 60, 67, 0.3);
  --accent: #0071e3;
  --accent-pressed: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.14);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.12);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.14);
  --yellow: #ffd60a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --blur: saturate(180%) blur(20px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Menlo", "Monaco", "Cascadia Mono",
    "Segoe UI Mono", "Roboto Mono", monospace;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring: cubic-bezier(0.28, 1.1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--label);
  line-height: 1.47;
  font-size: 17px;
  letter-spacing: -0.022em;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Typography ─────────────────────────── */

.t-large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.004em;
  line-height: 1.18;
}
.t-title1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.007em;
  line-height: 1.21;
}
.t-title2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.008em;
  line-height: 1.27;
}
.t-title3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.011em;
}
.t-headline {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.t-body {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
}
.t-callout {
  font-size: 16px;
  font-weight: 400;
}
.t-subhead {
  font-size: 15px;
  font-weight: 400;
}
.t-footnote {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.008em;
}
.t-caption {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}
.t-caption2 {
  font-size: 11px;
  font-weight: 400;
}

.muted {
  color: var(--label-secondary);
}
.tertiary {
  color: var(--label-tertiary);
}

/* ── Layout ─────────────────────────────── */

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 0.5px solid var(--separator);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--label);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2997ff 0%, #0071e3 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header .meta {
  color: var(--label-secondary);
  font-size: 13px;
  margin-top: 6px;
}

/* ── Cards ──────────────────────────────── */

.card {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.card-pad {
  padding: 22px 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 0;
}

.card-body {
  padding: 18px 24px 22px;
}

.card-footer {
  padding: 14px 24px;
  border-top: 0.5px solid var(--separator);
  background: rgba(116, 116, 128, 0.03);
}

/* ── Summary tiles ──────────────────────── */

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .summary {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .summary {
    grid-template-columns: 1fr;
  }
}

.tile {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 20px 22px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease);
}

.tile:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.tile .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  letter-spacing: -0.008em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile .value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.024em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.tile .sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--label-tertiary);
}

.icon-chip {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
}
.icon-chip.blue {
  background: var(--accent-soft);
  color: var(--accent);
}
.icon-chip.green {
  background: var(--green-soft);
  color: var(--green);
}
.icon-chip.orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.icon-chip.red {
  background: var(--red-soft);
  color: var(--red);
}

/* ── Miner grid ─────────────────────────── */

.miner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.miner-card {
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease);
  text-decoration: none;
  color: inherit;
}

.miner-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
  border-color: rgba(0, 113, 227, 0.22);
  text-decoration: none;
}

.miner-card:active {
  transform: scale(0.985);
}

.miner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.miner-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.miner-ip {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--label-secondary);
  margin-top: 2px;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.metric .k {
  font-size: 12px;
  color: var(--label-secondary);
  margin-bottom: 2px;
}
.metric .v {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.miner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  border-top: 0.5px solid var(--separator);
  margin-top: auto;
}

/* ── Status pill ────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.pill.online {
  background: var(--green-soft);
  color: #248a3d;
}
.pill.offline {
  background: var(--red-soft);
  color: #d70015;
}
.pill.idle {
  background: var(--orange-soft);
  color: #c93400;
}
.pill.neutral {
  background: var(--fill-tertiary);
  color: var(--label-secondary);
}

/* ── Buttons ────────────────────────────── */

.btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.016em;
  border-radius: 980px;
  padding: 10px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.28);
}
.btn-primary:hover {
  background: var(--accent-pressed);
}

.btn-secondary {
  background: var(--fill-tertiary);
  color: var(--label);
}
.btn-secondary:hover {
  background: var(--fill-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-sm {
  font-size: 13px;
  padding: 7px 14px;
}

.btn-block {
  width: 100%;
}

/* ── Forms / Login ──────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(0, 113, 227, 0.12), transparent 60%),
    radial-gradient(700px 400px at 90% 110%, rgba(48, 209, 88, 0.08), transparent 55%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  padding: 40px 36px 32px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  text-align: center;
}

.login-brand .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--label-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.008em;
}

.field input,
.field select {
  width: 100%;
  border: none;
  outline: none;
  background: var(--fill-quaternary);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.022em;
  color: var(--label);
  border: 1.5px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--label-secondary) 50%),
    linear-gradient(135deg, var(--label-secondary) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 3px), calc(100% - 14px) calc(50% + 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  background-color: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.field input::placeholder {
  color: var(--label-tertiary);
}

.field input:focus {
  background: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.alert-error {
  background: var(--red-soft);
  color: #d70015;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.login-foot {
  margin-top: 18px;
  text-align: center;
  color: var(--label-tertiary);
  font-size: 12px;
}

/* ── Detail page ────────────────────────── */

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .kv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kv {
  background: var(--fill-quaternary);
  border-radius: 14px;
  padding: 14px 16px;
}
.kv .k {
  font-size: 12px;
  color: var(--label-secondary);
}
.kv .v {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}

.workers-table {
  width: 100%;
  border-collapse: collapse;
}
.workers-table th,
.workers-table td {
  text-align: left;
  padding: 12px 8px;
  font-size: 14px;
  border-bottom: 0.5px solid var(--separator);
}
.workers-table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--label-secondary);
  text-transform: none;
}
.workers-table tr:last-child td {
  border-bottom: none;
}
.workers-table td.num {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 13px;
}

/* ── Skeleton / empty ───────────────────── */

.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--label-secondary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.mt-24 {
  margin-top: 24px;
}
.mt-16 {
  margin-top: 16px;
}
.mb-16 {
  margin-bottom: 16px;
}

.session-badge {
  font-size: 12px;
  color: var(--label-tertiary);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fill-quaternary);
}

/* ── Miner icon strip (summary tile) ───── */

.miner-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  max-height: 96px;
  overflow: hidden;
}

.m-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease);
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
}

.m-more {
  background: var(--fill-tertiary);
  color: var(--label-secondary);
  outline: none;
}

.m-icon:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: var(--shadow-2);
  text-decoration: none;
}

.m-icon.ok {
  background: var(--green-soft);
  color: #248a3d;
  outline: 1.5px solid rgba(48, 209, 88, 0.55);
}

.m-icon.warn {
  background: var(--orange-soft);
  color: #c93400;
  outline: 1.5px solid rgba(255, 159, 10, 0.55);
}

.m-icon.bad {
  background: var(--red-soft);
  color: #d70015;
  outline: 1.5px solid rgba(255, 69, 58, 0.5);
}

/* type tint */
.m-chip {
  background-image: linear-gradient(145deg, rgba(0, 113, 227, 0.16), transparent 60%);
}
.m-cube {
  background-image: linear-gradient(145deg, rgba(94, 92, 230, 0.16), transparent 60%);
}
.m-bolt {
  background-image: linear-gradient(145deg, rgba(48, 209, 88, 0.14), transparent 60%);
}

.summary {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
  .summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Kryptex profitability widget ───────── */

.kx-card {
  border-width: 2px;
}

.kx-ok {
  border-color: #30d158;
  box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.18), var(--shadow-1);
}

.kx-bad {
  border-color: #ff453a;
  box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.14), var(--shadow-1);
}

.kx-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--fill-quaternary);
  font-size: 12px;
}

.kx-row.kx-best {
  background: var(--green-soft);
  color: #248a3d;
  font-weight: 600;
}

.kx-row.kx-cur {
  outline: 1.5px solid var(--accent);
  outline-offset: -1.5px;
}

.kx-sym {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
}

.kx-name {
  color: var(--label-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kx-profit {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ── Logs ──────────────────────────────── */

.log-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log-tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fill-quaternary);
  color: var(--label-secondary);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.log-tab:hover {
  background: var(--fill-tertiary);
  text-decoration: none;
  color: var(--label);
}

.log-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
}

.log-view {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--label);
  background: var(--fill-quaternary);
  border-radius: 12px;
  padding: 16px 18px;
  max-height: 70vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.log-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 72vh;
  overflow: auto;
  padding: 4px 2px;
}

.log-line {
  display: grid;
  grid-template-columns: 168px 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  box-shadow: var(--shadow-1);
}

.log-msg {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  padding-top: 2px;
}

@media (max-width: 720px) {
  .log-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.log-src {
  display: inline-block;
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.log-src.miner-anthill,
.log-src.miner-vnish {
  background: #0071e3;
}
.log-src.miner-jasminer {
  background: #5e5ce6;
}
.log-src.miner-goldshell,
.log-src.miner-bitaxe {
  background: #30d158;
  color: #1d1d1f;
}

.log-lvl {
  display: inline-block;
  justify-self: start;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.9;
  background: var(--fill-quaternary);
  color: var(--label-secondary);
  white-space: nowrap;
}

/* severity coloring */
.log-err {
  color: #d70015;
  background: rgba(255, 69, 58, 0.08);
  border-color: rgba(255, 69, 58, 0.2);
}
.log-err .log-lvl {
  background: var(--red-soft);
  color: #d70015;
}
.log-warn {
  color: #c93400;
  background: rgba(255, 159, 10, 0.1);
  border-color: rgba(255, 159, 10, 0.22);
}
.log-warn .log-lvl {
  background: var(--orange-soft);
  color: #c93400;
}
.log-notice {
  color: #0055c4;
  background: rgba(0, 113, 227, 0.08);
  border-color: rgba(0, 113, 227, 0.18);
}
.log-notice .log-lvl {
  background: var(--accent-soft);
  color: var(--accent);
}
.log-info {
  color: var(--label);
}
.log-debug {
  color: var(--label-tertiary);
}
.log-other {
  color: var(--label-secondary);
}

/* ── Auto-refresh control ───────────────── */

.refresh-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: var(--shadow-1);
  min-width: 260px;
}

.refresh-box.disabled {
  opacity: 0.5;
}

.refresh-box .t-caption {
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .knob {
  position: absolute;
  inset: 0;
  background: var(--fill-secondary);
  border-radius: 999px;
  transition: background 0.2s var(--ease);
  cursor: pointer;
}

.switch .knob::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--spring);
}

.switch input:checked + .knob {
  background: var(--accent);
}

.switch input:checked + .knob::after {
  transform: translateX(16px);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: var(--fill-secondary);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
}

/* silent value flash */
@keyframes value-flash {
  0% {
    color: var(--accent);
  }
  100% {
    color: inherit;
  }
}

.flash {
  animation: value-flash 0.55s var(--ease);
}

[data-metric] {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}

.miner-card {
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease),
    border-color 0.28s var(--ease), opacity 0.35s var(--ease);
}

/* subtle entrance */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.anim {
  animation: fade-up 0.45s var(--ease) both;
}
.anim-1 { animation-delay: 0.04s; }
.anim-2 { animation-delay: 0.08s; }
.anim-3 { animation-delay: 0.12s; }
.anim-4 { animation-delay: 0.16s; }
