/* Hostal Nervión · panel del personal y páginas del huésped. Azul marino + albero, Fraunces + Inter. */
:root {
  --ink: #16202E; --soft: #5A6474; --mute: #8A93A3; --line: #E6E0D6; --line2: #F1EDE6;
  --paper: #F8F4ED; --card: #FFFFFF; --navy: #14213D; --navy2: #1E2F55; --navy3: #2C4377;
  --albero: #C9922E; --albero2: #E2B25A; --albero-l: #F6EAD3; --albero-d: #7A5410;
  --ok: #2E7D5B; --ok2: #3BA676; --ok-l: #DCEFE5; --bad: #B4442F; --bad-l: #F9E1DC; --info: #1F5FB4; --info-l: #E2ECF9;
  --past: #D7DCE3; --r: 16px; --sh: 0 10px 30px rgba(20, 33, 61, .08); --sh2: 0 24px 60px rgba(20, 33, 61, .18);
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--navy2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.serif { font-family: var(--serif); }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- estructura ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 4px 8px 18px; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, var(--navy3), var(--navy)); border: 1.5px solid rgba(226, 178, 90, .6); color: var(--albero2); display: grid; place-items: center; font: 600 23px var(--serif); flex: none; }
.brand b { display: block; font-size: 16px; }
.brand small { display: block; color: #9FB0CC; font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; flex: 1; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #C9D2E3; text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: rgba(226, 178, 90, .14); color: #fff; box-shadow: inset 3px 0 0 var(--albero2); }
.nav a.on .i { color: var(--albero2); }
.nav .badge { margin-left: auto; }
.nav .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--albero); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.me b { display: block; font-size: 14px; }
.me span { color: #9FB0CC; font-size: 12px; }
.me .btn { margin-left: auto; }
.side .btn.ghost, .topm .btn.ghost { color: #C9D2E3; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); }
.side .btn.ghost:hover, .topm .btn.ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.topm { display: none; }
.main { min-width: 0; }
.page { max-width: 1320px; margin: 0 auto; padding: 28px 32px 80px; }
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ph h1 { font: 600 32px var(--serif); letter-spacing: -.01em; }
.crumb { color: var(--albero-d); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.crumb a { color: inherit; text-decoration: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { position: fixed; inset: 0; background: rgba(14, 22, 42, .4); z-index: 35; }
.demo-flag { position: fixed; right: 14px; bottom: 14px; background: var(--navy); color: #fff; font-size: 12px; padding: 7px 12px; border-radius: 999px; box-shadow: var(--sh2); z-index: 60; opacity: .92; }
.demo-flag b { color: var(--albero2); }

/* ---------- piezas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--sh); }
.card.flat { box-shadow: none; }
.card h3 { font-size: 17px; margin-bottom: 12px; }
.card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.kpi .ic .i { width: 24px; height: 24px; }
.kpi small { color: var(--soft); font-weight: 600; display: block; }
.kpi b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.kpi em { font-style: normal; color: var(--soft); font-size: 13px; margin-left: 6px; }
.bg-navy { background: var(--navy); } .bg-ok { background: var(--ok); } .bg-alb { background: var(--albero); } .bg-bad { background: var(--bad); } .bg-info { background: var(--info); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--line2); color: var(--soft); }
.chip.ok { background: var(--ok-l); color: var(--ok); }
.chip.warn { background: var(--albero-l); color: var(--albero-d); }
.chip.bad { background: var(--bad-l); color: var(--bad); }
.chip.info { background: var(--info-l); color: var(--info); }
.chip.navy { background: var(--navy); color: #fff; }
.chip .i { width: 14px; height: 14px; }
.badge { background: var(--albero); color: var(--navy); font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--navy2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.g { background: var(--albero); color: var(--navy); }
.btn.g:hover { background: var(--albero2); }
.btn.ok { background: var(--ok); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--line2); }
.btn.danger { background: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn.big { height: 54px; font-size: 17px; border-radius: 16px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--soft); margin-bottom: 6px; }
.field > span em { font-weight: 500; font-style: normal; color: var(--mute); }
.field small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 5px; }
.field .err { display: block; color: var(--bad); font-size: 13px; font-weight: 600; margin-top: 5px; }
.in, .sel, .ta { width: 100%; height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 13px; background: #fff; outline: none; }
.ta { height: auto; min-height: 90px; padding: 10px 13px; resize: vertical; }
.in:focus, .sel:focus, .ta:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(20, 33, 61, .08); }
.field.bad .in, .field.bad .sel, .field.bad .ta { border-color: var(--bad); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.search { position: relative; }
.search .i { position: absolute; left: 12px; top: 12px; color: var(--mute); }
.search .in { padding-left: 40px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: #FBF9F5; }
.tbl-wrap { overflow-x: auto; }

.call { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--info-l); color: var(--info); }
.call.bad { background: var(--bad-l); color: var(--bad); }
.call.warn { background: var(--albero-l); color: var(--albero-d); }
.call.ok { background: var(--ok-l); color: var(--ok); }
.call p { margin: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--soft); }
.empty .i { width: 34px; height: 34px; color: var(--mute); }
.empty h4 { margin: 8px 0 4px; color: var(--ink); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--albero); margin: 60px auto; animation: g 0.8s linear infinite; }
@keyframes g { to { transform: rotate(360deg); } }

.tabs { display: inline-flex; gap: 4px; background: var(--line2); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--soft); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-pressed='true'] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }

.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line2); text-decoration: none; color: inherit; flex-wrap: wrap; }
.li > .grow { flex: 1 1 220px; }
.aviso-t { font-weight: 600; font-size: 14px; display: block; }
.li:last-child { border-bottom: 0; }
.li:hover { background: #FBF9F5; }
.li .num { width: 44px; height: 44px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; flex: none; }
.li b { display: block; }
.li small { color: var(--soft); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; }
.timeline .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line2); color: var(--mute); }
.timeline .dot.ok { background: var(--ok-l); color: var(--ok); }
.timeline .dot.bad { background: var(--bad-l); color: var(--bad); }
.timeline .dot.info { background: var(--info-l); color: var(--info); }
.timeline .dot .i { width: 15px; height: 15px; }
.pin { font: 800 30px/1 var(--sans); letter-spacing: .18em; }

/* ---------- modal y avisos ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 22, 42, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 22px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--sh2); }
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 6px; }
.modal-h h3 { font: 600 22px var(--serif); }
.modal-b { padding: 10px 22px; overflow: auto; }
.modal-f { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line2); }
.toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--sh2); border-left: 4px solid var(--ok); font-weight: 600; }
.toast.bad { border-left-color: var(--bad); }
.toast.info { border-left-color: var(--info); }
.toast .i { color: var(--ok); }
.toast.bad .i { color: var(--bad); }
.toast.info .i { color: var(--info); }

/* ---------- calendario ---------- */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); overflow: auto; }
.cal-in { position: relative; width: calc(96px + var(--dias) * 92px); }
.cal-head, .cal-row { display: grid; grid-template-columns: 96px repeat(var(--dias), 92px); }
.cal-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.cal-head > * { padding: 10px 4px; text-align: center; font-size: 12.5px; color: var(--soft); font-weight: 600; border-left: 1px solid var(--line2); }
.cal-head .hoy { color: var(--navy); font-weight: 800; background: rgba(201, 146, 46, .1); }
.cal-head > :first-child { border-left: 0; position: sticky; left: 0; z-index: 2; background: #fff; }
.cal-head .finde, .cal-row .c.finde { background: #FBF9F5; }
.cal-row { position: relative; height: 38px; border-bottom: 1px solid var(--line2); }
.cal-row .h { border: 0; border-bottom: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; display: flex; align-items: center; padding-left: 16px; font-weight: 700; font-size: 13.5px; position: sticky; left: 0; background: #fff; z-index: 2; border-right: 1px solid var(--line2); }
.cal-row .h small { color: var(--mute); font-weight: 500; margin-left: 6px; }
.cal-row .c { border-left: 1px solid var(--line2); }
.cal-row .c.hoy { background: rgba(201, 146, 46, .08); }
.cal-row .c.libre { cursor: cell; }
.cal-row .c.libre:hover { background: rgba(20, 33, 61, .05); }
.bar { position: absolute; top: 5px; height: 28px; border-radius: 8px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; padding: 0 9px; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 1; border: 0; text-align: left; }
.bar:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.bar.conf { background: var(--navy); color: #fff; }
.bar.pend { background: var(--albero-l); color: var(--albero-d); box-shadow: inset 0 0 0 2px var(--albero); }
.bar.ok { background: var(--ok-l); color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
.bar.in { background: var(--ok); color: #fff; }
.bar.past { background: var(--past); color: #4A5566; }
.bar.cancel { background: repeating-linear-gradient(45deg, #fff, #fff 5px, var(--line2) 5px, var(--line2) 10px); color: var(--mute); text-decoration: line-through; }
.bar .i { width: 14px; height: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--soft); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.legend.filtros { gap: 6px; margin-bottom: 12px; }
.legend.filtros button { display: inline-flex; align-items: center; gap: 2px; padding: 5px 10px; border: 1.5px solid transparent; border-radius: 999px; background: none; color: inherit; font-size: 13px; cursor: pointer; }
.legend.filtros button b { margin-left: 6px; color: var(--mute); font-weight: 700; font-variant-numeric: tabular-nums; }
.legend.filtros button:hover { background: var(--line2); }
.legend.filtros button[aria-pressed='true'] { background: var(--card); border-color: var(--navy3); color: var(--ink); font-weight: 700; }
.legend.filtros button[aria-pressed='true'] b { color: var(--ink); }
.legend.filtros button:focus-visible { outline: 2px solid var(--albero); outline-offset: 2px; }
.legend.filtros .ver-todas { color: var(--navy2); font-weight: 700; }
.legend.filtros .ver-todas .i { width: 16px; height: 16px; margin-right: 4px; }

/* ---------- limpieza (móvil primero) ---------- */
.lim { display: flex; flex-direction: column; gap: 10px; }
.lim-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.lim-card .num { width: 58px; height: 58px; border-radius: 16px; background: var(--paper); display: grid; place-items: center; font: 800 22px var(--sans); flex: none; }
.lim-card b { display: block; font-size: 17px; }
.lim-card span { color: var(--soft); font-weight: 600; }
.lim-card.urg { border-color: var(--bad); }
.lim-card.urg .num { background: var(--bad-l); color: var(--bad); }
.lim-card.todo .num { background: var(--albero-l); color: var(--albero-d); }
.lim-card.okk .num { background: var(--ok-l); color: var(--ok); }
.lim-card .btn { margin-left: auto; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 330px 1fr; gap: 16px; min-height: 560px; }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #EEF2F8; border-radius: 16px; min-height: 360px; max-height: 60vh; overflow: auto; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg a { color: inherit; text-decoration: underline; }
.msg.huesped { background: #fff; border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.asistente { background: #1F6FD1; color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.personal { background: var(--navy); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.sistema { align-self: center; background: var(--albero-l); color: var(--albero-d); font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 6px 12px; }
.msg small { display: block; font-size: 11px; opacity: .75; margin-bottom: 3px; font-weight: 700; }
.composer { display: flex; gap: 8px; margin-top: 12px; }
.composer .ta { min-height: 46px; height: 46px; }

/* ---------- entrar ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1000px 600px at 50% 30%, var(--navy3), var(--navy) 60%, #0c1529); }
.auth-box { width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 30px; box-shadow: var(--sh2); }
.auth-box h1 { font: 600 30px var(--serif); margin: 14px 0 4px; }
.roles { display: grid; gap: 10px; margin-top: 18px; }
.rolebtn { display: flex; gap: 14px; align-items: center; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; cursor: pointer; }
.rolebtn:hover { border-color: var(--navy); }
.rolebtn b { display: block; }
.rolebtn span { color: var(--soft); font-size: 13.5px; }

/* ---------- páginas del huésped ---------- */
.guest { min-height: 100vh; background: var(--paper); }
.guest-h { background: linear-gradient(135deg, var(--navy2), var(--navy)); color: #fff; padding: 22px 18px 54px; }
.guest-h .in-h { max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.guest-h small { display: block; color: var(--albero2); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; }
.guest-h b { font: 600 22px var(--serif); }
/* selector de idioma: ancho del nombre más largo («Português»), cabe junto al título a 320 px */
.guest-h .lang { margin-left: auto; flex: none; height: 30px; padding: 0 26px 0 10px; border: 0; border-radius: 8px; color: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23E2B25A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; }
.guest-h .lang:hover { background-color: rgba(255, 255, 255, .18); }
.guest-h .lang:focus-visible { outline: 2px solid var(--albero2); outline-offset: 2px; }
.guest-h .lang option { color: var(--ink); background: #fff; }
.guest-b { max-width: 620px; margin: -36px auto 0; padding: 0 14px 60px; }
.guest .card { border-radius: 20px; }
.persona-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.persona-h h3 { margin: 0; }
.firma { border: 1.5px dashed #C8C1B5; border-radius: 14px; background: #fff; position: relative; touch-action: none; }
.firma canvas { display: block; width: 100%; height: 150px; }
.firma span { position: absolute; left: 12px; bottom: 8px; font-size: 12px; color: var(--mute); pointer-events: none; }
.firma .btn { position: absolute; right: 8px; top: 8px; }
.codebox { background: linear-gradient(145deg, var(--navy2), var(--navy)); color: #fff; border-radius: 20px; padding: 22px 16px; text-align: center; }
.codebox small { color: var(--albero2); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.video-llegada { display: block; width: 100%; max-height: 70vh; margin: 8px 0 12px; border-radius: 14px; background: #000; }
.codebox .digits { display: flex; justify-content: center; gap: 8px; margin: 14px 0 10px; }
.codebox .digits span { width: 46px; height: 60px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.codebox p { color: #D5DCEA; margin: 0; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { height: 5px; flex: 1; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--albero); }

/* ---------- códigos de cada puerta ---------- */
.puertas-sel { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px 10px; max-height: 210px; overflow: auto; padding: 4px 2px; }
.li.codigo, .li.factura { flex-wrap: wrap; }
.li .acciones { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.pin { font-variant-numeric: tabular-nums; letter-spacing: .08em; font-size: 16px; }

/* ---------- factura (ver e imprimir) ---------- */
.decidir { display: grid; gap: 8px; }
@media print {
  body * { visibility: hidden; }
  .factura-doc, .factura-doc * { visibility: visible; }
  .factura-doc { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; }
  .no-print { display: none !important; }
}

/* ---------- informes ---------- */
.mes-nav { display: flex; align-items: center; gap: 6px; }
.mes-nav b { min-width: 128px; text-align: center; }
.mes-nav b::first-letter { text-transform: uppercase; }
.comparar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
.barras { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; padding-top: 20px; }
.barra { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--soft); font-size: 11.5px; }
.barra .col { position: relative; height: 160px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--line2) calc(25% - 1px) 25%); }
.barra i { display: block; width: min(72%, 34px); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--navy3); opacity: .55; }
.barra.fut i { background: transparent; border: 1.5px dashed var(--navy3); border-bottom: 0; }
.barra.on i { background: var(--albero); opacity: 1; border: 0; }
.barra:hover i { opacity: .85; }
.barra em { position: absolute; left: 50%; transform: translateX(-50%); font-style: normal; font-weight: 800; font-size: 12px; color: var(--ink); white-space: nowrap; }
.barra small { text-align: center; }
.barra.on small { color: var(--ink); font-weight: 700; }
.barra:focus-visible { outline: 2px solid var(--albero); outline-offset: 2px; border-radius: 6px; }
.reparto { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.reparto li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 10px; font-size: 14px; }
.reparto i { grid-column: 1 / -1; display: block; height: 6px; border-radius: 0 4px 4px 0; background: var(--navy3); opacity: .55; }
details summary { cursor: pointer; color: var(--navy2); font-weight: 600; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chat { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .topm { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 30; }
  .topm .brand { padding: 0; }
  .topm .btn { color: #fff; }
  .page { padding: 18px 16px 70px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .ph h1 { font-size: 26px; }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 560px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } .kpi b { font-size: 22px; } .kpi .ic { width: 36px; height: 36px; border-radius: 11px; } .kpi .ic .i { width: 20px; height: 20px; } .codebox .digits span { width: 40px; height: 54px; font-size: 28px; } }
.i.big { width: 40px; height: 40px; }

/* ---------- limpieza: semana y mes ---------- */
.lim-paso { margin-bottom: 12px; }
.lim-volver { margin-bottom: 14px; }
.lim-total { color: var(--soft); margin-bottom: 12px; }
.lim-cuentas > span { white-space: nowrap; }
.lim-cuentas b { color: var(--ink); }
.lim-cuentas b.todo { color: var(--albero-d); }
.lim-cuentas b.urg { color: var(--bad); }
.lim-sem { display: flex; flex-direction: column; gap: 8px; }
.lim-dia { width: 100%; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: 'f n i' 'f c i'; align-items: center; gap: 6px 14px;
  padding: 12px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; text-align: left; cursor: pointer; }
.lim-dia .f { grid-area: f; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lim-dia .f b { font-size: 16px; }
.lim-dia .n { grid-area: n; color: var(--soft); font-size: 14px; }
.lim-dia .habs { grid-area: c; display: flex; flex-wrap: wrap; gap: 6px; }
.lim-dia > .i { grid-area: i; color: var(--mute); }
/* números de habitación: mismos colores que .lim-card.urg y .todo */
.lim-hab { min-width: 34px; height: 28px; padding: 0 6px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; }
.lim-hab.urg { background: var(--bad-l); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.lim-hab.todo { background: var(--albero-l); color: var(--albero-d); }
.lim-mes { container-type: inline-size; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lim-mes .sem { text-align: center; font-size: 12px; font-weight: 800; color: var(--mute); }
.lim-mdia { min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 5px; overflow: hidden;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.lim-mdia .d { align-self: flex-start; padding-left: 3px; font-size: 11px; font-weight: 700; line-height: 1.2; color: var(--soft); }
.lim-mdia b { font-size: 19px; font-weight: 800; line-height: 1.15; color: var(--albero-d); }
.lim-mdia.cero b { color: var(--mute); font-weight: 600; }
.lim-mdia em { font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1.5; padding: 0 5px; border-radius: 999px; white-space: nowrap;
  background: var(--bad-l); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.lim-mdia small, .lim-mdia em span { display: none; }   /* en el móvil, solo los números: la leyenda de debajo los explica */
.lim-dia:hover, .lim-mdia:hover { border-color: var(--navy3); }
.lim-dia:focus-visible, .lim-mdia:focus-visible { outline: 2px solid var(--albero); outline-offset: 2px; }
.lim-dia.hoy, .lim-mdia.hoy { border-color: var(--albero); box-shadow: inset 0 0 0 1px var(--albero); }
.lim-mdia.hoy .d { color: var(--navy); font-weight: 800; }
.lim-dia.pasado, .lim-mdia.pasado { opacity: .5; }
@container (min-width: 700px) {   /* con sitio (ordenador o tableta), cada día lleva sus palabras */
  .lim-mdia { min-height: 92px; gap: 2px; padding: 8px 6px; border-radius: 12px; }
  .lim-mdia .d { font-size: 13px; padding-left: 2px; }
  .lim-mdia b { font-size: 26px; }
  .lim-mdia small { display: block; font-size: 11.5px; color: var(--soft); }
  .lim-mdia em { font-size: 11.5px; padding: 0 7px; }
  .lim-mdia em span { display: inline; }
}
@media (max-width: 640px) { .lim-dia { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'f i' 'n n' 'c c'; padding: 12px 14px; } }
@media (max-width: 560px) { .lim-mes { gap: 4px; } }
@media (max-width: 400px) { .lim-vistas .tabs button { padding: 7px 10px; } }   /* las cuatro pestañas en una línea a 320 px */
/* Avisos de Hoy agrupados por tipo (core/avisos.js) */
.aviso-grupo + .aviso-grupo { margin-top: 14px; }
.aviso-grupo h4 { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
.aviso-grupo h4 svg { width: 16px; height: 16px; }
.aviso-grupo h4 .muted { font-weight: 600; }
/* Botones de una fila de tabla (Ver, PDF, Imprimir): todos a la misma altura */
.tbl-acc { display: flex; align-items: center; gap: 6px; }
/* Teléfono del huésped con «Llamar» y «WhatsApp» (Reservas y Hoy) */
.contacto { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.contacto .tel { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: 2px; user-select: all; }
/* Calendario: cabecera de días tocable, barra para deslizar y día/habitación resaltados */
.cal-head button { background: transparent; border: 0; border-left: 1px solid var(--line2); font: inherit; cursor: pointer; }
.cal-head button:hover { color: var(--navy); background: rgba(20, 33, 61, .05); }
.cal-head button.marcada { background: var(--albero); color: var(--navy); font-weight: 800; }
.cal-row .c.marcada { background: rgba(201, 146, 46, .22); }
.cal-row.marcada .c { background: rgba(201, 146, 46, .16); }
.cal-row.marcada .h { background: var(--albero); color: var(--navy); }
.cal-row.marcada .h small { color: var(--navy); }
.cal-row .h:hover { background: #F6F2EA; }
.cal-deslizar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--soft); }
.cal-deslizar input { flex: 1; accent-color: var(--navy); height: 28px; cursor: grab; }
.cal { scrollbar-width: auto; }
.cal-row.marcada .c.marcada { background: rgba(201, 146, 46, .4); }
/* «Recordado a mano hace 2 h · Automático: 29/10 · 09:00» junto a «Recordar» */
.recordado { display: block; margin-top: 6px; color: var(--soft); font-size: 12px; }
.recordar { display: flex; flex-direction: column; align-items: flex-end; }
.recordar .recordado { text-align: right; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--navy3); text-decoration: underline; cursor: pointer; }
/* el mensaje que le llegó al huésped, tal cual */
.mensaje-enviado { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; background: var(--paper); line-height: 1.5; overflow-wrap: anywhere; }
/* «Ver 7 más» al final de una lista larga (Hoy) */
.ver-mas { align-self: flex-start; margin-top: 8px; }
/* Buscador del menú: en cualquier pantalla, busca un huésped en todas las reservas */
.buscar-todo { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 0 10px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #C9D2E3; }
.buscar-todo input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; font-size: 14px; }
.buscar-todo input::placeholder { color: #9AA6BD; }
.buscar-todo:focus-within { box-shadow: inset 0 0 0 1.5px var(--albero); }
