:root {
  --bg: #f4efe3;
  --bg-accent: #eadfcb;
  --panel: rgba(255, 253, 248, 0.9);
  --panel-strong: #fffaf1;
  --ink: #18212c;
  --muted: #5d6774;
  --line: rgba(24, 33, 44, 0.12);
  --brand: #9a4d1d;
  --brand-deep: #6f3510;
  --accent: #0d7c74;
  --shadow: 0 24px 60px rgba(24, 33, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(154, 77, 29, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(13, 124, 116, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f2e8 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 33, 44, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 44, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 28px;
  align-items: stretch;
}

body.authenticated .hero {
  display: none;
}

.hero-copy,
.login-card,
.panel,
.metric-card,
.section-footer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-copy {
  padding: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2 {
  font-family: "Source Serif 4", serif;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  max-width: 12ch;
}

.lede {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(24, 33, 44, 0.06);
  color: var(--ink);
  font-size: 0.92rem;
}

.login-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 124, 116, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.card-copy,
.subtle-note,
.panel-copy {
  color: var(--muted);
  line-height: 1.65;
}

#login-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

.field span {
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(24, 33, 44, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(154, 77, 29, 0.18);
  border-color: var(--brand);
}

.primary-button,
.secondary-button {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 16px 32px rgba(111, 53, 16, 0.28);
}

.secondary-button {
  background: rgba(24, 33, 44, 0.06);
  color: var(--ink);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.login-error {
  min-height: 1.2rem;
  margin: 0;
  color: #b33425;
  font-size: 0.92rem;
}

.dashboard {
  margin-top: 28px;
  scroll-margin-top: 24px;
}

.hidden {
  display: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.metric-grid,
.content-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.panel,
.section-footer {
  padding: 24px;
}

.metric-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 1.15rem;
}

.metric-card p,
.metric-label {
  margin: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.panel-header {
  margin-bottom: 18px;
}

.timeline,
.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.timeline li,
.bullet-list li {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(24, 33, 44, 0.045);
}

.timeline strong {
  display: block;
  margin-bottom: 6px;
}

.timeline span {
  color: var(--muted);
}

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(13, 124, 116, 0.1);
  color: var(--accent);
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

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

.review-table th,
.review-table td {
  text-align: left;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.review-table th {
  width: 38%;
  color: var(--muted);
  font-weight: 500;
}

.section-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.support-line {
  margin: 6px 0 0;
  color: var(--muted);
}

@media (max-width: 1040px) {
  .hero,
  .metric-grid,
  .content-grid,
  .section-footer {
    grid-template-columns: 1fr;
  }

  .section-footer {
    display: grid;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
    padding-bottom: 36px;
  }

  .hero-copy,
  .login-card,
  .panel,
  .metric-card,
  .section-footer {
    padding: 22px;
    border-radius: 22px;
  }

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