/* Apps del prototipo: Buscaminas y Tienda de demostración */

.bm {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 4px;
}

.bm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 306px;
  padding: 3px 6px;
  background: var(--window-bg);
  border: 2px inset;
}

.bm-mines,
.bm-time {
  font-family: ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  letter-spacing: 1px;
  background: #000;
  color: #f33;
  padding: 1px 5px;
}

.bm-face {
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  background: var(--window-bg);
  border: 2px outset var(--bevel-light);
}

.bm-face:active,
.bm-face-reset {
  border-style: inset;
}

.bm-board {
  display: grid;
  grid-template-columns: repeat(9, 28px);
  border: 2px inset;
  background: #c0c0c0;
  user-select: none;
}

.bm-cell {
  width: 28px;
  height: 28px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  background: #c0c0c0;
  border: 2px outset #f4f4f4;
  cursor: default;
}

.bm-cell.bm-open {
  border: 1px solid #9a9a9e;
  background: #d8d8d2;
}

.bm-cell.bm-flag {
  color: #b3261e;
}

.bm-cell.bm-mine,
.bm-cell.bm-mine-hit {
  background: #c0392b;
  color: #fff;
}

.bm-cell.bm-locked {
  pointer-events: none;
}

.bm-n1 { color: #1a3fd0; }
.bm-n2 { color: #1a7a1a; }
.bm-n3 { color: #c0392b; }
.bm-n4 { color: #1a1a6e; }
.bm-n5 { color: #8b1a1a; }
.bm-n6 { color: #167a7a; }
.bm-n7 { color: #1a1a1a; }
.bm-n8 { color: #6b6b6b; }

.tienda {
  display: grid;
  gap: 8px;
}

.tienda-banner {
  margin: 0;
  padding: 6px 8px;
  font-size: 11px;
  background: #fffbe0;
  border: 1px solid #d9c86a;
  color: #4a3b00;
}

.tienda-layout {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 10px;
  align-items: start;
}

.tienda-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.tienda-card {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--bevel-dark);
}

.tienda-card h3 {
  margin: 0;
  font-size: 12px;
}

.tienda-card p {
  margin: 0;
  font-size: 11px;
  opacity: .8;
}

.tienda-price {
  font-weight: 700;
  color: #1a5a1a;
}

.tienda-stock {
  font-size: 11px;
  color: #1a7a1a;
}

.tienda-add,
.tienda-checkout,
.tienda-remove {
  min-height: var(--control-h);
  padding: 2px 10px;
  font-size: 11px;
  background: linear-gradient(180deg, #fff, #e4e4da);
  border: 1px solid var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-light);
  border-radius: 2px;
}

.tienda-checkout:disabled {
  color: #8a8a8a;
  background: #eee;
}

.tienda-cart {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--bevel-dark);
}

.tienda-cart h3 {
  margin: 0;
  font-size: 12px;
}

.tienda-lines {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}

.tienda-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tienda-line-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tienda-line-qty {
  font-variant-numeric: tabular-nums;
  opacity: .8;
}

.tienda-total {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.tienda-summary {
  display: grid;
  gap: 4px;
  font-size: 11px;
}

.tienda-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

@media (max-width: 640px) {
  .tienda-layout {
    grid-template-columns: 1fr;
  }
  .tienda-catalog {
    grid-template-columns: 1fr;
  }
}

/* Tienda con catálogo de API y carrito lateral */
.tienda {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 8px;
  height: auto;
  min-height: 100%;
  align-items: start;
  font-family: var(--font-ui);
  font-size: 11px;
}

.tienda-catalogo {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: visible;
}

.tienda-estado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid;
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  font-size: 11px;
}

.tienda-grupo {
  display: grid;
  gap: 6px;
}

.tienda-grupo h3 {
  margin: 0;
  padding-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--bevel-dark);
}

.tienda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px;
}

.tienda-ayuda {
  margin: 0;
  font-size: 10px;
  color: #555;
}

.tienda .producto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  min-width: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  box-shadow: none;
  color: inherit;
  text-align: center;
  cursor: default;
}

.tienda .producto:hover {
  background: #f5f5ee;
  border-color: #b8b4a8;
}

.tienda .producto:focus,
.tienda .producto:focus-visible {
  outline: 1px dotted #003c74;
  outline-offset: -3px;
}

.tienda .producto.seleccionado {
  background: #316ac5;
  color: #fff;
}

.tienda .producto.seleccionado .producto-precio,
.tienda .producto.seleccionado .producto-via {
  color: #fff;
}

.producto-nombre {
  font-size: 11px;
  line-height: 1.2;
  min-height: 3.6em;
  max-height: 3.6em;
  overflow: hidden;
}

.producto-via {
  display: block;
  font-size: 10px;
  color: #555;
  line-height: 1.2;
  max-height: 1.2em;
  overflow: hidden;
}

.producto-precio {
  font-weight: 700;
  color: #1a5a1a;
  font-size: 11px;
}

.producto-agotado {
  font-size: 10px;
  color: #8a2b2b;
}

.producto-icono {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.ficha-icono {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ficha-apps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ficha-apps img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tienda-ver-mas {
  min-width: 0;
  width: auto;
  justify-self: start;
  padding: 4px 8px;
}

.ficha {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ficha-cabecera {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ficha-datos {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ficha-precio {
  font-size: 14px;
  font-weight: 700;
  color: #1a5a1a;
}

.ficha-tipo,
.ficha-nota,
.ficha-carrito {
  margin: 0;
}

.ficha-nota {
  color: #444;
}

.ficha-carrito {
  font-size: 10px;
  color: #1a5a1a;
}

.tienda button,
.carrito button {
  min-width: 0;
  min-height: var(--control-h);
  padding: 2px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  background: linear-gradient(180deg, #fff, #e4e4da);
  border: 1px solid var(--bevel-dark);
  box-shadow: inset 1px 1px 0 var(--bevel-light);
  border-radius: 2px;
}

.tienda button:disabled,
.carrito button:disabled {
  color: #8a8a8a;
  background: #eee;
  box-shadow: none;
}

.carrito {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid;
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}

.carrito h3 {
  margin: 0;
  font-size: 12px;
}

.carrito ul {
  display: grid;
  gap: 6px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.carrito-linea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 4px;
  padding-bottom: 4px;
  border-bottom: 1px dotted #c9c5b0;
}

.carrito-linea-nombre {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carrito-linea button {
  padding: 0 6px;
}

.carrito-linea-importe {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.carrito-subtotal {
  margin: 0;
  color: #444;
}

.carrito-vacio {
  margin: 6px 0;
  color: #555;
  font-style: italic;
}

.carrito-total {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.carrito-nota {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #555;
}

.carrito-vaciar {
  justify-self: end;
}

.carrito-legal {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.3;
  color: #666;
}

@media (max-width: 640px) {
  .tienda {
    grid-template-columns: 1fr;
  }
  .tienda-grid {
    grid-template-columns: 1fr;
  }
  .carrito {
    position: static;
  }
  .carrito ul {
    max-height: none;
  }
}

/* Mi PC ------------------------------------------------------------------- */

.mi-pc {
  min-width: 0;
  padding: 8px;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.mi-pc [hidden] {
  display: none !important;
}

.mi-pc-split {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.mi-pc-side {
  min-width: 0;
  padding: 10px;
  color: #fff;
  background: linear-gradient(180deg, #0a246a 0%, #3a6ea5 100%);
  border: 1px solid #0a246a;
  border-radius: 4px 0 0 4px;
}

.mi-pc-side h4 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.mi-pc-side p {
  margin: 0 0 6px;
  line-height: 1.35;
}

.mi-pc-unidades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.mi-pc-unidad {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid #9db2c8;
  box-shadow: inset -1px -1px 0 #d6e2ee;
}

.mi-pc-unidad:hover,
.mi-pc-unidad:focus-visible {
  background: #eaf2fb;
  border-color: #3169c6;
}

.mi-pc-unidad img {
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
}

.mi-pc-unidad-nombre {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mi-pc-unidad-meta {
  color: #555;
}

.mi-pc-aviso {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  background: #ffffe1;
  border: 1px solid #c9c5b0;
}

.mi-pc-barra {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 6px;
  background: linear-gradient(180deg, #fff 0%, #dbe8f7 100%);
  border-bottom: 1px solid #9db2c8;
}

.mi-pc-barra h3 {
  margin: 0;
  font-size: 12px;
}

.mi-pc-barra button {
  min-width: 0;
  padding: 2px 10px;
}

.mi-pc-estado {
  margin: 0 0 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid #9db2c8;
}

.mi-pc-estado button {
  margin-left: 8px;
}

.mi-pc-lista {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mi-pc-fila {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  background: #fff;
  border-bottom: 1px dotted #c9c5b0;
}

.mi-pc-fila button {
  min-width: 0;
  padding: 2px 8px;
}

.mi-pc-nombre {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mi-pc-stock {
  color: #444;
  white-space: nowrap;
}

.mi-pc-leeme {
  margin-top: 10px;
  padding: 10px;
  background: #ffffe1;
  border: 1px solid #c9c5b0;
  box-shadow: inset 0 0 0 1px #fff;
}

.mi-pc-leeme h4 {
  margin: 0 0 6px;
  font-size: 11px;
}

.mi-pc-leeme p {
  margin: 0 0 6px;
  line-height: 1.4;
}

.mi-pc-leeme-cerrar {
  min-width: 0;
  padding: 2px 10px;
}

.xp-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #ece9d8;
}

.window-body:has(> .xp-app) {
  padding: 0;
  overflow: hidden;
}

.xp-app .win-menu-item {
  min-width: 0;
}

.xp-app .win-menu-item[aria-disabled="true"] {
  color: #9a9a92;
  pointer-events: none;
}

.window .window-body .xp-app .win-menu .win-popup button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 3px 18px 3px 20px;
  text-align: left;
  font-size: 11px;
  color: #000;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.window .window-body .xp-app .win-menu .win-popup button:hover:not(:disabled) {
  color: #fff;
  background: #316ac5;
}

.window .window-body .xp-app .win-toolbar button {
  min-width: 0;
  min-height: 22px;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  box-shadow: none;
}

.window .window-body .xp-app .win-toolbar button:hover:not(:disabled) {
  border-color: #b8b4a8;
  background: linear-gradient(#fff, #f0efe8);
}

.window .window-body .xp-app .win-toolbar button:active:not(:disabled) {
  border-color: #8d8a80;
  background: #e4e2d8;
}

.window .window-body .xp-app .win-toolbar button:disabled {
  color: #9a9a92;
}

.xp-app .win-body {
  flex: 1;
  min-height: 0;
  margin: 2px;
  overflow-y: auto;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.xp-app .mi-pc {
  overflow: visible;
}

.xp-app .panel-control,
.xp-app .papelera {
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.xp-app .win-status-texto:last-child {
  flex: 0 0 auto;
  min-width: 64px;
  text-align: center;
}

@media (max-width: 640px) {
  .mi-pc-split {
    grid-template-columns: 1fr;
  }

  .mi-pc-side {
    border-radius: 0;
  }

  .mi-pc-unidades {
    grid-template-columns: 1fr;
  }

  .mi-pc-fila {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .mi-pc-fila button {
    justify-self: start;
  }

  .mi-pc-barra {
    flex-wrap: wrap;
  }
}

/* Bloc de notas ---------------------------------------------------------- */

.bloc {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.bloc [hidden],
.papelera [hidden],
.ejecutar [hidden] {
  display: none !important;
}

.bloc-barra {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: linear-gradient(180deg, #fff 0%, #dbe8f7 100%);
  border-bottom: 1px solid #9db2c8;
}

.bloc-barra button {
  min-width: 0;
  padding: 2px 8px;
}

.bloc-editor {
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 6px;
  resize: none;
  color: #000;
  background: #fff;
  border: 0;
  outline: none;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.4;
}

.bloc-editor:focus-visible {
  outline: 1px dotted #0a246a;
  outline-offset: -2px;
}

.bloc-estado {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
  padding: 3px 6px;
  background: #ece9d8;
  border-top: 1px solid #9db2c8;
}

.bloc-estado-aviso {
  flex: 1;
  min-width: 0;
  color: #0a246a;
  text-align: right;
}

.bloc-estado-guardado {
  white-space: nowrap;
}

/* Papelera de reciclaje -------------------------------------------------- */

.papelera {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.papelera-lateral {
  min-width: 0;
  padding: 10px;
  color: #fff;
  background: linear-gradient(180deg, #0a246a 0%, #3a6ea5 100%);
  border: 1px solid #0a246a;
  border-radius: 4px 0 0 4px;
}

.papelera-lateral h4 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.papelera-tarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 6px;
  padding: 3px 6px;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

.papelera-tarea:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.papelera-tarea:disabled {
  color: rgba(255, 255, 255, 0.55);
}

.papelera-principal {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.papelera-aviso {
  margin: 0 0 8px;
  padding: 6px 8px;
  background: #ffffe1;
  border: 1px solid #c9c5b0;
}

.papelera-lista {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.papelera-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  background: #fff;
  border-bottom: 1px dotted #c9c5b0;
}

.papelera-item img {
  width: 32px;
  height: 32px;
}

.papelera-nombre {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.papelera-fecha {
  color: #555;
  white-space: nowrap;
}

.papelera-restaurar {
  min-width: 0;
  padding: 2px 8px;
}

.papelera-vacia {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 140px;
  margin: 0;
  color: #555;
  text-align: center;
}

/* Ejecutar --------------------------------------------------------------- */

.ejecutar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.ejecutar p {
  margin: 0;
  line-height: 1.4;
}

.ejecutar-fila {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ejecutar-fila label {
  white-space: nowrap;
}

.ejecutar-fila input {
  flex: 1;
  min-width: 0;
}

.ejecutar-error {
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #9db2c8;
}

.ejecutar-acciones {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.ejecutar-acciones button {
  min-width: 0;
  padding: 3px 14px;
}

/* Diálogos propios de las apps ------------------------------------------- */

.app-dialog {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
}

.app-dialog-caja {
  width: min(260px, 90%);
  padding: 12px;
  background: var(--window-bg);
  border: 1px solid #0a246a;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.35);
}

.app-dialog-caja p {
  margin: 0 0 12px;
  line-height: 1.4;
}

.app-dialog-acciones {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.app-dialog-acciones button {
  min-width: 0;
  padding: 2px 12px;
}

@media (max-width: 640px) {
  .papelera {
    grid-template-columns: 1fr;
  }

  .papelera-lateral {
    border-radius: 0;
  }

  .papelera-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .papelera-item img {
    grid-row: 1 / span 2;
  }

  .papelera-restaurar {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .app-dialog-caja {
    width: 94%;
  }
}

/* Panel de control -------------------------------------------------------- */

.panel-control {
  min-width: 0;
  padding: 8px;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.panel-accesos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.panel-acceso {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  font: inherit;
  color: #000;
  text-align: center;
  background: var(--window-bg, #ece9d8);
  border: 1px solid #b6b6a8;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #fff;
  cursor: pointer;
}

.panel-acceso:hover,
.panel-acceso:focus-visible {
  background: #f5f3e8;
  border-color: #3a6ea5;
}

.panel-acceso:active {
  border-style: inset;
  box-shadow: none;
}

.panel-acceso img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.panel-acceso span {
  line-height: 1.25;
}

.panel-vista {
  display: grid;
  gap: 10px;
}

.panel-vista h2 {
  margin: 0;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #aca899;
}

.panel-volver {
  min-width: 0;
  justify-self: start;
  padding: 2px 12px;
}

.panel-pie {
  margin: 0;
  padding-top: 8px;
  color: #444;
  border-top: 1px solid #aca899;
}

.panel-tarjetas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-tarjeta {
  min-width: 0;
  flex: 1 1 140px;
  display: grid;
  gap: 6px;
  padding: 8px;
  font: inherit;
  color: #000;
  text-align: center;
  background: var(--window-bg, #ece9d8);
  border: 2px solid #a0a0a0;
  border-radius: 3px;
  cursor: pointer;
}

.panel-tarjeta.is-activo {
  background: #e8eefc;
  border-color: #316ac5;
}

.panel-tarjeta-muestra {
  display: block;
  height: 54px;
  border: 1px solid #0a246a;
  border-radius: 2px;
}

.muestra-xp,
.muestra-7 {
  position: relative;
  overflow: hidden;
}

.muestra-xp::before,
.muestra-7::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 45%;
  background: linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.muestra-xp {
  background: linear-gradient(180deg, #0058e6, #3a93ff);
}

.muestra-7 {
  background: linear-gradient(160deg, #1b3a5c, #4a90d9);
}

.panel-tarjeta-nombre {
  font-weight: 700;
}

.panel-muestras {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-muestra {
  min-width: 0;
  width: 80px;
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  color: #fff;
  border: 2px solid #888;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  text-shadow: 0 1px 2px #000;
}

.panel-muestra.is-activo {
  border-color: #316ac5;
  box-shadow: 0 0 0 2px #bcd0f5;
}

.panel-muestra-rotulo {
  width: 100%;
  padding: 2px 0 4px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.45);
}

.panel-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-acciones button {
  min-width: 0;
  padding: 2px 12px;
}

.panel-estado {
  margin: 0;
}

.panel-fecha {
  margin: 0;
  font-size: 13px;
}

.panel-hora {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.panel-lista {
  border-top: 1px solid #aca899;
}

.panel-fila {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
  border-bottom: 1px dotted #aca899;
}

.panel-etiqueta {
  color: #333;
}

.panel-valor {
  text-align: right;
  word-break: break-word;
}

@media (max-width: 640px) {
  .panel-accesos {
    grid-template-columns: 1fr;
  }

  .panel-acceso {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .panel-tarjetas {
    flex-direction: column;
  }
}

/* Tienda: cromo tipo Explorer de Windows XP ------------------------------- */

.tienda-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #ece9d8;
}

.window-body:has(> .tienda-app) {
  padding: 0;
  overflow: hidden;
}

.win-menu {
  display: flex;
  flex: 0 0 auto;
  gap: 0;
  padding: 1px 2px;
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  font-size: 11px;
}

.win-menu-item {
  position: relative;
  padding: 2px 7px;
  cursor: default;
  user-select: none;
}

.win-menu-item:hover,
.win-menu-item[aria-expanded="true"] {
  background: #316ac5;
  color: #fff;
}

.win-popup {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  display: none;
  min-width: 170px;
  padding: 2px;
  background: #fff;
  border: 1px solid #aca899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .25);
}

.win-menu-item[aria-expanded="true"] .win-popup {
  display: block;
}

.window .window-body .tienda-app .win-menu .win-popup button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 3px 18px 3px 20px;
  text-align: left;
  font-size: 11px;
  color: #000;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.window .window-body .tienda-app .win-menu .win-popup button:hover:not(:disabled) {
  color: #fff;
  background: #316ac5;
}

.win-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 2px 3px;
  background: linear-gradient(#fdfdfd, #ece9d8);
  border-bottom: 1px solid #aca899;
}

.window .window-body .tienda-app .win-toolbar button {
  min-width: 0;
  min-height: 22px;
  padding: 2px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  box-shadow: none;
}

.window .window-body .tienda-app .win-toolbar button:hover:not(:disabled) {
  border-color: #b8b4a8;
  background: linear-gradient(#fff, #f0efe8);
}

.window .window-body .tienda-app .win-toolbar button:active:not(:disabled) {
  border-color: #8d8a80;
  background: #e4e2d8;
}

.window .window-body .tienda-app .win-toolbar button:disabled {
  color: #9a9a92;
}

.win-sep {
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: #aca899;
}

.win-address {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  font-size: 11px;
  flex: 0 0 auto;
}

.win-address-box {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 1px 5px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tienda-contenido {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin: 3px;
  padding: 6px;
  background: #fff;
  border: 1px solid #7f9db9;
}

.win-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #ece9d8;
  border-top: 1px solid #aca899;
  font-size: 10px;
  color: #333;
}

.win-status-texto {
  flex: 1 1 auto;
  padding: 1px 5px;
  border: 1px solid #d6d2c2;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.win-status-carrito {
  flex: 0 0 auto;
  border: 1px solid #d6d2c2;
  border-right-color: #fff;
  border-bottom-color: #fff;
  padding: 1px 8px;
  min-width: 96px;
  text-align: center;
}

@media (max-width: 640px) {
  .window-body:has(> .tienda-app) {
    overflow: auto;
    padding: 0;
  }

  .tienda-app {
    height: auto;
  }

  .tienda-contenido {
    overflow: visible;
  }
}

/* Buscar ------------------------------------------------------------------ */

.buscar-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
}

.buscar-form input[type="search"] {
  flex: 1 1 150px;
  min-width: 0;
}

.buscar-form button {
  min-width: 0;
  padding: 2px 12px;
}

.buscar-resultados {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 0 8px 8px;
}

.buscar-resultado {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 8px;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font: inherit;
  color: #000;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px dotted #c9c5b0;
  border-radius: 0;
  box-shadow: none;
}

.buscar-resultado:hover,
.buscar-resultado:focus-visible {
  background: #eaf2fb;
}

.buscar-resultado img {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.buscar-resultado-nombre {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buscar-resultado-tipo {
  color: #555;
  font-size: 10px;
}

.buscar-aviso {
  margin: 0;
  padding: 6px 8px;
  color: #7a1f1f;
  border-bottom: 1px dotted #c9c5b0;
}

/* Ayuda y soporte --------------------------------------------------------- */

.ayuda-accesos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
}

.ayuda-acceso {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  font: inherit;
  color: #000;
  text-align: left;
  background: var(--window-bg, #ece9d8);
  border: 1px solid #b6b6a8;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #fff;
  cursor: pointer;
}

.ayuda-acceso:hover,
.ayuda-acceso:focus-visible {
  background: #f5f3e8;
  border-color: #3a6ea5;
}

.ayuda-acceso:active {
  border-style: inset;
  box-shadow: none;
}

.ayuda-acceso-titulo {
  font-weight: 700;
}

.ayuda-acceso-resumen {
  color: #444;
  line-height: 1.3;
}

.ayuda-vista {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.ayuda-vista h2 {
  margin: 0;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid #aca899;
}

.ayuda-vista h2:focus-visible {
  outline: 1px dotted #0a246a;
  outline-offset: 2px;
}

.ayuda-vista p {
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .ayuda-accesos {
    grid-template-columns: 1fr;
  }
}

/* Explorador -------------------------------------------------------------- */

.explorador-app .explorador {
  display: flex;
  flex-direction: row;
  height: 100%;
  min-height: 0;
  color: #000;
  font-family: Tahoma, "Segoe UI", sans-serif;
  font-size: 11px;
}

.explorador-app .explorador-arbol {
  width: 170px;
  min-width: 170px;
  padding: 4px 0;
  background: #f7f7f7;
  border-right: 1px solid #aca899;
  overflow-x: hidden;
  overflow-y: auto;
}

.explorador-app .explorador-arbol-nodo {
  min-width: 0;
}

.explorador-app .explorador-arbol-hijos {
  padding-left: 14px;
}

.explorador-app .explorador-arbol-item {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 2px 4px;
  text-align: left;
  font-size: 11px;
  color: #000;
  background: transparent;
  border: 1px solid transparent;
}

.explorador-app .explorador-arbol-item:hover,
.explorador-app .explorador-arbol-item:focus-visible {
  background: #316ac5;
  color: #fff;
  outline: none;
}

.explorador-app .explorador-arbol-tri {
  width: 10px;
  text-align: center;
  font-size: 10px;
  flex: 0 0 auto;
}

.explorador-app .explorador-arbol-tri.vacio {
  visibility: hidden;
}

.explorador-app .explorador-arbol-item img {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.explorador-app .explorador-arbol-texto {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.explorador-app .explorador-vista {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 6px;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}

.explorador-app .explorador-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  grid-auto-flow: row;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.explorador-app .explorador-objeto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 0;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  color: #000;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
}

.explorador-app .explorador-objeto:hover {
  background: #f5f5ee;
  border-color: #b8b4a8;
}

.explorador-app .explorador-objeto:focus-visible {
  outline: 1px dotted #003c74;
  outline-offset: -3px;
}

.explorador-app .explorador-objeto.seleccionado {
  background: #316ac5;
  color: #fff;
}

.explorador-app .explorador-objeto img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.explorador-app .explorador-objeto-nombre {
  min-height: 2.4em;
  max-height: 2.4em;
  overflow: hidden;
  line-height: 1.2;
}

.explorador-app .explorador-objeto-meta {
  font-size: 10px;
  color: #555;
}

.explorador-app .explorador-objeto.seleccionado .explorador-objeto-meta {
  color: #fff;
}

.explorador-app .explorador-vacio {
  margin: 0;
  padding: 20px;
  color: #555;
  text-align: center;
}

@media (max-width: 640px) {
  .explorador-app .explorador {
    flex-direction: column;
  }

  .explorador-app .explorador-arbol {
    display: none;
    width: 100%;
    min-width: 0;
    max-height: 40%;
    border-right: 0;
    border-bottom: 1px solid #aca899;
  }

  .explorador-app .explorador.arbol-visible .explorador-arbol {
    display: block;
  }

  .explorador-app .explorador-vista {
    width: 100%;
  }

  .explorador-app .explorador-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .explorador-app .explorador-grid {
    grid-template-columns: 1fr;
  }
}

/* Messenger (soporte en vivo) -------------------------------------------- */

.window-body:has(> .messenger-conv) {
  padding: 0;
  overflow: hidden;
}

.messenger {
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #000;
}

.messenger:focus {
  outline: none;
}

.messenger-cabecera {
  flex: 0 0 64px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: #fff;
  border-bottom: 1px solid #aca899;
}

.messenger-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  background: #e8f0fb;
  border: 1px solid #b5c9e3;
}

.messenger-identidad {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.messenger-rotulo {
  color: #666;
  font-size: 11px;
}

.messenger-linea {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.messenger-nombre {
  font-size: 12px;
  font-weight: 700;
}

.messenger-presencia {
  color: #333;
  font-size: 11px;
  white-space: nowrap;
}

.messenger-punto {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 3px;
  vertical-align: middle;
  background: #2e9e44;
  border-radius: 50%;
}

.messenger-punto.is-offline {
  background: #9a9a92;
}

.messenger-mensaje {
  overflow: hidden;
  color: #666;
  font-size: 10px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-franja {
  flex: 0 0 22px;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  overflow: hidden;
  color: #333;
  font-size: 11px;
  white-space: nowrap;
  background: #fff;
  border-top: 1px solid #b5c9e3;
  border-bottom: 1px solid #b5c9e3;
}

.messenger-sobre {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 10px;
  background: #fff;
  border: 1px solid #7f9db9;
}

.messenger-sobre::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-top: 5px solid #7f9db9;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
}

.messenger-franja-texto {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
}

.messenger-contactos {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
}

.messenger-grupo {
  padding: 2px 0;
}

.messenger-grupo-titulo {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 3px 6px;
  color: #000;
  font: 700 11px var(--font-ui);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.messenger-grupo-titulo:hover,
.messenger-grupo-titulo:focus-visible {
  background: #f0f4fb;
}

.messenger-chevron {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 5px solid #333;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transition: transform .12s linear;
}

.messenger-grupo.is-colapsado .messenger-chevron {
  transform: rotate(-90deg);
}

.messenger-grupo.is-colapsado .messenger-grupo-lista {
  display: none;
}

.messenger-contacto {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 30px;
  padding: 2px 6px;
  color: #000;
  font: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.messenger-contacto:hover,
.messenger-contacto:focus-visible {
  background: #f0f4fb;
}

.messenger-contacto.is-seleccionado {
  color: #fff;
  background: #316ac5;
}

.messenger-contacto.is-seleccionado .messenger-contacto-nombre,
.messenger-contacto.is-seleccionado .messenger-contacto-sub {
  color: #fff;
}

.messenger-contacto-icono {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: #2e9e44;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

.messenger-contacto-icono.is-offline {
  background: #9a9a92;
}

.messenger-contacto-icono::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
}

.messenger-contacto-icono::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 3px;
  width: 10px;
  height: 5px;
  background: #fff;
  border-radius: 5px 5px 0 0;
}

.messenger-contacto-texto {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.messenger-contacto-nombre,
.messenger-contacto-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-contacto-nombre {
  font-size: 11px;
}

.messenger-contacto-sub {
  color: #777;
  font-size: 10px;
}

.messenger-contacto:has(.messenger-contacto-icono.is-offline) .messenger-contacto-name,
.messenger-contacto:has(.messenger-contacto-icono.is-offline) .messenger-contacto-nombre {
  color: #7a7a7a;
}

.window-body .xp-app.messenger button.messenger-quiero {
  flex: 0 0 22px;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 0 4px;
  color: #fff;
  font: 700 11px var(--font-ui);
  text-align: left;
  background-image: linear-gradient(180deg, #4a97f7 0%, #2f7adb 12%, #245edb 55%, #1b4ab5 100%);
  border: 1px solid #0b2f8a;
  box-shadow: inset 0 1px 0 #7ab0ff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  cursor: pointer;
}

.messenger-quiero .messenger-chevron {
  margin-left: auto;
  border-top-color: #fff;
}

.messenger-acciones {
  flex: 0 0 auto;
  padding: 2px;
  background: #f5f7fc;
  border-bottom: 1px solid #b5c9e3;
}

.messenger-acciones button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 4px 8px;
  color: #1b4fa8;
  font-size: 11px;
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.messenger-acciones button:hover,
.messenger-acciones button:focus-visible {
  background: #dbe6f8;
}

.messenger-banner {
  flex: 0 0 56px;
  height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  background: #fff;
  border-top: 1px solid #aca899;
}

.messenger-logo {
  color: #1b4fa8;
  font: 700 15px var(--font-ui);
  line-height: 1;
}

.messenger-demo {
  color: #8a8a8a;
  font-size: 9px;
  line-height: 1.1;
}

/* Conversación ----------------------------------------------------------- */

.messenger-conv {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #ece9d8;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #000;
}

.messenger-conv-cabecera {
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  background: #fff;
  border-bottom: 1px solid #aca899;
}

.messenger-conv-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.messenger-conv-identidad {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.messenger-conv-nombre {
  font-size: 12px;
  font-weight: 700;
}

.messenger-conv-presencia {
  color: #777;
  font-size: 10px;
}

.messenger-conv-barra button {
  min-width: 0;
  min-height: 0;
  height: 20px;
  padding: 2px 8px;
  font-size: 11px;
  background: linear-gradient(#fff, #ece9d8);
  border: 1px solid #7f9db9;
  border-radius: 2px;
  box-shadow: none;
  cursor: pointer;
}

.messenger-conv-barra button:hover:not(:disabled) {
  background: linear-gradient(#fff, #dbe6f8);
}

.messenger-conv-mensajes {
  flex: 1 1 auto;
  min-height: 0;
  margin: 4px;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.messenger-msg {
  margin: 0 0 6px;
}

.messenger-msg-cab {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.messenger-msg-nick {
  color: #1b4fa8;
  font-size: 11px;
  font-weight: 700;
}

.messenger-msg-hora {
  color: #777;
  font-size: 10px;
}

.messenger-msg-texto {
  margin: 0;
  color: #000;
  font-size: 11px;
  line-height: 1.3;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.messenger-msg-sistema {
  margin: 4px 0;
  color: #777;
  font-size: 10px;
  font-style: italic;
  text-align: center;
}

.messenger-msg-acciones { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.messenger-msg-accion { min-width:0; font:inherit; font-size:9px; padding:2px 6px; }

.messenger-conv-entrada {
  flex: 0 0 auto;
  padding: 0 4px 4px;
}

.messenger-conv-campo {
  display: block;
  width: 100%;
  height: 64px;
  min-width: 0;
  padding: 3px 4px;
  color: #000;
  font: 11px/1.3 var(--font-ui);
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  border-radius: 0;
  box-shadow: none;
  resize: none;
}

.messenger-conv-barra {
  flex: 0 0 24px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 4px;
}

.messenger-emoticonos {
  width: 82px;
  min-width: 0;
  height: 20px;
  padding: 0 2px;
  font: 11px var(--font-ui);
  background: #fff;
  border: 1px solid #7f9db9;
  border-radius: 0;
  box-shadow: none;
}

.messenger-enviar {
  width: 64px;
  min-width: 0;
  margin-left: auto;
}

@keyframes messenger-zumbido {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.window.messenger-zumbido {
  animation: messenger-zumbido 400ms linear;
}

@media (prefers-reduced-motion: reduce) {
  .window.messenger-zumbido {
    animation: none;
  }
}

@media (max-width: 640px) {
  .messenger-cabecera {
    padding: 0 6px;
  }

  .messenger-conv-mensajes {
    margin: 3px;
  }
}

/* Messenger: barra de herramientas, buscador y detalles de densidad ---------- */
.messenger-toolbar {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  background: linear-gradient(180deg, #f9fcfe 0%, #e6f0f8 55%, #d7e6f1 100%);
  border-bottom: 1px solid #b9cddc;
}

.messenger-tb {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  min-width: 0;
  height: 26px;
  padding: 0;
  color: #2c4a63;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
}

.messenger-tb:hover {
  color: #12395c;
  background: linear-gradient(180deg, #ffffff 0%, #d9ebfa 100%);
  border-color: #8fb4d0;
}

.messenger-tb:active {
  background: linear-gradient(180deg, #cfe3f5 0%, #eaf4fc 100%);
  border-color: #6f95b3;
}

.messenger-icono,
.messenger-carita {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.messenger-buscar {
  display: flex;
  flex: 0 0 26px;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: #eef4f9;
  border-bottom: 1px solid #d5e2ec;
}

.messenger-buscar-campo {
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  padding: 0 4px;
  font: 10px/18px var(--font-ui);
  color: #1a2b38;
  background: #fff;
  border: 1px solid #8ba7bd;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 12%);
}

.messenger-contacto-sub.is-cancion {
  color: #1b4fa8;
  text-decoration: underline;
}

.messenger-leyenda {
  margin-left: auto;
  padding-right: 6px;
  font-size: 9px;
  color: #61798c;
}

/* Messenger: conversación por capas (pestaña, aviso, lateral, emoticonos) ----- */
.messenger-conv-pestanas {
  display: flex;
  flex: 0 0 26px;
  align-items: flex-end;
  gap: 2px;
  padding: 2px 4px 0;
  background: linear-gradient(180deg, #dbe9f4 0%, #cfe0ee 100%);
  border-bottom: 1px solid #a9c0d2;
}

.messenger-conv-pestana {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 24px;
  padding: 0 8px;
  font: 10px/22px var(--font-ui);
  color: #12395c;
  background: linear-gradient(180deg, #fdfefe 0%, #eaf4fb 60%, #dcebf6 100%);
  border: 1px solid #9db8cd;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.messenger-conv-pestana.is-activa {
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #f4fafd 100%);
}

.messenger-conv-pestana-cerrar {
  color: #6b7f8f;
}

.messenger-conv-cuerpo {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.messenger-conv-aviso {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 6px;
  padding: 3px 6px;
  font-size: 9px;
  color: #555;
  background: #f2f2f2;
  border-bottom: 1px solid #ddd;
}

.messenger-conv-aviso-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font: 700 9px/1 Georgia, serif;
  color: #fff;
  background: #2f7adb;
  border-radius: 50%;
}

.messenger-conv-lateral {
  display: flex;
  flex: 0 0 84px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: #eef4f9;
  border-left: 1px solid #c3d4e0;
}

.messenger-conv-lateral-avatar {
  width: 64px;
  height: 64px;
  border: 2px solid #fff;
  border-radius: 3px;
  outline: 1px solid #8ba7bd;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

.messenger-conv-lateral-nombre {
  font-size: 10px;
  font-weight: 700;
  color: #12395c;
}

.messenger-conv-lateral-dato {
  font-size: 9px;
  color: #61798c;
  text-align: center;
}

.messenger-emoticonos {
  display: flex;
  align-items: center;
  gap: 1px;
}

.messenger-emoticono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 0;
  height: 18px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
}

.messenger-emoticono:hover {
  background: #fff;
  border-color: #8fb4d0;
}

.messenger-conv-columna {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.messenger-conv-columna .messenger-conv-mensajes {
  flex: 1 1 auto;
  min-height: 0;
}

.messenger-buscar-campo::-webkit-search-cancel-button,
.messenger-buscar-campo::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.messenger-demo {
  letter-spacing: 0;
  word-spacing: 0;
  font-family: var(--font-ui);
}

/* Messenger: participantes visibles y barra sin solapes --------------------- */
.messenger-msg-fila {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.messenger-msg-avatar {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #8ba7bd;
  border-radius: 2px;
}

.messenger-msg-avatar img,
.messenger-avatar-soporte {
  display: block;
  width: 100%;
  height: 100%;
}

.messenger-msg-fila .messenger-msg {
  flex: 1 1 auto;
  min-width: 0;
}

.messenger-conv-entrada-fila {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  padding: 0 4px;
}

.messenger-conv-entrada-fila .messenger-msg-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
  border: 2px solid #fff;
  outline: 1px solid #8ba7bd;
}

.messenger-conv-entrada-fila .messenger-conv-campo {
  flex: 1 1 auto;
  min-width: 0;
}

.messenger-emoticonos {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  width: auto;
  min-width: 0;
  height: 20px;
  padding: 0;
}

.messenger-conv-barra {
  flex-wrap: nowrap;
  overflow: hidden;
}

.messenger-conv-barra .messenger-enviar {
  flex: 0 0 70px;
  margin-left: auto;
}

.messenger-msg-avatar.messenger-conv-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.messenger-msg-avatar.messenger-conv-lateral-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border: 2px solid #fff;
  outline: 1px solid #8ba7bd;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

/* MSN skin */
.messenger-conv {
  background: #e8f2fd;
}

.messenger-conv-pestanas {
  flex: 0 0 28px;
  height: 28px;
  padding: 3px 6px 0;
  gap: 3px;
  background: linear-gradient(180deg, #0a5fbf 0%, #2f86e0 55%, #0a4f9e 100%);
  border-bottom: 1px solid #063a75;
}

.messenger-conv-pestana {
  height: 25px;
  padding: 0 10px;
  font: 700 10px/23px var(--font-ui);
  color: #0b4f9e;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5ff 55%, #cfe6fb 100%);
  border: 1px solid #7ea9d6;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 1px 0 #fff;
}

.messenger-conv-pestana.is-activa {
  padding-top: 0;
  background: linear-gradient(180deg, #fff 0%, #f7fbff 60%, #e3f1ff 100%);
  border-top: 2px solid #7ec3ff;
}

.messenger-conv-pestana-cerrar {
  margin-left: 2px;
  padding: 0 3px;
  font-weight: 700;
  color: #1b5a9c;
}

.messenger-conv-pestana-cerrar:hover {
  color: #fff;
  background: #d23b2e;
  border-radius: 2px;
}

.messenger-conv-cabecera {
  flex: 0 0 56px;
  height: 56px;
  padding: 0 8px;
  gap: 8px;
  color: #fff;
  background: linear-gradient(180deg, #0b62c4 0%, #3a8ce6 42%, #1f6fce 55%, #0a4a96 100%);
  border-bottom: 1px solid #063a75;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%), inset 0 -1px 0 rgb(0 0 0 / 25%);
}

.messenger-conv-cabecera .messenger-msg-avatar.messenger-conv-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  outline: 1px solid #0b4f9e;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgb(0 0 0 / 35%);
}

.messenger-conv-nombre {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgb(0 0 0 / 55%);
}

.messenger-conv-presencia {
  color: #d7ecff;
  font-size: 10px;
  text-shadow: 0 1px 1px rgb(0 0 0 / 50%);
}

.messenger-conv-toolbar {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  height: 34px;
  gap: 2px;
  padding: 0 4px;
  background: linear-gradient(180deg, #f7fbff 0%, #dcecfb 55%, #c4dcf3 100%);
  border-bottom: 1px solid #9fc1e0;
}

.messenger-conv-tb {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 28px;
  gap: 4px;
  padding: 0 6px;
  color: #154a7d;
  font: 9px var(--font-ui);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.messenger-conv-tb:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff 0%, #d9ecff 100%);
  border-color: #7ea9d6;
}

.messenger-conv-tb:active:not(:disabled) {
  background: linear-gradient(180deg, #cfe4f8 0%, #eef7ff 100%);
  border-color: #5f8fbe;
}

.messenger-conv-tb:disabled {
  opacity: .45;
  cursor: default;
}

.messenger-conv-tb .messenger-icono {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.messenger-conv-tb-texto {
  white-space: nowrap;
}

.messenger-conv-aviso {
  margin: 0 0 4px;
  padding: 4px 8px;
  font-size: 10px;
  color: #24527f;
  background: linear-gradient(180deg, #eef8ff 0%, #d8ecff 100%);
  border-bottom: 1px solid #a9c9e8;
}

.messenger-conv-aviso-icono {
  background: #1b6fd0;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 50%);
}

.messenger-conv-cuerpo {
  background: #e8f2fd;
}

.messenger-conv-mensajes {
  margin: 4px 4px 2px;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #7fa9d4;
  box-shadow: inset 0 0 0 1px #fff, 0 1px 2px rgb(0 0 0 / 10%);
}

.messenger-msg-fila {
  padding: 2px 4px;
  margin-bottom: 2px;
  border-bottom: 1px dotted #e2edf8;
}

.messenger-msg-fila:hover {
  background: #f4faff;
}

.messenger-msg-nick {
  color: #0b5bb5;
  font-size: 11px;
  font-weight: 700;
}

.messenger-msg-hora {
  color: #8a9bb0;
  font-size: 9px;
}

.messenger-msg-texto {
  color: #1a1a1a;
  font-size: 11px;
  line-height: 1.35;
}

.messenger-msg-avatar {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 1px solid #a9c3dc;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgb(0 0 0 / 12%);
}

.messenger-msg-sistema {
  color: #6b7f95;
  font-size: 10px;
  font-style: italic;
}

.messenger-msg-accion {
  min-width: 0;
  padding: 2px 7px;
  font: 9px var(--font-ui);
  color: #0d4f9e;
  background: linear-gradient(180deg, #fff 0%, #e2f0ff 100%);
  border: 1px solid #6f9fce;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 #fff;
  cursor: pointer;
}

.messenger-msg-accion:hover {
  background: linear-gradient(180deg, #fff 0%, #cfe8ff 100%);
  border-color: #3f7fbe;
}

.messenger-conv-lateral {
  flex: 0 0 120px;
  gap: 6px;
  padding: 8px 6px;
  background: linear-gradient(180deg, #eef8ff 0%, #d4e8fa 100%);
  border-left: 1px solid #a9c9e8;
}

.messenger-conv-lateral .messenger-conv-lateral-avatar {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border: 3px solid #fff;
  outline: 1px solid #5e93c9;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 28%);
}

.messenger-conv-lateral-nombre {
  color: #0b4f9e;
  font-size: 12px;
  font-weight: 700;
}

.messenger-conv-lateral-dato {
  padding: 2px 7px;
  font-size: 9px;
  color: #3f6892;
  text-align: center;
  background: #fff;
  border: 1px solid #b9d4ec;
  border-radius: 8px;
}

.messenger-conv-entrada {
  padding: 4px 6px;
  background: linear-gradient(180deg, #f4faff 0%, #dcecfa 100%);
  border-top: 1px solid #a9c9e8;
}

.messenger-conv-campo {
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  padding: 4px 6px;
  font: 11px/1.35 var(--font-ui);
  color: #111;
  background: #fff;
  border: 1px solid #7fa9d4;
  border-radius: 3px;
  box-shadow: inset 1px 1px 2px rgb(0 0 0 / 12%);
  resize: none;
}

.messenger-conv-barra {
  flex: 0 0 28px;
  align-items: center;
  height: 28px;
  gap: 4px;
  padding: 2px 0 0;
}

.messenger-emoticonos {
  height: 22px;
  gap: 1px;
}

.messenger-emoticono {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.messenger-emoticono:hover {
  background: #fff;
  border-color: #7ea9d6;
}

.messenger-conv-barra .messenger-barra-zumbido {
  height: 22px;
  min-width: 0;
  padding: 1px 8px;
  font: 10px var(--font-ui);
  color: #154a7d;
  background: linear-gradient(180deg, #fff 0%, #e2f0ff 100%);
  border: 1px solid #6f9fce;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 #fff;
}

.messenger-conv-barra .messenger-enviar {
  flex: 0 0 78px;
  height: 24px;
  min-width: 0;
  margin-left: auto;
  padding: 0 8px;
  color: #fff;
  font: 700 11px var(--font-ui);
  text-shadow: 0 1px 1px #0a3f7a;
  background: linear-gradient(180deg, #8ec8ff 0%, #3d86e0 52%, #1f63bf 100%);
  border: 1px solid #0a4a94;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%), 0 1px 1px rgb(0 0 0 / 25%);
}

.messenger-conv-barra .messenger-enviar:hover:not(:disabled) {
  background: linear-gradient(180deg, #a6d6ff 0%, #4d96ee 52%, #2a72cd 100%);
}

.messenger-conv-barra .messenger-enviar:disabled {
  opacity: .5;
}

.messenger-conv-pie {
  display: flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: space-between;
  height: 18px;
  padding: 0 6px;
  font: 9px var(--font-ui);
  color: #24527f;
  background: linear-gradient(180deg, #dcecfa 0%, #c3ddf5 100%);
  border-top: 1px solid #a9c9e8;
}

.messenger-conv-pie-sonido {
  color: #2f6b3a;
}

@media (max-width: 640px) {
  .messenger-conv-cabecera {
    flex-basis: 48px;
    height: 48px;
    padding: 0 6px;
  }

  .messenger-conv-cabecera .messenger-msg-avatar.messenger-conv-avatar {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .messenger-conv-toolbar {
    flex-basis: 30px;
    height: 30px;
  }

  .messenger-conv-tb {
    padding: 0 4px;
  }

  .messenger-conv-tb-texto {
    display: none;
  }

  .messenger-conv-lateral {
    flex-basis: 88px;
    padding: 6px 4px;
  }

  .messenger-conv-lateral .messenger-conv-lateral-avatar {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
  }

  .messenger-conv-nombre {
    font-size: 13px;
  }

  .messenger-conv-mensajes {
    margin: 3px;
  }
}

@media (max-width: 480px) {
  .messenger-conv-lateral {
    display: none;
  }
}
