/* --- botón de Hostaway -------------------------------------------------------------- */
.hostaway-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.hostaway-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid #c9d6e8; background: #fff; color: #17325c; font-weight: 600; font-size: 14px; cursor: pointer; }
.hostaway-btn:hover { background: #f1f6fd; }
.ha-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #1f5eff;
  color: #fff; font: 700 14px/1 system-ui, sans-serif; }

/* --- pop-up que imita Hostaway ----------------------------------------------------- */
body.ha-lock { overflow: hidden; }
.ha-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; padding: 16px; }
.ha-window { width: min(1180px, 100%); height: min(720px, 100%); display: grid; grid-template-rows: auto 1fr auto;
  background: #f6f8fb; border-radius: 16px; overflow: hidden; color: #1e293b; font: 14px/1.4 Inter, system-ui, sans-serif;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.5); }
.ha-top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: #0f2147; color: #fff; flex-wrap: wrap; }
.ha-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.ha-sim { font: 500 10px/1 system-ui; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,0.12); color: #c7d4ee; }
.ha-tabs { display: flex; gap: 4px; flex: 1; }
.ha-tabs button { border: 0; background: transparent; color: #c7d4ee; padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.ha-tabs button.on { background: rgba(255,255,255,0.14); color: #fff; }
.ha-count { margin-left: 4px; background: #ff5a5f; color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 11px; }
.ha-actions { display: flex; gap: 6px; }
.ha-actions button { border: 1px solid rgba(255,255,255,0.25); background: transparent; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.ha-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.ha-main { overflow: auto; padding: 14px; }
.ha-detail { border-left: 1px solid #e2e8f0; background: #fff; overflow: auto; padding: 16px; }
.ha-cal { width: max-content; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.ha-row { display: flex; border-bottom: 1px solid #edf1f6; }
.ha-row:last-child { border-bottom: 0; }
.ha-room { position: sticky; left: 0; z-index: 3; width: 170px; flex: none; padding: 10px 12px; background: #fff; border-right: 1px solid #e2e8f0; display: grid; gap: 2px; }
.ha-room small { color: #64748b; font-size: 11px; }
.ha-prop { background: #f8fafc; }
.ha-lane { position: relative; height: 54px; flex: none;
  background-image: linear-gradient(90deg, #eef2f7 1px, transparent 1px); background-size: 38px 100%; }
.ha-head .ha-lane { height: 54px; background-color: #f8fafc; }
.ha-day { position: absolute; top: 0; width: 38px; height: 54px; display: grid; align-content: end; justify-items: center; padding-bottom: 6px; color: #64748b; font-size: 11px; }
.ha-day b { color: #1e293b; font-size: 13px; }
.ha-day em { position: absolute; top: 3px; left: 4px; font-style: normal; font-weight: 700; color: #1f5eff; font-size: 10px; text-transform: uppercase; }
.ha-day.weekend { background: rgba(241, 245, 249, 0.8); }
.ha-day.today b { background: #1f5eff; color: #fff; border-radius: 999px; padding: 1px 6px; }
.ha-today { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(31, 94, 255, 0.35); z-index: 1; }
.ha-bar { position: absolute; top: 9px; height: 36px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  border: 0; border-radius: 8px; color: #fff; font: 600 12px/1.1 Inter, system-ui, sans-serif; cursor: pointer; overflow: hidden; white-space: nowrap; text-align: left; }
.ha-bar span { overflow: hidden; text-overflow: ellipsis; }
.ha-bar small { margin-left: auto; opacity: 0.85; font-weight: 500; }
.ha-bar.airbnb, .dot.airbnb, .ha-chip.airbnb { background: #ff5a5f; }
.ha-bar.booking, .dot.booking, .ha-chip.booking { background: #003580; }
.ha-bar.direct, .dot.direct, .ha-chip.direct { background: #13a07c; }
.ha-bar.block, .dot.block { background: repeating-linear-gradient(135deg, #cbd5e1 0 6px, #e2e8f0 6px 12px); color: #475569; cursor: default; }
.ha-bar.whole { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.45); }
.ha-bar.pending { background: repeating-linear-gradient(135deg, #13a07c 0 10px, #36b893 10px 20px); }
.ha-bar.sel { outline: 3px solid #fbbf24; outline-offset: 1px; }
.ha-bar.flash { animation: ha-flash 1.2s ease-in-out 4; }
@keyframes ha-flash { 50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.9); transform: translateY(-1px); } }
.ha-ai { font-style: normal; font-size: 9px; padding: 2px 4px; border-radius: 4px; background: rgba(255,255,255,0.25); }
.ha-note { color: #64748b; font-size: 12px; margin: 10px 2px 0; }
.ha-foot { display: flex; gap: 16px; align-items: center; padding: 8px 16px; border-top: 1px solid #e2e8f0; background: #fff; font-size: 12px; color: #475569; flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ha-live { margin-left: auto; color: #13a07c; font-weight: 600; }
.ha-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; font-size: 13px; }
.ha-table th { text-align: left; font-weight: 600; color: #64748b; background: #f8fafc; padding: 9px 10px; border-bottom: 1px solid #e2e8f0; }
.ha-table td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.ha-table tr.sel td { background: #fff7e0; }
.ha-table tr.cancelled td { color: #94a3b8; text-decoration: line-through; }
.ha-status { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 7px; border-radius: 999px; background: #e0f2fe; color: #0369a1; }
.ha-status.modified { background: #fef3c7; color: #92400e; }
.ha-status.pending { background: #ede9fe; color: #5b21b6; }
.ha-status.cancelled { background: #fee2e2; color: #b91c1c; }
.ha-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ha-feed li { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #13a07c; border-radius: 10px; padding: 10px 12px; }
.ha-feed li.modified { border-left-color: #f59e0b; }
.ha-feed li.cancelled, .ha-feed li.urgent { border-left-color: #ef4444; }
.ha-feed li.message { border-left-color: #6366f1; }
.ha-feed time { color: #64748b; font-size: 12px; margin-right: 8px; }
.ha-feed p { margin: 6px 0 0; color: #334155; }
.ha-by { color: #64748b; font-size: 12px; margin-left: 8px; }
.ha-empty, .ha-empty-detail { color: #64748b; }
.ha-empty-detail b { color: #1e293b; }
.ha-card h3 { margin: 10px 0 2px; font-size: 20px; }
.ha-card-top { display: flex; justify-content: space-between; align-items: center; }
.ha-chip { color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.ha-code { margin: 0 0 12px; color: #64748b; font-size: 13px; }
.ha-card dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.ha-card dt { color: #64748b; }
.ha-card dd { margin: 0; }
.ha-card h4 { margin: 16px 0 6px; font-size: 13px; }
.ha-history { margin: 0; padding-left: 16px; font-size: 12px; color: #475569; display: grid; gap: 4px; }
.ha-history time { color: #64748b; }
@media (max-width: 760px) {
  .ha-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ha-detail { border-left: 0; border-top: 1px solid #e2e8f0; max-height: 40vh; }
  .ha-room { width: 120px; }
}

/* Hostaway acoplado a la derecha durante la llamada: la columna del cliente queda visible. */
.ha-overlay.docked { inset: 12px 12px 12px auto; width: min(820px, calc(100vw - 440px)); padding: 0; background: none; place-items: stretch; pointer-events: none; }
.ha-overlay.docked .ha-window { width: 100%; height: 100%; pointer-events: auto; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45); }
.ha-overlay.docked .ha-body { grid-template-columns: minmax(0, 1fr) 240px; }
@media (max-width: 1100px) {
  .ha-overlay.docked { inset: auto 8px 8px 8px; width: auto; height: 52vh; }
  .ha-overlay.docked .ha-body { grid-template-columns: minmax(0, 1fr); }
  .ha-overlay.docked .ha-detail { display: none; }
}

/* Botón de uso y facturación: bien visible en la barra de arriba. */
.billing-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: var(--terra); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none;
  box-shadow: 0 8px 20px -10px rgba(180, 83, 42, 0.8); }
.billing-btn:hover { filter: brightness(1.08); }

/* Hostaway · tareas del equipo */
.ha-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ha-tasks li { background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #6366f1; border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.ha-tasks li.done { opacity: 0.6; border-left-color: #13a07c; }
.ha-tasks li.urgent { border-left-color: #ef4444; }
.ha-task-top, .ha-task-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ha-task-meta { color: #64748b; font-size: 12px; }
.ha-task-bottom button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ha-team h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.ha-team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ha-team li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #94a3b8; }
.ha-team li.on { color: #1e293b; font-weight: 600; }
.ha-team li small { font-weight: 400; color: #64748b; }
.ha-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-right: 6px; }
.ha-team li.on .ha-dot { background: #13a07c; }

/* --- Voxofi Stays: el gestor propio de Villa Asri (editable) ------------------------------- */
.ha-logo.stays-logo { background: var(--terra); }
.ha-bar.ch-phone, .dot.ch-phone, .ha-chip.ch-phone { background: #7c3aed; }
.ha-bar.ch-walkin, .dot.ch-walkin, .ha-chip.ch-walkin { background: #d97706; }
.ha-lane.editable { cursor: copy; }
.ha-bar.block { border: 0; font: inherit; }
.stays-form { display: grid; gap: 8px; }
.stays-form label { display: grid; gap: 3px; font-size: 12px; color: #64748b; }
.stays-form input, .stays-form select, .stays-room input, .stays-price input, .stays-price select { font: 13px Inter, system-ui, sans-serif; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1e293b; }
.stays-form h4 { margin: 14px 0 0; }
.stays-check { display: flex !important; align-items: center; gap: 6px; flex-direction: row; }
.stays-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.stays-actions button, .stays-room button, .stays-price button, .stays-prices button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: 600 13px Inter, system-ui, sans-serif; }
.stays-actions .stays-primary { background: #0f2147; color: #fff; border-color: #0f2147; }
.stays-toggle { display: flex; gap: 4px; background: #f1f5f9; border-radius: 10px; padding: 3px; }
.stays-toggle button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 6px; cursor: pointer; font: 600 12px Inter, system-ui, sans-serif; color: #64748b; }
.stays-toggle button.on { background: #fff; color: #0f2147; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.stays-alert { background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 8px 10px; margin: 0 0 10px; font-size: 13px; }
.stays-rooms { display: grid; gap: 8px; }
.stays-rooms h4 { margin: 8px 0 0; }
.stays-room { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(140px, 1.5fr) 64px 80px 80px 64px auto auto; gap: 6px; align-items: center; }
.stays-head { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.stays-new { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 6px; grid-template-columns: minmax(130px, 1.2fr) minmax(140px, 1.5fr) 64px 80px 80px 64px auto; }
.stays-prices { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.stays-prices li { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stays-price { display: flex; gap: 6px; flex-wrap: wrap; align-items: end; }
.stays-price label { display: grid; gap: 2px; font-size: 11px; color: #64748b; }
