:root {
  --paper: #f2e8d6;
  --sand: #dbc8a4;
  --ink: #111315;
  --panel: #1d2128;
  --panel-soft: #252a33;
  --line: rgba(34, 37, 42, 0.18);
  --signal: #ff7147;
  --lime: #97d962;
  --blue: #7ea4ff;
  --muted: #6f675b;
  --white: #fffdf7;
  --shadow: 0 24px 80px rgba(14, 16, 19, 0.18);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 113, 71, 0.16), transparent 28%),
    linear-gradient(180deg, #f7efe0 0%, #efe2ca 100%);
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

body {
  position: relative;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 19, 21, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 21, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 70%, transparent 100%);
}

.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: rgba(255, 253, 247, 0.84);
  backdrop-filter: blur(16px);
  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(140deg, rgba(255, 253, 247, 0.92), rgba(255, 239, 214, 0.92));
}

.hero-side,
.panel {
  background: rgba(255, 253, 247, 0.76);
}

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

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

.dot.ok {
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(151, 217, 98, 0.15);
}

.title {
  margin: 18px 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  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: rgba(17, 19, 21, 0.04);
  border: 1px solid rgba(17, 19, 21, 0.07);
}

.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-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.mono-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--panel);
  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 rgba(17, 19, 21, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: rgba(255, 253, 247, 0.65);
}

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: rgba(242, 232, 214, 0.95);
  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: rgba(17, 19, 21, 0.08);
}

.pill.ok {
  background: rgba(151, 217, 98, 0.18);
  color: #385816;
}

.pill.warn {
  background: rgba(255, 113, 71, 0.14);
  color: #8b2f14;
}

.pill.info {
  background: rgba(126, 164, 255, 0.16);
  color: #26407f;
}

.empty {
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(17, 19, 21, 0.16);
  color: var(--muted);
}

.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: rgba(17, 19, 21, 0.06);
  font-size: 12px;
}

.badge.accent {
  background: rgba(255, 113, 71, 0.14);
  color: #8b2f14;
}

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

.auth-card {
  width: min(720px, 100%);
  background: linear-gradient(145deg, rgba(255, 253, 247, 0.92), rgba(238, 225, 199, 0.92));
}

.auth-card h1 {
  margin: 18px 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.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(--ink);
  font: inherit;
}

@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;
  }
}
