:root {
  color-scheme: dark;
  --background: #111820;
  --panel: #18222d;
  --panel-top: #1c2834;
  --ink: #edf3fa;
  --muted: #a4b5c6;
  --line: #314252;
  --accent: #82e0bf;
  --warning: #f0c376;
  --danger: #ffaa9f;
  font: 16px/1.5 "Segoe UI", "Inter", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3.9vw, 2.85rem); line-height: 1.15; letter-spacing: -.05em; }
h2 { font-size: 1.18rem; margin-bottom: .8rem; letter-spacing: -.025em; }
h3 { font-size: .94rem; font-weight: 580; color: var(--muted); }
a { color: var(--accent); }
button, input { font: inherit; }
button, .quiet { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.topbar { background: #141d26; border-bottom: 1px solid var(--line); }
.topbar-content, .layout { max-width: 77rem; margin: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }
.topbar-content { min-height: 4.1rem; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: .68rem; align-items: center; font-weight: 670; letter-spacing: -.02em; }
.signal { width: .56rem; height: .56rem; background: var(--accent); box-shadow: 0 0 0 4px #82e0bf27; border-radius: 50%; }
.layout { padding-block: 2.6rem 3.3rem; }
.page-heading { display: flex; gap: 1.1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.page-heading p { margin-top: .52rem; }
.quiet, .primary { display: inline-flex; align-items: center; justify-content: center; border-radius: .55rem; min-height: 2.4rem; padding: .38rem .8rem; font-weight: 620; text-decoration: none; }
.quiet { border: 1px solid var(--line); background: transparent; color: var(--ink); white-space: nowrap; }
.quiet:hover { background: var(--panel); }
.primary { border: 0; background: var(--accent); color: #122a23; }
.primary:hover { background: #a3edcf; }
.muted, time { color: var(--muted); }
.block { margin-bottom: 1.7rem; }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.account, .table-wrap, .resource-list { background: var(--panel); border: 1px solid var(--line); border-radius: .8rem; }
.account { padding: 1.05rem 1.2rem; }
.amount { font-size: 2.2rem; font-weight: 680; letter-spacing: -.06em; font-variant-numeric: tabular-nums; margin: .17rem 0 .45rem; line-height: 1.16; }
.amount small { font-size: .95rem; margin-left: .1rem; letter-spacing: 0; color: var(--muted); }
.stamp { display: flex; align-items: center; flex-wrap: wrap; gap: .38rem .65rem; font-size: .8rem; }
.stamp time { white-space: nowrap; }
.pill { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #53677c; background: #29394a; color: var(--ink); border-radius: 1rem; padding: .16rem .56rem; font-size: .77rem; line-height: 1.35; white-space: nowrap; }
.pill.up, .pill.on, .pill.created { background: #203d35; color: #a9efd4; border-color: #3c6a5a; }
.pill.stale, .pill.degraded, .pill.transfer { background: #423525; color: var(--warning); border-color: #745734; }
.pill.down, .pill.off, .pill.no_paid, .pill.blocked { background: #422e31; color: var(--danger); border-color: #764e56; }
.table-wrap { overflow-x: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .82rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: var(--panel-top); color: var(--muted); font-weight: 620; white-space: nowrap; }
tbody th { font-weight: 560; }
tbody tr:last-child > * { border-bottom: 0; }
td { white-space: nowrap; }
.identifier { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.resource-list { padding: 0; margin: 0; list-style: none; }
.resource-list li { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .85rem 1rem; }
.resource-list li + li { border-top: 1px solid var(--line); }
.resource-list .stamp { margin-top: .2rem; }
.empty { color: var(--muted); white-space: normal; }
.source-state { display: flex; align-items: center; gap: .5rem; color: var(--muted); padding: .24rem .1rem; font-size: .86rem; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 1rem; }
.login-panel { width: min(100%, 26rem); padding: clamp(1.4rem, 7vw, 2.1rem); background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; }
.login-panel .brand { margin-bottom: 1.7rem; }
.login-panel h1 { margin-bottom: 1.3rem; }
.login-panel form { display: grid; gap: .48rem; }
.login-panel label { font-size: .9rem; color: var(--muted); }
.login-panel input { border-radius: .5rem; border: 1px solid var(--line); color: var(--ink); padding: .55rem .65rem; background: #121b25; width: 100%; }
.login-panel input + label { margin-top: .57rem; }
.login-panel button { margin-top: .8rem; }
.form-error { color: var(--danger); margin-bottom: 1rem; }
@media (max-width: 44rem) {
  .layout { padding-top: 1.75rem; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .page-heading { flex-wrap: wrap; }
  th, td { padding: .65rem .75rem; }
}
