:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #080808;
  --surface-elevated: #0f0f0f;
  --surface-hover: #141414;
  --field: #050505;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(255, 255, 255, 0.24);
  --text: #ffffff;
  --text-secondary: #b4b4b4;
  --muted: #767676;
  --dim: #4a4a4a;
  --accent: #ffffff;
  --accent-dark: #000000;
  --status-ok: #10b981;
  --status-ok-bg: rgba(16, 185, 129, 0.10);
  --status-warn: #f59e0b;
  --status-warn-bg: rgba(245, 158, 11, 0.10);
  --status-crit: #ef4444;
  --status-crit-bg: rgba(239, 68, 68, 0.10);
  --btc-gold: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Geist", "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

html, body {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---- Top Market Ticker Minimalista ---- */
.market-ticker {
  display: none !important;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 28px;
  background: #000000;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 11.5px;
  user-select: none;
}

.market-ticker::before,
.market-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}

.market-ticker::before {
  left: 0;
  background: linear-gradient(90deg, #000000, transparent);
}

.market-ticker::after {
  right: 0;
  background: linear-gradient(270deg, #000000, transparent);
}

.market-ticker-track {
  display: flex;
  align-items: center;
  gap: 28px;
  white-space: nowrap;
  padding-left: 24px;
  animation: ticker-scroll 140s linear infinite;
}

.market-ticker:hover .market-ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.ticker-symbol {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ticker-price {
  color: var(--text);
  font-weight: 600;
}

.ticker-chg {
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.ticker-chg.up {
  color: var(--status-ok);
  background: var(--status-ok-bg);
}

.ticker-chg.down {
  color: var(--status-crit);
  background: var(--status-crit-bg);
}

/* ---- Header Minimalista Super Tela ---- */
.header {
  position: sticky;
  top: 28px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 13px max(3vw, 20px);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.brand:hover {
  opacity: 0.82;
}

.brand-logo {
  width: 28px;
  height: 28px;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 15.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-text strong {
  font-weight: 800;
  color: #ffffff;
}

.brand-text em {
  font-style: normal;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.62);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav button {
  position: relative;
  padding: 7px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.main-nav button:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.main-nav button.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  border-color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-ok);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lang-select {
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.lang-select:hover {
  border-color: var(--border-hover);
}

/* ---- Botões Padrão Super Tela ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-elevated);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.btn-primary:hover {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #000000;
}

.btn-danger {
  color: var(--status-crit);
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.06);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
}

.btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
}

/* ---- Containers & Views ---- */
.view-container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px max(3vw, 20px) 80px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---- LANDING VIEW (Minimalista Super Tela) ---- */
.hero-section {
  text-align: center;
  max-width: 860px;
  margin: 36px auto 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}

.hero-title span {
  color: var(--muted);
  font-weight: 300;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

/* Moldura do Palco Interativo */
.stage-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
  margin-bottom: 64px;
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #050505;
  border-bottom: 1px solid var(--border);
}

.stage-dots {
  display: flex;
  gap: 7px;
}

.stage-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #262626;
  display: block;
}

.stage-url {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 3px 14px;
  border-radius: 999px;
  background: #0c0c0c;
  border: 1px solid var(--border);
}

/* Métricas e Bento Grid */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 64px;
}

.metric-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.18s ease;
}

.metric-box:hover {
  border-color: var(--border-hover);
}

.metric-box strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.metric-box span {
  font-size: 13px;
  color: var(--muted);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.bento-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.bento-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Fluxo Como Funciona */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 64px;
}

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
}

.flow-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #000000;
  background: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.flow-step h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.flow-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* Pricing Card */
.pricing-card {
  max-width: 680px;
  margin: 0 auto 40px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}

.price-big {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price-unit {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

/* ---- MONITOR AO VIVO (LegacyMonitor em Preto Puro) ---- */
.lm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.lm-farm-title-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.farm-switch-eyebrow-row {
  display: flex;
  align-items: center;
}

.btn-farm-quick-switch {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  width: fit-content;
}

.btn-farm-quick-switch:hover {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.btn-farm-quick-switch .switch-badge {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  color: #ffffff;
  font-size: 10px;
}

.interactive-farm-title {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
  user-select: none;
}

.interactive-farm-title:hover {
  color: #ffffff;
}

.farm-select-caret {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.15s ease;
}

.interactive-farm-title:hover .farm-select-caret {
  color: #ffffff;
  transform: translateY(1px);
}

.farm-quick-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 100;
  width: min(420px, 94vw);
  background: #080808;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #040404;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.dropdown-farms-list {
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow-y: auto;
}

.dropdown-farm-item {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, border-left-color 0.15s ease;
  border-left: 3px solid transparent;
}

.dropdown-farm-item:last-child {
  border-bottom: none;
}

.dropdown-farm-item:hover {
  background: #111111;
  border-left-color: rgba(255, 255, 255, 0.4);
}

.dropdown-farm-item.active {
  background: #0d0d0d;
  border-left-color: var(--status-ok);
}

.dropdown-farm-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dropdown-farm-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.dropdown-farm-loc {
  font-size: 11px;
  color: var(--muted);
}

.dropdown-farm-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-top: 2px;
}

.dropdown-footer {
  padding: 8px 12px;
  background: #040404;
  border-top: 1px solid var(--border);
}

.dropdown-footer .btn {
  width: 100%;
  justify-content: center;
  font-size: 11.5px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-secondary);
}

.dropdown-footer .btn:hover {
  background: #0e0e0e;
  color: #ffffff;
}

.lm-farm-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lm-farm-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 5 KPI Cards */
.lm-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.lm-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color 0.16s ease;
}

.lm-kpi:hover {
  border-color: var(--border-hover);
}

.lm-kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.lm-kpi-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.lm-kpi-sub {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Gráficos 24h SVG */
.lm-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.lm-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
}

.lm-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lm-chart-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.lm-chart-head strong {
  font-family: var(--font-mono);
  font-size: 16px;
}

.svg-chart-wrap {
  width: 100%;
  height: 155px;
  position: relative;
  cursor: crosshair;
}

.svg-chart-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  top: 8px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #141414;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  pointer-events: none;
}

/* Barra de Ferramentas e Filtros */
.lm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.lm-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #040404;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.pill-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.lm-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 34px;
  border-radius: 999px;
  background: #040404;
  border: 1px solid var(--border);
  width: 240px;
}

.lm-search:focus-within {
  border-color: var(--border-hover);
}

.lm-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 12.5px;
}

.lm-select {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #040404;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Barra de Ações em Lote (Bulk Actions) */
.lm-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* Tabela da Frota (Linhas separadas estilo Card) */
.lm-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.lm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  min-width: 1040px;
}

.lm-table th {
  text-align: left;
  padding: 6px 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.lm-table th:hover {
  color: var(--text);
}

.lm-table tbody tr {
  background: var(--surface);
  transition: background 0.15s ease;
}

.lm-table tbody tr:hover {
  background: var(--surface-elevated);
}

.lm-table tbody tr.row-warn {
  background: rgba(245, 158, 11, 0.05);
}

.lm-table tbody tr.row-crit {
  background: rgba(239, 68, 68, 0.06);
}

.lm-table td {
  padding: 11px 12px;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.lm-table td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.lm-table td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* Barras de Hashboards */
.hb-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 135px;
}

.hb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.hb-track {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hb-fill {
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
}

.hb-fill.warn {
  background: var(--status-warn);
}

.hb-fill.bad {
  background: var(--status-crit);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.ok {
  color: var(--status-ok);
  background: var(--status-ok-bg);
}

.status-badge.warn {
  color: var(--status-warn);
  background: var(--status-warn-bg);
}

.status-badge.crit {
  color: var(--status-crit);
  background: var(--status-crit-bg);
}

.star-btn {
  background: none;
  border: 0;
  color: #404040;
  font-size: 15px;
  padding: 1px 3px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-btn:hover {
  color: #ffd700;
  transform: scale(1.2);
}

.star-btn.on {
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

/* Modo Cards de Hashboard (Grid 4 colunas) */
.lm-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.miner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.16s ease;
}

.miner-card:hover {
  border-color: var(--border-hover);
}

/* Console de Eventos no Rodapé */
.events-console {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #050505;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.events-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.console-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.console-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.console-tab-btn.active {
  background: #181818;
  border-color: var(--border-strong);
  color: #ffffff;
}

.command-entry {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: #080808;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-left: 3px solid #10b981;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.command-entry:hover {
  background: #0d0d0d;
}

.event-line {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
}

.event-line .ts {
  color: var(--muted);
}

/* ---- MODAIS OPERACIONAIS ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-box {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #080808;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.modal-close:hover {
  color: #ffffff;
  border-color: var(--border-hover);
}

/* Toolbar de Edição do Nome & Refrigeração no Modal de Detalhes */
.det-rename-box {
  background: #080808;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.det-rename-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 280px;
}

.det-rename-group input {
  width: 140px;
  max-width: 100%;
}

.det-cooling-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Mapa Físico PCB de Chips */
.pcb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  padding: 16px;
  background: #030303;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 14px 0;
}

.chip-cell {
  padding: 7px 4px;
  border-radius: 6px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.chip-cell:hover {
  transform: scale(1.06);
  border-color: #ffffff;
}

.chip-cell.ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.chip-cell.warn {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.chip-cell.bad {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.16);
}

.chip-cell small {
  display: block;
  font-size: 9.5px;
  color: var(--muted);
}

.chip-cell b {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

/* ---- Form Controls ---- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: #040404;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.form-input:focus {
  border-color: #ffffff;
  outline: none;
}

/* ---- Watchdog Interativo & Parâmetros Configuráveis ---- */
.wd-rule-card {
  background: #060606;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  transition: border-color 0.18s ease;
}

.wd-rule-card.disabled {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.04);
}

.wd-rule-card:hover {
  border-color: var(--border-hover);
}

.wd-grid-row {
  display: grid;
  grid-template-columns: 1fr 130px 1.4fr auto;
  align-items: center;
  gap: 12px;
}

@media (max-width: 820px) {
  .wd-grid-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.wd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wd-field label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.wd-input, .wd-select {
  background: #020202;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.wd-input:focus, .wd-select:focus {
  border-color: #ffffff;
}

.wd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.wd-toggle.active {
  background: var(--status-ok-bg);
  border-color: var(--status-ok);
  color: var(--status-ok);
  font-weight: 600;
}

.wd-del-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wd-del-btn:hover {
  background: var(--status-crit-bg);
  color: var(--status-crit);
  border-color: var(--status-crit);
}

/* ---- Painel de Parâmetros Rápidos do Watchdog no Dashboard (Minimalista Super Tela) ---- */
.wd-dashboard-panel {
  background: #000000;
  border: 1px solid #1a1a1f;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
  transition: border-color 0.2s ease;
}

.wd-dashboard-panel:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.wd-dashboard-panel.wd-collapsed {
  padding-bottom: 12px;
}

/* Watchdog Reboot Automático Simplificado - Minimalista Super Tela */
.wd-simple-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wd-simple-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wd-simple-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.wd-simple-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wd-simple-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.wd-simple-sub {
  font-size: 11.5px;
  color: #71717a;
  margin: 2px 0 0;
  line-height: 1.4;
}

.wd-simple-corner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wd-simple-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wd-custom-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.wd-custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.wd-switch-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1f1f23;
  border: 1px solid #2e2e33;
  border-radius: 999px;
  transition: 0.2s ease;
}

.wd-switch-track:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.2s ease;
}

.wd-custom-switch input:checked + .wd-switch-track {
  background-color: var(--accent, #22d3ee);
  border-color: var(--accent, #22d3ee);
}

.wd-custom-switch input:checked + .wd-switch-track:before {
  transform: translateX(16px);
  background-color: #000000;
}

.wd-switch-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #e4e4e7);
  cursor: pointer;
}

.wd-simple-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 800px) {
  .wd-simple-grid {
    grid-template-columns: 1fr;
  }
}

.wd-simple-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wd-simple-field label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #71717a;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.wd-simple-input-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #09090b;
  border: 1px solid #222226;
  border-radius: 5px;
  padding: 0 10px;
  height: 36px;
  transition: border-color 0.15s ease;
}

.wd-simple-input-wrap:focus-within {
  border-color: var(--accent, #22d3ee);
}

.wd-simple-input {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  width: 75px;
  font-family: var(--font-mono);
}

.wd-simple-unit {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.wd-simple-hint {
  font-size: 10.5px;
  color: #52525b;
  margin-top: 1px;
}

.wd-simple-explanation {
  background: #070709;
  border: 1px solid #1a1a1f;
  border-left: 2px solid var(--accent, #22d3ee);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wd-simple-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}
  padding-top: 4px;
}

.wd-dashboard-panel.wd-collapsed .wd-panel-head {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.wd-dashboard-panel.wd-collapsed .wd-quick-grid,
.wd-dashboard-panel.wd-collapsed .wd-feedback-msg {
  display: none !important;
}

.wd-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.wd-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wd-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wd-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

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

@media (max-width: 600px) {
  .wd-quick-grid {
    grid-template-columns: 1fr;
  }
}

.wd-quick-item {
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wd-quick-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.wd-quick-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

.wd-quick-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  width: 100%;
  outline: none;
}

.wd-quick-unit {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.wd-quick-select {
  background: #000000;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 12.5px;
  padding: 6px 8px;
  outline: none;
  width: 100%;
}

.wd-quick-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.wd-feedback-msg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   TELA DE ENTRADA & LOGIN MINIMALISTA SUPER TELA
   HashGuard - Eficiência em monitoramento de Hash
   ========================================================================== */
.login-landing-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  min-height: 82vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

@media (max-width: 960px) {
  .login-landing-container {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 16px;
  }
}

.login-intro-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #080808;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  width: fit-content;
}

.login-intro-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-hero-logo {
  width: 38px;
  height: 38px;
  color: #ffffff;
}

.login-intro-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
  color: #ffffff;
}

@media (max-width: 720px) {
  .login-intro-title {
    font-size: 26px;
  }
}

.login-intro-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}

.login-intro-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.login-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.login-feat-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: #080808;
}

.login-feat-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.login-feat-item strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 2px;
}

.login-feat-item p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.login-intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.intro-stat-box {
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.intro-stat-box strong {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.intro-stat-box small {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-card-side {
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.login-logo {
  width: 32px;
  height: 32px;
  color: #ffffff;
}

.login-head h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.login-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-demo-bar {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.login-footer-meta {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #080808;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

/* ==========================================================================
   RESUMO DAS FARMS CADASTRADAS (ABA INÍCIO)
   ========================================================================== */
.farms-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.farms-main-title {
  font-size: 28px;
  font-weight: 800;
  margin: 2px 0 6px;
  letter-spacing: -0.02em;
}

.farms-main-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 650px;
  line-height: 1.5;
}

.farms-global-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

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

@media (max-width: 600px) {
  .farms-global-kpis {
    grid-template-columns: 1fr;
  }
}

.farms-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.farms-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 40px;
  width: 100%;
  max-width: 420px;
}

.farms-search-wrap input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13.5px;
  width: 100%;
  outline: none;
}

.farms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.farm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.farm-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.farm-card.active-farm {
  border-color: rgba(255, 255, 255, 0.45);
}

.farm-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.farm-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #ffffff;
}

.farm-card-loc {
  font-size: 12px;
  color: var(--muted);
}

.farm-token-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11.5px;
}

.farm-token-box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-metrics-grid {
  display: grid;
  grid-template-columns: 1.14fr 0.86fr;
  gap: 8px;
  padding: 10px;
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.farm-metric-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 11px;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  min-height: 74px;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
}

.farm-metric-cell:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0c0c0c;
}

.farm-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.farm-metric-header label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin: 0;
}

.farm-metric-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.farm-metric-main strong {
  font-size: 15px;
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}

.farm-metric-tag {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.status-pill-mini {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  border: 1px solid transparent;
  line-height: 1.3;
}

.status-pill-mini.ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #4ade80;
}

.status-pill-mini.warn {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.28);
  color: #facc15;
}

.farm-metric-cell small {
  font-size: 10.5px;
  color: var(--text-secondary);
  line-height: 1.25;
}

.farm-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.farm-card-foot .btn-primary {
  flex: 1;
  justify-content: center;
  font-weight: 700;
}

/* Gráfico Consolidado & Status das Máquinas na aba Início */
.inicio-sections-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.inicio-draggable-section {
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.inicio-draggable-section.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.inicio-draggable-section.drag-over-above {
  border-top: 2px solid #ffffff !important;
  transform: translateY(2px);
}

.inicio-draggable-section.drag-over-below {
  border-bottom: 2px solid #ffffff !important;
  transform: translateY(-2px);
}

.section-drag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 14px;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  user-select: none;
}

.section-drag-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.drag-grip {
  font-size: 14px;
  color: var(--muted);
  cursor: grab;
  padding: 2px 4px;
  transition: color 0.15s ease;
}

.drag-grip:hover {
  color: #ffffff;
}

.section-drag-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-sec-reorder {
  background: #111111;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-sec-reorder:hover {
  background: #1c1c1c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* KPI Draggable Cards */
.kpi-draggable {
  cursor: grab;
  transition: transform 0.15s ease, border-color 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.kpi-draggable:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.kpi-draggable.kpi-dragging {
  opacity: 0.45;
  border-style: dashed;
}

.kpi-draggable.kpi-drag-over {
  border-color: #ffffff;
  transform: scale(1.02);
}

/* Card de Rendimento Consolidado */
.farms-rendimento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.rendimento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

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

@media (max-width: 600px) {
  .rendimento-grid {
    grid-template-columns: 1fr;
  }
}

.rend-stat-box {
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rend-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.rend-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.rend-stat-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.farms-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 0;
}

.farms-status-breakdown-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 0;
}

.status-breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.status-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .status-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.status-summary-box {
  background: #040404;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.status-summary-box:hover {
  transform: translateY(-2px);
}

.status-summary-box.ok {
  border-left: 3px solid var(--status-ok);
}

.status-summary-box.warn {
  border-left: 3px solid var(--status-warn);
}

.status-summary-box.crit {
  border-left: 3px solid var(--status-crit);
}

.status-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-box-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator-dot.dot-ok {
  background: var(--status-ok);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-indicator-dot.dot-warn {
  background: var(--status-warn);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-indicator-dot.dot-crit {
  background: var(--status-crit);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.status-box-val {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.status-box-val small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.status-box-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.status-machines-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-machine-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #080808;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.status-machine-item:hover {
  background: #121212;
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.status-machine-item.warn:hover {
  border-color: rgba(234, 179, 8, 0.45);
}

.status-machine-item.crit:hover {
  border-color: rgba(239, 68, 68, 0.45);
}

.status-machine-item .m-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
}

.status-machine-item .m-farm {
  font-size: 11px;
  color: var(--text-secondary);
  background: #141414;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.status-machine-item .m-reason {
  font-size: 11px;
  font-family: var(--font-mono);
}

.status-machine-item.warn .m-reason {
  color: var(--status-warn);
}

.status-machine-item.crit .m-reason {
  color: var(--status-crit);
}

.status-machine-item .m-arrow {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.status-machine-item:hover .m-arrow {
  color: #ffffff;
  transform: translateX(2px);
}

.farm-hashboards-count {
  margin-top: 4px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* Estilos de Refrigeração: Rotação das Fans e Modo Imersão */
.immersion-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #22d3ee;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.immersion-icon {
  font-size: 11px;
}

.fans-rpm-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.fan-rpm-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  font-size: 11px;
  line-height: 1.3;
}

/* ---- Links Locais para Interface Web da ASIC ---- */
.miner-local-link {
  transition: color 0.15s ease, opacity 0.15s ease;
}
.miner-local-link:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}
.miner-local-link:hover strong {
  color: var(--accent) !important;
}
.miner-ip-link {
  transition: color 0.15s ease, opacity 0.15s ease;
}
.miner-ip-link:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

/* Responsividade */
@media (max-width: 1100px) {
  .lm-kpis { grid-template-columns: repeat(2, 1fr); }
  .lm-charts, .pricing-card { grid-template-columns: 1fr; }
  .bento-grid, .metrics-strip, .flow-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .header { grid-template-columns: 1fr; gap: 12px; }
  .bento-grid, .metrics-strip, .flow-grid { grid-template-columns: 1fr; }
}
