:root {
  --bg: #f4efe6;
  --bg-deep: #f0d8b6;
  --paper: rgba(255, 250, 242, 0.94);
  --paper-strong: #fffaf2;
  --ink: #1f2a1f;
  --muted: #5f685c;
  --line: rgba(61, 74, 54, 0.14);
  --green: #2f6b3d;
  --green-dark: #214b2b;
  --gold: #d59f38;
  --gold-soft: #f6e2b7;
  --danger: #a84235;
  --shadow: 0 18px 50px rgba(62, 55, 31, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-display: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 241, 212, 0.95), transparent 34%),
    radial-gradient(circle at bottom right, rgba(199, 228, 182, 0.75), transparent 28%),
    linear-gradient(160deg, #f7f0e7 0%, #eef4e7 100%);
  font-family: var(--font-body);
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.bg-orb-a {
  top: -6rem;
  right: -4rem;
  background: rgba(213, 159, 56, 0.42);
}

.bg-orb-b {
  left: -8rem;
  bottom: -10rem;
  background: rgba(47, 107, 61, 0.28);
}

.site-header,
.content-wrap,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand img {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.main-nav a {
  text-decoration: none;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.75);
  transition: transform 0.18s ease, background 0.18s ease;
}

.main-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
}

.content-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 4rem;
}

.hero,
.panel,
.auth-card,
.status-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
  padding: 2rem;
  border-radius: var(--radius-xl);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--green-dark);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1,
.section-heading,
.panel h2,
.auth-card h1,
.auth-card h2,
.status-card h2 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.95;
}

.hero p,
.lead,
.panel p,
.auth-card p,
.note,
.site-footer {
  color: var(--muted);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.button,
button,
input[type="submit"] {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
}

.button-primary,
button,
input[type="submit"] {
  background: linear-gradient(135deg, var(--green) 0%, #4f8c45 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(47, 107, 61, 0.22);
}

.button-secondary {
  background: rgba(255, 250, 242, 0.92);
  color: var(--green-dark);
  border: 1px solid var(--line);
}

.hero-card-grid,
.info-grid,
.stats-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

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

.mini-card,
.stat,
.faq-item,
.list-card {
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.mini-card strong,
.stat strong {
  display: block;
  font-size: 1.65rem;
  margin-bottom: 0.3rem;
  color: var(--green-dark);
}

.section-stack {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.panel,
.auth-card,
.status-card {
  border-radius: var(--radius-xl);
  padding: 1.6rem;
}

.panel-alt {
  background: linear-gradient(180deg, rgba(255, 246, 230, 0.95), rgba(245, 251, 241, 0.93));
}

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

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

.section-heading {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.kpi {
  font-size: 2.5rem;
  color: var(--green-dark);
  font-family: var(--font-display);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

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

th,
td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(246, 226, 183, 0.28);
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(213, 159, 56, 0.18);
  color: var(--green-dark);
}

.badge.active {
  background: rgba(47, 107, 61, 0.15);
}

.badge.pending {
  background: rgba(213, 159, 56, 0.2);
}

.badge.danger {
  background: rgba(168, 66, 53, 0.15);
  color: var(--danger);
}

.auth-shell {
  max-width: 760px;
  margin: 0 auto;
}

.auth-card {
  max-width: 760px;
  margin: 0 auto;
}

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

.form-grid.full {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.94rem;
  color: var(--green-dark);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(47, 107, 61, 0.16);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.hint {
  font-size: 0.84rem;
  color: var(--muted);
}

.pwa-install-note {
  margin-top: 0.9rem;
}

.alert {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(47, 107, 61, 0.1);
  border-color: rgba(47, 107, 61, 0.15);
  color: var(--green-dark);
}

.alert-error {
  background: rgba(168, 66, 53, 0.08);
  border-color: rgba(168, 66, 53, 0.12);
  color: var(--danger);
}

.split {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1.15fr 0.85fr;
}

.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .hero,
  .split,
  .info-grid,
  .faq-grid,
  .stats-grid,
  .form-grid,
  .hero-card-grid {
    grid-template-columns: 1fr;
  }

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

  .main-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero,
  .panel,
  .auth-card,
  .status-card {
    padding: 1.25rem;
    border-radius: 22px;
  }

  .main-nav a,
  .button,
  button,
  input[type="submit"] {
    width: 100%;
    text-align: center;
  }

  .button-row,
  .hero-actions,
  .main-nav {
    width: 100%;
  }
}
