:root {
  --ink: #13201f; --muted: #5b6b69; --line: #e3ded3; --bg: #fbf8f2; --card: #ffffff;
  --brand: #0f5e56; --brand-2: #157a70; --brand-soft: #e3f1ee; --accent: #ffc65c; --accent-ink: #5a3b00;
  --ok: #1f8a4c; --warn: #b46a00; --err: #b3261e; --radius: 14px;
  --shadow: 0 1px 2px rgba(19,32,31,.06), 0 8px 24px rgba(19,32,31,.06);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 16px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

/* ---------- botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.2em; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { filter: brightness(.96); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f2eee6; }
.btn.danger { background: transparent; color: var(--err); border-color: #efc9c6; }
.btn.small { padding: .4em .75em; font-size: .9em; }
.btn:disabled { opacity: .55; cursor: default; }
label { display: block; font-size: .88em; font-weight: 600; margin-bottom: .3em; color: #33423f; }
.input, input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel], select, textarea {
  width: 100%; padding: .65em .8em; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 1em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1em; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1em; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.hint { color: var(--muted); font-size: .85em; }
.error { color: var(--err); font-size: .9em; min-height: 1.2em; }
.check { display: flex; gap: .6em; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3em; }

/* ---------- landing ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(251,248,242,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1160px; margin: 0 auto; padding: .8em 16px; display: flex; align-items: center; gap: 1.5em; }
.logo { display: flex; align-items: center; gap: .5em; font-weight: 800; font-size: 1.35em; color: var(--brand); text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.nav { display: flex; gap: 1.4em; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav a.btn { color: #fff; }
.menu-btn { display: none; margin-left: auto; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); flex-direction: column; padding: 1em 16px; border-bottom: 1px solid var(--line); align-items: stretch; }
  .nav.open { display: flex; } .menu-btn { display: inline-flex; }
}
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #d7ece7 0, transparent 60%), linear-gradient(180deg, #f6f1e6, var(--bg)); }
.hero .in { max-width: 1160px; margin: 0 auto; padding: 72px 16px 80px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent) 62%); }
.hero p.lead { font-size: 1.2em; color: #33423f; max-width: 34em; }
.hero .ctas { display: flex; gap: .8em; flex-wrap: wrap; margin: 1.6em 0 1em; }
.hero .ctas .btn { padding: .95em 1.5em; font-size: 1.05em; }
.badges { display: flex; flex-wrap: wrap; gap: .5em; margin-top: 1em; }
.badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .3em .8em; font-size: .85em; }
.phone { justify-self: center; width: min(340px, 100%); background: #13201f; border-radius: 36px; padding: 14px; box-shadow: 0 30px 60px rgba(15,94,86,.25); transform: rotate(2deg); }
.phone .screen { background: #fff; border-radius: 24px; padding: 18px; min-height: 440px; }
.phone .row { height: 12px; background: #eef1ef; border-radius: 6px; margin: 10px 0; }
.phone .row.s { width: 60%; } .phone .mrz { font-family: ui-monospace, monospace; font-size: 10px; background: #f6f1e6; padding: 8px; border-radius: 8px; letter-spacing: 1px; color: #5a3b00; word-break: break-all; }
.phone .sig { height: 80px; border: 2px dashed #cfd8d5; border-radius: 10px; margin-top: 12px; display: grid; place-items: center; color: var(--muted); font-size: .8em; }
.phone .ok { margin-top: 14px; background: var(--brand); color: #fff; text-align: center; padding: 10px; border-radius: 10px; font-weight: 600; }
@media (max-width: 860px) { .hero .in { grid-template-columns: 1fr; padding-top: 40px; } .phone { display: none; } }
.section { max-width: 1160px; margin: 0 auto; padding: 72px 16px; }
.section h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto 2.5em; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.3em; margin-bottom: .7em; }
.feature h3 { font-size: 1.1em; } .feature p { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: .6em; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.band { background: var(--brand); color: #fff; }
.band .section h2, .band .section .sub { color: #fff; } .band .sub { opacity: .85; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: .6em; }
.plan.featured { outline: 3px solid var(--accent); }
.plan .price { font-size: 2.2em; font-weight: 800; } .plan .price small { font-size: .45em; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 1.1em; margin: .3em 0 1em; color: #33423f; flex: 1; }
@media (max-width: 860px) { .pricing { grid-template-columns: 1fr; } }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1em 1.2em; margin-bottom: .6em; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: #33423f; margin: .6em 0 0; }
.footer { border-top: 1px solid var(--line); }
.footer .in { max-width: 1160px; margin: 0 auto; padding: 32px 16px; display: flex; flex-wrap: wrap; gap: 1em 2em; justify-content: space-between; color: var(--muted); font-size: .9em; }
.cookie { position: fixed; right: 16px; bottom: 16px; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; z-index: 50; }
.cookie p { margin: 0 0 .8em; font-size: .9em; color: #33423f; }
.cookie .row { display: flex; gap: .5em; }
@media (max-width: 520px) { .cookie { left: 16px; } }

/* ---------- pantallas de acceso ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: linear-gradient(160deg, #e6f2ef, var(--bg) 60%); }
.auth .card { width: min(460px, 100%); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.notice { background: #fff6e2; border: 1px solid #f3d595; color: #5a3b00; border-radius: 12px; padding: 12px 14px; font-size: .92em; margin-bottom: 16px; }
.center { text-align: center; }
.pw-meter { height: 6px; border-radius: 4px; background: #eee; overflow: hidden; margin-top: .4em; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s; }

/* ---------- panel ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #0f2b28; color: #d6e6e2; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { color: #fff; margin: 0 8px 18px; }
.side a { display: flex; align-items: center; gap: .6em; padding: .6em .8em; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 500; }
.side a:hover { background: rgba(255,255,255,.07); }
.side a.active { background: var(--accent); color: var(--accent-ink); }
.side .sep { height: 1px; background: rgba(255,255,255,.1); margin: 12px 8px; }
.main { padding: 24px; min-width: 0; }
.main header { display: flex; align-items: center; gap: 1em; flex-wrap: wrap; margin-bottom: 18px; }
.main header h1 { font-size: 1.6em; margin: 0; }
.main header .tools { margin-left: auto; display: flex; gap: .5em; flex-wrap: wrap; }
.mobile-top { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-105%); transition: transform .2s; height: auto; }
  .side.open { transform: none; }
  .mobile-top { display: flex; align-items: center; gap: 1em; padding: 10px 16px; background: #0f2b28; }
  .mobile-top .logo { color: #fff; font-size: 1.1em; }
  .main { padding: 16px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi .n { font-size: 2em; font-weight: 800; } .kpi .l { color: var(--muted); font-size: .9em; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7em .9em; border-bottom: 1px solid #f0ece4; vertical-align: top; }
th { font-size: .82em; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: #fcfaf6; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: .4em; flex-wrap: wrap; }
.pill { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .8em; font-weight: 600; }
.pill.ok { background: #e0f3e8; color: var(--ok); } .pill.warn { background: #fff1d6; color: var(--warn); } .pill.info { background: var(--brand-soft); color: var(--brand); } .pill.grey { background: #eee; color: #555; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.list-notes { display: grid; gap: 8px; }
.note { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; padding: 10px 14px; }
.note.warn { border-left-color: var(--warn); } .note.ok { border-left-color: var(--ok); }
.filters { display: flex; gap: .6em; flex-wrap: wrap; margin-bottom: 12px; }
.filters > * { width: auto; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: .8em; color: var(--muted); text-align: center; }
.cal .day { min-height: 92px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; font-size: .8em; overflow: hidden; }
.cal .day.out { opacity: .4; } .cal .day.today { outline: 2px solid var(--accent); }
.cal .ev { display: block; background: var(--brand-soft); color: var(--brand); border-radius: 4px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal .ev.done { background: #e0f3e8; color: var(--ok); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 80px 1fr 40px; gap: 8px; align-items: center; font-size: .9em; }
.bar .track { background: #eef1ef; border-radius: 6px; height: 14px; overflow: hidden; } .bar .fill { background: var(--brand); height: 100%; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
pre { background: #0f2b28; color: #d6e6e2; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .85em; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,30,28,.45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; }
.modal .foot { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1em; }
.qr { display: grid; place-items: center; padding: 12px; } .qr img { width: 200px; height: 200px; image-rendering: pixelated; }
.linkbox { display: flex; gap: .5em; } .linkbox input { font-family: ui-monospace, monospace; font-size: .85em; }

/* check-in del huésped */
.guest { min-height: 100vh; background: linear-gradient(180deg, #e6f2ef, var(--bg) 300px); padding: 24px 16px 48px; }
.guest .wrap { max-width: 720px; margin: 0 auto; }
.guest .head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.progress { display: flex; gap: 6px; margin: 12px 0 18px; } .progress span { flex: 1; height: 6px; border-radius: 4px; background: #dfe6e3; } .progress span.on { background: var(--brand); }
.sigpad { width: 100%; height: 180px; border: 2px dashed #c4d0cc; border-radius: 12px; background: #fff; touch-action: none; display: block; }
.mrz-box textarea { font-family: ui-monospace, monospace; text-transform: uppercase; min-height: 76px; }
.done-hero { text-align: center; padding: 30px 10px; } .done-hero .big { font-size: 3.5em; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: #13201f; color: #fff; padding: .7em 1.2em; border-radius: 10px; transition: transform .25s; z-index: 100; max-width: calc(100% - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--err); }
@media print { .side, .main header .tools, .mobile-top, #toast { display: none !important; } .shell { display: block; } }

/* Formulario de alojamiento por secciones */
.modal h3.sec { margin: 1.4em 0 .7em; padding: .45em .8em; border-radius: 8px; background: var(--brand); color: #fff; font-size: .95em; font-weight: 600; }
.modal h3.sec:first-of-type { margin-top: .6em; }
.tip { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--accent, #ffc65c); color: #13201f; font-size: .75em; font-weight: 700; cursor: help; vertical-align: middle; margin-left: .2em; }
.est-logo { display: block; max-height: 56px; max-width: 160px; object-fit: contain; margin-bottom: .5em; }
.logo-row { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; }
.logo-row .est-logo { margin: 0; }
.pill.bad { background: #fde7e5; color: #b42318; }
.notice.bad { background: #fde7e5; border-color: #f4b4ad; color: #7a1a12; }
