/* Render Pool dashboard. Dark theme; colours are defined once here. */
:root {
  --bg: #14161a; --panel: #1d2026; --line: #2c3038; --text: #e6e8eb; --dim: #9097a1;
  --accent: #e87d0d; --ok: #3fb27f; --bad: #e5534b; --lease: #4c8bf5; --input: #111317;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }

/* layout */
header { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
header h1 { font-size: 16px; margin: 0; }
header .grow { flex: 1; }
main { display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 16px 20px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 16px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); margin: 0 0 10px; }
#login { max-width: 380px; margin: 80px auto; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

/* forms */
label { display: block; font-size: 12px; color: var(--dim); margin: 8px 0 3px; }
input, select, button { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 100%; }
button { background: var(--accent); border: 0; color: #111; font-weight: 600; cursor: pointer; margin-top: 10px; }
button.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); width: auto; margin: 0; padding: 3px 8px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--dim); font-weight: 500; }
.job { cursor: pointer; }
.job.selected { background: #252932; }

/* small pieces */
.muted { color: var(--dim); font-size: 12px; }
.tokens { font-weight: 600; color: var(--accent); }
.gain { color: var(--ok); }
.loss { color: var(--bad); }
.error { color: var(--bad); }
.warning { color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--dim); }
.dot.online { background: var(--ok); }
.bar { height: 6px; background: var(--input); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--ok); }
img.preview { max-width: 100%; border-radius: 6px; margin-top: 10px; background: repeating-conic-gradient(#222 0 25%, #2b2b2b 0 50%) 0 0 / 16px 16px; }

/* chunk grid in the job details: one box per chunk, coloured by status */
.grid { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.cell { width: 34px; height: 24px; border-radius: 3px; font-size: 10px; display: flex; align-items: center; justify-content: center; background: #2a2e36; color: var(--dim); }
.cell.wide { width: auto; padding: 0 6px; }
.cell.leased { background: var(--lease); color: #fff; }
.cell.done { background: var(--ok); color: #06150e; }
.cell.failed { background: var(--bad); color: #fff; }
