/* Treasury dashboard — inherits palette from styles.css */

.treasury-body { background: var(--bg); }

.nav-static {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.75));
  backdrop-filter: blur(6px);
}
.nav-links a.active { color: #fff; font-weight: 700; }

.chain-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.chain-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #666;
  flex: none;
}
.chain-pill .dot.ok   { background: #46d369; box-shadow: 0 0 8px #46d369; }
.chain-pill .dot.bad  { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.tre {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.tre-head h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 7vw, 68px);
  letter-spacing: 1px;
  line-height: 1;
}
.tre-sub {
  color: var(--text-dim);
  margin-top: 10px;
  max-width: 62ch;
  line-height: 1.55;
}
.tre-sub strong { color: #fff; }

/* ---------- setup state ---------- */
.setup {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid rgba(229,9,20,.35);
  background: rgba(229,9,20,.06);
  border-radius: 6px;
}
.setup h2 { font-size: 20px; margin-bottom: 10px; }
.setup p { color: var(--text-dim); line-height: 1.6; }
.setup code {
  background: rgba(255,255,255,.09);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
}
.setup-list { margin: 16px 0 0 18px; color: var(--text-dim); line-height: 1.9; }

/* ---------- stat tiles ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.stat {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
  padding: 20px;
  min-width: 0;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-dim);
}
.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  line-height: 1.1;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.stat-note { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ---------- panels ---------- */
.panel { margin-top: 44px; }
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 20px; }
.panel-note { font-size: 12px; color: var(--text-dim); }

.loading, .empty { color: var(--text-dim); padding: 24px 0; font-size: 14px; }

/* ---------- distribution rounds ---------- */
.round {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.round-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  flex-wrap: wrap;
}
.round-head:hover { background: rgba(255,255,255,.03); }
.round-when { font-size: 14px; flex: 1 1 190px; min-width: 0; }
.round-when small { display: block; color: var(--text-dim); font-size: 12px; margin-top: 2px; }
.round-amt {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: #fff;
  white-space: nowrap;
}
.round-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.round-caret { color: var(--text-dim); font-size: 12px; }

.round-body {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 6px 0;
}
.batch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  font-size: 13px;
  flex-wrap: wrap;
}
.batch + .batch { border-top: 1px solid rgba(255,255,255,.045); }
.batch-idx {
  color: var(--text-dim);
  font-size: 11px;
  min-width: 68px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.batch-tx {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: #7ab8ff;
  overflow-wrap: anywhere;
}
.batch-tx:hover { text-decoration: underline; }
.batch-n { color: var(--text-dim); font-size: 12px; margin-left: auto; white-space: nowrap; }

/* ---------- address table ---------- */
.addr-table { width: 100%; border-collapse: collapse; }
.addr-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
  vertical-align: top;
}
.addr-table td:first-child {
  color: var(--text-dim);
  width: 190px;
  padding-right: 16px;
}
.addr-table a {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #7ab8ff;
  overflow-wrap: anywhere;
}
.addr-table a:hover { text-decoration: underline; }

.err {
  margin-top: 32px;
  padding: 18px;
  border: 1px solid rgba(229,9,20,.4);
  background: rgba(229,9,20,.08);
  border-radius: 6px;
  color: #ffb4b4;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 620px) {
  .tre { padding: 32px 16px 60px; }
  .addr-table td:first-child { width: 120px; }
  .round-amt { font-size: 20px; }
}

/* ---- preview mode ---------------------------------------------------- */

/* Loud on purpose. This is a financial dashboard, and sample figures that
   read as real balances are the one genuinely misleading thing on it. */
.preview-banner {
  margin: 0 0 26px;
  padding: 13px 18px;
  border: 1px solid rgba(229, 160, 9, 0.5);
  border-left: 4px solid #e5a009;
  border-radius: 6px;
  background: rgba(229, 160, 9, 0.09);
  color: #e8d9b5;
  font-size: 13.5px;
  line-height: 1.55;
}
.preview-banner strong { color: #ffc93c; }
.preview-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: #fff;
}
.dot.preview { background: #e5a009; box-shadow: 0 0 8px rgba(229,160,9,0.8); }

.tag {
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(229, 160, 9, 0.18);
  color: #e5a009;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.addr-muted { color: #6f6f6f; }

/* ---- wallet lookup --------------------------------------------------- */

.wallet-form {
  display: flex;
  gap: 10px;
  padding: 4px 0 16px;
}
.wallet-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.45);
  color: #e5e5e5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.wallet-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
}
.wallet-input::placeholder { color: #6f6f6f; }
.wallet-form .btn { flex: 0 0 auto; }
.wallet-form .btn:disabled { opacity: 0.55; cursor: default; }

.wallet-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}
.wallet-summary .stat-value { font-size: 30px; }
.wallet-addr { text-align: right; }

.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tx-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tx-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #d5d5d5;
}
.tx-table td small { color: #6f6f6f; margin-left: 6px; }
.tx-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

@media (max-width: 620px) {
  .wallet-form { flex-direction: column; }
  .wallet-addr { text-align: left; }
}

/* ---- schedule countdowns --------------------------------------------- */

.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  padding: 4px 0 4px;
}
.sched {
  padding: 16px 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.sched-label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.sched-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 38px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #fff;
  letter-spacing: -0.01em;
}
.sched-bar {
  margin: 11px 0 8px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
/* No transition: the bar is redrawn every second, and easing between two
   one-second-apart widths just makes it look laggy. */
.sched-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--red, #e50914);
}
.sched-note {
  font-size: 12.5px;
  color: var(--text-dim);
}
