@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=Playfair+Display:wght@500;600&display=swap");

:root {
  --bg: #f7f1ea;
  --ink: #121212;
  --muted: #5d6570;
  --accent: #1f3d2f;
  --accent-soft: #e3efe8;
  --card: #ffffff;
  --stroke: #e4d7c8;
  --shadow: 0 18px 40px rgba(26, 24, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  margin: 0 0 12px 0;
}

p {
  margin: 0;
  line-height: 1.6;
}

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

.bg-orb {
  position: absolute;
  border-radius: 999px;
  z-index: 0;
  opacity: 0.32;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at top, #f6d6c1, transparent 70%);
  top: -120px;
  right: -120px;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at top, #b0d4c8, transparent 70%);
  bottom: -160px;
  left: -160px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  backdrop-filter: blur(6px);
  background: rgba(247, 241, 234, 0.9);
  border-bottom: 1px solid rgba(228, 215, 200, 0.6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

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

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav a.active,
.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 18px 72px;
}

.hero,
.result-hero {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 18px;
}

.hero-actions,
.result-actions {
  display: grid;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 61, 47, 0.28);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.stat-card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.stat-title {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
}

.stat-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  margin-top: 28px;
  background: var(--card);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

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

.panel-header p {
  color: var(--muted);
}

.panel-body {
  display: grid;
  gap: 18px;
}

.panel-footer {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.dropzone {
  border: 2px dashed var(--stroke);
  border-radius: 18px;
  padding: 24px 18px;
  text-align: center;
  background: #faf5ee;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
}

.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}

.dropzone-title {
  font-size: 15px;
  margin-bottom: 6px;
  font-weight: 600;
}

.dropzone-desc {
  font-size: 12px;
  color: var(--muted);
}

.preview {
  border-radius: 18px;
  background: #fdfaf6;
  border: 1px solid var(--stroke);
  min-height: 220px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.preview.has-image img {
  display: block;
}

.preview-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 0 12px;
}

.status {
  color: var(--muted);
  font-size: 13px;
}

.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.flow-step {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: #fbf6f0;
}

.result-layout {
  display: grid;
  gap: 18px;
}

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

.table-card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.table-card th,
.table-card td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  font-size: 13px;
}

.table-card th {
  color: var(--muted);
  font-weight: 500;
}

.note-card {
  background: #f9f2ea;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--stroke);
}

.note-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.note-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.note-card li::before {
  content: "• ";
  color: var(--accent);
  font-weight: 600;
}

.footer {
  text-align: center;
  padding: 26px 16px 44px;
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 780px) {
  .topbar {
    position: relative;
    padding: 24px 48px 0;
    background: transparent;
    border-bottom: none;
  }

  .container {
    padding: 36px 24px 90px;
  }

  .hero,
  .result-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: center;
  }

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

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

  .panel-footer {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

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

  .result-layout {
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr);
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .container {
    max-width: 1100px;
  }

  .btn {
    border-radius: 999px;
  }
}
