:root {
  --paper: #f3f4f6;
  --ink: #111111;
  --panel: #ffffff;
  --panel-soft: #0a0a0a;
  --line: #e5e7eb;
  --signal: #ff002f;
  --lime: #16a34a;
  --blue: #2563eb;
  --muted: #6b7280;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 0, 47, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 54%, #f3f4f6 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.frame {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-main,
.hero-side,
.panel,
.auth-card {
  border-radius: 28px;
  padding: 24px;
}

.hero-main {
  background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
  border-color: #111111;
  color: #ffffff;
}

.hero-side,
.panel {
  background: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 19, 21, 0.08);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--signal);
  box-shadow: 0 0 0 6px rgba(255, 0, 47, 0.12);
}

.dot.ok {
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.title {
  margin: 18px 0 10px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.75;
}

.stats-grid,
.info-grid,
.caps-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.info-grid,
.caps-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat,
.cap-card {
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.stat-label,
.section-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-value {
  margin-top: 10px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.stat-note,
.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.mono-card {
  padding: 16px;
  border-radius: 18px;
  background: #111111;
  color: var(--white);
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}

.kpi-list {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #ffffff;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px dashed rgba(17, 19, 21, 0.12);
  vertical-align: top;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: #f3f4f6;
}

.pill.ok {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.pill.warn {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.pill.info {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.empty {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed #d1d5db;
  color: var(--muted);
  background: #f9fafb;
}

.kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(17, 19, 21, 0.12);
}

.kpi-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
}

.badge.accent {
  background: rgba(255, 0, 47, 0.1);
  color: #be123c;
}

.auth-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(720px, 100%);
  background: #ffffff;
}

.auth-card h1 {
  margin: 18px 0 10px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.75;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--white);
  background: var(--signal);
  font: inherit;
  font-weight: 600;
}

@media (max-width: 1040px) {
  .hero,
  .stats-grid,
  .info-grid,
  .caps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 16px;
  }

  .hero-main,
  .hero-side,
  .panel,
  .auth-card {
    border-radius: 24px;
    padding: 18px;
  }
}
