:root {
  --bg: #030507;
  --bg-deep: #010203;
  --panel: #0a0e13;
  --panel-soft: #111820;
  --panel-dark: #06090d;
  --line: #202a34;
  --text: #f6f8fb;
  --muted: #b8c1cc;
  --dim: #8793a1;
  --accent: #0ea5ff;
  --accent-soft: rgba(14, 165, 255, 0.18);
  --accent-deep: #075da7;
  --steel: #c9d3df;
  --green: #35c759;
  --red: #ff5f57;
  --yellow: #ffd166;
  --blue: #5fb4ff;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -8%, rgba(14, 165, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #05070a, #020304 72%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 286px;
  display: flex;
  flex-direction: column;
  background: rgba(2, 4, 6, 0.99);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 3;
}

.brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 202px;
  height: 202px;
  overflow: visible;
  border: 1px solid rgba(14, 165, 255, 0.26);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 255, 0.1), rgba(5, 8, 12, 0.58) 64%, transparent 72%);
  box-shadow: 0 0 30px rgba(14, 165, 255, 0.2);
}

.brand-mark img {
  width: 194px;
  height: 194px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

.brand strong,
.brand em {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.side-nav {
  display: grid;
  gap: 4px;
  padding: 14px 10px;
}

.side-nav a {
  padding: 11px 12px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 650;
}

.side-nav a.active,
.side-nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.side-foot {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.pulse.good {
  background: var(--green);
  box-shadow: 0 0 16px rgba(53, 199, 89, 0.45);
}

.pulse.bad {
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 95, 87, 0.45);
}

.shell {
  margin-left: 286px;
  min-height: 100vh;
}

.top-strip {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(5, 8, 12, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.ticker {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.ticker span {
  color: var(--muted);
  font-size: 13px;
}

.ticker strong {
  margin-top: 2px;
  font-size: 16px;
}

.ticker.you strong {
  color: var(--accent);
}

main {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 18px 14px 36px;
}

.hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 0 0 12px;
  min-height: 112px;
  padding: 12px 2px;
  overflow: hidden;
}

.pool-luck-card {
  margin: 14px 14px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent-soft), rgba(3, 6, 9, 0.94) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 0 22px rgba(0, 0, 0, 0.22);
}

.pool-luck-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pool-luck-heading strong {
  color: var(--accent);
  font-size: 23px;
  letter-spacing: -0.03em;
}

.pool-luck-track {
  height: 8px;
  margin: 12px 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-dark);
}

.pool-luck-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 12px var(--accent);
  transition: width 300ms ease;
}

.pool-luck-card.over-target .pool-luck-heading strong {
  color: var(--green);
}

.pool-luck-card.over-target .pool-luck-track span {
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.pool-luck-card p {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}

.block-time-card {
  margin: 10px 14px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(3, 6, 9, 0.98), var(--accent-soft));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 0 18px rgba(0, 0, 0, 0.2);
}

.block-time-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.block-time-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.block-time-card p {
  margin-top: 8px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

.hero p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: white;
  font-weight: 800;
}

.button.ghost {
  background: transparent;
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stat-card,
.panel {
  background: rgba(10, 14, 19, 0.97);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-card h2,
.panel-title h2 {
  font-size: 20px;
}

.stat-card {
  min-height: 238px;
  overflow: hidden;
}

.stat-card h2 {
  padding: 12px 14px;
  background: var(--panel-dark);
}

.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

.kv span {
  color: var(--text);
}

.kv b {
  min-width: 0;
  color: var(--text);
  font-weight: 550;
  text-align: right;
  overflow-wrap: anywhere;
}

.hash-link {
  color: var(--accent);
  font-family: "Cascadia Mono", Consolas, monospace;
}

.short-num {
  color: var(--steel);
  font-size: 12px;
}

.good {
  color: var(--green) !important;
}

.bad {
  color: var(--red) !important;
}

.warn {
  color: var(--yellow) !important;
}

.page.hidden {
  display: none;
}

.panel {
  margin-top: 10px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel-dark);
  border-bottom: 1px solid var(--line);
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.tabs {
  display: flex;
  min-height: 46px;
  background: var(--panel-soft);
}

.tab {
  flex: 1;
  display: grid;
  place-items: center;
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.tab.active {
  border-color: var(--accent);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 10px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.service-pill {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.hashrate-panel {
  min-height: 100%;
}

.luck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(24, 35, 44, 0.38);
}

.luck-grid div {
  min-width: 0;
  padding: 12px;
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.luck-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.luck-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.compare-chart {
  display: grid;
  gap: 14px;
  padding: 10px;
}

.compare-row {
  display: grid;
  gap: 7px;
}

.compare-label,
.compare-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.compare-label span {
  color: var(--muted);
  font-weight: 800;
}

.compare-label b {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

.compare-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 2px;
}

.compare-network,
.compare-pool {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 2px;
}

.compare-network {
  width: 100%;
  background: linear-gradient(90deg, rgba(95, 180, 255, 0.18), rgba(14, 165, 255, 0.42));
}

.compare-pool {
  background: linear-gradient(90deg, #35c759, #8eea72);
  box-shadow: 0 0 12px rgba(53, 199, 89, 0.35);
}

.compare-meta span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 750;
}

.market-grid {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.market-coin {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.market-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.market-head strong {
  font-size: 18px;
}

.market-head span {
  font-weight: 850;
}

.market-price {
  color: var(--text);
  font-size: 26px;
  font-weight: 850;
}

.market-lines {
  display: grid;
  gap: 1px;
}

.market-lines div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.market-lines span {
  color: var(--muted);
  font-weight: 750;
}

.market-lines b {
  color: var(--text);
  font-weight: 650;
  text-align: right;
}

.market-foot {
  padding: 0 12px 12px;
  color: var(--dim);
  font-size: 12px;
}

.share-graph-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(24, 35, 44, 0.38);
}

body[data-pool-theme="bch-nmc"] {
  --line: #183727;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.18);
  --accent-deep: #087a32;
  --blue: #68e58f;
  background:
    radial-gradient(circle at 78% -8%, rgba(34, 197, 94, 0.11), transparent 30%),
    linear-gradient(180deg, #040806, #010302 72%),
    var(--bg);
}

body[data-pool-theme="bch-nmc"] .brand-mark {
  border-color: rgba(34, 197, 94, 0.35);
  background: radial-gradient(circle, rgba(34, 197, 94, 0.13), rgba(3, 10, 6, 0.64) 64%, transparent 72%);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.24);
}

body[data-pool-theme="bch-nmc"] .brand-mark img {
  filter: hue-rotate(-68deg) saturate(1.3) drop-shadow(0 0 20px rgba(34, 197, 94, 0.38));
}

body[data-pool-theme="bch-nmc"] .compare-pool {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), rgba(104, 229, 143, 0.62));
}

body[data-pool-theme="bch-nmc"] .best-share-card {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: inset 0 0 22px rgba(34, 197, 94, 0.045);
}

body[data-pool-theme="bch-nmc"] .difficulty-lane.main .difficulty-fill {
  background: linear-gradient(90deg, #0b7d36, #42df78);
  box-shadow: 0 0 12px rgba(66, 223, 120, 0.34);
}

body[data-pool-theme="bch-nmc"] .difficulty-lane.main .difficulty-marker {
  box-shadow: 0 0 9px rgba(66, 223, 120, 0.88);
}

.pool-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.pool-switch a {
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.pool-switch a.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.pool-build-panel p {
  max-width: 760px;
  padding: 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.best-share-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.best-share-card {
  overflow: hidden;
  border: 1px solid rgba(14, 165, 255, 0.52);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 27, 35, 0.98), rgba(26, 38, 48, 0.98));
  box-shadow: inset 0 0 22px rgba(14, 165, 255, 0.035);
}

.best-share-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.best-share-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.best-share-worker {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.best-share-head > div:first-child strong {
  color: var(--blue);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 650;
}

.best-share-facts {
  display: flex;
  gap: 24px;
  align-items: center;
  text-align: right;
}

.best-share-facts span {
  display: grid;
  gap: 3px;
}

.best-share-facts small,
.difficulty-lane-label span,
.best-share-foot {
  color: var(--muted);
}

.best-share-facts small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.best-share-facts b {
  color: var(--text);
  font-size: 16px;
}

.difficulty-lanes {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.difficulty-lane {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.difficulty-lane-label {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
}

.difficulty-lane-label strong {
  color: var(--accent);
  letter-spacing: 0.1em;
}

.difficulty-lane.nmc .difficulty-lane-label strong { color: #f2ca52; }
.difficulty-lane.sys .difficulty-lane-label strong { color: #9b8cff; }
.difficulty-lane.hit .difficulty-lane-label strong { color: var(--green); }

.difficulty-lane-label span {
  font-size: 12px;
}

.difficulty-lane-label b {
  color: var(--steel);
  font-size: 12px;
  font-weight: 750;
}

.difficulty-track {
  position: relative;
  height: 16px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 10, 15, 0.86);
}

.difficulty-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #087daf, #24c8ed);
  box-shadow: 0 0 12px rgba(36, 200, 237, 0.3);
}

.difficulty-lane.nmc .difficulty-fill {
  background: linear-gradient(90deg, #8d6912, #f2ca52);
  box-shadow: 0 0 12px rgba(242, 202, 82, 0.25);
}

.difficulty-lane.sys .difficulty-fill {
  background: linear-gradient(90deg, #5141a9, #9b8cff);
  box-shadow: 0 0 12px rgba(155, 140, 255, 0.25);
}

.difficulty-lane.hit .difficulty-fill {
  background: linear-gradient(90deg, #159447, #66e08a);
}

.difficulty-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #dff8ff;
  border-radius: 50%;
  background: #101820;
  box-shadow: 0 0 9px rgba(36, 200, 237, 0.85);
  transform: translate(-50%, -50%);
}

.best-share-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 9px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(0, 0, 0, 0.12);
  font-size: 11px;
}

@media (max-width: 850px) {
  .best-share-head,
  .difficulty-lane {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .best-share-head {
    display: grid;
  }

  .best-share-facts {
    justify-content: space-between;
    text-align: left;
  }

  .difficulty-lane-label {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .difficulty-lane-label b {
    grid-column: 2;
  }
}

.share-graph-summary div {
  padding: 12px;
  background: var(--panel-dark);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
}

.share-graph-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.share-graph-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.share-graph-wrap {
  padding: 10px;
  background: rgba(20, 25, 29, 0.48);
}

.share-graph {
  display: block;
  width: 100%;
  min-height: 340px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.share-graph-bg {
  fill: rgba(34, 39, 43, 0.82);
}

.share-grid {
  stroke: rgba(201, 211, 223, 0.1);
  stroke-width: 1;
}

.network-line {
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 2;
  stroke-linecap: round;
}

.network-label,
.share-axis-label,
.best-label {
  fill: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.share-axis,
.share-axis-tick {
  stroke: rgba(201, 211, 223, 0.28);
  stroke-width: 1;
}

.share-column {
  fill: rgba(201, 211, 223, 0.48);
}

.share-column.best {
  fill: #ffd166;
  filter: drop-shadow(0 0 5px rgba(255, 209, 102, 0.55));
}

.share-column.reward {
  fill: #35c759;
  filter: drop-shadow(0 0 7px rgba(53, 199, 89, 0.7));
}

.reward-icon {
  filter: drop-shadow(0 0 6px rgba(53, 199, 89, 0.9));
}

.best-marker {
  stroke: #fff45c;
  stroke-width: 3;
}

.best-badge {
  fill: #d89b16;
}

.best-badge-text {
  fill: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.share-graph-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 10px 12px 14px;
  color: var(--text);
  background: var(--panel-dark);
  border-top: 1px solid var(--line);
  font-weight: 850;
}

.share-graph-legend.compact {
  justify-content: flex-start;
  padding: 9px 14px;
  font-size: 12px;
}

.share-graph-legend span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.share-graph-legend i {
  display: inline-block;
}

.legend-bar {
  width: 9px;
  height: 22px;
  background: #f4f7fb;
  border-radius: 5px;
}

.legend-best {
  width: 9px;
  height: 22px;
  background: #fff45c;
  border-radius: 5px;
}

.legend-reward {
  width: 22px;
  height: 22px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: url("/dg-icon.png") center / cover no-repeat;
  box-shadow: 0 0 7px rgba(53, 199, 89, 0.55);
}

.legend-line {
  width: 28px;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
}

.connect-list {
  display: grid;
  gap: 1px;
  padding: 10px;
}

.connect-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--panel-dark);
}

.connect-row span {
  color: var(--muted);
  font-weight: 750;
}

.connect-row b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.status.online::before {
  background: var(--green);
}

.table-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-tools input {
  width: min(360px, 44vw);
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--text);
  background: var(--panel-soft);
  font-size: 13px;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 14px;
}

tbody tr:hover {
  background: rgba(255, 106, 19, 0.08);
}

.mono {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.log-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.log-tabs button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-deep);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.log-tabs button.active {
  color: white;
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}

pre {
  min-height: 520px;
  max-height: 72vh;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #101820;
  color: #d6dee8;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.empty {
  padding: 18px;
  color: var(--muted);
}

.admin-card {
  margin: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.admin-card button,
.admin-dialog button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  background: var(--bg-deep);
  cursor: pointer;
  font-weight: 800;
}

.admin-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 800;
}

.admin-card .link-button,
.admin-dialog .link-button {
  width: auto;
  min-height: 30px;
  color: var(--muted);
}

.admin-card .danger-button {
  margin-top: 8px;
  border-color: #9f332b;
  background: #4d1d1a;
  color: #ffd9d5;
}

#admin-action-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
}

.admin-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.admin-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.admin-dialog label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-dialog input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-deep);
  color: var(--text);
}

.admin-dialog .primary-button {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: white;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #ff8e86;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brand {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .brand-mark {
    width: 88px;
    height: 88px;
  }

  .brand-mark img {
    width: 84px;
    height: 84px;
  }

  .side-foot {
    display: none;
  }

  .pool-luck-card {
    margin: 10px;
  }

  .block-time-card {
    margin: 10px;
  }

  .top-strip,
  .stat-grid,
  .dashboard-grid,
  .service-grid,
  .luck-grid,
  .share-graph-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .top-strip,
  .stat-grid,
  .dashboard-grid,
  .service-grid,
  .luck-grid,
  .share-graph-summary {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 24px;
  }

  .stat-card {
    min-height: auto;
  }
}
