:root {
  --bg: #f5efe4;
  --bg-accent: #e7dcc7;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffaf2;
  --border: rgba(40, 55, 46, 0.14);
  --text: #1f2a24;
  --muted: #5e675f;
  --primary: #264d3b;
  --primary-strong: #183326;
  --highlight: #c46039;
  --success: #dbe8da;
  --success-text: #1e4d2d;
  --error: #f3d7d1;
  --error-text: #7a2617;
  --shadow: 0 20px 45px rgba(31, 42, 36, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(196, 96, 57, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(38, 77, 59, 0.15), transparent 35%),
    linear-gradient(135deg, var(--bg), var(--bg-accent));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(38, 77, 59, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 77, 59, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 90%);
}

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

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.site-header h1,
.panel h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

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

.page-content {
  display: grid;
  gap: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(16px);
}

.panel-copy,
.empty-state,
.inline-note,
.export-list span,
.flash,
label span,
.stat-label {
  color: var(--muted);
}

.hero-grid,
.dashboard-grid,
.result-grid,
.login-layout {
  display: grid;
  gap: 22px;
}

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

.hero-panel {
  min-height: 180px;
}

.credentials-panel,
.exports-panel,
.breakup-panel {
  background: var(--panel-strong);
}

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

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.flash-success {
  background: var(--success);
  color: var(--success-text);
}

.flash-error {
  background: var(--error);
  color: var(--error-text);
}

.stack-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(38, 77, 59, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid rgba(196, 96, 57, 0.35);
  outline-offset: 2px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff8f0;
  box-shadow: 0 12px 24px rgba(24, 51, 38, 0.22);
  padding: 0 22px;
}

.ghost-button {
  border: 1px solid rgba(38, 77, 59, 0.18);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  padding: 0 18px;
}

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

.inline-button {
  margin-top: 20px;
}

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

.summary-grid {
  margin-top: 18px;
}

.stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feature-list,
.description-list,
.export-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list,
.description-list {
  display: grid;
  gap: 12px;
}

.feature-list li,
.description-list li {
  padding-left: 18px;
  position: relative;
}

.feature-list li::before,
.description-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--highlight);
}

.export-list {
  display: grid;
  gap: 14px;
}

.export-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(38, 77, 59, 0.1);
}

.export-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.export-list strong {
  display: block;
  margin-bottom: 4px;
}

.inline-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(196, 96, 57, 0.09);
  border: 1px solid rgba(196, 96, 57, 0.16);
}

.login-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.login-panel {
  padding-top: 28px;
  min-height: 420px;
}

.file-field input[type="file"] {
  padding: 12px;
}

@media (max-width: 900px) {
  .hero-grid,
  .dashboard-grid,
  .result-grid,
  .login-layout,
  .stat-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

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

  .export-list li {
    flex-direction: column;
    align-items: flex-start;
  }
}
