@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #123c25;
  --green-dark: #0c2b1a;
  --cream: #f4efe4;
  --card: #fdfbf6;
  --line: #e2d9c6;
  --field-line: #d8cdb7;
  --text: #1c2a21;
  --muted: #6f7469;
  --faint: #9a9c92;
  --error: #a3261b;
  --error-bg: #f8e3df;
  --ok-bg: #dfeade;
  --radius: 6px;
  --radius-sm: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header / footer */
.site-header { background: var(--green); color: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; padding-top: 10px; padding-bottom: 10px;
}
.logo { display: block; height: 44px; width: auto; }

.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.lang-switch span { color: rgba(255,255,255,.45); }
.lang-switch button {
  background: none; border: 0; color: rgba(255,255,255,.6); font: inherit; letter-spacing: inherit;
  padding: 8px 6px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { color: #fff; }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: 2px; }

.site-footer {
  margin-top: auto;
  background: var(--green);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  text-align: center;
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
}

main { padding-top: 28px; padding-bottom: 40px; }

/* Intro */
.overline {
  margin: 0 0 4px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.greeting { margin: 0 0 20px; font-size: 30px; line-height: 1.15; font-weight: 800; color: var(--green); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
}
.form-card h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--green); }
.subtitle { margin: 2px 0 18px; font-size: 13px; color: var(--muted); }

/* Fields */
.field { margin-bottom: 10px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-pair .field { min-width: 0; }

input[type="text"], input[type="tel"], input[type="email"], select {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom */
  appearance: none;
  -webkit-appearance: none;
}
input::placeholder { color: var(--faint); opacity: 1; }
select {
  padding-right: 34px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23123c25' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
select.is-placeholder { color: var(--faint); }
select option { color: var(--text); }

input:focus, select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 60, 37, .15);
}

.phone-row { display: flex; gap: 8px; }
.phone-row input { flex: 1; min-width: 0; }
.prefix { position: relative; flex: 0 0 96px; }
.prefix select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 48px; }
.prefix-display {
  display: flex; align-items: center;
  height: 48px; padding: 0 30px 0 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23123c25' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--field-line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.prefix select:focus + .prefix-display,
.prefix:focus-within .prefix-display {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 60, 37, .15);
}
.prefix-display { position: relative; z-index: 0; pointer-events: none; }
.prefix select { z-index: 1; }

.field-error { display: none; margin: 4px 2px 0; font-size: 12.5px; color: var(--error); }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error .prefix-display { border-color: var(--error); }

/* Consent */
.consent { margin-top: 14px; }
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box {
  flex: 0 0 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--green); border-radius: 3px; background: #fff;
  display: grid; place-items: center;
}
.check input:checked + .box { background: var(--green); }
.check input:checked + .box::after {
  content: ""; width: 10px; height: 6px; margin-top: -3px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(18, 60, 37, .25); }
.check-text { font-size: 12.5px; line-height: 1.5; color: #4b5249; }
.field.has-error .check .box { border-color: var(--error); }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px;
  background: var(--green); color: #fff;
  border: 0; border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--green-dark); }
.btn:focus-visible { outline: 3px solid rgba(18, 60, 37, .35); outline-offset: 2px; }
.btn-block { width: 100%; margin-top: 18px; }
.btn[disabled] { cursor: progress; opacity: .85; }
.spinner {
  display: none; width: 18px; height: 18px; margin-left: 10px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  margin-top: 14px; padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
}
.form-status.ok { background: var(--ok-bg); color: var(--green); }
.form-status.err { background: var(--error-bg); color: var(--error); }

/* Client list */
.clients { margin-top: 28px; }
.clients-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.clients-head h2 { margin: 0; font-size: 19px; font-weight: 800; color: var(--green); }
.count { font-size: 13px; color: var(--muted); }

.client-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.client {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--st, #8b8f86);
  border-radius: var(--radius);
  padding: 13px 16px 12px;
}
.client-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.client-name { margin: 0; font-size: 16px; font-weight: 800; color: var(--green); overflow-wrap: anywhere; }
.client-date { flex: none; font-size: 12.5px; color: var(--faint); }
.badge {
  display: inline-block; margin: 7px 0 5px; padding: 3px 10px;
  border-radius: 3px;
  background: var(--st-bg, #ecebe6); color: var(--st-fg, #50554e);
  font-size: 12.5px; font-weight: 700;
}
.client-updated { margin: 0; font-size: 12px; color: var(--faint); }
.empty {
  margin: 0; padding: 22px 16px;
  border: 1px dashed var(--field-line); border-radius: var(--radius);
  text-align: center; color: var(--muted); font-size: 14px;
}

/* Status colours */
.st-registrado   { --st: #8b8f86; --st-bg: #ecebe6; --st-fg: #50554e; }
.st-contactado   { --st: #2d7f78; --st-bg: #dcefed; --st-fg: #1d5f59; }
.st-buscando     { --st: #3a68a8; --st-bg: #e2ebf7; --st-fg: #2b5189; }
.st-reserva      { --st: #7a5aa6; --st-bg: #ece5f5; --st-fg: #5e418a; }
.st-comprado     { --st: #b8893f; --st-bg: #f6ead3; --st-fg: #7f5714; }
.st-liquidada    { --st: #123c25; --st-bg: #dde9dc; --st-fg: #123c25; }

/* Message states */
.state-message { text-align: center; padding: 34px 22px; margin-top: 12px; }
.state-message h1 { margin: 0 0 8px; font-size: 21px; color: var(--green); }
.state-message p { margin: 0 0 4px; color: var(--muted); }
.state-message .btn { margin-top: 18px; }

.loading-note { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* Skeleton */
.sk { background: linear-gradient(90deg, #e9e2d3 0%, #f1ebdf 50%, #e9e2d3 100%); background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 4px; }
.sk-overline { width: 150px; height: 11px; margin-bottom: 10px; }
.sk-title { width: 190px; height: 30px; margin-bottom: 26px; }
.sk-line { width: 60%; height: 18px; margin-bottom: 20px; }
.sk-field { height: 48px; margin-bottom: 10px; }
.sk-button { height: 50px; margin-top: 18px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  .sk, .spinner { animation: none; }
}

@media (max-width: 359px) {
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .logo { height: 38px; }
}

@media (min-width: 600px) {
  main { padding-top: 44px; }
  .card { padding: 26px 26px; }
  .greeting { font-size: 34px; }
}
