:root {
  --ink: #211713;
  --muted: #6f625b;
  --line: #eadfd6;
  --surface: #fffaf4;
  --soft: #f6eadc;
  --sand: #d8b16f;
  --clay: #b75b2d;
  --terracotta: #8f3924;
  --atlas: #12605a;
  --night: #1e2a27;
  --danger: #a8201a;
  --shadow: 0 20px 55px rgba(49, 29, 19, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffaf4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.form-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.92), rgba(255, 250, 244, 0.98)),
    url("https://images.unsplash.com/photo-1650709137023-399fe2326bd7?auto=format&fit=crop&w=1800&q=85") center / cover fixed;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 58px);
  background: rgba(255, 250, 244, 0.94);
  border-bottom: 1px solid rgba(234, 223, 214, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fffaf4;
  background: var(--terracotta);
  border-radius: 8px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 19px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
}

.nav a:hover {
  color: var(--terracotta);
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.language-picker select {
  width: auto;
  min-height: 38px;
  padding: 7px 30px 7px 10px;
}

.hero {
  min-height: 720px;
  display: flex;
  align-items: flex-end;
  padding: 138px clamp(18px, 6vw, 84px) 72px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(40, 20, 14, 0.9), rgba(76, 39, 21, 0.58), rgba(76, 39, 21, 0.12)),
    url("https://images.unsplash.com/photo-1650709137023-399fe2326bd7?auto=format&fit=crop&w=1900&q=85") center / cover;
}

.hero-content {
  width: min(820px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd38a;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3.15rem);
  line-height: 1.08;
}

h3 {
  margin: 0;
  font-size: 1.16rem;
}

.hero-copy {
  max-width: 680px;
  margin: 23px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border 160ms ease;
}

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

.button.primary {
  color: #fffaf4;
  background: var(--terracotta);
  box-shadow: 0 12px 30px rgba(143, 57, 36, 0.28);
}

.button.primary:hover {
  background: #702815;
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

.button.ghost {
  color: var(--terracotta);
  background: #fff5eb;
  border-color: var(--line);
  box-shadow: none;
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  color: #fffaf4;
  background: var(--night);
}

.intro-band div {
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 26px clamp(18px, 5vw, 74px);
  background: rgba(255, 255, 255, 0.03);
}

.intro-band strong {
  font-size: 1.35rem;
}

.intro-band span {
  color: #d9c9bc;
}

.section,
.private-area {
  padding: 76px clamp(18px, 6vw, 84px);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 28px;
}

.section-heading p,
.section-copy {
  color: var(--muted);
}

.earth {
  background: #f2e3d3;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.image-card,
.destination-card,
.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-card {
  overflow: hidden;
}

.image-card img {
  width: 100%;
  aspect-ratio: 1.35;
  display: block;
  object-fit: cover;
}

.image-card div,
.destination-card {
  padding: 18px;
}

.image-card p,
.destination-card p {
  color: var(--muted);
}

.destination-card {
  min-height: 170px;
}

.destination-card span {
  display: inline-block;
  margin-top: 8px;
  color: var(--atlas);
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
}

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

.form h3,
.form .full,
.feedback {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #44342b;
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #daccc1;
  border-radius: 8px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(143, 57, 36, 0.14);
}

input[readonly] {
  color: var(--atlas);
  background: #eef8f6;
  font-weight: 900;
}

.feedback {
  min-height: 22px;
  margin: 0;
  color: var(--atlas);
  font-weight: 850;
}

.feedback.error {
  color: var(--danger);
}

.private-area {
  background: #fff8ef;
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.login-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.login-form {
  display: flex;
  gap: 10px;
}

.login-form input {
  width: 150px;
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  gap: 18px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.month-control {
  min-width: 190px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 106px;
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-weight: 850;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
}

.metric.profit {
  border-color: rgba(18, 96, 90, 0.35);
  background: #edf8f5;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.ops-form {
  align-self: start;
}

.records-panel {
  padding: 20px;
  overflow: hidden;
}

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

.records-subtitle {
  margin-top: 24px;
  margin-bottom: 14px;
}

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

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  color: #5a463a;
  background: #f8efe5;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #2e211b;
  font-size: 0.94rem;
}

small {
  color: var(--muted);
}

.type-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--atlas);
  background: #ecf7f5;
  font-size: 0.78rem;
  font-weight: 900;
}

.delete-button {
  min-width: 34px;
  min-height: 34px;
  color: var(--danger);
  background: #fff5f3;
  border: 1px solid #f3c9c1;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.empty-state {
  margin: 16px 0 4px;
  color: var(--muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 26px clamp(18px, 6vw, 84px);
  color: #efdfce;
  background: #1b1511;
}

.embedded-form-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.embedded-form-header {
  display: grid;
  gap: 28px;
  padding: 18px 0 28px;
}

.embedded-form-header .brand {
  width: fit-content;
}

.embedded-form-header h1 {
  max-width: 860px;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--ink);
}

.embedded-form-header p:not(.eyebrow) {
  max-width: 690px;
  color: var(--muted);
}

.embedded-form-panel {
  overflow: hidden;
  min-height: 760px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.embedded-form-panel iframe {
  width: 100%;
  height: 840px;
  display: block;
  border: 0;
}

.form-fallback {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.form-fallback a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.van-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.van-card {
  width: min(760px, 100%);
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5vw, 46px);
  background: rgba(255, 250, 244, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.van-card h1 {
  max-width: 680px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4rem);
}

.van-card p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.van-button {
  min-height: 58px;
  width: fit-content;
  padding-inline: 24px;
}

@media (max-width: 1120px) {
  .metrics,
  .destination-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .nav {
    justify-content: start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 650px;
    padding-top: 108px;
  }

  .intro-band,
  .split,
  .workbench,
  .metrics,
  .destination-grid {
    grid-template-columns: 1fr;
  }

  .login-panel,
  .dashboard-header {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .card-grid,
  .form {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .login-form,
  .records-header {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .embedded-form-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 14px;
  }

  .embedded-form-panel iframe {
    height: 780px;
  }

  .van-shell {
    padding: 16px;
  }

  .van-button {
    width: 100%;
  }
}
