/* Portal de cliente — estilos propios sobre assets/css/idswift-ui.css.
 * Solo lo que el sistema no da: cabecera del portal, tarjetas de grupo y
 * hotel, barra de preparación, editor por secciones, texto enriquecido,
 * estrellas, recepciones, vista previa y aviso flotante. Sin colores
 * sueltos: todo sale de los tokens. */

.portal-header { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 10px 20px; }
.portal-lockup { text-decoration: none; }
.portal-lockup .brand-lockup__product { font-size: 18px; }
.portal-lockup .brand-lockup__by { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--idswift-mint, #91cca9); font-weight: 700; }
.portal-back { text-decoration: none; font-size: 16px; padding: 0 9px; }
.portal-public { max-width: 460px; margin: 60px auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 22px 24px; }
.portal-public h1 { font-size: 20px; margin: 0 0 6px; }
.portal-public .brand-lockup { margin-bottom: 14px; }
.portal-pill { background: var(--brand); color: var(--brand-text); border-color: var(--brand); }
.portal-pill.is-support { background: var(--accent); color: var(--brand); border-color: var(--accent); }
.portal-header-center { justify-self: center; font-size: var(--fs-h2); font-weight: 600; color: var(--ink); text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-user { font-size: var(--fs-small); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.portal-profile-h { margin: 14px 0 2px; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.portal-profile-groups { display: flex; flex-direction: column; gap: 4px; }
.portal-profile-group { display: flex; gap: 8px; align-items: baseline; }

/* Móvil: la rejilla de 3 columnas no cabe (las acciones miden más que su
   tercio y se montan sobre la marca). Pasa a filas: marca a la izquierda y
   acciones a la derecha, bajando de fila si no caben. */
@media (max-width: 720px) {
  .portal-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 16px; }
  .portal-header .idsw-header-left { flex: 0 0 auto; }
  .portal-header .idsw-header-actions { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
  .portal-header-center { display: none; } /* repite el título de la página */
  .portal-user { max-width: 46vw; }
}

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang-toggle button { border: 0; background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; padding: 0 9px; height: 26px; cursor: pointer; letter-spacing: .08em; }
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--brand-text); }

.portal-main { padding-top: 22px; max-width: 1180px; }
.portal-h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: var(--ink); letter-spacing: -.01em; }
.portal-sub { margin: 0 0 18px; color: var(--muted); font-size: var(--fs-small); max-width: 70ch; }
.portal-crumbs { font-size: var(--fs-small); color: var(--muted); margin-bottom: 10px; }
.portal-crumbs a { color: var(--brand); text-decoration: none; }
.portal-crumbs a:hover { text-decoration: underline; }

/* --- Tarjetas de grupo / hotel ------------------------------------------ */
.portal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.portal-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.portal-card h3 { margin: 0; font-size: var(--fs-h2); font-weight: 600; }
.portal-card .portal-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-card .portal-card-actions { margin-top: auto; display: flex; gap: 8px; justify-content: flex-end; }
.portal-card.is-link { cursor: pointer; transition: border-color .12s ease; }
.portal-card.is-link:hover { border-color: var(--ink); }

/* --- Preparación ---------------------------------------------------------- */
.portal-progress { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.portal-progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s ease; }
.portal-progress.is-done > span { background: var(--ok); }
.portal-ready-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.portal-ready-pct { white-space: nowrap; font-size: 26px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.portal-ready-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; }
.portal-ready-list li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.portal-ready-list li .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.portal-ready-list li.is-ok .dot { background: var(--ok); }
.portal-ready-list li.is-missing .dot { background: var(--err); }
.portal-ready-list li.is-pending .dot { background: var(--warn); }
.portal-ready-list li a { margin-left: auto; color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.portal-ready-list li .who { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* --- Editor de hotel --------------------------------------------------- */
.portal-editor { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .portal-editor { grid-template-columns: 200px minmax(0, 1fr); } }
@media (max-width: 720px) { .portal-editor { grid-template-columns: 1fr; } }
.portal-nav { position: sticky; top: calc(var(--portal-hdr-h, 56px) + 8px); display: flex; flex-direction: column; gap: 2px; }
/* Menú de la ficha del hotel: tres bloques (datos, productos, instalación),
   el mismo en todas las páginas del hotel. */
.portal-nav-group { margin: 14px 0 4px; padding: 0 10px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.portal-nav-group:first-child { margin-top: 0; }
.portal-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); font-size: var(--fs-small); color: var(--ink-soft); text-decoration: none; }
.portal-nav-item:hover { background: var(--paper); }
.portal-nav-item[aria-current="page"] { background: var(--paper); border-color: var(--line); color: var(--ink); font-weight: 600; }
.portal-nav-item.is-more { color: var(--brand); font-weight: 600; }
.portal-nav-item.is-muted { color: var(--muted); }
.portal-nav-item[hidden] { display: none; }
.portal-nav .badge { font-size: var(--fs-xs); font-weight: 700; color: var(--err); background: var(--err-bg); border-radius: 999px; padding: 1px 7px; }
.portal-nav .idsw-pill { font-size: 9.5px; }
/* Dentro de la ficha, la página concreta no repite migas ni título grande. */
.portal-hotel-body { min-width: 0; }
.portal-hotel-body .portal-crumbs { display: none; }
.portal-hotel-body .portal-h1 { font-size: 18px; }
.portal-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.portal-tabs a { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: var(--fs-small); text-decoration: none; white-space: nowrap; }
.portal-tabs a[aria-selected="true"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.portal-tabs[hidden] { display: none; }

/* Portada del grupo: hoteles, preparación y accesos en tres bloques. */
.portal-group-label { margin: 18px 0 8px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
a.portal-hotel-card { color: var(--ink); text-decoration: none; }
.portal-hotel-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portal-chev { color: var(--muted); font-size: 20px; line-height: 1; font-weight: 400; }
.portal-hotel-cards { margin-bottom: 14px; }
.portal-ready-line { padding: 10px 16px; }
.portal-ready-line .portal-activation { display: flex; align-items: center; gap: 10px; }
.portal-ready-line .portal-activation p { margin: 0; }
.portal-navgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 20px; }
.portal-navgroup { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 4px 6px 6px; }
.portal-navgroup .portal-group-label { margin: 10px 10px 4px; }
.portal-navlink { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.portal-navlink:hover { background: var(--bg); }
.portal-navlink-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.portal-navlink strong { font-size: var(--fs-body); font-weight: 600; }
.portal-navlink .help { font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 900px) { .portal-navgroups { grid-template-columns: 1fr; } }

/* Móvil: el menú de la ficha es una barra horizontal fija bajo la cabecera. */
@media (max-width: 720px) {
  .portal-nav { position: sticky; top: var(--portal-hdr-h, 0px); z-index: 10; flex-direction: row; align-items: center; gap: 6px;
    overflow-x: auto; margin: 0 -16px; padding: 8px 16px; background: var(--bg); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); scrollbar-width: none; }
  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-nav-group, .portal-nav-group:first-child { flex: 0 0 auto; margin: 0 0 0 6px; padding: 0 2px; }
  .portal-nav-group:first-child { margin-left: 0; }
  .portal-nav-item { flex: 0 0 auto; white-space: nowrap; min-height: 36px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13.5px; }
  .portal-nav-item[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--brand-text); }
  .portal-nav-item.is-more { border-style: dashed; background: transparent; }
  .portal-navgroups { gap: 10px; }
  .portal-navgroup { background: transparent; border: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .portal-navgroup .portal-group-label { margin: 8px 0 2px; }
  .portal-navlink { min-height: 56px; box-sizing: border-box; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); }
}

.portal-form { display: flex; flex-direction: column; gap: 14px; }
.portal-field { display: flex; flex-direction: column; gap: 4px; }
.portal-field > label { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.portal-field > label .req { color: var(--err); margin-left: 4px; }
.portal-field .help { font-size: var(--fs-xs); color: var(--muted); }
.portal-field > label .sens { margin-left: 8px; padding: 1px 6px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; color: var(--brand, #0e3d36); background: var(--brand-soft, rgba(14, 61, 54, 0.1)); vertical-align: middle; }
.portal-field .help.is-sens { color: var(--brand, #0e3d36); }
.portal-field input[type="text"], .portal-field input[type="email"], .portal-field input[type="url"], .portal-field input[type="password"], .portal-field textarea {
  width: 100%; padding: 0 9px; height: var(--ctrl-h); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }
.portal-field textarea { height: auto; min-height: 80px; padding: 8px 9px; resize: vertical; }
.portal-field input:focus, .portal-field textarea:focus, .portal-rich:focus { outline: none; border-color: var(--ink); }
.portal-field.is-invalid > label { color: var(--err); }
.portal-field.is-invalid input, .portal-field.is-invalid .portal-rich { border-color: var(--err); }
.portal-field.is-readonly input { background: var(--line-soft); color: var(--muted); }

.portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.portal-actions .status { font-size: var(--fs-small); color: var(--muted); }
.portal-actions .status.is-err { color: var(--err); }
.portal-actions .status.is-ok { color: var(--ok); }

/* texto enriquecido */
.portal-rich-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.portal-rich-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.portal-rich-tools button, .portal-rich-tools select { height: 26px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); font-size: var(--fs-xs); font-weight: 700; padding: 0 8px; cursor: pointer; color: var(--ink-soft); font-family: inherit; }
.portal-rich-tools select { font-weight: 500; }
.portal-rich { min-height: 90px; padding: 8px 10px; font-size: var(--fs-small); line-height: 1.5; border: 1px solid transparent; }
.portal-rich.is-compact { min-height: 40px; }
.portal-rich span[id^="brand-"], .portal-rich .brand-upper { background: var(--warn-bg); color: var(--warn); border-radius: 2px; padding: 0 3px; font-size: var(--fs-xs); font-weight: 700; }
.portal-rich span[id^="brand-"]:empty::after, .portal-rich .brand-upper:empty::after { content: attr(data-var); }
.portal-rich .liability-row { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.portal-rich .liability-header { font-weight: 700; }

/* estrellas */
.portal-stars { display: inline-flex; gap: 4px; }
.portal-stars button { width: 34px; height: var(--ctrl-h); border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); cursor: pointer; font-size: 16px; color: var(--muted-2); }
.portal-stars button[aria-pressed="true"] { color: var(--accent); border-color: var(--ink); background: var(--ink); }
.portal-stars .clear { width: auto; padding: 0 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }

/* chips */
.portal-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 10px; }
.portal-chips label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-soft); padding: 3px 0; }

/* interruptor */
.portal-toggle { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--ink-soft); cursor: pointer; }
.portal-toggle input { width: 38px; height: 22px; appearance: none; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s ease; }
.portal-toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s ease; }
.portal-toggle input:checked { background: var(--brand); }
.portal-toggle input:checked::after { left: 19px; }

/* recepciones */
.portal-fd { display: flex; flex-direction: column; gap: 6px; }
.portal-fd-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; }
.portal-fd-row input { width: 100%; padding: 0 9px; height: var(--ctrl-h); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }
.portal-fd-row input:focus { outline: none; border-color: var(--ink); }

/* logo */
.portal-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portal-logo-box { width: 160px; height: 90px; border: 1px dashed var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--paper); overflow: hidden; }
.portal-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.portal-logo-box span { font-size: var(--fs-xs); color: var(--muted-2); }
.portal-logo input[type="file"] { font-size: var(--fs-small); }

/* colores */
.portal-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.portal-color { display: flex; flex-direction: column; gap: 3px; }
.portal-color label { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.portal-color .row { display: flex; gap: 6px; align-items: center; }
.portal-color input[type="color"] { width: 34px; height: var(--ctrl-h); padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.portal-color input[type="text"] { flex: 1; min-width: 0; height: var(--ctrl-h); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius); font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-small); color: var(--ink); background: var(--paper); }

/* aviso flotante */
.portal-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--brand-text); padding: 10px 16px; border-radius: var(--radius-2); font-size: var(--fs-small); box-shadow: 0 10px 30px rgba(14, 61, 54, .3); z-index: 900; max-width: 90vw; }
.portal-toast.is-err { background: var(--err); color: #fff; }

.portal-empty { padding: 40px 0; text-align: center; color: var(--muted); }
/* Error de CARGA de una sección: tarjeta centrada, no una línea suelta en
 * mitad de la página en blanco. */
.portal-load-error { max-width: 520px; margin: 48px auto; padding: 28px 28px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.portal-load-error h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--ink, inherit); }
.portal-load-error p { margin: 0 0 12px; color: var(--muted); }
.portal-load-error .help { font-size: var(--fs-small); }
.portal-load-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.portal-note { font-size: var(--fs-small); color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 8px 12px; }

/* Enlaces con aspecto de botón. `.idsw-btn` está pensado para <button>:
 * como <a> ni centra el texto en su alto (salía pegado arriba en el
 * catálogo de productos) ni pierde el subrayado, y `.idsw-app a { color:
 * inherit }` le gana por especificidad y dejaba el texto invisible sobre
 * el fondo oscuro. Una sola regla para todo el portal. */
.idsw-app a.idsw-btn { display: inline-flex; align-items: center; justify-content: center; color: var(--brand-text); text-decoration: none; }
.idsw-app a.idsw-btn-ghost { text-decoration: none; }

/* --- Conexiones (Fase 2) ------------------------------------------------ */
.portal-apply { border-left: 3px solid var(--line); }
.portal-apply.is-pending { border-left-color: var(--warn); background: var(--warn-bg); }
.portal-conn-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.portal-conn-head h2 { margin: 0; }
.portal-conn-head .idsw-pill { max-width: 100%; white-space: normal; }
.portal-conn .portal-field input { width: 100%; padding: 0 9px; height: var(--ctrl-h); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }
.portal-conn .portal-field input:focus { outline: none; border-color: var(--ink); }
.portal-est { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.portal-est h3 { margin: 0 0 4px; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.portal-est .portal-fd-row { grid-template-columns: minmax(160px, 1fr) 200px auto; }
.portal-est-hotel { font-size: var(--fs-small); color: var(--ink-soft); }

/* --- Fases 3-5: productos, enlaces, usuarios, soporte, actividad -------- */

/* insignia de sin leer en las tarjetas de navegación del grupo */
.portal-badge { display: inline-block; margin-left: 8px; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--err); color: #fff; font-size: var(--fs-xs); font-weight: 700; text-align: center; line-height: 18px; vertical-align: middle; }

/* solicitud de activación */
.portal-activation { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.portal-activation .portal-actions { border-top: 0; padding-top: 0; }
.portal-activation input[type="text"] { flex: 1; min-width: 0; height: var(--ctrl-h); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }
.portal-activation.is-active { color: var(--ok); }

/* catálogo de productos */
.portal-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.portal-product { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.portal-product.is-off { background: var(--line-soft); border-style: dashed; }
.portal-product.is-off .portal-product-head h3, .portal-product.is-off .portal-product-tag { color: var(--muted); }
.portal-product.is-off .portal-product-bullets { color: var(--muted-2); }
.portal-product.is-locked { opacity: .6; }
.portal-product-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.portal-product-head h3 { margin: 0; font-size: var(--fs-h2); font-weight: 600; }
.portal-product-tag { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
.portal-product-bullets { margin: 0; padding-left: 18px; font-size: var(--fs-xs); color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.portal-product-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-xs); }
.portal-product-meta .is-warn { color: var(--warn); font-weight: 600; }
.portal-product .portal-card-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.portal-product .portal-card-actions a.idsw-btn { color: var(--brand-text); }
.portal-related { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.portal-related a { text-decoration: none; }

/* enlaces de instalación */
.portal-urls { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.portal-url { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr) auto auto; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 10px 14px; }
@media (max-width: 820px) { .portal-url { grid-template-columns: 1fr; } }
.portal-url-app { display: flex; flex-direction: column; gap: 2px; }
.portal-url-value { font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-xs); color: var(--ink); background: var(--line-soft); border-radius: var(--radius); padding: 5px 8px; overflow-wrap: anywhere; display: block; }
.portal-url-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.portal-url-note { font-size: var(--fs-xs); color: var(--muted); }
.portal-url-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.portal-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.portal-qr svg { width: 220px; height: 220px; }

/* usuarios */
.portal-users { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.portal-user-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) auto auto minmax(0, 1fr); gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 10px 14px; }
@media (max-width: 900px) { .portal-user-row { grid-template-columns: 1fr; } }
.portal-user-row.is-off { opacity: .55; }
.portal-user-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.portal-user-id strong, .portal-user-id .help { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-user-role { display: flex; align-items: center; gap: 6px; }
.portal-user-role select, .portal-actions select, .portal-field select { height: var(--ctrl-h); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); padding: 0 8px; }
.portal-user-mfa { display: flex; gap: 6px; }
.portal-user-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.portal-matrix { display: flex; flex-direction: column; gap: 12px; }
.portal-matrix-hotel { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 8px; }
.portal-matrix-app { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-soft); }

/* soporte */
.portal-tickets { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.portal-ticket { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 12px 14px; }
.portal-ticket.is-link { cursor: pointer; transition: border-color .12s ease; }
.portal-ticket.is-link:hover { border-color: var(--ink); }
.portal-ticket.is-unread { border-left: 3px solid var(--warn); }
.portal-ticket-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.portal-ticket-side { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.portal-thread { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.portal-msg { border: 1px solid var(--line); border-radius: var(--radius-2); padding: 10px 14px; background: var(--paper); max-width: 46rem; }
.portal-msg.is-idswift { background: var(--line-soft); border-left: 3px solid var(--brand); align-self: flex-start; }
.portal-msg.is-tenant { align-self: flex-end; }
.portal-msg-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.portal-msg-body { margin: 0; font-size: var(--fs-small); line-height: 1.5; white-space: pre-wrap; color: var(--ink); }
.portal-thread + .idsw-panel textarea { width: 100%; min-height: 90px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-family: inherit; font-size: var(--fs-small); color: var(--ink); resize: vertical; }

/* actividad */
.portal-activity { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.portal-event { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto minmax(0, 200px); gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line-soft); font-size: var(--fs-small); }
@media (max-width: 820px) { .portal-event { grid-template-columns: 1fr; gap: 2px; } }
.portal-event-when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); }
.portal-event-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.portal-event .help { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* diálogo */
.portal-modal-back { position: fixed; inset: 0; background: rgba(14, 61, 54, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 800; }
.portal-modal { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-2); padding: 18px 20px; width: min(620px, 100%); max-height: 88vh; overflow: auto; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 60px rgba(14, 61, 54, .3); }
.portal-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portal-modal-head h3 { margin: 0; font-size: var(--fs-h2); font-weight: 600; }
.portal-modal textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-family: inherit; font-size: var(--fs-small); color: var(--ink); resize: vertical; }
.portal-modal input[type="text"], .portal-modal input[type="email"], .portal-modal input[type="password"] { width: 100%; height: var(--ctrl-h); padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: var(--fs-small); font-family: inherit; color: var(--ink); }

/* navegación de la ficha: saltos a otras páginas del hotel */

/* estado del servicio */
.portal-svc.is-down { border-left: 3px solid var(--err); }

/* --- Ronda 3: novedades, backup codes, adjuntos, ip gate, privacidad ---- */
.portal-news { display: flex; flex-direction: column; gap: 10px; }
.portal-news-item { border-bottom: 1px dashed var(--line-soft); padding-bottom: 8px; }
.portal-news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-news-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.portal-news-body { margin: 4px 0 0; font-size: var(--fs-small); color: var(--ink-soft); white-space: pre-wrap; }

.portal-backup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.portal-backup-grid code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; background: var(--line-soft); border-radius: var(--radius); padding: 8px 10px; text-align: center; letter-spacing: .05em; }

.portal-msg-atts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.portal-msg-atts a { text-decoration: none; }

.portal-ipgate textarea { width: 100%; min-height: 70px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-small); color: var(--ink); resize: vertical; }

.portal-privacy { display: flex; flex-direction: column; gap: 14px; }
.portal-privacy-row h3 { margin: 0 0 4px; font-size: var(--fs-h2); font-weight: 600; }
.portal-privacy-row p { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); max-width: 75ch; line-height: 1.55; }

/* Diálogo de verificación (step-up): un código por operación sensible */
.portal-stepup .portal-modal { width: min(440px, 100%); }
.portal-stepup-code { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.portal-stepup-sep { text-align: center; color: var(--muted); font-size: var(--fs-xs); }

/* Tarjetas de producto: el mismo lockup que rotula cada web (Croogla). */
.portal-product-lockup { margin: 0; }
.portal-product-lockup .brand-lockup__product { font-size: 20px; }
.portal-product-lockup .brand-lockup__by { font-size: 10px; letter-spacing: .06em; color: var(--idswift-mint, #91cca9); font-weight: 700; }
.portal-product.is-off .portal-product-lockup .brand-lockup__product { color: var(--muted-2); }
.portal-recovery { margin-bottom: 14px; }

/* --- Calidad de perfiles (vista del producto) ------------------------------ */
.portal-pq-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.portal-pq-figure { padding: 12px 14px; border-left: 1px solid var(--line-soft); }
.portal-pq-figure:first-child { border-left: none; }
.portal-pq-figure b { display: block; font-size: 24px; line-height: 1.1; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.portal-pq-figure span { display: block; margin-top: 3px; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.portal-pq-figure.is-alert b { color: var(--err); }
.portal-pq-checks { display: flex; flex-direction: column; }
.portal-pq-check { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.5rem; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.portal-pq-check:last-child { border-bottom: none; }
.portal-pq-check .name { font-size: var(--fs-body); color: var(--ink-soft); }
.portal-pq-check .bar { display: block; height: 8px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.portal-pq-check .bar i { display: block; height: 100%; background: var(--ok); }
.portal-pq-check .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ok); }
.portal-pq-check[data-level="warn"] .bar i { background: var(--warn); }
.portal-pq-check[data-level="warn"] .val { color: var(--warn); }
.portal-pq-check[data-level="crit"] .bar i { background: var(--err); }
.portal-pq-check[data-level="crit"] .val { color: var(--err); }
.portal-pq-runs { display: flex; flex-direction: column; gap: 6px; }
.portal-pq-run { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-small); color: var(--ink-soft); }
.portal-pq-run .when { color: var(--muted-2); font-variant-numeric: tabular-nums; min-width: 9rem; }
.portal-pq-run .what { font-weight: 600; color: var(--ink); }
.portal-pq-run .who { color: var(--muted-2); }
.portal-pq-run.is-err .detail { color: var(--err); }
@media (max-width: 720px) {
  .portal-pq-check { grid-template-columns: minmax(0, 1fr) 4.5rem; gap: 4px 12px; }
  .portal-pq-check .bar { grid-column: 1 / -1; }
}

/* --- Online Check-in (mismos ajustes que el panel) ---------------------- */
.portal-pc-section { margin-bottom: 14px; }
.portal-pc-section > summary { cursor: pointer; list-style: none; }
.portal-pc-section > summary h2 { display: inline; }
.portal-pc-section > summary::before { content: '▸ '; color: var(--muted); }
.portal-pc-section[open] > summary::before { content: '▾ '; }
.portal-pc-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.portal-pc-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.portal-pc-field select { max-width: 140px; }
.portal-pc-ses { margin-left: 8px; font-size: var(--fs-xs); }
.portal-pc-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.portal-pc-colors label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.portal-pc-body { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.portal-pc-pre { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: var(--fs-small); }
.portal-pc-preview { margin: 8px 0; }
.idsw-btn-ghost.is-on { background: var(--ink); color: var(--brand-text); }

/* Ajustes del grupo: bloques con título y preajustes de puesto compartido */
.portal-settings-block { margin-bottom: 14px; }
.portal-settings-title { margin: 0 0 4px; font-size: var(--fs-h2); font-weight: 600; }
.portal-settings-block > .help { margin: 0 0 12px; max-width: 75ch; }
.portal-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.portal-preset { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); }
.portal-preset:hover:not(:disabled) { border-color: var(--ink-soft); }
.portal-preset.is-active { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.portal-preset:disabled { cursor: default; opacity: .7; }
.portal-preset .help { margin: 0; }
.portal-preset-custom { grid-column: 1 / -1; margin: 0; color: var(--warn); }
.portal-presets { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.portal-preset-values { font-size: var(--fs-xs); color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }
.portal-auth-layers { margin: 0 0 14px; padding-left: 0; list-style: none; display: grid; gap: 6px; max-width: 80ch; font-size: var(--fs-small); color: var(--ink-soft); }
.portal-auth-layers strong { color: var(--ink); }
.portal-dep-warn { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--err) 10%, transparent); color: var(--err); font-size: var(--fs-small); }

/* Documentos firmados → SharePoint (portal-signed-docs.js) */
.portal-sd-state .portal-sd-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line, #eceae4); }
.portal-sd-state .portal-sd-kv:last-of-type { border-bottom: 0; }
.portal-sd-example { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--fs-xs, 12px); word-break: break-all; margin: -4px 0 8px; }
.portal-sd-check { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-soft); margin: 4px 0 8px; }
.portal-sd-probe { margin-top: 8px; display: grid; gap: 6px; }
.portal-sd-step { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); }
.portal-sd-msg { margin: 0; font-weight: 600; }
.portal-sd-msg.is-ok { color: var(--ok); }
.portal-sd-msg.is-err { color: var(--err); }
.portal-sd-raw { word-break: break-word; }
.portal-sd-recent-wrap { margin-top: 14px; }
.portal-sd-recent { display: grid; gap: 2px; }
.portal-sd-row { display: grid; grid-template-columns: 90px 100px 1fr 150px; gap: 10px; align-items: center; font-size: var(--fs-small); padding: 4px 0; border-top: 1px solid var(--line, #eceae4); }
.portal-sd-row .tgt { word-break: break-all; }
.portal-sd-row .when { color: var(--ink-soft); }
@media (max-width: 640px) {
  .portal-sd-row { grid-template-columns: 80px 1fr; }
  .portal-sd-row .tgt, .portal-sd-row .when { grid-column: 1 / -1; }
}

/* --- Diseño de la tarjeta de registro (portal-regcard-design.js) -------- */
.rcd-intro { max-width: 860px; }
.rcd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .rcd-layout { grid-template-columns: 1fr; } }
.rcd-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rcd-right { position: sticky; top: 12px; min-width: 0; }
.rcd-muted { color: var(--muted); font-size: var(--fs-small); }
.rcd-h3 { margin: 16px 0 8px; font-size: var(--fs-body); font-weight: 600; }
.rcd-targets { display: flex; flex-direction: column; }
.rcd-target { padding: 12px 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.rcd-target:first-child { border-top: 0; padding-top: 0; }
.rcd-target-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rcd-target-name { font-weight: 600; }
.rcd-target-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rcd-target-actions select { min-width: 180px; height: var(--ctrl-h); }
.rcd-versions { margin-top: 6px; padding: 8px 10px; background: var(--bg); border-radius: var(--radius-2); display: flex; flex-direction: column; gap: 6px; }
.rcd-version { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rcd-designs, .rcd-starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rcd-design, .rcd-starter { border: 1px solid var(--line); border-radius: var(--radius-2); padding: 12px; display: flex; flex-direction: column; gap: 6px; background: var(--paper); }
.rcd-design-name { font-weight: 600; }
.rcd-design-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.rcd-starter .idsw-btn-ghost { align-self: flex-start; margin-top: auto; }
.rcd-swatch { height: 92px; border-radius: var(--radius-2); padding: 12px; display: flex; }
.rcd-swatch-paper { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, .06); }
.rcd-swatch-title { font-size: 18px; line-height: 1; font-weight: 600; }
.rcd-swatch-rule { width: 22px; height: 2px; border-radius: 2px; }
.rcd-swatch-field { height: 12px; border-radius: 3px; }
.rcd-swatch-btn { width: 34px; height: 9px; border-radius: 3px; align-self: flex-end; }
.rcd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 12px; }
.rcd-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--muted); }
.rcd-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.rcd-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rcd-color { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small); color: var(--muted); }
.rcd-color-row { display: flex; gap: 6px; align-items: center; }
.rcd-color-row input[type="color"] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: none; }
.rcd-color-row input[type="text"] { width: 90px; height: 30px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; }
.rcd-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.rcd-range { display: flex; gap: 10px; align-items: center; }
.rcd-range input { flex: 1; }
.rcd-code { width: 100%; min-height: 260px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-2); background: var(--paper); resize: vertical; }
.rcd-warnings:empty { display: none; }
.rcd-warnings ul { margin: 6px 0 0; padding-left: 18px; }
.rcd-preview-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.rcd-preview-head h2 { margin: 0; }
.rcd-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; }
.rcd-seg button { border: 0; background: var(--paper); padding: 6px 10px; font: inherit; font-size: var(--fs-small); cursor: pointer; color: var(--muted); }
.rcd-seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-text); }
.rcd-frame { position: relative; margin-top: 10px; height: min(78vh, 860px); border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; background: var(--bg); }
.rcd-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.rcd-frame-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; pointer-events: none; }
.rcd-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(10, 20, 18, .55); display: flex; align-items: center; justify-content: center; padding: 24px; }
.rcd-modal-card { background: var(--paper); border-radius: var(--radius-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); width: min(1400px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; padding: 14px 16px 16px; gap: 10px; }
.rcd-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rcd-modal-head h2 { margin: 0; font-size: var(--fs-h2); }
.rcd-tc-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #1c1c1c; border-radius: var(--radius); }
.rcd-tc-stage iframe { position: absolute; border: 0; background: #fff; }
.rcd-tc-stage .rcd-frame-msg { color: #fff; }

/* Diseño de la tarjeta: resumen de los textos legales del hotel */
.rcd-legal-list { grid-template-columns: 1fr; }
.rcd-legal-list .rcd-legal-value { margin-left: auto; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); }

/* --- Carrusel (portal-carousel.js) ------------------------------------
 * Los estilos del gestor de carrusel (/carousel-image-manager de la web del
 * grupo), con el mismo nombre de clase y acotados a .pcar para no chocar
 * con los del portal. La vista previa de la tablet trae los suyos
 * (IdswiftCarousel.ensureStyles). */
.pcar-intro { max-width: 820px; }
.pcar { position: relative; }
.pcar-loader { position: fixed; inset: 0; z-index: 1300; background: rgba(253, 249, 241, .72); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.pcar-loader[hidden] { display: none; }
.pcar-loader-msg { font-size: var(--fs-small); color: var(--ink); }
.pcar-status { display: none; padding: 8px 12px; margin-bottom: 14px; border-radius: var(--radius); font-size: var(--fs-small); border: 1px solid transparent; }
.pcar-status.is-ok { display: block; background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.pcar-status.is-err { display: block; background: var(--err-bg); color: var(--err); border-color: var(--err); }
.pcar .upload-area { border: 1px dashed var(--line); border-radius: var(--radius-2); background: var(--paper); padding: 34px 20px; text-align: center; cursor: pointer; margin: 14px 0; color: var(--muted); font-size: var(--fs-small); transition: border-color .12s ease; }
.pcar .upload-area:hover, .pcar .upload-area:focus { border-color: var(--ink); color: var(--ink); outline: none; }
.pcar .upload-area p { margin: 0; }
.pcar .upload-area input { display: none; }
.pcar .cim-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.pcar .cim-actions button[hidden] { display: none; }
.pcar .cim-order-hint { margin: -6px 0 14px; text-align: right; font-size: 13px; color: var(--warn); }
.pcar .cim-savebar { position: sticky; top: 64px; z-index: 50; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 12px; margin-bottom: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); border-radius: var(--radius-2); font-size: var(--fs-small); }
.pcar .cim-savebar[hidden] { display: none; }
.pcar .cim-savebar span { margin-right: auto; }
.pcar .cim-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
@media (max-width: 1000px) { .pcar .cim-layout { grid-template-columns: 1fr; } }
.pcar .cim-panel h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0 0 10px; color: var(--ink); }
.pcar .cim-panel h3 { font-size: var(--fs-small); font-weight: 700; margin: 14px 0 8px; color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.pcar fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pcar fieldset:disabled { opacity: .5; }
.pcar .cim-help { font-size: var(--fs-xs); color: var(--muted); margin: 4px 0 0; line-height: 1.4; }
.pcar .cim-check { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-small); color: var(--ink); margin: 6px 0; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; }
.pcar .cim-check input { margin-top: 2px; }
.pcar .cim-checks { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.pcar textarea { width: 100%; min-height: 64px; padding: 6px 9px; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: var(--fs-small); color: var(--ink); background: var(--paper); }
.pcar .cim-range { display: flex; align-items: center; gap: 8px; }
.pcar .cim-range input[type="range"] { flex: 1; height: auto; padding: 0; border: 0; }
.pcar .cim-range output { min-width: 3.5em; text-align: right; font-size: var(--fs-small); }
.pcar .cim-preview-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.pcar .cim-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pcar .cim-seg button { border: 0; background: var(--paper); color: var(--ink-soft); padding: 5px 10px; font-size: var(--fs-xs); cursor: pointer; }
.pcar .cim-seg button + button { border-left: 1px solid var(--line); }
.pcar .cim-seg button[aria-pressed="true"] { background: var(--ink); color: var(--brand-text, #f1ece0); }
.pcar .cim-preview-tools input { height: 28px; width: 90px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; font-size: var(--fs-xs); }
/* El marco (bisel) toma la forma de la tablet: en vertical se ve vertical. */
.pcar .cim-device-wrap { position: relative; width: 100%; display: flex; justify-content: center; }
.pcar .cim-device-frame { position: relative; overflow: hidden; border-radius: 14px; background: #1b1f1e; padding: 10px; box-sizing: content-box; }
.pcar .cim-device { position: absolute; top: 10px; left: 10px; transform-origin: 0 0; background: #e9e4da; overflow: hidden; border-radius: 4px; }
.pcar .cim-device-size { text-align: center; font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.pcar .cim-preview-tools select { height: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; font-size: var(--fs-xs); background: var(--paper); color: var(--ink); max-width: 100%; }
.pcar .cim-res-custom { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.pcar .cim-res-custom[hidden] { display: none; }
.pcar .cim-preview-tools .cim-res-custom input { width: 64px; }
/* Documento real (reg card / folio del hotel) dentro de la tablet. */
.pcar .cim-doc-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; pointer-events: none; }
.pcar .cim-doc-frame[hidden] { display: none; }
.pcar .cim-doc.has-frame { padding: 0; }
.pcar .cim-doc.has-frame .cim-doc__mock { display: none; }
/* Arrastrar las piezas de la franja en la vista previa. */
.pcar .cim-stage .idsw-car-band { pointer-events: auto; }
.pcar .cim-stage .idsw-car-band > [data-part] { cursor: grab; border-radius: 6px; outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .15s ease; touch-action: none; }
.pcar .cim-stage .idsw-car-band:hover > [data-part] { outline-color: rgba(242, 201, 76, .55); }
.pcar .cim-stage .idsw-car-band > [data-part].is-dragging { cursor: grabbing; outline-color: #f2c94c; opacity: .85; z-index: 2; }
/* Guías del imán (centro de la franja) mientras se arrastra. */
.pcar .cim-snap-guide { position: absolute; pointer-events: none; background: #f2c94c; opacity: 0; transition: opacity .1s; z-index: 1; }
.pcar .cim-snap-guide.is-on { opacity: .95; }
.pcar .cim-snap-guide[data-axis="x"] { top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; }
.pcar .cim-snap-guide[data-axis="y"] { left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; }
/* Franja: translucidez y color propio. */
.pcar .cim-band-look { margin-top: 6px; }
.pcar .cim-band-look label { display: block; }
.pcar .cim-band-look .cim-range output { min-width: 4.5em; }
.pcar .cim-linkbtn { border: 0; background: none; padding: 0; color: var(--ink-soft); font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; height: auto; }
.pcar .cim-linkbtn[hidden] { display: none; }
.pcar .cim-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.pcar .cim-palette[hidden] { display: none; }
.pcar .cim-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); padding: 0; cursor: pointer; box-shadow: inset 0 0 0 2px var(--paper); }
.pcar .cim-swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.pcar .cim-palette input[type="color"] { width: 38px; height: 28px; padding: 0 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.pcar .cim-palette input[type="text"] { width: 86px; height: 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 6px; font-size: var(--fs-xs); font-family: ui-monospace, monospace; }
.pcar .cim-palette label { font-size: var(--fs-xs); color: var(--muted); }
.pcar .cim-device .cim-stage { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transition: width .6s cubic-bezier(.4,0,.2,1), left .6s cubic-bezier(.4,0,.2,1); }
.pcar .cim-device .cim-doc { position: absolute; top: 0; bottom: 0; padding: 40px 48px; box-sizing: border-box; background: linear-gradient(135deg, #ece7dc 0%, #f6f3ec 100%); opacity: 0; transition: opacity .45s ease, left .6s cubic-bezier(.4,0,.2,1), width .6s cubic-bezier(.4,0,.2,1); }
.pcar .cim-device[data-doc="true"] .cim-doc { opacity: 1; }
.pcar .cim-doc__title { font: 600 34px/1.2 "Inter", system-ui, sans-serif; color: #0e3d36; margin-bottom: 28px; }
.pcar .cim-doc__row { height: 22px; border-radius: 4px; background: #d8d1c6; margin: 0 0 22px; }
.pcar .cim-doc__row.is-short { width: 55%; }
.pcar .cim-doc__sign { margin-top: 40px; height: 120px; border: 2px dashed #b9b1a3; border-radius: 8px; }
.pcar .cim-preview-note { font-size: var(--fs-xs); color: var(--muted); margin: 8px 0 0; min-height: 1.4em; }
.pcar .cim-grid-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.pcar .cim-grid-head h2 { font-size: var(--fs-h2); font-weight: 600; margin: 0; color: var(--ink); }
.pcar .cim-grid-head select { height: 30px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 8px; font-size: var(--fs-small); background: var(--paper); color: var(--ink); }
.pcar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pcar .image-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden; }
.pcar .image-card:hover { border-color: var(--ink-soft); }
.pcar .image-card.is-off .image-preview { filter: grayscale(1); opacity: .45; }
.pcar .image-card.is-hidden-by-filter { display: none; }
.pcar .image-preview { width: 100%; height: 160px; object-fit: cover; background: var(--line-soft); display: block; cursor: zoom-in; }
.pcar .image-info { padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line-soft); }
.pcar .image-name { font-size: var(--fs-small); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcar .cim-empty { color: var(--muted); font-size: var(--fs-small); margin: 8px 0; }
.pcar .cim-badges { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.pcar .cim-badge { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 3px; background: rgba(14,61,54,.85); color: #f1ece0; letter-spacing: .02em; }
.pcar .cim-badge.is-off { background: rgba(120,40,30,.9); }
.pcar .cim-badge.is-sched { background: rgba(138,90,0,.9); }
.pcar .cim-card-controls { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--muted); }
.pcar .cim-card-controls select { height: 26px; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-xs); background: var(--paper); color: var(--ink); min-width: 0; }
.pcar .cim-card-controls .cim-check { margin: 0; font-size: var(--fs-xs); grid-column: 1 / -1; }
.pcar .cim-card-actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.pcar .cim-card-actions button { flex: 1; }
.pcar .cim-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(14,61,54,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.pcar .cim-modal[hidden] { display: none; }
.pcar .cim-modal__box { background: var(--paper); border-radius: var(--radius-2); width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 18px 20px; border: 1px solid var(--line); }
.pcar .cim-modal__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pcar .cim-modal__head img { width: 120px; height: 72px; object-fit: cover; border-radius: var(--radius); background: var(--line-soft); }
.pcar .cim-modal__head h2 { font-size: var(--fs-h2); margin: 0; color: var(--ink); word-break: break-all; }
.pcar .cim-modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pcar .cim-days { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.pcar .zoom-modal { position: fixed; inset: 0; z-index: 1250; background: rgba(14, 61, 54, .82); display: none; justify-content: center; align-items: center; padding: 40px; cursor: pointer; }
.pcar .zoom-modal.active { display: flex; }
.pcar .zoom-content { position: relative; max-width: 100%; max-height: 100%; display: flex; justify-content: center; align-items: center; }
.pcar .zoom-image { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: var(--radius-2); }
.pcar textarea:disabled { background: var(--line-soft); color: var(--muted); cursor: not-allowed; }
