:root {
  --bg: #050505;
  --panel: #101010;
  --panel-2: #171717;
  --text: #f6f6f6;
  --muted: #bdbdbd;
  --red: #d71726;
  --red-bright: #ff3040;
  --border: #343434;
  --good: #4ed27b;
  --warn: #ffca5c;
  --bad: #ff5d68;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% -10%, rgba(215, 23, 38, 0.22), transparent 38rem),
    linear-gradient(180deg, #090909 0%, var(--bg) 50%);
  color: var(--text);
}
button { font: inherit; }

.page-shell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
}

.sample-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -16px -14px 12px;
  padding: 8px 12px;
  background: var(--warn);
  color: #151515;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.hero { text-align: center; padding: 18px 8px 22px; }
.diamonds { color: var(--red-bright); letter-spacing: 0.75rem; font-size: 1.1rem; }
.greeting { margin: 10px 0 4px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.16em; }
h1 { margin: 0; font-size: clamp(1.55rem, 7vw, 2.65rem); line-height: 1.05; }
.byline { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
.online-pill {
  display: inline-block;
  margin: 13px 0 0;
  border: 1px solid rgba(78, 210, 123, 0.45);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--good);
  background: rgba(78, 210, 123, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
}

main { display: grid; gap: 14px; }
.panel {
  background: linear-gradient(180deg, rgba(23, 23, 23, 0.97), rgba(13, 13, 13, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}
.panel h2 { margin: 0 0 14px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.state-panel { text-align: center; padding: 42px 20px; }
.error-panel { border-color: rgba(255, 93, 104, 0.5); }
.error-panel button {
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--red);
  color: white;
  font-weight: 900;
  cursor: pointer;
}
.warning-symbol {
  width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,93,104,.13); color: var(--bad); font-weight: 1000; font-size: 1.5rem;
}
.spinner {
  width: 38px; height: 38px; margin: 0 auto 16px; border: 4px solid #2e2e2e;
  border-top-color: var(--red-bright); border-radius: 50%; animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.balance-panel { text-align: center; border-color: rgba(215, 23, 38, 0.55); }
.section-kicker { margin: 0; color: var(--muted); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.18em; }
.balance-value { margin: 7px 0 1px; font-size: clamp(2.7rem, 13vw, 5.2rem); line-height: 1; font-weight: 1000; letter-spacing: -0.045em; }
.snapshot-time { margin: 9px 0 0; color: var(--muted); font-size: 0.78rem; }

.member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.member-card {
  min-width: 0; padding: 14px 12px; border: 1px solid #303030; border-radius: 14px;
  background: rgba(255,255,255,.025);
}
.member-card h3 { margin: 0 0 5px; color: white; font-size: 1.05rem; overflow-wrap: anywhere; }
.member-role { color: var(--muted); font-size: .78rem; min-height: 2.1em; }
.status-badge {
  display: inline-block; margin-top: 10px; padding: 5px 8px; border-radius: 999px;
  font-size: .68rem; font-weight: 1000; letter-spacing: .04em;
}
.status-current, .status-paid, .status-loa { color: var(--good); background: rgba(78,210,123,.11); }
.status-attention { color: var(--bad); background: rgba(255,93,104,.12); }
.status-prospect { color: var(--warn); background: rgba(255,202,92,.12); }
.next-due { margin-top: 8px; color: var(--muted); font-size: .72rem; }

.split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.status-list, .news-list { display: grid; gap: 9px; }
.status-row, .obligation-card, .news-card, .deduction-card, .metric-card {
  border: 1px solid #2f2f2f; border-radius: 13px; background: rgba(255,255,255,.022); padding: 13px;
}
.status-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.status-row strong { overflow-wrap: anywhere; }
.empty-state { color: var(--muted); font-size: .9rem; }

.obligation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.obligation-card h3, .news-card h3 { margin: 0 0 6px; font-size: .92rem; }
.obligation-card p, .news-card p, .deduction-card p, .metric-card p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.obligation-status { color: white !important; font-weight: 900; }
.news-meta { color: var(--red-bright) !important; font-size: .7rem !important; text-transform: uppercase; letter-spacing: .06em; }
.metric-value { font-size: 1.7rem; font-weight: 1000; margin: 0; }

footer { padding: 24px 10px 4px; text-align: center; color: var(--muted); }
footer p { margin: 5px 0; }
#motto { color: white; font-weight: 900; font-size: .88rem; }
.footer-note { font-size: .7rem; line-height: 1.4; }

@media (max-width: 520px) {
  .split-grid { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
