﻿:root {
  --bg: #f5f7fa;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d8dde6;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #163d6b;
  --accent-strong: #0f3158;
  --accent-soft: #eaf1fb;
  --accent-blue: #3b82f6;
  --sand: #e79b22;
  --ok: #16a34a;
  --warn: #e79b22;
  --bad: #dc2626;
  --processing: #3b82f6;
  --sleep: #64748b;
  --ok-bg: #eefbf3;
  --warn-bg: #fff6e8;
  --bad-bg: #fff1f2;
  --sleep-bg: #f1f5f9;
  --pending-bg: #f8fafc;
  --processing-bg: #eef4ff;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  overflow-x: hidden;
}

body[data-page="dashboard"].auth-pending .page-shell {
  visibility: hidden;
}

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

.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: 18px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px 22px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-image {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 800;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand-copy-miner {
  color: var(--accent);
}

.brand-copy-watchdog {
  color: var(--sand);
}

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

.top-nav {
  justify-content: center;
  flex-wrap: nowrap;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  gap: 4px;
}

.top-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.top-nav-link:hover,
.top-nav-link-active {
  color: var(--accent-blue);
  background: #eef4ff;
  border-color: rgba(59, 130, 246, 0.14);
  box-shadow: 0 10px 18px rgba(59, 130, 246, 0.08);
}

.topbar-side {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.account-chip {
  display: grid;
  gap: 2px;
  min-width: 240px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
}

.topbar .top-actions {
  display: none;
}

.account-label {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-chip strong {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.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: 14px;
  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: 14px;
  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: 14px;
  background: rgba(24, 32, 25, 0.06);
  border: 1px solid rgba(24, 32, 25, 0.1);
}

.dashboard-shell {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
  max-width: 100%;
}

.hero-card {
  background: #ffffff;
  color: var(--ink);
  padding: 20px 22px 18px;
  display: grid;
  gap: 14px;
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 560px) auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

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

.hero-copy h1 {
  font-size: clamp(1.92rem, 3vw, 2.55rem);
  line-height: 1.04;
}

.hero-tagline {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
  white-space: nowrap;
}

.hero-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-status-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.fleet-status-card,
.status-stat-tile {
  min-height: 92px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.fleet-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.fleet-status-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1.05rem;
}

.fleet-status-icon-mark {
  line-height: 1;
}

.fleet-status-icon-warning {
  background: #fff4e5;
  color: var(--sand);
}

.fleet-status-icon-warning .fleet-status-icon-mark {
  position: relative;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 24px solid var(--sand);
  color: transparent;
}

.fleet-status-icon-warning .fleet-status-icon-mark::after {
  content: '!';
  position: absolute;
  left: -3px;
  top: 6px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
}

.fleet-status-icon-ok {
  background: #eef4ff;
  color: var(--accent-blue);
}

.fleet-status-copy {
  display: grid;
  gap: 6px;
}

.fleet-status-copy strong {
  font-size: 1.28rem;
  line-height: 1.1;
}

.fleet-status-copy .muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.status-stat-tile,
  .meta-card {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 16px;
  align-content: center;
}

.status-stat-tile strong,
  .meta-card strong {
  font-size: 1.78rem;
  line-height: 1;
  color: var(--accent-blue);
}

.stat-label,
  .meta-card span {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-stat-healthy strong {
  color: var(--accent-blue);
}

.status-stat-attention strong {
  color: var(--sand);
}

.panel-placeholder {
  display: grid;
  gap: 10px;
}

.billing-settings-card {
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
}

.billing-summary-card {
  display: grid;
  gap: 16px;
  max-width: none;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: var(--shadow-soft);
}

.billing-summary-card.billing-credit-card,
.billing-summary-card.billing-purchase-card,
.billing-summary-card.billing-account-card {
  align-content: start;
}

.admin-credit-card .billing-summary-meta {
  margin-top: 2px;
}

.admin-credit-tenant-row {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.admin-credit-tenant-row span {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-credit-tenant-row select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-credit-form {
  max-width: 720px;
}

.billing-finance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.billing-finance-grid .billing-summary-card {
  min-width: 0;
}

.billing-finance-grid .billing-purchase-card {
  grid-column: auto;
}

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

.billing-summary-meta .billing-metric {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(85, 108, 166, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.billing-summary-meta .billing-metric span {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-summary-meta .billing-metric strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
  word-break: break-word;
}

.billing-summary-meta .billing-metric.billing-metric-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.billing-settings-copy {
  display: grid;
  gap: 6px;
}

.billing-settings-copy h3 {
  font-size: 1.1rem;
}

.billing-credit-inline-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(85, 108, 166, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.billing-credit-inline-copy {
  display: grid;
  gap: 6px;
}

.billing-credit-inline-copy .eyebrow,
.billing-credit-inline-copy h4,
.billing-credit-inline-copy p {
  margin: 0;
}

.billing-credit-inline-copy h4 {
  line-height: 1.25;
}

.billing-credit-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.billing-credit-action-field {
  display: grid;
  gap: 6px;
}

.billing-credit-inline-form label {
  display: grid;
  gap: 8px;
}

.billing-credit-inline-form input,
.billing-credit-inline-form select {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  font: inherit;
  min-height: 48px;
  box-sizing: border-box;
}

.billing-credit-inline-form input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.billing-credit-inline-form input[type="number"]::-webkit-outer-spin-button,
.billing-credit-inline-form input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.billing-credit-inline-form label span {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.billing-credit-inline-form .billing-settings-actions {
  align-self: start;
  margin-top: 32px;
}

.billing-credit-action-field {
  display: grid;
  justify-items: start;
  align-content: start;
}

.billing-credit-inline-form button {
  min-height: 46px;
  width: auto;
  min-width: 190px;
  padding-inline: 24px;
}

.billing-credit-action-field .muted {
  margin: 0;
  max-width: 260px;
  line-height: 1.35;
}

#billingCreditQuickStatus.warning {
  color: #b45309;
  font-weight: 600;
}

.billing-credit-history {
  display: grid;
  gap: 10px;
}

.billing-credit-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-credit-history-head .eyebrow {
  margin: 0;
}

.billing-credit-history-head strong {
  color: var(--ink);
}

.billing-credit-history-toggle {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.92rem;
}

.billing-credit-entry-latest {
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.06);
}

.billing-credit-history-collapsible {
  display: grid;
  gap: 10px;
}

.billing-credit-request-history {
  display: grid;
  gap: 10px;
}

.billing-credit-entry {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(85, 108, 166, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.billing-credit-request-entry {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(85, 108, 166, 0.14);
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.96);
}

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

.billing-credit-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.billing-credit-request-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.credit-request-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.credit-request-board-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(85, 108, 166, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.credit-request-board-empty {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.55;
}

.billing-credit-request-history .credit-request-board-empty {
  min-height: 44px;
  padding: 4px 8px 0;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  line-height: 1.45;
}

.credit-request-board-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.credit-request-count {
  min-width: 48px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(85, 108, 166, 0.08);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.credit-request-drawer-modal .modal-card {
  max-width: 1080px;
}

.credit-request-drawer-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.credit-request-drawer-side,
.credit-request-drawer-form {
  display: grid;
  gap: 14px;
}

.credit-request-drawer-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(85, 108, 166, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.credit-request-drawer-details div {
  display: grid;
  gap: 4px;
}

.credit-request-drawer-details .credit-request-drawer-notes-row {
  grid-column: 1 / -1;
}

.credit-request-drawer-details span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.credit-request-drawer-details strong {
  word-break: break-word;
  line-height: 1.45;
}

.credit-request-drawer-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.billing-credit-entry-grid div,
.billing-user-license-grid div,
.admin-user-license-grid div,
.admin-user-license-footer div {
  display: grid;
  gap: 4px;
}

.billing-credit-entry-grid span,
.billing-user-license-grid span,
.admin-user-license-grid span,
.admin-user-license-footer span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.billing-credit-entry-grid strong,
.billing-user-license-grid strong,
.admin-user-license-grid strong,
.admin-user-license-footer strong {
  word-break: break-word;
}

.billing-credit-empty {
  padding: 10px 2px 2px;
}

.billing-credit-form,
.billing-purchase-form {
  display: grid;
  gap: 12px;
}

.billing-purchase-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

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

.billing-purchase-form label:nth-child(1),
.billing-purchase-form label:nth-child(4),
.billing-purchase-form label:nth-child(5),
.billing-purchase-form label:nth-child(6),
.billing-purchase-form label:nth-child(7),
.billing-purchase-form .billing-settings-actions,
.billing-purchase-form p {
  grid-column: 1 / -1;
}

.billing-credit-form {
  margin-top: 4px;
}

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

.billing-credit-form input,
.billing-purchase-form input,
.billing-purchase-form select,
.billing-purchase-form textarea,
.credit-request-form input,
.credit-request-form select,
.credit-request-form textarea,
.credit-template-form input,
.credit-template-form select,
.credit-template-form textarea {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  font: inherit;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.billing-purchase-form textarea {
  resize: vertical;
}

.billing-purchase-form input[readonly] {
  background: rgba(245, 248, 255, 0.92);
  color: var(--ink);
}

.billing-credit-request-history {
  margin-top: 2px;
}

.credit-request-layout,
.credit-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: start;
}

.credit-request-side,
.credit-template-side {
  display: grid;
  gap: 14px;
}

.credit-request-copy-card,
.credit-template-preview-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(85, 108, 166, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.credit-template-preview-card .billing-summary-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credit-request-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink);
  line-height: 1.45;
}

.credit-request-steps li::marker {
  color: var(--accent);
  font-weight: 700;
}

.credit-request-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(85, 108, 166, 0.18);
  background: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.credit-request-summary p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.credit-request-summary .emphasis {
  color: #0f4fa8;
  font-weight: 700;
}

.credit-request-exact {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.credit-request-warning {
  margin: 0;
  color: #7c4a00;
  font-size: 0.9rem;
}

.credit-request-compliance {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(239, 246, 255, 0.7);
  color: #1e3a5f;
  font-size: 0.9rem;
  line-height: 1.45;
}

.credit-request-compliance p {
  margin: 0;
}

#billingCreditRequestTxHashInput {
  border-color: rgba(59, 130, 246, 0.32);
}

#billingCreditRequestTxHashInput:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.credit-request-notes,
.credit-template-help {
  display: grid;
  gap: 8px;
  padding: 2px 4px 0;
}

.credit-request-notes code,
.credit-template-help code {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(73, 120, 255, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
}

.credit-request-form,
.credit-template-form {
  display: grid;
  gap: 12px;
  align-content: start;
}

.credit-request-success {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 8px 2px;
}

.credit-request-success h3 {
  margin: 0;
  font-size: 1.35rem;
}

.credit-request-flow {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(85, 108, 166, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

.credit-request-flow ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.credit-request-flow li {
  color: var(--muted);
}

.credit-request-flow .is-done {
  color: #1f7a45;
  font-weight: 700;
}

.credit-request-flow .is-active {
  color: #0f4fa8;
  font-weight: 700;
}

.credit-request-flow .is-failed {
  color: #b42318;
  font-weight: 700;
}

.credit-request-failure {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(180, 35, 24, 0.25);
  background: rgba(254, 242, 242, 0.9);
  color: #b42318;
  font-weight: 600;
}

.credit-request-debug-flow {
  border: 1px dashed rgba(85, 108, 166, 0.28);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(248, 251, 255, 0.68);
}

.credit-request-debug-flow summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.credit-request-debug-flow ol {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--ink);
}

.credit-request-debug-flow li.is-done {
  color: #1f7a45;
  font-weight: 700;
}

.credit-request-debug-flow li.is-active {
  color: #0f4fa8;
  font-weight: 700;
}

.credit-request-debug-flow li.is-failed {
  color: #b42318;
  font-weight: 700;
}

.credit-request-form label,
.credit-template-form label {
  display: grid;
  gap: 8px;
}

.credit-template-advanced {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(85, 108, 166, 0.28);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.68);
}

.credit-template-advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.credit-template-qr-preview,
.credit-request-qr {
  display: grid;
  gap: 10px;
  justify-items: start;
  width: 100%;
}

.credit-template-qr-preview img,
.credit-request-qr img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(85, 108, 166, 0.2);
  background: #fff;
  padding: 8px;
}

.credit-request-qr .muted {
  margin: 0;
}

.credit-request-qr img {
  cursor: zoom-in;
}

.credit-request-qr-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  z-index: 1000;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
}

.credit-request-qr-lightbox img {
  width: min(90vw, 560px);
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #fff;
  padding: 10px;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.32);
}

.credit-request-qr-lightbox .secondary {
  justify-self: end;
}

.credit-request-wallet-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-request-wallet-row input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.credit-request-wallet-row button {
  flex: 0 0 auto;
}

.credit-request-card,
.credit-template-card {
  width: min(100%, 1240px);
}

.settings-toggle-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
  min-height: 46px;
  padding: 2px 4px 0;
}

.admin-payment-row select {
  width: auto;
  min-width: 160px;
}

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

.admin-section {
  display: grid;
  gap: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.admin-grid > * {
  min-width: 0;
}

.admin-summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  container-type: inline-size;
}

/* Admin cards can become narrow inside side panels even on wide screens.
   Use container queries so admin controls collapse by card width, not viewport width. */
@container (max-width: 680px) {
  .admin-summary-actions {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .admin-card-head > span {
    align-self: flex-start;
  }

  .admin-filter-toggle {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    align-items: stretch;
  }

  .admin-filter-toggle .scope-btn {
    width: 100%;
    min-width: 0;
  }

  .admin-user-details-card,
  .admin-user-license-card {
    min-width: 0;
    max-width: 100%;
    padding: 12px;
  }

  .admin-user-license-grid,
  .admin-user-license-footer {
    grid-template-columns: 1fr;
  }

  .admin-user-license-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-action-cell {
    white-space: normal;
  }

  .admin-action-group {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .admin-inline-btn {
    width: 100%;
  }

  .admin-table-wrap {
    overflow: hidden;
  }

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

  .admin-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  .admin-table tbody tr {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }
}

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

.admin-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

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

.admin-form {
  display: grid;
  gap: 12px;
}

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

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

.admin-form input,
.admin-form select,
.admin-form textarea {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 14px;
  font: inherit;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form select {
  min-height: 46px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.package-manager-card {
  width: min(100%, 1080px);
}

.package-manager-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
  align-items: start;
}

.package-manager-sidebar {
  display: grid;
  gap: 12px;
  align-self: start;
}

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

.package-manager-list {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
  padding-right: 2px;
}

.package-list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.package-list-row strong,
.package-list-row span {
  display: block;
}

.package-list-row strong {
  margin-bottom: 4px;
}

.package-list-row span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.package-list-row.active {
  border-color: rgba(59, 130, 246, 0.35);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.package-list-state {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 2px;
}

.package-manager-form {
  display: grid;
  gap: 12px;
  align-self: start;
  padding-top: 2px;
}

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

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

.package-manager-form input,
.package-manager-form select,
.package-manager-form textarea {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 14px;
  font: inherit;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.package-manager-form input:focus,
.package-manager-form select:focus,
.package-manager-form textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: #fff;
}

.package-manager-form .settings-toggle-row input {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  justify-self: start;
}

.package-manager-form .admin-form-actions {
  justify-content: flex-start;
}

.package-manager-form .secondary.danger {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.24);
  background: #fffaf1;
}

.package-manager-form .secondary.danger:hover,
.package-manager-form .secondary.danger:focus-visible {
  background: #fff4e0;
  border-color: rgba(245, 158, 11, 0.34);
}

.admin-table-wrap {
  overflow: auto;
  max-width: 100%;
  min-width: 0;
}

.admin-table {
  width: 100%;
  min-width: 0;
}

.admin-user-row {
  cursor: pointer;
}

.admin-user-row:hover {
  background: rgba(59, 130, 246, 0.03);
}

.admin-user-row.is-expanded {
  background: rgba(59, 130, 246, 0.05);
}

.admin-user-row td:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-toggle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.admin-user-toggle:hover,
.admin-user-toggle:focus-visible {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.2);
}

.admin-user-details-row td {
  padding: 0 0 14px;
  background: transparent;
}

.admin-user-details-card {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.admin-user-details-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-user-license-list {
  display: grid;
  gap: 12px;
}

.admin-user-license-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 12px;
}

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

.license-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.license-pill-active {
  background: #ecfdf3;
  color: #15803d;
}

.license-pill-inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.admin-user-license-grid,
.admin-user-license-footer {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-user-license-grid div,
.admin-user-license-footer div {
  display: grid;
  gap: 4px;
}

.admin-user-license-grid span,
.admin-user-license-footer span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-user-license-grid strong,
.admin-user-license-footer strong {
  color: var(--ink);
  font-size: 0.95rem;
  word-break: break-word;
}

.admin-user-license-footer {
  grid-template-columns: 1.1fr 2fr;
}

.admin-user-license-empty {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.admin-action-cell {
  white-space: nowrap;
}

.admin-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-inline-btn {
  min-height: 36px;
  padding-inline: 12px;
}

.admin-inline-btn.danger {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.24);
  background: #fffaf1;
}

.admin-inline-btn.action-active {
  background: #eef4ff;
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.18);
}

.admin-inline-btn.danger:hover,
.admin-inline-btn.danger:focus-visible {
  background: #fff4e0;
  border-color: rgba(245, 158, 11, 0.34);
}

.license-key-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.license-key-value {
  min-width: 0;
  word-break: break-all;
}

.admin-copy-btn.copied {
  background: #ecfdf3;
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.92fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

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

.stack-column {
  display: grid;
  gap: 18px;
  grid-column: 1 / -1;
  grid-row: auto;
  align-self: stretch;
  position: static;
  top: auto;
}

#agentsSection {
  grid-column: 1 / -1;
}

#dashboardEmptyState,
#liveMinersSection,
#commandsSection,
#inspectorColumn {
  grid-column: 1 / 2;
}

#agentsSection .panel-head {
  align-items: center;
}

.panel {
  padding: 18px;
  min-width: 0;
  max-width: 100%;
}

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

.panel-accent {
  background: var(--panel);
}

.panel-command {
  background: var(--panel);
}

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

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

.panel-tools-dashboard .agent-switcher {
  order: 1;
}

.panel-tools-dashboard #minerSummary {
  order: 2;
  white-space: nowrap;
}

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

.agent-health-filter .scope-btn {
  border-radius: 14px;
  min-width: 0;
  padding: 8px 16px;
}

.agent-health-filter-btn.agent-health-filter-active {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.16);
  color: var(--accent);
}

.agent-switcher-btn {
  min-width: 128px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--accent);
  border-color: var(--line);
  box-shadow: none;
}

.agent-switcher-btn.agent-switcher-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.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;
  min-width: 0;
  max-width: 100%;
}

.agent-dashboard-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  max-width: 100%;
}

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

.agent-miners-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.agent-miners-table th,
.agent-miners-table td {
  padding: 8px 6px;
  white-space: nowrap;
}

.agent-miners-table .cell-value,
.agent-miners-table .cell-value-miner,
.agent-miners-table .miner-row-name {
  white-space: nowrap;
}

.agent-miners-table .cell-message {
  max-width: none;
  white-space: nowrap;
}

.agent-miners-table td.cell-multi-line .cell-value {
  white-space: pre-line;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

@media (min-width: 721px) {
  .agent-miners-table td.cell-multi-line .cell-value {
    white-space: pre;
    word-break: normal;
  }
}

.agent-miners-table td[data-label="Miner"],
.agent-miners-table td[data-label="Miner"] .cell-value-miner,
.agent-miners-table td[data-label="Miner"] .miner-row-name,
.agent-miners-table td.cell-message,
.agent-miners-table td.cell-message .cell-value {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.agent-miners-table td[data-label="Miner"] {
  max-width: none;
}

.agent-miners-table td.cell-message {
  max-width: none;
}

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

.mini-stat {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.mini-stat-offline {
  color: var(--sand);
  border-color: rgba(231, 155, 34, 0.2);
  background: #fff7ed;
}

.agent-offline-banner {
  margin-top: 8px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--sand);
  background: #fff7ed;
  border: 1px solid rgba(231, 155, 34, 0.22);
  font-size: 0.9rem;
}

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

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

.panel-head h2 {
  letter-spacing: -0.02em;
}

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

.panel-tools-dashboard {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

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);
  font-weight: 700;
}

.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-blue);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

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

button.secondary,
.tab,
.scope-btn {
  background: #f8fafc;
  color: var(--ink);
  box-shadow: none;
}

.tab.active,
.scope-btn.active {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.18);
  color: var(--accent);
}

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

.top-nav-link,
.scope-btn,
.agent-switcher-btn,
.agent-health-filter-btn,
.feed-scope .feed-scope-btn,
.feed-tools .tabs .feed-tab-btn {
  font-size: 1rem;
  font-weight: 500;
}

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

.action-target-toggle .action-scope-btn.action-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.feed-scope .feed-scope-btn,
.feed-tools .tabs .feed-tab-btn {
  min-width: 124px;
  background: #f8fafc;
  color: var(--accent);
  border-color: var(--line);
  box-shadow: none;
}

.feed-scope .feed-scope-btn.feed-active,
.feed-tools .tabs .feed-tab-btn.feed-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.feed-tools .feed-scope .feed-scope-btn.feed-active,
.feed-tools .tabs .feed-tab-btn.feed-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.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 var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  font-size: 0.93rem;
}

thead th {
  position: sticky;
  top: 0;
  background: #fbfcfe;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
  background: #ffffff;
}

tbody tr:hover {
  background: #f8fbff;
}

tbody tr.active {
  background: rgba(59, 130, 246, 0.06);
}

tbody tr.active td {
  background: #eef4ff;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

tbody tr.active td:first-child {
  border-left: 1px solid transparent;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

tbody tr.active td:last-child {
  border-right: 1px solid transparent;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

tbody tr.active + .desktop-miner-expanded-row .desktop-miner-expanded-card {
  margin-top: 4px;
  border-color: rgba(59, 130, 246, 0.28);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.08);
}

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-stuck td:first-child,
.status-waiting td:first-child,
.status-pending td:first-child,
.status-monitoring td:first-child {
  color: var(--warn);
}

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

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

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

.cell-value-miner {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.miner-status-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 800;
  margin-top: 1px;
  color: #ffffff;
}

.miner-status-ok {
  background: #16a34a;
}

.miner-status-processing,
.miner-status-reboot,
.miner-status-rebooting {
  background: #2563eb;
}

.miner-status-lost {
  background: #dc2626;
}

.miner-status-low_hash {
  background: #dc2626;
}

.miner-status-stabilize,
.miner-status-recovering,
.miner-status-stuck,
.miner-status-waiting,
.miner-status-pending,
.miner-status-monitoring {
  background: #ea580c;
}

.miner-status-sleep {
  background: #64748b;
}

.miner-row-chevron {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-top: 4px;
}

.miner-row-chevron::before {
  content: '';
  position: absolute;
  inset: 2px 3px 2px 1px;
  border-right: 2px solid rgba(22, 61, 107, 0.72);
  border-bottom: 2px solid rgba(22, 61, 107, 0.72);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 140ms ease, border-color 140ms ease;
}

.agent-miners-table tbody tr.active .miner-row-chevron::before {
  transform: rotate(45deg);
  border-color: var(--accent-blue);
}

.miner-row-name {
  flex: 1 1 auto;
  display: block;
  min-width: 0;
}

.agent-miners-table td[data-label="Miner"] .cell-value-miner,
.agent-miners-table td.cell-message .cell-value,
.agent-miners-table td[data-label="Last message"] .cell-value {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

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

.agent-action-btn {
  min-height: 36px;
  padding: 7px 12px;
  width: 96px;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.9rem;
}

.agent-action-btn.danger {
  color: var(--sand);
  border-color: rgba(231, 155, 34, 0.24);
  background: #fffaf2;
}

.cell-value-agent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.desktop-agent-expanded-row {
  display: table-row;
}

.desktop-agent-expanded-row td {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.desktop-agent-expanded-row td::before {
  display: none;
  content: none;
}

.desktop-agent-expanded-card {
  margin: 6px 0 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
}

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

.desktop-agent-expanded-head h4 {
  margin: 4px 0 4px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.desktop-agent-expanded-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.desktop-agent-expanded-info {
  min-width: 0;
}

.desktop-agent-inline-details {
  min-height: 180px;
}

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

.meta-card-event-time {
  border-color: rgba(59, 130, 246, 0.22);
  background: linear-gradient(180deg, rgba(238, 244, 255, 0.9), rgba(255, 255, 255, 0.98));
}

.meta-card-event-time strong {
  color: var(--accent-blue);
}

.meta-card-message-stamp {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  word-break: break-word;
}

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

.miner-message-stamp {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

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

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

.selected-miner-info {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.miner-pools {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.miner-boards {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  flex: 0 0 auto;
  align-content: start;
}

.miner-pools-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.pools-table-wrap {
  border-radius: 16px;
  background: #ffffff;
}

.pools-table {
  width: max-content;
  min-width: 100%;
}

.pools-table th,
.pools-table td {
  padding: 8px 8px;
  white-space: nowrap;
}

.pools-table th,
.pools-table td {
  text-align: center;
  vertical-align: middle;
}

.pools-table td:nth-child(2),
.pools-table td:nth-child(3) {
  text-align: left;
}

.miner-boards-card,
.miner-message-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.miner-message-card {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}

.miner-boards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.boards-table-wrap {
  border-radius: 16px;
  background: #ffffff;
}

.boards-table {
  width: max-content;
  min-width: 100%;
}

.boards-table th,
.boards-table td {
  padding: 8px 8px;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.board-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.board-state-normal {
  color: #15803d;
  font-weight: 600;
}

.board-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  font-size: 11px;
  line-height: 1;
}

.boards-empty {
  font-size: 0.92rem;
}

.pool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pool-badge.alive {
  background: rgba(22, 163, 74, 0.12);
  color: var(--ok);
  border-color: rgba(22, 163, 74, 0.18);
}

.pool-badge.dead {
  background: rgba(220, 38, 38, 0.1);
  color: var(--bad);
  border-color: rgba(220, 38, 38, 0.16);
}

.pool-badge.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
}

.pool-badge.inactive {
  background: #f1f5f9;
  color: var(--muted);
  border-color: var(--line);
}

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

.actions-card {
  display: grid;
  align-content: start;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
}

#inspectorColumn .panel {
  border-radius: 18px;
}

#inspectorColumn .panel-head {
  margin-bottom: 14px;
}

#inspectorColumn .panel h2 {
  font-size: 1.2rem;
}

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

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

.actions-layout {
  display: grid;
  gap: 12px;
}

.action-group {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.action-group-title {
  margin: 0;
}

.action-group-body {
  display: grid;
  gap: 10px;
}

.action-warning {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(231, 155, 34, 0.22);
  background: #fff7ed;
  color: #b45309;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  width: 100%;
  box-sizing: border-box;
}

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

.inline-feed-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inline-feed-links button {
  width: 100%;
}

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

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

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

.enrollment-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fbfcfe;
}

.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 var(--line);
  background: #ffffff;
}

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

.enrollment-code-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

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

.icon-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.copy-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-copy-btn:hover,
.icon-copy-btn:focus-visible {
  background: #eef4ff;
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--accent-blue);
}

.icon-copy-btn.copied {
  background: #ecfdf3;
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}

.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;
  pointer-events: auto;
  overscroll-behavior: contain;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.2);
}

.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);
}

body.mobile-modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
  width: 100%;
}

html.mobile-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.mobile-modal-open .page-shell {
  pointer-events: none !important;
  user-select: none;
}

body.mobile-modal-open .modal-shell {
  pointer-events: auto;
}

body.mobile-modal-open .modal-backdrop,
body.mobile-modal-open .modal-card {
  touch-action: auto;
}

body.mobile-modal-open .modal-card {
  overscroll-behavior: contain;
}

.mobile-miner-details-card {
  display: grid;
  gap: 16px;
}

.mobile-feed-card {
  display: grid;
  gap: 14px;
}

.mobile-miner-details-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-miner-details-card .miner-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mobile-miner-details-card .meta-card {
  min-height: auto;
}

.mobile-miner-details-card .meta-card span,
.mobile-miner-details-card .meta-card strong,
.mobile-miner-details-card .meta-card-message-stamp {
  text-align: left;
}

.mobile-detail-list {
  display: grid;
  gap: 12px;
}

.mobile-detail-card {
  display: grid;
  gap: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.mobile-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #e8edf4;
}

.mobile-detail-row:last-child {
  border-bottom: none;
}

.mobile-detail-label {
  flex: 0 0 108px;
  color: var(--muted);
  font-weight: 600;
}

.mobile-detail-value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  overflow-wrap: break-word;
  word-break: normal;
}

.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;
}

.modal-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.columns-editor-card {
  max-width: 960px;
  display: grid;
  gap: 14px;
}

.columns-editor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 6px;
}

.column-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.column-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.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 var(--line);
  background: #f8fafc;
}

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

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

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

.timer-slot-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.pools-editor-hint-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: #eff6ff;
  color: #33527e;
  line-height: 1.45;
}

.pools-editor-hint-box.pools-editor-hint-sleep {
  border-color: rgba(231, 155, 34, 0.26);
  background: #fff7ed;
  color: #9a5d00;
  box-shadow: inset 0 0 0 1px rgba(231, 155, 34, 0.08);
}

.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 var(--line);
  background: #ffffff;
}

.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(59, 130, 246, 0.12);
  color: var(--accent);
}

.timer-week-chip-sleep {
  background: #f1f5f9;
  color: #64748b;
}

.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 var(--line);
  background: #ffffff;
}

.timer-slot-row-saved {
  border-color: rgba(22, 163, 74, 0.35);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}

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

.timer-slot-row .form-field input {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.timer-slot-row .form-field input:focus,
.timer-slot-row .form-field input:focus-visible {
  outline: none;
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

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

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

.desktop-miner-expanded-row {
  display: table-row;
}

.desktop-miner-expanded-row td {
  padding: 0;
  border-bottom: none;
  background: transparent;
  width: 1px;
  min-width: 0;
}

.desktop-miner-expanded-row td::before {
  display: none;
  content: none;
}

.desktop-miner-expanded-card {
  margin: 6px 0 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfe;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.desktop-miner-expanded-host {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.desktop-miner-expanded-layout,
.desktop-miner-expanded-info,
.desktop-miner-expanded-actions,
.selected-miner-layout,
.selected-miner-info,
.selected-miner-actions {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.desktop-miner-expanded-card button,
.desktop-miner-expanded-card select {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.desktop-miner-expanded-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 14px;
}

.desktop-miner-expanded-head h4 {
  margin: 4px 0 4px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.desktop-miner-expanded-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(208px, 0.46fr);
  gap: 16px;
  align-items: stretch;
}

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

.desktop-miner-expanded-info {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.desktop-miner-expanded-actions {
  display: flex;
}

.desktop-inline-details {
  min-height: 180px;
  flex: 1 1 auto;
}

.selected-miner-info .miner-message-card .details,
.desktop-miner-expanded-info .miner-message-card .details {
  min-height: 0;
  height: auto;
  flex: 1 1 auto;
}

.desktop-inline-message .desktop-inline-details,
#selectedMinerMessage.details {
  min-height: 110px;
}

.recent-action-item {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.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.86rem;
  color: var(--muted);
}

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

.meta-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 12px 13px;
}

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

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

.details,
.log-pane {
  margin: 0;
  min-height: 220px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fafc;
  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: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.status-pill.status-ok {
  background: rgba(22, 163, 74, 0.12);
  color: var(--ok);
}

.status-pill.status-sleep {
  background: #f1f5f9;
  color: var(--sleep);
}

.status-pill.status-lost {
  background: rgba(220, 38, 38, 0.1);
  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(231, 155, 34, 0.12);
  color: var(--warn);
}

.status-pill.status-processing {
  background: rgba(59, 130, 246, 0.12);
  color: var(--processing);
}

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

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

.auth-card {
  display: grid;
  gap: 14px;
}

.auth-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.auth-switch-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-switch-button.active,
.auth-switch-button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
}

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

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

.password-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.password-field input {
  flex: 1 1 auto;
  min-width: 0;
}

.password-toggle {
  min-width: 76px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #f8fafc;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.form-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.error {
  color: var(--bad);
  margin: 0;
}

.success {
  color: var(--ok);
  margin: 0;
  white-space: normal;
}

.confirm-card {
  align-items: start;
}

.confirm-back-link {
  display: inline-flex;
  width: fit-content;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.confirm-back-link:hover {
  text-decoration: underline;
}

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

.pools-editor-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.pools-mode-toggle {
  flex-wrap: wrap;
}

.action-target-toggle .scope-btn.action-active,
.pools-mode-toggle .scope-btn.action-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: none;
}

.pools-editor-entries {
  display: grid;
  gap: 12px;
}

.pools-entry-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.pools-entry-index {
  min-width: 68px;
  padding-bottom: 12px;
  color: var(--accent);
  font-weight: 700;
}

.pools-entry-row input {
  min-height: 46px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 10px 12px;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  appearance: none;
}

.pools-entry-row input::placeholder {
  color: rgba(93, 114, 146, 0.72);
}

.pools-entry-row input:hover {
  border-color: rgba(59, 130, 246, 0.22);
  background: #ffffff;
}

.pools-entry-row input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.38);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #ffffff;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .topbar-side {
    flex-wrap: wrap;
    justify-content: space-between;
  }

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

  .hero-intro {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-toolbar {
    justify-content: flex-start;
  }

  .hero-status-strip {
    grid-template-columns: 1fr;
  }

  .stack-column,
  #agentsSection,
  #dashboardEmptyState,
  #liveMinersSection,
  #commandsSection {
    grid-column: 1 / -1;
    grid-row: auto;
    position: static;
    top: auto;
  }
}

@media (max-width: 980px) {
  .pools-entry-row {
    grid-template-columns: 1fr;
  }

  .pools-entry-index {
    padding-bottom: 0;
  }

  .page-shell,
  .login-shell {
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .topbar-side,
  .brand-mark,
  .account-chip,
  .panel-head > div,
  .panel-tools,
  .panel-tools-dashboard {
    min-width: 0;
  }

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

  .top-actions > *,
  .panel-tools > *,
  .hero-toolbar > * {
    width: 100%;
  }

  .admin-summary-actions {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .admin-card-head > span {
    align-self: flex-start;
  }

  .admin-filter-toggle {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .admin-filter-toggle .scope-btn {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
  }

  .admin-user-details-card {
    padding: 12px;
    min-width: 0;
    max-width: 100%;
  }

  .admin-user-license-grid,
  .admin-user-license-footer {
    grid-template-columns: 1fr;
  }

  .admin-user-license-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-user-license-card {
    min-width: 0;
    max-width: 100%;
  }

  .admin-action-cell {
    white-space: normal;
  }

  .admin-action-group {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .admin-inline-btn {
    width: 100%;
  }

  .top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .top-nav-link {
    white-space: nowrap;
  }

  .account-chip {
    min-width: 0;
    width: 100%;
  }

  .brand-copy strong,
  .brand-copy span,
  .account-chip strong,
  .cell-message,
  .details {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

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

  #agentsSection .panel-head {
    align-items: stretch;
  }

  #agentsSection .panel-head > div {
    width: 100%;
    text-align: left;
  }

  .hero-tagline {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .selected-miner-layout,
  .timer-row,
  .inline-feed-links,
  .timer-editor-grid,
  .timer-editor-grid-daily,
  .timer-slot-row {
    grid-template-columns: 1fr;
  }

  .selected-miner-info {
    display: block;
  }

  .selected-miner-info .details {
    min-height: 0;
    height: auto;
    overflow: visible;
    max-width: 100%;
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

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

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

  .modal-shell {
    padding:
      max(12px, env(safe-area-inset-top))
      12px
      max(12px, env(safe-area-inset-bottom))
      12px;
    place-items: end center;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
    padding: 16px;
    border-radius: 20px;
  }

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

  .modal-actions button,
  .timer-editor-section-head button {
    width: 100%;
  }

  .modal-head {
    position: static;
    padding: 0 0 12px;
    background: transparent;
  }

  .modal-actions {
    position: static;
    padding-top: 12px;
    padding-bottom: 0;
    background: transparent;
  }

  .timer-editor-section {
    padding: 14px;
    border-radius: 16px;
  }
}

@media (max-width: 1320px) and (min-width: 981px) {
  .selected-miner-layout,
  .desktop-miner-expanded-layout {
    grid-template-columns: 1fr;
  }

  .actions-card {
    gap: 10px;
    padding: 10px;
  }

  .action-target-toggle {
    gap: 4px;
    padding: 2px;
  }

  .action-target-toggle .scope-btn {
    min-height: 36px;
    min-width: 0;
    padding: 0 6px;
    font-size: 0.92rem;
  }

  .actions-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .action-group {
    gap: 8px;
    padding: 8px;
  }

  .actions-card button,
  .actions-card .secondary,
  .actions-card select {
    min-height: 40px;
    padding-left: 7px;
    padding-right: 7px;
    font-size: 0.96rem;
  }

  .actions-row,
  .action-group-body {
    gap: 7px;
  }

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

@media (max-width: 1160px) and (min-width: 981px) {
  .actions-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-group-view {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero-intro {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .page-shell,
  .login-shell {
    padding: 14px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .top-nav-link {
    width: 100%;
    min-height: 40px;
    white-space: normal;
  }

  .hero-card,
  .topbar,
  .panel,
  .login-card {
    border-radius: 18px;
  }

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

  .billing-summary-meta {
    grid-template-columns: 1fr 1fr;
  }

  .hero-card {
    padding: 14px;
    gap: 12px;
  }

  .panel {
    padding: 14px;
  }

  .topbar {
    gap: 12px;
    padding: 12px;
  }

  .brand-mark {
    gap: 12px;
    align-items: center;
  }

  .brand-logo-image {
    width: 56px;
    height: 56px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy span {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top-nav-link {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: 1rem;
    text-align: center;
    background: #f8fafc;
    border-color: var(--line-strong);
    color: var(--ink);
    box-shadow: none;
  }

  .account-chip {
    padding: 10px 12px;
  }

  .fleet-status-card {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    align-items: center;
  }

  .fleet-status-copy strong {
    font-size: 1.24rem;
  }

  .hero-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    align-self: stretch;
    justify-self: stretch;
  }

  .hero-toolbar button,
  .hero-toolbar button.secondary {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    box-shadow: none;
  }

  .hero-toolbar button {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-soft);
  }

  .hero-toolbar button.secondary {
    background: #f8fafc;
    color: var(--ink);
    border-color: var(--line-strong);
  }

  .hero-toolbar .toggle {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #f8fafc;
    font-size: 1rem;
    justify-content: flex-start;
  }

  .panel-command {
    display: none;
  }

  #agentDetails {
    display: none;
  }

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

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

  .feed-tools .tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .feed-tools .tabs .feed-tab-btn {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    text-align: center;
  }

  .panel-tools-dashboard #minerSummary {
    text-align: left;
  }

  .agent-dashboard-stats {
    gap: 6px;
  }

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

  .selected-miner-info .details,
  #selectedMinerMessage.details {
    min-height: 320px;
    max-height: none;
  }

}

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

  .hero-tagline {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .topbar,
  .panel,
  .hero-card,
  .login-card {
    border-radius: 18px;
  }

  .topbar {
    padding: 12px;
  }

  .brand-logo-image {
    width: 52px;
    height: 52px;
  }

  .brand-copy strong {
    font-size: 0.96rem;
  }

  .brand-copy span {
    font-size: 0.66rem;
    letter-spacing: 0.09em;
  }

  .top-nav {
    grid-template-columns: 1fr;
  }

  .billing-summary-meta {
    grid-template-columns: 1fr;
  }

  .billing-credit-inline-form {
    grid-template-columns: 1fr;
  }

  .billing-credit-inline-form .billing-settings-actions {
    width: 100%;
  }

  .billing-credit-inline-form .billing-settings-actions button {
    width: 100%;
  }

  .billing-credit-history-head {
    align-items: stretch;
  }

  .billing-credit-history-toggle {
    width: 100%;
  }

  .credit-request-wallet-row {
    flex-direction: column;
    align-items: stretch;
  }

  .credit-request-wallet-row button {
    width: 100%;
  }

  .billing-credit-entry-grid {
    grid-template-columns: 1fr;
  }

  .billing-purchase-form {
    grid-template-columns: 1fr;
  }

  .billing-purchase-form label:nth-child(1),
  .billing-purchase-form label:nth-child(4),
  .billing-purchase-form label:nth-child(5),
  .billing-purchase-form label:nth-child(6),
  .billing-purchase-form label:nth-child(7),
  .billing-purchase-form .billing-settings-actions,
  .billing-purchase-form p {
    grid-column: auto;
  }

  .top-nav-link {
    min-height: 38px;
    padding: 0 8px;
    font-size: 1rem;
    background: #f8fafc;
    border-color: var(--line-strong);
    color: var(--ink);
    box-shadow: none;
  }

  .hero-toolbar button,
  .hero-toolbar button.secondary,
  .hero-toolbar .toggle {
    width: 100%;
    min-height: 38px;
    padding: 0 8px;
    font-size: 1rem;
  }

  .panel-tools-dashboard .agent-switcher {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .panel-tools-dashboard .agent-switcher-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    white-space: normal;
    text-align: center;
  }

  .desktop-inline-details,
  #selectedMinerMessage.details {
    max-width: 100%;
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

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

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

  .admin-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-summary-actions {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

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

  .credit-request-board-grid {
    grid-template-columns: 1fr;
  }

  .package-manager-layout {
    grid-template-columns: 1fr;
  }

  .credit-request-layout,
  .credit-template-layout {
    grid-template-columns: 1fr;
  }

  .credit-request-drawer-layout {
    grid-template-columns: 1fr;
  }

  .credit-request-copy-card .billing-summary-meta,
  .credit-template-preview-card .billing-summary-meta {
    grid-template-columns: 1fr;
  }

  .package-manager-list {
    max-height: none;
  }

  .package-manager-form .admin-form-actions {
    flex-direction: column;
  }

  .package-manager-form .admin-form-actions button {
    width: 100%;
  }

  .package-manager-layout {
    grid-template-columns: 1fr;
  }

  .package-manager-list {
    max-height: none;
  }

  .admin-card {
    padding: 14px;
  }

  .admin-card-head,
  .admin-form-actions {
    gap: 10px;
  }

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

  .admin-card-head > span {
    align-self: flex-start;
  }

  .admin-filter-toggle {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .admin-filter-toggle .scope-btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .admin-user-details-card {
    padding: 12px;
  }

  .admin-user-license-grid,
  .admin-user-license-footer {
    grid-template-columns: 1fr;
  }

  .admin-user-license-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .credit-request-drawer-details {
    grid-template-columns: 1fr;
  }

  .credit-request-drawer-actions {
    flex-direction: column;
  }

  .credit-request-drawer-actions button {
    width: 100%;
  }

  .admin-payment-row select {
    width: 100%;
    min-width: 0;
  }

  .admin-filter-toggle {
    width: 100%;
  }

  .admin-filter-toggle .scope-btn {
    min-width: 0;
    flex: 1 1 0;
  }

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

  .actions-card {
    height: auto;
    min-height: 0;
  }

  .action-warning {
    padding: 8px 10px;
    font-size: 0.84rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    overflow: visible;
    display: block;
  }

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

  .table-wrap {
    border: none;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

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

  table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .agent-miners-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .license-key-cell {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-action-cell {
    white-space: normal;
  }

  .admin-action-group {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 8px;
  }

  .admin-inline-btn {
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }

  tbody tr {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  tbody tr.active {
    background: rgba(59, 130, 246, 0.06);
  }

  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);
  }

  tbody td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    column-gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed #e8edf4;
    white-space: normal;
    min-width: 0;
    align-items: flex-start;
    font-size: 0.98rem;
    line-height: 1.45;
  }

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

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    min-width: 0;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  tbody td .cell-value {
    grid-column: 2;
    min-width: 0;
    width: 100%;
    text-align: right;
    font-size: 0.98rem;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
  }

  tbody td[data-label="Firmware"] .cell-value {
    white-space: pre-line;
    word-break: break-word;
    text-align: right;
  }

  tbody td[data-label="Pool1"] .cell-value,
  tbody td[data-label="Worker1"] .cell-value,
  tbody td[data-label="Pass1"] .cell-value,
  tbody td[data-label="Pool2"] .cell-value,
  tbody td[data-label="Worker2"] .cell-value,
  tbody td[data-label="Pass2"] .cell-value,
  tbody td[data-label="Pool3"] .cell-value,
  tbody td[data-label="Worker3"] .cell-value,
  tbody td[data-label="Pass3"] .cell-value {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    text-align: right;
  }


  tbody td[data-label="Miner"] {
    position: relative;
    padding-right: 0;
    max-width: none;
    width: auto;
  }

  tbody td[data-label="Miner"] .cell-value-miner {
    grid-column: 2;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) 18px;
    width: 100%;
    align-items: flex-start;
    column-gap: 8px;
  }

  tbody td[data-label="Miner"] .miner-status-icon {
    position: static;
    grid-column: 3;
    justify-self: end;
    margin-top: 1px;
  }

  .cell-message {
    max-width: none;
    overflow-wrap: break-word;
    word-break: normal;
  }

  tbody td.cell-message,
  tbody td[data-label="Last message"] {
    max-width: none;
    width: auto;
  }

  tbody td[data-label="Miner"] .cell-value-miner {
    min-width: 0;
    max-width: 100%;
  }

  tbody td[data-label="Miner"] .miner-row-chevron {
    grid-column: 1;
    margin-top: 4px;
  }

  tbody td[data-label="Miner"] .miner-row-name,
  tbody td.cell-message .cell-value,
  tbody td[data-label="Last message"] .cell-value {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  tbody td[data-label="Miner"] .miner-row-name {
    grid-column: 2;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-align: right;
  }

  tbody td.cell-message .cell-value,
  tbody td[data-label="Last message"] .cell-value {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: right;
  }

  .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: 11px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

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

.mobile-inline-actions-group .eyebrow {
  margin: 0;
}

.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: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.18);
    box-shadow: none;
  }

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

  .mobile-inline-view-details {
    width: 100%;
    min-height: 46px;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
  }

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

  .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;
  }

  .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;
  }

  .desktop-miner-expanded-row {
    display: none;
  }

  #inspectorColumn {
    display: none !important;
  }

  #inspectorColumn .panel-command {
    display: none !important;
  }
}

