:root {
  --bg: #e8ece6;
  --panel: rgba(252, 251, 246, 0.94);
  --panel-strong: rgba(255, 253, 248, 0.98);
  --line: rgba(36, 39, 32, 0.12);
  --line-strong: rgba(36, 39, 32, 0.2);
  --ink: #182019;
  --muted: #647060;
  --accent: #1f5d44;
  --accent-strong: #143d2e;
  --accent-soft: #dbeadf;
  --sand: #dcb77b;
  --ok: #3e7c56;
  --warn: #af7a18;
  --bad: #a93b32;
  --sleep: #55709f;
  --ok-bg: #dff0df;
  --warn-bg: #f7ebc7;
  --bad-bg: #f3d3d0;
  --sleep-bg: #d8dde3;
  --pending-bg: #edf0f5;
  --processing-bg: #e6f1ff;
  --shadow: 0 10px 24px rgba(29, 37, 25, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 93, 68, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(220, 183, 123, 0.18), transparent 22%),
    linear-gradient(180deg, #f4f0e7 0%, #e6ece5 42%, #dfe6dd 100%);
}

.page-shell,
.login-shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar,
.panel,
.hero-card,
.login-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar,
.panel,
.hero-card,
.login-card {
  background: var(--panel);
  border-radius: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.brand-block {
  display: grid;
  gap: 8px;
}

.top-actions,
.tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.feed-scope {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 32, 25, 0.05);
  border: 1px solid rgba(24, 32, 25, 0.08);
}

.action-target-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 32, 25, 0.06);
  border: 1px solid rgba(24, 32, 25, 0.1);
}

.feed-tools .tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 32, 25, 0.06);
  border: 1px solid rgba(24, 32, 25, 0.1);
}

.dashboard-shell {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(20, 61, 46, 0.95), rgba(31, 93, 68, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  color: #f7fbf6;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 18px;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.hero-copy .eyebrow,
.hero-copy .muted {
  color: rgba(247, 251, 246, 0.78);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-tile,
.meta-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-tile {
  background: rgba(255, 255, 255, 0.1);
}

.stat-tile strong,
.meta-card strong {
  font-size: 1.6rem;
  line-height: 1;
}

.stat-label,
.meta-card span {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 251, 246, 0.72);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.content-grid-single {
  grid-template-columns: 1fr;
}

.stack-column {
  display: grid;
  gap: 20px;
  grid-column: 1 / -1;
}

.panel {
  padding: 22px;
}

.panel-primary {
  background: var(--panel-strong);
}

.panel-accent {
  background:
    linear-gradient(180deg, rgba(31, 93, 68, 0.08), transparent 36%),
    var(--panel);
}

.panel-command {
  background:
    linear-gradient(180deg, rgba(220, 183, 123, 0.16), transparent 36%),
    var(--panel);
}

.panel-full {
  grid-column: 1 / -1;
}

.agent-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-health-filter {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(24, 32, 25, 0.06);
  border: 1px solid rgba(24, 32, 25, 0.1);
}

.agent-health-filter-btn.agent-health-filter-active {
  background: var(--accent-soft);
  border-color: rgba(31, 93, 68, 0.3);
  color: var(--accent-strong);
}

.agent-switcher-btn {
  min-width: 128px;
  border-radius: 999px;
}

.agent-switcher-btn.agent-switcher-active {
  background: #1f5d44;
  color: #f7fbf6;
  border-color: #143d2e;
  box-shadow: 0 10px 22px rgba(20, 61, 46, 0.22);
}

.empty-state {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 6px 2px;
}

.empty-state button {
  min-width: 144px;
}

.live-dashboard-sections {
  display: grid;
  gap: 20px;
}

.agent-dashboard-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background:
    linear-gradient(180deg, rgba(31, 93, 68, 0.05), transparent 34%),
    rgba(255, 255, 255, 0.62);
}

.agent-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.agent-dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mini-stat {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(24, 32, 25, 0.05);
  border: 1px solid rgba(24, 32, 25, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.mini-stat-offline {
  color: var(--bad);
  border-color: rgba(169, 59, 50, 0.18);
  background: rgba(169, 59, 50, 0.08);
}

.agent-offline-banner {
  margin-top: 8px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--bad);
  background: rgba(169, 59, 50, 0.08);
  border: 1px solid rgba(169, 59, 50, 0.18);
  font-size: 0.9rem;
}

.panel-feed {
  align-self: stretch;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.muted {
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

button,
input,
select {
  font: inherit;
}

button,
select,
.login-form input {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
}

button {
  cursor: pointer;
  background: var(--accent);
  color: #f7fbf6;
  padding: 10px 16px;
  transition: opacity 0.12s ease, border-color 0.12s ease;
}

button:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary,
.tab,
.scope-btn {
  background: rgba(24, 32, 25, 0.05);
  color: var(--ink);
}

.tab.active,
.scope-btn.active {
  background: var(--accent-soft);
  border-color: rgba(31, 93, 68, 0.3);
  color: var(--accent-strong);
}

.scope-btn {
  border-radius: 999px;
  padding: 8px 12px;
}

.action-target-toggle .scope-btn {
  min-width: 132px;
}

.action-target-toggle .action-scope-btn.action-active {
  background: #1f5d44;
  color: #f7fbf6;
  border-color: #143d2e;
  box-shadow: 0 10px 22px rgba(20, 61, 46, 0.22);
}

.feed-scope .feed-scope-btn,
.feed-tools .tabs .feed-tab-btn {
  min-width: 124px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent-strong);
  border-color: rgba(31, 93, 68, 0.18);
  box-shadow: none;
}

.feed-scope .feed-scope-btn.feed-active,
.feed-tools .tabs .feed-tab-btn.feed-active {
  background: #1f5d44;
  color: #f7fbf6;
  border-color: #143d2e;
  box-shadow: 0 10px 22px rgba(20, 61, 46, 0.22);
}

.panel-command .timer-row select,
.panel-command .timer-row button {
  min-height: 52px;
}

.timer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

select,
.login-form input {
  background: rgba(255, 255, 255, 0.94);
  padding: 10px 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(24, 32, 25, 0.08);
  border-radius: 18px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(24, 32, 25, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

thead th {
  position: sticky;
  top: 0;
  background: #eef2ea;
  z-index: 1;
}

tbody tr {
  cursor: pointer;
}

tbody tr.active {
  background: rgba(31, 93, 68, 0.08);
  outline: 2px solid rgba(31, 93, 68, 0.25);
  outline-offset: -2px;
}

tbody tr.status-ok {
  background: var(--ok-bg);
}

tbody tr.status-sleep {
  background: var(--sleep-bg);
}

tbody tr.status-lost {
  background: var(--bad-bg);
}

tbody tr.status-stabilize,
tbody tr.status-recovering,
tbody tr.status-low_hash,
tbody tr.status-stuck,
tbody tr.status-waiting,
tbody tr.status-pending,
tbody tr.status-monitoring {
  background: var(--warn-bg);
}

tbody tr.status-processing {
  background: var(--processing-bg);
}

.status-ok td:first-child,
.status-ok td:nth-child(3) {
  color: var(--ok);
}

.status-sleep td:first-child,
.status-sleep td:nth-child(3) {
  color: var(--sleep);
}

.status-lost td:first-child,
.status-lost td:nth-child(3) {
  color: var(--bad);
}

.status-stabilize td:first-child,
.status-recovering td:first-child,
.status-low_hash td:first-child,
.status-stuck td:first-child,
.status-waiting td:first-child,
.status-pending td:first-child,
.status-monitoring td:first-child {
  color: var(--warn);
}

.cell-message {
  max-width: 420px;
}

.agent-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.agent-action-btn {
  min-height: 38px;
  padding: 8px 12px;
  width: 108px;
  justify-content: center;
}

.agent-action-btn.danger {
  color: var(--bad);
  border-color: rgba(169, 59, 50, 0.2);
}

.meta-grid,
.miner-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.selected-miner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.selected-miner-info,
.selected-miner-actions {
  min-width: 0;
}

.selected-miner-info {
  display: grid;
  grid-template-rows: auto 1fr;
}

.selected-miner-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 12px;
}

.selected-miner-actions {
  display: flex;
}

.actions-card {
  display: grid;
  align-content: start;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background:
    linear-gradient(180deg, rgba(31, 93, 68, 0.05), transparent 38%),
    rgba(24, 32, 25, 0.03);
}

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

.actions-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.action-warning {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(175, 122, 24, 0.22);
  background: rgba(247, 235, 199, 0.9);
  color: #7a5512;
  font-size: 0.92rem;
  line-height: 1.4;
}

.actions-row button {
  width: 100%;
  min-height: 52px;
  padding: 8px 18px;
  font-size: 0.95rem;
}

.recent-actions {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 6px;
}

.recent-actions-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.recent-actions-list {
  display: grid;
  gap: 10px;
}

.enrollment-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(24, 32, 25, 0.1);
  background:
    linear-gradient(180deg, rgba(31, 93, 68, 0.05), transparent 34%),
    rgba(24, 32, 25, 0.03);
}

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

.enrollment-head h3 {
  font-size: 1.05rem;
}

.enrollment-form {
  display: grid;
  gap: 8px;
}

.enrollment-form span {
  color: var(--muted);
  font-size: 0.92rem;
}

.enrollment-form input {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  font: inherit;
}

.enrollment-actions {
  display: flex;
  justify-content: flex-start;
}

.enrollment-result {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.enrollment-code-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.enrollment-code-row strong {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.enrollment-help {
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 21, 17, 0.48);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 880px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(18, 24, 20, 0.2);
  background: var(--panel-strong);
}

.modal-head,
.modal-actions,
.timer-editor-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.timer-editor-card {
  display: grid;
  gap: 16px;
}

.timer-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.timer-editor-grid-daily {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timer-editor-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(24, 32, 25, 0.03);
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  color: var(--muted);
  font-size: 0.92rem;
}

.form-field-action button {
  width: 100%;
}

.timer-editor-hint {
  margin: 0 0 12px;
}

.timer-week-preview {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.timer-week-day {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.timer-week-day-name {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.timer-week-day-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timer-week-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.timer-week-chip-work,
.timer-week-day-default {
  background: rgba(26, 127, 55, 0.12);
  color: #165c2d;
}

.timer-week-chip-sleep {
  background: rgba(149, 31, 31, 0.12);
  color: #8a2020;
}

.timer-week-day-empty {
  align-content: space-between;
}

.timer-week-day-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.timer-slots-list {
  display: grid;
  gap: 12px;
}

.timer-slot-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.timer-slot-row .form-field select,
.timer-slot-row .form-field input,
.timer-slot-row .form-field button {
  min-height: 46px;
}

.timer-slot-delete,
.mobile-inline-edit-timer {
  min-height: 46px;
}

.mobile-miner-actions-row {
  display: none;
}

.recent-action-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(255, 255, 255, 0.55);
}

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

.recent-action-status {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent-action-meta,
.recent-action-message {
  font-size: 0.9rem;
  color: var(--muted);
}

.recent-action-message {
  word-break: break-word;
}

.meta-card {
  background: rgba(24, 32, 25, 0.04);
  border: 1px solid rgba(24, 32, 25, 0.08);
}

.meta-card span {
  color: var(--muted);
}

.meta-card strong {
  font-size: 1rem;
  color: var(--ink);
}

.details,
.log-pane {
  margin: 0;
  min-height: 220px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(24, 32, 25, 0.08);
  background: rgba(24, 32, 25, 0.04);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  font: 13px/1.5 Consolas, "Courier New", monospace;
}

.log-pane {
  display: none;
  min-height: 320px;
  overflow: auto;
}

.log-pane.active {
  display: block;
}

.feed-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-pill.status-ok {
  background: rgba(62, 124, 86, 0.12);
  color: var(--ok);
}

.status-pill.status-sleep {
  background: rgba(85, 112, 159, 0.12);
  color: var(--sleep);
}

.status-pill.status-lost {
  background: rgba(169, 59, 50, 0.12);
  color: var(--bad);
}

.status-pill.status-stabilize,
.status-pill.status-recovering,
.status-pill.status-low_hash,
.status-pill.status-stuck,
.status-pill.status-waiting,
.status-pill.status-pending,
.status-pill.status-monitoring {
  background: rgba(175, 122, 24, 0.12);
  color: var(--warn);
}

.login-shell {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 460px);
  padding: 32px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.error {
  color: var(--bad);
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .hero-card,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .login-shell {
    padding: 14px;
  }

  .topbar,
  .panel-head,
  .panel-tools,
  .top-actions,
  .tabs,
  .feed-tools,
  .feed-caption {
    flex-direction: column;
    align-items: stretch;
  }

  .top-actions > * {
    width: 100%;
  }

  .panel-tools > * {
    width: 100%;
  }

  .feed-scope {
    width: 100%;
  }

  .agent-health-filter {
    width: 100%;
    justify-content: stretch;
  }

  .agent-health-filter-btn {
    flex: 1 1 0;
  }

  .agent-switcher {
    flex-direction: column;
  }

  .agent-switcher-btn {
    width: 100%;
  }

  .scope-btn {
    flex: 1 1 0;
  }

  .hero-stats,
  .meta-grid,
  .miner-meta {
    grid-template-columns: 1fr 1fr;
  }

  .selected-miner-layout {
    grid-template-columns: 1fr;
  }

  .actions-head {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-dashboard-head {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-dashboard-stats {
    justify-content: flex-start;
  }

  .timer-row {
    grid-template-columns: 1fr;
  }

  .timer-editor-grid,
  .timer-editor-grid-daily,
  .timer-slot-row {
    grid-template-columns: 1fr;
  }

  .timer-week-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-actions,
  .modal-head,
  .timer-editor-section-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .hero-card,
  .topbar,
  .panel,
  .login-card {
    border-radius: 18px;
  }

  .timer-week-preview {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .meta-grid,
  .miner-meta {
    grid-template-columns: 1fr;
  }

  .panel-command {
    display: none;
  }

  .enrollment-head,
  .enrollment-code-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  #agentDetails {
    display: none;
  }

  .feed-scope,
  .feed-tools .tabs {
    width: 100%;
  }

  .feed-scope .feed-scope-btn,
  .feed-tools .tabs .feed-tab-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .details,
  .log-pane {
    min-height: 200px;
    max-height: 56vh;
  }

  .table-wrap {
    border: none;
    overflow: visible;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    border: 1px solid rgba(24, 32, 25, 0.1);
    border-radius: 18px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(29, 37, 25, 0.08);
  }

  tbody tr.active {
    outline-offset: 0;
  }

  tbody tr.status-ok {
    background: var(--ok-bg);
  }

  tbody tr.status-sleep {
    background: var(--sleep-bg);
  }

  tbody tr.status-lost {
    background: var(--bad-bg);
  }

  tbody tr.status-stabilize,
  tbody tr.status-recovering,
  tbody tr.status-low_hash,
  tbody tr.status-stuck,
  tbody tr.status-waiting,
  tbody tr.status-pending,
  tbody tr.status-monitoring {
    background: var(--warn-bg);
  }

  tbody tr.status-processing {
    background: var(--processing-bg);
  }

  .selected-miner-actions {
    display: none;
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(24, 32, 25, 0.12);
    white-space: normal;
  }

  tbody td:last-child {
    border-bottom: none;
  }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    flex: 0 0 108px;
  }

  .cell-message {
    max-width: none;
  }

  .agent-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
    justify-items: stretch;
    align-items: stretch;
  }

  .agent-action-btn {
    width: 100%;
  }

  .mobile-miner-actions-row {
    display: block;
    margin-top: -6px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .mobile-miner-actions-row td {
    display: block;
    padding: 0;
    border-bottom: none;
  }

  .mobile-miner-actions-row td::before {
    display: none;
    content: none;
  }

  .mobile-inline-actions-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(24, 32, 25, 0.1);
    background:
      linear-gradient(180deg, rgba(31, 93, 68, 0.06), transparent 34%),
      rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(29, 37, 25, 0.08);
  }

  .mobile-inline-actions-head {
    display: grid;
    gap: 8px;
  }

  .mobile-target-toggle {
    width: 100%;
    justify-content: stretch;
  }

  .mobile-target-btn {
    flex: 1 1 0;
  }

  .mobile-target-toggle .mobile-target-btn.action-active {
    background: #1f5d44;
    color: #f7fbf6;
    border-color: #143d2e;
    box-shadow: 0 10px 22px rgba(20, 61, 46, 0.22);
  }

  .mobile-inline-actions-buttons,
  .mobile-inline-timer {
    display: grid;
    gap: 10px;
  }

  .mobile-inline-timer select,
  .mobile-inline-timer button,
  .mobile-inline-actions-buttons button {
    width: 100%;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
  }

  .mobile-inline-actions-card button:active {
    transform: none;
  }

  .mobile-inline-actions-card button:not(:disabled):active {
    background: var(--accent-strong);
    color: #f7fbf6;
    border-color: #143d2e;
  }

  .mobile-inline-actions-card button:disabled,
  .mobile-inline-actions-card button.secondary:disabled {
    background: rgba(24, 32, 25, 0.05) !important;
    color: rgba(24, 32, 25, 0.48) !important;
    border-color: var(--line-strong) !important;
    opacity: 1;
    box-shadow: none;
    transform: none;
  }

  .mobile-inline-actions-card button:focus,
  .mobile-inline-actions-card button:focus-visible,
  .mobile-inline-actions-card select:focus,
  .mobile-inline-actions-card select:focus-visible {
    outline: none;
    box-shadow: none;
  }
}
