:root {
  color-scheme: dark;
  --bg: #0c100e;
  --panel: #151c18;
  --panel-2: #1b2520;
  --line: #2a3730;
  --text: #f1f5f2;
  --muted: #92a198;
  --green: #59d68c;
  --amber: #f2be5c;
  --red: #ff756d;
  --blue: #70b7ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(72, 124, 92, .22), transparent 34rem),
    linear-gradient(180deg, #101713 0%, var(--bg) 48%);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 20px; }
.subtitle { margin-bottom: 0; color: var(--muted); }

.connection {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 28, 24, .84);
  color: var(--muted);
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(242, 190, 92, .12);
}
.connection.online .pulse { background: var(--green); box-shadow: 0 0 0 5px rgba(89, 214, 140, .12); }
.connection.offline .pulse { background: var(--red); box-shadow: 0 0 0 5px rgba(255, 117, 109, .12); }

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}

.summary article, .account, .events {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(27, 37, 32, .96), rgba(18, 25, 21, .96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
}

.summary article { padding: 17px 18px; }
.summary span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.summary strong { font-size: 18px; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 13px;
}
.section-title span { color: var(--muted); font-size: 12px; }

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}

.account { overflow: hidden; }
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 13px;
  border-bottom: 1px solid var(--line);
}
.account-head h3 { margin: 0; font-size: 21px; }
.badge {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(112, 183, 255, .1);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.badge.error { background: rgba(255, 117, 109, .1); color: var(--red); }

.account-body { padding: 16px 18px 18px; }
.stage { margin-bottom: 16px; color: var(--green); font-size: 15px; font-weight: 750; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.fact strong { font-size: 14px; }
.error-message {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 117, 109, .09);
  color: #ffaaa5;
  font-size: 12px;
  line-height: 1.4;
}

.events { overflow: hidden; }
.event {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.event:last-child { border-bottom: 0; }
.event time, .event-context { color: var(--muted); font-size: 11px; }
.event-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.empty { padding: 28px; color: var(--muted); text-align: center; }

@media (max-width: 820px) {
  .shell { width: min(100% - 22px, 680px); padding-top: 24px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .summary { grid-template-columns: 1fr 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .summary { gap: 8px; }
  .summary article { padding: 14px; }
  .event { grid-template-columns: 62px minmax(0, 1fr); }
  .event-context { display: none; }
}
