:root {
  --bg: #08111f;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.22);
  --text: #e5f0ff;
  --muted: #93a4b8;
  --blue: #38bdf8;
  --blue2: #2563eb;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.20), transparent 32%),
    radial-gradient(circle at 85% 0%, rgba(34, 197, 94, 0.14), transparent 30%),
    linear-gradient(145deg, #08111f 0%, #0f172a 55%, #111827 100%);
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.36;
  z-index: -1;
}
.bg-orb-one { background: #0ea5e9; left: -180px; top: 120px; }
.bg-orb-two { background: #22c55e; right: -200px; bottom: 40px; }

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

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  border-radius: 34px;
  padding: 28px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
}

.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(56,189,248,.98), rgba(37,99,235,.88));
  font-size: 30px;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.32);
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 6px;
  font-weight: 800;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(34px, 6vw, 58px); letter-spacing: -0.06em; }
h2 { margin-bottom: 0; font-size: 24px; letter-spacing: -0.035em; }
h3 { font-size: 16px; margin-bottom: 8px; }
.hero-copy { color: var(--muted); max-width: 620px; line-height: 1.6; margin: 16px 0 0 74px; }

.status-strip {
  min-width: 280px;
  padding: 13px 15px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.grid-layout {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 18px;
  align-items: start;
}
.panel {
  border-radius: 30px;
  padding: 22px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.align-start { align-items: flex-start; }
.badge {
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  padding: 7px 10px;
  font-size: 12px;
  background: rgba(14, 165, 233, 0.12);
}
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.btn, .icon-btn {
  border: 0;
  border-radius: 15px;
  padding: 12px 15px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.85);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  font-weight: 800;
}
.btn-ghost { border: 1px solid rgba(148, 163, 184, 0.20); background: rgba(15, 23, 42, 0.52); }
.btn.small { padding: 8px 11px; font-size: 13px; }
.btn.full { width: 100%; margin-top: 14px; }
.icon-btn { width: 44px; height: 44px; padding: 0; font-size: 22px; }

.manual-card, .postcode-card {
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  padding: 16px;
}
.postcode-card { margin-top: 14px; color: var(--muted); }
label { display: block; color: #cbd5e1; font-size: 13px; font-weight: 700; margin: 12px 0 7px; }
input, select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  border-radius: 15px;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus { border-color: rgba(56, 189, 248, 0.74); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.10); }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.postcode-row { display: grid; grid-template-columns: 1fr 76px auto; gap: 8px; }

.summary-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.summary-card {
  min-height: 92px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.30);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.summary-card span { color: var(--muted); display: block; font-size: 13px; margin-bottom: 8px; }
.summary-card strong { font-size: clamp(20px, 3vw, 30px); letter-spacing: -0.04em; }
.primary-summary {
  background: linear-gradient(135deg, rgba(14,165,233,0.26), rgba(37,99,235,0.20));
  border-color: rgba(56,189,248,0.26);
}
.chart-wrap {
  background: rgba(2, 6, 23, 0.30);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  padding: 14px;
  min-height: 250px;
}
canvas { width: 100%; height: auto; display: block; }
.timeline {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.time-pill {
  border-radius: 14px;
  padding: 9px 8px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
  font-size: 12px;
  color: #cbd5e1;
}
.time-pill strong { display: block; color: #f8fafc; font-size: 13px; margin-bottom: 3px; }
.source-note { margin-top: 14px; color: var(--muted); font-size: 13px; }
.warnings-panel { margin-top: 18px; }
.warnings-list { display: grid; gap: 10px; }
.warning-item {
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.28);
}
.warning-item strong { display: block; margin-bottom: 4px; }
.warning-item p { margin: 0; color: var(--muted); line-height: 1.45; }
.empty-state { color: var(--muted); padding: 18px; border-radius: 18px; background: rgba(2, 6, 23, 0.22); }

@media (max-width: 920px) {
  .hero-card, .grid-layout { grid-template-columns: 1fr; }
  .hero-copy { margin-left: 0; }
  .status-strip { min-width: 0; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .app-shell { width: min(100% - 18px, 1180px); padding-top: 12px; }
  .hero-card, .panel { border-radius: 24px; padding: 17px; }
  .quick-actions, .two-cols, .summary-grid, .postcode-row { grid-template-columns: 1fr; }
  .brand-mark { width: 48px; height: 48px; border-radius: 17px; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
}
