:root {
  --bg: #061012;
  --panel: #121f24;
  --panel-2: #172329;
  --ink: #f6faf8;
  --muted: #91a2a5;
  --line: rgba(255, 255, 255, 0.11);
  --orange: #ff6a2a;
  --green: #b7ff5a;
  --teal: #17d6c2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Open Sans", system-ui, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 16% 8%, rgba(92, 141, 255, 0.14), transparent 34rem),
    radial-gradient(circle at 90% 14%, rgba(255, 106, 42, 0.12), transparent 28rem),
    linear-gradient(180deg, #04090b 0%, var(--bg) 52%, #071112 100%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 56px) 64px;
}

.topbar,
.panel,
.auth-card,
.hero-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 35, 41, 0.94), rgba(9, 19, 22, 0.94));
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 16px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 42%, #111 42% 58%, transparent 58%),
    linear-gradient(180deg, var(--orange) 0 32%, var(--green) 32% 64%, var(--teal) 64%);
  box-shadow: 0 0 22px rgba(255, 106, 42, 0.45);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.topbar nav a {
  padding: 8px 10px;
  border-radius: 6px;
}

.topbar nav .nav-cta {
  color: #140805;
  background: var(--green);
}

.hero-card {
  padding: clamp(24px, 5vw, 44px);
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Montserrat", "Open Sans", system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 920px;
  font-size: clamp(42px, 7vw, 82px);
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

p {
  color: #c6d2d3;
}

.auth-card,
.panel {
  padding: clamp(22px, 4vw, 34px);
}

.auth-card {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.reports-panel,
.report-viewer {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050b0d;
  color: var(--ink);
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.mode-row,
.actions,
.report-actions,
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.facts {
  margin: 18px 0;
}

.facts span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

button,
.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}

.primary-btn {
  color: #160804;
  background: var(--orange);
}

.secondary-btn {
  color: #140805;
  background: var(--green);
}

.ghost-btn,
.mode-row button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.mode-row button {
  min-height: 36px;
  color: var(--muted);
}

.mode-row button[aria-pressed="true"] {
  color: #140805;
  background: var(--green);
}

.status-line {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--green);
  font-weight: 800;
}

.status-line.error {
  color: #ff8f3f;
}

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

#report-search {
  max-width: 320px;
}

.reports-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(5, 11, 13, 0.56);
}

.report-card h3 {
  font-size: 20px;
}

.report-card p,
.report-card small {
  margin: 0;
  color: #aebdbf;
}

.report-actions {
  align-self: end;
}

.report-viewer pre {
  max-height: 68vh;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: #dce7e5;
  background: #050b0d;
  white-space: pre-wrap;
  font: 600 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 920px) {
  .dashboard-grid,
  .form-grid,
  .reports-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .report-head {
    align-items: stretch;
    flex-direction: column;
  }

  #report-search {
    max-width: none;
  }
}
