/* BCH Pool dashboard · dark theme · BCH green accent */

:root {
  --bg: #0e1116;
  --bg-elev: #161a22;
  --bg-elev-2: #1e2330;
  --border: #232a38;
  --text: #e6edf3;
  --text-dim: #8b95a5;
  --text-mute: #5c6675;
  --accent: #0ac18e;       /* BCH-ish green */
  --accent-dim: #098f6a;
  --warn: #f2a84c;
  --bad: #e5484d;
  --good: #0ac18e;
  --link: #4ea3f0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.02), 0 8px 24px rgba(0,0,0,.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { flex: 1; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .hash, .addr, .worker-name, .stratum-url { font-family: var(--mono); }

h1 { font-size: 1.7rem; margin: 1.5rem 0 .75rem; }
h2 { font-size: 1.15rem; margin: 0; }

/* Header */
.site-header { background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; font-size: 1.05rem; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-icon { font-size: 1.3rem; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { padding: .4rem .8rem; border-radius: var(--radius); color: var(--text-dim); font-weight: 500; }
.nav a:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--bg-elev-2); color: var(--accent); }

/* Hero */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: 2.1rem; margin: 0 0 .5rem; letter-spacing: -.02em; }
.lede { font-size: 1.05rem; color: var(--text-dim); max-width: 62ch; line-height: 1.55; }
.lede strong { color: var(--accent); }
.stratum-card { margin-top: 1.25rem; background: var(--bg-elev); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius); max-width: 62ch; }
.stratum-card label { font-size: .75rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; }
.stratum-url { display: block; margin-top: .25rem; font-size: 1rem; color: var(--accent); word-break: break-all; }
.stratum-help { margin-top: .5rem; font-size: .85rem; color: var(--text-dim); }
.stratum-help code { background: var(--bg-elev-2); padding: 1px 5px; border-radius: 4px; }
.btn { display: inline-block; margin-top: 1rem; background: var(--accent); color: #031a14; padding: .55rem 1.1rem; border-radius: var(--radius); font-weight: 600; }
.btn:hover { background: var(--accent-dim); color: #fff; text-decoration: none; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { background: var(--bg-elev); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius); }
.stat-label { font-size: .75rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .08em; }
.stat-value { font-size: 1.6rem; font-weight: 600; margin-top: .25rem; color: var(--text); }
.stat-sub { font-size: .85rem; color: var(--text-dim); margin-top: .25rem; }

/* Cards */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-header h2 { font-size: 1rem; }
.card .link { font-size: .85rem; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Tables */
.table-card { padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table thead th { text-align: left; font-weight: 500; color: var(--text-mute); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.table tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255,255,255,.015); }
td.muted, .muted { color: var(--text-dim); }
td.hash, td.addr { font-family: var(--mono); font-size: .85rem; }

/* Status pills */
.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .75rem; font-weight: 500; }
.status-immature { background: rgba(242,168,76,.15); color: var(--warn); }
.status-mature   { background: rgba(10,193,142,.15); color: var(--good); }
.status-orphaned { background: rgba(229,72,77,.15); color: var(--bad); }

/* Pagination */
.pagination { display: flex; gap: .5rem; justify-content: center; margin: 1.5rem 0; flex-wrap: wrap; align-items: center; }
.pagination a { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); font-size: .9rem; }
.pagination a:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.pagination .current { padding: .35rem .7rem; color: var(--text-mute); font-size: .9rem; }

/* Filter / tabs */
.filter-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.filter-form label { font-size: .85rem; color: var(--text-dim); }
.filter-form input[type="text"] { flex: 1; min-width: 260px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); padding: .45rem .7rem; border-radius: 6px; font-family: var(--mono); font-size: .88rem; }
.filter-form input[type="text"]:focus { outline: none; border-color: var(--accent); }
.filter-form button { background: var(--accent); color: #031a14; border: 0; padding: .5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
.filter-form .clear { font-size: .85rem; color: var(--text-mute); }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.tabs a { padding: .4rem .8rem; border-radius: 6px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim); font-size: .9rem; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { color: var(--text); text-decoration: none; }

/* Banner */
.banner { background: var(--bg-elev-2); }

/* Charts */
.chart-wrap { position: relative; height: 280px; }

/* Range switch */
.range-switch { display: inline-flex; gap: 2px; background: var(--bg-elev-2); border-radius: 6px; padding: 2px; }
.range-switch button { background: transparent; color: var(--text-dim); border: 0; padding: .2rem .55rem; font-size: .8rem; border-radius: 4px; cursor: pointer; font-family: inherit; }
.range-switch button:hover { color: var(--text); }
.range-switch button.active { background: var(--bg-elev); color: var(--accent); }

/* Miner detail head */
.miner-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; margin-top: 1.5rem; }
.miner-head h1 { margin: 0; }
.miner-addr { background: var(--bg-elev); padding: .35rem .6rem; border-radius: 6px; border: 1px solid var(--border); font-size: .85rem; word-break: break-all; }
.miner-links { display: flex; gap: 1rem; margin-left: auto; font-size: .9rem; }

/* Help */
.code-block { background: var(--bg-elev-2); padding: .7rem 1rem; border-radius: 6px; overflow-x: auto; font-family: var(--mono); font-size: .88rem; color: var(--accent); }
.warning { border-left: 3px solid var(--warn); padding: .5rem .9rem; background: rgba(242,168,76,.08); margin: 1rem 0; border-radius: 0 6px 6px 0; }

/* Misc */
.empty { color: var(--text-dim); font-style: italic; padding: 1rem 0; }
.error-card { text-align: center; padding: 2rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); padding: 1.25rem 0; margin-top: 3rem; font-size: .88rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.site-footer code { color: var(--accent); }
.foot-right code { background: var(--bg-elev-2); padding: 1px 6px; border-radius: 4px; }
