:root {
  --bg: #efe7db;
  --bg-accent: #d8ebdf;
  --ink: #142029;
  --muted: #5b6a6f;
  --panel: rgba(255, 252, 247, 0.92);
  --stroke: rgba(20, 32, 41, 0.1);
  --gold: #ad7a27;
  --green: #1d6a5c;
  --green-deep: #174a41;
  --rose: #8a4a44;
  --shadow: 0 20px 50px rgba(20, 32, 41, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 32%),
    radial-gradient(circle at bottom right, rgba(29, 106, 92, 0.18), transparent 26%),
    linear-gradient(135deg, var(--bg) 0%, #f8f3eb 45%, var(--bg-accent) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 28px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-kicker,
.eyebrow,
.panel-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--muted);
}

.header-meta span {
  color: var(--ink);
  font-weight: 700;
}

.content-shell {
  display: grid;
  gap: 24px;
}

.hero-card,
.panel {
  border: 1px solid var(--stroke);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -70px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(173, 122, 39, 0.26) 0%, rgba(173, 122, 39, 0) 70%);
}

.hero-card-login {
  grid-template-columns: 1.2fr 0.9fr;
}

.hero-card-dashboard {
  grid-template-columns: 1.35fr 0.75fr;
}

.hero-copy h1,
.panel-heading h1,
.panel-heading h2,
.strategy-callout h2 {
  margin: 8px 0 12px;
  font-family: "Fraunces", serif;
  line-height: 1.02;
}

.hero-copy h1,
.panel-heading h1 {
  font-size: clamp(2.3rem, 4vw, 4rem);
}

.panel-heading h2,
.strategy-callout h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

.lede,
.panel-heading p,
.strategy-callout p,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.hero-points,
.summary-grid,
.stats-grid,
.mapping-summary,
.download-grid {
  display: grid;
  gap: 14px;
}

.hero-points {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.hero-points span,
.mapping-chip,
.status-pill,
.inline-note,
.stat-card,
.download-card {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.66);
  border-radius: 18px;
}

.hero-points span,
.mapping-chip {
  padding: 14px 16px;
  font-weight: 700;
}

.panel {
  padding: 28px;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.stack-form,
.upload-form,
.mapping-layout {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input[type="email"],
select,
input[type="file"] {
  width: 100%;
}

input[type="email"],
select {
  appearance: none;
  border: 1px solid rgba(20, 32, 41, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.button {
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--stroke);
}

.inline-note {
  padding: 14px 16px;
  line-height: 1.6;
}

.success-note {
  color: var(--green-deep);
}

.warning-note {
  color: var(--rose);
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.88);
}

.flash-error {
  color: #7d1f2f;
}

.flash-success {
  color: var(--green-deep);
}

.flash-warning {
  color: #7c5a1b;
}

.stats-grid,
.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.stat-number {
  font-family: "Fraunces", serif;
  font-size: 2.15rem;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
}

.dropzone {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(20, 32, 41, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.dropzone input[type="file"] {
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.85);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(20, 32, 41, 0.08);
  font-size: 0.96rem;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.text-link {
  color: var(--green-deep);
  font-weight: 800;
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-completed {
  color: var(--green-deep);
}

.status-failed {
  color: #842b35;
}

.status-uploaded,
.status-processing {
  color: #7c5a1b;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.inset-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.strategy-callout {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(173, 122, 39, 0.14), rgba(29, 106, 92, 0.12));
  border: 1px solid rgba(20, 32, 41, 0.08);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.download-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 24px 0;
}

.download-card {
  padding: 18px;
  display: grid;
  gap: 8px;
  text-decoration: none;
}

.download-card strong {
  font-size: 1.05rem;
}

.download-card span,
.error-copy {
  color: var(--muted);
  line-height: 1.6;
}

.mapping-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mapping-chip {
  display: grid;
  gap: 4px;
}

.mapping-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

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

  .hero-card-login,
  .hero-card-dashboard {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .form-actions {
    width: 100%;
  }

  .header-meta {
    align-items: flex-start;
  }

  .hero-points {
    grid-template-columns: 1fr;
  }

  .button,
  .button-secondary {
    width: 100%;
  }
}
