:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top right, #ccfbf1 0, transparent 32rem), #f8fafc; }
.shell { width: min(1180px, calc(100vw - 32px)); margin: 0 auto; padding: 32px 0 56px; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: #0d9488; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.05em; line-height: .95; }
h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.subcopy { max-width: 660px; color: #475569; line-height: 1.6; font-weight: 500; }
.card { background: rgba(255,255,255,.92); border: 1px solid #e2e8f0; box-shadow: 0 12px 35px rgba(15,23,42,.06); border-radius: 24px; padding: 22px; }
.status-card { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e2e8f0; padding: 12px 16px; border-radius: 999px; color: #475569; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: #ef4444; display: inline-block; }
.dot.ok { background: #14b8a6; box-shadow: 0 0 0 5px #ccfbf1; }
.access-card { max-width: 520px; }
.access-card p { color: #64748b; }
.access-form { display: flex; gap: 10px; margin-top: 18px; }
input, select, button { font: inherit; }
input, select { width: 100%; border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 14px; padding: 12px 14px; outline: none; }
input:focus, select:focus { border-color: #0d9488; box-shadow: 0 0 0 4px #ccfbf1; }
button { border: 0; border-radius: 14px; padding: 12px 18px; background: #0d9488; color: white; font-weight: 800; cursor: pointer; }
button:hover { background: #0f766e; }
.error { color: #be123c !important; font-weight: 700; }
.dashboard { display: grid; gap: 18px; }
.controls { display: grid; grid-template-columns: 1fr minmax(240px, 420px) auto; gap: 12px; align-items: end; }
.controls label { color: #475569; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 18px; }
.metric span { display: block; color: #64748b; font-size: 11px; text-transform: uppercase; font-weight: 900; letter-spacing: .12em; }
.metric strong { display: block; margin-top: 8px; color: #0f766e; font-size: 30px; letter-spacing: -0.04em; }
.report-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.muted { color: #64748b; line-height: 1.6; margin: 8px 0 0; }
.updated { color: #94a3b8; font-size: 12px; font-weight: 700; }
.chart { display: grid; gap: 10px; margin: 16px 0 24px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 220px) 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { color: #334155; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #14b8a6, #0d9488); min-width: 2px; }
.bar-value { color: #64748b; font-weight: 800; text-align: right; }
.table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
th { color: #475569; background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
tr:last-child td { border-bottom: 0; }
.sql-card pre { white-space: pre-wrap; color: #334155; background: #f8fafc; border: 1px solid #e2e8f0; padding: 16px; border-radius: 16px; overflow-x: auto; }
@media (max-width: 760px) {
  .hero, .report-header { flex-direction: column; }
  .controls, .summary-grid { grid-template-columns: 1fr; }
  .access-form { flex-direction: column; }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .bar-value { text-align: left; }
}
