:root {
  --bg: #f3f2ee; --surface: #ffffff; --surface-2: #f8f8f5; --border: #dedfda; --text: #3b3d3f; --muted: #6c6e70;
  --accent: #5a8a25; --accent-2: #47701c; --accent-soft: #e8f1da; --teal: #5f6163; --teal-soft: #e7e8e6;
  --on-accent: #ffffff; --logo-verde: #6a9a2c; --logo-texto: #5f6163;
  --ok: #2e7d4f; --ok-soft: #dff2e6; --warn: #b7791f; --warn-soft: #fbefd5; --bad: #c0392b; --bad-soft: #fbe2df;
  --info: #2c6db5; --info-soft: #dfeaf8; --gray-soft: #e9e9e6;
  --shadow: 0 1px 2px rgba(40, 42, 44, .06), 0 4px 16px rgba(40, 42, 44, .06);
  --radius: 12px; --sidebar: 236px;
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #2e3032; --surface: #3a3c3f; --surface-2: #333537; --border: #54575a; --text: #f4f5f2; --muted: #bcbfbb; --on-accent: #1f2a14; --logo-verde: #a6d86e; --logo-texto: #ffffff;
    --accent: #a6d86e; --accent-2: #bce58c; --accent-soft: #3f4d30; --teal: #8a8f93; --teal-soft: #474a4d;
    --ok: #5cc48a; --ok-soft: #173023; --warn: #e5b04e; --warn-soft: #362a12; --bad: #ef7466; --bad-soft: #3a1c18;
    --info: #74a9ec; --info-soft: #172840; --gray-soft: #46494c; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #2e3032; --surface: #3a3c3f; --surface-2: #333537; --border: #54575a; --text: #f4f5f2; --muted: #bcbfbb; --on-accent: #1f2a14; --logo-verde: #a6d86e; --logo-texto: #ffffff;
  --accent: #a6d86e; --accent-2: #bce58c; --accent-soft: #3f4d30; --teal: #8a8f93; --teal-soft: #474a4d;
  --ok: #5cc48a; --ok-soft: #173023; --warn: #e5b04e; --warn-soft: #362a12; --bad: #ef7466; --bad-soft: #3a1c18;
  --info: #74a9ec; --info-soft: #172840; --gray-soft: #46494c; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hidden { display: none !important; }

/* Layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-family: 'Playfair Display', Georgia, serif; font-size: 18px; }
.brand b { display: block; font-size: 14px; }
.brand span { font-size: 11px; color: var(--muted); }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--accent-soft); color: var(--accent-2); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-weight: 700; flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.content { padding: 24px; max-width: 1500px; width: 100%; }
.menu-btn { display: none; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .spacer { flex: 1; }

/* Components */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--muted); }
.b-ok { background: var(--ok-soft); color: var(--ok); } .b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); } .b-info { background: var(--info-soft); color: var(--info); }
.b-teal { background: var(--teal-soft); color: var(--teal); } .b-accent { background: var(--accent-soft); color: var(--accent-2); }

/* Forms */
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: #2b2d2f; background: #ffffff; color-scheme: light; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: #85888b; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { resize: vertical; min-height: 64px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[type=search] { min-width: 220px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }
tr.click { cursor: pointer; }
tfoot td { font-weight: 700; background: var(--surface-2); }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* Lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-chip { min-width: 44px; height: 32px; padding: 0 8px; border-radius: 8px; background: var(--teal-soft); color: var(--teal); font-weight: 700; display: grid; place-items: center; font-size: 13px; }

/* Rooms grid */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.room { padding: 14px; border-left: 4px solid var(--border); display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.room .n { font-size: 20px; font-weight: 700; }
.room.s-Disponible { border-left-color: var(--ok); } .room.s-Ocupada { border-left-color: var(--accent); }
.room.s-Limpieza { border-left-color: var(--warn); } .room.s-Mantenimiento { border-left-color: var(--info); }
.room.s-No\ disponible { border-left-color: var(--muted); opacity: .75; }
.mini-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; padding: 14px 18px; }
.mini-room { border-radius: 8px; padding: 8px 4px; text-align: center; font-weight: 700; font-size: 13px; cursor: pointer; }

/* Calendar */
.cal-wrap { overflow: auto; max-height: calc(100vh - 210px); }
.cal { display: grid; position: relative; min-width: max-content; }
.cal .c { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); height: 44px; }
.cal .hd { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-size: 11px; text-align: center; padding: 5px 0; height: 46px; color: var(--muted); }
.cal .hd b { display: block; font-size: 15px; color: var(--text); }
.cal .hd.today { background: var(--accent-soft); color: var(--accent-2); }
.cal .hd.today b { color: var(--accent-2); }
.cal .rm { position: sticky; left: 0; z-index: 2; background: var(--surface); padding: 6px 12px; font-weight: 700; display: flex; flex-direction: column; justify-content: center; }
.cal .rm span { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.cal .corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface-2); }
.cal .cell { cursor: pointer; }
.cal .cell:hover { background: var(--accent-soft); }
.cal .cell.we { background: var(--surface-2); }
.cal .cell.today { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.bar { position: absolute; height: 32px; margin-top: 6px; border-radius: 7px; padding: 0 8px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; cursor: pointer; z-index: 1; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.bar:hover { filter: brightness(1.08); z-index: 2; }
.bar.e-Confirmada { background: var(--info); } .bar.e-Pendiente { background: var(--warn); }
.bar.e-Check-in { background: var(--accent); color: var(--on-accent); } .bar.e-Check-out { background: #8a8079; }
.bar .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 14, 10, .45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .15s; }
.modal.wide { max-width: 920px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 7px 12px; }
.dl dt { color: var(--muted); font-size: 12.5px; } .dl dd { margin: 0; font-weight: 500; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 20px 0 10px; }
.money-box { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.money-box > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.money-box b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.money-box span { font-size: 11.5px; color: var(--muted); }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.thumbs a { display: block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.thumbs img { display: block; height: 110px; max-width: 220px; object-fit: contain; }
.sig-pad { width: 100%; height: 170px; border: 1.5px dashed var(--border); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.alert { padding: 10px 14px; border-radius: 9px; font-size: 13px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.ok { background: var(--ok-soft); color: var(--ok); } .alert.info { background: var(--info-soft); color: var(--info); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.timeline li { padding: 5px 0 5px 16px; border-left: 2px solid var(--border); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Lectura de documento */
.scan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--teal); border-radius: 10px; background: var(--teal-soft); margin-bottom: 16px; flex-wrap: wrap; }
.scan-title { width: 100%; color: var(--teal); }
.scan-pick { width: 100%; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.scan-pick .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--teal); background: var(--surface); color: var(--teal); cursor: pointer; }
.chip.on { background: var(--teal); color: #fff; }
.chip.ghost { border-color: var(--border); color: var(--muted); }
.scan-title svg { width: 16px; height: 16px; vertical-align: -3px; }
.cam-bg { z-index: 150; }
.cam-view { position: relative; background: #000; border-radius: 10px; overflow: hidden; height: min(62vh, 560px); display: grid; place-items: center; }
.cam-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 3px solid #fff; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); pointer-events: none; }
.cam-frame::before, .cam-frame::after { content: ''; position: absolute; width: 28px; height: 28px; border: 5px solid #4fd1c5; }
.cam-frame::before { left: -5px; top: -5px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.cam-frame::after { right: -5px; bottom: -5px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.cam-frame.f-doc { width: min(88%, calc(62vh * 1.4)); aspect-ratio: 1.586; }
.cam-frame.f-factura { height: 90%; aspect-ratio: 0.7; max-width: 90%; }
.cam-msg { position: absolute; color: #fff; text-align: center; padding: 20px; max-width: 420px; }
.cam-msg[hidden] { display: none; }
.scan img { height: 56px; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.scan .scan-status { font-size: 12.5px; color: var(--teal); flex: 1; min-width: 160px; }
.scan .prog { height: 4px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.scan .prog i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
input.filled, select.filled { border-color: var(--accent); background: #edf5e1; }
.hint { font-size: 12.5px; padding: 8px 12px; border-radius: 8px; }

/* Estados e incidencias de habitación */
.estado-opts { display: grid; gap: 6px; }
.estado-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.estado-opt span { font-size: 12px; color: var(--muted); }
.estado-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.estado-opt.on span { color: var(--accent-2); }
.inc-list { gap: 8px; max-height: 420px; overflow: auto; }
.inc-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.inc-foto { max-height: 90px; border-radius: 6px; margin: 4px 0; }
.check-big { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 3px solid var(--warn); border-radius: 12px; background: var(--warn-soft); font-size: 13px; cursor: pointer; animation: check-resalte 1.4s ease-in-out infinite; }
.check-big input { flex: none; width: 34px; height: 34px; margin: 0; cursor: pointer; accent-color: var(--ok); }
.check-aviso { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 800; color: var(--warn); }
.check-big:has(input:checked) { border-color: var(--ok); animation: none; }
.check-big:has(input:checked) .check-aviso { display: none; }
@keyframes check-resalte { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--warn) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .check-big { animation: none; } }
.m-room.limpieza { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.m-room.ocupada { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.m-room.mant { border-color: var(--info); background: var(--info-soft); color: var(--info); }
.m-room.nodisp { border-color: var(--border); background: var(--gray-soft); color: var(--muted); }
.m-room .inc { font-size: 10px; font-weight: 700; color: var(--bad); }

/* Inicio reducido (celular / tableta) */
.h-wrap { max-width: 760px; margin: 0 auto; }
.h-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.h-tabs button { padding: 11px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.h-tabs button.on { background: var(--accent); color: var(--on-accent); }
.c-linea { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0 0; font-variant-numeric: tabular-nums; }
.c-linea b { white-space: nowrap; }
.m-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.m-total b { font-size: 18px; color: var(--accent-2); }
.m-hello { margin-bottom: 14px; }
.m-hello h1 { font-size: 22px; }
.card-head h2 svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 4px; color: var(--accent); }
.m-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-free { padding-bottom: 14px; }
.m-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 0 16px; }
.m-room { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--ok); background: var(--ok-soft); color: var(--ok); font: inherit; cursor: pointer; }
.m-room b { font-size: 18px; } .m-room span { font-size: 11px; }

/* Inventario */
.items-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.item-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: center; }
.item-row:not(:has([data-c])) { grid-template-columns: 2fr 1fr auto; }
@media (max-width: 860px) { .item-row, .item-row:not(:has([data-c])) { grid-template-columns: 1fr 1fr; } .item-row [data-p] { grid-column: 1 / -1; } }

/* Administrar todo */
.admin-kpi { text-decoration: none; color: inherit; }
.admin-kpi:hover { border-color: var(--accent); }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-tile { display: flex; gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--text); }
.admin-tile:hover { border-color: var(--accent); background: var(--surface-2); }
.admin-tile svg { width: 26px; height: 26px; color: var(--accent); flex: none; }

/* Toast */
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 380px; animation: pop .15s; font-weight: 500; }
.toast.err { background: var(--bad); color: #fff; }

/* Charts */
.chart { width: 100%; height: 200px; display: block; }
.chart text { fill: var(--muted); font-size: 10px; font-family: inherit; }
.hbar { display: grid; grid-template-columns: 120px 1fr 110px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.hbar .track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.hbar .fill { height: 100%; background: var(--accent); border-radius: 6px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 50%), radial-gradient(circle at 90% 90%, var(--teal-soft), transparent 50%), var(--bg); }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.login h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; font-weight: 600; margin: 14px 0 4px; }

@media (max-width: 1100px) { .cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 110px 1fr; }
  .money-box { grid-template-columns: 1fr 1fr; }
  .filters input, .filters select, .filters input[type=search] { min-width: 0; flex: 1 1 140px; }
  .hbar { grid-template-columns: 90px 1fr 90px; }
  .modal-bg { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; }
}
.print-only { display: none; }

/* Meta del período */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-top { display: flex; justify-content: space-between; font-size: 15px; }
.meta-barra { height: 12px; border-radius: 6px; background: var(--gray-soft); overflow: hidden; }
.meta-barra span { display: block; height: 100%; border-radius: 6px; }
.meta-barra .ok { background: var(--ok); } .meta-barra .warn { background: var(--warn); } .meta-barra .bad { background: var(--bad); }

.meta-slider { margin-bottom: 18px; }
.meta-slider input[type=range] { width: 100%; height: 24px; margin: 6px 0 0; accent-color: var(--accent); cursor: pointer; }
.meta-escala { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* Modo de edición del portal */
.pe-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.pe-top { display: flex; justify-content: space-between; gap: 12px; }
.pe-precio { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.pe-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pe-foto { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--gray-soft); }
.pe-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-quitar { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 5px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; }
.pe-subir { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: 12px; cursor: pointer; }
.pe-subir svg { width: 22px; height: 22px; }
.pe-sol { display: flex; flex-direction: column; gap: 12px; }
.pe-sol-item { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.pe-sol-item:last-child { border-bottom: 0; padding-bottom: 0; }
.pe-sol-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }

/* Plan de trabajo */
.plan-correo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-correo input { flex: 1 1 240px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.plan-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); border: 1px solid; }
.plan-alta { background: var(--ok-soft); border-color: var(--ok); }
.plan-media { background: var(--warn-soft); border-color: var(--warn); }
.plan-baja { background: var(--gray-soft); border-color: var(--border); }
.plan-carga { display: flex; flex-wrap: wrap; gap: 8px; }
#pl-asignar select { min-width: 150px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.plan-tareas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.plan-tarea-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
tr.plan-hecho td { opacity: .55; }
tr.plan-hecho b { text-decoration: line-through; }

/* Calendario de ocupación */
.oc-leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; font-size: 12.5px; }
.oc-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.oc-leyenda i { width: 16px; height: 16px; border-radius: 4px; border-width: 0 0 3px; border-style: solid; }
.oc-meses { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.oc-mes h3 { font-size: 14px; margin-bottom: 8px; }
.oc-mes h3::first-letter { text-transform: uppercase; }
.oc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.oc-sem { font-size: 11px; color: var(--muted); text-align: center; }
.oc-dia { min-height: 54px; padding: 4px 6px; border-radius: 6px; border-bottom: 3px solid; display: flex; flex-direction: column; color: var(--text); }
.oc-dia span { font-size: 11px; color: var(--muted); }
.oc-dia b { font-size: 19px; line-height: 1.2; text-align: center; }
.oc-ok { background: var(--ok-soft); border-color: var(--ok); }
.oc-warn { background: var(--warn-soft); border-color: var(--warn); }
.oc-bad { background: var(--bad-soft); border-color: var(--bad); }
.oc-vacio { background: var(--gray-soft); border-color: var(--border); }
.oc-hoy { outline: 2px solid var(--text); outline-offset: 1px; }

@page { size: letter; margin: 13mm 12mm; }
@media print {
  html:root:not(.sin-uso) {
    --bg: #fff; --surface: #fff; --surface-2: #f8f8f5; --border: #dedfda; --text: #2f3133; --muted: #5f6163; --on-accent: #fff; --logo-verde: #6a9a2c; --logo-texto: #5f6163;
    --accent: #5a8a25; --accent-2: #47701c; --accent-soft: #e8f1da; --teal: #5f6163; --teal-soft: #e7e8e6;
    --ok: #2e7d4f; --ok-soft: #dff2e6; --warn: #b7791f; --warn-soft: #fbefd5; --bad: #c0392b; --bad-soft: #fbe2df; --gray-soft: #efefec; --shadow: none; color-scheme: light;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, .no-print, #banner-prueba { display: none !important; }
  .app, .main { display: block; }
  html, body { background: #fff; font-size: 11.5px; }
  .content { padding: 0 !important; max-width: none; }
  .print-only { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
  .card-head { padding: 8px 12px; }
  .grid.kpis { grid-template-columns: repeat(4, 1fr) !important; gap: 8px; }
  .grid.cols-2 { grid-template-columns: 1fr 1fr !important; gap: 8px; }
  .kpi .value { font-size: 17px; }
  .table-wrap { max-height: none !important; overflow: visible !important; }
  .oc-meses { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .oc-dia { min-height: 30px; padding: 1px 2px; border-bottom-width: 2px; }
  .oc-dia span { font-size: 8px; }
  .oc-dia b { font-size: 12px; white-space: nowrap; }
  .oc-sem { font-size: 9px; }
  .oc-mes h3 { font-size: 11px; margin-bottom: 4px; }
  .oc-grid { gap: 2px; }
  .kpi { padding: 10px 12px; }
  .kpi .sub { font-size: 10px; }
  .rep-print-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--accent); }
  .rep-print-head .logo-chc { font-size: 15px; }
  .rep-print-titulo { text-align: right; }
  .rep-print-titulo h1 { font-size: 19px; margin-bottom: 4px; }
  .rep-print-pie { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--border); text-align: center; font-size: 10px; color: var(--muted); }
}

/* Logo Casa de Huéspedes Colonial */
.logo-chc { display: inline-flex; align-items: center; gap: .6em; font-size: 12px; line-height: 1; color: var(--logo-texto); }
.logo-chc .m { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 3em; letter-spacing: -.03em; }
.logo-chc .m i { font-style: normal; color: var(--logo-verde); }
.logo-chc .sep { width: 1px; align-self: stretch; background: var(--logo-verde); }
.logo-chc .t { display: flex; flex-direction: column; gap: .3em; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 1.3em; line-height: 1.02; }
.logo-chc .t b { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .52em; letter-spacing: .36em; color: var(--logo-verde); }
.login .logo-chc { font-size: 17px; }
.brand { padding: 4px 4px 16px; }

/* Datos ya registrados que no se pueden cambiar al firmar el check-in */
.field input.bloqueado, .field select.bloqueado { opacity: .65; cursor: not-allowed; }

/* Advertencia de check-out del día */
tr.fila-salida td { background: var(--warn-soft); }
.m-room.sale-hoy { border: 2px solid var(--warn); background: var(--warn-soft); color: var(--warn); }
#l-out .list-item { border-left: 4px solid var(--warn); background: var(--warn-soft); }
#aviso-salidas { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: min(560px, 94vw); padding: 12px 14px; border: 2px solid var(--warn); border-radius: 12px; background: var(--warn-soft); color: var(--warn); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
#aviso-salidas > div { flex: 1 1 100%; }

/* Chat del portal en la app */
.chat-app { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.msg-app { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); }
.msg-app.msg-cliente { align-self: flex-start; background: var(--accent-soft); border-color: transparent; }
.msg-app.msg-personal, .msg-app.msg-bot { align-self: flex-end; }
.msg-app.msg-personal { border-color: var(--accent); }

.pend-urgente { border-left: 4px solid var(--warn); }
