/* ============================================================
   PMS Hotel Atlántico — estilos específicos no cubiertos por Tailwind
   ============================================================ */

:root {
    /* Paleta Cloudbeds — neutros claros + azul accent */
    --navy: #1f2937;       /* texto principal */
    --gold: #2563eb;       /* accent azul */
    --gold-2: #3b82f6;
    --cream: #f9fafb;      /* page bg / sutil */
    --line: #e5e7eb;
    --line-grid: #f3f4f6;
    --muted: #6b7280;

    /* Pildoras — paleta Cloudbeds beta (azules/verdes pastel claros) */
    --res-paga: #d1fae5;
    --res-paga-border: #34a07b;
    --res-pendiente: #fef3c7;
    --res-pendiente-border: #d97706;
    --res-upgrade: #fce7f3;
    --res-upgrade-border: #db2777;

    /* Lifecycle (estado de la reserva) */
    --res-confirmada: #dbeafe;
    --res-confirmada-border: #3b82f6;
    --res-checkin: #d1fae5;
    --res-checkin-border: #34a07b;
    --res-checkout: #e5e7eb;
    --res-checkout-border: #9ca3af;
    --res-noshow: #fee2e2;
    --res-noshow-border: #ef4444;

    /* Bg de columna fin de semana — sutil */
    --fs-bg: #f3f4f6;
}

/* ---------- Grilla del planning ---------- */
.planning-scroll {
    max-height: calc(100vh - 130px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

table.planning {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 11px;
    /* Layout fijo: las celdas respetan los widths declarados sin importar el contenido.
       Sin esto, una reserva con apellido largo expandía la columna del día y rompía la grilla. */
    table-layout: fixed;
}

table.planning th,
table.planning td {
    border-right: 1px solid var(--line-grid);
    border-bottom: 1px solid var(--line-grid);
    padding: 0;
    vertical-align: middle;
    text-align: center;
}
/* Row hover: highlight habitación entera al pasar el mouse */
table.planning tbody tr:hover td { background: rgba(37, 99, 235, 0.06) !important; }
table.planning tbody tr:hover td.fs { background: rgba(37, 99, 235, 0.10) !important; }
/* Sticky cells deben mantenerse opacos en hover para no dejar pasar pildoras */
table.planning tbody tr:hover .hab-col,
table.planning tbody tr:hover .cat-col,
table.planning tbody tr:hover .cap-col { background: #eff6ff !important; }
table.planning thead th { border-bottom: 2px solid var(--gold); }

table.planning thead th {
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 500;
    color: var(--muted);
    padding: 4px 0;
}

/* Anchos definidos vía <colgroup>: la única fuente de verdad para que TODAS
   las columnas de día sean exactamente iguales sin importar contenido. */
table.planning col.col-hab { width: 92px; }
table.planning col.col-cat { width: 110px; }

/* Selección de columna por día (drag / click en header). Estilo Cloudbeds: tinte suave + barra inferior dorada en thead.
 * IMPORTANTE: NO usar position:relative en th.dia-col — rompe el sticky del header. */
table.planning td.dia-col.col-selected {
    background: linear-gradient(180deg, rgba(212, 160, 23, 0.10), rgba(212, 160, 23, 0.06)) !important;
    position: relative;
}
table.planning th.dia-col.col-selected {
    box-shadow: inset 0 -2px 0 var(--gold);
    /* Opaco — el thead es sticky y necesita fondo sólido para no mostrar contenido detrás */
    background: #f5e9c4 !important;
}
table.planning th.dia-col { cursor: pointer; user-select: none; -webkit-user-select: none; }
table.planning col.col-cap { width: 48px; }
table.planning col.col-dia { width: 30px; }

table.planning .hab-col { font-weight: 600; padding: 4px; color: var(--navy); background: white; white-space: nowrap; }
table.planning .cat-col { text-align: left; padding: 4px 6px; color: var(--muted); background: white; font-size: 10px; line-height: 1.15; white-space: normal; word-break: break-word; }
table.planning .cap-col { color: var(--muted); background: white; }
/* dia-col tiene overflow:visible para que el texto de .res-text pueda salir
   y abarcar todas las celdas que ocupa la reserva. Posicion relativa para
   que el .res-text absoluto se ancle a la celda de entrada (sólo en tbody). */
table.planning .dia-col { height: 28px; overflow: visible; background: white; }
table.planning tbody .dia-col { position: relative; }
table.planning .dia-col.fs { background: var(--fs-bg); }

table.planning thead .dia-col .dia-letra { font-size: 10px; color: var(--muted); text-transform: lowercase; letter-spacing: 0.02em; line-height: 1; }
table.planning thead .dia-col .dia-num   { font-weight: 700; font-size: 18px; color: var(--navy); line-height: 1.1; }
table.planning thead .dia-col.is-weekend .dia-letra,
table.planning thead .dia-col.fs .dia-letra { color: var(--gold); font-weight: 600; }
table.planning thead .dia-col .dia-occ {
    display: inline-block;
    margin-top: 2px;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
    line-height: 1.4;
}
table.planning thead .dia-col .dia-flow {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 2px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}
.day-checkin  { color: #6aa85a; padding: 1px 3px; border-radius: 2px; background: rgba(106,168,90,0.12); }
.day-checkout { color: #b85555; padding: 1px 3px; border-radius: 2px; background: rgba(184,85,85,0.12); }
.day-checkin.is-zero, .day-checkout.is-zero { color: #ccc; background: transparent; }

/* Día actual: número con círculo navy + banda vertical celeste en TODA la columna */
table.planning .dia-col.is-today { background: rgba(91, 155, 209, 0.16) !important; }
table.planning .dia-col.is-today.fs { background: rgba(91, 155, 209, 0.22) !important; }
/* thead sticky: bg sólido para que el scroll no se vea a través */
table.planning thead .dia-col.is-today { background: #e2ecf7 !important; }
table.planning thead .dia-col.is-today.fs { background: #d6e3f3 !important; }
table.planning thead .dia-col.is-today .dia-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--navy);
    color: white;
}
.heat-low  { background: rgba(106, 168, 90, 0.18); color: #2c6b1d; }
.heat-mid  { background: rgba(212, 160, 23, 0.22); color: #6b4d00; }
.heat-high { background: rgba(153, 27, 27, 0.18);  color: #7d1818; }

/* Subagrupación por categoría */
.separador-cat td {
    background: #f8fafc;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 4px 0;
}
.separador-cat .cat-col {
    color: var(--navy);
    font-size: 11px;
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.separador-cat .cat-col strong { color: var(--navy); }
.separador-cat .text-muted { color: var(--muted); font-size: 10px; margin-left: 4px; }
.separador-cat .dia-col { background: #f8fafc; }
.separador-cat .dia-col.fs { background: #f1f5f9; }

.free-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 0 4px;
    height: 16px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
}
.free-pill.free-ok   { background: rgba(106, 168, 90, 0.20); color: #2c6b1d; }
.free-pill.free-low  { background: rgba(212, 160, 23, 0.25); color: #6b4d00; }
.free-pill.free-zero { background: rgba(153, 27, 27, 0.20);  color: #7d1818; }

/* Fila de métricas por categoría (estilo Cloudbeds beta): % / × N libres / precio */
.cat-metrics {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 2px 0;
}
.cat-pct {
    font-size: 9px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.1;
}
.cat-precio {
    font-size: 8px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.cat-precio--fb { color: rgba(37, 99, 235, 0.55); font-weight: 500; }

/* ---------- Marcas de Temporada en thead día ---------- */
table.planning thead .dia-col.has-tempo { box-shadow: inset 0 -2px 0 rgba(37,99,235,0.55); }
.dia-evento {
    position: absolute;
    top: 1px; right: 2px;
    font-size: 9px;
    color: var(--gold);
    line-height: 1;
}
/* Min noches por categoría — en separador-cat */
.cat-min {
    display: inline-block;
    font-size: 9px;
    line-height: 1;
    padding: 1px 4px;
    background: rgba(12, 26, 40, 0.85);
    color: #fff;
    border-radius: 3px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-top: 1px;
    font-weight: 600;
}

/* La fila separador-cat necesita más altura para contener las métricas apiladas */
.separador-cat td.dia-col { height: 32px; padding: 2px 0; vertical-align: middle; }

/* Sticky: las primeras 3 columnas se quedan al hacer scroll horizontal */
table.planning .hab-col,
table.planning .cat-col,
table.planning .cap-col {
    position: sticky;
}
table.planning .hab-col { left: 0;     z-index: 7; background: white; }
table.planning .cat-col { left: 92px; z-index: 7; background: white; }
table.planning .cap-col { left: 202px; z-index: 7; background: white; }
table.planning thead .hab-col { background: var(--cream); z-index: 12; }
table.planning thead .cat-col { background: var(--cream); z-index: 12; }
table.planning thead .cap-col { background: var(--cream); z-index: 12; }
table.planning thead th { z-index: 10; }

/* ---------- Selector de vista ---------- */
.vista-switch .vista-btn { border-right: 1px solid var(--line); }
.vista-switch .vista-btn:last-child { border-right: none; }

/* ---------- Chip de categoría (sólo en vistas planas) ---------- */
.cat-chip {
    display: inline-block;
    font-size: 9px; font-weight: 500;
    color: var(--navy);
    background: rgba(37, 99, 235, 0.12);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    vertical-align: middle;
}

/* ---------- Flechas de reorden de categorías ---------- */
.cat-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.cat-arrow {
    width: 18px; height: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    border-radius: 2px;
    transition: background .15s, color .15s;
}
.cat-arrow:hover { background: var(--gold-2); color: white; }
.cat-arrow i { width: 11px; height: 11px; }

/* ---------- Toggle colapsar/expandir categoría ---------- */
.cat-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border: none;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    padding: 0;
    margin-right: 4px;
    border-radius: 3px;
    vertical-align: middle;
    transition: background .15s, transform .2s ease-out;
}
.cat-toggle:hover { background: rgba(37, 99, 235, 0.18); }
.cat-toggle i { width: 14px; height: 14px; transition: transform .2s ease-out; }
.cat-block.cat-collapsed .cat-toggle i { transform: rotate(-90deg); }

/* Cuando una categoría está colapsada, ocultamos las filas de habitaciones
   (todas las <tr> menos la separador-cat, que es la primera). */
.cat-block.cat-collapsed tr:not(.separador-cat) { display: none; }

/* ---------- Badge R ---------- */
.badge-r {
    display: inline-block;
    font-size: 9px; font-weight: 700;
    padding: 1px 4px; border-radius: 3px;
    margin-left: 2px; vertical-align: middle;
    background: var(--gold-2); color: white; border: 1px solid var(--gold);
}

/* Ocultar borde derecho entre celdas "dentro" de una pildora (browsers modernos con :has) */
table.planning tbody td.dia-col:has(.res:not(.res--out)) { border-right-color: transparent; }

/* Fallback para browsers sin :has(): la pildora se extiende 1px sobre la celda siguiente,
   tapando la línea blanca vertical. Sólo afecta a tramos internos (no en res--out). */
.res:not(.res--out) {
    margin-right: -1px;
    padding-right: 5px;
    position: relative;
    z-index: 1;
}

/* ---------- Reservas (píldoras) ---------- */
.res {
    display: block;
    height: 22px; line-height: 22px;
    margin: 2px 0;
    font-size: 10px; font-weight: 600;
    color: #2a2a2a;
    text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
    padding: 0 4px;
    border-radius: 0;  /* default sin redondeo, los bordes los redondea res--in / res--out */
    cursor: pointer;
    position: relative;
    transition: transform .12s ease-out, box-shadow .12s ease-out, filter .12s;
}
.res:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 3px 10px rgba(12, 26, 40, 0.18);
    z-index: 5;
}
.res:active { transform: translateY(0); }

/* Mientras se arrastra: las celdas originales quedan tenues */
.res--dragging { opacity: 0.35; filter: grayscale(0.4); }

/* Ghost que sigue al cursor — pildora real "volando" (mismo ancho que noches × celda) */
.res-ghost-block {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    height: 22px;
    line-height: 22px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 600;
    color: #2a2a2a;
    background: var(--res-paga);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: scale(1.06);
    opacity: 0.96;
}
.res-ghost-block.res--paga      { background: var(--res-paga);      box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px 0 var(--res-paga-border), inset 0 -1px 0 var(--res-paga-border); }
.res-ghost-block.res--pendiente { background: var(--res-pendiente); box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px 0 var(--res-pendiente-border), inset 0 -1px 0 var(--res-pendiente-border); }
.res-ghost-block.res--upgrade   { background: var(--res-upgrade);   box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px 0 var(--res-upgrade-border), inset 0 -1px 0 var(--res-upgrade-border); }
.res-ghost-block.res--grupo, .res-ghost-block.res--custom {
    box-shadow: 0 12px 28px rgba(0,0,0,0.35), inset 0 1px 0 rgba(0,0,0,0.2), inset 0 -1px 0 rgba(0,0,0,0.2);
}
.res-ghost-block--inclined {
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%) !important;
    transform: scale(1.06) !important;
}
/* Fila destino válida durante el drag */
tr.drop-target td { background: rgba(106, 168, 90, 0.12) !important; }
tr.drop-target .hab-col { background: rgba(106, 168, 90, 0.20) !important; }

/* Fila destino inválida (capacidad incompatible) */
tr.drop-invalid td { background: rgba(153, 27, 27, 0.10) !important; cursor: not-allowed; }
tr.drop-invalid .hab-col { background: rgba(153, 27, 27, 0.18) !important; }

/* Cursor durante el drag */
body.is-dragging-reserva, body.is-dragging-reserva * { cursor: grabbing !important; user-select: none; }
.res { cursor: grab; }

/* ---------- Modal de confirmación de upgrade ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 26, 40, 0.55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.30);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    animation: modal-in .2s ease-out;
}
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
}
.modal-header h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 19px;
    color: var(--navy);
    margin: 0;
}
.modal-body { padding: 18px 20px; }
.modal-row { font-size: 13px; color: var(--navy); margin: 0 0 8px; }
.modal-cat {
    text-align: center;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 600;
    margin: 4px 0;
}
.modal-cat--from { background: #f3f4f6; color: var(--muted); }
.modal-cat--to   { background: rgba(37, 99, 235, 0.15); color: var(--navy); border: 1px solid var(--gold-2); }
.modal-arrow { text-align: center; color: var(--gold); font-size: 18px; margin: 4px 0; }
.modal-question { margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--navy); text-align: center; }

.modal-prices {
    margin-top: 16px;
    padding: 14px;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 8px;
    border: 1px solid var(--line);
}
.modal-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.modal-price-row label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}
.modal-price-val {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}
.modal-price-input-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gold-2);
    border-radius: 6px;
    overflow: hidden;
    background: white;
}
.modal-currency {
    padding: 6px 8px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--navy);
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid var(--gold-2);
}
.modal-price-input-wrap input {
    width: 130px;
    padding: 6px 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    text-align: right;
    outline: none;
}
.modal-note {
    font-size: 11px;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.5;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: var(--cream);
    justify-content: flex-end;
}
.modal-btn {
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--line);
    background: white;
    color: var(--navy);
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.modal-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
.modal-btn--secondary { background: rgba(37, 99, 235, 0.12); border-color: var(--gold-2); }
.modal-btn--primary { background: var(--gold); color: white; border-color: var(--gold); }
.modal-btn--primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: white; }
.res--paga      { background: var(--res-paga);      box-shadow: inset 0 1px 0 var(--res-paga-border), inset 0 -1px 0 var(--res-paga-border); }
.res--pendiente { background: var(--res-pendiente); box-shadow: inset 0 1px 0 var(--res-pendiente-border), inset 0 -1px 0 var(--res-pendiente-border); }
.res--upgrade   { background: var(--res-upgrade);   box-shadow: inset 0 1px 0 var(--res-upgrade-border), inset 0 -1px 0 var(--res-upgrade-border); }
.res--custom    { box-shadow: inset 0 1px 0 rgba(0,0,0,0.25), inset 0 -1px 0 rgba(0,0,0,0.25); }
.res--grupo     { box-shadow: inset 0 1px 0 rgba(0,0,0,0.2),  inset 0 -1px 0 rgba(0,0,0,0.2); }

/* Lifecycle states */
.res--confirmada { background: var(--res-confirmada); box-shadow: inset 0 1px 0 var(--res-confirmada-border), inset 0 -1px 0 var(--res-confirmada-border); }
.res--checkin    { background: var(--res-checkin);    box-shadow: inset 0 1px 0 var(--res-checkin-border),    inset 0 -1px 0 var(--res-checkin-border); }
.res--checkout   { background: var(--res-checkout);   box-shadow: inset 0 1px 0 var(--res-checkout-border),   inset 0 -1px 0 var(--res-checkout-border); color: var(--muted); }
.res--noshow     { background: var(--res-noshow);     box-shadow: inset 0 1px 0 var(--res-noshow-border),     inset 0 -1px 0 var(--res-noshow-border); }

.res--alt.res--paga       { background: #d6efe0; }
.res--alt.res--pendiente  { background: #fff5d4; }
.res--alt.res--upgrade    { background: #fbdcea; }
.res--alt.res--confirmada { background: #e3eef9; }
.res--alt.res--checkin    { background: #d6efe0; }
.res--alt.res--checkout   { background: #f3f3f3; }
.res--alt.res--noshow     { background: #f8d8d8; }

/* Status dot estilo Cloudbeds — círculo rojo en borde derecho para no_show */
.res--out { position: relative; }
.res--out.res--noshow::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d63636;
    box-shadow: 0 0 0 1px white;
    z-index: 4;
}

/* Texto extra dentro de la pildora (etiqueta personalizada) */
.pill-extra {
    color: rgba(0,0,0,0.55);
    font-weight: 500;
    font-style: italic;
    margin-left: 4px;
}

.res--in  { border-top-left-radius: 11px; border-bottom-left-radius: 11px; margin-left: 2px; }
.res--out { border-top-right-radius: 11px; border-bottom-right-radius: 11px; margin-right: 2px; }

/* Texto de la reserva: flota encima de TODAS las celdas que abarca la pila.
   El JS calcula y aplica width = noches × ancho_celda - padding al cargar.
   pointer-events: none para que el click pase a la pila de abajo (drawer).
   IMPORTANTE: overflow:visible para que el .res-text absoluto pueda salir de la
   celda de entrada y pintarse sobre las celdas siguientes (middle/out). */
.res--in {
    position: relative;
    overflow: visible !important;
}
.res-text {
    position: absolute;
    top: 2px;
    left: 6px;
    height: 22px;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 6;
    color: inherit;
    font-weight: 600;
    font-size: 10px;
    /* width default: cuando JS aún no corrió o la reserva es de 1 noche */
    width: var(--pill-width, 100%);
}

/* Late check-out: media píldora dorada en la PRIMERA MITAD de la celda del día
   de salida (representa la mañana hasta 18 hs). Click → drawer de la reserva. */
.late-co-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 22px;
    margin: 2px 0;
    font-size: 14px;
    font-weight: 800;
    color: white;
    background: var(--gold);
    border-radius: 11px 0 0 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -1px 0 rgba(0,0,0,0.10);
    cursor: pointer;
    transition: transform .12s, filter .12s, box-shadow .12s;
}
.late-co-mark:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Píldoras inclinadas (parallelogramo estilo Cloudbeds beta) — toggle vía .pill-inclinada
   Usa clip-path en cada celda → todas las celdas se inclinan igual y forman un
   parallelogramo continuo. clip-path no afecta el layout interno, así el texto
   absoluto sigue legible sin contra-skew. */
table.planning.pill-inclinada .res {
    transform: skewX(-20deg) !important;
    border-radius: 3px !important;
    margin: 2px 0 !important;
}
table.planning.pill-inclinada .res:hover {
    transform: skewX(-20deg) translateY(-1px) !important;
}
table.planning.pill-inclinada .res--in,
table.planning.pill-inclinada .res--out,
table.planning.pill-inclinada .res--in.res--out {
    border-radius: 3px !important;
}
table.planning.pill-inclinada .res-text {
    /* sibling de .res, no necesita contra-skew */
    transform: none;
}
/* Visual feedback en el botón cuando está activo el modo inclinado */
.pill-style-toggle--active {
    background: var(--gold) !important;
    color: white !important;
    border-color: var(--gold) !important;
}

/* ---------- Tags dentro de la celda ---------- */
.tag-chip, .tag-nomover, .tag-medio {
    display: inline-block;
    font-size: 8px; font-weight: 700; line-height: 1;
    padding: 2px 4px; border-radius: 3px;
    margin-left: 3px; vertical-align: middle;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.tag-nomover {
    background: #991b1b; color: #ffffff;
    animation: pulseNoMover 2s ease-in-out infinite;
}
.tag-medio { background: var(--gold); color: #fff; padding: 1px 4px; }
@keyframes pulseNoMover {
    0%, 100% { box-shadow: 0 0 0 0 rgba(153,27,27,0.4); }
    50%      { box-shadow: 0 0 0 3px rgba(153,27,27,0.0); }
}

/* ---------- Drawer derecho de reserva ---------- */
.reserva-drawer {
    position: fixed;
    top: 52px; right: 0;
    width: 360px;
    height: calc(100vh - 52px);
    background: white;
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 32px rgba(12, 26, 40, 0.10);
    z-index: 25;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease-out;
}
.reserva-drawer.is-open { transform: translateX(0); }

/* Cuando el drawer está abierto, "corta" la grilla empujándola */
body.with-drawer-open main.content { margin-right: 360px; transition: margin-right .25s ease-out; }
main.content { transition: margin-right .25s ease-out; }

.drawer-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
}
.drawer-close {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    background: white;
    color: var(--muted);
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.drawer-close:hover { background: var(--navy); color: white; border-color: var(--navy); }
.drawer-close i { width: 16px; height: 16px; }

.drawer-badge {
    display: inline-block;
    font-size: 9px; font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: white;
    background: var(--muted);
}
.drawer-badge.bg-navy { background: var(--navy); }
.drawer-badge.bg-gold { background: var(--gold); }
.drawer-badge.bg-pink { background: #be185d; }
.drawer-badge.bg-red { background: #991b1b; animation: pulseNoMover 2s ease-in-out infinite; }

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    background: white;
    overflow-x: auto;
    scrollbar-width: none;
}
.drawer-tabs::-webkit-scrollbar { display: none; }
.drawer-tab {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
    white-space: nowrap;
}
.drawer-tab:hover { color: var(--navy); background: rgba(37, 99, 235, 0.06); }
.drawer-tab--active {
    color: var(--navy);
    border-bottom-color: var(--gold);
    font-weight: 600;
}
.drawer-pane { display: none; }
.drawer-pane--active { display: block; }
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 18px;
}
.drawer-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.drawer-section:last-child { border-bottom: none; }
.drawer-section h3 {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}
.drawer-row {
    font-size: 12px;
    color: #2a2a2a;
    margin: 2px 0;
}

.drawer-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--cream);
}
.drawer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--line);
    background: white;
    color: var(--navy);
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.drawer-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
.drawer-btn--primary { background: var(--gold); color: white; border-color: var(--gold); }
.drawer-btn--primary:hover { background: var(--gold-2); border-color: var(--gold-2); color: white; }
.drawer-btn--danger:hover { background: #991b1b; border-color: #991b1b; color: white; }

.drawer-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 12px;
    color: var(--navy);
    background: white;
    margin-top: 6px;
    transition: border-color .15s;
}
.drawer-input:focus { outline: none; border-color: var(--gold); }

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.color-picker-row input[type="color"] {
    width: 44px; height: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

.estado-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 6px;
}
.estado-btn {
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--line);
    background: white;
    color: var(--navy);
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.estado-btn:hover { background: var(--cream); }
.estado-btn--active {
    background: var(--navy) !important;
    color: white !important;
    border-color: var(--navy) !important;
}

@media (max-width: 768px) {
    .reserva-drawer { width: 100%; }
    body.with-drawer-open main.content { margin-right: 0; }
}

/* ---------- Switch ---------- */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #ccc; border-radius: 20px;
    transition: background .2s;
}
.switch .slider::before {
    content: ''; position: absolute;
    width: 16px; height: 16px;
    left: 2px; top: 2px;
    background: white; border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { background: #eee; cursor: not-allowed; }
.switch input:disabled + .slider::before { background: #f5f5f5; }
.check-cell.saved { background: rgba(106, 168, 90, 0.18); transition: background .8s; }

/* ---------- flatpickr theming ---------- */
.flatpickr-calendar {
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(12, 26, 40, 0.12) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}
.flatpickr-months .flatpickr-month {
    background: var(--cream) !important;
    color: var(--navy) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.flatpickr-current-month { color: var(--navy) !important; font-weight: 500 !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { color: var(--navy) !important; }
.flatpickr-weekday { color: var(--muted) !important; font-weight: 500 !important; font-size: 10px !important; text-transform: uppercase; letter-spacing: 0.08em; }
.flatpickr-day.today { border-color: var(--gold) !important; color: var(--gold) !important; font-weight: 600; }
.flatpickr-day.selected, .flatpickr-day.selected:hover {
    background: var(--navy) !important;
    border-color: var(--navy) !important;
    color: white !important;
}
.flatpickr-day:hover { background: rgba(37, 99, 235, 0.15) !important; }
.flatpickr-day.flatpickr-disabled { color: #ccc !important; }
.flatpickr-prev-month, .flatpickr-next-month { color: var(--navy) !important; fill: var(--navy) !important; }
.flatpickr-prev-month:hover, .flatpickr-next-month:hover { color: var(--gold) !important; fill: var(--gold) !important; }

/* ============================================================
   Top-bar (nav horizontal estilo Cloudbeds)
   ============================================================ */
.topbar {
    height: 52px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    z-index: 30;
}
.topbar-inner {
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 0 16px;
}
.topbar-brand {
    display: flex; align-items: center; gap: 10px;
    padding-right: 16px;
    border-right: 1px solid var(--line);
    flex-shrink: 0;
    text-decoration: none;
    color: var(--navy);
}
.topbar-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.topbar-brand-text { display: flex; flex-direction: column; gap: 3px; }

.topbar-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.topbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s, background .15s;
}
.topbar-link i { width: 18px; height: 18px; }
.topbar-link-label { display: none; }
.topbar-link:hover { color: var(--navy); background: #f3f4f6; }
.topbar-link--active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.topbar-search {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 420px;
    margin: 0 12px;
    position: relative;
}
.topbar-search-icon {
    position: absolute;
    left: 10px; top: 50%;
    transform: translateY(-50%);
    width: 14px; height: 14px;
    color: var(--muted);
    pointer-events: none;
}
.topbar-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 30px;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--navy);
    transition: background .15s, border-color .15s;
}
.topbar-search input:focus {
    outline: none;
    background: white;
    border-color: var(--gold);
}
.topbar-search input::placeholder { color: var(--muted); }

.topbar-actions {
    display: flex; align-items: center; gap: 6px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
    flex-shrink: 0;
}
.topbar-icon-btn {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.topbar-icon-btn:hover { background: #f3f4f6; color: var(--navy); }
.topbar-icon-btn i { width: 17px; height: 17px; }

.topbar-new-btn {
    height: 34px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--gold);
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.topbar-new-btn:hover { background: var(--gold-2); }
.topbar-new-btn i { width: 15px; height: 15px; }

.topbar-user {
    width: 36px; height: 36px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s, box-shadow .15s;
}
.topbar-user:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(12,26,40,0.18); }
.topbar-user-avatar {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 14px; font-weight: 700;
    letter-spacing: 0;
    color: white;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.12), 0 2px 6px rgba(12,26,40,0.15);
    border: 2px solid white;
}

.topbar-mobile-toggle {
    display: none;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    background: transparent;
    border: none;
    color: var(--navy);
    border-radius: 8px;
    cursor: pointer;
}
.topbar-mobile-toggle i { width: 18px; height: 18px; }

@media (max-width: 1100px) {
    .topbar-search { max-width: 240px; }
}
@media (max-width: 900px) {
    .topbar-new-btn span { display: none; }
    .topbar-new-btn { width: 34px; padding: 0; justify-content: center; }
    .topbar-search { display: none; }
}

@media (max-width: 768px) {
    .topbar-inner { padding: 0 10px; gap: 4px; }
    .topbar-brand-text { display: none; }
    .topbar-mobile-toggle { display: inline-flex; }
    .topbar-nav {
        position: fixed;
        top: 52px; left: 0; right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease-out;
        border-top: 1px solid var(--line);
        box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    }
    body.topnav-open .topbar-nav { max-height: 80vh; overflow-y: auto; }
    .topbar-link {
        width: auto;
        justify-content: flex-start;
        gap: 10px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--line-grid);
        margin-bottom: 0;
    }
    .topbar-link-label { display: inline; font-size: 13px; }
    .topbar-link--active {
        border-bottom-color: var(--line-grid);
        background: #eff6ff;
    }
    .topbar-icon-btn[aria-label="Notificaciones"] { display: none; }
    .planning-scroll { max-height: calc(100vh - 180px); }
    table.planning .cat-col { width: 90px; left: 56px; }
    table.planning .cap-col { left: 146px; }
}

/* ============================================================
   Lista de Reservas (/reservas)
   ============================================================ */
.reservas-table {
    border-collapse: collapse;
    width: 100%;
}
.reservas-table thead th {
    background: #fafaf7;
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 9px 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.reservas-table thead th.text-right  { text-align: right; }
.reservas-table thead th.text-center { text-align: center; }
.reservas-table tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line-grid);
    vertical-align: top;
    white-space: nowrap;
}
.reservas-table tbody tr:last-child td { border-bottom: none; }
.reservas-table .reserva-row { cursor: pointer; transition: background .12s; }
.reservas-table .reserva-row:hover { background: #faf8f3; }

.badge-estado {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-confirmada {
    background: var(--res-confirmada);
    color: #1d4b78;
    border-color: var(--res-confirmada-border);
}
.badge-checkin {
    background: var(--res-checkin);
    color: #1f5b3b;
    border-color: var(--res-checkin-border);
}
.badge-checkout {
    background: var(--res-checkout);
    color: #555;
    border-color: var(--res-checkout-border);
}
.badge-noshow {
    background: var(--res-noshow);
    color: #6b1f1f;
    border-color: var(--res-noshow-border);
}
.badge-cancelada {
    background: #f3f1ed;
    color: #999;
    border-color: #d6d2cb;
    text-decoration: line-through;
}

.chip-filter {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--muted);
    background: white;
    border: 1px solid var(--line);
    text-decoration: none;
    transition: background .12s, color .12s, border-color .12s;
}
.chip-filter:hover {
    border-color: var(--gold);
    color: var(--navy);
}
.chip-filter--active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}
.chip-filter--active:hover {
    background: #142639;
    color: white;
}

.dot-pago {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-pago--ok   { background: #4ba373; }
.dot-pago--pend { background: #c79a2a; }

.flag-up    { color: #c46699; font-weight: 700; }
.flag-nomov { color: #b85555; font-weight: 700; }
.flag-half  { color: var(--gold); font-weight: 700; font-size: 13px; }

/* ---------- Batch 1 Cloudbeds: dots y badges ---------- */
.hab-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.hab-dot--limpia      { background: #4ba373; }
.hab-dot--sucia       { background: #c0392b; }
.hab-dot--en_progreso { background: #d4a017; }
.hab-dot--inspeccion  { background: #3b82f6; }

.badge-ada {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #1c4870;
    vertical-align: middle;
}

/* ============================================================
   Toolbar planning — rediseñado moderno
   ============================================================ */
.pl-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fafaf7 100%);
    border: 1px solid #e6e2d6;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(12, 26, 40, 0.04), 0 1px 2px rgba(12, 26, 40, 0.06);
}
.pl-tb-group { display: flex; align-items: center; gap: 4px; }
.pl-tb-nav { gap: 2px; }
.pl-tb-dates { display: flex; align-items: center; gap: 6px; }
.pl-tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-arrow { color: #9ca3af; font-size: 14px; font-weight: 600; }

/* Inputs limpios */
.pl-input {
    padding: 7px 11px;
    border: 1px solid #d6d3c4;
    border-radius: 7px;
    font-size: 13px; color: var(--navy);
    background: white;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.pl-input:hover { border-color: #b8b39e; }
.pl-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.15); }
.pl-input[type="text"] { width: 130px; }
.pl-select-month { padding-right: 28px; cursor: pointer; }

/* Botón primary navy */
.pl-btn {
    padding: 7px 14px;
    border: none; border-radius: 7px;
    font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    cursor: pointer; transition: all .15s;
    background: white; color: var(--navy); border: 1px solid #d6d3c4;
}
.pl-btn-primary { background: var(--navy); color: white; border: 1px solid var(--navy); box-shadow: 0 1px 2px rgba(12,26,40,0.15); }
.pl-btn-primary:hover { background: #0f2235; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(12,26,40,0.2); }

/* Icon buttons (chevrons) */
.pl-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 7px; border: 1px solid #d6d3c4;
    background: white; color: var(--navy);
    cursor: pointer; transition: all .15s;
    text-decoration: none;
}
.pl-icon-btn:hover { background: var(--navy); color: white; border-color: var(--navy); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(12,26,40,0.15); }
.pl-icon-btn i, .pl-icon-btn svg { width: 16px; height: 16px; }
.pl-icon-btn--lg { width: auto; min-width: 32px; padding: 0 10px; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* Chips (Hoy / Próx 30 / Temp) */
.pl-chip {
    padding: 7px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: white; color: #6b7280;
    border: 1px solid #e6e2d6;
    text-decoration: none; transition: all .15s;
}
.pl-chip:hover { background: var(--navy); color: white; border-color: var(--navy); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(12,26,40,0.12); }

/* Segmented control moderno (Vista) */
.pl-segmented {
    display: inline-flex;
    background: #f3f1ea;
    border: 1px solid #d6d3c4;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.pl-segmented-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}
.pl-segmented-btn:hover { color: var(--navy); }
.pl-segmented-btn.is-active { background: white; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.pl-segmented-btn i, .pl-segmented-btn svg { width: 13px; height: 13px; }

/* Leyenda popover */
.pl-leyenda { position: relative; }
.pl-leyenda summary { list-style: none; cursor: pointer; }
.pl-leyenda summary::-webkit-details-marker { display: none; }
.pl-leyenda-pop {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: white; border: 1px solid #e6e2d6;
    border-radius: 8px; padding: 10px 12px;
    box-shadow: 0 10px 30px rgba(12,26,40,0.12);
    min-width: 260px; z-index: 30;
    display: flex; flex-wrap: wrap; gap: 5px;
}
.pl-leyenda-title { width: 100%; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.pl-leyenda-tag { font-size: 10px; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }

/* Iconos pequeños dentro de pildora (estado lifecycle + lock) — Cloudbeds-style */
/* Quitar flechas spinner de inputs number marcados */
.rf-no-spin::-webkit-outer-spin-button,
.rf-no-spin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rf-no-spin { -moz-appearance: textfield; appearance: textfield; }

.pill-icon { display: inline-block; margin-right: 4px; font-size: 11px; vertical-align: middle; }
.pill-icon--checkin { color: #155724; font-weight: 700; }
.pill-icon--checkout { color: #555; }
.pill-icon--noshow { color: #c0392b; }
.pill-icon--confirmada { filter: grayscale(0.3); opacity: 0.85; }
.pill-icon--lock { color: #c0392b; }

.canal-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
}
.canal-dot--booking    { background: #003580; }
.canal-dot--airbnb     { background: #ff5a5f; }
.canal-dot--despegar   { background: #6f42c1; }
.canal-dot--directo    { background: #4ba373; }
.canal-dot--walkin     { background: #f59e0b; }
.canal-dot--telefono   { background: #06b6d4; }
.canal-dot--web        { background: #0ea5e9; }
.canal-dot--email      { background: #64748b; }
.canal-dot--motor-propio { background: #16a34a; }
.canal-dot--motor_propio { background: #16a34a; }
.canal-dot--otro       { background: #9ca3af; }

/* ---------- Batch 2: badge alerta ⚠ por habitación ---------- */
.hab-num-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    vertical-align: middle;
}
.hab-num-btn:hover { color: var(--gold); text-decoration: underline; }

.badge-alert {
    display: inline-block;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 14px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #d4a017;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
    vertical-align: middle;
    animation: alert-pulse 2s ease-in-out infinite;
}
.badge-alert:hover { background: #ffe68a; }
@keyframes alert-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
    50%      { box-shadow: 0 0 0 4px rgba(212, 160, 23, 0); }
}

.alert-popup {
    position: absolute;
    z-index: 1000;
    width: 320px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-size: 13px;
}
.alert-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    border-radius: 6px 6px 0 0;
}
.alert-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}
.alert-popup-close:hover { color: var(--navy); }
.alert-popup-list { max-height: 200px; overflow-y: auto; padding: 4px 0; }
.alert-popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.alert-popup-item:last-child { border-bottom: none; }
.alert-popup-tipo {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e5e5e5;
    color: #555;
    font-weight: 600;
    flex-shrink: 0;
}
.alert-popup-item[data-tipo="mantenimiento"] .alert-popup-tipo { background: #fee2e2; color: #991b1b; }
.alert-popup-item[data-tipo="limpieza"]      .alert-popup-tipo { background: #fef3c7; color: #92400e; }
.alert-popup-item[data-tipo="bloqueo"]       .alert-popup-tipo { background: #e0e7ff; color: #3730a3; }
.alert-popup-item[data-tipo="nota"]          .alert-popup-tipo { background: #dcfce7; color: #166534; }
.alert-popup-msg { flex: 1; font-size: 12px; color: var(--navy); }
.alert-popup-resolver {
    background: #4ba373;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}
.alert-popup-resolver:hover { background: #3d8a5f; }
.alert-popup-form {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    background: #fafafa;
    border-radius: 0 0 6px 6px;
}
.alert-popup-form select,
.alert-popup-form input {
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 12px;
}
.alert-popup-form input { flex: 1; }
.alert-popup-btn--primary {
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}
.alert-popup-btn--primary:hover { background: var(--gold-2); }

/* ---------- Batch B: Wizard Nueva Reserva ---------- */
.wizard-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wizard-backdrop[hidden] { display: none; }
.wizard {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.wizard-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    border-radius: 8px 8px 0 0;
}
.wizard-title { font-family: var(--font-serif, serif); font-size: 20px; color: var(--navy); margin: 0; }
.wizard-close {
    background: none; border: none; font-size: 26px; line-height: 1;
    cursor: pointer; color: var(--muted);
}
.wizard-close:hover { color: var(--navy); }
.wizard-steps {
    display: flex;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: #fafafa;
    gap: 4px;
}
.wizard-step {
    flex: 1;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.wizard-step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #e5e5e5;
    font-weight: 700;
    color: white;
    font-size: 11px;
}
.wizard-step.is-active { color: var(--navy); border-bottom-color: var(--gold); }
.wizard-step.is-active span { background: var(--gold); }
.wizard-step.is-done { color: var(--navy); }
.wizard-step.is-done span { background: #4ba373; }

.wizard-body { padding: 20px; overflow-y: auto; flex: 1; }
.wizard-pane { display: none; }
.wizard-pane.is-active { display: block; }

.wizard-grid-2, .wizard-grid-3 {
    display: grid;
    gap: 12px;
}
.wizard-grid-2 { grid-template-columns: 1fr 1fr; }
.wizard-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.wizard-full { grid-column: 1 / -1; }
.wizard-body label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.wizard-body input, .wizard-body select, .wizard-body textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 13px;
    color: var(--navy);
    background: white;
    box-sizing: border-box;
}
.wizard-body input:focus, .wizard-body select:focus, .wizard-body textarea:focus {
    outline: none; border-color: var(--gold);
}
.wizard-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0;
}
.wizard-toggle input { width: auto; }
.wizard-toggle label { margin: 0; text-transform: none; font-size: 13px; color: var(--navy); }

.wizard-noches {
    display: flex; align-items: center; gap: 8px;
    padding-top: 22px;
    font-size: 13px;
    color: var(--navy);
}
.wizard-noches span { color: var(--muted); font-size: 11px; text-transform: uppercase; }

.wizard-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }
.wizard-error { padding: 10px; background: #fee2e2; color: #991b1b; border-radius: 4px; font-size: 13px; }
.wizard-loading { padding: 10px; color: var(--muted); font-size: 13px; }
.wizard-ok { padding: 10px; background: #dcfce7; color: #166534; border-radius: 4px; font-size: 13px; }

.wizard-habs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; max-height: 280px; overflow-y: auto; }
.wizard-hab {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}
.wizard-hab:hover { border-color: var(--gold); background: #fffdf7; }
.wizard-hab input[type="radio"] { width: auto; margin: 0; }
.wizard-hab-info { flex: 1; }
.wizard-hab-num { font-weight: 700; color: var(--navy); font-size: 14px; }
.wizard-hab-meta { font-size: 11px; color: var(--muted); }
.wizard-hab-gap { font-size: 11px; color: #555; margin-top: 2px; }
.wizard-badge {
    padding: 3px 10px; border-radius: 12px; font-size: 10px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.wizard-badge--ideal { background: #dcfce7; color: #166534; }
.wizard-badge--ok    { background: #dbeafe; color: #1c4870; }
.wizard-badge--hueco { background: #fef3c7; color: #92400e; }

.wizard-hab-cat {
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
}

.wizard-cat-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.wizard-cat-card {
    text-align: left;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.wizard-cat-card:hover {
    border-color: var(--gold);
    background: #fffdf7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.wizard-cat-nombre {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wizard-cat-count { font-size: 13px; color: var(--muted); }
.wizard-cat-count strong { color: #166534; font-size: 18px; }

.wizard-step { cursor: pointer; transition: background 0.15s; user-select: none; }
.wizard-step:hover { background: rgba(212, 160, 23, 0.12); color: var(--navy); }
.wizard-step:hover span { transform: scale(1.08); }
.wizard-step * { pointer-events: none; }

.wizard-tarjeta {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed var(--gold);
    border-radius: 6px;
    background: #fffdf7;
}
.wizard-subtitle {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--navy);
    margin: 0 0 8px 0;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.wizard-resumen { background: #fafafa; padding: 12px 16px; border-radius: 6px; border: 1px solid var(--line); }
.wizard-resumen-row {
    display: flex; justify-content: space-between; padding: 6px 0;
    border-bottom: 1px solid #eee; font-size: 13px;
}
.wizard-resumen-row:last-child { border: none; }
.wizard-resumen-row span { color: var(--muted); }
.wizard-resumen-row strong { color: var(--navy); }
.wizard-mensaje { margin-top: 12px; }

.wizard-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: #fafafa;
    border-radius: 0 0 8px 8px;
    gap: 8px;
}
.wizard-btn {
    padding: 8px 16px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.wizard-btn:hover { border-color: var(--navy); }
.wizard-btn--primary { background: var(--gold); color: white; border-color: var(--gold); margin-left: auto; }
.wizard-btn--primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
