/* Pearl Fortune public pool UI.
   Tailwind CDN handles utility classes via /static/app.css link in layout.html.
   This file only adds: custom utilities Tailwind can't easily produce,
   semantic component shortcuts for pieces repeated many times,
   and Chart.js text/style overrides. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
:root {
  --pf-font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --pf-font-mono: 'SF Mono', Monaco, 'Cascadia Code', Consolas, 'Liberation Mono', monospace;
}
body {
  font-family: var(--pf-font-sans);
  font-size: 15px;
  color: #1e293b;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(241, 245, 249, .99)),
    linear-gradient(115deg, rgba(20, 184, 166, .08), transparent 38%, rgba(245, 158, 11, .07));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 768px) { body { font-size: 16px; } }

.mono { font-family: var(--pf-font-mono); }

.js-i18n-label::before { content: attr(data-label); }

/* ---------- custom scrollbars ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- mobile scrollbar hide (matches Next.js globals.css) ---------- */
.mobile-hide-scrollbar::-webkit-scrollbar { display: none; }
.mobile-hide-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

/* ---------- top-bar pill shortcuts ---------- */
.pf-topbar {
  border-color: rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px -34px rgba(15, 23, 42, .45);
}
.pf-brand {
  color: #0f172a;
  letter-spacing: 0;
  text-decoration: none;
}
.pf-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc 0%, #d1fae5 48%, #fef3c7 100%);
  border: 1px solid rgba(15, 23, 42, .1);
  font-family: var(--pf-font-mono);
  font-size: .72rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 10px 20px -14px rgba(15, 23, 42, .6);
}
.pf-discord-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 1.75rem;
  border-radius: .5rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0 .625rem;
  font-size: .75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pf-discord-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.language-control {
  position: relative;
  display: inline-flex;
  height: 1.75rem;
  align-items: center;
}
.language-select {
  height: 1.75rem;
  min-width: 4.25rem;
  border-radius: .5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  padding: 0 .5rem;
  font-family: var(--pf-font-mono);
  font-size: .75rem;
  font-weight: 700;
  outline: none;
}
.language-select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .14);
}
.tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  flex-shrink: 0;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
@media (min-width: 640px) {
  .tab-pill { padding-left: 1rem; padding-right: 1rem; }
}
.tab-pill:hover { background-color: rgba(226, 232, 240, .5); color: #334155; }
.tab-pill[data-active="true"] { background-color: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

.time-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.time-pill:hover { background-color: rgba(226, 232, 240, .5); color: #334155; }
.time-pill[data-active="true"] { background-color: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

/* ---------- share-tab pill (per-status color when active) ---------- */
.share-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.share-tab:hover { color: #334155; }
.share-tab[data-share-status="credited"][data-active="true"] { background-color: #fff; color: #059669; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.share-tab[data-share-status="pending"][data-active="true"]  { background-color: #fff; color: #d97706; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.share-tab[data-share-status="error"][data-active="true"]    { background-color: #fff; color: #dc2626; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

.ledger-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.ledger-tab:hover { color: #1f2937; }
.ledger-tab[data-active="true"] { background-color: #fff; color: #2563eb; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

/* ---------- status badges (mirrors Next.js StatusBadge) ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid;
  white-space: nowrap;
}
.status-badge.pending   { background-color: #fffbeb; color: #d97706; border-color: #fde68a; }
.status-badge.accepted  { background-color: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.status-badge.confirmed { background-color: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.status-badge.rejected,
.status-badge.invalid   { background-color: #fef2f2; color: #dc2626; border-color: #fecaca; }
.status-badge.orphan,
.status-badge.orphaned,
.status-badge.stale     { background-color: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.status-badge.credited  { background-color: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.status-badge.error     { background-color: #fef2f2; color: #dc2626; border-color: #fecaca; }
.status-badge.accounted { background-color: #ecfdf5; color: #059669; border-color: #a7f3d0; }
.status-badge.default   { background-color: #f8fafc; color: #64748b; border-color: #e2e8f0; }

/* ---------- miner address chart layout ---------- */
.miner-address-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}
@media (min-width: 1024px) {
  .miner-address-layout {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 2.28fr);
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  border: 1px solid transparent;
  background-color: #fff;
  color: #334155;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background-color: #0284c7; color: #fff; border-color: transparent; }
.btn.primary:not(:disabled):hover { background-color: #0369a1; }
.btn.outline { background-color: #fff; color: #334155; border-color: #cbd5e1; }
.btn.outline:not(:disabled):hover { background-color: #f8fafc; }
.btn.ghost { background-color: transparent; color: #64748b; border-color: transparent; }
.btn.ghost:hover { background-color: #f1f5f9; }
.btn.tiny { padding: 0.25rem 0.5rem; font-size: 0.75rem; border-radius: 0.375rem; }
.btn.icon { padding: 0; width: 2rem; height: 2rem; }

/* ---------- form controls ---------- */
.input, .select {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #94a3b8; }
.input:focus, .select:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem 1.25rem;
  padding-right: 2.25rem;
}

/* select inside compact filter chip — borderless */
.filter-chip .select {
  border: 0;
  background-color: transparent;
  padding: 0;
  padding-right: 1.5rem;
  height: 2rem;
  font-size: 0.875rem;
}
.filter-chip .select:focus { box-shadow: none; }
.filter-chip .input {
  border: 0;
  background-color: transparent;
  padding: 0;
  height: 2rem;
  width: 7rem;
  font-size: 0.875rem;
}
.filter-chip .input:focus { box-shadow: none; }

/* ---------- pool-share gradient ring (overview hero) ---------- */
.share-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.share-ring svg { transform: rotate(-90deg); }
.share-ring .share-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.share-ring .share-ring-value { font-size: 1.875rem; font-weight: 700; line-height: 1; }
.share-ring .share-ring-label { font-size: 0.75rem; color: rgba(255, 255, 255, .82); margin-top: 0.25rem; }

/* ---------- block card ---------- */
.block-card {
  display: block;
  width: 100%;
  background-color: rgba(248, 250, 252, .5);
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.block-card:hover {
  background-color: rgba(239, 246, 255, .5);
  border-color: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -10px rgba(59, 130, 246, .25);
}

/* ---------- settlement workspace ---------- */
.settlement-shell {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 42px -32px rgba(15, 23, 42, .45);
}
.settlement-header {
  display: flex;
  flex-direction: column;
  gap: .875rem;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid #edf2f7;
  padding: 1rem 1.25rem;
}
@media (min-width: 768px) {
  .settlement-header { flex-direction: row; align-items: center; }
}
.settlement-eyebrow {
  color: #94a3b8;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1;
}
.settlement-title {
  margin-top: .375rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}
.settlement-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.settlement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 38rem;
}
@media (min-width: 1024px) {
  .settlement-grid {
    grid-template-columns: minmax(21rem, .95fr) minmax(27rem, 1.05fr);
  }
}
.settlement-pane {
  min-width: 0;
  padding: 1.125rem;
}
.settlement-pane + .settlement-pane {
  border-top: 1px solid #edf2f7;
}
@media (min-width: 1024px) {
  .settlement-pane + .settlement-pane {
    border-top: 0;
    border-left: 1px solid #edf2f7;
  }
}
.settlement-window-list {
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.settlement-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding-top: .875rem;
}
.settlement-detail-empty {
  border: 1px dashed #cbd5e1;
  border-radius: .875rem;
  background: #f8fafc;
  padding: 1rem;
  color: #64748b;
  font-size: .875rem;
}
.settlement-detail-card {
  border: 1px solid #bfdbfe;
  border-radius: .875rem;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8fc 100%);
  padding: 1rem;
}
.settlement-detail-label {
  color: #64748b;
  font-size: .75rem;
  font-weight: 600;
}
.settlement-detail-id {
  margin-top: .25rem;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: .875rem;
  font-weight: 700;
}
.settlement-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .625rem;
}
.settlement-detail-stats span,
.settlement-fee-strip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .8);
  padding: .35rem .55rem;
  color: #475569;
  font-size: .75rem;
  line-height: 1;
}
.settlement-detail-stats strong {
  color: #334155;
  font-weight: 700;
}
.settlement-detail-stats em {
  color: #64748b;
  font-style: normal;
}
.settlement-fee-strip {
  margin-top: .625rem;
  border-color: #facc15;
  background: #fffbeb;
  color: #b45309;
}
.settlement-fee-label {
  font-weight: 700;
}
.settlement-credits-wrap {
  overflow: hidden;
  margin-top: .875rem;
  border: 1px solid #e2e8f0;
  border-radius: .875rem;
  background: #fff;
}
.settlement-credits-table {
  table-layout: fixed;
}
.settlement-credits-table th:nth-child(1),
.settlement-credits-table td:nth-child(1) { width: 56%; }
.settlement-credits-table th:nth-child(2),
.settlement-credits-table td:nth-child(2) { width: 26%; }
.settlement-credits-table th:nth-child(3),
.settlement-credits-table td:nth-child(3) { width: 18%; }
.settlement-credits-table tbody td {
  padding: .875rem 1rem;
}

/* ---------- table styling (admin-matching) ---------- */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-table thead tr {
  background-color: #f8fafc;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #64748b;
}
.admin-table th {
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  text-align: left;
}
.admin-table th.right { text-align: right; }
.admin-table th.center { text-align: center; }
.admin-table tbody td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: #334155;
  border-top: 1px solid #f1f5f9;
}
.admin-table tbody tr:hover { background-color: rgba(248, 250, 252, .5); }
.admin-table .right { text-align: right; }
.admin-table .center { text-align: center; }

.pool-fee-credit-row {
  background: #fffcf3;
}
.window-credit-account {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .5rem;
}
.window-credit-account.fee {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.window-credit-account .link-button,
.window-credit-account > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.window-credit-fee-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border: 1px solid #facc15;
  border-radius: .375rem;
  background: #fffbeb;
  padding: .25rem .5rem;
  color: #b45309;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
}

.empty-row td { text-align: center; color: #94a3b8; padding: 2rem 1.25rem; }

/* ---------- miner live connections panel ---------- */
.miner-connections-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 25px -20px rgba(15, 23, 42, .35);
}
.miner-connections-header {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}
@media (min-width: 1024px) {
  .miner-connections-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.miner-connections-title { display: flex; min-width: 0; align-items: center; gap: .75rem; }
.miner-connections-title h3 { font-size: .875rem; font-weight: 700; color: #0f172a; }
.miner-connections-icon {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: .625rem;
  background: #ecfeff;
  color: #0e7490;
}
.miner-online-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: #cbd5e1; }
.miner-online-dot.online { background: #10b981; }
.miner-online-label { font-size: .75rem; font-weight: 600; color: #64748b; }
.miner-online-label.online { color: #047857; }
.miner-connections-address { margin-top: .125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: #94a3b8; }
.miner-connections-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  font-size: .75rem;
  color: #64748b;
}
.miner-connections-summary-wrap {
  overflow-x: auto;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(248, 250, 252, .75);
}
.miner-connections-summary {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .miner-connections-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .miner-connections-summary {
    min-width: 1040px;
    grid-template-columns: minmax(255px, 1.55fr) minmax(170px, 1fr) minmax(120px, .75fr) minmax(220px, 1.25fr) minmax(210px, 1.1fr);
  }
}
.miner-connections-summary-cell {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: .75rem;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: .75rem;
}
.miner-connections-summary-cell:last-child { border-right: 0; }
@media (min-width: 640px) {
  .miner-connections-summary-cell { border-bottom: 0; }
}
.miner-connections-summary-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .375rem;
  overflow: hidden;
  color: #64748b;
  font-size: .6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.miner-connections-summary-label span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.miner-connections-summary-label svg { flex-shrink: 0; color: #0e7490; }
.miner-connections-summary-label.muted svg { color: #cbd5e1; }
.miner-connections-summary-value {
  min-width: max-content;
  white-space: nowrap;
  text-align: right;
  font-family: var(--pf-font-mono);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.miner-connections-summary-value.muted { color: #94a3b8; }
.miner-connections-table-wrap { overflow-x: auto; }
.miner-connections-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}
.miner-connections-table th {
  border-bottom: 1px solid #f1f5f9;
  padding: .625rem 1rem;
  text-align: left;
  color: #94a3b8;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.miner-connections-table th.right { text-align: right; }
.miner-connections-table th.filter-cell {
  min-width: 11.25rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.miner-connection-filter-head {
  display: flex;
  position: relative;
  height: 2rem;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  border-radius: .5rem;
  background: rgba(248, 250, 252, .85);
  padding: 0 .5rem;
  text-transform: none;
  letter-spacing: 0;
}
.miner-connection-filter-head::after {
  content: "";
  width: .45rem;
  height: .45rem;
  flex-shrink: 0;
  border-right: 1.5px solid #64748b;
  border-bottom: 1.5px solid #64748b;
  transform: rotate(45deg) translateY(-1px);
  pointer-events: none;
}
.miner-connection-filter-label {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.miner-connection-filter-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #334155;
  font-size: .75rem;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.miner-connection-filter-select {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 0;
  background: transparent;
  background-image: none;
  cursor: pointer;
  opacity: 0;
  outline: none;
}
.miner-connection-filter-select::-ms-expand { display: none; }
.miner-connection-filter-select:focus { border-color: #93c5fd; }
.miner-connections-table td {
  border-bottom: 1px solid #f8fafc;
  padding: .625rem 1rem;
  color: #334155;
  font-size: .8125rem;
}
.miner-connections-table td.right { text-align: right; }
.miner-connections-table tr.stale td { color: #94a3b8; }
.miner-connection-worker { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.miner-connection-status-dot { width: .375rem; height: .375rem; flex-shrink: 0; border-radius: 9999px; }
.miner-connection-status-dot.fresh { background: #10b981; }
.miner-connection-status-dot.stale { background: #cbd5e1; }
.miner-connection-id, .miner-connection-client {
  display: inline-flex;
  max-width: 10rem;
  align-items: center;
  border-radius: .375rem;
  background: #f1f5f9;
  padding: .125rem .375rem;
  color: #64748b;
  font-size: .6875rem;
}
.miner-connection-stale-badge {
  border: 1px solid #e2e8f0;
  border-radius: .375rem;
  padding: .125rem .375rem;
  color: #94a3b8;
  font-size: .6875rem;
  font-weight: 600;
}
.miner-connection-gpu-model {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.miner-connections-footer {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding: .75rem 1rem;
  color: #64748b;
  font-size: .75rem;
}
@media (min-width: 640px) {
  .miner-connections-footer { flex-direction: row; align-items: center; }
}
.miner-connections-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: .875rem;
}
.miner-connections-empty-cell {
  padding: 2rem 1rem !important;
  text-align: center;
  color: #94a3b8 !important;
}

/* ---------- link-button: an inline button that looks like text/link ---------- */
.link-button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #2563eb;
  font: inherit;
  text-align: inherit;
}
.link-button:hover { color: #1d4ed8; text-decoration: underline; }
.link-button.amber { color: #d97706; }
.link-button.amber:hover { color: #b45309; }

/* ---------- yield gradient bar ---------- */
.yield-bar-track {
  flex: 1;
  height: 0.5rem;
  background-color: rgba(255, 255, 255, .2);
  border-radius: 9999px;
  overflow: hidden;
}
.yield-bar-fill {
  height: 100%;
  background-color: #fff;
  border-radius: 9999px;
  transition: width .35s ease;
}

/* ---------- maturity bar ---------- */
.maturity-track {
  flex: 1;
  height: 0.375rem;
  background-color: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}
.maturity-fill {
  height: 100%;
  background-color: #60a5fa;
  border-radius: 9999px;
  transition: width .35s ease;
}
.maturity-fill.matured { background-color: #10b981; }

/* ---------- modal (centered, matching PoolDBBlockDetailModal) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, .6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 40;
}
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-shell { align-items: center; padding: 1rem; }
}
.modal-card {
  position: relative;
  width: 100%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .35);
}
@media (min-width: 640px) {
  .modal-card { max-width: 42rem; border-radius: 1rem; max-height: 90vh; }
}
.modal-card.wide { max-width: 72rem; }
.modal-card.xwide { max-width: 80rem; }
.modal-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(90deg, #2563eb, #4f46e5, #7c3aed);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.modal-header.amber {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.modal-header.compact {
  padding: 0.75rem 1rem;
}
.modal-header.effort-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #020617, #111827, #c2410c);
}
.modal-header.effort-header > *:not(.effort-header-glow) {
  position: relative;
  z-index: 1;
}
.effort-header-glow {
  position: absolute;
  inset: 0 0 0 auto;
  width: 50%;
  background: radial-gradient(circle at top right, rgba(251, 146, 60, .55), transparent 55%);
  pointer-events: none;
}
.modal-header .modal-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-header .modal-icon.compact {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}
.modal-header h2 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.modal-header .modal-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-family: var(--pf-font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, .8);
}
.modal-header.compact h2 { font-size: 1rem; }
.modal-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, .2);
  padding: 0.125rem 0.375rem;
  font-family: var(--pf-font-sans);
  font-weight: 500;
}
.modal-close {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: transparent;
  color: #fff;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease;
  flex-shrink: 0;
}
.modal-close:hover { background-color: rgba(255, 255, 255, .2); }
.modal-body { padding: 1.5rem; overflow-y: auto; }
.modal-body.effort-modal-body { background-color: #f8fafc; }

/* ---------- toolbar filter chip ---------- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.375rem 0.75rem;
}

/* ---------- pager ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pager .page-counter {
  font-family: var(--pf-font-mono);
  font-size: 0.875rem;
  color: #64748b;
  min-width: 60px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- candidate row ---------- */
.candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.625rem;
  align-items: center;
  padding: 0.625rem 0.75rem;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  background-color: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
  width: 100%;
  text-align: left;
}
.candidate-row:hover {
  border-color: #bfdbfe;
  background-color: rgba(239, 246, 255, .5);
  transform: translateY(-1px);
}
.candidate-row.is-disabled {
  cursor: default;
  background-color: #f8fafc;
}
.candidate-row.is-disabled:hover {
  border-color: #f1f5f9;
  background-color: #f8fafc;
  transform: none;
}
.candidate-row .text { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #64748b; font-size: 0.875rem; }
.candidate-row .meta { color: #1e293b; font-weight: 500; text-align: right; font-size: 0.875rem; font-family: var(--pf-font-mono); }

/* ---------- leader row ---------- */
.leader-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.5fr) minmax(120px, .45fr) minmax(150px, .55fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
  background-color: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
  text-align: left;
}
.leader-row:hover {
  border-color: #bfdbfe;
  background-color: rgba(239, 246, 255, .5);
  transform: translateY(-1px);
}
.leader-row.is-disabled {
  cursor: default;
  background-color: #f8fafc;
}
.leader-row.is-disabled:hover {
  border-color: #f1f5f9;
  background-color: #f8fafc;
  transform: none;
}
.leader-row .leader-rank { font-weight: 700; color: #475569; font-family: var(--pf-font-mono); }
.leader-row .leader-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #1e293b; font-family: var(--pf-font-mono); font-size: 0.875rem; }
.leader-row .leader-blocks { font-family: var(--pf-font-mono); color: #475569; font-size: 0.875rem; text-align: right; }
.leader-row .leader-reward { font-family: var(--pf-font-mono); color: #0f766e; font-weight: 600; font-size: 0.875rem; text-align: right; }

.leader-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.5fr) minmax(120px, .45fr) minmax(150px, .55fr);
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f1f5f9;
}

/* ---------- window list ---------- */
.window-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .4rem;
  width: 100%;
  padding: .875rem 1rem;
  border: 1px solid #e8eef5;
  border-radius: .875rem;
  background-color: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.window-item:hover {
  border-color: #bfdbfe;
  background-color: #f8fbff;
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, .45);
  transform: translateY(-1px);
}
.window-item.active {
  border-color: #0ea5e9;
  background: linear-gradient(180deg, #f0f9ff 0%, #f8fbff 100%);
  box-shadow: inset 3px 0 0 #0ea5e9;
}
.window-item-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.window-id {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-size: .875rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.window-range {
  color: #64748b;
  font-size: .75rem;
}
.window-item-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem .75rem;
  color: #64748b;
  font-size: .75rem;
}
.window-time {
  color: #94a3b8;
  font-size: .6875rem;
}

/* ---------- worker chip ---------- */
.worker-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------- Chart.js text override ---------- */
canvas { display: block; }

/* ---------- subtle pulse for loading text ---------- */
@keyframes pulse-loading { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.is-loading { animation: pulse-loading 1.5s ease-in-out infinite; }

/* ---------- copy button (inside modal) ---------- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, .15);
  border: 0;
  cursor: pointer;
  color: #fff;
  transition: background-color .15s ease;
}
.copy-btn:hover { background-color: rgba(255, 255, 255, .3); }
.copy-btn.plain {
  width: 2.25rem;
  height: 2.25rem;
  background-color: #fff;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}
.copy-btn.plain:hover {
  background-color: #f8fafc;
  color: #475569;
}

/* ---------- detail metric tile (inside modal) ---------- */
.detail-tile {
  background: linear-gradient(135deg, #fff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
}
.detail-tile .label { font-size: 0.75rem; color: #94a3b8; margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.375rem; }
.detail-tile .value { font-size: 1.125rem; font-weight: 700; color: #0f172a; }
.detail-tile .value.mono { font-family: var(--pf-font-mono); font-size: 1rem; }
.detail-tile .value.amber { color: #d97706; }
.detail-tile .value.emerald { color: #047857; }
.detail-tile .value.blue { color: #1d4ed8; }

/* ---------- block detail modal ---------- */
.block-detail-modal .block-detail-header {
  background: linear-gradient(90deg, #f8fafc, #fff);
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}
.block-detail-modal .block-detail-header h2 {
  color: #0f172a;
}
.block-detail-modal .modal-close {
  color: #94a3b8;
}
.block-detail-modal .modal-close:hover {
  background-color: #f1f5f9;
  color: #475569;
}
.block-detail-modal .height-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #fed7aa;
  background-color: #fff7ed;
  color: #c2410c;
  font-family: var(--pf-font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}
.block-detail-modal .status-badge {
  height: 1.75rem;
  padding: 0 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.block-detail-found-by {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 0.375rem;
  color: #64748b;
  font-size: 0.875rem;
}
.block-detail-address {
  color: #2563eb;
  overflow-wrap: anywhere;
}
.block-detail-address:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.block-detail-address.cyan {
  color: #0891b2;
}
.block-worker-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  background-color: #dbeafe;
  padding: 0.125rem 0.5rem;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
}
.block-detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .block-detail-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1180px) {
  .block-detail-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.block-detail-modal .detail-tile {
  border-color: rgba(226, 232, 240, .9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.block-detail-modal .metric-card {
  min-height: 7.5rem;
}
.block-detail-modal .detail-tile .label {
  margin-bottom: 0.625rem;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
}
.block-detail-modal .detail-tile .label.amber { color: #d97706; }
.block-detail-modal .detail-tile .label.orange { color: #ea580c; }
.block-detail-modal .detail-tile .label.purple { color: #9333ea; }
.block-detail-modal .detail-tile .label.emerald { color: #059669; }
.block-detail-modal .detail-tile .label.rose { color: #e11d48; }
.block-detail-modal .detail-tile .value {
  font-size: 1.35rem;
  line-height: 1.35;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.block-detail-modal .detail-tile .value.small {
  font-size: 0.95rem;
  font-weight: 600;
}
.block-hash-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.block-hash-card code {
  display: block;
  color: #334155;
  font-family: var(--pf-font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.block-hash-card .hash-short {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-family: var(--pf-font-mono);
  font-size: 0.75rem;
}
.block-detail-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .block-detail-info-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.block-detail-info-grid .address-card {
  min-height: 6.5rem;
}
.block-detail-modal .card-label {
  margin-bottom: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 500;
}
.block-detail-modal .address-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
}
.block-detail-modal .address-row > span {
  padding-top: 0.125rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 600;
}
.shares-detail-card {
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.shares-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background-color: rgba(248, 250, 252, .8);
  border-bottom: 1px solid #e2e8f0;
}
.shares-detail-header h3 {
  margin: 0;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 700;
}
.shares-pager {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-family: var(--pf-font-mono);
  font-size: 0.75rem;
}
.shares-pager .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.block-shares-table .block-share-address {
  color: #2563eb;
  overflow-wrap: anywhere;
}
.block-shares-table .block-share-address:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
@media (max-width: 640px) {
  .shares-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .shares-pager {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- effort modal summary tile ---------- */
.effort-summary-tile {
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #fff;
}
.effort-summary-tile .label { font-size: 0.75rem; opacity: 0.8; }
.effort-summary-tile .value { font-size: 1.25rem; font-weight: 700; margin-top: 0.25rem; font-family: var(--pf-font-mono); }
