:root {
  --navy: #07172c;
  --ink: #10243d;
  --blue: #195780;
  --orange: #ff6534;
  --orange-dark: #d94c24;
  --mint: #5dd6a7;
  --cream: #f8faf7;
  --line: rgba(255, 255, 255, .14);
  --muted: rgba(255, 255, 255, .68);
  --panel: rgba(255, 255, 255, .075);
  --panel-strong: rgba(255, 255, 255, .11);
  --shadow: 0 24px 70px rgba(4, 12, 24, .32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: white;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 101, 52, .18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(93, 214, 167, .12), transparent 26%),
    var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 23, 44, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 950;
  letter-spacing: .02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--orange);
  color: white;
  font-weight: 950;
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav a,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: white;
  background: rgba(255, 255, 255, .05);
  font: inherit;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
}

.button.primary,
button.primary {
  border: 0;
  background: var(--orange);
  box-shadow: 0 14px 35px rgba(255, 101, 52, .24);
}

.button.primary:hover,
button.primary:hover {
  background: var(--orange-dark);
}

.content {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 0;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.kicker {
  color: var(--orange);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 74px);
  line-height: .96;
}

h2 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 44px);
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

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

.stat,
.panel,
.login-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat {
  padding: 18px;
}

.stat strong {
  display: block;
  color: var(--mint);
  font-size: 34px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: rgba(255, 255, 255, .9);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: white;
  background: rgba(255, 255, 255, .11);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.badge.new { background: var(--orange); }
.badge.intake_received { background: var(--mint); color: var(--navy); }

.grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(340px, .54fr);
  gap: 18px;
  align-items: start;
}

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

.detail {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
}

.detail span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  overflow-wrap: anywhere;
}

form {
  display: grid;
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  padding: 12px 13px;
  color: white;
  background: rgba(255, 255, 255, .08);
  font: inherit;
  outline: none;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--mint);
}

.login-card {
  width: min(460px, 100%);
  padding: 28px;
}

.alert {
  padding: 13px 14px;
  border: 1px solid rgba(255, 101, 52, .44);
  background: rgba(255, 101, 52, .12);
  color: white;
}

.success {
  border-color: rgba(93, 214, 167, .44);
  background: rgba(93, 214, 167, .12);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
}

.copy-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(93, 214, 167, .45);
  color: var(--mint);
  background: rgba(93, 214, 167, .08);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .hero-row,
  .grid,
  .stats,
  .detail-list,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
