/* Ágora System — shell ola 1 */
:root {
  --green: #35e66b;
  --green-soft: #7dff9f;
  --bg: #030403;
  --card: rgba(13, 17, 14, 0.92);
  --line: rgba(53, 230, 107, 0.22);
  --text: #f5f7f5;
  --muted: #aab4ad;
  --warn: #ffb347;
  --bad: #ff6b6b;
  --ui-zoom: 0.67;
  --modal-open-frac: 0.8;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  font-family: "Montserrat", sans-serif;
}

/*
  Densidad de contenido (~67%).
  SOLO en body, nunca en html: el overlay AgoraModal vive en <html>
  (si cuelga de body, Chrome lo pinta en la esquina al 67%).
  El diálogo aplica el mismo --ui-zoom para que campos/botones
  coincidan con la ficha; abre al 80% visual de la ventana.
*/
body:not(.mode-login) {
  zoom: var(--ui-zoom);
}

/* —— Inputs System: nunca fondo blanco nativo (Win/Chrome) —— */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
select,
textarea,
.agora-input,
.multi-picker-toggle {
  font-family: inherit;
  background-color: #0a0f0c !important;
  background-image: none;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea,
.agora-input {
  width: 100%;
  padding: 10px 12px;
}

select,
select.agora-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2388aa94' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 34px !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  opacity: 0.75;
  cursor: pointer;
}

.agora-date-wrap {
  position: relative;
  display: block;
}
.agora-date-wrap > input.agora-input {
  padding-right: 38px;
  position: relative;
  z-index: 1;
}
/* type=date solo alimenta showPicker: sin clics, no tapa el texto (zoom del modal). */
.agora-date-wrap .agora-date-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  pointer-events: none;
  z-index: 0;
}
.agora-date-wrap .agora-date-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  z-index: 2;
  border: 0;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2388aa94' stroke-width='1.6'%3E%3Crect x='2' y='3.5' width='12' height='11' rx='1.5'/%3E%3Cpath d='M2 7h12M5.5 2v3M10.5 2v3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}
.agora-date-wrap .agora-date-btn:hover {
  opacity: 1;
  background-color: rgba(53, 230, 107, 0.1);
}
.agora-date-wrap .agora-date-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
/* Almanaque propio (agora-fields.js abrirAlmanaque, 1/12/2026). */
.agora-date-wrap.is-cal-open {
  z-index: 40;
}
.agora-cal {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  width: 252px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a0f0c;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  font-size: 0.8rem;
  color: var(--text);
}
.agora-cal.es-arriba {
  top: auto;
  bottom: calc(100% + 4px);
}
.agora-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 700;
}
.agora-cal-nav {
  width: 30px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.agora-cal-nav:hover {
  background: rgba(53, 230, 107, 0.1);
}
.agora-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.agora-cal-dow {
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  padding-bottom: 2px;
}
.agora-cal-dia {
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.agora-cal-dia:hover {
  background: rgba(53, 230, 107, 0.12);
}
.agora-cal-dia.es-hoy {
  border-color: var(--line);
  color: var(--green-soft);
}
.agora-cal-dia.es-elegido {
  background: var(--green);
  border-color: var(--green);
  color: #031006;
  font-weight: 700;
}
@media (max-width: 720px) {
  .agora-cal {
    width: 280px;
  }
  .agora-cal-dia {
    height: 34px;
  }
}

option {
  background-color: #0a0f0c;
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 10%, rgba(53, 230, 107, 0.12), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(53, 230, 107, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  line-height: 1.55;
}

body.mode-login {
  overflow: hidden;
  background: #000;
}

body.mode-login .site-header {
  display: none;
}

.wrap {
  width: calc(100% - 28px);
  max-width: none;
  margin: 0 auto;
}

.app-main {
  padding-bottom: 20px;
  font-size: 13px;
  line-height: 1.35;
}

/*
  Densidad global del contenido (fuera del header).
  Header/contexto/módulos NO se tocan. PC 100% + celular.
*/
.app-main .hero {
  padding: 10px 0 8px;
}

.app-main .hero h1 {
  margin: 0 0 2px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.app-main .hero p {
  font-size: 0.78rem;
  max-width: none;
}

.app-main .hero-actions {
  margin-top: 6px;
  gap: 8px;
}

.app-main .hero-row {
  gap: 10px;
  align-items: center;
}

.app-main .panel {
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 12px;
}

.app-main .panel h2 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.app-main .panel h3,
.app-main .panel h4 {
  font-size: 0.82rem;
}

.app-main .help,
.app-main .panel-notice {
  font-size: 0.72rem;
  margin: 0 0 6px;
}

.app-main table {
  font-size: 0.78rem;
}

.app-main th,
.app-main td {
  padding: 6px 8px;
}

.app-main .agora-input,
.app-main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.app-main select,
.app-main textarea {
  font-size: 0.82rem;
  padding: 7px 9px;
  min-height: 34px;
}

.app-main .btn-primary,
.app-main .btn-ghost {
  font-size: 0.78rem;
  min-height: 34px;
  padding: 7px 14px;
}

.app-main .btn-sm {
  font-size: 0.72rem;
  min-height: 30px;
  padding: 5px 10px;
}

.app-main .grid {
  gap: 10px;
  margin: 12px 0;
}

.app-main .card {
  padding: 12px;
  border-radius: 12px;
}

.app-main .card h2 {
  font-size: 0.72rem;
  margin: 0 0 4px;
}

.app-main .card .value {
  font-size: 1.15rem;
}

.app-main .card .hint {
  font-size: 0.72rem;
}

.app-main .form-grid {
  gap: 8px 10px;
}

.app-main label {
  font-size: 0.75rem;
}

/* Grillas System: scroll interno + títulos sticky. Misma altura de viewport (más filas visibles). */
.oms-motos-panel .table-wrap--excel,
#catalogo-panel-productos .table-wrap--excel,
#aloise-cat-panel-stock .table-wrap--excel,
#aloise-cat-panel-catalogo .table-wrap--excel,
#aloise-cat-panel-glp .table-wrap--excel,
#aloise-cat-panel-ofertas .table-wrap--excel,
#aloise-cat-panel-precios .table-wrap--excel,
#aloise-cat-panel-categorias .table-wrap--excel,
#view-crm #crm-list-shell .table-wrap--excel,
#view-financiera .table-wrap--excel,
#view-liquidar .table-wrap--excel,
#view-comunicacion .table-wrap--excel,
#view-caja .table-wrap--excel,
#view-postventa .table-wrap--excel {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  height: calc(100dvh - 240px);
  max-height: calc(100dvh - 240px);
  min-height: 28rem;
}
@supports not (height: 100dvh) {
  .oms-motos-panel .table-wrap--excel,
  #catalogo-panel-productos .table-wrap--excel,
  #aloise-cat-panel-stock .table-wrap--excel,
  #aloise-cat-panel-catalogo .table-wrap--excel,
  #aloise-cat-panel-glp .table-wrap--excel,
  #aloise-cat-panel-ofertas .table-wrap--excel,
  #aloise-cat-panel-precios .table-wrap--excel,
  #aloise-cat-panel-categorias .table-wrap--excel,
  #view-crm #crm-list-shell .table-wrap--excel,
  #view-financiera .table-wrap--excel,
  #view-liquidar .table-wrap--excel,
  #view-comunicacion .table-wrap--excel,
  #view-caja .table-wrap--excel,
  #view-postventa .table-wrap--excel {
    height: calc(100vh - 240px);
    max-height: calc(100vh - 200px);
  }
}

#view-financiera .table-wrap--excel,
#view-liquidar .table-wrap--excel {
  height: calc(100dvh - 188px);
  max-height: calc(100dvh - 188px);
  min-height: 32rem;
}
@supports not (height: 100dvh) {
  #view-financiera .table-wrap--excel,
  #view-liquidar .table-wrap--excel {
    height: calc(100vh - 188px);
    max-height: calc(100vh - 188px);
  }
}

#view-facturar .table-wrap--excel,
#view-informes .table-wrap--excel,
#view-comunicacion-notif .table-wrap--excel,
#view-lineas-credito .table-wrap--excel {
  height: auto;
  min-height: 16rem;
  max-height: calc(100dvh - 280px);
  overflow: auto;
}
#view-comunicacion-notif .table-wrap--com-tall {
  min-height: 28rem;
  max-height: min(44rem, calc(52dvh - 24px));
}
.oms-motos-panel .oms-grilla,
.catalogo-grilla,
#crm-grilla.oms-grilla {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}
.oms-motos-panel .oms-grilla {
  table-layout: fixed;
}
.oms-motos-panel .oms-grilla th,
.oms-motos-panel .oms-grilla td {
  padding: 6px 8px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oms-motos-panel .oms-grilla th.oms-th-alarm,
.oms-motos-panel .oms-grilla td[data-col="entrega"],
.oms-motos-panel .oms-grilla td[data-col="cobros"],
.oms-motos-panel .oms-grilla td[data-col="pago"],
.oms-motos-panel .oms-grilla td[data-col="motovehiculo"] {
  text-align: left;
}
.oms-motos-panel .oms-grilla td[data-col="estado"] {
  text-align: left;
}
.oms-motos-panel .oms-grilla .oms-estado {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.oms-motos-panel .oms-grilla .oms-estado--na {
  color: var(--muted);
  font-weight: 500;
}
.oms-motos-panel .oms-grilla th.oms-th-alarm {
  letter-spacing: 0.02em;
}
.oms-motos-panel .oms-grilla th,
.catalogo-grilla th,
.table-wrap--excel .oms-grilla th {
  position: relative;
  z-index: 1;
  user-select: none;
  cursor: grab;
  background: rgba(10, 14, 11, 0.98);
}
.table-wrap--excel table thead th.agora-th-sticky,
.table-wrap--excel table thead tr:first-child th,
.table-wrap--excel table thead tr:nth-child(2) th,
.catalogo-grilla thead th.agora-th-sticky,
.catalogo-grilla thead tr:first-child th,
.catalogo-grilla thead tr:nth-child(2) th {
  position: sticky !important;
  z-index: 6;
  background: rgba(10, 14, 11, 0.98);
  box-shadow: 0 1px 0 var(--line);
}
.table-wrap--excel table thead tr:first-child th,
.catalogo-grilla thead tr:first-child th {
  top: 0;
  z-index: 7;
}
.table-wrap--excel table thead tr:nth-child(2) th,
.catalogo-grilla thead tr:nth-child(2) th {
  top: 2.4rem;
  z-index: 6;
}
.oms-motos-panel .oms-grilla th.oms-th-sort,
.catalogo-grilla th,
#crm-grilla.oms-grilla th {
  cursor: grab;
}
.catalogo-grilla th,
.catalogo-grilla td {
  padding: 6px 10px;
  line-height: 1.3;
  white-space: nowrap;
}
#view-aloise-catalogo .oms-grilla,
#view-aloise-catalogo .catalogo-grilla {
  table-layout: fixed;
}
.oms-col-resize,
.agora-col-resize {
  position: absolute;
  top: 0;
  right: -2px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}
.oms-col-resize:hover,
.oms-col-resize.is-dragging,
.agora-col-resize:hover,
.agora-col-resize.is-dragging {
  background: rgba(53, 230, 107, 0.35);
}
.agora-col-dragging {
  opacity: 0.55;
}
.agora-col-dragging,
thead th.is-drop-target {
  box-shadow: inset 0 -2px 0 var(--accent, #35e66b);
}
.agora-col-menu {
  position: fixed;
  z-index: 400;
  min-width: 240px;
  max-width: 360px;
  max-height: 70vh;
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 11, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agora-col-menu button {
  text-align: left;
  font: inherit;
  font-size: 0.72rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
}
.agora-col-menu button:hover:not(:disabled) {
  background: rgba(53, 230, 107, 0.12);
}
.agora-col-menu button:disabled {
  opacity: 0.4;
  cursor: default;
}
.btn-link-help {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.btn-link-help:hover {
  color: var(--accent, #35e66b);
}
.oms-cols-help {
  margin-top: 4px;
}
.oms-motos-panel .oms-filters {
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
}
.oms-motos-panel .oms-filters label {
  font-size: 0.72rem;
}
.oms-motos-panel .oms-filters .agora-input {
  font-size: 0.82rem;
  min-height: 32px;
  padding: 4px 8px;
}
.oms-motos-panel .btn-sm {
  padding: 5px 10px;
  font-size: 0.72rem;
  min-height: 32px;
}
.oms-motos-panel .oms-luz {
  font-size: 0.72rem;
}

/* —— Header logueado —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(14px);
}

/*
  Desktop (default): UNA línea
  [Logo+System] [Contexto|Módulo] …… [API][Usuario]
*/
.header-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  padding: 8px 0;
  width: calc(100% - 28px);
  max-width: none;
  margin: 0 auto;
}

.header-shell .brand {
  grid-area: brand;
  flex: none;
  min-width: 0;
}

.nav-rail {
  grid-area: nav;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.nav-rail[hidden] {
  display: none !important;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: 0;
  justify-self: end;
}

.acompanar {
  position: relative;
  display: flex;
  align-items: center;
}
.acompanar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(53, 230, 107, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  min-height: 28px;
}
.acompanar-btn:hover,
.acompanar-btn.is-volver {
  color: var(--text);
  border-color: var(--green);
}
.acompanar-btn.is-volver {
  background: rgba(53, 230, 107, 0.16);
}
.acompanar-barra {
  display: none !important;
}
.acompanar-capa {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 4000;
  pointer-events: none;
  zoom: 1;
}
.acompanar-puntero {
  position: absolute;
  width: 0;
  height: 0;
}
.acompanar-puntero i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  background: var(--puntero, #35e66b);
  border: 2px solid #04140a;
  transform: rotate(-28deg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.acompanar-puntero span,
.acompanar-chip {
  position: absolute;
  left: 22px;
  top: -8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #04140a;
  color: #fff;
  border: 2px solid var(--puntero, #35e66b);
  font: 800 14px/1.2 Montserrat, sans-serif;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.acompanar-chip {
  left: 50%;
  transform: translateX(-50%);
}

.presence-banner {
  display: none;
  border-bottom: 1px solid var(--line);
  background: rgba(53, 230, 107, 0.09);
}
.presence-banner.is-on {
  display: block;
}
.presence-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  width: calc(100% - 28px);
  max-width: none;
  margin: 0 auto;
}
.presence-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}
.presence-banner-x {
  margin-left: auto;
  min-width: 40px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.presence-banner-x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.agora-modal-inner > .presence-banner.is-on {
  display: block;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(53, 230, 107, 0.1);
}
.agora-modal-inner > .presence-banner .presence-banner-inner {
  width: auto;
  max-width: none;
  padding: 6px 12px;
}
.agora-descarga-velo {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 12, 8, 0.72);
  pointer-events: auto;
}
.agora-descarga-velo[hidden] {
  display: none !important;
}
.agora-descarga-velo-caja {
  width: min(92vw, 440px);
  margin: 16px;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: #12301c;
  border: 1px solid rgba(53, 230, 107, 0.45);
  color: #d9ffe6;
  font: 600 16px/1.35 Montserrat, sans-serif;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.agora-descarga-velo-caja .agora-descarga-velo-txt {
  margin: 0;
}
.agora-descarga-velo-caja .catalogo-cargando-bar {
  margin: 12px auto 0;
  max-width: 280px;
}
.agora-files-busy {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 2400;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(6, 10, 8, 0.94);
  border: 1px solid rgba(53, 230, 107, 0.35);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}
html.agora-cam-rec-lock,
html.agora-cam-rec-lock body {
  overflow: hidden;
}
.agora-cam-rec {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: #050705;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.agora-cam-rec-view,
.agora-cam-rec-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.agora-cam-rec-review img.agora-cam-rec-play {
  object-fit: contain;
}
.agora-cam-rec-top,
.agora-cam-rec-bot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
}
.agora-cam-rec-bot {
  margin-top: auto;
  flex-direction: column;
  padding: 10px 14px max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}
.agora-cam-rec-top {
  justify-content: space-between;
  background: linear-gradient(rgba(0, 0, 0, 0.65), transparent);
}
.agora-cam-rec-x {
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font: inherit;
  font-weight: 600;
}
.agora-cam-rec-time,
.agora-cam-rec-res {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
}
.agora-cam-rec-hint {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}
.agora-cam-rec-shutter {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #e10600;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.25);
}
.agora-cam-rec-shutter.is-photo {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.35);
}
.agora-cam-rec-shutter.is-rec {
  border-radius: 12px;
  background: #c40c0c;
  width: 52px;
  height: 52px;
}
.agora-cam-rec-review {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #050705;
  display: flex;
  flex-direction: column;
}
.agora-cam-rec-review[hidden] {
  display: none;
}
.agora-cam-rec-actions {
  position: relative;
  z-index: 4;
  margin-top: auto;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 14px max(22px, env(safe-area-inset-bottom));
}
.agora-cam-rec-actions .btn-ghost,
.agora-cam-rec-actions .btn-primary {
  min-height: 44px;
}
.agora-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.agora-scan-overlay.is-edit {
  pointer-events: none;
}
.agora-scan-overlay.is-edit .agora-scan-handle {
  pointer-events: auto;
  cursor: grab;
  fill: #35e66b;
  stroke: #fff;
  stroke-width: 2;
}
.agora-scan-stage {
  position: absolute;
  inset: 0;
  background: #050705;
}
.agora-scan-review-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.agora-scan-presets {
  display: flex;
  gap: 6px;
  justify-content: center;
  width: 100%;
  margin-bottom: 6px;
}
.agora-scan-presets button {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 6px 12px;
}
.agora-scan-presets button.is-on {
  border-color: rgba(53, 230, 107, 0.55);
  background: rgba(53, 230, 107, 0.16);
}
.agora-adj-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agora-adj-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
}
.agora-adj-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.agora-adj-acts {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.agora-cam-rec-review .agora-scan-stage {
  flex: 1 1 auto;
  min-height: 0;
}
.agora-cam-rec-review .agora-scan-review-hint {
  position: relative;
  z-index: 4;
  margin: 8px 14px 0;
}
.agora-cam-rec-review .agora-cam-rec-actions {
  margin-top: auto;
}
.agora-scan-warn {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffb347;
}
.agora-scan-warn[hidden] {
  display: none !important;
}
.agora-scan-tools {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.agora-scan-tools button {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
}
.agora-scan-tools button.is-on {
  border-color: rgba(53, 230, 107, 0.55);
  background: rgba(53, 230, 107, 0.16);
}
.agora-scan-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px 0 8px;
}
.agora-scan-thumbs img {
  width: 44px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.agora-scan-confirm {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.agora-scan-confirm[hidden] {
  display: none !important;
}
.agora-scan-confirm-box {
  max-width: 360px;
  background: #12161c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.agora-scan-confirm-box p {
  margin: 0 0 12px;
}
.agora-scan-confirm-box .agora-cam-rec-actions {
  padding: 0;
}
.ope-obs-send-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}
.ope-obs-send-row .ope-obs-wide {
  flex: 1 1 auto;
  min-width: 0;
}
.ope-papel-obs-log {
  white-space: pre-wrap;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 4px;
  max-height: 120px;
  overflow: auto;
}
@media (max-width: 720px) {
  .ope-obs-send-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ope-obs-send-row .btn-primary {
    min-height: 40px;
  }
}
.presence-admin {
  position: relative;
}
.presence-admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(53, 230, 107, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  min-height: 28px;
}
.presence-admin-chip[hidden] {
  display: none !important;
}
.presence-admin-chip:hover {
  color: var(--text);
  border-color: var(--green);
}
.presence-admin-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  max-width: min(460px, 92vw);
  max-height: 50vh;
  overflow: auto;
  z-index: 80;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 12, 9, 0.98);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.presence-admin-menu-title {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.presence-admin-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.presence-admin-menu li {
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
}
.presence-ir {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.presence-ir:hover {
  background: rgba(53, 230, 107, 0.12);
}
.is-cargando {
  position: relative;
}
#view-catalogo.is-cargando > :not(.pantalla-velo),
#view-aloise-catalogo.is-cargando > :not(.pantalla-velo) {
  visibility: hidden;
}
.pantalla-velo {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 8px 0 0;
}
.pantalla-velo[hidden] {
  display: none !important;
}
@media (max-width: 720px) {
  .presence-admin-chip-label {
    display: none;
  }
  .presence-banner-inner {
    font-size: 0.72rem;
    padding: 6px 10px;
  }
}

/* API: punto + texto corto (desktop); solo punto en móvil */
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(53, 230, 107, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.api-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}

.api-status.is-bad {
  background: rgba(220, 60, 60, 0.1);
}
.api-status.is-bad .api-status-dot {
  background: var(--bad);
  box-shadow: 0 0 8px var(--bad);
}
.api-status.is-warn {
  background: rgba(230, 180, 34, 0.1);
}
.api-status.is-warn .api-status-dot {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}

/* Menú cuenta compacto */
.account-menu {
  position: relative;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.account-trigger:hover,
.account-menu.is-open .account-trigger {
  border-color: rgba(53, 230, 107, 0.35);
  background: rgba(53, 230, 107, 0.08);
}

.account-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(53, 230, 107, 0.18);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.account-caret {
  color: var(--muted);
  font-size: 0.65rem;
  flex-shrink: 0;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(53, 230, 107, 0.25);
  background: #0c1210;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.account-meta {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
  white-space: pre-line;
}

.account-logout {
  width: 100%;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.account-logout:hover {
  border-color: rgba(220, 60, 60, 0.45);
  background: rgba(220, 60, 60, 0.1);
}

/* Nav: contexto + módulos (grid-area: nav ya definida arriba) */
.nav-rail {
  grid-area: nav;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.nav-rail[hidden] {
  display: none !important;
}

.nav-rail-sep {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(53, 230, 107, 0.35),
    transparent
  );
  margin: 10px 0 2px;
}

.nav-zone {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nav-zone-scope {
  flex: 0 0 auto;
}

.nav-zone-modules {
  flex: 1;
  min-width: 0;
}

.nav-zone-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(159, 240, 184, 0.7);
  padding-left: 2px;
  line-height: 1;
}

.nav-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.scope-switcher.nav-chips {
  flex: 0 0 auto;
  width: auto;
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
}

.comercial-line {
  margin-top: 4px;
}

.comercial-line[hidden] {
  display: none !important;
}

.modules-carousel {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
}

.mod-nav-btn {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(53, 230, 107, 0.35);
  border-radius: 8px;
  background: #050805;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.mod-nav-btn:hover {
  border-color: #9affc0;
  color: #9affc0;
}

.main-nav.nav-chips {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 1px;
}

.main-nav.nav-chips::-webkit-scrollbar {
  display: none;
}

/* Negro + borde verde. Activo = idéntico + puntito neón en el perímetro */
.nav-chip,
.scope-btn.nav-chip,
.main-nav a.nav-chip {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(53, 230, 107, 0.55) !important;
  background: #050805 !important;
  box-shadow: none !important;
  color: var(--green) !important;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: visible;
  transition: border-color 0.15s ease, color 0.15s ease;
  animation: none !important;
}

.nav-chip:hover,
.scope-btn.nav-chip:hover,
.main-nav a.nav-chip:hover {
  border-color: #9affc0 !important;
  color: #9affc0 !important;
  background: #050805 !important;
}

.scope-btn.nav-chip.is-active,
.main-nav a.nav-chip.active {
  background: #050805 !important;
  color: var(--green) !important;
  border-color: rgba(53, 230, 107, 0.75) !important;
  box-shadow: none !important;
  animation: none !important;
}

.scope-btn.nav-chip.is-active::before,
.main-nav a.nav-chip.active::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: #b8ffd0;
  box-shadow:
    0 0 4px #35e66b,
    0 0 10px #35e66b,
    0 0 14px rgba(53, 230, 107, 0.75);
  offset-path: border-box;
  offset-anchor: center;
  offset-distance: 0%;
  offset-rotate: 0deg;
  animation: nav-dot-orbit 2.6s linear infinite;
  pointer-events: none;
  z-index: 3;
}

.scope-btn.nav-chip.is-active::after,
.main-nav a.nav-chip.active::after {
  content: none !important;
  display: none !important;
}

@keyframes nav-dot-orbit {
  to {
    offset-distance: 100%;
  }
}

@supports not (offset-path: border-box) {
  .scope-btn.nav-chip.is-active::before,
  .main-nav a.nav-chip.active::before {
    inset: -2px;
    width: auto;
    height: auto;
    margin: 0;
    padding: 1.5px;
    background: conic-gradient(
      from 0deg,
      transparent 0 350deg,
      #b8ffd0 354deg,
      #35e66b 358deg,
      transparent 360deg
    );
    box-shadow: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    offset-path: none;
    animation: nav-led-spin 2.6s linear infinite;
  }
}

@keyframes nav-led-spin {
  to {
    transform: rotate(360deg);
  }
}

.scope-carousel-btn {
  display: none;
}

.scope-mobile-label {
  display: none;
}

.ppt-stream-mini {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 140px;
  overflow: auto;
  font-size: 0.78rem;
}

.ppt-stream-mini li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ppt-stream-mini .muted {
  color: var(--muted);
}

#crm-grilla tbody tr.crm-row {
  cursor: pointer;
}

#crm-grilla tbody tr.crm-row:hover {
  background: rgba(255,255,255,0.04);
}

.crm-historial-block {
  margin-top: 14px;
}

/* CRM ficha: layout propio (no Motos ope-layout-4q / absolute Obs).
   Grid 2×2: Cliente+Obs fila 1 (misma track = misma altura); Adjuntos solo (1,2). */
#view-crm-detail.is-detail-shell .detail-scroll-body {
  display: flex;
  flex-direction: column;
}
#view-crm-detail #crm-detail-root {
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.crm-layout-ficha {
  flex: 1 1 auto;
  min-height: 100%;
  box-sizing: border-box;
}
.crm-layout-ficha .panel,
.crm-layout-ficha .ope-card,
.crm-layout-ficha #crm-obs-panel,
.crm-layout-ficha .crm-adjuntos-card {
  margin: 0 !important;
}
.crm-layout-ficha .crm-cliente-card > .crm-agenda-block {
  flex: 0 0 auto;
  margin-bottom: 0;
  min-height: 0;
}
.crm-datos-block .modal-form-grid {
  min-width: 0;
}
@media (max-width: 720px) {
  .crm-datos-block .modal-form-grid {
    grid-template-columns: 1fr;
  }
  .crm-datos-block .modal-form-grid .span-2 {
    grid-column: 1;
  }
}
.crm-datos-block h2,
.crm-domicilios-block h3,
.crm-rel-block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.crm-domicilios-block,
.crm-rel-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.crm-ficha-dl {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.crm-ficha-dl dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.crm-ficha-dl dd {
  margin: 2px 0 0;
}

.crm-rel-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.crm-rel-block h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}
.crm-rel-ul {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.crm-rel-ul li {
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crm-rel-ul li.is-desuso {
  opacity: 0.55;
}

.fin-pre-otp {
  width: 100%;
  margin: 8px 0 4px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}
.fin-pre-otp h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}
.fin-otp-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.4fr) auto minmax(6rem, 0.8fr) auto minmax(7rem, 1fr);
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.fin-otp-lab {
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  .fin-otp-row {
    grid-template-columns: 1fr 1fr;
  }
  .fin-otp-lab {
    grid-column: 1 / -1;
  }
}

.crm-adjuntos-card {
  margin-top: 0;
}

.crm-adjuntos-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.crm-adjuntos-list li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.crm-adj-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

#crm-obs-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

#crm-obs-panel .ope-obs-card-title,
#crm-obs-panel .crm-obs-help,
#crm-obs-panel .ope-stream-filters,
#crm-obs-panel .ope-stream-compose {
  flex-shrink: 0;
}

#crm-obs-panel .ope-stream-list,
#crm-obs-list.ope-stream-list,
#crm-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  margin-top: 6px;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}

.scope-btn.is-active:not(.nav-chip),
.scope-btn:hover:not(.nav-chip) {
  color: var(--text);
  background: rgba(53, 230, 107, 0.16);
}

.main-nav {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a:not(.nav-chip) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.main-nav a.active:not(.nav-chip),
.main-nav a:hover:not(.nav-chip) {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.main-nav a[hidden] {
  display: none !important;
}

.catalogo-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.catalogo-tab.is-active {
  border-color: rgba(120, 200, 140, 0.55);
  background: rgba(120, 200, 140, 0.12);
}

#aloise-cat-table thead tr:first-child th,
#aloise-pulida-table thead tr:first-child th {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: normal;
}
#aloise-cat-table thead tr:first-child th .th-sort,
#aloise-pulida-table thead tr:first-child th .th-sort {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.catalogo-precio-readonly {
  font-weight: 700;
  white-space: nowrap;
}

td.catalogo-pvp-edit {
  cursor: text;
}

td.catalogo-pvp-edit input.agora-input {
  width: 100%;
  min-width: 7.5rem;
  padding: 4px 6px;
  font: inherit;
  font-weight: 700;
}

.ficha-precio-hist {
  max-height: 168px;
  overflow: auto;
}

.ficha-historial {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ficha-historial li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ficha-historial time {
  color: var(--muted);
  font-size: 0.78rem;
}

.agora-modal-body:has(.hist-scroll) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.glp-hist-pop {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.glp-hist-pop .hist-scroll {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.agora-modal-body:has(.glp-hist-pop) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.agora-modal-body:has(.tn-print) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding: 0;
}

.tn-print {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 16px 16px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  line-height: 1.45;
}

.tn-print .ficha-historial {
  gap: 0;
  min-height: 100%;
}

.tn-print .ficha-historial li {
  flex-direction: row;
  align-items: baseline;
  gap: 18px;
  padding: 7px 0;
}

.tn-print time {
  flex: 0 0 150px;
  font-size: 13px;
}

.tn-print span {
  flex: 1 1 auto;
}

.agora-modal-dialog.is-resizable .agora-modal-body:has(.ficha-print),
.agora-modal-dialog.is-wide .agora-modal-body:has(.ficha-print),
.agora-modal-dialog.is-catalog .agora-modal-body:has(.ficha-print),
.agora-modal-body:has(.ficha-print) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  padding: 0;
}

.ficha-print {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 22px 18px;
}

.ficha-print .ficha-historial {
  gap: 0;
  min-height: 100%;
}

.ficha-print .ficha-historial li {
  padding: 13px 0;
  gap: 5px;
}

.ficha-print time {
  font-size: 0.92rem;
}

.ficha-print span {
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--text);
}

.ficha-print--vacio {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ficha-print--vacio .help {
  margin: 0;
  font-size: 1.05rem;
  text-align: center;
}

.hist-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(62vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#precios-historial-modal .modal-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(86vh, 760px);
}

#precios-historial-modal .hist-scroll {
  max-height: min(62vh, 560px);
}

.catalogo-row-click {
  cursor: pointer;
}

.catalogo-row-click:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.catalogo-web-link {
  color: var(--green-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.catalogo-web-link:hover {
  color: var(--green);
}

.catalogo-lista-select {
  min-width: 140px;
  max-width: 180px;
}

#catalogo-panel-lista .panel-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

#catalogo-panel-lista .precios-dirty {
  margin-left: auto;
  color: var(--warn, #e6b422);
  font-size: 0.85rem;
}

/* Desktop: refuerzo una línea */
@media (min-width: 721px) {
  .header-shell {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav actions";
    align-items: center;
    padding: 8px 0;
    column-gap: 12px;
  }

  .header-shell .brand {
    grid-area: brand;
  }

  .nav-rail {
    grid-area: nav;
    flex-direction: row;
    align-items: flex-end;
  }

  .header-actions {
    grid-area: actions;
  }

  .nav-zone-label {
    font-size: 0.56rem;
  }

  .nav-chip,
  .scope-btn.nav-chip,
  .main-nav a.nav-chip {
    padding: 5px 11px;
    font-size: 0.74rem;
    min-height: 30px;
  }

  .mod-nav-btn {
    display: none;
  }

  .main-nav.nav-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .brand-text small {
    display: none; /* “Aware Assistant” fuera: ahorra ancho en la línea única */
  }
}

/* Móvil: 3 niveles — brand+API · contexto · módulo */
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 24px);
  }

  .header-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    column-gap: 8px;
    row-gap: 6px;
    padding: 6px 0 8px;
    align-items: center;
  }

  .header-shell .brand {
    grid-area: brand;
    gap: 8px;
    min-width: 0;
  }

  .header-actions {
    grid-area: actions;
    margin-left: 0;
    justify-self: end;
  }

  .nav-rail {
    grid-area: nav;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: none;
  }

  .nav-rail[hidden] {
    display: none !important;
  }

  .nav-rail-sep {
    display: none;
  }

  .nav-zone-scope,
  .nav-zone-modules {
    flex: none;
    width: 100%;
  }

  .nav-zone-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  .brand img,
  .brand-logo-img {
    height: 28px;
    max-width: 110px;
  }

  .brand-text strong {
    font-size: 0.75rem;
  }

  .brand-text small {
    display: none;
  }

  .api-status {
    padding: 4px;
    border-radius: 50%;
    gap: 0;
  }

  .api-status-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .account-name {
    display: none;
  }

  .account-trigger {
    padding: 2px;
    max-width: none;
  }

  .account-caret {
    display: none;
  }

  .account-initials {
    width: 32px;
    height: 32px;
  }

  .scope-switcher.nav-chips,
  .main-nav.nav-chips {
    width: 100%;
    overflow-x: auto;
  }

  .nav-chip,
  .scope-btn.nav-chip,
  .main-nav a.nav-chip {
    padding: 5px 10px;
    min-height: 30px;
    font-size: 0.72rem;
  }

  .modules-carousel {
    gap: 2px;
  }

  .mod-nav-btn {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
}

@media (min-width: 721px) {
  .scope-mobile-nav,
  .scope-mobile-label {
    display: none !important;
  }
}

.btn-primary,
.btn-ghost {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  border-radius: 999px;
  cursor: pointer;
}

.btn-primary {
  border: 1px solid rgba(53, 230, 107, 0.42);
  background: rgba(53, 230, 107, 0.14);
  color: var(--green-soft);
  padding: 12px 20px;
}

.btn-primary:hover {
  background: rgba(53, 230, 107, 0.22);
  border-color: rgba(53, 230, 107, 0.55);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
}

/* Historial = solo ícono reloj (title = tooltip) */
.btn-hist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn-hist:hover {
  color: var(--text);
  border-color: rgba(53, 230, 107, 0.35);
  background: rgba(53, 230, 107, 0.08);
}

.btn-hist svg {
  display: block;
  width: 15px;
  height: 15px;
}

.btn-hist.btn-hist-sm {
  width: 26px;
  height: 26px;
}

.btn-hist.btn-hist-sm svg {
  width: 13px;
  height: 13px;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
  overflow: hidden;
  background: #000;
}

/* —— Cosmos login: nebulosa en bordes, negro en el centro —— */
.login-space {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.login-stars {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(125, 255, 159, 0.8), transparent),
    radial-gradient(1px 1px at 72% 42%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 88% 78%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 18% 88%, rgba(125, 255, 159, 0.6), transparent),
    radial-gradient(1px 1px at 42% 38%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 94% 12%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 6% 52%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 63% 82%, rgba(125, 255, 159, 0.45), transparent);
  animation: stars-twinkle 8s ease-in-out infinite alternate;
}

.login-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.login-nebula-a {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  top: -8%;
  left: -10%;
  background: radial-gradient(circle, rgba(53, 230, 107, 0.22), transparent 68%);
  animation: nebula-drift-a 18s ease-in-out infinite alternate;
}

.login-nebula-b {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  bottom: -12%;
  right: -8%;
  background: radial-gradient(circle, rgba(53, 230, 107, 0.16), transparent 70%);
  animation: nebula-drift-b 22s ease-in-out infinite alternate;
}

.login-orbit-field {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 520px);
  height: min(92vw, 520px);
  transform: translate(-50%, -50%);
}

.login-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(53, 230, 107, 0.12);
}

.login-orbit-1 {
  inset: 6%;
  animation: orbit-spin 28s linear infinite;
}

.login-orbit-2 {
  inset: -2%;
  border-color: rgba(125, 255, 159, 0.1);
  animation: orbit-spin-rev 38s linear infinite;
}

.login-orbit-3 {
  inset: 14%;
  border-style: dashed;
  border-color: rgba(53, 230, 107, 0.08);
  animation: orbit-spin 52s linear infinite;
}

.login-orbit-4 {
  inset: -10%;
  border-color: rgba(53, 230, 107, 0.06);
  animation: orbit-spin-rev 64s linear infinite;
}

.login-comet {
  position: absolute;
  top: 18%;
  left: -12%;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(125, 255, 159, 0.9), transparent);
  filter: blur(0.5px);
  opacity: 0;
  animation: comet-fly 9s ease-in-out infinite;
  animation-delay: 2s;
}

.login-shell--online {
  border-color: rgba(53, 230, 107, 0.45);
  box-shadow:
    0 0 0 1px rgba(53, 230, 107, 0.1) inset,
    0 0 64px rgba(53, 230, 107, 0.28),
    0 0 120px rgba(53, 230, 107, 0.14),
    0 24px 80px rgba(0, 0, 0, 0.85);
}

.login-shell--online .login-eyebrow {
  animation: text-glow 3s ease-in-out infinite;
}

.login-satellite {
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow:
    0 0 8px rgba(53, 230, 107, 0.95),
    0 0 22px rgba(53, 230, 107, 0.55),
    0 0 40px rgba(53, 230, 107, 0.25);
}

.login-satellite-b {
  top: auto;
  bottom: 0;
  width: 5px;
  height: 5px;
  margin: 0 0 -2px -2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7), 0 0 18px rgba(53, 230, 107, 0.4);
}

.login-satellite-c {
  top: 50%;
  left: 0;
  margin: -2px 0 0 -2px;
  width: 4px;
  height: 4px;
  opacity: 0.85;
}

.login-satellite-d {
  top: 25%;
  left: 0;
  width: 5px;
  height: 5px;
  margin: -2px 0 0 -2px;
}

.login-satellite-e {
  top: auto;
  bottom: 30%;
  left: auto;
  right: 0;
  margin: 0 -2px -2px 0;
  width: 6px;
  height: 6px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.65), 0 0 20px rgba(53, 230, 107, 0.35);
}

.login-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(78vw, 400px);
  height: min(88vw, 460px);
  transform: translate(-50%, -50%);
  border-radius: 28px;
  background: transparent;
  box-shadow:
    0 0 40px rgba(53, 230, 107, 0.12),
    0 0 90px rgba(53, 230, 107, 0.08),
    0 0 140px rgba(53, 230, 107, 0.05);
}

.login-aura-pulse {
  animation: aura-breathe 4.5s ease-in-out infinite;
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(400px, 100%);
  padding: 28px 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: #000;
  border: 1px solid rgba(53, 230, 107, 0.28);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(53, 230, 107, 0.06) inset,
    0 0 48px rgba(53, 230, 107, 0.18),
    0 0 96px rgba(53, 230, 107, 0.1),
    0 24px 80px rgba(0, 0, 0, 0.85);
}

.login-logo-stage {
  width: calc(100% + 56px);
  margin: -28px -28px 20px;
  padding: 24px 20px 20px;
  background: #000;
  border-radius: 24px 24px 0 0;
  border-bottom: 1px solid rgba(53, 230, 107, 0.12);
}

.login-logo {
  display: block;
  width: min(300px, 78vw);
  height: auto;
  margin: 0 auto;
}

.login-eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-soft);
  text-shadow: 0 0 20px rgba(53, 230, 107, 0.35);
}

.login-title {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
}

.login-sub {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 34ch;
}

.btn-login-google {
  width: 100%;
  max-width: 320px;
  padding: 14px 24px;
  font-size: 0.92rem;
  box-shadow:
    0 0 24px rgba(53, 230, 107, 0.25),
    0 4px 20px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.btn-login-google:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 32px rgba(53, 230, 107, 0.4),
    0 6px 24px rgba(0, 0, 0, 0.45);
}

.login-foot {
  margin: 20px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-api-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(170, 180, 173, 0.5);
  box-shadow: 0 0 0 0 rgba(53, 230, 107, 0);
  flex-shrink: 0;
}

.login-api-dot.is-online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 230, 107, 0.85);
  animation: api-dot-pulse 2.4s ease-in-out infinite;
}

.login-api-dot.is-warn {
  background: var(--warn);
}

.login-api-dot.is-offline {
  background: var(--bad);
}

.login-version {
  margin: 8px 0 0;
  font-size: 0.68rem;
  color: rgba(170, 180, 173, 0.75);
  letter-spacing: 0.04em;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-rev {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes aura-breathe {
  0%, 100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes nebula-drift-a {
  from { transform: translate(0, 0); }
  to { transform: translate(6%, 4%); }
}

@keyframes nebula-drift-b {
  from { transform: translate(0, 0); }
  to { transform: translate(-5%, -3%); }
}

@keyframes comet-fly {
  0%, 78%, 100% { opacity: 0; transform: translate(0, 0) rotate(-12deg); }
  82% { opacity: 0.85; }
  95% { opacity: 0; transform: translate(115vw, 28vh) rotate(-12deg); }
}

@keyframes text-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(53, 230, 107, 0.35); }
  50% { text-shadow: 0 0 28px rgba(53, 230, 107, 0.65); }
}

@keyframes stars-twinkle {
  from { opacity: 0.42; }
  to { opacity: 0.68; }
}

@keyframes api-dot-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(53, 230, 107, 0.6); }
  50% { box-shadow: 0 0 16px rgba(53, 230, 107, 1); }
}

@media (prefers-reduced-motion: reduce) {
  .login-orbit-1,
  .login-orbit-2,
  .login-orbit-3,
  .login-orbit-4,
  .login-aura-pulse,
  .login-nebula-a,
  .login-nebula-b,
  .login-comet,
  .login-shell--online .login-eyebrow {
    animation: none;
  }
}

@media (max-width: 480px) {
  .login-shell {
    padding: 22px 20px 20px;
  }
  .login-logo-stage {
    width: calc(100% + 40px);
    margin: -22px -20px 16px;
    padding: 18px 14px 14px;
  }
  .login-orbit-field {
    width: 110vw;
    height: 110vw;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand img,
.brand-logo-img {
  height: 48px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(53, 230, 107, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.pill.is-bad::before { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.pill.is-warn::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

.hero {
  padding: 36px 0 28px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card .value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.card .hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.panel {
  margin: 24px 0 48px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-ok { color: var(--green-soft); }
.status-bad { color: var(--bad); }
.status-warn { color: var(--warn); }

.footer {
  padding: 6px 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.help {
  margin-top: 8px;
  padding: 0;
  border-left: none;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.88;
  font-weight: 400;
}

@media (max-width: 640px) {
  .site-header { /* chrome compacto: ver bloque header móvil arriba */ }
}

/* .main-nav estilos viven en el bloque header (arriba) */

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

.form-grid select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%2388aa94'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2388aa94' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-grid input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75);
  opacity: 0.7;
  cursor: pointer;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.link-btn, .link-back {
  color: var(--green-soft);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.84rem;
}

.detail-back-bar {
  flex-shrink: 0;
  padding: 4px 0 2px;
  margin: 0;
  background: transparent;
}

/* Shell: chrome fijo; scrollea solo .detail-scroll-body (no sticky/fixed) */
html.detail-shell-active,
html.detail-shell-active body {
  overflow: hidden !important;
}
.detail-shell.is-detail-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.detail-shell.is-detail-shell > .detail-back-bar,
.detail-shell.is-detail-shell > .ope-carousel-nav,
.detail-shell.is-detail-shell > #moto-detail-header,
.detail-shell.is-detail-shell > #fin-detail-header,
.detail-shell.is-detail-shell > #crm-detail-header {
  flex-shrink: 0;
}
.detail-shell .detail-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

#view-moto-detail #moto-detail-header,
#view-financiera-detail #fin-detail-header,
#view-crm-detail #crm-detail-header {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  padding: 2px 0 8px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-back-bar .link-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 4px;
}

.doc-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 6px;
}

.doc-adjunto {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.unidad-grid {
  margin-top: 8px;
}

.unidad-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  max-width: 520px;
}

.unidad-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.unidad-field .agora-input {
  width: 100%;
  min-height: 42px;
  font-size: 0.95rem;
}

/* —— Ficha OPE Motos: densidad (desktop + móvil; no “landing zoom”) —— */
#view-moto-detail .detail-back-bar {
  padding: 4px 0 2px;
  margin: 0 0 4px;
}

#view-moto-detail .detail-back-bar .link-back {
  min-height: 28px;
  padding: 4px 2px;
  font-size: 0.78rem;
}

#view-moto-detail .hero {
  padding: 6px 0 8px;
}

#view-moto-detail .hero h1 {
  margin: 0 0 2px;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

#view-moto-detail .hero p {
  font-size: 0.78rem;
  line-height: 1.3;
}

#view-moto-detail .panel {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Cuadrantes OPE: sin márgenes externos (rompen alturas iguales) */
#view-moto-detail .ope-layout .panel,
#view-moto-detail .ope-layout .ope-card,
#view-moto-detail .ope-layout #moto-obs-panel,
#view-moto-detail .ope-layout #moto-cobro-side {
  margin: 0;
}

#view-moto-detail .panel h2 {
  margin: 0 0 6px;
  font-size: 0.88rem;
}

#view-moto-detail .panel > p {
  margin: 0 0 6px;
  font-size: 0.82rem;
}

#view-moto-detail .unidad-stack {
  gap: 6px;
  margin-top: 6px;
  max-width: none;
}

#view-moto-detail .unidad-field {
  gap: 2px;
  font-size: 0.72rem;
}

#view-moto-detail .unidad-field .agora-input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

#view-moto-detail .doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#view-moto-detail .doc-row {
  padding: 8px;
  gap: 6px;
}

#view-moto-detail .recibo-cuad {
  padding: 8px;
}

#view-moto-detail .help {
  font-size: 0.72rem;
  margin: 0 0 4px;
}

#view-moto-detail .cotizacion-box {
  padding: 10px;
}

#view-moto-detail .cotizacion-row strong,
#view-moto-detail .plan-porcion-importe {
  font-size: 0.92rem;
}

#view-moto-detail .cobro-form {
  margin-top: 10px;
  gap: 8px;
}

#view-moto-detail .btn-primary,
#view-moto-detail .btn-ghost {
  min-height: 34px;
  font-size: 0.78rem;
  padding: 6px 12px;
}

@media (max-width: 720px) {
  #view-moto-detail .hero h1 {
    font-size: 0.95rem;
  }
  #view-moto-detail .panel {
    padding: 8px;
    margin-bottom: 8px;
  }
  #view-moto-detail .unidad-field .agora-input {
    font-size: 12px !important;
    min-height: 30px;
  }
}

.attach-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.attach-btn {
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.attach-block .field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.doc-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.doc-row.doc-done { border-color: rgba(53, 230, 107, 0.45); }

.doc-fase {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
}

.doc-row input[type="text"] {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
}

.chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.pill-inline {
  color: var(--green-soft);
  font-weight: 700;
}

.panel-notice {
  border-color: rgba(255, 179, 71, 0.35);
  background: rgba(255, 179, 71, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.panel-notice strong {
  color: var(--warn);
}

.catalogo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.search-field {
  flex: 1 1 220px;
}

.catalogo-meta {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.catalogo-cargando {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(61, 214, 140, 0.14);
  color: var(--text);
  font-weight: 600;
}
.catalogo-cargando-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 99px;
  background: rgba(53, 230, 107, 0.2);
  overflow: hidden;
}
.catalogo-cargando-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}
.catalogo-cargando-bar.is-ind > span {
  width: 35%;
  animation: agora-carga-ind 1.1s ease-in-out infinite;
}
.agora-carga-auto .catalogo-cargando-bar {
  max-width: 320px;
  height: 4px;
  margin-top: 4px;
}
#view-aloise-historico .oms-grilla tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 32px;
}
@keyframes agora-carga-ind {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

#view-aloise-catalogo.is-cargando > .panel:not([hidden]),
#view-catalogo.is-cargando > .panel:not([hidden]),
#view-catalogo.is-cargando > #catalogo-panel-lista:not([hidden]) {
  visibility: hidden;
  pointer-events: none;
}
#view-aloise-catalogo.is-cargando > .pantalla-velo,
#view-catalogo.is-cargando > .pantalla-velo {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 14px;
  right: 14px;
  margin: 0;
}
#view-catalogo .catalogo-toolbar {
  justify-content: flex-start;
}
#view-catalogo .search-field {
  flex: 0 0 220px;
  max-width: 220px;
}
#view-catalogo .catalogo-habilitados {
  align-self: flex-end;
  margin: 0;
  padding: 8px 12px;
  line-height: 1;
}
#view-catalogo .catalogo-habilitados input {
  margin: 0;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--green);
}

.form-grid .span-2 {
  grid-column: span 2;
  position: relative;
}

.producto-suggest {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1510;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
}

/* PPT: resultados en flujo (no overlay) para no tapar extras / porciones. */
.ppt-cq-moto .producto-suggest,
.ppt-cq-extras-wrap .producto-suggest {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  margin-top: 6px;
  max-height: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.ppt-cq-moto,
.ppt-cq-extras-wrap,
.ppt-alo-sku-wrap {
  position: relative;
  z-index: auto;
}

.ppt-alo-sku-wrap .producto-suggest {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  margin-top: 6px;
  max-height: min(420px, 52vh);
}

/* Popup Sumar garantía: lista en flujo normal (no absolute tipo typeahead). */
.alo-gar-list {
  position: relative;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
.alo-gar-list .producto-suggest-item {
  border-radius: 0;
  padding: 10px 12px;
  gap: 4px;
}
.alo-gar-list .producto-suggest-item strong {
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
}
.alo-gar-list .producto-suggest-item span {
  font-size: 0.75rem;
  line-height: 1.35;
  opacity: 0.88;
  white-space: normal;
}
.alo-gar-list .help {
  padding: 12px;
}

.ppt-cq-moto:focus-within,
.ppt-cq-extras-wrap:focus-within {
  z-index: 90;
}

.ppt-cuadrante {
  overflow: visible;
}

.producto-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #101910;
  color: var(--text);
  font-family: inherit;
  padding: 10px 12px;
  cursor: pointer;
}

.producto-suggest-item:hover {
  background: rgba(53, 230, 107, 0.08);
}

.producto-suggest-item span {
  font-size: 0.75rem;
  color: var(--muted);
}

.producto-suggest-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .form-grid .span-2 { grid-column: 1 / -1; }
}

.medio-picker .field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.medio-picker select {
  width: 100%;
  margin-bottom: 8px;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.cotizacion-box {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(53, 230, 107, 0.35);
  background: rgba(53, 230, 107, 0.06);
}

.cotizacion-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.88rem;
}

.cotizacion-row strong {
  font-size: 0.95rem;
  color: var(--green-soft);
  font-variant-numeric: tabular-nums;
}

.cotizacion-medio {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.plan-cobro-box {
  margin-top: 8px;
}

.plan-cobro-title {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.plan-porcion {
  padding: 6px 0;
  border-top: 1px solid rgba(53, 230, 107, 0.15);
}

.plan-porcion:first-of-type {
  border-top: none;
  padding-top: 2px;
}

.plan-porcion-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.plan-porcion-info {
  min-width: 0;
  flex: 1;
}

.plan-porcion-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.plan-porcion-importe {
  flex-shrink: 0;
  font-size: 0.88rem !important;
  color: var(--green-soft);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.plan-porcion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}
.ppt-es-sena {
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px;
}

.plan-porcion-detalle {
  margin: 4px 0 0;
  word-break: break-word;
}

.sena-hint-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.cobro-form {
  margin-top: 16px;
  grid-template-columns: 1fr 1fr !important;
  max-width: 720px;
}

.cobro-form .span-2 {
  grid-column: 1 / -1;
}

.cobro-form .form-actions {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .cobro-form {
    grid-template-columns: 1fr !important;
    max-width: none;
  }
}

#moto-recibos-historial,
#moto-recibos-list.recibos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.recibo-cuad {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recibo-cuad strong {
  font-size: 0.88rem;
}

.recibo-pasos {
  list-style: none;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
}

.recibo-pasos li.is-done {
  opacity: 0.7;
}

.recibo-cuad .pv-momento .recibo-paso-titulo,
.recibo-paso-titulo {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 8px 0 2px;
}

.recibo-falla {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.recibo-cuad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.papeles-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px !important;
}

/* Login: un poco más visible que el primary sutil del OMS */
.btn-login-google.btn-primary {
  background: rgba(53, 230, 107, 0.22);
  border-color: rgba(53, 230, 107, 0.55);
  color: #eafff0;
}

.hist-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  #moto-recibos-list.recibos-grid {
    grid-template-columns: 1fr;
  }
  .app-main .recibo-cuad strong {
    font-size: 11px;
  }
}

#moto-cobro-historial h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

#moto-cobro-historial .cobro-hist-scroll {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding-bottom: 0;
}

#moto-cobro-historial .cobro-hist-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.76rem;
}

#moto-cobro-historial .cobro-hist-table th,
#moto-cobro-historial .cobro-hist-table td {
  vertical-align: middle;
  padding: 5px 6px;
}

#moto-cobro-historial .cobro-hist-table th:nth-child(1),
#moto-cobro-historial .cobro-hist-table td:nth-child(1) {
  width: 22%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#moto-cobro-historial .cobro-hist-table th:nth-child(2),
#moto-cobro-historial .cobro-hist-table td:nth-child(2) {
  width: 11%;
}
#moto-cobro-historial .cobro-hist-table th:nth-child(3),
#moto-cobro-historial .cobro-hist-table td:nth-child(3) {
  width: 28%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#moto-cobro-historial .cobro-hist-table th:nth-child(4),
#moto-cobro-historial .cobro-hist-table td:nth-child(4) {
  width: 14%;
  white-space: nowrap;
}
#moto-cobro-historial .cobro-hist-table th:nth-child(5),
#moto-cobro-historial .cobro-hist-table td:nth-child(5) {
  width: 7%;
}
#moto-cobro-historial .cobro-hist-table th:nth-child(6),
#moto-cobro-historial .cobro-hist-table td:nth-child(6) {
  width: 18%;
}

#moto-cobro-historial .cobro-hist-code {
  font-size: 0.7rem;
}

#moto-cobro-historial .cobro-hist-actions {
  position: static;
  background: transparent;
  box-shadow: none;
  text-align: right;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
}
#moto-cobro-historial .cobro-hist-actions .btn-sm {
  min-height: 28px;
  padding: 2px 7px;
  font-size: 0.7rem;
}

#moto-cobro-historial .btn-cobro-revertir {
  min-height: 28px;
  padding: 2px 7px;
}

#moto-cobro-historial tr.is-retenido,
#moto-cobro-historial tr.is-revertido {
  opacity: 0.75;
}

.plan-porcion-title {
  font-size: 0.9rem;
}

.plan-porcion-detalle {
  font-size: 0.75rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(53, 230, 107, 0.12);
  border: 1px solid var(--line);
  color: var(--green-soft);
}

.crm-row {
  cursor: pointer;
}

.crm-row:hover td {
  background: rgba(53, 230, 107, 0.06);
}

.crm-nota-form {
  margin-bottom: 16px;
}

.precios-dirty {
  font-size: 0.85rem;
  color: var(--warn);
  min-width: 120px;
}

.table-wrap--excel {
  max-height: calc(100vh - 200px);
  overflow: auto;
}
.table-wrap--excel.is-h-user {
  max-height: none !important;
}
.agora-grid-h-handle {
  flex: 0 0 auto;
  height: 8px;
  margin: 3px 0 2px;
  border-radius: 4px;
  cursor: ns-resize;
  position: relative;
  z-index: 3;
  user-select: none;
  touch-action: none;
  background: rgba(255, 255, 255, 0.03);
}
.agora-grid-h-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 3px;
  margin: -1.5px 0 0 -21px;
  border-radius: 2px;
  background: rgba(53, 230, 107, 0.42);
}
.agora-grid-h-handle:hover,
.agora-grid-h-handle.is-drag {
  background: rgba(53, 230, 107, 0.1);
}
.agora-grid-h-handle:hover::after,
.agora-grid-h-handle.is-drag::after {
  background: rgba(53, 230, 107, 0.75);
}
@media (max-width: 899px) {
  .agora-grid-h-handle {
    display: none;
  }
}

/* CRM list: forzar viewport alto aunque no use oms-motos-panel */
#view-crm .table-wrap.table-wrap--excel {
  height: calc(100dvh - 240px);
  max-height: calc(100dvh - 240px);
  min-height: 28rem;
  overflow: auto;
}
@supports not (height: 100dvh) {
  #view-crm .table-wrap.table-wrap--excel {
    height: calc(100vh - 240px);
    max-height: calc(100vh - 200px);
  }
}

.grid-excel th,
.grid-excel td {
  white-space: nowrap;
  font-size: 0.82rem;
}

.grid-excel .sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(8, 12, 9, 0.98);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.35);
}

.grid-excel thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(10, 14, 11, 0.98);
}

.grid-excel thead th.sticky-col {
  z-index: 4;
}

.precio-cell {
  min-width: 110px;
  cursor: text;
  background: rgba(255, 255, 255, 0.02);
}

.precio-cell:focus {
  outline: 2px solid var(--green);
  background: rgba(53, 230, 107, 0.08);
}

.col-base-venta {
  background: rgba(53, 230, 107, 0.06);
}

.col-calculada,
.precio-cell.col-calculada {
  background: rgba(120, 140, 160, 0.08);
  color: var(--muted, #8a9a8e);
  cursor: default;
}

.precio-cell.col-calculada:focus {
  outline: none;
  background: rgba(120, 140, 160, 0.08);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.legacy-medio {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted, #8a9a8e);
}

.legacy-medio summary {
  cursor: pointer;
  user-select: none;
}

.medio-pct-input {
  width: 88px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  color-scheme: dark;
}

.medio-text-input,
.catalogo-precio-input {
  width: 100%;
  max-width: 220px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  color-scheme: dark;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-panel {
  width: min(640px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: rgba(12, 16, 13, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.modal-panel h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

@media (max-width: 720px) {
  .doc-row { grid-template-columns: 1fr; }
  .user-chip { max-width: 160px; }
}

.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.catalogo-tabs-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#view-aloise-catalogo > .hero,
#view-catalogo > .hero {
  flex-wrap: nowrap;
  align-items: center;
}
#view-aloise-catalogo > .hero > div:first-child,
#view-catalogo > .hero > div:first-child {
  flex: 0 0 auto;
}
#view-aloise-catalogo > .hero,
#view-catalogo > .hero {
  padding-left: 14px;
}
#view-aloise-catalogo > .hero > .catalogo-tabs-nav,
#view-catalogo > .hero > .catalogo-tabs-nav {
  flex: 0 1 auto;
  justify-content: flex-start;
  margin: 0;
  min-width: 0;
}
#view-catalogo .catalogo-toolbar,
#view-aloise-catalogo .catalogo-toolbar {
  align-items: center;
}
#view-catalogo .catalogo-toolbar label,
#view-aloise-catalogo .catalogo-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
#view-aloise-catalogo .catalogo-tabs-nav button {
  padding: 6px 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}
#view-aloise-catalogo .catalogo-toolbar {
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
#view-aloise-catalogo .search-field {
  flex: 0 1 320px;
}
#view-aloise-catalogo .search-field input {
  width: 100%;
  margin: 0;
}
@media (max-width: 1100px) {
  #view-aloise-catalogo > .hero,
  #view-catalogo > .hero {
    flex-wrap: wrap;
  }
  #view-aloise-catalogo > .hero > .catalogo-tabs-nav,
  #view-catalogo > .hero > .catalogo-tabs-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

.medios-tab,
.sub-nav button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.medios-tab.is-active,
.sub-nav button.is-active {
  border-color: rgba(120, 200, 140, 0.55);
  background: rgba(120, 200, 140, 0.12);
}

.medio-wizard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 12px;
  margin-top: 8px;
  width: 100%;
  align-items: end;
}

.medio-wizard .wizard-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.medio-wizard .wizard-step select {
  width: 100%;
  margin-top: 0;
}

.ppt-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: none;
  width: 100%;
}

#ppt-form-panel {
  width: 100%;
  max-width: none;
}

#ppt-form-panel.panel,
#alo-ppt-form-panel.panel {
  max-width: none;
  overflow: visible;
}

#view-motos .ppt-form,
#view-motos #ppt-form-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

#view-motos.is-ppt-ficha > .hero,
#view-motos.is-ppt-ficha > .oms-motos-panel {
  display: none;
}

.ppt-ficha-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}
.ppt-ficha-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
.ppt-ficha-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
@keyframes ppt-btn-titila {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 136, 0.12); }
  50% { box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.55); }
}
.ppt-ficha-actions button.ppt-btn-titila:not(:disabled) {
  animation: ppt-btn-titila 1.15s ease-in-out infinite;
}
@keyframes recibo-sena-titila {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 136, 0.12); }
  50% { box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.7); }
}
.btn-recibo-sena-titila:not(:disabled),
.ope-type-btn.btn-recibo-sena-titila {
  animation: recibo-sena-titila 1.15s ease-in-out infinite;
  border-color: #3ddc84;
  color: #b6f5c9;
}
#ppt-convenio-hint,
#alo-ppt-convenio-hint {
  flex: 1 0 100%;
  margin: 2px 0 0;
  order: 99;
}
.ppt-ficha-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  align-items: stretch;
}
.ppt-ficha-body-grid .ppt-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
/* Aloise: el form es la columna izquierda entera (cliente+renglones+medios);
   obs a la derecha, misma altura, scroll interno. */
#alo-ppt-form-panel .ppt-ficha-body-grid,
#ppt-form-panel .ppt-ficha-body-grid {
  grid-template-rows: minmax(0, auto);
  align-items: stretch;
}
#alo-ppt-form-panel .ppt-form,
#ppt-form-panel .ppt-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
}
#alo-ppt-form-panel .ppt-obs-block,
#ppt-form-panel .ppt-obs-block {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 12px;
  z-index: 3;
  /* ~doble del tope anterior: recuadro fijo + scroll interno del hilo */
  min-height: 480px;
  max-height: min(840px, 78vh);
  height: min(840px, 78vh);
}
.ppt-ficha-luces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 6px 0 4px;
}
.ppt-cuadrantes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ppt-cuadrantes-list .ppt-cuadrante {
  margin: 0;
}
.ppt-cq-child {
  margin: 4px 0 0 28px;
  padding: 6px 10px;
  border-left: 2px solid rgba(120, 200, 140, 0.45);
  font-size: 0.92em;
  color: var(--muted, #bbb);
}
/* Renglón PPT Motos+Aloise (1A): main izq + columna $ derecha; svc alineado. */
.ppt-linea {
  display: grid;
  grid-template-columns: 1fr minmax(9.5ch, 12ch);
  gap: 8px 14px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.ppt-linea.ppt-cuadrante,
.ppt-cuadrante.ppt-linea {
  border: 1px solid var(--line);
  box-shadow: none;
}
.ppt-cuadrante.ppt-linea.is-selected {
  border-color: var(--line);
  box-shadow: none;
}
.ppt-linea-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  grid-column: 1;
}
.ppt-linea-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.ppt-linea-id {
  flex: 1 1 auto;
  min-width: 0;
}
.ppt-linea-tipo {
  font-size: 0.78rem;
  color: var(--muted, #bbb);
  margin: 0 0 2px;
}
.ppt-linea-id strong {
  display: block;
  line-height: 1.25;
}
.ppt-linea-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 8px;
}
.ppt-linea-tools .help,
.ppt-linea-cant-lab,
.ppt-svc-line .ppt-ajuste-lab,
.ope-ajuste-row .ppt-ajuste-lab {
  margin: 0;
}
.ppt-linea-tools .agora-input.ppt-linea-cant,
.ppt-linea-tools .ppt-ajuste,
.ppt-svc-line .ppt-ajuste,
.ope-ajuste-row .ppt-ajuste {
  width: 4.8rem;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 0 8px;
  line-height: 38px;
}
.ppt-linea-tools .agora-input.ppt-linea-cant {
  width: 52px;
  max-width: 52px;
}
.ppt-linea-nums {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.ppt-ajuste-lab {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  height: 40px;
  font-size: 0.68rem;
  line-height: 1;
  color: var(--muted, #aab4ad);
}
.ppt-ajuste-name {
  position: absolute;
  left: 8px;
  top: 0;
  transform: translateY(-50%);
  padding: 0 4px;
  background: #0e1310;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
.ppt-ajuste {
  width: 4.8rem;
}
.ppt-linea-precio-big {
  display: block;
}
.ppt-linea-lista-gris {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #9aa);
}
.ope-unidad-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ppt-linea-foto.ope-foto-96,
.ppt-linea-foto--empty.ope-foto-96 {
  width: 144px;
  height: 144px;
  flex: 0 0 144px;
}
#alo-ope-lineas .ppt-linea-foto-wrap,
#alo-ope-lineas .ppt-linea-foto {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
}
#alo-ope-lineas .ppt-linea,
#alo-ope-lineas .ppt-svc-line {
  grid-template-columns: minmax(0, 1fr) auto;
}
#alo-ope-lineas .ppt-linea-precio-col.alo-precio-par {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 16px;
  min-width: 11.5rem;
  padding-top: 0;
  white-space: nowrap;
}
#alo-ope-lineas .alo-precio-lista,
#alo-ope-lineas .alo-precio-ahora {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.15;
}
#alo-ope-lineas .alo-precio-k {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #9aa);
}
#alo-ope-lineas .alo-precio-lista > span:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #c5cec8;
}
#alo-ope-lineas .alo-precio-ahora .ppt-linea-precio-big {
  font-size: 1.05rem;
}
#alo-ope-lineas .alo-ope-pacto {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#alo-ope-lineas .alo-ope-pacto-lab {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 34px;
  font-size: 0.875rem;
  color: var(--muted, #c5cec8);
}
#alo-ope-lineas .ppt-linea-tools .ppt-ajuste {
  width: 4.6rem;
  min-width: 4.6rem;
  max-width: 4.6rem;
  flex: 0 0 4.6rem;
}
#alo-ope-lineas .alo-pacto-row {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
#alo-ope-lineas .alo-pacto-row select.agora-input,
#alo-ope-lineas .alo-pacto-row input[type="date"],
#alo-ope-lineas .alo-pacto-row .agora-date-wrap {
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  height: 34px;
  padding: 4px 28px 4px 10px;
  font-size: 0.875rem;
  line-height: 1.2;
}
#alo-ope-lineas .alo-pacto-row .agora-date-wrap {
  display: inline-block;
  padding: 0;
  flex: 0 0 148px;
}
#alo-ope-lineas .alo-pacto-row .agora-date-wrap > input.agora-input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 34px;
  padding: 4px 28px 4px 10px;
  font-size: 0.875rem;
  line-height: 1.2;
}
#alo-ope-lineas .alo-ope-sol {
  flex: 1 0 100%;
  min-width: 0;
  margin-left: 0;
  overflow: visible;
  white-space: normal;
  font-size: 0.875rem;
}
#alo-ope-lineas .alo-ope-video {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
#alo-ope-lineas {
  container-type: inline-size;
}
#alo-ope-lineas .alo-pacto-row .help {
  margin: 0;
  white-space: nowrap;
  font-size: 0.85rem;
}
@container (max-width: 640px) {
  #alo-ope-lineas .ppt-linea,
  #alo-ope-lineas .ppt-svc-line {
    grid-template-columns: minmax(0, 1fr);
  }
  #alo-ope-lineas .ppt-linea-precio-col.alo-precio-par {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-end;
    gap: 14px;
    padding-top: 2px;
  }
  #alo-ope-lineas .alo-ope-pacto {
    flex-wrap: wrap;
  }
  #alo-ope-lineas .alo-ope-sol {
    flex: 1 0 100%;
  }
  #alo-ope-lineas .alo-pacto-row select.agora-input,
  #alo-ope-lineas .alo-pacto-row input[type="date"],
  #alo-ope-lineas .alo-pacto-row .agora-date-wrap {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
    flex-basis: 118px;
  }
}
.ope-ajuste-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 16px;
  width: 100%;
  margin: 10px 0 6px;
  padding-top: 6px;
}
.ope-ajuste-row .ppt-linea-nums {
  flex: 0 0 auto;
}
.ope-ajuste-row .ppt-linea-precio-col {
  position: static;
  grid-column: auto;
  min-width: 0;
  margin-left: auto;
  text-align: right;
}
#view-moto-detail .ope-asociados {
  padding-right: 0;
}
#view-moto-detail .ope-asociados li {
  width: 100%;
}
#view-moto-detail .mot-pacto-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
#view-moto-detail .mot-pacto-row select.agora-input {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 168px;
}
#view-moto-detail .mot-pacto-fecha-lab[hidden] {
  display: none;
}
#view-moto-detail .mot-pacto-fecha-lab {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  height: 34px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #c5cec8);
  white-space: nowrap;
}
#view-moto-detail .mot-pacto-fecha-lab .agora-date-wrap {
  display: inline-block;
  width: 148px;
  flex: 0 0 148px;
  height: 34px;
}
#view-moto-detail .mot-pacto-fecha-lab .agora-date-wrap > input.agora-input {
  width: 100%;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
}
#view-moto-detail .form-actions .btn-ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.ppt-linea-cant-lab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ppt-linea-precio-col {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  text-align: right;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #fff);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  padding-top: 2px;
  min-width: 9.5ch;
}
/* Patentamiento / flete / garantía: frase fina + $ misma columna. */
.ppt-svc-line {
  display: grid;
  grid-template-columns: 1fr minmax(9.5ch, 12ch);
  gap: 8px 14px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 10px 12px 4px 14px;
  border-left: 2px solid rgba(120, 200, 140, 0.45);
  box-sizing: border-box;
  font-size: 0.9rem;
  color: var(--muted, #bbb);
  grid-column: 1 / -1;
}
.ppt-linea > .ppt-svc-line,
.ppt-linea-main > .ppt-svc-line {
  margin-top: 0;
}
.ppt-svc-line.ppt-svc-child {
  margin-left: 0;
  width: 100%;
  padding-left: 10px;
}
/* Flete / servicio independiente (no foto, no SOL). */
.ppt-svc-line.ppt-svc-standalone {
  margin: 0 0 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 2px solid rgba(120, 200, 140, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  align-items: center;
}
.ppt-svc-line.ppt-svc-standalone .alo-ope-ln-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.ppt-svc-line-txt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.35;
  white-space: normal;
}
.ppt-svc-line-precio {
  justify-self: end;
  text-align: right;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #fff);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  min-width: 9.5ch;
}
.ppt-linea-actions {
  display: none;
}
.ppt-cq-foto-sm {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #111;
  border-radius: 6px;
  flex: 0 0 48px;
}
.ppt-cq-moto-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ppt-cq-child.ppt-linea {
  margin-bottom: 0;
}
.ppt-cliente-estado {
  margin: 0 0 8px;
  font-weight: 650;
}
.ppt-cliente-estado.is-ok { color: #1f8a4c; }
.ppt-cliente-estado.is-on { color: #a16207; }
.ppt-luz-txt { font-weight: 500; }
.ppt-linea-foto,
.ppt-linea-foto--empty {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 6px;
  object-fit: contain;
  background: #111;
  box-sizing: border-box;
}
.ppt-linea-foto--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 210, 74, 0.95);
  border: 1px solid rgba(255, 210, 74, 0.35);
  background: rgba(255, 210, 74, 0.08);
}
.ppt-linea-foto--empty svg {
  width: 22px;
  height: 22px;
}
a.ppt-linea-web.btn-ghost[aria-disabled="true"],
button.ppt-linea-web:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Medios done: un renglón — ocupa todo el ancho del host de la opción. */
.ppt-ms-done {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(57, 255, 136, 0.08);
  border: 1px solid rgba(57, 255, 136, 0.22);
  min-height: 40px;
  box-sizing: border-box;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}
.ppt-ms-done > .ppt-ms-back {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.ppt-ms-done-body {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}
.ppt-ms-done .ppt-ms-sum {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  line-height: 1.2;
  font-size: 0.82rem;
  white-space: normal;
}
.ppt-ms-sum-t,
.ppt-ms-sum-d {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.ppt-ms-sum-t {
  font-weight: 700;
}
.ppt-ms-sum-d {
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.92;
}
.ppt-ms-done .ppt-ms-frase {
  flex: 1 1 140px;
  margin: 0;
  min-width: 120px;
  max-width: none;
  font-size: 0.78rem;
  color: var(--muted, #bbb);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ppt-ms-frase input.agora-input,
.ppt-ms-frase textarea.agora-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 32px;
  max-height: 32px;
  resize: none;
  line-height: 1.3;
  padding-top: 4px;
  padding-bottom: 4px;
  width: auto;
  box-sizing: border-box;
  margin-top: 0;
}
.ppt-opcion {
  padding: 8px 10px !important;
}
.ppt-opcion-head {
  margin-bottom: 4px !important;
}
#ppt-cuadrantes.ppt-cuadrantes-grid,
#ppt-cuadrantes.ppt-cuadrantes-list,
#alo-ppt-lineas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
#ppt-form-panel .ppt-cuadrantes-block,
#alo-ppt-form-panel .ppt-cuadrantes-block,
#ppt-form-panel .ppt-mix-block,
#alo-ppt-form-panel .ppt-mix-block,
#ppt-mix,
#alo-ppt-medio,
.ppt-cq-porciones,
.ppt-porcion {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#ppt-form-panel .ppt-cuadrantes-block {
  grid-column: auto;
  grid-row: auto;
}
.oms-prod-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  line-height: 1.25;
  cursor: pointer;
  color: var(--accent, #39ff88);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.oms-cel-cell {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.alo-pacto-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  vertical-align: middle;
}
.alo-pacto-row select,
.alo-pacto-row input[type="date"],
.alo-pacto-row .agora-date-wrap {
  width: auto;
  min-width: 9.5rem;
}
.alo-pacto-row .agora-date-wrap {
  display: inline-block;
}
.oms-envio-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.oms-envio {
  display: inline-block;
  flex: 0 0 auto;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.35;
  white-space: nowrap;
}
.oms-envio--hoy { background: #ffff00; color: #1a1a1a; }
.oms-envio--manana { background: #00ffff; color: #1a1a1a; }
.oms-envio--pasado { background: #ff6d01; color: #1a1a1a; }
.oms-envio--vencido { background: #ea9999; color: #1a1a1a; }
.oms-envio--retiro { background: #ff00ff; color: #fff; }
.oms-envio--listo { background: #00ff00; color: #1a1a1a; }
.oms-envio--falta_remito { background: #34a853; color: #1a1a1a; }
.oms-envio--anulado { background: #ff0000; color: #fff; }
.oms-envio--sin_fecha,
.oms-envio--luego,
.oms-envio--confirmar {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text, #fff);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.22));
}
.oms-prod-cell:hover {
  color: var(--text, #fff);
}
/* OPE Aloise — obs llena el cuadrante derecho y scrollea adentro (como Motos). */
#alo-ope-q-obs > .ope-obs-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto !important;
  max-height: none;
  width: auto;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
#alo-ope-q-obs > .ope-obs-inner > .ope-obs-card-title,
#alo-ope-q-obs > .ope-obs-inner > .ope-stream-filters,
#alo-ope-q-obs > .ope-obs-inner > .ope-stream-compose {
  flex-shrink: 0;
}
#alo-ope-q-obs > .ope-obs-inner > .ope-stream-list,
#alo-ope-q-obs .alo-ope-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  margin-top: 6px;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}
#alo-ope-hero-cliente-slot .ope-hero-cliente,
#alo-ope-hero-cliente-slot .ope-cli-card {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.alo-ope-ln-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.alo-ope-ln-row .ppt-linea-foto-wrap {
  flex: 0 0 48px;
}
.alo-ope-ln-body {
  flex: 1 1 180px;
  min-width: 0;
}
.alo-ope-ln-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
/* Sale de y Pegar SOL con estado (27/11/2026): ámbar titila si falta, verde si está completo o no corresponde. */
.btn-ghost.alo-btn-pend:not(:disabled) {
  border-color: rgba(255, 210, 74, 0.85);
  color: #ffd24a;
  animation: alo-btn-pend-titila 1s ease-in-out infinite;
}
.btn-ghost.alo-btn-ok {
  border-color: rgba(61, 214, 140, 0.65);
  color: #8ff0bd;
}
@keyframes alo-btn-pend-titila {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 74, 0); }
  50% { box-shadow: 0 0 0 2px rgba(255, 210, 74, 0.45), 0 0 10px rgba(255, 210, 74, 0.55); }
}
/* Etiquetas: estado de cada unidad. */
.eti-estado { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.eti-estado--amb { background: rgba(255, 210, 74, 0.16); color: #ffd24a; border: 1px solid rgba(255, 210, 74, 0.55); }
.eti-estado--ok { color: #8ff0bd; }
.eti-estado--gris { color: #9aa3ad; }
#eti-body tr.eti-bloqueada td { color: #c9b98a; }
#eti-body tr.eti-bloqueada input[type="checkbox"] { opacity: 0.35; cursor: not-allowed; }
.eti-abrir { margin-left: 6px; font-size: 12px; }
.alo-ope-ln-actions .alo-unidades {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.ppt-ficha-cliente {
  grid-column: 1;
  grid-row: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  min-height: 0;
}
.ppt-obs-block {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0;
}
#alo-ppt-form-panel .ppt-obs-block,
#ppt-form-panel .ppt-obs-block {
  position: sticky;
  top: 12px;
  z-index: 3;
  align-self: start;
  overflow: hidden;
}
.ppt-obs-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px;
  box-sizing: border-box;
}
.ppt-obs-inner > .ope-obs-card-title,
.ppt-obs-inner > .ope-stream-filters,
.ppt-obs-inner > .ope-stream-compose {
  flex: 0 0 auto;
}
.ppt-obs-block .ppt-obs-list,
.ppt-obs-inner .ope-stream-list,
#ppt-obs-list,
#alo-ppt-obs-list {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 80px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  padding: 10px 10px 12px;
  margin-top: 10px;
}
.ppt-cuadrantes-block {
  width: 100%;
}
.ppt-ficha-body-grid.is-sin-obs .ppt-ficha-cliente {
  grid-column: 1 / -1;
}
.ppt-carousel-nav {
  display: none;
}
.ope-convenio-docs {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
.convenio-html-editor {
  min-height: 140px;
}
@media (max-width: 899px) {
  .ppt-carousel-nav {
    display: flex;
  }
  .ppt-ficha-body-grid {
    grid-template-columns: 1fr;
    display: block;
  }
  .ppt-ficha-cliente,
  .ppt-obs-block,
  .ppt-cuadrantes-block,
  .ppt-ficha-body-grid.is-sin-obs .ppt-ficha-cliente {
    grid-column: 1;
    grid-row: auto;
  }
  .ppt-obs-block {
    overflow: visible;
    min-height: 280px;
  }
  .ppt-obs-inner {
    position: static;
    overflow: visible;
  }
  .ppt-obs-block .ppt-obs-list,
  #alo-ppt-obs-list {
    max-height: min(60vh, 520px);
  }
  #alo-ppt-form-panel .ppt-ficha-body-grid,
  #ppt-form-panel .ppt-ficha-body-grid {
    display: flex;
    flex-direction: column;
  }
  #alo-ppt-form-panel .ppt-form,
  #alo-ppt-form-panel .ppt-obs-block,
  #ppt-form-panel .ppt-form,
  #ppt-form-panel .ppt-obs-block {
    grid-column: auto;
    grid-row: auto;
    height: auto;
    max-height: none;
    position: relative;
    top: auto;
  }
  #alo-ppt-form-panel .ppt-obs-block,
  #ppt-form-panel .ppt-obs-block {
    min-height: 360px;
    max-height: min(70vh, 640px);
    height: min(70vh, 640px);
  }
  #ppt-form-panel .ppt-slide:not(.is-active),
  #alo-ppt-form-panel .ppt-slide:not(.is-active) {
    display: none !important;
  }
}

.ppt-form .ppt-block {
  margin: 0;
  padding: 10px 12px;
}
.ppt-cliente-actions {
  margin-top: 4px !important;
  gap: 6px;
}
.ppt-form .field-hint {
  font-size: 0.68rem;
  margin-top: 2px;
}
.ppt-motos-head {
  margin-bottom: 4px;
}
.ppt-motos-head h3 {
  margin: 0;
}
.ppt-cq-help-desk {
  font-size: 0.7rem;
}

.ppt-form .ppt-block h3 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.ppt-persona-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

@media (min-width: 720px) {
  .ppt-persona-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ppt-persona-fields .medios-field-full {
    grid-column: 1 / -1;
  }
}

.ppt-form .medios-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  min-width: 0;
}

.ppt-form .field-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

.ppt-motos-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
}

.ppt-motos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ppt-motos-head h3 {
  margin: 0;
}

.ppt-add-moto {
  position: relative;
  margin-bottom: 10px;
}

.ppt-motos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ppt-moto-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.ppt-moto-row .ppt-moto-main strong {
  display: block;
}

.ppt-moto-row .ppt-moto-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.ppt-moto-pat {
  font-size: 0.8rem;
  text-align: right;
  color: var(--muted);
}

.ppt-moto-pat strong {
  color: var(--text);
  display: block;
}

.ppt-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.ppt-form-actions .btn-primary,
.ppt-form-actions .btn-ghost {
  align-self: center;
  width: auto;
  min-height: 42px;
  height: auto;
  padding: 10px 22px;
  flex: 0 0 auto;
}

.ppt-selected-moto {
  display: flex;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.ppt-moto-foto {
  width: 160px;
  max-width: 40%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: #111;
}

.ppt-moto-foto-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.ppt-moto-foto-meta strong {
  font-size: 1rem;
}

/* Fotito del buscador: 20 % más grande que la de 72×54 (Jorge, 2/12/2026). Motos y Aloise. */
.ppt-suggest-thumb {
  width: 86px;
  height: 65px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Popup de Cuotas (Aloise y Motos, 27/11/2026): filtro, Contado, Tarjeta en cuotas, Convenios. */
.ppt-cuotas-box {
  display: block;
  user-select: text;
  -webkit-user-select: text;
}

.agora-modal-dialog.is-wide .agora-modal-body:has(.ppt-cuotas-box) {
  overflow-y: auto;
  flex: 0 1 auto;
  user-select: text;
  -webkit-user-select: text;
}

.cuotas-filtro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin: 0 0 18px;
}

.cuotas-filtro-campo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  flex: 0 1 200px;
}

.cuotas-filtro .field-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.cuotas-filtro-banco {
  flex: 1 1 260px;
  max-width: 340px;
}

.cuotas-pop.is-cargando .cuotas-vista {
  opacity: 0.55;
  transition: opacity 0.15s;
}

.cuotas-vista {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.cuotas-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: baseline;
  font-size: 1.08rem;
  color: var(--muted);
}

.cuotas-head strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cuotas-head-efe strong {
  color: var(--green-soft);
  font-size: 1.15em;
}

.cuotas-bloque-t {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cuotas-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cuotas-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(53, 230, 107, 0.04);
}

.cuotas-card-n {
  font-size: 0.86rem;
  color: var(--muted);
}

.cuotas-card-m {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.cuotas-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green-soft);
  background: rgba(53, 230, 107, 0.12);
  white-space: nowrap;
  align-self: flex-start;
}

/* Contado en un renglón; tarjeta y convenios lado a lado (27/11/2026): menos scroll. */
.cuotas-cards--linea {
  gap: 8px;
}
.cuotas-cards--linea .cuotas-card {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 6px 12px;
}
.cuotas-cards--linea .cuotas-card-m {
  font-size: 1.05rem;
}
.cuotas-dos {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .cuotas-dos {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cuotas-vista {
  gap: 16px;
}
.cuotas-dos .cuotas-tabla th,
.cuotas-dos .cuotas-tabla td {
  padding: 5px 10px;
}
.cuotas-tabla-wrap {
  max-height: 55vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cuotas-tabla {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}

.cuotas-tabla th,
.cuotas-tabla td {
  padding: 7px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cuotas-tabla thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0d1510;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}

.cuotas-tabla .cuotas-n {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #0d1510;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  width: 4.5em;
}

.cuotas-tabla thead .cuotas-n {
  z-index: 3;
}

.cuotas-tabla td.is-nada {
  color: rgba(170, 180, 173, 0.45);
}

.cuotas-tabla td.is-mejor {
  color: var(--green-soft);
  font-weight: 700;
}

.cuotas-star {
  color: var(--warn);
}

.cuotas-vacio {
  margin: 0;
  color: var(--muted);
}

.ppt-cuotas-g h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 700;
}

.ppt-cuotas-g ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ppt-cuotas-g li {
  font-size: 1.12rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.ppt-alo-sku-wrap .ppt-moto-suggest {
  max-height: min(420px, 55vh);
}

.ppt-moto-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ppt-moto-row .ppt-moto-pick {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: none;
}

.ppt-moto-row-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ppt-moto-precios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  /* 20 % más grande que 0.75rem y en la misma línea (Jorge, 2/12/2026). */
  font-size: 0.9rem;
  color: var(--muted);
}

.ppt-moto-precio {
  white-space: nowrap;
}

.ppt-moto-precio.ppt-moto-efectivo {
  color: var(--green-soft, #2ecc71);
  font-weight: 700;
}

/* La ruedita dentro de la lista baja la lista, no la página. */
.ppt-moto-suggest,
#alo-ppt-sku-suggest {
  overscroll-behavior: contain;
}

/* Moto recién sumada: la lista queda abierta y el renglón se ilumina un momento. */
.ppt-moto-row.is-sumado {
  animation: alo-ppt-sumado 1.6s ease-out;
}

.ppt-moto-oferta {
  color: #f6a4c8;
  font-weight: 700;
}

.ppt-moto-cuotas {
  flex: 0 0 auto;
  align-self: center;
  margin-right: 8px;
}

.ppt-cuotas-pop {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d1510;
  padding: 12px;
  max-height: min(420px, 50vh);
  overflow: auto;
}

.ppt-cuotas-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.ppt-cuotas-g {
  margin: 0;
}

.ppt-cuotas-g ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ppt-cuotas-g li {
  line-height: 1.4;
  font-size: 1.12rem;
}

.ppt-cuotas-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.producto-suggest-item {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}

.ppt-cq-moto .producto-suggest-item,
.ppt-cq-extras-wrap .producto-suggest-item {
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 720px) {
  .ppt-moto-row {
    grid-template-columns: 1fr;
  }
  .ppt-moto-pat { text-align: left; }
  .ppt-form-actions .btn-primary,
  .ppt-form-actions .btn-ghost {
    flex: 1 1 auto;
    min-width: 140px;
  }
  .ppt-selected-moto {
    flex-direction: column;
  }
  .ppt-moto-foto {
    width: 100%;
    max-width: none;
    height: 160px;
  }
}

.crm-edit-panel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.crm-edit-panel summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.crm-edit-form textarea {
  min-height: 64px;
  resize: vertical;
}

.chk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.camino-pop {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 12px;
}
.camino-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.camino-kicker {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.camino-prod {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.camino-prod.is-off {
  opacity: 0.62;
  cursor: default;
}
.camino-prod-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.camino-prod input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.camino-origen-frase {
  margin: 0;
  line-height: 1.45;
}
.camino-origen-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.camino-origen-list .chk-chip {
  width: 100%;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 12px 14px;
}
.camino-origen-list .chk-chip .help {
  flex-basis: 100%;
  margin: 0 0 0 26px;
}
.camino-dir {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  line-height: 1.4;
}
.camino-dias {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.camino-dias .btn-ghost {
  min-width: 124px;
  min-height: 40px;
}
.camino-dias [data-cam-dia].btn-primary {
  background: #35e66b;
  color: #06210f;
  border-color: #35e66b;
}
/* Día marcado «no sale» (Jorge 2.b, 2/12/2026): se elige igual, con borde ámbar. */
.camino-dias [data-cam-dia].camino-dia-no-sale {
  border-color: var(--warn);
  color: var(--warn);
}
.camino-dias [data-cam-dia].camino-dia-no-sale.btn-primary {
  background: var(--warn);
  color: #2a1a00;
}
#cam-avisos .status-warn {
  margin: 8px 0 0;
}
.camino-exc {
  margin-top: 6px;
}

.form-inline-top {
  align-items: end;
}

.catalogo-universal-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.catalogo-tipo-box {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 200px;
  max-height: 420px;
}

.catalogo-tipo-box.is-dirty {
  border-color: rgba(120, 200, 140, 0.45);
}

.catalogo-tipo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.catalogo-tipo-head h3 {
  margin: 0;
  font-size: 1rem;
  flex: 1;
}

.catalogo-tipo-scroll {
  overflow-y: auto;
  padding: 10px 16px 14px;
  flex: 1;
}

.catalogo-tipo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalogo-tipo-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.catalogo-tipo-list li:last-child {
  border-bottom: none;
}

.cat-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cat-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-field-label {
  font-size: 0.72rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-item-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: flex-end;
}

.cat-item-main .medio-text-input {
  max-width: none;
  width: 100%;
}

@media (max-width: 640px) {
  .catalogo-tipo-list li {
    grid-template-columns: 1fr;
  }
  .cat-item-flags {
    justify-content: flex-start;
  }
}

.cat-slug {
  font-size: 0.75rem;
  opacity: 0.7;
}

.promo-dynamic-fields {
  display: grid;
  gap: 14px;
}

.multi-picker {
  position: relative;
}

.multi-picker-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a0f0c !important;
  color: var(--text) !important;
  cursor: pointer;
  font: inherit;
  min-height: 42px;
}

.multi-picker-panel {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 16, 13, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.multi-picker-option {
  display: block;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 0.92rem;
}

.multi-picker-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Admin 0.8.6 — acordeones, combos, grillas de checkboxes */
.field-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.5) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-select:focus {
  outline: none;
  border-color: rgba(120, 200, 140, 0.55);
  box-shadow: 0 0 0 2px rgba(120, 200, 140, 0.15);
}

.admin-accordion {
  padding: 0;
  overflow: hidden;
}

.admin-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.admin-accordion-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-accordion-chevron {
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.admin-accordion:not(.is-open) .admin-accordion-body {
  display: none;
}

.admin-accordion:not(.is-open) .admin-accordion-chevron {
  transform: rotate(-90deg);
}

.admin-accordion-body {
  padding: 0 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.parametros-nested-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-accordion-nested {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}

.admin-accordion-nested .admin-accordion-head {
  padding: 12px 14px;
}

.admin-accordion-nested .admin-accordion-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.medios-titulo-cta {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.medios-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  margin-right: 8px;
  vertical-align: middle;
}

.medios-dot.is-on {
  background: #3dcc7a;
  box-shadow: 0 0 6px rgba(61, 204, 122, 0.65);
}

.convenio-vars-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.convenio-vars-picker .btn-ghost {
  font-size: 0.78rem;
  padding: 4px 8px;
}

.medios-historial-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
}

.medios-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}

.medios-hist-acciones {
  list-style: none;
  margin: 0;
  padding: 0;
}

.medios-hist-acciones > li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: rgba(0, 0, 0, 0.28);
}

.medios-hist-meta {
  font-size: 0.9rem;
}

.medios-hist-accion {
  color: #8ee0a8;
  margin: 4px 0 6px;
  font-weight: 600;
}

.medios-hist-acciones ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.admin-accordion-nested .admin-accordion-body {
  padding: 0 12px 12px;
  border-top: none;
}

.medios-subnav.sub-nav {
  gap: 6px;
  margin-bottom: 12px;
}

.medios-subnav .promos-tab {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
}

.medios-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.medios-row.admin-accordion-nested {
  background: rgba(255, 255, 255, 0.02);
}

.medios-alta-wrap {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.medios-editor-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 4px;
  color-scheme: dark;
}

.medios-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.medios-block:last-of-type {
  border-bottom: 0;
}

.medios-block-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-soft);
  text-transform: uppercase;
}

.medios-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.medios-field,
.medios-editor-form label.medios-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}

.medios-field .field-label,
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.medios-field-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lc-firma-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}

.lc-firma-preview-box {
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
}

.lc-firma-preview-box[hidden] {
  display: none;
}

.lc-firma-preview-box img {
  display: block;
  width: auto;
  height: auto;
  max-width: 280px;
  max-height: 140px;
  object-fit: contain;
}

.medios-field-full.chk-row,
.medios-field.chk-row,
.chk-row-sociedades {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.chk-row-sociedades .chk-chip,
.medios-field-full.chk-row .chk-chip {
  width: auto;
  flex: 0 0 auto;
  max-width: 100%;
}

.medios-field-check {
  align-self: end;
  margin-bottom: 4px;
}

.medios-fin-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.medios-field-muted .help {
  margin-top: 2px;
}

.medios-block .help {
  margin: 0;
  line-height: 1.35;
}

#promo-catalogo-block[hidden],
[data-promo-catalogo][hidden] {
  display: none !important;
}

.medios-fin-stack > .medios-fin-hab {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 4px 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.medios-fin-promos-head {
  padding-top: 4px;
}

.medios-fin-promo {
  margin: 0;
}

.admin-accordion-body {
  padding: 8px 12px 14px;
}

.medios-editor-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chk-row,
.chk-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 720px) {
  .medios-fields {
    grid-template-columns: 1fr;
  }
  .medios-field-check {
    align-self: stretch;
  }
  .medios-alta-wrap {
    padding: 12px;
  }
  .medios-editor-form .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .medios-editor-form .form-actions .btn-primary,
  .medios-editor-form .form-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

.medios-editor-form .agora-input,
.medios-editor-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.medios-editor-form select,
.medios-editor-form textarea,
.medios-alta-wrap .agora-input,
.medios-alta-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.medios-alta-wrap select,
.tramos-table .agora-input,
.tramos-table input:not([type="checkbox"]) {
  font-family: inherit;
  width: 100%;
  max-width: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45) !important;
  color: var(--text) !important;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}

.medios-editor-form .agora-input:focus,
.medios-editor-form input:not([type="checkbox"]):focus,
.medios-editor-form select:focus,
.medios-alta-wrap input:focus,
.medios-alta-wrap select:focus,
.tramos-table input:focus {
  outline: none;
  border-color: rgba(53, 230, 107, 0.55);
  box-shadow: 0 0 0 2px rgba(53, 230, 107, 0.12);
}

.medios-editor-form select.agora-input,
.medios-alta-wrap select,
.medios-editor-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%2388aa94'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2388aa94' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.medios-editor-form input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.75);
  opacity: 0.7;
  cursor: pointer;
}

.tramos-table .medio-pct-input,
.medios-tramos-table .medio-pct-input {
  width: 100%;
  min-width: 72px;
  max-width: 110px;
  padding: 8px 10px;
}

.chk-row,
.chk-row-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.medios-habilitacion .chk-row {
  margin-top: 2px;
}

.form-actions-inline {
  grid-column: auto;
  margin: 0;
  justify-content: flex-end;
}

.multi-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.multi-picker-toggle {
  text-align: left;
  cursor: pointer;
  min-height: 42px;
}

.multi-picker-panel {
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  max-height: 220px;
  overflow: auto;
}

.multi-picker-panel[hidden] {
  display: none !important;
}

.promo-dynamic-fields {
  margin-top: 4px;
}

.medios-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: start;
}

.medios-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.tramos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tramos-table th,
.tramos-table td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.tramos-table .cft-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chk-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.88rem;
  border-radius: 8px;
  min-height: 40px;
}

@media (max-width: 720px) {
  .medios-fields,
  .medios-editor-grid {
    grid-template-columns: 1fr;
  }
  .medios-field-check {
    align-self: stretch;
  }
  .form-actions-inline {
    width: 100%;
    justify-content: stretch;
  }
  .form-actions-inline .btn-primary,
  .form-actions-inline .btn-ghost {
    flex: 1;
  }
  .tramos-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .medios-editor-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .tramos-table .medio-pct-input {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .catalogo-compact-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .catalogo-compact-row .cat-meta {
    flex-basis: 100%;
  }
}

/* —— Modal Ágora —— */
.agora-visor {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  background: rgba(3, 4, 3, 0.92);
  color: var(--text);
}
.agora-visor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}
.agora-visor-bar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agora-visor-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 12px;
}
.agora-visor-stage img,
.agora-visor-stage iframe {
  width: 100%;
  height: 100%;
  max-width: 1100px;
  border: 0;
  background: #111;
  object-fit: contain;
}
.agora-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
}

.agora-modal-root[hidden] {
  display: none !important;
}

html.agora-modal-open,
body.agora-modal-open {
  overflow: hidden;
}

.agora-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.agora-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: min(420px, 100%);
  min-height: min(280px, 100%);
  resize: both;
  overflow: hidden;
  z-index: 1;
  padding: 3px;
  border-radius: 18px;
  isolation: isolate;
}

.catalogo-nav-bar {
  padding: 0 0 10px;
  margin: 0;
}
.catalogo-nav-bar .link-back {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--green-soft);
  font-weight: 700;
}
.catalogo-nav-bar .link-back:hover {
  text-decoration: underline;
}
.precios-id-cell {
  cursor: pointer;
}

/* Variantes: solo layout interno. El tamaño desktop lo pone --ui-zoom + 80% visual. */
.agora-modal-dialog.is-wide .agora-modal-inner,
.agora-modal-dialog.is-catalog .agora-modal-inner,
.agora-modal-dialog.is-sheet .agora-modal-inner,
.agora-modal-dialog.is-compact .agora-modal-inner,
.agora-modal-dialog.is-otorgar .agora-modal-inner,
.agora-modal-dialog.is-resizable .agora-modal-inner {
  height: 100%;
  max-height: none;
  min-height: 0;
}

.agora-modal-dialog.is-wide .agora-modal-body,
.agora-modal-dialog.is-catalog .agora-modal-body,
.agora-modal-dialog.is-sheet .agora-modal-body,
.agora-modal-dialog.is-compact .agora-modal-body,
.agora-modal-dialog.is-otorgar .agora-modal-body,
.agora-modal-dialog.is-resizable .agora-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.agora-modal-dialog.is-otorgar .agora-modal-body {
  width: 100%;
}

.agora-modal-dialog.is-otorgar .fin-pre-sim-card .table-wrap,
.agora-modal-dialog.is-otorgar .fin-pre-sim .table-wrap {
  max-height: min(48vh, 560px);
}

@media (min-width: 721px) {
  html:has(body:not(.mode-login)) .agora-modal-dialog,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-wide,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-sheet,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-compact,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-catalog,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-otorgar,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-resizable {
    zoom: var(--ui-zoom);
    width: calc(100vw * var(--modal-open-frac) / var(--ui-zoom));
    height: calc(100vh * var(--modal-open-frac) / var(--ui-zoom));
    max-width: calc((100vw - 32px) / var(--ui-zoom));
    max-height: calc((100vh - 32px) / var(--ui-zoom));
    min-width: 420px;
    min-height: 280px;
    resize: both;
    overflow: hidden;
  }
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-wide:has(.ppt-cuotas-box) {
    height: auto;
    min-height: 0;
    width: min(980px, calc((100vw - 32px) / var(--ui-zoom)));
  }
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-wide:has(.ppt-cuotas-box) .agora-modal-inner,
  html:has(body:not(.mode-login)) .agora-modal-dialog.is-wide:has(.ppt-cuotas-box) .agora-modal-body {
    height: auto;
    flex: 0 1 auto;
  }
}

.adjuntos-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}

.adjuntos-sheet-actions .btn-accent,
.adjuntos-sheet-actions .btn-primary {
  min-height: 44px;
  min-width: 140px;
  flex: 1 1 140px;
}

.adjuntos-sheet-actions input[type="file"] {
  display: none;
}

/* Celular: casi todos los modales a pantalla completa (salvo compact = poca info) */
@media (max-width: 720px) {
  .agora-modal-root:not(:has(.agora-modal-dialog.is-compact)) {
    padding: 0;
    align-items: stretch;
  }
  .agora-modal-dialog {
    zoom: 1;
    resize: none;
  }
  .agora-modal-dialog:not(.is-compact) {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    padding: 0;
    resize: none;
  }
  .agora-modal-dialog:not(.is-compact) .agora-modal-inner {
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  .agora-modal-dialog:not(.is-compact) .agora-modal-body {
    flex: 1;
    min-height: 0;
  }
  .agora-modal-dialog.is-compact {
    width: min(100vw - 24px, 100%);
    min-width: 0;
    max-height: calc(100vh - 24px);
  }
}

.plan-edit-modal .plan-edit-importe,
.plan-edit-modal .plan-edit-sena-medio label {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan-edit-modal .plan-edit-importe .agora-input,
.plan-edit-modal .plan-edit-sena-medio .agora-input,
.plan-edit-modal #plan-edit-wizard.label,
.plan-edit-modal #plan-edit-wizard .agora-input,
.plan-edit-modal #plan-edit-wizard select {
  width: 100%;
  max-width: none;
  min-height: 44px;
  font-size: 1rem !important;
}

.plan-edit-modal #plan-edit-wizard.ppt-medio-simple label {
  font-size: 0.9rem;
  width: 100%;
}

.plan-edit-sena-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.catalog-picker-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.catalog-picker-filter {
  margin: 0;
}

.catalog-picker-group {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.catalog-picker-group h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-soft);
}

.catalog-picker-chips {
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.multi-picker .help {
  margin: 0;
}

/* La luz recorre el borde. El cuadrado no gira: eso era el velo de atrás. */
@property --agora-led {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.agora-modal-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: conic-gradient(
    from var(--agora-led),
    transparent 0deg 300deg,
    rgba(53, 230, 107, 0.25) 318deg,
    rgba(53, 230, 107, 0.75) 332deg,
    #35e673 342deg,
    #c8ffd8 350deg,
    #35e673 356deg,
    rgba(53, 230, 107, 0.35) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: agora-modal-neon-orbit 10s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.agora-modal-glow {
  display: none;
}

@keyframes agora-modal-neon-orbit {
  to {
    --agora-led: 360deg;
  }
}

.agora-modal-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  border-radius: 16px;
  background: linear-gradient(165deg, #0c1210 0%, #060806 100%);
  border: 1px solid rgba(53, 230, 107, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(53, 230, 107, 0.06);
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
}

.agora-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.agora-modal-title-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agora-modal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
}

.agora-modal-subtitle {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(210, 218, 212, 0.78);
  line-height: 1.3;
}

.agora-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agora-modal-header-extra {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ope-popup-hecho {
  margin: 0;
  white-space: nowrap;
  font-size: 0.82rem;
}

.agora-modal-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.agora-modal-x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.agora-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.agora-modal-foot-slot {
  display: flex;
  align-items: center;
}
.agora-modal-foot-slot .foot-falta {
  color: var(--bad);
  font-weight: 600;
  font-size: 0.8rem;
  margin: 0 8px;
}
.agora-modal-body:has(.abast-chat),
.agora-modal-body:has(.eti-pdf) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.abast-chat {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.abast-chat-list {
  flex: 1 1 auto;
  min-height: 160px;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.28);
}
.agora-modal-dialog.is-wide .agora-modal-body:has(.abast-pop) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.abast-pop {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.abast-pop-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.abast-pop-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.abast-pop-h {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
.abast-pop-side .abast-chat {
  flex: 1 1 auto;
  margin-top: 0;
}
.abast-pop-side .medios-field-full {
  margin-top: 8px;
  flex: 0 0 auto;
}
.abast-docs p,
.abast-docs li {
  margin: 0 0 6px;
  line-height: 1.35;
}
.abast-bloque {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.abast-bloque-h {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.abast-pasos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 4px;
}
.abast-paso {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.abast-paso span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}
.abast-paso b {
  display: block;
  margin-top: 2px;
  font-weight: 600;
}
.abast-paso em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}
.abast-paso.is-ok b { color: #b6f5c4; }
.abast-paso.is-pend b { color: #e6c15a; }
.abast-ruta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
@media (max-width: 720px) {
  .abast-pop {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .abast-pop-main,
  .abast-pop-side {
    max-height: none;
  }
  .abast-pop-side .abast-chat-list {
    max-height: 240px;
  }
}
.abast-alerta { color: #e6c15a; }

.agora-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.agora-modal-confirm-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 16px;
}

.agora-modal-confirm-box {
  max-width: 420px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #0f1412;
  border: 1px solid rgba(53, 230, 107, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.agora-modal-confirm-msg {
  margin: 0 0 16px;
  line-height: 1.45;
  white-space: pre-line;
}

.agora-modal-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lineas-block-financiera .cat-field-label {
  color: #7ec8ff;
}

.lineas-block-comercial .cat-field-label {
  color: var(--accent, #35e66b);
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* —— Campos unificados —— */
.agora-input,
.search-field input,
.search-field .agora-input {
  font-family: inherit;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.agora-input:focus,
.search-field input:focus {
  outline: none;
  border-color: rgba(53, 230, 107, 0.55);
  box-shadow: 0 0 0 2px rgba(53, 230, 107, 0.12);
}

.agora-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2388aa94' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.857 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  padding-left: 36px;
}

.field-wrap .field-hint {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 4px;
  color: var(--muted);
  min-height: 1em;
}

.field-state-warn .agora-input {
  border-color: rgba(255, 193, 7, 0.55);
}

.field-state-warn .field-hint {
  color: #e6c04a;
}

.field-state-error .agora-input {
  border-color: rgba(255, 90, 90, 0.65);
  box-shadow: 0 0 0 2px rgba(255, 90, 90, 0.1);
}

.field-state-error .field-hint {
  color: #ff8a8a;
}

.field-state-ok .agora-input {
  border-color: rgba(53, 230, 107, 0.45);
}

.field-state-ok .field-hint {
  color: var(--green-soft);
}

.chk-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.chk-chip:hover {
  border-color: rgba(53, 230, 107, 0.35);
  box-shadow: 0 0 12px rgba(53, 230, 107, 0.08);
}

.chk-chip:has(input:checked) {
  border-color: rgba(53, 230, 107, 0.55);
  background: rgba(53, 230, 107, 0.1);
  box-shadow: 0 0 14px rgba(53, 230, 107, 0.12);
}

.chk-chip input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}

.chk-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 14px;
}

.modal-form-grid .span-2 {
  grid-column: span 2;
}

.modal-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.catalogo-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
}

.catalogo-compact-row .cat-name {
  font-weight: 700;
  flex: 1 1 140px;
}

.catalogo-compact-row .cat-name-main {
  color: var(--text);
  font-weight: 700;
}

.catalogo-compact-row .cat-name-sub,
.cat-name-sub {
  color: var(--muted);
  font-weight: 400;
}

.cat-name-paren {
  color: var(--text);
  font-weight: 400;
}

.admin-empresas-scroll {
  max-height: 28rem;
  overflow: auto;
}

.admin-empresas-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel, #141414);
  box-shadow: 0 1px 0 var(--line, rgba(255,255,255,0.08));
}

.identidad-avisos {
  margin: 0 0 10px;
}

.identidad-contacto {
  margin: 0 0 12px;
}

.crm-rel-block #crm-rel-form[hidden] {
  display: none;
}

.catalogo-compact-row .cat-slug {
  font-size: 0.75rem;
  opacity: 0.55;
  color: var(--muted);
}

.agora-input[readonly],
.agora-input[readonly]:focus {
  opacity: 0.7;
  cursor: default;
}

.catalogo-compact-row .cat-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

/* OMS Motos grilla — filtros */
.oms-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 14px;
}
.oms-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.oms-filters.oms-filters--row {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.oms-filters.oms-filters--row > .btn-ghost,
.oms-filters.oms-filters--row > .btn-primary {
  align-self: end;
  min-height: 38px;
  margin-bottom: 0;
}
.oms-filters.oms-filters--row .oms-f-chips {
  display: inline-flex;
  gap: 4px;
  align-items: end;
  flex: 0 0 auto;
}
.oms-filters.oms-filters--row .agora-date-wrap {
  display: block;
  position: relative;
  min-width: 132px;
}
.oms-filters.oms-filters--row .oms-f-chip {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 9px;
  min-height: 32px;
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
}
/* Tilde + frase (Presupuesto / Operación / Pendientes de facturar): fino, no pastilla gorda */
.oms-filters.oms-filters--row label.chk-chip.oms-f-chip {
  padding: 2px 4px 2px 2px;
  min-height: 28px;
  gap: 5px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.oms-filters.oms-filters--row label.chk-chip.oms-f-chip:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
.oms-filters.oms-filters--row label.chk-chip.oms-f-chip:has(input:checked) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text);
}
.oms-filters.oms-filters--row label.chk-chip.oms-f-chip input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}
.oms-filters.oms-filters--row .oms-f-inline {
  flex: 0 0 auto;
  width: auto;
  min-width: 7.5rem;
  max-width: 10rem;
  min-height: 32px;
  margin: 0;
}
.oms-filters.oms-filters--row .oms-f-q-inline {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: none;
}
.oms-filters.oms-filters--row .oms-f-btn {
  flex: 0 0 auto;
  min-height: 32px;
  margin: 0;
}
.oms-filters .oms-f-q { grid-column: span 2; }
.oms-filters .oms-f-tipos {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.oms-filters .oms-f-tipos-label {
  font-size: 0.78rem;
  color: var(--muted);
}
.oms-filters .oms-f-tipos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.oms-filters .oms-f-chk {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}
.oms-filters-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 2px;
}
.oms-grilla { font-size: 0.92rem; }
.oms-grilla th { white-space: nowrap; padding: 10px 11px; }
.oms-grilla thead tr:first-child th[data-col] {
  overflow: visible;
  position: relative;
}
.agora-col-gutter {
  position: absolute;
  top: 7px;
  width: 13px;
  height: 16px;
  border: 0;
  padding: 0;
  margin: 0;
  z-index: 6;
  cursor: pointer;
  opacity: 0.72;
  background: rgba(3, 4, 3, 0.5);
  color: rgba(53, 230, 107, 0.82);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.32);
  font-size: 8px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: -1px;
}
.agora-col-gutter::before {
  content: "◀▶";
}
.agora-col-gutter.is-mid,
.agora-col-gutter.is-start {
  left: -7px;
}
.agora-col-gutter.is-end {
  right: -7px;
  left: auto;
}
.agora-col-gutter:hover {
  opacity: 1;
  background: rgba(53, 230, 107, 0.18);
  color: #fff;
}
.lugar-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  background: transparent;
}
.lugar-pill--ens {
  color: #35e66b;
  border-color: rgba(53, 230, 107, 0.45);
  background: rgba(53, 230, 107, 0.08);
}
.lugar-pill--brs {
  color: #7eb6ff;
  border-color: rgba(126, 182, 255, 0.5);
  background: rgba(80, 140, 230, 0.12);
}
.lugar-pill--rem {
  color: #c8c4b8;
  border-color: rgba(200, 196, 184, 0.35);
  background: rgba(255, 255, 255, 0.04);
}
.lugar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.lugar-pills .lugar-pill {
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
}
.lugar-pills .lugar-pill.is-on {
  box-shadow: 0 0 0 1px currentColor;
}
.lugar-pills .lugar-pill:not(.is-on) {
  opacity: 0.55;
}
.ope-hero-alarms .lugar-pills {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 6px;
}
.ope-hero-alarms .ope-flag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.oms-grilla th.oms-th-sort {
  cursor: pointer;
  user-select: none;
}
.oms-grilla th.oms-th-sort:hover { color: var(--accent, #35e66b); }
.oms-grilla th.oms-th-sort.is-sorted::after {
  content: " ▾";
  font-size: 0.75em;
  opacity: 0.85;
}
.oms-grilla th.oms-th-sort.is-sorted.is-asc::after,
.oms-grilla th.oms-th-sort.is-sorted.is-desc::after { content: none; }
.oms-grilla th.oms-th-nosort { cursor: default; }
.oms-grilla td { vertical-align: middle; padding: 10px 11px; }
.oms-grilla td.is-mora {
  color: #e8b84a;
  font-weight: 600;
}
.oms-grilla tr.is-en-mora td:nth-child(9),
.oms-grilla tr.is-en-mora td:nth-child(10),
.oms-grilla tr.is-en-mora td:nth-child(11) {
  color: #e8b84a;
  font-weight: 600;
}
.oms-grilla tr.oms-row { cursor: pointer; }
.oms-grilla tr.oms-row:hover { background: rgba(255,255,255,0.04); }
.oms-grilla tr.oms-alerta { box-shadow: inset 3px 0 0 #e6a23a; }
.oms-luz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.oms-luz::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.oms-luz--verde::before { background: #1dff72; box-shadow: 0 0 8px rgba(29,255,114,0.75); }
.oms-luz--amarillo::before { background: #ffd24a; box-shadow: 0 0 8px rgba(255,210,74,0.7); }
.oms-luz--proceso::before {
  background: #f4f6f8;
  box-shadow: 0 0 8px rgba(244, 246, 248, 0.55);
  animation: ope-white-pulse 1.6s ease-in-out infinite;
}
.oms-luz--rojo::before { background: #ff4b4b; box-shadow: 0 0 8px rgba(255,75,75,0.7); }
.oms-luz--naranja::before { background: #ff9a3a; box-shadow: 0 0 8px rgba(255,154,58,0.7); }
.oms-luz--gris::before { background: #9a9a9a; box-shadow: none; }
.oms-luz--azul::before { background: #7eb6ff; box-shadow: 0 0 8px rgba(126, 182, 255, 0.65); }
.oms-luz--blanco::before { background: #f4f4f4; box-shadow: none; }
.oms-luz--na { opacity: 0.45; }
.oms-luz--na::before { background: #666; box-shadow: none; }
.oms-luz--solo { justify-content: flex-start; min-width: 0; }
.oms-luz--apagado::before {
  background: #4a4a4a;
  box-shadow: none;
  animation: none;
}
.oms-alarma {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  white-space: nowrap;
  min-height: 1.35em;
  vertical-align: middle;
}
.oms-grilla td.oms-alarma {
  display: table-cell;
}
/* Nombre del cliente: igual en OMS Motos/Aloise, Preaprobados, Préstamos, Cobros y Facturas ARCA (30/11/2026). */
.oms-grilla td[data-col="nombre"] .oms-cli-nombre,
.oms-grilla td[data-col="nombre_titular"] .oms-cli-nombre,
.oms-grilla td[data-col="cliente"] .oms-cli-nombre {
  color: #f5f7f6;
  font-weight: 650;
  font-size: 0.92rem;
}
/* Titular del motovehículo: Mismo apagado; otra persona en blanco con marca ámbar. */
.oms-grilla td.oms-titular-moto.is-mismo {
  color: var(--muted, #7d8a85);
  opacity: 0.6;
}
.oms-grilla td.oms-titular-moto.is-distinto {
  color: #f5f7f6;
  font-weight: 650;
}
.oms-titular-moto-mark {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 5px var(--warn);
  vertical-align: middle;
}
/* Llegada de OMS Aloise (1/12/2026): una lucecita por SOL, juntas, sin agrandar la fila. */
.oms-llegada-luces {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.oms-llegada-luces .oms-luz::before { width: 9px; height: 9px; }
.oms-llegada-mas { font-size: 0.66rem; color: var(--muted); }
.oms-alarma-lab {
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.2;
}
.oms-grilla td[data-col="motovehiculo"],
.oms-grilla td[data-col="entrega"],
.oms-grilla td[data-col="pago"],
.oms-grilla td[data-col="estado"],
.oms-grilla td[data-col="luz_mail"],
.oms-grilla td[data-col="luz_sms"],
.oms-grilla td[data-col="luz_ref"],
.oms-grilla td[data-col="luz_dni"],
.oms-grilla td[data-col="luz_selfie"],
.oms-grilla td[data-col="luz_garante"],
.oms-grilla td[data-col="luz_contrato"],
.oms-grilla td[data-col="luz_firmado"],
.oms-grilla td[data-col="luz_compra"],
.oms-grilla td[data-col="luz_entrega"] {
  white-space: nowrap;
  vertical-align: middle;
}
.oms-grilla td[data-col="motovehiculo"] .oms-luz,
.oms-grilla td[data-col="entrega"] .oms-luz,
.oms-grilla td[data-col="pago"] .oms-luz,
.oms-grilla td[data-col="estado"] .oms-luz,
.oms-grilla td[data-col^="luz_"] .oms-luz {
  flex-shrink: 0;
}
.oms-row--inactivo {
  opacity: 0.55;
  filter: grayscale(0.35);
}
.oms-estado--activo,
.oms-estado--inactivo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.oms-kind {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.oms-kind--PPT-R,
.oms-kind--PPT,
.oms-kind--Presupuesto {
  color: #7eb8ff;
  border-color: rgba(126, 184, 255, 0.45);
}
.oms-kind--OPE,
.oms-kind--Operacion {
  color: #35e66b;
}
.oms-panel-block { margin-bottom: 1.1rem; }
.oms-panel-block h3 { margin: 0 0 8px; font-size: 0.95rem; }
.oms-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  margin-bottom: 6px;
  background: rgba(0,0,0,0.25);
}
.oms-item-row input.agora-input { min-width: 0; }
@media (max-width: 720px) {
  .oms-filters .oms-f-q { grid-column: span 1; }
  .oms-item-row { grid-template-columns: 1fr; }
}

/* Caja 0.8.58 */
.caja-panel {
  padding: 12px 14px;
}
.caja-panel h2 {
  font-size: 0.95rem;
  margin: 0 0 4px;
}
.caja-panel > .help {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.35;
}
.caja-filters {
  margin-bottom: 8px;
}
.caja-filters .caja-lugar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 220px;
}
.caja-filters .caja-lugar-field .lugar-pills {
  min-height: 32px;
}
.caja-filters .lugar-pills .lugar-pill {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.78rem;
}
.moneda-pill--ars {
  color: #c8c4b8;
  border-color: rgba(200, 196, 184, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.moneda-pill--usd {
  color: #e6c35e;
  border-color: rgba(230, 195, 94, 0.5);
  background: rgba(230, 195, 94, 0.1);
}
.moneda-pill--all {
  color: #c8c4b8;
  border-color: rgba(200, 196, 184, 0.35);
  background: rgba(255, 255, 255, 0.04);
}
.caja-obs-title #caja-obs-lugar-pill {
  display: inline-flex;
  align-items: center;
}
.caja-filters #caja-f-q {
  min-width: 14rem;
  flex: 1 1 16rem;
}
.caja-saldos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.caja-saldo-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  min-width: 0;
}
.caja-saldo-card span {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}
.caja-saldo-card strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.caja-saldo-card em {
  font-size: 0.65rem;
  font-style: normal;
  color: var(--muted);
}
.caja-saldo-card--fajo {
  border-color: rgba(53, 230, 107, 0.35);
}
.caja-ops-grid {
  display: none;
}
.caja-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin: 12px 0 16px;
  --caja-duo-h: 560px;
}
.caja-carousel-host,
.caja-stream-host {
  display: flex;
  flex-direction: column;
  min-height: var(--caja-duo-h);
  height: var(--caja-duo-h);
  max-height: var(--caja-duo-h);
  min-width: 0;
}
.caja-stream-host {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.caja-stream-fill {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 14px;
  box-sizing: border-box;
  min-height: 0;
}
.caja-stream-fill > .ope-obs-card-title,
.caja-stream-fill > .help,
.caja-stream-fill > .ope-stream-filters,
.caja-stream-fill > .ope-stream-compose {
  flex-shrink: 0;
}
.caja-stream-fill > .help {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.35;
}
.caja-carousel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.caja-carousel-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.caja-carousel-nav .chip-btn.is-active {
  color: var(--text);
  border-color: rgba(53, 230, 107, 0.55);
  background: rgba(53, 230, 107, 0.12);
}
.caja-carousel-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.caja-carousel-stage > .caja-panel {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.caja-stream-host .ope-stream-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-top: 6px;
  padding-right: 6px;
}
.caja-stream-host .ope-chat-bubble.is-nota-directa .ope-stream-body {
  color: #35e66b;
}
.caja-stream-host .ope-chat-bubble.is-accion .ope-stream-body {
  color: #9aa39c;
}
.caja-action-form {
  margin-top: 6px;
}
#caja-sec-alivio {
  height: auto;
  align-self: start;
}
.caja-alivio-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  height: auto;
  margin: 0;
}
.caja-alivio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 1.35fr;
  gap: 8px 12px;
}
.caja-alivio-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.caja-alivio-acciones {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.caja-alivio-acciones .status-warn {
  margin: 0;
  flex: 1 1 auto;
  text-align: left;
  font-size: 0.78rem;
}
.caja-alivio-dejar {
  display: block;
  width: 6.2rem;
  margin: 0;
  padding: 2px 6px;
  font-size: 0.85rem;
  line-height: 1.2;
  color: var(--text, #1a1a1a);
  background: #fff;
}
.caja-alivio-form > .caja-alivio-linea {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 8px 10px;
  font-size: inherit;
}
.caja-alivio-form > .caja-alivio-linea > button {
  height: 42px;
  margin: 0;
  align-self: flex-end;
  white-space: nowrap;
  box-sizing: border-box;
}
#caja-alivio-parte {
  margin: 0;
  align-self: flex-end;
  min-height: 42px;
  align-items: center;
  white-space: nowrap;
  font-size: 0.82rem;
  position: relative;
  cursor: help;
}
#caja-alivio-parte:not(:empty) {
  display: flex;
}
.caja-alivio-pop {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  width: min(420px, 86vw);
  white-space: normal;
  text-align: left;
  background: #fff;
  color: var(--ink, #1c1c1c);
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
#caja-alivio-parte:hover .caja-alivio-pop,
#caja-alivio-parte.is-abierto .caja-alivio-pop {
  display: block;
}
.caja-solo-tip {
  margin-left: 4px;
  border-bottom: 1px dashed var(--muted);
  cursor: help;
}
.caja-alivio-form > .caja-alivio-linea .caja-alivio-obs {
  flex: 1 1 140px;
}
.caja-alivio-form > .caja-alivio-linea .caja-alivio-va {
  margin-left: auto;
  margin-bottom: 0;
  padding: 0 0 0 8px;
  height: 42px;
  display: flex;
  align-items: center;
  align-self: flex-end;
  white-space: nowrap;
}
.caja-stream-host .ope-stream-meta {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10.5rem) 8.8rem minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
}
.caja-stream-host .ope-stream-when {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.caja-stream-host .ope-stream-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caja-alivio-oculto {
  display: none;
}
.caja-buzones {
  display: flex;
  flex-direction: column;
  margin: 8px 6px 4px;
  max-height: 280px;
  overflow: hidden;
  background: #070b09;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.caja-buzones-titulo {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 12px;
  background: #070b09;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
}
.caja-itris-vivo {
  margin: 6px 6px 0;
  padding: 0;
  border-radius: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  background: transparent;
  color: var(--warn);
}
.caja-itris-vivo--ok {
  background: transparent;
  color: var(--green-soft);
}
.caja-itris-vivo--error,
.caja-itris-vivo--falta {
  background: transparent;
  color: var(--warn);
}
.caja-itris-vivo--usd {
  background: transparent;
  color: var(--muted);
}
.caja-itris-vivo:empty {
  display: none;
}
#caja-alivio-cambio-msg:empty {
  display: none;
}
.caja-alivio-acciones .btn-sm {
  flex: 0 0 auto;
}
.caja-alivio-meta {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.caja-alivio-linea,
.caja-alivio-va {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
}
.caja-alivio-linea:empty + .caja-alivio-va {
  margin-left: auto;
}
.caja-alivio-linea:empty,
#caja-alivios-list:empty {
  display: none;
}
#caja-alivios-list {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
.caja-action-form label {
  font-size: 0.72rem;
  gap: 4px;
}
.caja-panel > h3.medios-block-title {
  margin: 14px 0 4px;
}
.caja-panel .table-wrap--excel {
  height: auto;
  max-height: 320px;
}
/* Administración ocupa el alto de la pantalla. Caja sigue en 560 al lado del historial. */
#view-administracion > .caja-carousel-host {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  margin-bottom: 0;
}
#view-administracion .caja-carousel-stage {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#view-administracion .caja-carousel-stage > .caja-panel {
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
#view-administracion .caja-carousel-stage > .caja-panel > h2,
#view-administracion .caja-carousel-stage > .caja-panel > .help,
#view-administracion .caja-carousel-stage > .caja-panel > form,
#view-administracion .caja-carousel-stage > .caja-panel > h3,
#view-administracion .caja-carousel-stage > .caja-panel > .form-actions {
  flex: 0 0 auto;
}
#view-administracion .caja-carousel-stage > .caja-panel > [id$="-body"] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#view-administracion .caja-carousel-stage > .caja-panel > [id$="-body"] > :not(.table-wrap--excel) {
  flex: 0 0 auto;
}
#view-administracion .caja-panel .table-wrap--excel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  max-height: none !important;
  overflow: auto;
}
/* Jorge 2/12/2026 (Banco al 100 %): con «Hoy» arriba no entraba todo y lo de abajo se cortaba sin
   scroll. Si el recuadro no entra, su cuerpo scrollea y la grilla guarda un alto mínimo para leerse. */
#view-administracion .caja-carousel-stage > .caja-panel {
  overflow-y: auto;
}
#view-administracion .caja-carousel-stage > .caja-panel > [id$="-body"] {
  overflow-y: auto;
}
#view-administracion .caja-carousel-stage > .caja-panel > [id$="-body"] > .table-wrap--excel {
  flex: 1 0 260px;
  min-height: 260px !important;
}
/* Tesorería (Jorge, 3/12/2026): un solo scroll, el del recuadro. El cuerpo no se encoge ni scrollea
   aparte (la rueda giraba adentro de una franja chica y no se llegaba al botón Pago); los saldos se
   ven enteros con la botonera justo abajo, y cada otra grilla tiene su alto y deja pasar la rueda. */
#view-administracion .caja-carousel-stage > #caja-sec-tesoreria {
  display: block;
}
#view-administracion .caja-carousel-stage > #caja-sec-tesoreria > #caja-tesoreria-body {
  display: block;
  flex: none;
  min-height: 0;
  overflow: visible;
}
#view-administracion #caja-sec-tesoreria .table-wrap--excel {
  flex: none;
  min-height: 0 !important;
  height: auto !important;
  max-height: 420px !important;
  overscroll-behavior: auto;
}
#view-administracion #caja-sec-tesoreria .table-wrap--excel.tes-wrap-entera {
  max-height: none !important;
  overflow-y: visible;
}
#view-administracion #caja-sec-tesoreria .tes-botonera {
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
}
/* «Hoy» compacto: un renglón por control, sin alto de más. */
/* Hoy es la primera solapa del carrusel (Jorge, 3/12/2026): ya no ocupa lugar arriba de las grillas. */
#view-administracion .caja-carousel-stage > .adm-hoy > h2 {
  margin: 0 0 6px;
}
#view-administracion .caja-carousel-stage > .adm-hoy > #adm-hoy-body {
  overflow-y: auto;
}
.caja-carousel-nav .chip-btn.has-pend {
  border-color: rgba(245, 185, 66, 0.6);
  color: var(--amber, #f5b942);
}
.caja-carousel-nav .chip-btn.has-pend.is-active {
  color: var(--text);
}
#view-administracion .adm-hoy-tabla td {
  padding-top: 1px;
  padding-bottom: 1px;
  line-height: 1.25;
}
#view-administracion .adm-hoy-tabla td .btn-sm {
  min-height: 0;
  padding: 1px 10px;
  font-size: 0.7rem;
}
.caja-action-form .agora-input {
  min-height: 34px;
  font-size: 0.85rem;
}
.caja-action-form .form-actions {
  margin-top: 4px;
}
.caja-status {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 8px;
  line-height: 1.35;
}
.caja-status--ok {
  border-color: rgba(53, 230, 107, 0.35);
  color: #b8f0c8;
}
.caja-alivios-list {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  min-height: 0;
  padding: 0 12px 8px;
}
.caja-alivio-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 0.8rem;
  white-space: normal;
  color: var(--text);
}
.caja-alivio-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}
.caja-alivio-dato {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  line-height: 1.35;
}
.caja-alivio-dato strong {
  font-size: 1rem;
}
.caja-alivio-code {
  color: var(--muted);
  font-size: 0.72rem;
}
.caja-alivio-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
}
.caja-alivio-row .agora-input {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 32px;
}
.caja-alivio-row .btn-primary {
  min-height: 32px;
  padding: 0 14px;
  white-space: nowrap;
  background: var(--green);
  border-color: var(--green);
  color: #06210f;
}
.caja-alivio-row .btn-primary:hover {
  background: var(--green-soft);
  border-color: var(--green-soft);
  color: #06210f;
}
.caja-alivio-dif {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--warn);
}
.caja-alivio-row .muted {
  color: var(--muted);
  font-size: 0.72rem;
}
.caja-alivio-recv {
  display: grid;
  grid-template-columns: minmax(11rem, 1.6fr) 8rem minmax(7rem, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.caja-code {
  font-size: 0.72rem;
  word-break: break-all;
}
.caja-grilla th,
.caja-grilla td {
  font-size: 0.78rem;
  padding: 6px 8px;
}
.caja-ingreso { color: #9be7b0; }
.caja-egreso { color: #f0b8b8; }
.caja-row-hl {
  background: rgba(53, 230, 107, 0.12);
}
/* Grilla de caja (Caja y la ventana aparte): buscador, fecha corrida, estado y totales. */
/* Un solo renglón: Desde · Hasta · Fecha de · Cajones · Moneda · Excel · Buscador.
   Las fechas al ancho de DD/MM/AAAA; el ancho que sobra es del buscador. */
.caja-g-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: end;
  gap: 10px;
  overflow-x: auto;
}
.caja-g-filters > * {
  flex: 0 0 auto;
}
.caja-g-filters .caja-lugar-field {
  min-width: 0;
}
.caja-g-filters .lugar-pills {
  flex-wrap: nowrap;
}
.caja-g-filters .caja-g-fecha .agora-date-wrap,
.caja-g-filters .caja-g-fecha > input.agora-input {
  width: 8.6rem;
}
.caja-g-filters .caja-g-fecha .agora-date-wrap > input.agora-input {
  width: 100%;
  min-width: 0;
}
.caja-g-filters .caja-g-excel {
  min-height: 32px;
}
.caja-g-filters .caja-g-q {
  flex: 1 1 14rem;
  min-width: 12rem;
  min-height: 32px;
}
/* La ventana de la grilla llega hasta la versión, como toda grilla de módulo. */
#view-caja-grilla.grid-fill .caja-grilla-host {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#view-caja-grilla.grid-fill .caja-grilla-host > :not(.table-wrap--excel) {
  flex: 0 0 auto;
}
#view-caja-grilla.grid-fill .caja-grilla-host > .help {
  margin: 4px 0;
}
.caja-g-corrida {
  color: var(--warn);
  font-weight: 650;
  cursor: help;
}
/* Lápiz = editar en todo System (AgoraLapiz en agora-fields.js). Va antes del dato para que el «…» no lo corte.
   Gris y apagado; se enciende al pasar por la fila y queda verde sobre el lápiz. */
.agora-lapiz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 2px;
  margin: 0 4px 0 -2px;
  color: var(--muted, #8a9a90);
  opacity: 0.35;
  cursor: pointer;
  vertical-align: -1px;
  border-radius: 3px;
  transition: opacity 0.12s, color 0.12s;
}
tr:hover .agora-lapiz {
  opacity: 0.8;
}
.agora-lapiz:hover,
.agora-lapiz:focus-visible {
  opacity: 1 !important;
  color: var(--green-soft, #3ddc84);
  outline: none;
}
.agora-lapiz-ico {
  display: inline-flex;
  vertical-align: -1px;
  color: var(--green-soft, #3ddc84);
  margin: 0 2px;
}
.caja-g-est--anulado {
  color: #f0b8b8;
}
.caja-g-est--transito {
  color: var(--warn);
}
.caja-g-row--anulado td {
  opacity: 0.6;
}
.caja-grilla tfoot td.caja-g-tot-cell {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(10, 14, 11, 0.98);
  box-shadow: 0 -1px 0 var(--line);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: top;
}
.caja-grilla tfoot tr + tr td.caja-g-tot-cell {
  box-shadow: none;
}
/* Pesos y dólares: la primera fila queda fija arriba de la segunda. */
.caja-grilla tfoot tr:first-child:not(:last-child) td.caja-g-tot-cell {
  bottom: 2.9rem;
  height: 2.9rem;
  box-sizing: border-box;
}
.caja-grilla tfoot tr:last-child td.caja-g-tot-cell {
  height: 2.9rem;
  box-sizing: border-box;
}
.chip--fajo {
  background: rgba(53, 230, 107, 0.15);
}
.chip--libro {
  background: rgba(120, 160, 220, 0.15);
}
.chip--anular {
  background: rgba(240, 180, 60, 0.18);
  color: #f2c46b;
}

@media (max-width: 900px) {
  .caja-duo {
    grid-template-columns: 1fr;
  }
  .caja-carousel-host,
  .caja-stream-host {
    min-height: 420px;
    height: 420px;
    max-height: 420px;
  }
  .caja-alivio-recv {
    grid-template-columns: 1fr;
  }
  .caja-alivio-recv .btn-sm {
    min-height: 40px;
  }
}

@media (max-width: 720px) {
  .caja-saldos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .caja-action-form .agora-input {
    min-height: 40px;
  }
  .caja-action-form .form-actions .btn-sm,
  .caja-action-form .form-actions .btn-primary,
  .caja-action-form .form-actions .btn-ghost {
    min-height: 40px;
    width: 100%;
  }
}

/* Cuadrantes PPT */
.ppt-cuadrantes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
}
.ppt-mix-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ppt-motos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.ppt-medio-simple {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ppt-medio-simple label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.ppt-medio-cot {
  font-size: 0.78rem;
  color: #9dffc0;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(57, 255, 136, 0.08);
  border: 1px solid rgba(57, 255, 136, 0.2);
  line-height: 1.3;
}
.ppt-medio-simple,
.ppt-ms-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ppt-ms-level label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.ppt-ms-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ppt-ms-row > label,
.ppt-ms-row > .ppt-ms-field {
  flex: 1 1 auto;
  min-width: 0;
}
.ppt-ms-field > label {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
}
.ppt-ms-field > label > select,
.ppt-ms-flow > label > select {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.agora-modal-body .ppt-ms-field > label {
  flex-wrap: wrap;
}
.agora-modal-body .ppt-ms-field > label > select {
  flex: 1 1 12rem;
  min-width: 12rem;
}
.ppt-ms-back {
  flex: 0 0 auto;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 8px !important;
  font-size: 0.95rem !important;
  line-height: 1;
}
.ppt-ms-sum {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.3;
  color: #9dffc0;
}
.ppt-ms-sum strong {
  color: #b8ffd0;
  font-weight: 700;
}

@media (min-width: 1101px) {
  .ppt-cuadrantes-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}
.ppt-cuadrante:not(.ppt-linea) {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
  min-height: 0;
  overflow: visible;
}
.ppt-cuadrante.ppt-linea {
  position: relative;
  overflow: visible;
}
/* Sin LED giratorio ni borde verde especial — misma card que Aloise. */
.ppt-cq-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.ppt-cq-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #9dffc0;
}
.ppt-cq-lista {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}
/* Precio en renglón Motos = mismo tamaño que Aloise (no el 0.78 del label cq). */
.ppt-linea-precio-col.ppt-cq-lista,
.ppt-linea .ppt-linea-precio-col {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #fff);
}
.ppt-linea .ppt-svc-line-precio {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #fff);
}
.ppt-cq-moto {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  position: relative;
  z-index: auto;
}
.ppt-cq-foto {
  width: 100%;
  max-height: 96px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
}
.ppt-cq-foto-carousel,
.ppt-cq-foto-empty {
  position: relative;
  margin-bottom: 4px;
  flex: 1 1 100%;
  width: 100%;
}
.ppt-cq-foto-carousel .ppt-cq-foto {
  display: block;
  margin: 0 auto;
}
.ppt-cq-foto-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ppt-cq-foto-prev { left: 6px; }
.ppt-cq-foto-next { right: 6px; }
.ppt-cq-foto-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--muted);
}
.ppt-cq-moto-empty {
  padding: 8px 6px;
  border: 1px dashed rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.06);
  width: 100%;
  min-width: 0;
  position: relative;
}
.ppt-cq-moto-empty-title {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--warn, #e6c35c);
}
.ppt-cq-moto-meta {
  margin-top: 2px;
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1 1 100%;
  min-width: 0;
}
.ppt-cq-moto-meta strong {
  font-size: 1.02rem;
  font-weight: 700;
  color: #f5f7f6;
}
.ppt-cq-moto-meta .help {
  flex: 1 1 100%;
}
.ppt-cq-galeria,
.ficha-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.ppt-cq-foto-pick {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  overflow: hidden;
  width: 56px;
  height: 56px;
}
.ppt-cq-foto-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ppt-cq-foto-pick.is-active {
  border-color: var(--accent, #c9a227);
}
.ficha-galeria .ppt-cq-foto-pick {
  width: 88px;
  height: 88px;
}
.ficha-estados-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 8px;
}
.ficha-estado-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.ficha-estado-row:hover {
  border-color: rgba(53, 230, 107, 0.28);
}
.ficha-estado-row:has(input:checked) {
  border-color: rgba(53, 230, 107, 0.45);
  background: rgba(53, 230, 107, 0.08);
}
.ficha-estado-row input {
  margin-top: 3px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: var(--green);
}
.ficha-estado-row .help {
  display: block;
  font-weight: 400;
  margin: 1px 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
}
.ficha-foto-carrusel {
  display: grid;
  grid-template-columns: 40px minmax(160px, 220px) 40px;
  align-items: center;
  justify-content: start;
  gap: 8px;
  max-width: 320px;
  margin: 4px 0 8px;
}
.ficha-foto-nav {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
}
.ficha-foto-sq {
  width: 220px;
  height: 220px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  cursor: default;
}
.ficha-foto-sq img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 719px) {
  .ficha-foto-carrusel {
    grid-template-columns: 40px 1fr 40px;
    max-width: 100%;
  }
  .ficha-foto-sq {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
.ppt-cq-extras-wrap {
  margin-bottom: 10px;
  position: relative;
  z-index: auto;
}
.ppt-cq-extra-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.ppt-porciones-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  position: relative;
  z-index: 1;
}
.ppt-cq-porciones,
.ppt-porcion,
.ppt-opcion {
  position: relative;
  z-index: 1;
}
.ppt-porcion {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  background: rgba(0,0,0,0.22);
}
.ppt-porcion-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}
/* Porción = 1 renglón: título · Seña · valor · hint · acciones (derecha). */
.ppt-porcion-head--compact {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 4px;
  min-width: 0;
}
.ppt-porcion-head--compact > strong,
.ppt-porcion-head--compact > .chk,
.ppt-porcion-head--compact > .ppt-es-sena {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ppt-porcion-head--compact .ppt-porcion-valor,
.ppt-porcion-head--compact .alo-porcion-valor {
  width: 118px;
  max-width: 140px;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.ppt-porcion-head--compact .ppt-porcion-hint,
.ppt-porcion-head--compact .alo-porcion-hint {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0 !important;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--muted, #9aa3ad);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.ppt-porcion-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: 0 0 auto;
}
.ppt-porcion-modo {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin-left: 0;
}
.ppt-porcion-valor-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 6px;
}
.ppt-porcion-valor {
  width: 100%;
  max-width: 160px;
  flex: 0 0 auto;
}
.ppt-porcion-hint {
  display: block;
  width: 100%;
  margin: 0 !important;
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: normal;
  writing-mode: horizontal-tb;
}
/* Opción = 1 renglón: label · wizard (↩ + Promo + select) · Quitar. */
.ppt-opciones {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ppt-opcion,
.ppt-opcion--compact {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}
.ppt-opcion--compact {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px 8px;
  padding: 4px 6px !important;
  margin-bottom: 4px;
  min-width: 0;
}
.ppt-opcion--compact .ppt-opcion-label,
.ppt-opcion--compact .ppt-opcion-win {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.82rem;
  white-space: nowrap;
  margin: 0;
}
.ppt-opcion--compact .ppt-ms-host,
.ppt-opcion--compact .medio-wizard {
  flex: 1 1 0% !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0;
  display: flex;
  align-items: stretch;
  align-self: stretch;
}
.ppt-opcion--compact .ppt-ms-flow {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.ppt-opcion--compact .ppt-ms-row {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.ppt-opcion--compact .ppt-ms-row > .ppt-ms-field,
.ppt-opcion--compact .ppt-ms-flow > label {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #9aa3ad);
  font-weight: 600;
  white-space: nowrap;
}
.ppt-opcion--compact .ppt-ms-flow > label > select,
.ppt-opcion--compact .ppt-ms-row .ppt-ms-field select,
.ppt-opcion--compact .ppt-ms-field .agora-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
}
.ppt-ms-capital {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  flex: 0 0 auto;
  min-width: 9.5rem;
  max-width: 17rem;
  line-height: 1.05;
}
.ppt-ms-capital strong {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ppt-ms-capital span {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted, #9aa3ad);
  white-space: normal;
  line-height: 1.2;
}
/* Importe de cada cuota (financiera): casilla con ancho propio, capital al lado y aviso abajo; nada se pisa */
.ppt-opcion--compact .ppt-ms-row > .ppt-ms-field.ppt-ms-cuota,
.ppt-ms-field.ppt-ms-cuota {
  flex-wrap: wrap;
  row-gap: 4px;
}
.ppt-ms-cuota > label {
  flex: 0 0 auto;
}
.ppt-opcion--compact .ppt-ms-cuota > label > .agora-input,
.ppt-ms-cuota > label > .agora-input {
  flex: 0 0 8.5rem;
  width: 8.5rem;
  min-width: 8.5rem;
}
.ppt-ms-cuota > .ppt-ms-capital {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: none;
}
.ppt-ms-cuota > .ppt-ms-warn {
  flex: 0 0 100%;
  white-space: normal;
  margin: 2px 0 0 !important;
}
.ppt-opcion--compact .ppt-ms-done {
  width: 100% !important;
  flex: 1 1 0% !important;
  max-width: none !important;
  min-width: 0 !important;
  align-self: stretch;
  box-sizing: border-box;
}
.ppt-opcion--compact .alo-rm-opcion,
.ppt-opcion--compact .ppt-rm-opcion {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 0;
}
.ope-save-state {
  margin-left: 12px;
  font-size: 13px;
  color: #9dffc0;
  align-self: center;
}
.ope-save-state.is-busy,
.ope-save-state.is-dirty {
  color: #e6b35a;
}
.ppt-dirty-ask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ppt-dirty-ask-box {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  max-width: 440px;
}
.ppt-dirty-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.ppt-cq-blanquear-desk {
  margin-left: auto;
}
.ppt-modo.is-active {
  border-color: #39ff88;
  color: #39ff88;
}
.ppt-cq-remanente.is-ok,
#alo-ppt-porciones-rem.is-ok { color: #9dffc0; }
.ppt-cq-remanente.is-bad,
#alo-ppt-porciones-rem.is-bad { color: #ffb4b4; }
.ppt-opcion {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
  background: rgba(0,0,0,0.2);
}
.ppt-opcion-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.ppt-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ppt-cq-carousel-bar {
  display: none;
}

#ppt-cq-blanquear-activo {
  display: none;
}

@media (min-width: 721px) {
  .ppt-cq-blanquear-desk {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  /* —— Densidad móvil: contenido = escala chrome; header NO se toca —— */
  .app-main {
    font-size: 12px;
    line-height: 1.3;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .app-main .panel,
  .app-main .view-panel,
  .app-main .hero,
  .app-main label,
  .app-main .field-label,
  .app-main .medios-field,
  .app-main .cotizacion-row,
  .app-main .cotizacion-medio,
  .app-main .doc-row,
  .app-main .data-table,
  .app-main .btn-primary,
  .app-main .btn-ghost,
  .app-main .link-btn,
  .app-main .help,
  .app-main .chk,
  .app-main .attach-block,
  .app-main .medio-wizard,
  .app-main .ppt-form,
  .app-main .form-grid {
    font-size: inherit;
  }

  #view-motos .hero,
  #view-moto-detail .hero,
  #view-catalogo .hero,
  .view-panel > .hero {
    padding: 8px 0 6px;
  }

  #view-motos .hero h1,
  .view-panel > .hero h1,
  .app-main .hero h1 {
    font-size: 13px;
    margin: 0 0 2px;
  }

  #view-motos .hero p,
  .view-panel > .hero p {
    font-size: 10px;
    display: none;
  }

  #view-motos .hero-actions,
  .view-panel > .hero .hero-actions {
    margin-top: 4px;
  }

  #view-motos .hero-actions .btn-primary,
  .view-panel > .hero .btn-primary {
    font-size: 11px;
    min-height: 32px;
    padding: 6px 12px;
  }

  #ppt-form-panel {
    margin-top: 4px;
  }

  #ppt-form-panel.panel {
    padding: 8px;
  }

  #ppt-form-panel h2 {
    font-size: 13px;
    margin: 0 0 4px;
  }

  body {
    line-height: 1.3;
  }

  .app-main .panel {
    padding: 8px;
    margin-bottom: 8px;
  }

  .app-main .panel h2,
  .app-main .panel h3,
  .app-main h2,
  .app-main h3 {
    font-size: 12px;
    margin: 0 0 4px;
  }

  .app-main .help {
    font-size: 10px;
    line-height: 1.25;
    margin: 0 0 4px;
  }

  .app-main label,
  .app-main .field-label,
  .app-main .medios-field {
    font-size: 10px;
    gap: 2px;
  }

  /* Placeholders / valores: misma escala que nav (no 16px anti-iOS) */
  .app-main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .app-main select,
  .app-main textarea,
  .app-main .agora-input {
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 12px !important;
    min-height: 30px;
    line-height: 1.25;
  }

  .app-main select,
  .app-main select.agora-input {
    padding-right: 28px !important;
    background-position: right 8px center !important;
  }

  .app-main ::placeholder {
    font-size: 11px;
    opacity: 0.65;
  }

  .form-grid,
  .ppt-persona-fields,
  .medios-fields {
    gap: 6px 8px;
  }

  /* PPT cliente: 2 cols Local|DNI · Apellido|Nombre · Celular full */
  .ppt-persona-fields {
    grid-template-columns: 1fr 1fr !important;
  }

  .ppt-persona-fields .medios-field-full {
    grid-column: 1 / -1;
  }

  .ppt-form {
    gap: 8px;
  }

  .ppt-form .ppt-block > .help {
    display: none;
  }

  .ppt-form .ppt-block {
    padding: 8px;
  }

  .ppt-form .ppt-block h3 {
    font-size: 11px;
    margin: 0 0 4px;
  }

  .ppt-form .medios-field {
    gap: 2px;
    font-size: 10px;
  }

  .ppt-form .field-hint {
    display: none;
  }

  .ppt-motos-head {
    margin-bottom: 4px;
    gap: 4px;
    align-items: center;
  }

  .ppt-motos-head h3 {
    font-size: 11px;
    margin: 0;
  }

  .ppt-cq-help-desk {
    display: none;
  }

  .ppt-cq-blanquear-desk {
    display: none !important;
  }

  .ppt-cq-carousel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 6px;
    padding: 2px 0 6px;
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(3, 4, 3, 0.98) 75%, transparent);
  }

  #ppt-cq-blanquear-activo {
    display: inline-flex;
  }

  .ppt-cq-indicator {
    font-size: 11px;
    font-weight: 700;
    color: var(--green-soft);
    font-variant-numeric: tabular-nums;
    flex: 1;
    text-align: center;
  }

  .ppt-cq-carousel-bar .btn-ghost {
    min-width: 36px;
    min-height: 30px;
    padding: 3px 6px;
    font-size: 11px;
  }

  .ppt-cuadrantes-grid {
    display: block;
    gap: 0;
  }

  .ppt-cuadrante {
    display: none;
    padding: 6px;
    min-height: 0;
    border-radius: 8px;
  }

  .ppt-cuadrante.is-carousel-active {
    display: block;
  }

  .ppt-cq-head {
    margin-bottom: 4px;
    gap: 4px;
    font-size: 11px;
  }

  .ppt-porcion {
    padding: 6px;
    margin-bottom: 6px;
  }

  .ppt-porcion-head {
    margin-bottom: 4px;
    gap: 6px;
  }

  .ppt-porcion-head strong {
    font-size: 11px;
  }

  .ppt-porcion-modo {
    margin-left: 0;
  }

  .ppt-porcion-valor-row {
    gap: 4px;
  }

  .ppt-porcion-valor {
    width: 100%;
    max-width: 140px;
    font-size: 12px !important;
  }

  .ppt-porcion-hint {
    font-size: 10px;
  }

  .medio-wizard {
    gap: 4px;
  }

  .medio-wizard .wizard-step {
    gap: 2px;
    font-size: 10px;
  }

  .unidad-stack {
    gap: 4px;
    max-width: none;
  }

  .unidad-field {
    font-size: 10px;
    gap: 2px;
  }

  .unidad-field .agora-input {
    min-height: 30px;
    font-size: 12px !important;
  }

  .cobro-form {
    max-width: none;
    gap: 6px;
  }

  .app-main .btn-primary,
  .app-main .btn-ghost,
  .app-main .btn-sm {
    font-size: 11px;
    min-height: 32px;
    padding: 6px 10px;
  }

  .detail-back-bar {
    padding: 4px 0 2px;
  }

  .ppt-medio-simple label {
    font-size: 10px;
  }

  .ppt-medio-simple .agora-input,
  .ppt-medio-simple select {
    min-height: 30px;
    font-size: 12px !important;
  }

  .producto-suggest {
    max-height: 160px;
  }

  .ppt-cq-moto .producto-suggest,
  .ppt-cq-extras-wrap .producto-suggest {
    max-height: 200px;
    box-shadow: none;
  }

  .doc-row {
    padding: 6px;
    gap: 6px;
  }

  .oms-motos-panel .oms-filters.oms-filters--row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
  }

  .oms-motos-panel .oms-filters label {
    font-size: 10px;
  }

  .oms-motos-panel .oms-filters .agora-input {
    font-size: 12px !important;
    padding: 5px 8px;
    min-height: 30px;
  }

  .app-main .cotizacion-row,
  .app-main .cotizacion-medio,
  .app-main .data-table,
  .app-main .doc-row,
  .app-main .doc-fase {
    font-size: 11px;
  }

  .app-main .cotizacion-row strong,
  .app-main .plan-porcion-importe {
    font-size: 12px !important;
  }

  .app-main .plan-porcion-title {
    font-size: 11px;
  }

  .app-main .plan-porcion-actions .link-btn {
    font-size: 10px;
  }

  .app-main .data-table th,
  .app-main .data-table td {
    font-size: 10px;
    padding: 4px 6px;
  }

  /* Catálogo: filtros más bajos */
  #view-catalogo .panel,
  #view-precios .panel {
    padding: 8px;
  }
}


/* PPT porciones × opciones + catálogo filtros */
.ppt-porciones-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ppt-porciones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ppt-porcion {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.ppt-porcion-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ppt-porcion-monto-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.ppt-porcion-monto {
  width: 140px;
}
.ppt-opcion {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.25);
}
.ppt-opcion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.oms-prod-pop-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.oms-prod-pop-item:last-child {
  border-bottom: 0;
}
.oms-prod-pop-item img,
.oms-prod-pop-item .ppt-linea-foto {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: #111;
}
.oms-prod-pop-meta {
  min-width: 0;
}
.oms-prod-pop-meta strong {
  display: block;
  line-height: 1.25;
}
.oms-prod-pop-saldos {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted, #bbb);
  line-height: 1.35;
}
.oms-prod-pop-precio {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.catalogo-filter-row th {
  padding: 4px 6px;
  vertical-align: middle;
}
.catalogo-filter-row .agora-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  font-size: 0.8rem;
}
.th-sort {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 1em;
  line-height: 1;
}
.th-sort::after {
  content: "↕";
  opacity: 0.7;
}
.th-sort.is-asc::after { content: "↓"; opacity: 1; color: var(--accent, #35e66b); }
.th-sort.is-desc::after { content: "↑"; opacity: 1; color: var(--accent, #35e66b); }
.catalogo-precio-pat {
  font-weight: 600;
  color: #c8f5d8;
}
@media (max-width: 720px) {
  .ppt-porcion-monto-wrap {
    margin-left: 0;
    width: 100%;
  }
  .ppt-porcion-monto {
    width: 100%;
  }
}

.agora-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10050;
  min-width: 180px;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(20, 80, 50, 0.95);
  border: 1px solid rgba(120, 220, 160, 0.45);
  color: #e8fff0;
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.agora-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.agora-toast--err {
  background: rgba(90, 30, 30, 0.95);
  border-color: rgba(240, 120, 120, 0.5);
  color: #ffe8e8;
  user-select: text;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.agora-toast-msg {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}
.agora-toast-copy {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffe8e8;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 180, 180, 0.35);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.persona-match-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}
.persona-match-banner--warn {
  border-color: rgba(240, 180, 80, 0.55);
}
.persona-match-banner--decide p {
  margin: 0 0 6px;
}
.persona-decide-fichas {
  margin: 0 0 6px;
  padding-left: 18px;
}
.persona-decide-fichas li {
  margin: 2px 0;
}
.persona-decide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.persona-decide-op {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.persona-decide-op > .btn-sm {
  flex: 0 0 auto;
}
.persona-decide-op > .help {
  flex: 1 1 260px;
  margin: 0;
}
.persona-decide-mover {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 8px;
}
.persona-match-banner--ok {
  border-color: rgba(100, 200, 140, 0.45);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.persona-match-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.persona-match-chip {
  display: block;
  margin: 6px 0;
}
.persona-agenda-list {
  margin: 0 0 10px;
  padding-left: 1.1rem;
}
.persona-agenda-list li {
  margin: 4px 0;
}
.crm-agenda-block {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.crm-agenda-block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.ppt-persona-conflicto .medios-field {
  margin-top: 10px;
}

.ppt-motos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.ppt-motos-head h3 {
  margin: 0;
}
.ppt-motos-head .help {
  flex: 1;
  min-width: 180px;
}

/* —— OPE ficha 0.8.59: split + stream + adjunto —— */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(53, 230, 107, 0.55);
  background: rgba(0, 0, 0, 0.55);
  color: #b8f5c8;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.12), 0 0 12px rgba(53, 230, 107, 0.08);
}
.btn-accent:hover {
  border-color: rgba(53, 230, 107, 0.85);
  color: #d4ffe0;
  box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.25), 0 0 16px rgba(53, 230, 107, 0.18);
}
.btn-accent.btn-sm {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.75rem;
}

.ope-carousel-nav {
  display: none;
  gap: 6px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.ope-carousel-nav[hidden] {
  display: none !important;
}
.ope-car-dot {
  flex: 1;
  min-width: 64px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
#fin-sol-carousel-nav .ope-car-dot,
#fin-pre-carousel-nav .ope-car-dot {
  flex: 0 0 auto;
  min-width: 0;
  padding: 6px 12px;
}
.ope-car-dot.is-active {
  border-color: rgba(53, 230, 107, 0.5);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.2);
}

.ope-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.ope-hero-full {
  width: 100%;
  margin-bottom: 6px;
}
.ope-hero-bar {
  /* Misma grilla 50/50 + gap que .ope-layout-4q → Cliente alinea con Obs */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  width: 100%;
}
.ope-hero-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: flex-start;
  overflow: visible;
}
.ope-hero-code {
  min-width: 0;
}
.ope-hero-code h1 {
  margin: 0 0 2px;
  word-break: break-word;
  font-size: clamp(1.18rem, 1.75vw, 1.42rem);
  line-height: 1.2;
}
.ope-hero-code p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
/* Alarmas bajo el título — fila horizontal, sin cajita */
.ope-hero-alarms {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 12px;
  justify-content: flex-start;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.ope-hero-alarms .ope-flag {
  width: auto;
  margin: 0;
  font-size: 0.9rem;
  gap: 7px;
  color: var(--text);
  font-weight: 600;
}
.ope-hero-alarms .ope-flag-estado {
  gap: 8px;
}
#view-aloise-ope .ope-hero-alarms {
  flex-wrap: wrap;
  row-gap: 8px;
}
#view-aloise-ope .ope-hero-estado-row,
#view-aloise-ope .ope-hero-luces {
  display: contents;
}
.ope-hero-alarms .ope-estado-select {
  min-width: 8.5rem;
  max-width: 12rem;
  width: auto;
  flex: 0 1 auto;
  min-height: 34px !important;
  padding: 4px 10px !important;
  font-size: 0.84rem !important;
}
.ope-hero-cliente-slot {
  min-width: 0;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.ope-hero-cliente {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
  padding: 8px 10px !important;
  overflow: visible;
  max-height: none;
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.ope-hero-cliente.ope-card,
#moto-detail-cliente.ope-hero-cliente {
  padding: 8px 10px !important;
  margin: 0 !important;
}
.ope-hero-alarms .ope-status-light {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.ope-hero-cliente h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
}
.ope-cli-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  height: 100%;
}
#view-aloise-ope .ope-cli-compact > strong {
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 700;
}
@media (max-width: 899px) {
  #view-aloise-ope .ope-cli-compact > strong {
    font-size: 1.05rem;
  }
}
.ope-part-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ope-part-idx {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  min-width: 2.2rem;
  text-align: center;
}
.ope-part-tildes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}
.ope-part-chk {
  font-size: 0.72rem !important;
  color: var(--muted) !important;
  font-weight: 600 !important;
  white-space: normal;
}
.ope-part-chk input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
}
.ope-dom-fact {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 2px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(230, 190, 70, 0.95);
}
.ope-dom-fact.is-ok {
  color: var(--muted);
}
.ope-dom-fact .ope-status-light {
  margin: 0;
}
.ope-dom-fact .ope-dom-fact-ir {
  background: none;
  border: 0;
  padding: 0 0 0 4px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--green-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ope-dom-fact .ope-dom-fact-ir:hover {
  color: var(--green, #35e66b);
}
.ope-part-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.ope-part-datos {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ope-part-hits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.ope-part-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(230, 190, 70, 0.95);
  font-weight: 600;
}
.ope-part-hint.is-ok {
  color: var(--muted);
  font-weight: 500;
}
.ope-part-btn-warn {
  border-color: rgba(230, 190, 70, 0.55) !important;
}
.ope-part-actions .ope-status-light {
  width: 8px;
  height: 8px;
  margin-right: 4px;
  vertical-align: middle;
}

.ope-cli-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.ope-cli-ver-ficha {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.ope-cli-ver-ficha:hover {
  color: var(--accent, #6ecf8e);
}
.ope-cli-dni-line {
  margin: 0 !important;
  font-size: 0.74rem !important;
  line-height: 1.2 !important;
}
.ope-part-nav-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.ope-part-nav-inline .btn-sm {
  min-width: 28px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
}
.ope-cli-name-line {
  margin: 0 0 4px;
  font-size: 1.45rem;
  line-height: 1.22;
  color: #f8faf9;
  white-space: normal;
  word-break: break-word;
}
.ope-cli-name-line strong {
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f8faf9;
  font-size: inherit;
}
#moto-detail-cliente.ope-hero-cliente {
  padding: 14px 16px !important;
}
#moto-detail-cliente .ope-part-card.ope-cli-compact {
  gap: 10px;
}
#moto-detail-cliente .ope-cli-identidad,
#fin-pre-part-slot .ope-cli-identidad {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  width: 100%;
  margin: 0;
  font-size: 1.74rem;
  line-height: 1.25;
  font-weight: 700;
  color: #f8faf9;
}
#moto-detail-cliente .ope-cli-quien,
#fin-pre-part-slot .ope-cli-quien {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
}
#moto-detail-cliente .ope-cli-quien > .tit-pill,
#fin-pre-part-slot .ope-cli-quien > .tit-pill {
  align-self: center;
}
#moto-detail-cliente .ope-cli-quien strong,
#moto-detail-cliente .ope-cli-rol,
#fin-pre-part-slot .ope-cli-quien strong,
#fin-pre-part-slot .ope-cli-rol {
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f8faf9;
}
#moto-detail-cliente .ope-cli-rol-dot,
#fin-pre-part-slot .ope-cli-rol-dot {
  margin: 0 0.28em;
  font-weight: 700;
}
#moto-detail-cliente .ope-cli-identidad .ope-status-light,
#fin-pre-part-slot .ope-cli-identidad .ope-status-light {
  width: 12px;
  height: 12px;
}
#moto-detail-cliente .ope-cli-identidad > .agora-corner,
#fin-pre-part-slot .ope-cli-identidad > .agora-corner {
  margin-left: auto;
  padding-left: 18px;
}
@media (max-width: 720px) {
  #moto-detail-cliente .ope-cli-quien,
  #fin-pre-part-slot .ope-cli-quien {
    display: contents;
  }
  #moto-detail-cliente .ope-cli-identidad,
  #fin-pre-part-slot .ope-cli-identidad {
    font-size: 1.45rem;
    row-gap: 2px;
  }
  #moto-detail-cliente .ope-cli-rol,
  #fin-pre-part-slot .ope-cli-rol {
    flex: 1 0 100%;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted, #9aa89f);
    line-height: 1.3;
    padding-left: 22px;
  }
  #moto-detail-cliente .ope-cli-rol-dot,
  #fin-pre-part-slot .ope-cli-rol-dot {
    display: none;
  }
}
#moto-detail-cliente .ope-cli-dni-line,
#moto-detail-cliente .ope-cli-cel {
  font-size: 0.9rem !important;
}
.ope-cli-dni {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}
.ope-cli-cel {
  margin: 0 !important;
  font-size: 0.74rem !important;
  line-height: 1.25 !important;
}
button.ope-cli-cel {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent, #b7d7c4);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
button.ope-cli-cel:hover {
  color: var(--text);
}
.ope-cli-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.ope-cli-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 2px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
}
.ope-cli-meta dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}
.ope-cli-meta dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}
.ope-part-tildes {
  margin-top: 2px;
  gap: 2px;
}
.ope-part-actions {
  margin-top: 2px;
  gap: 4px;
}
.ope-part-actions .btn-sm {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 0.7rem;
}
.ope-hero-cliente .ope-cli-grid {
  display: none;
}
.ope-hero-cliente p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.ope-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
}
.ope-hero-row h1 {
  margin: 0 0 4px;
  word-break: break-word;
}
.ope-hero-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.ope-hero-row .btn-accent,
.ope-hero-actions .btn-ghost,
.ope-hero-actions .btn-accent {
  align-self: center;
}
.ope-hero-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  align-content: center;
  margin: 0;
}
.btn-ope-historial-mobile-only {
  display: none !important;
}
.oms-filter-row th {
  padding: 4px 6px 8px;
  vertical-align: middle;
}
.oms-filter-row .agora-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  font-size: 0.8rem;
  min-height: 30px;
}
.oms-grilla th.oms-th-sort .th-sort {
  margin-left: 2px;
}
.oms-grilla th.oms-th-sort.is-sorted::after {
  content: none;
}
.ope-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.2;
}
.ope-flag-estado {
  margin: 0;
  gap: 8px;
}
.ope-estado-select {
  min-height: 32px !important;
  padding: 4px 8px !important;
  font-size: 0.78rem !important;
  width: auto;
  min-width: 8.5rem;
  max-width: 11rem;
}
.ope-cobro-sin-confirm {
  margin: 0 0 8px !important;
  text-align: left;
}
.ope-status-light.is-bad {
  background: rgba(230, 80, 80, 0.95);
  box-shadow: 0 0 0 2px rgba(230, 80, 80, 0.22), 0 0 10px rgba(230, 80, 80, 0.4);
  animation: none;
}
.ope-status-light.is-orange {
  background: rgba(240, 140, 50, 0.95);
  box-shadow: 0 0 0 2px rgba(240, 140, 50, 0.22), 0 0 10px rgba(240, 140, 50, 0.4);
  animation: none;
}
.ope-status-light.is-gray {
  background: rgba(140, 140, 140, 0.95);
  box-shadow: 0 0 0 2px rgba(140, 140, 140, 0.2);
  animation: none;
}
/* Ficha OPE: 4 cuadrantes — altura al contenido; Obs scrollea adentro
   TL Moto | TR Observaciones
   BL Papeles|Recibos | BR Cobros
   (Cliente + alarmas viven en el header) */
.ope-layout,
.ope-layout-4q {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  align-items: stretch;
  height: auto;
  min-height: 0;
  max-height: none;
}
.ope-q {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
}
.ope-q-tl {
  grid-column: 1;
  grid-row: 1;
  gap: 14px;
  height: auto;
  overflow: visible;
}
.ope-q-tl #moto-detail-lineas {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  overflow: visible;
}
.ope-q-tl #moto-detail-lineas > .ope-card,
.ope-q-tl #moto-detail-lineas > section {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
}
.ope-q-tr {
  grid-column: 2;
  grid-row: 1;
  gap: 0;
  overflow: hidden;
  min-height: 0;
  position: relative;
  /* No aporta altura de contenido: la fila la marca Moto; Obs llena y scrollea */
  align-self: stretch;
}
.ope-q-tr > #moto-obs-panel {
  position: absolute;
  inset: 0;
  height: auto !important;
  max-height: none;
  width: auto;
}
.ope-q-bl {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: auto;
  overflow: visible;
}
.ope-q-br {
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 0;
}
.ope-docs-pair {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-items: start;
  min-height: 0;
  height: auto;
  box-sizing: border-box;
  overflow: visible;
}
.ope-docs-pair > .ope-slide {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.ope-docs-pair > .ope-slide h2 {
  margin: 0 0 4px;
}
.ope-q-tl > .ope-card,
.ope-q-tl > #moto-detail-cliente.ope-card {
  flex: 0 0 auto;
}
.ope-q-tr > #moto-obs-panel,
.ope-q-br > #moto-cobro-side {
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.ope-main {
  display: contents;
}
.ope-docs-row {
  /* legacy: no romper el cuadrante bl */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ope-slide-cobros-mobile,
.ope-slide-obs-mobile,
.ope-slide-cliente-mobile {
  display: none !important;
}
.ope-side {
  position: static;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: stretch;
}
#moto-cobro-side {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: auto;
}
#moto-obs-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
#moto-obs-panel .ope-stream-filters,
#moto-obs-panel .ope-stream-compose,
#moto-obs-panel .ope-obs-card-title {
  flex-shrink: 0;
}
#moto-obs-panel .ope-stream-list,
#moto-obs-list.ope-stream-list,
#moto-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  margin-top: 6px;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}
#moto-cobro-side .ope-cobro-acto {
  flex: 1 1 auto;
}
#moto-cobro-side .ope-cobro-resumen {
  flex-shrink: 0;
}
.ope-cobro-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ope-cobro-head h2 {
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ope-cobro-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ope-cobro-status-msg {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}
.ope-btn-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.ope-type-btn {
  display: grid;
  grid-template-columns: 12px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 3px;
  align-items: start;
  text-align: left;
  width: 100%;
  padding: 14px 14px;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ope-type-btn .ope-status-light {
  grid-row: 1 / span 2;
  margin-top: 4px;
}
.ope-type-btn-label {
  font-size: 0.92rem;
  font-weight: 650;
}
.ope-type-btn-sub {
  font-size: 0.78rem;
  color: var(--muted);
}
.ope-type-btn:hover {
  border-color: rgba(53, 230, 107, 0.35);
}
.ope-type-btn.is-done {
  border-color: rgba(53, 230, 107, 0.28);
}
.ope-type-btn.is-off,
.btn-primary.is-off:disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--muted);
  pointer-events: none;
}
.ope-type-wrap {
  display: block;
  cursor: help;
}
.ope-type-btn.is-off:hover {
  border-color: var(--line);
}
.ope-asociados {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(53, 230, 107, 0.18);
  background: rgba(53, 230, 107, 0.05);
}
.ope-asociados-title {
  margin: 0 0 6px !important;
  font-weight: 650;
  color: var(--text);
}
.ope-asociados ul {
  margin: 0;
  padding: 0 0 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ope-asociados li {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}
.ope-asociado-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #35e66b;
  margin-right: 4px;
}
.ope-unidad-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ope-unidad-head h2 {
  margin: 0 !important;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}
.ope-ver-producto {
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
}
.ope-ver-producto.is-off {
  opacity: 0.55;
  pointer-events: none;
  cursor: default;
}
.ope-ultimo-estado {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.ope-ultimo-estado strong {
  color: var(--text);
  font-weight: 650;
}
.ope-clock {
  opacity: 0.85;
}
.ope-faltantes {
  margin: 0 0 8px !important;
}
.ope-popup-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ope-part-quien {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.ope-part-quien-rol {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ope-part-quien strong {
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  color: #f4f7f5;
  letter-spacing: 0.01em;
  word-break: break-word;
}
.ope-part-leyenda {
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}
.campo-req,
.campo-opc {
  font-style: normal;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  margin-left: 4px;
}
.campo-req { color: rgba(230, 190, 90, 0.88); }
.campo-opc { color: var(--muted); opacity: 0.75; }
.ope-legajo-fields { gap: 10px 12px; }
.ope-legajo-fields .chk {
  white-space: normal;
  align-self: end;
  min-height: 38px;
}
.ope-popup-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.9;
}
.ope-popup-alert {
  margin: 0;
  color: rgba(240, 200, 120, 0.95);
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0.95;
}
.ope-popup-pending {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(230, 170, 60, 0.45);
  background: rgba(230, 160, 40, 0.12);
  color: rgba(255, 210, 130, 0.98);
  font-size: 0.8rem;
  line-height: 1.4;
}
.ope-popup-pending .ope-status-light {
  flex: 0 0 auto;
  margin-top: 2px;
}
.ope-legajo-aviso {
  margin: 8px 0 10px;
}
.ope-factura-moto {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.ope-factura-moto[hidden] {
  display: none !important;
}
.ope-cuit-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
}
.ope-cuit-link {
  color: var(--text);
  text-decoration: none;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.ope-cuit-link.is-on {
  border-color: #2e8b57;
  background: rgba(46, 139, 87, 0.14);
}
.ope-popup-pending[hidden],
.ope-legajo-aviso[hidden] {
  display: none !important;
}
.ope-popup-fields {
  margin: 0;
}
.ope-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ope-popup-hist {
  margin: 0;
}
.ope-popup-hist-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}
.ope-popup-hist-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ope-popup-hist-list li {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.legajo-filas {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legajo-fila {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.35;
}
.legajo-fila .ope-status-light {
  margin-top: 0.35rem;
}
.legajo-fila.is-na {
  color: var(--muted);
  padding-left: 17px;
}
.ope-obs-wide {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}
.doc-obs-field.medios-field-full {
  width: 100%;
}
.ope-card {
  padding: 10px 12px !important;
}
.ope-card h2 {
  font-size: 0.92rem !important;
  margin: 0 0 6px !important;
}
.ope-cliente-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.ope-alarms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.alarm-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.alarm-chip.alarm-bad {
  background: rgba(220, 60, 60, 0.18);
  border-color: rgba(255, 100, 100, 0.45);
  color: #ffb4b4;
}
.alarm-chip.alarm-warn {
  background: rgba(220, 160, 40, 0.16);
  border-color: rgba(240, 190, 80, 0.4);
  color: #ffe0a0;
}
.alarm-chip.alarm-ok {
  background: rgba(53, 230, 107, 0.12);
  border-color: rgba(53, 230, 107, 0.4);
  color: #b8f5c8;
}

.is-incomplete {
  /* Sin fondo amarillo: solo la lucecita del título parpadea */
  border-color: var(--line) !important;
  box-shadow: none !important;
  background: rgba(0, 0, 0, 0.25) !important;
}
.doc-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ope-status-light {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
  cursor: help;
}
.fin-analisis-row > .ope-status-light,
.ope-flag-estado > .ope-status-light,
.ope-hero-alarms .ope-status-light {
  margin-left: 3px;
}
.oms-alarma,
.oms-estado,
.fin-estado-cell,
.fin-grid-cell,
.ope-flag {
  cursor: help;
}
.ope-status-light.is-on {
  background: rgba(255, 210, 74, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 210, 74, 0.28), 0 0 12px rgba(255, 210, 74, 0.55);
  animation: ope-amber-pulse 1.8s ease-in-out infinite;
}
#view-moto-detail .ope-status-light.is-on,
#view-aloise-ope .ope-status-light.is-on {
  animation: ope-amber-titila 0.95s ease-in-out infinite;
}
.ope-status-light.is-amber-pulse {
  background: rgba(230, 190, 70, 0.95);
  box-shadow: 0 0 0 2px rgba(230, 190, 70, 0.25), 0 0 12px rgba(230, 190, 70, 0.5);
  animation: ope-amber-pulse 1.6s ease-in-out infinite;
}
.ope-status-light.is-white {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 8px rgba(255, 255, 255, 0.35);
  animation: none;
  opacity: 1;
}
.ope-status-light.is-white-pulse {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 255, 255, 0.45);
  animation: ope-white-pulse 1.5s ease-in-out infinite;
}
.ope-status-light.is-red-pulse {
  background: rgba(230, 69, 69, 0.95);
  box-shadow: 0 0 0 2px rgba(230, 69, 69, 0.25), 0 0 12px rgba(230, 69, 69, 0.5);
  animation: ope-red-pulse 1.5s ease-in-out infinite;
}
.ope-status-light.is-ok {
  background: #1dff72;
  box-shadow: 0 0 0 3px rgba(29, 255, 114, 0.5), 0 0 18px rgba(29, 255, 114, 0.95);
  animation: none;
  opacity: 1;
}
.ope-status-light.is-brs {
  background: #4da3ff;
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.5), 0 0 18px rgba(77, 163, 255, 0.95);
  animation: none;
  opacity: 1;
}
.ope-status-light.is-ok-strong {
  background: #7dffb0;
  box-shadow: 0 0 0 4px rgba(29, 255, 114, 0.55), 0 0 22px rgba(29, 255, 114, 1);
  animation: none;
  opacity: 1;
}
.ope-status-light.is-ok-pulse {
  background: #35e66b;
  box-shadow: 0 0 0 2px rgba(53, 230, 107, 0.3), 0 0 12px rgba(53, 230, 107, 0.55);
  animation: ope-green-pulse 1.5s ease-in-out infinite;
}
.ope-status-light.is-red-fixed {
  background: rgba(230, 69, 69, 0.95);
  box-shadow: 0 0 0 2px rgba(230, 69, 69, 0.25), 0 0 8px rgba(230, 69, 69, 0.4);
  animation: none;
  opacity: 1;
}
h2 .ope-status-light {
  margin-right: 2px;
  vertical-align: middle;
}
.ope-cli-fact-warn {
  margin: 6px 0 0;
  color: #ffb4b4;
  font-size: 0.82rem;
}
.unidad-obs-field {
  display: block;
  margin-top: 8px;
  width: 100%;
}
.unidad-obs-field textarea,
.unidad-obs-field input {
  width: 100%;
  margin-top: 4px;
  min-height: 2.6rem;
  max-height: 6rem;
}
@media (min-width: 960px) {
  #view-moto-detail .unidad-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    max-width: none;
  }
  #view-moto-detail .unidad-field .agora-input {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  #view-moto-detail .unidad-obs-field input {
    margin-top: 0;
    max-height: none;
  }
  #view-moto-detail .ope-unidad-head {
    position: relative;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    padding-right: 156px;
  }
  #view-moto-detail .ope-unidad-title {
    flex: 0 1 auto;
    min-width: 0;
  }
  #view-moto-detail .ope-unidad-title h2 {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #view-moto-detail .ope-unidad-head > .ope-ver-producto {
    margin-left: 10px;
    flex: 0 0 auto;
  }
  #view-moto-detail .ope-unidad-head .agora-corner {
    position: absolute;
    top: 0;
    right: 0;
    margin-left: 0;
  }
}
.places-suggest {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
  margin: 0 0 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
}
.places-suggest-item {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.places-suggest-item:hover {
  background: rgba(53, 230, 107, 0.12);
}
.dom-geo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.dom-map-panel {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.dom-map-canvas {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}
@media (max-width: 720px) {
  .dom-map-canvas {
    height: 220px;
  }
}
@keyframes ope-amber-pulse {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 0 2px rgba(230, 190, 70, 0.12), 0 0 6px rgba(230, 190, 70, 0.2); }
  50% { opacity: 1; box-shadow: 0 0 0 3px rgba(230, 190, 70, 0.22), 0 0 14px rgba(230, 190, 70, 0.55); }
}
@keyframes ope-amber-titila {
  0%, 100% { opacity: 0.28; box-shadow: 0 0 0 1px rgba(255, 210, 74, 0.12), 0 0 3px rgba(255, 210, 74, 0.12); }
  50% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.4), 0 0 14px rgba(255, 210, 74, 0.82); }
}
.chk-pf-listo {
  position: relative;
  z-index: 0;
  border-radius: 999px;
  isolation: isolate;
}
label.chk-pf-listo {
  padding: 3px 8px;
}
.chk-pf-listo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from 0deg,
    transparent 0 312deg,
    rgba(184, 255, 208, 0.15) 332deg,
    #d8ffe8 350deg,
    #35e66b 358deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: pf-led-spin 2.6s linear infinite;
  pointer-events: none;
}
button.chk-pf-listo {
  border-color: #3ddc84;
  color: #d8ffe8;
}
@keyframes pf-led-spin {
  to { transform: rotate(360deg); }
}
.ope-nota-globo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15em;
  height: 1.15em;
  padding: 0 0.32em;
  margin-left: 6px;
  border-radius: 999px;
  background: #e6be46;
  color: #1a1408;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(230, 190, 70, 0.4);
  vertical-align: middle;
  animation: none;
}
.ope-cvn-nota {
  margin-top: 8px;
}
@keyframes ope-white-pulse {
  0%, 100% { opacity: 0.4; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 6px rgba(255, 255, 255, 0.2); }
  50% { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25), 0 0 12px rgba(255, 255, 255, 0.55); }
}
@keyframes ope-red-pulse {
  0%, 100% { opacity: 0.4; box-shadow: 0 0 0 2px rgba(230, 69, 69, 0.12), 0 0 6px rgba(230, 69, 69, 0.2); }
  50% { opacity: 1; box-shadow: 0 0 0 3px rgba(230, 69, 69, 0.25), 0 0 14px rgba(230, 69, 69, 0.55); }
}
@keyframes ope-green-pulse {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 0 2px rgba(53, 230, 107, 0.15), 0 0 6px rgba(53, 230, 107, 0.25); }
  50% { opacity: 1; box-shadow: 0 0 0 3px rgba(53, 230, 107, 0.3), 0 0 14px rgba(53, 230, 107, 0.6); }
}
@keyframes ope-green-celebrate {
  0%, 49% {
    opacity: 1;
    background: #b8ffd4;
    box-shadow: 0 0 0 5px rgba(29, 255, 114, 0.7), 0 0 26px rgba(29, 255, 114, 1);
  }
  50%, 100% {
    opacity: 0.12;
    background: #06351a;
    box-shadow: none;
  }
}
.ope-status-light.is-ok-celebrate {
  animation: ope-green-celebrate 0.14s linear 20;
}

#view-moto-detail .ope-cobro-resumen.cotizacion-box,
#view-moto-detail #moto-cobro-side .cotizacion-box,
#view-aloise-ope .ope-q-br .cotizacion-box,
#view-aloise-ope #alo-ope-cobros-m .cotizacion-box {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.28);
}
#view-moto-detail #moto-cobro-side .cotizacion-row strong,
#view-aloise-ope .ope-q-br .cotizacion-row strong,
#view-aloise-ope #alo-ope-cobros-m .cotizacion-row strong {
  color: var(--text);
}
.ope-cobro-acto {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ope-cobro-acto-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 650;
}
.ope-hist-actions {
  display: none;
}
.is-blocked {
  border-color: rgba(230, 70, 70, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(230, 70, 70, 0.35), inset 0 0 0 1px rgba(230, 70, 70, 0.2) !important;
  animation: ope-shake 0.35s ease;
}
.is-pending-flash {
  border-color: rgba(230, 170, 60, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(230, 160, 40, 0.35), inset 0 0 0 1px rgba(230, 160, 40, 0.18) !important;
}
.card-block-tip {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #ffb4b4;
}
.card-block-tip.is-amber {
  color: rgba(255, 210, 130, 0.98);
}
@keyframes ope-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.chk-done {
  font-size: 0.85rem !important;
  color: #9be7b0 !important;
  font-weight: 650;
}
.chk-done input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #35e66b;
}

.attach-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.attach-menu.is-paste-wait [data-attach-toggle] {
  outline: 2px solid #35e66b;
  outline-offset: 2px;
}
.attach-menu-item.is-paste-wait {
  background: rgba(53, 230, 107, 0.18);
}
.attach-menu-pop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #12161c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.attach-menu-item {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text);
}
.attach-menu-item:hover {
  background: rgba(53, 230, 107, 0.1);
}
button.attach-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  font: inherit;
}

.doc-obs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}
.doc-adjunto {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.ope-stream-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ope-stream-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-btn {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.chip-btn.is-active {
  border-color: rgba(53, 230, 107, 0.45);
  color: var(--text);
}
.ope-stream-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}
.ope-stream-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
  padding: 4px 2px 12px;
}
.ope-stream-item,
.ope-chat-bubble {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.ope-chat-bubble.is-nota-directa {
  background: rgba(53, 230, 107, 0.06);
  border-color: rgba(53, 230, 107, 0.18);
}
.ope-chat-bubble.is-nota-directa .ope-stream-dot {
  background: #35e66b;
  box-shadow: 0 0 0 2px rgba(53, 230, 107, 0.25);
}
.ope-chat-bubble.is-nota-directa .ope-stream-meta,
.ope-chat-bubble.is-nota-directa .ope-stream-body,
.ope-chat-bubble.is-nota-directa .ope-stream-author {
  color: #35e66b;
}
.ope-chat-bubble.is-nota-doc {
  background: rgba(255, 255, 255, 0.04);
}
.ope-chat-bubble.is-nota-doc .ope-stream-dot {
  background: #f3f5f7;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.ope-chat-bubble.is-nota-doc .ope-stream-author,
.ope-chat-bubble.is-nota-doc .ope-stream-when {
  color: #fff;
  font-weight: 700;
}
.ope-chat-bubble.is-nota-doc .ope-stream-origen {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}
.ope-chat-bubble.is-nota-doc .ope-stream-body {
  color: rgba(255, 255, 255, 0.92);
}
.ope-chat-bubble.is-accion {
  background: transparent;
  border-color: transparent;
  padding-left: 4px;
  padding-right: 4px;
}
.ope-chat-bubble.is-accion .ope-stream-dot {
  background: #6b7280;
  box-shadow: none;
  opacity: 0.7;
}
.ope-chat-bubble.is-accion .ope-stream-meta,
.ope-chat-bubble.is-accion .ope-stream-body {
  color: #8b93a7;
  opacity: 0.82;
  font-size: 0.76rem;
}
.ope-chat-bubble.is-alerta {
  background: rgba(230, 190, 70, 0.06);
  border-color: rgba(230, 190, 70, 0.18);
}
/* La compra al principio de la cronología de postventa (2/12/2026). */
.ope-chat-bubble.is-amber {
  background: rgba(230, 190, 70, 0.06);
  border-color: rgba(230, 190, 70, 0.18);
}
.ope-chat-bubble.is-amber .ope-stream-dot {
  background: #e6be46;
}
.ope-chat-inner {
  min-width: 0;
}
.ope-stream-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #e8ecef;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
  opacity: 0.9;
}
.ope-stream-meta {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 4px;
}
.ope-stream-body {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
  opacity: 0.95;
}
.ope-obs-card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.adjuntos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adjuntos-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

#view-moto-detail .doc-row {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
}
#view-moto-detail .recibo-cuad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
#view-moto-detail .recibos-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .btn-ope-historial-mobile-only {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .ope-carousel-nav {
    display: flex;
  }
  .ope-layout,
  .ope-layout-4q {
    display: block;
  }
  .ope-main,
  .ope-docs-row,
  .ope-q,
  .ope-q-bl {
    display: block;
  }
  .ope-docs-pair {
    display: block;
    border: none;
    background: transparent;
    padding: 0;
    min-height: 0;
    height: auto;
  }
  .ope-docs-pair > .ope-slide {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
  }
  .ope-q-tl,
  .ope-q-tr,
  .ope-q-bl,
  .ope-q-br {
    grid-column: auto;
    grid-row: auto;
  }
  .ope-layout > .ope-side,
  .ope-layout > .ope-q-tr {
    display: none;
  }
  .ope-layout > .ope-q-br,
  .ope-layout > #ope-q-obs,
  .ope-layout > #alo-ope-q-obs {
    display: none;
  }
  .ope-stream-host .ope-side,
  .ope-stream-host #ope-side,
  .ope-obs-host-mobile #moto-obs-panel {
    display: flex !important;
    position: static;
    max-height: none;
    height: auto;
    overflow: visible;
  }
  .ope-obs-host-mobile #moto-obs-list {
    max-height: none;
    overflow: visible;
  }
  .ope-slide-cobros-mobile.is-active,
  .ope-slide-obs-mobile.is-active,
  .ope-slide-cliente-mobile.is-active {
    display: block !important;
  }
  .ope-slide:not(.is-active) {
    display: none !important;
  }
  #view-moto-detail #moto-detail-header {
    padding: 6px 0 8px;
  }
  .ope-hero-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .ope-hero-left {
    width: 100%;
  }
  .ope-hero-cliente-slot {
    display: none;
  }
  .ope-hero-alarms {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 6px 10px;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
    flex-direction: unset;
    flex-wrap: unset;
  }
  .ope-hero-flags {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    padding: 0;
  }
  .ope-hero-flags .ope-flag,
  .ope-hero-alarms .ope-flag {
    width: auto;
    min-width: 0;
    white-space: nowrap;
  }
  .ope-hero-alarms .ope-flag-estado {
    grid-column: 1 / -1;
    width: 100%;
  }
  .ope-hero-alarms .ope-estado-select {
    max-width: none;
    width: auto;
    flex: 1 1 auto;
  }
  #view-aloise-ope .ope-hero-alarms .ope-flag {
    white-space: normal;
    line-height: 1.25;
  }
  #view-aloise-ope .ope-hero-estado-row,
  #view-aloise-ope .ope-hero-luces {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
  }
  #view-aloise-ope .ope-hero-estado-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  #view-aloise-ope .ope-hero-estado-row .ope-flag-estado {
    grid-column: auto;
    width: auto;
  }
  #view-aloise-ope .ope-hero-luces {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
  }
  #alo-ope-carousel {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #alo-ope-carousel .ope-car-dot {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 12px;
  }
  #view-aloise-ope .alo-ope-ln-actions .btn-ghost,
  #view-aloise-ope .alo-ope-ln-actions .btn-primary,
  #view-aloise-ope .plan-porcion-actions .btn-primary,
  #view-aloise-ope .plan-porcion-actions .btn-ghost {
    min-height: 40px;
  }
  .ope-q-tr {
    position: static;
  }
  .ope-q-tr > #moto-obs-panel {
    position: static;
    inset: auto;
    height: auto !important;
  }
  .ope-hero-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ope-hero-actions {
    justify-content: stretch;
  }
  .ope-hero-actions .btn-accent,
  .ope-hero-actions .btn-ghost {
    flex: 1 1 auto;
    min-height: 40px;
  }
  .ope-hero-row .btn-accent {
    width: 100%;
    min-height: 40px;
  }
  .ope-layout,
  .ope-layout-4q {
    height: auto;
    min-height: 0;
    max-height: none;
  }
}





/* Cambiar tramo OPE */
.plan-edit-importe { display: block; margin: 0 0 10px; font-size: 0.85rem; color: var(--muted); }
.plan-edit-importe .agora-input { margin-top: 4px; width: 100%; max-width: 280px; }
.plan-edit-sena { margin: 8px 0 0; display: inline-flex; }
.plan-edit-sena-block { margin-top: 12px; }
.plan-edit-actual { margin: 0 0 10px; font-size: 0.92rem; }
.plan-porcion-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-porcion-info-disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
}
.plan-porcion-ids {
  margin: 8px 0 4px;
  width: 100%;
}
.plan-id-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 0;
}
.plan-porcion-ids.plan-id-fields,
.plan-id-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  align-items: start;
  width: 100%;
}
.plan-id-field .agora-input,
.plan-id-input {
  width: 100%;
  max-width: none;
  min-height: 38px;
  font-size: 0.92rem !important;
  letter-spacing: 0.02em;
  text-align: left;
}
@media (max-width: 899px) {
  .plan-porcion-ids.plan-id-fields,
  .plan-id-fields {
    grid-template-columns: 1fr;
  }
}
.plan-porcion-faltan {
  margin: 4px 0 8px;
  font-size: 0.82rem;
}

/* —— Financiera (solicitudes crédito) —— */
#view-financiera .oms-filters {
  margin-bottom: 0.75rem;
}
#fin-grilla tbody tr.fin-row {
  cursor: pointer;
}
#fin-grilla tbody tr.fin-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.fin-ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.fin-ficha-grid .fin-q {
  min-width: 0;
}
.fin-detail-hero {
  margin-bottom: 0;
}
.fin-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.fin-alertas-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.fin-consulta-row,
.fin-informe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.fin-consulta-row:last-child,
.fin-informe-row:last-child {
  border-bottom: none;
}
.fin-consulta-name {
  grid-column: 1 / -1;
  font-weight: 600;
  color: var(--text);
}
.fin-veredicto-block {
  margin-top: 14px;
}
.fin-stream-list {
  max-height: 320px;
  overflow: auto;
  margin-top: 10px;
}
.fin-origen-list {
  margin-top: 8px;
}
.chip.chip-warn {
  border-color: rgba(212, 160, 64, 0.55);
  color: #e8c878;
  background: rgba(212, 160, 64, 0.12);
}
@media (max-width: 899px) {
  .fin-ficha-grid {
    grid-template-columns: 1fr;
  }
  .fin-consulta-row,
  .fin-informe-row {
    grid-template-columns: 1fr;
  }
}

.ope-layout-2q,
.ope-layout.ope-layout-2q.fin-layout-2q {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 14px;
  align-items: stretch;
  height: auto;
}
#view-financiera-detail .ope-layout .panel,
#view-financiera-detail .ope-layout .ope-card,
#view-financiera-detail .ope-layout #fin-obs-panel {
  margin: 0;
}
.fin-layout-2q > .ope-q-tl {
  grid-column: 1;
  grid-row: 1;
  height: auto;
  overflow: visible;
}
.fin-layout-2q > .ope-q-tl > .fin-persona-card,
.fin-layout-2q > .ope-q-tl > section.panel {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: auto;
  box-sizing: border-box;
}
.fin-layout-2q .ope-q-tr {
  overflow: hidden;
  position: relative;
  align-self: stretch;
  min-height: 0;
}
.fin-layout-2q .ope-q-tr > #fin-obs-panel {
  position: absolute;
  inset: 0;
  height: auto !important;
  max-height: none;
  width: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.fin-layout-2q .ope-q-tl > .fin-persona-card {
  height: 100%;
  min-height: 0;
  overflow: auto;
}
.fin-layout-2q #fin-obs-panel .ope-obs-card-title,
.fin-layout-2q #fin-obs-panel .ope-stream-filters,
.fin-layout-2q #fin-obs-panel .ope-stream-compose,
.fin-layout-2q #fin-obs-panel .help {
  flex-shrink: 0;
}
.fin-layout-2q #fin-obs-panel .ope-stream-list,
.fin-layout-2q #fin-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.fin-layout-4q {
  grid-template-rows: auto auto;
  align-items: stretch;
}
.fin-layout-4q .ope-q-tr {
  overflow: hidden;
  position: relative;
  align-self: stretch;
  min-height: 0;
}
.fin-layout-4q .ope-q-tr > #fin-obs-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.fin-layout-4q .ope-q-tl > .fin-persona-card {
  height: 100%;
  min-height: 0;
  overflow: auto;
}
.fin-layout-4q #fin-obs-panel .ope-obs-card-title,
.fin-layout-4q #fin-obs-panel .ope-stream-filters,
.fin-layout-4q #fin-obs-panel .ope-stream-compose,
.fin-layout-4q #fin-obs-panel .help {
  flex-shrink: 0;
}
.fin-layout-4q #fin-obs-panel .ope-stream-list,
.fin-layout-4q #fin-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.fin-layout-4q .ope-q-bl > .fin-consultas-card,
.fin-layout-4q .ope-q-br > .fin-informes-card {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: auto;
}

/* PRE: 3 filas (Préstamo|Obs · Validaciones|Docs · Cobranza|Chat)
   Fila 1 = alto de Préstamo; Obs no aporta altura, llena y scrollea (mismo truco Motos). */
.ope-layout.fin-layout-pre {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: stretch;
  height: auto;
}
.fin-layout-pre > .ope-q {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.fin-layout-pre > .ope-q-tl {
  grid-column: 1;
  grid-row: 1;
  height: auto;
  overflow: visible;
}
.fin-layout-pre > .ope-q-tl > .ope-card,
.fin-layout-pre > .ope-q-tl > section.panel {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: auto;
}
.fin-layout-pre > .ope-q-tr {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
  align-self: stretch;
  /* No aporta altura de contenido: la fila la marca Préstamo */
}
.fin-layout-pre > .ope-q-tr > #fin-obs-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  height: auto !important;
  max-height: none;
  width: auto;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.fin-layout-pre > .ope-q-bl > .ope-card,
.fin-layout-pre > .ope-q-br > .ope-card,
.fin-layout-pre > .fin-pre-q-r3l > .ope-card,
.fin-layout-pre > .fin-pre-q-r3r > .ope-card,
.fin-layout-pre > .ope-q-bl > section.panel,
.fin-layout-pre > .ope-q-br > section.panel,
.fin-layout-pre > .fin-pre-q-r3l > section.panel,
.fin-layout-pre > .fin-pre-q-r3r > section.panel {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: auto;
}
.fin-layout-pre #fin-obs-panel .ope-stream-filters,
.fin-layout-pre #fin-obs-panel .ope-obs-card-title,
.fin-layout-pre #fin-obs-panel .ope-stream-compose {
  flex-shrink: 0;
}
.fin-layout-pre #fin-obs-panel .ope-stream-list,
.fin-layout-pre #fin-obs-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.fin-pre-q-r3l {
  grid-column: 1;
  grid-row: 3;
}
.fin-pre-q-r3r {
  grid-column: 2;
  grid-row: 3;
}
#view-financiera-detail .ope-hero-bar {
  align-items: stretch;
}
#fin-pre-part-slot {
  min-width: 0;
}
#fin-pre-part-slot .ope-part-card {
  height: 100%;
}
.cotiz-hist-wrap {
  max-height: min(60vh, 420px);
  overflow: auto;
  margin-top: 8px;
}
.ope-part-hint .ope-status-light {
  margin-top: 3px;
  flex-shrink: 0;
}
.fin-pre-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.fin-pre-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fin-pre-tiles .ope-type-btn {
  min-height: 88px;
  align-content: start;
}
.ope-type-btn.is-incomplete {
  border-color: rgba(212, 160, 64, 0.35);
}
.ope-type-btn.is-locked {
  border-color: rgba(212, 160, 64, 0.72);
  box-shadow: inset 0 0 0 1px rgba(212, 160, 64, 0.18);
  opacity: 0.96;
}
.ope-type-btn.is-locked .ope-type-btn-sub {
  color: #e2b657;
}
.fin-item-flags {
  font-size: 0.82rem;
}
.fin-item-flags th,
.fin-item-flags td {
  vertical-align: middle;
  padding: 6px 8px;
}
@media (max-width: 720px) {
  .fin-pre-tiles {
    grid-template-columns: 1fr;
  }
}
.fin-pre-bcra p {
  margin: 0.2rem 0;
}
.fin-local-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.fin-local-lab {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  flex-shrink: 0;
}
#view-financiera-detail .fin-sol-head-row .fin-estado-kicker,
#view-financiera-detail .fin-sol-head-row .fin-local-lab {
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: var(--text);
}
#view-financiera-detail .fin-sol-head-row .ope-flag-estado {
  font-size: 0.98rem;
  color: var(--text);
  gap: 10px;
}
#view-financiera-detail .fin-sol-head-row .ope-estado-select {
  min-height: 38px !important;
  min-width: 10.5rem;
  max-width: 14rem;
  padding: 6px 12px !important;
  font-size: 0.9rem !important;
}
#view-financiera-detail .fin-local-row .lugar-pills .lugar-pill {
  font-size: 0.88rem;
  padding: 6px 16px;
  min-height: 34px;
}
.fin-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fin-card-head .medios-block-title {
  margin: 0;
  flex: 1 1 auto;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
  line-height: 1.2;
  min-height: 28px;
}
.ope-chat-bubble.is-nota-fin-origen {
  background: rgba(230, 190, 70, 0.08);
  border-color: rgba(230, 190, 70, 0.28);
}
.ope-chat-bubble.is-nota-fin-origen .ope-stream-dot {
  background: #e6be46;
  box-shadow: 0 0 0 2px rgba(230, 190, 70, 0.28);
}
.ope-chat-bubble.is-nota-fin-origen .ope-stream-meta,
.ope-chat-bubble.is-nota-fin-origen .ope-stream-body,
.ope-chat-bubble.is-nota-fin-origen .ope-stream-author {
  color: #e8c878;
}
.fin-dom-list {
  margin: 6px 0 0;
  padding-left: 1.1rem;
}
.fin-consulta-card,
.fin-informe-card {
  margin-bottom: 10px;
}
@media (max-width: 899px) {
  .fin-layout-4q,
  .fin-layout-2q,
  .fin-layout-pre {
    grid-template-rows: none;
  }
  #view-financiera-detail .ope-layout.ope-layout-2q.fin-layout-2q,
  #view-financiera-detail .ope-layout.fin-layout-pre {
    display: block !important;
  }
  #view-financiera-detail .fin-sol-slide:not(.is-active),
  #view-financiera-detail .fin-pre-slide:not(.is-active) {
    display: none !important;
  }
  #view-financiera-detail .ope-layout > .ope-q-tr.fin-sol-slide.is-active,
  #view-financiera-detail .ope-layout > .ope-q-tr.fin-pre-slide.is-active {
    display: block !important;
  }
  #view-financiera-detail .fin-sol-slide.is-active,
  #view-financiera-detail .fin-pre-slide.is-active {
    display: block !important;
  }
  #view-financiera-detail .fin-analisis-desktop,
  #view-financiera-detail .ope-hero-cliente-slot {
    display: none !important;
  }
  #view-financiera-detail .fin-sol-slide-alertas,
  #view-financiera-detail .fin-sol-slide-cliente-mobile {
    display: block;
  }
  #view-financiera-detail .fin-layout-4q .ope-q-tr > #fin-obs-panel,
  #view-financiera-detail .fin-layout-2q .ope-q-tr > #fin-obs-panel,
  #view-financiera-detail .fin-layout-pre .ope-q-tr > #fin-obs-panel {
    position: relative;
    inset: auto;
    min-height: min(70vh, 560px);
    height: min(70vh, 560px);
    max-height: none;
  }
  .fin-pre-q-r3l,
  .fin-pre-q-r3r {
    grid-column: auto;
    grid-row: auto;
  }
  #view-financiera-detail .ope-hero-bar {
    grid-template-columns: 1fr;
  }
  #view-financiera-detail .fin-sol-head-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  #view-financiera-detail .fin-sol-head-row h1 {
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 1.235rem;
  }
  #view-financiera-detail .fin-sol-head-row .ope-flag-estado,
  #view-financiera-detail .fin-local-row {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  #view-financiera-detail .fin-local-row .lugar-pills {
    flex-wrap: nowrap;
  }
  #view-financiera-detail .fin-analisis-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  #view-financiera-detail .fin-analisis-title {
    white-space: normal;
  }
  #view-financiera-detail .fin-analisis-note {
    flex: 1 1 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    padding-left: 22px;
  }
  #view-financiera-detail .fin-analisis-meta {
    grid-template-columns: 1fr 1fr;
  }
  #view-financiera-detail .fin-analisis-meta .fin-analisis-row {
    display: grid;
    flex-wrap: unset;
    align-items: start;
  }
  #view-financiera-detail .fin-analisis-meta .fin-analisis-title {
    white-space: nowrap;
  }
  #view-financiera-detail .fin-analisis-meta .fin-analisis-note {
    flex: none;
    padding-left: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #view-financiera-detail .fin-analisis-col .fin-analisis-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    align-items: start;
    flex-wrap: unset;
  }
  #view-financiera-detail .fin-analisis-col .ope-status-light {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 5px;
  }
  #view-financiera-detail .fin-analisis-col .fin-analisis-main {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    min-width: 0;
  }
  #view-financiera-detail .fin-analisis-col .fin-analisis-title {
    white-space: nowrap;
  }
  #view-financiera-detail .fin-analisis-col .fin-analisis-soc {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    flex: 1 1 auto;
  }
  #view-financiera-detail .fin-analisis-col .fin-analisis-note {
    grid-column: 2;
    flex: none;
    padding-left: 0;
    white-space: normal;
  }
}

@media (min-width: 900px) {
  #view-financiera-detail .fin-sol-slide-alertas,
  #view-financiera-detail .fin-sol-slide-cliente-mobile,
  #view-financiera-detail .fin-pre-slide-titular-mobile {
    display: none !important;
  }
  #view-financiera-detail .fin-sol-head-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
  }
}

.fin-estado-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.fin-estado-lab {
  font-size: 0.82rem;
}
.fin-origen-link {
  color: var(--green-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fin-origen-as-field {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fin-origen-as-field:hover {
  text-decoration: underline;
}
.fin-persona-dense {
  gap: 8px 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1400px) {
  .fin-persona-dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 899px) {
  .fin-persona-dense {
    grid-template-columns: 1fr;
  }
}
.fin-persona-dense label {
  font-size: 0.72rem;
}
.fin-persona-dense .agora-input {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.86rem;
}
.fin-persona-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 8px 12px;
  align-items: end;
}
.fin-persona-name-block {
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.25;
  padding-bottom: 4px;
}
.fin-persona-ids {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}
.fin-persona-ids label {
  margin: 0;
}
.fin-card-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.fin-bcra-when {
  margin: 0;
  white-space: nowrap;
  font-size: 0.72rem;
}
.fin-obs-fixed,
#view-financiera-detail textarea {
  resize: none !important;
}
.fin-otra-info-form .form-actions {
  margin-top: 6px;
  justify-content: flex-start;
}
@media (max-width: 720px) {
  .fin-persona-top {
    grid-template-columns: 1fr;
  }
}
.fin-hero-cliente {
  width: 100%;
  max-width: 100%;
}
.fin-hero-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
#view-financiera-detail .fin-hero-cliente p.fin-hero-nombre,
#view-financiera-detail .fin-hero-cliente .ope-cli-name.fin-hero-nombre {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #f8faf9;
}
#view-financiera-detail .ope-hero-cliente-slot,
#view-financiera-detail .fin-hero-cliente {
  height: 100%;
}
#view-financiera-detail .ope-hero-code .fin-sol-head-row h1 {
  font-size: clamp(1.534rem, 2.275vw, 1.846rem);
}
#view-financiera-detail .fin-sol-meta,
#view-financiera-detail .fin-abordaje {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
}
.fin-hero-dom {
  margin-top: 2px;
}
.fin-hero-cliente .ope-part-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fin-alertas-card ul {
  margin: 6px 0 0;
  padding-left: 1.1rem;
}
.fin-otorgar-resumen {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.fin-otorgar-nombre {
  margin: 0 0 4px;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #f8faf9;
}
.fin-otorgar-meta {
  margin: 0 0 8px;
}
.fin-bcra-alerta {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
}
.fin-bcra-alerta-txt {
  min-width: 0;
  flex: 1 1 auto;
}
.fin-bcra-alerta--roja {
  color: #ff9a9a;
}
.fin-bcra-alerta--ambar {
  color: #e8c878;
}
#view-financiera-detail.is-detail-shell {
  overflow: hidden;
}
#view-financiera-detail #fin-detail-header {
  position: relative;
  padding-top: 0;
}
#view-financiera-detail #fin-detail-header.hero {
  padding-top: 2px;
  padding-bottom: 8px;
  padding-left: 0;
  padding-right: 0;
}
#view-financiera-detail .ope-hero-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: stretch;
}
#view-financiera-detail .fin-hero-acl {
  margin: 4px 0 0;
  grid-column: 1 / -1;
}
@media (max-width: 899px) {
  #view-financiera-detail .ope-hero-bar {
    grid-template-columns: 1fr;
  }
}
.fin-layout-4q .ope-q-tr > #fin-obs-panel {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

/* CRM ficha desktop: Datos a la izquierda (alto del contenido).
   A la derecha: Observaciones / historial arriba, Legajo y Adjuntos abajo. */
@media (min-width: 900px) {
  #view-crm-detail #crm-detail-root {
    height: auto;
    min-height: 0;
  }
  #view-crm-detail .crm-layout-ficha {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
    grid-template-rows: auto;
    grid-template-areas: "cliente side";
    gap: 14px;
    align-items: stretch;
    justify-items: stretch;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card {
    grid-area: cliente;
  }
  #view-crm-detail .crm-layout-ficha > .crm-ficha-side {
    grid-area: side;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card {
    align-self: stretch;
    width: auto;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    box-sizing: border-box;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    overflow: visible !important;
    position: static !important;
    inset: auto !important;
    flex: unset !important;
  }
  #view-crm-detail .crm-datos-block .modal-form-grid {
    gap: 12px 16px;
  }
  #view-crm-detail .crm-datos-block h2 {
    font-size: 1.05rem;
  }
  #view-crm-detail .crm-ficha-side > #crm-obs-panel {
    flex: 1 1 auto;
    min-height: 220px;
    height: auto;
    max-height: none !important;
    overflow: hidden;
  }
  #view-crm-detail .crm-ficha-side > .crm-ficha-adjuntos {
    flex: 0 1 auto;
    max-height: 46%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  #view-crm-detail .crm-ficha-adjuntos > .crm-adjuntos-card,
  #view-crm-detail .crm-ficha-adjuntos > .crm-legajo-card {
    margin: 0 !important;
  }
}

#view-crm-detail #crm-persona-save-row,
#view-crm-detail #crm-empresa-save-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 0 2px;
  background: linear-gradient(180deg, rgba(8, 12, 10, 0), rgba(8, 12, 10, 0.96) 28%);
}
#view-crm-detail #crm-persona-save-row[hidden],
#view-crm-detail #crm-empresa-save-row[hidden] {
  display: none !important;
}
.crm-dirty-note {
  margin: 0;
  color: #e6b422;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
}
.agora-modal-save-pair {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
@keyframes crm-save-titila {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 180, 34, 0.2); }
  50% { box-shadow: 0 0 0 3px rgba(230, 180, 34, 0.7); }
}
@keyframes crm-note-titila {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}
button.crm-save-blink {
  animation: crm-save-titila 1.1s ease-in-out infinite;
}
.crm-dirty-note.crm-save-blink {
  animation: crm-note-titila 1.1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  button.crm-save-blink,
  .crm-dirty-note.crm-save-blink {
    animation: none;
  }
}

/* CRM ficha mobile: apilar; Obs con scroll propio */
@media (max-width: 899px) {
  #view-crm-detail #crm-detail-root {
    height: auto;
    min-height: 0;
  }
  #view-crm-detail .crm-layout-ficha {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    height: auto;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card,
  #view-crm-detail .crm-layout-ficha > .crm-ficha-side,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel,
  #view-crm-detail .crm-layout-ficha > .crm-ficha-adjuntos {
    grid-area: auto;
    width: 100%;
    height: auto !important;
    max-height: none;
    position: static !important;
  }
  #view-crm-detail .crm-ficha-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  #view-crm-detail .crm-ficha-side > #crm-obs-panel,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel {
    min-height: 280px !important;
    max-height: min(60vh, 480px) !important;
    overflow: hidden;
  }
  #view-crm-detail .crm-ficha-side > .crm-ficha-adjuntos {
    max-height: none;
    overflow: visible;
  }
  #view-crm #crm-list-shell .table-wrap--excel {
    height: calc(100dvh - 280px);
    max-height: calc(100dvh - 280px);
    min-height: 18rem;
  }
}

.com-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.com-subnav .nav-chip {
  min-height: 40px;
}

.com-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-main .com-title-btn,
.com-title-btn {
  flex: 0 0 auto;
  height: 22px;
  min-height: 22px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.com-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.com-var-chips .com-var-chip {
  font-family: "Montserrat", sans-serif;
  font-size: 0.78rem;
  padding: 6px 10px;
  min-height: 36px;
}

.com-at-wrap {
  position: relative;
  width: 100%;
}

.com-at-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  z-index: 80;
  max-height: 240px;
  overflow: auto;
  background: rgba(8, 12, 10, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.com-at-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
}

.com-at-item:hover,
.com-at-item:focus,
.com-at-item.is-active {
  background: rgba(53, 230, 107, 0.1);
}

.com-at-item code {
  font-size: 0.82rem;
  color: var(--green-soft);
  font-family: "Montserrat", sans-serif;
}

.com-at-item span {
  font-size: 0.78rem;
  color: var(--muted, #aaa);
}

.com-cli-alertas {
  white-space: normal;
}

.com-cli-alertas .ope-flag {
  margin: 2px 8px 2px 0;
}

textarea.html-var-editor,
textarea.convenio-html-editor,
textarea#lc-mutuo-html,
textarea#lc-pagare-html {
  min-height: 180px;
  font-family: "Montserrat", sans-serif !important;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  white-space: pre-wrap;
  tab-size: 2;
  resize: vertical;
  user-select: text;
  pointer-events: auto !important;
  overflow: auto;
}

.fin-pre-form {
  width: 100%;
}

.fin-pre-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.fin-pre-cliente-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 4px;
}

.fin-pre-sims-wrap {
  width: 100%;
}

.fin-pre-sims-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 4px;
}

.fin-pre-sims-head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.fin-pre-sims {
  display: grid;
  grid-template-columns: repeat(var(--fin-sim-n, 1), minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.fin-pre-sims-actions {
  margin: 10px 0 0;
}

.fin-pre-sim-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
  min-width: 0;
}

.fin-pre-sim-card label {
  display: block;
  margin: 6px 0;
}

.fin-pre-sim-card .agora-input {
  width: 100%;
}

.fin-pre-sim-card.is-selected {
  border-color: rgba(120, 190, 130, 0.55);
}

.fin-pre-sim-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.fin-pre-use {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 650;
}

.fin-pre-sim-kpi {
  margin-top: 10px;
}

.fin-sim-kpi-line {
  margin: 0 0 6px;
}

.fin-sim-semaforo {
  margin: 8px 0;
  font-size: 0.8rem;
}

.fin-sim-semaforo.ok {
  color: #8fdb9a;
}

.fin-sim-semaforo.warn {
  color: #e6c35c;
}

.fin-pre-grant {
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.fin-pre-layout {
  display: block;
}

.fin-pre-sim {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.28);
}

.fin-pre-sim h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.fin-pre-sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.fin-pre-sim-table th,
.fin-pre-sim-table td {
  border-bottom: 1px solid var(--line);
  padding: 5px 6px;
  text-align: left;
}

.fin-pre-sim-table td.num,
.fin-pre-sim-table th.num {
  text-align: right;
  white-space: nowrap;
}

/* Cuota total (capital + interés + IVA): más grande que el resto para no confundirla con el capital (Jorge, 30/11/2026). */
.fin-pre-sim-table th.fin-sim-cuota-total {
  color: var(--green-soft);
}

.fin-pre-sim-table td.fin-sim-cuota-total {
  font-size: 1rem;
  color: var(--green-soft);
}

.fin-sim-kpi-line .fin-sim-cuota-grande {
  font-size: 1.15rem;
  color: var(--green-soft);
}

.fin-pre-sim-card .table-wrap,
.fin-pre-sim .table-wrap {
  overflow: auto;
  max-height: min(32vh, 360px);
  margin-top: 8px;
}

.fin-cap {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  width: 100%;
}

.fin-cap.is-ok {
  border-color: rgba(120, 190, 130, 0.45);
}

.fin-cap.is-warn {
  border-color: rgba(214, 176, 80, 0.55);
}

.fin-cap h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 650;
}

.fin-cap-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.6fr);
  gap: 14px;
  align-items: start;
}

.fin-cap-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.fin-cap-metric {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}

.fin-cap-metric span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted, #aaa);
}

.fin-cap-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.fin-cap-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  margin: 3px 0;
}

.fin-cap-row span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.fin-cap-bcra {
  margin: 0 0 4px;
  font-size: 0.8rem;
}

.fin-cap-ents {
  margin: 4px 0 8px 1.1rem;
  padding: 0;
  font-size: 0.75rem;
  color: var(--muted, #aaa);
}

.fin-cap-alerts {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.fin-cap-alerts li {
  font-size: 0.8rem;
  margin: 4px 0;
}

.fin-cap-alerts .ok {
  color: #8fdb9a;
}

.fin-cap-alerts .warn {
  color: #e6c35c;
}

.fin-pre-ingreso-hint {
  color: #e6c35c;
}

@media (max-width: 1100px) {
  .fin-cap-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fin-pre-cliente-fields,
  .fin-cap-body,
  .fin-pre-sims {
    grid-template-columns: 1fr;
  }
  .fin-cap-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* @variables: textarea nativo. Chip usada = borde verde sutil, fondo oscuro. */
.html-var-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.html-var-wrap > .html-var-backdrop {
  display: none !important;
  pointer-events: none !important;
}
.html-var-wrap > textarea.html-var-ta,
textarea.html-var-ta {
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  background-color: rgba(0, 0, 0, 0.45) !important;
  pointer-events: auto !important;
  resize: vertical;
}
.com-var-chip,
.convenio-vars-picker .btn-ghost.com-var-chip {
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 500;
  opacity: 1;
}
.com-var-chip.is-used,
.convenio-vars-picker .btn-ghost.is-used,
.convenio-vars-picker .com-var-chip.is-used {
  background: #0a0f0c !important;
  color: var(--text) !important;
  border: 1px solid rgba(53, 230, 107, 0.7) !important;
  font-weight: 600;
  box-shadow: none;
  opacity: 1;
}
.com-var-chip.is-unused,
.convenio-vars-picker .btn-ghost.is-unused,
.convenio-vars-picker .com-var-chip.is-unused {
  background: rgba(0, 0, 0, 0.28) !important;
  color: var(--muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  font-weight: 500;
  opacity: 1;
}

#pv-ficha-actions {
  display: none;
}
#view-postventa-detail .ope-hero-full {
  margin-bottom: 0;
}
#view-postventa-detail .pv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#view-postventa-detail .ope-hero-bar {
  align-items: stretch;
}
#view-postventa-detail .ope-layout-4q {
  margin-top: 0;
}
#view-postventa-detail .ope-hero-cliente-slot {
  height: 100%;
  align-items: stretch;
}
#pv-cliente-card.ope-hero-cliente {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 14px 16px !important;
  box-sizing: border-box;
}
#pv-cliente-card .ope-part-card.ope-cli-compact {
  gap: 10px;
  height: 100%;
}
#pv-cliente-card .ope-cli-identidad {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  width: 100%;
  margin: 0;
  font-size: 1.74rem;
  line-height: 1.25;
  font-weight: 700;
  color: #f8faf9;
}
#pv-cliente-card .ope-cli-quien {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
}
#pv-cliente-card .ope-cli-quien strong,
#pv-cliente-card .ope-cli-rol {
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f8faf9;
}
#pv-cliente-card .ope-cli-dni-line,
#pv-cliente-card .ope-cli-cel,
#pv-cliente-card .pv-cli-dom {
  font-size: 0.9rem !important;
  margin: 0;
}
#pv-cliente-card .ope-part-actions {
  margin-top: auto;
}
#view-postventa-detail #pv-trabajo,
#view-postventa-detail #pv-cobros {
  flex: 1 1 auto;
  height: 100%;
  box-sizing: border-box;
}
#view-postventa-detail .ope-q-tr {
  overflow: hidden;
  position: relative;
  align-self: stretch;
  min-height: 220px;
}
#view-postventa-detail .ope-q-tr > #pv-obs-panel {
  position: absolute;
  inset: 0;
  height: auto !important;
  max-height: none;
  width: auto;
}
#pv-obs-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
#pv-obs-panel .ope-stream-compose,
#pv-obs-panel .ope-obs-card-title {
  flex-shrink: 0;
}
#pv-obs-list.ope-stream-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 6px;
}

#view-postventa-detail .pv-unidad-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
#view-postventa-detail .pv-unidad-datos { flex: 1 1 auto; min-width: 0; }
#view-postventa-detail .pv-foto {
  width: 144px;
  height: 144px;
  flex: 0 0 144px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
#view-postventa-detail .pv-foto-vacio {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0.7;
}
#view-postventa-aloise .pva-ficha .ope-hero-alarms .ope-status-light,
#view-postventa-aloise .oms-alarma .ope-status-light {
  width: 12px;
  height: 12px;
}
#view-postventa-detail .pv-unidad-local {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#view-postventa-detail .pv-momento {
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}
#view-postventa-detail .pv-momento h2 {
  margin: 0 0 6px;
}
#view-postventa-detail .pv-ev-list {
  margin: 8px 0 0;
  padding-left: 1.1em;
}
#view-postventa-detail .pv-ev-list li {
  margin: 0 0 4px;
}
#view-postventa-detail .pv-renglon {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
#view-postventa-detail .pv-renglon textarea {
  min-height: 7.5em;
}

@media (max-width: 899px) {
  #view-postventa-detail .ope-layout > .ope-q-tr,
  #view-postventa-detail .ope-layout > .ope-q-br,
  #view-postventa-detail .ope-layout > .ope-side {
    display: block;
  }
  #view-postventa-detail .ope-slide:not(.is-active) {
    display: none !important;
  }
  #view-postventa-detail .ope-slide.is-active {
    display: block !important;
  }
}

.fin-bcra-resumen-list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}
.fin-bcra-resumen-list li { margin: 0.12rem 0; }
.fin-pre-bcra .fin-bcra-resumen-list { margin-top: 0.2rem; }

.fin-analisis-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2px;
}
.fin-analisis-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin: 2px 0 8px;
}
.fin-analisis-meta .fin-analisis-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 7px;
  row-gap: 1px;
  align-items: start;
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 6px 8px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.fin-analisis-meta .ope-status-light {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin-top: 4px;
}
.fin-analisis-meta .fin-analisis-main,
.fin-analisis-meta .fin-analisis-title {
  grid-column: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-analisis-meta .fin-analisis-note {
  grid-column: 2;
  flex: none;
  width: auto;
  min-width: 0;
  padding-left: 0;
  white-space: nowrap;
}
.fin-analisis-fins {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin: 0 0 2px;
}
@media (min-width: 560px) {
  .fin-analisis-fins {
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    align-items: start;
  }
}
.fin-analisis-col {
  min-width: 0;
  padding: 6px 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
.fin-analisis-col-h {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
}
.fin-analisis-col[data-line="MOT"] .fin-analisis-col-h {
  color: #9fe7b0;
}
.fin-analisis-col[data-line="ALO"] .fin-analisis-col-h {
  color: #9ec4e8;
}
.fin-analisis-main {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  min-width: 0;
}
.fin-analisis-col .fin-analisis-row {
  min-height: 24px;
  gap: 6px;
}
.fin-analisis-col .fin-analisis-soc {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}
.fin-analisis-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 26px;
  padding: 2px 4px 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.fin-analisis-row.is-static {
  cursor: default;
}
.fin-analisis-row:not(.is-static):hover {
  background: rgba(53, 230, 107, 0.07);
}
.fin-analisis-title {
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
}
.fin-analisis-soc {
  font-weight: 500;
  color: rgba(170, 180, 173, 0.48);
}
.fin-analisis-note {
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.fin-pre-bcra[data-fin-open] {
  cursor: pointer;
}
.fin-abordaje {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.fin-abordaje .lugar-pill {
  /* 25/11/2026: 80% de lo que era (1.15rem · 4px 14px). */
  font-size: 0.92rem;
  padding: 3px 11px;
}
/* Primero / Último: el texto apenas por debajo de la píldora del local, lejos del título. */
#view-financiera-detail .fin-abordaje {
  font-size: 0.86rem;
}
.fin-abordaje-nombre {
  font-weight: 700;
}
.fin-acomodar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.fin-hover-card {
  position: fixed;
  z-index: 1800;
  left: 0;
  top: 0;
  margin: 0;
  /* Vive en <html>; zoom y ancho los pone JS (zoom UI + clientX). */
  width: 420px;
  max-height: 52vh;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 10px 12px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 10, 0.97);
  border: 1px solid rgba(53, 230, 107, 0.35);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.fin-hover-card[hidden] {
  display: none !important;
}
.fin-hover-h {
  margin: 0 0 4px;
  font-size: 0.92rem;
  font-weight: 700;
}
.fin-hover-row,
.fin-hover-p,
.fin-hover-item,
.fin-hover-muted {
  margin: 0 0 6px;
}
.fin-hover-k {
  font-weight: 700;
}
.fin-hover-p,
.fin-hover-item {
  white-space: pre-wrap;
}
.fin-hover-muted {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}
.fin-hover-list {
  margin: 0 0 6px;
  padding-left: 1.1rem;
}
.fin-hover-list li {
  margin: 0.15rem 0;
}
.fin-alertas-popup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.fin-alerta-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(230, 195, 94, 0.28);
  background: rgba(230, 195, 94, 0.07);
}
.fin-alerta-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.fin-alerta-head .ope-status-light.is-amber-pulse {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 16px;
  background: rgba(230, 190, 70, 0.95);
  box-shadow: 0 0 0 2px rgba(230, 190, 70, 0.25), 0 0 12px rgba(230, 190, 70, 0.5);
}
.fin-alerta-head-text {
  min-width: 0;
  flex: 1;
}
.fin-alerta-kicker {
  display: block;
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn, #e6c35c);
}
.fin-alerta-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}
.fin-alerta-detail-label {
  margin: 10px 0 4px 22px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.fin-alerta-detail {
  margin: 0 0 0 22px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 500;
}
.agora-modal .fin-consulta-card .fin-card-head button[type="submit"],
.agora-modal .fin-informe-card button[type="submit"] {
  display: none;
}
.fin-bcra-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fin-bcra-fresca {
  color: #e8c878;
  margin: 0 0 10px;
}

.fin-interesado-en {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
}
.fin-interesado-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 650;
}
.fin-interesado-arrow {
  color: var(--green-soft);
  font-weight: 800;
}
.fin-interesado-prod {
  font-weight: 750;
  font-size: 1.05rem;
}
.fin-otra-info-block {
  margin-top: 8px;
}
.fin-otra-info-title {
  margin: 4px 0 8px;
  color: var(--text);
  font-weight: 750;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.fin-otra-info-hoja {
  margin: 0 0 10px;
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
}
.fin-otra-info-hoja ul {
  margin: 0;
  padding-left: 1.15rem;
}
.fin-otra-info-hoja li {
  margin: 0 0 10px;
}
.fin-otra-info-hoja li:last-child {
  margin-bottom: 0;
}
.fin-otra-info-texto {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  white-space: pre-wrap;
  line-height: 1.4;
}
.fin-otra-info-hoja .help {
  margin: 2px 0 0;
}
.fin-otra-info-form .form-actions {
  margin-top: 8px;
}
.fin-dirty-ask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fin-dirty-ask-box {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  max-width: 440px;
}
.fin-dirty-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
.fin-th-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.15;
}
.fin-th-main { font-weight: 700; }
.fin-th-sub {
  color: var(--muted);
  font-size: 0.72em;
  font-weight: 500;
  white-space: nowrap;
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
}
#fin-grilla td[data-col="nombre"],
#fin-grilla td[data-col="dni"],
#fin-grilla td[data-col="celular"],
#fin-grilla td[data-col="fecha_ultimo"],
#fin-grilla td[data-col="fecha_primer"],
#fin-grilla td[data-col="estado"] {
  white-space: nowrap;
  vertical-align: middle;
}
#fin-grilla td[data-col="ult_abordaje"],
#fin-grilla td[data-col="pri_abordaje"] {
  vertical-align: middle;
  white-space: normal;
}
#fin-grilla td[data-col="estado"].fin-estado-td {
  cursor: default;
}
.fin-abordaje-compact {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
  min-width: 0;
}
.fin-abordaje-compact--empty {
  color: var(--muted);
}
.fin-abordaje-compact-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.fin-abordaje-compact-quien {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.fin-abordaje-compact-hora {
  color: var(--muted);
  font-size: 0.78em;
  white-space: nowrap;
}
.fin-abordaje-compact-dash {
  color: var(--muted);
}
.fin-analisis-td {
  cursor: pointer;
  vertical-align: middle;
}
.fin-analisis-td:hover {
  background: rgba(53, 230, 107, 0.06);
}
.fin-grid-cell {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.fin-grid-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 11.5em;
}
.fin-grid-title {
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
/* Aprobó (Preaprobados, 27/11/2026): luz verde y cuántas aprueban, en un renglón; el detalle va en la nota del mouse. */
.fin-aprobo-n {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 600;
}
.fin-aprobo-n.is-otorgado {
  font-weight: 700;
}
/* Aprobó, versión anterior: una pastilla por financiera (queda por si otra vista la usa). */
.fin-aprobo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fin-aprobo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.86em;
  line-height: 1.25;
}
.fin-aprobo-chip.is-otorgado {
  font-weight: 700;
}
.fin-grid-note {
  color: var(--muted);
  font-size: 0.78em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.fin-form-obs {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 500;
  max-width: 16em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-form-dom,
.fin-form-tel {
  max-width: 16em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-financiera-detail .fin-hero-cliente p.fin-hero-nombre,
#view-financiera-detail .fin-hero-cliente .ope-cli-name.fin-hero-nombre {
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.2;
  margin: 2px 0 6px;
  color: #f8faf9;
}
.fin-otorgar-nombre {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 4px;
}
.fin-otorgar-meta {
  margin: 0 0 10px;
}
.fin-analisis-soc {
  color: rgba(210, 218, 212, 0.55);
  font-weight: 500;
  margin-right: 6px;
}
.fin-alertas-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55em;
  height: 1.55em;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--warn);
  color: #1a1408;
  font-weight: 800;
  font-size: 0.85em;
  line-height: 1;
}
@media (max-width: 899px) {
  .fin-bandeja-desktop { display: none !important; }
  .fin-bandeja-mobile { margin-bottom: 10px; }
}
@media (min-width: 900px) {
  .fin-bandeja-mobile { display: none !important; }
}

.com-var-toggle-wrap {
  margin: 6px 0 8px;
}
.com-var-toggle {
  min-height: 32px;
}
.com-var-chips-host[hidden] {
  display: none !important;
}
.fin-pre-chat-list {
  height: 220px;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 8px;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .fin-pre-chat-list {
    height: 300px;
  }
}
.fin-chat-out {
  opacity: 0.92;
}
.fin-chat-in {
  opacity: 1;
}
.fin-chat-out.is-error,
.fin-chat-in.is-error {
  border-color: rgba(220, 80, 80, 0.45);
}
.fin-pre-chat-form {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fin-pre-chat-form .help {
  margin: 0;
}
.fin-chat-compose-lead {
  margin: 0 0 10px;
}
.fin-pre-chat-form .medios-field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.fin-pre-chat-form .field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.fin-pre-chat-form .form-actions {
  margin-top: 4px;
}
.fin-chat-card-host {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px !important;
}
.fin-chat-card-host > .fin-chat-shell {
  flex: 1 1 auto;
  min-height: 0;
}
.fin-chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.fin-chat-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.fin-chat-head {
  flex: 0 0 auto;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.08), rgba(0, 0, 0, 0.12));
}
.fin-chat-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.fin-chat-head .help {
  margin: 0 0 10px;
}
.fin-chat-head .fin-chat-pills {
  margin-bottom: 8px;
}
.fin-chat-thread {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.28);
  margin: 0;
}
.fin-chat-compose {
  flex: 0 0 auto;
  padding: 14px 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.fin-chat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fin-chat-pill.is-on {
  border-color: var(--ok, #2ecc71);
  background: rgba(46, 204, 113, 0.12);
}
.fin-chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted, #9aa);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fin-chat-meta span {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.fin-chat-meta span strong {
  color: var(--text);
  font-weight: 650;
  font-size: 12px;
}
.fin-item-flags tr.is-locked td {
  opacity: 0.45;
}
.fin-chat-thread .fin-pre-chat-list {
  width: 100%;
}
.fin-chat-bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}
.fin-chat-bubble.is-out {
  align-self: flex-end;
  border-color: rgba(53, 230, 107, 0.28);
  background: rgba(53, 230, 107, 0.08);
}
.fin-chat-bubble.is-in {
  align-self: flex-start;
  border-color: rgba(170, 180, 173, 0.35);
}
.fin-chat-bubble.is-error {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.08);
}
.fin-chat-bubble-meta {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.fin-chat-bubble-body {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}
.fin-chat-bubble-st {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.fin-chat-asunto-ro {
  margin: 0;
}
.fin-chat-preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line, #333);
  background: #fff;
}
.agora-modal-dialog.is-mail-preview .agora-modal-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.agora-modal-dialog.is-mail-preview .agora-modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  flex: 1 1 auto;
}
.agora-modal-dialog.is-mail-preview .agora-modal-body > p,
.agora-modal-dialog.is-mail-preview .agora-modal-body > p.help {
  flex: 0 0 auto;
  margin: 0 0 8px;
}
.agora-modal-dialog.is-mail-preview .fin-chat-preview-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.fin-chat-preview-sms {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  min-height: 7rem;
  padding: 12px 14px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  overflow: auto;
}
.fin-chat-preview-sms-meter {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted, #9aa);
}
.fin-chat-preview-sms-meter.is-bad {
  color: #e8b84a;
}
.fin-layout-pre .fin-pre-q-r3r > .ope-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.fin-alerta-card.is-ok {
  border-color: rgba(53, 230, 107, 0.35);
}
/* Segundo crédito y préstamos de la persona (28/11/2026): rojo = mora grave, en trámite o garante de un atrasado. */
.fin-alerta-card.is-bad {
  border-color: rgba(255, 99, 99, 0.5);
  background: rgba(255, 99, 99, 0.08);
}
.fin-alerta-card.is-bad .fin-alerta-kicker {
  color: #ff8f8f;
}
.fin-alerta-head .ope-status-light.is-red-pulse {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 16px;
}
.fin-credito-cartel {
  margin: 0 0 12px;
}
.fin-credito-cartel > h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}
.fin-credito-cartel .fin-alertas-popup {
  gap: 8px;
}
.fin-credito-cartel .fin-alerta-card {
  padding: 8px 12px;
}
.fin-segundo-autoriza {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(230, 195, 94, 0.4);
  background: rgba(230, 195, 94, 0.07);
}
.fin-segundo-autoriza.is-bad {
  border-color: rgba(255, 99, 99, 0.5);
  background: rgba(255, 99, 99, 0.07);
}
.fin-segundo-autoriza .chk-chip {
  font-weight: 700;
}
.fin-alta-cliente {
  margin: 0 0 10px;
}
.fin-alerta-card.is-ok .fin-alerta-kicker {
  color: var(--green-soft, #7dff9f);
}
.fin-alertas-n.is-ok {
  background: rgba(53, 230, 107, 0.18);
  color: var(--green-soft, #7dff9f);
}
.asig-req {
  color: #e8c36a;
  margin: 4px 0 0;
  font-size: 12px;
}
#asig-dom-slot {
  margin-top: 6px;
}
#asig-dom-slot .medios-editor-form {
  margin: 0;
}

/* PRE · popups comprobante facturación / entrega */
.pre-comp-popup {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pre-comp-popup .medios-block {
  gap: 14px;
  padding: 18px 0;
}
.pre-comp-popup .medios-block-title {
  margin-bottom: 2px;
}
.pre-comp-popup .form-actions {
  margin-top: 4px;
  gap: 10px;
}
.pre-comp-popup .pre-comp-pf-chip {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.pre-comp-popup label.medios-field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

/* Catálogo Aloise — ficha producto */
.cst-luz {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a3a;
  vertical-align: middle;
}
.cst-luz.is-abierta {
  background: #e6b422;
  animation: cst-titila 1.1s ease-in-out infinite;
}
@keyframes cst-titila {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
#app-screen > #view-control-stock:not([hidden]) {
  overflow: hidden;
}
#view-control-stock {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.cst-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 12px;
}
.cst-locales, .cst-tabs { display: flex; gap: 8px; align-items: center; }
.cst-tab {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.cst-tab.is-on {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
#view-control-stock .cst-panel[hidden] { display: none !important; }
#view-control-stock .cst-panel:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#view-control-stock .cst-panel .table-wrap--excel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: auto;
}
.cst-mes-num { font-size: 1.26rem; font-weight: 800; margin: 0; }
.cst-mes-num.is-bien { color: #3dd68c; }
.cst-mes-num.is-atras { color: #e6b422; }
.cst-falta {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  color: #1a1408;
  background: #e6b422;
  font-weight: 700;
  font-size: 0.72rem;
}
.cst-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cst-item.is-ok { box-shadow: inset 3px 0 0 #3dd68c; }
.cst-item.is-desfasaje { box-shadow: inset 3px 0 0 transparent; }
.cst-sec-head { display: flex; justify-content: flex-end; margin: 0 0 6px; }
#cst-consulta-bar { align-items: center; margin-bottom: 8px; }
#cst-consulta-bar .search-field { flex: 0 1 360px; }
#cst-consulta-bar .cst-sec-tools { margin-left: auto; }
#cst-panel-consulta { position: relative; }
#cst-panel-consulta.is-cargando #cst-consulta-wrap { visibility: hidden; }
#cst-panel-consulta.is-cargando #cst-consulta-cargando {
  position: absolute;
  z-index: 5;
  top: 52px;
  left: 0;
  right: 0;
  margin: 0;
}
.cst-sec-tools { display: inline-flex; align-items: center; gap: 6px; }
.cst-ficha-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cst-ficha-head h2 { margin: 0; flex: 1 1 auto; }
#view-control-stock.is-ficha > .hero,
#view-control-stock.is-ficha > .cst-bar { display: none; }
#view-control-stock.is-ficha #cst-panel-ficha {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
#view-control-stock.is-ficha .cst-prod-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* Insumos del local (29/11/2026): dos grillas, control y compra en popup. */
#view-control-stock.is-insumos #cst-mes-num,
#view-control-stock.is-insumos #cst-mes-frase,
#view-control-stock.is-insumos #cst-especifico { display: none !important; }
.ins-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.ins-bar .cst-sec-tools { margin-left: auto; }
.ins-titulo { font-size: 0.86rem; font-weight: 700; margin: 6px 0 4px; flex: 0 0 auto; }
.ins-titulo .help { font-weight: 400; }
#view-control-stock #cst-panel-insumos .table-wrap--excel.ins-wrap { flex: 1 1 auto; min-height: 140px; }
#view-control-stock #cst-panel-insumos .table-wrap--excel.ins-wrap--resumen { flex: 0 1 auto; max-height: 38vh; }
.ins-fila { cursor: pointer; }
.ins-tipo {
  display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.ins-tipo--control { color: #e6b422; border-color: rgba(230, 180, 34, 0.6); background: rgba(230, 180, 34, 0.12); }
.ins-tipo--compra { color: #3dd68c; border-color: rgba(61, 214, 140, 0.6); background: rgba(61, 214, 140, 0.12); }
.ins-locales { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.ins-renglones { display: flex; flex-direction: column; margin: 4px 0 10px; }
.ins-renglon {
  display: grid; grid-template-columns: minmax(0, 1.2fr) 110px minmax(0, 1fr); gap: 8px;
  align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line);
}
.ins-renglon-nombre { min-width: 0; }
.ins-renglon-nombre .ins-ultimo { display: block; }
.ins-cant { text-align: right; }
.ins-alta { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; margin: 0 0 6px; }
.ins-lista-tabla { width: 100%; }
.ins-lista-tabla td { padding: 4px 6px; }
.ins-apagado td { opacity: 0.55; }
.ins-apagado td:last-child { opacity: 1; }
.ins-sub { margin: 12px 0 4px; font-size: 0.82rem; }
.ins-cambios { margin: 0; padding-left: 18px; font-size: 0.78rem; }
.ins-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
@media (max-width: 720px) {
  .ins-renglon { grid-template-columns: 96px minmax(0, 1fr); }
  .ins-renglon-nombre { grid-column: 1 / -1; }
  .ins-alta { grid-template-columns: minmax(0, 1fr) 110px; }
  .ins-alta [data-ins-alta] { grid-column: 1 / -1; min-height: 40px; }
  .ins-bar .btn-sm { min-height: 40px; }
}
#cst-buscar { margin: 8px 0; flex: 0 0 auto; }
.cst-hist-title { margin: 8px 0 4px; flex: 0 0 auto; }
.cst-dep-ens { color: #35e66b; }
.cst-dep-brs { color: #7eb6ff; }
.cst-dep-mal { color: #e6b422; font-weight: 700; }
#cst-prod-table td .agora-input { width: 72px; min-height: 36px; }
#view-control-stock .oms-filter-row th {
  vertical-align: middle;
}
#view-control-stock .oms-filter-row .agora-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 22px;
}
#view-control-stock .oms-filter-row .agora-funnel {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}
.cst-sort-n { font-size: 0; line-height: 0; color: transparent; }
.cst-cant { display: inline-flex; align-items: center; gap: 4px; }
.cst-num-neg { color: #d64545; font-weight: 700; }
.cst-dif-falta { color: #d64545; font-weight: 700; }
.cst-dif-sobra { color: #e6b422; font-weight: 700; }
.cst-num-cero { color: #8b93a7; }
.cst-ok { color: #3dd68c; font-weight: 800; font-size: 1.05rem; }
.cst-step {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.cst-step:disabled { opacity: 0.35; }
#cst-ficha-titulo { position: static; }
.cst-item input.is-ok { border-color: #3dd68c; background: rgba(61, 214, 140, 0.16); }
.cst-item input.is-falta { border-color: #d64545; background: rgba(214, 69, 69, 0.16); }
.cst-item input.is-sobra { border-color: #e6b422; background: rgba(230, 180, 34, 0.18); }
.cst-video { width: 100%; max-height: 52vh; background: #000; border-radius: 10px; object-fit: cover; }
.cst-scan { position: relative; }
.cst-scan-guia { position: absolute; left: 8%; right: 8%; top: 28%; height: 44%; border: 2px solid #3dd68c; border-radius: 8px; pointer-events: none; }
.cst-torch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
  color: #e8efe9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.cst-torch.is-on { background: #e6b422; color: #1a1408; border-color: #e6b422; }
#cst-scan-sumar { margin-top: 10px; }
.cst-hist-pop { max-height: 70vh; overflow: auto; }
.cst-scan-mano { display: flex; gap: 8px; margin-top: 8px; }
.cst-scan-mano .agora-input { flex: 1; }
.agora-modal-body:has(.cst-espec) { display: flex; flex-direction: column; min-height: min(78vh, 820px); overflow: hidden; }
.cst-espec { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.cst-espec .cst-tabs { flex-wrap: wrap; }
.cst-pick-list { flex: 1; min-height: 220px; max-height: none; overflow: auto; }
.cst-sku-grilla { width: 100%; font-size: 0.86rem; }
.cst-sku-grilla th, .cst-sku-grilla td { padding: 6px 8px; white-space: nowrap; }
.cst-sku-grilla td:nth-child(3) { white-space: normal; }
.cst-pick {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.cst-hist { max-height: 11.5rem; overflow: auto; }
.cst-hist p { margin: 8px 0; }
.aloise-ean { margin: 8px 0 0; font-size: 1.05rem; letter-spacing: 0.04em; }
.aloise-ean strong { margin-right: 8px; }
.aloise-ficha-fotos {
  min-height: 48px;
}
.aloise-ficha-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.aloise-ficha-gallery a {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}
.aloise-ficha-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aloise-ficha-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.aloise-carousel-frame {
  display: block;
  width: 288px;
  height: 288px;
  max-width: min(288px, 70vw);
  max-height: min(288px, 70vw);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
}
.aloise-carousel-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.aloise-carousel-nav {
  min-width: 40px;
  min-height: 40px;
  font-size: 1.4rem;
  line-height: 1;
}
.aloise-ficha-saldos {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px 12px;
  max-height: 180px;
  overflow: auto;
  font-size: 0.92rem;
}
.aloise-ficha-saldos li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.aloise-ficha-saldos em {
  opacity: 0.55;
  font-style: normal;
  font-size: 0.85em;
}
.aloise-ficha-cats-select {
  width: 100%;
  min-height: 120px;
}
.aloise-tn-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.35;
}
.aloise-tn-banner.is-warn {
  border-color: rgba(230, 168, 69, 0.55);
  background: rgba(230, 168, 69, 0.1);
  color: #f0d9a8;
}
.aloise-tn-banner.is-ok {
  border-color: rgba(29, 255, 114, 0.4);
  background: rgba(29, 255, 114, 0.08);
  color: #9dffc0;
}
.aloise-tn-banner .ope-status-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.aloise-ficha-sys-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}
.aloise-ficha-sys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: help;
}
.aloise-ficha-sys .ope-status-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aloise-ficha-sys .ope-status-light.is-warn,
.aloise-grid-sys .ope-status-light.is-warn,
.aloise-tn-banner .ope-status-light.is-warn {
  background: var(--warn, #e6a845);
  box-shadow: 0 0 0 2px rgba(230, 168, 69, 0.25);
  animation: none;
}
.aloise-grid-sys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.aloise-grid-sys .ope-status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aloise-flag-chk {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}
.aloise-glp-hist {
  font-size: 0.9rem;
}
.aloise-nuevos-chip {
  flex: 0 0 auto;
}
.aloise-nuevos-chip.is-active {
  border-color: rgba(29, 255, 114, 0.55);
  color: #9dffc0;
}
.aloise-web-logos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aloise-web-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.aloise-web-logo-row.is-off {
  opacity: 0.55;
}
.aloise-web-logo-row img {
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
}
.aloise-web-logo-row > div {
  flex: 1;
  min-width: 0;
}
.aloise-html-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}
.aloise-html-preview-frame {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background: #fff;
}
.html-editor { display: flex; flex-direction: column; gap: 8px; }
.html-editor-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.html-editor-bar button {
  border: 1px solid var(--line, rgba(255,255,255,.16));
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}
.html-editor-bar button.is-on { outline: 1px solid #7dffa1; }
.html-editor-visual {
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line, rgba(255,255,255,.16));
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  line-height: 1.45;
}
.html-editor-visual h2 { font-size: 1.35rem; margin: 0 0 8px; }
.html-editor-visual h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.html-editor-visual p { margin: 0 0 8px; }
.html-editor-visual ul, .html-editor-visual ol { margin: 0 0 8px 1.2rem; }
.html-editor-bar select {
  background: #111;
  color: inherit;
  border: 1px solid var(--line, rgba(255,255,255,.16));
  border-radius: 6px;
  padding: 4px 8px;
}
.html-editor-source {
  min-height: 280px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.catalogo-origen-pills {
  margin: 0 0 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.catalogo-origen-pills .lugar-pill {
  flex: 0 0 auto;
}
.vidriera-fichas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.vidriera-card {
  min-width: 0;
}
.vidriera-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.vidriera-auto {
  margin-top: 10px;
}
@media (min-width: 900px) {
  .vidriera-fichas {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
@media (min-width: 1280px) {
  .vidriera-fichas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* —— Grillas 0.8.370: rótulos bajo los chips, títulos arriba, flechas fijas —— */
.nav-zone-scope,
.nav-zone-modules {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}
.nav-zone-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.nav-zone-stack--modules {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.nav-subcontexto-stack:has(#comercial-line[hidden]) {
  display: none !important;
}
.nav-subcontexto-stack {
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(53, 230, 107, 0.35);
}
.nav-zone-label {
  display: block;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(159, 240, 184, 0.62);
  line-height: 1;
  padding: 1px 2px 2px;
}
.nav-rail {
  align-items: stretch;
}
.header-shell {
  align-items: end;
  padding: 6px 0 0;
}
.header-shell .brand,
.header-shell .header-actions {
  margin-bottom: 13px;
}
.brand-logo-img,
.brand img {
  height: 64px;
  width: auto;
  max-width: 280px;
}
.nav-rail-sep {
  margin: 6px 0 15px;
}

.oms-grilla thead tr:first-child th,
.catalogo-grilla thead tr:first-child th,
#aloise-cat-table thead tr:first-child th,
#aloise-pulida-table thead tr:first-child th {
  white-space: normal;
  vertical-align: top;
  line-height: 1.15;
  height: auto;
  text-align: left;
}
.oms-grilla thead tr:first-child th.oms-th-sort,
.catalogo-grilla thead tr:first-child th.oms-th-sort {
  position: relative;
  padding-right: 10px;
}
.agora-th-line {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  vertical-align: top;
}
.oms-grilla .th-sort,
.catalogo-grilla .th-sort {
  position: static;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0;
  width: auto;
  height: auto;
  margin: 1px 0 0;
  padding: 0;
  white-space: nowrap;
  line-height: 1;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}
.agora-th-title,
.oms-grilla .fin-th-main,
.catalogo-grilla .fin-th-main {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
}
.oms-grilla .fin-th-stack,
.catalogo-grilla .fin-th-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  min-width: 0;
  line-height: 1.15;
}
.oms-grilla .fin-th-sub,
.catalogo-grilla .fin-th-sub {
  display: block;
  color: rgba(186, 198, 190, 0.82);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: normal;
  max-width: none;
  overflow: visible;
  text-overflow: unset;
}
.fin-analisis-soc {
  color: rgba(186, 198, 190, 0.82);
}
.oms-grilla .th-sort::before,
.catalogo-grilla .th-sort::before {
  content: "↑";
  opacity: 0.32;
  margin-right: 2px;
  font-weight: 500;
}
.oms-grilla .th-sort::after,
.catalogo-grilla .th-sort::after {
  content: "↓";
  opacity: 0.32;
  font-weight: 500;
}
.oms-grilla .th-sort.is-asc::before,
.catalogo-grilla .th-sort.is-asc::before {
  content: "↑";
  opacity: 0.32;
  font-weight: 500;
  color: inherit;
}
.oms-grilla .th-sort.is-asc::after,
.catalogo-grilla .th-sort.is-asc::after {
  content: "↓";
  opacity: 1;
  font-weight: 800;
  color: var(--accent, #35e66b);
}
.oms-grilla .th-sort.is-desc::before,
.catalogo-grilla .th-sort.is-desc::before {
  content: "↑";
  opacity: 1;
  font-weight: 800;
  color: var(--accent, #35e66b);
}
.oms-grilla .th-sort.is-desc::after,
.catalogo-grilla .th-sort.is-desc::after {
  content: "↓";
  opacity: 0.32;
  font-weight: 500;
  color: inherit;
}
.table-wrap--excel > .oms-grilla,
.table-wrap--excel > .catalogo-grilla {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}
.oms-grilla td,
.catalogo-grilla td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.oms-filter-row th,
.catalogo-filter-row th {
  position: relative;
}
.agora-funnel {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #121816;
  color: var(--green-soft, #9ff0b8);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1;
  padding: 2px 3px;
  z-index: 3;
}
.agora-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}
.view-panel:not(.detail-shell) > .hero .agora-head-right .detail-back-bar {
  float: none;
  margin: 0;
  padding: 0;
}
.agora-funnel--solo {
  position: static;
  transform: none;
}
.oms-filter-row .agora-input,
.catalogo-filter-row .agora-input {
  padding-right: 16px;
}
.oms-col-filter.is-on,
.fin-col-filter.is-on,
.crm-col-filter.is-on,
.cat-col-filter.is-on {
  border-color: rgba(53, 230, 107, 0.65);
}
/* Filtro de columna o buscador esperando que se deje de escribir (30/11/2026): titila en verde
   y se apaga cuando la grilla ya filtró o llegó la respuesta. La letra ya se ve: es la señal de
   que System está trabajando. */
input.is-filtrando,
.oms-col-filter.is-filtrando,
.fin-col-filter.is-filtrando,
.crm-col-filter.is-filtrando,
.cat-col-filter.is-filtrando {
  border-color: var(--green);
  animation: agora-filtro-titila 0.6s ease-in-out infinite;
}
@keyframes agora-filtro-titila {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.25), 0 0 4px rgba(53, 230, 107, 0.2);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.85), 0 0 10px rgba(53, 230, 107, 0.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  input.is-filtrando,
  .oms-col-filter.is-filtrando,
  .fin-col-filter.is-filtrando,
  .crm-col-filter.is-filtrando,
  .cat-col-filter.is-filtrando {
    animation: none;
    box-shadow: 0 0 0 1px rgba(53, 230, 107, 0.85);
  }
}
.agora-funnel-pop,
.agora-cell-pop {
  position: fixed;
  z-index: 80;
  max-width: min(360px, calc(100vw - 16px));
  background: #121816;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.agora-funnel.is-on {
  color: var(--accent, #35e66b);
}
.agora-funnel-pop {
  z-index: 120;
  width: 300px;
  padding: 8px;
  max-height: min(460px, calc(100vh - 16px));
  display: flex;
  flex-direction: column;
  overflow: auto;
  font-size: 0.78rem;
}
.agora-funnel-pop .agora-input {
  font-size: 0.82rem;
  min-height: 32px;
  padding: 6px 8px;
}
.agora-funnel-pop .btn-sm {
  font-size: 0.78rem;
  min-height: 32px;
  padding: 6px 12px;
}
.agora-funnel-pop .agora-funnel-val,
.agora-funnel-pop .agora-funnel-note,
.agora-funnel-pop .agora-funnel-cond,
.agora-funnel-pop .agora-funnel-tools button {
  font-size: 0.78rem;
}
.agora-funnel-lab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.agora-funnel-tones,
.agora-funnel-actions,
.agora-vista-save {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
}
.agora-funnel-vals {
  max-height: 220px;
  min-height: 64px;
  overflow: auto;
  margin-bottom: 6px;
  flex: 1 1 auto;
}
.agora-funnel-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 2px;
}
.agora-funnel-tools button {
  border: 0;
  background: transparent;
  color: var(--green-soft, #9ff0b8);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}
.agora-funnel-note {
  margin: 0 0 4px;
  font-size: 0.7rem;
  color: var(--muted);
}
.agora-funnel-cond {
  margin: 6px 0;
  font-size: 0.75rem;
}
.agora-funnel-cond summary {
  cursor: pointer;
  color: var(--muted);
}
.agora-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}
.agora-pick {
  border: 1px solid var(--line);
  background: rgba(125, 206, 160, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}
.agora-funnel-val {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 2px 0;
}
.agora-funnel-val span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agora-cell-pop {
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
}
.agora-vista-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.agora-vista-li {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
}
.itris-luces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 10px 0 6px;
}
.itris-luz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}
.is-blink-amber {
  animation: agora-blink-amber 1.1s ease-in-out infinite;
  border-color: #e6b422 !important;
}
@keyframes agora-blink-amber {
  0%, 100% { box-shadow: 0 0 0 1px #e6b422; }
  50% { box-shadow: 0 0 0 3px #e6b422; }
}
.ope-card > h2,
.ope-cobro-head h2,
.ope-obs-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* T, A y ? viajan juntos. El grupo se apoya a la derecha del título. */
h1:has(> .agora-corner),
h2:has(> .agora-corner),
h3:has(> .agora-corner),
h4:has(> .agora-corner),
.ope-obs-card-title:has(> .agora-corner),
.fin-hero-kicker:has(> .agora-corner),
.ope-cli-head:has(> .agora-corner),
.ope-unidad-head:has(> .agora-corner),
.ope-cobro-head:has(> .agora-corner),
.detail-back-bar:has(> .agora-corner),
.fin-card-head:has(> .agora-corner) {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.ope-cli-head > h2,
.ope-unidad-head > h2,
.ope-cobro-head > h2 {
  flex: 1 1 auto;
  min-width: 0;
}
.agora-corner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}
.agora-corner > .task-pin,
.agora-corner > .aviso-pin,
.agora-corner > .agora-help-btn {
  margin-left: 0;
  margin-right: 0;
}
.ope-cli-head,
.ope-unidad-head,
.ope-cobro-head {
  justify-content: flex-start;
}
.ope-cli-head > .agora-corner,
.ope-unidad-head > .ope-ver-producto,
.ope-cobro-head > .ope-cobro-head-right,
.ope-cobro-head > .agora-corner {
  margin-left: auto;
}
.ope-cobro-head > .ope-cobro-head-right + .agora-corner,
.ope-unidad-head > .ope-ver-producto + .agora-corner {
  margin-left: 8px;
}
.agora-modal-tools {
  align-self: flex-start;
}
.agora-screen-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.agora-help-btn,
.task-pin,
.aviso-pin,
.error-pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--green-soft, #9ff0b8);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.task-pin,
.aviso-pin,
.error-pin { position: relative; }
html:not(.ve-errores) .error-pin { display: none !important; }

/* Errores: los cuatro estados con una luz LED (apagada / prendida con brillo), sin pintar el botón entero. */
#err-chips { gap: 8px; margin-bottom: 8px; }
#err-chips .chk-chip { gap: 7px; }
#err-chips .err-led {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background 0.15s, box-shadow 0.15s;
}
#err-chips .err-chip-n {
  min-width: 18px; padding: 0 5px; border-radius: 9px; text-align: center;
  font-size: 0.74rem; line-height: 16px; color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
#err-chips .chk-chip.is-on { border-color: rgba(255, 255, 255, 0.28); }
#err-chips .chk-chip.is-on .err-chip-n { color: var(--text); background: rgba(255, 255, 255, 0.12); }
#err-chips [data-err-filtro="pendiente"].is-on .err-led { background: #ffc94a; box-shadow: 0 0 0 2px rgba(255, 201, 74, 0.28), 0 0 10px rgba(255, 201, 74, 0.9); }
#err-chips [data-err-filtro="imputado"].is-on .err-led { background: #1dff72; box-shadow: 0 0 0 2px rgba(29, 255, 114, 0.28), 0 0 10px rgba(29, 255, 114, 0.9); }
#err-chips [data-err-filtro="perdonado"].is-on .err-led { background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 10px rgba(255, 255, 255, 0.85); }
#err-chips [data-err-filtro=""].is-on .err-led { background: #9fb3a8; box-shadow: 0 0 0 2px rgba(159, 179, 168, 0.25), 0 0 9px rgba(159, 179, 168, 0.8); }
.err-totales { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.82rem; }
.err-tot-suma { font-weight: 700; margin-right: 4px; }
.err-tot-chip {
  padding: 3px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.78rem;
  color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12);
}
.err-tot-chip:hover { border-color: rgba(53, 230, 107, 0.4); }
.err-tot-chip.is-on { border-color: rgba(53, 230, 107, 0.6); background: rgba(53, 230, 107, 0.1); }
#err-table tbody tr[data-id] { cursor: pointer; }
.err-fila-btn { padding: 2px 10px; min-height: 0; font-size: 0.79rem; line-height: 1.4; white-space: nowrap; }
.err-fila-btn + .err-fila-btn { margin-left: 6px; }
#actuar-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #6b1d1d;
  color: #fff;
  font-weight: 700;
}
#actuar-bar button {
  background: #fff;
  color: #6b1d1d;
  border: 0;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}
.task-pin .pin-letra,
.aviso-pin .pin-letra,
.error-pin .pin-letra {
  pointer-events: none;
  display: block;
  line-height: 1;
}
.task-pin .pin-n,
.aviso-pin .pin-n,
.error-pin .pin-n {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: inherit;
  color: inherit;
  font-size: 9px;
  line-height: 14px;
  pointer-events: none;
}
.task-pin.is-on,
.aviso-pin.is-on,
.task-nav-n.is-on {
  animation: task-blink 2.4s ease-in-out infinite;
}
.task-pin.is-verde,
.aviso-pin.is-verde,
.task-nav-n.is-verde,
.task-luz.is-verde { background: #2f9e5a; color: #06140c; border-color: #2f9e5a; }
.task-pin.is-ambar,
.aviso-pin.is-ambar,
.error-pin.is-ambar,
.task-nav-n.is-ambar,
.task-luz.is-ambar { background: #e6b422; color: #1a1408; border-color: #e6b422; }
.task-pin.is-naranja,
.aviso-pin.is-naranja,
.task-nav-n.is-naranja,
.task-luz.is-naranja { background: #e07a2f; color: #1a0e06; border-color: #e07a2f; }
.task-pin.is-roja,
.aviso-pin.is-roja,
.task-nav-n.is-roja,
.task-luz.is-roja { background: #d64545; color: #1a0808; border-color: #d64545; }
.task-nav-n {
  display: inline-block;
  min-width: 1.1em;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.task-luz {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
  flex: 0 0 auto;
}
.task-luz.is-titila { animation: task-blink 2.4s ease-in-out infinite; }
.task-seccion {
  margin: 14px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #9aa);
}
.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 8px;
}
.task-card-open {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.task-card-clase { font-weight: 700; margin-left: 6px; }
.task-card-frase { display: block; margin-top: 4px; }
.task-card-meta { display: block; margin-top: 4px; color: var(--muted, #9aa); font-size: 12px; }
.task-card-tramite { margin-top: 4px; }
.task-card-act { display: flex; gap: 6px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.task-card-act .agora-input { flex: 1; min-width: 0; }
.task-link {
  background: transparent;
  border: 0;
  color: var(--green-soft, #9ff0b8);
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.medios-field > .task-link {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
}
.task-grupo { margin: 0 0 8px; }
.task-grupo-abrir {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.task-grupo-cuerpo { margin: 6px 0 0 12px; }
.task-hilo { max-height: 280px; overflow: auto; margin: 8px 0; }
.task-globo {
  border-left: 3px solid var(--line);
  padding: 6px 8px;
  margin: 0 0 8px;
}
.task-globo p { margin: 2px 0 0; }
.task-globo-quien { font-size: 12px; color: var(--muted, #9aa); }
.task-globo.is-habla { border-left-color: #2f9e5a; }
.task-globo.is-habla p { color: #b7ebc6; }
.task-globo.is-cambio { border-left-color: #e6b422; }
.task-globo.is-accion { border-left-color: #6d7580; }
.task-globo.is-accion p { color: var(--muted, #9aa); }
.task-campo-off { display: none !important; }
/* Cada ocupa la fila si Hasta no está. Los dos juntos van en pareja. */
.medios-fields:not(:has([data-tar-hasta-wrap]:not(.task-campo-off))) [data-tar-dias-wrap]:not(.task-campo-off) {
  grid-column: 1 / -1;
}
.tar-plazo.is-verde { color: #8fbfa2; }
.tar-plazo.is-ambar { color: #e6b422; }
.tar-plazo.is-naranja { color: #e07a2f; }
.tar-plazo.is-roja { color: #d64545; }
.tar-plazo.is-gris { color: var(--muted, #9aa); }
td.tar-serie.is-fin { color: #e6b422; }
/* Hecho en el renglón de Tareas: chico, para no agrandar la fila (Jorge 2a, 30/11/2026). */
/* Responsables más grandes, 1,3 veces la letra de la grilla (Jorge, 1/12/2026). */
#tar-table .tar-resp { font-size: 1.3em; }
/* El resto de la grilla de Tareas, 10 % más grande (Jorge, 1/12/2026). */
#tar-table tbody td:not([data-col="resp"]) { font-size: 1.1em; }
.tar-hecho-fila { padding: 2px 10px; min-height: 0; font-size: 0.79rem; line-height: 1.4; white-space: nowrap; }
/* Ficha de tarea: datos a la izquierda y el chat como recuadro propio a la derecha;
   en el celular, uno debajo del otro (Jorge 1a 2a, 1/12/2026). */
/* La ficha llena el alto del popup: al agrandarlo o achicarlo, el chat se acomoda.
   El chat mide lo mismo que la columna de datos (su contenido va en .tar-chat-in, que no empuja la fila). */
.tar-ficha {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  flex: 1 0 auto;
}
.agora-modal-body:has(> .tar-ficha) { display: flex; flex-direction: column; }
.tar-ficha-datos { min-width: 0; }
.tar-chat {
  position: relative;
  min-width: 0;
  min-height: 320px;
  border: 1px solid var(--line, #2a3a30);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
}
.tar-chat-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
}
/* Una sola letra para todo lo del chat (Jorge, 1/12/2026). */
.tar-chat-in,
.tar-chat-in * { font-size: 12px; line-height: 1.45; }
.tar-chat .medios-block-title { margin: 0; flex: 0 0 auto; }
.tar-chat .ope-stream-filters { margin: 0; flex: 0 0 auto; }
.tar-chat-hilo {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  margin: 0;
}
.tar-chat-escribir { display: flex; gap: 8px; align-items: flex-end; flex: 0 0 auto; }
.tar-chat-escribir textarea { flex: 1 1 auto; min-height: 44px; resize: vertical; }
.tar-chat-escribir .btn-ghost { flex: 0 0 auto; }
/* Lo que escriben Jorge, Joaquín y Sebastián va en celeste; el equipo sigue en verde. */
.task-globo.is-admin { border-left-color: #5fb4ff; background: rgba(95, 180, 255, 0.07); }
.task-globo.is-admin p { color: #bfe0ff; }
.tar-chat-admin {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(95, 180, 255, 0.18);
  color: #9fd0ff;
  font-weight: 700;
}
@media (max-width: 900px) {
  .tar-ficha { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .tar-chat { min-height: 0; }
  .tar-chat-in { position: static; }
  .tar-chat-hilo { max-height: 50vh; }
}
/* Luces de Tareas: más grandes y prendidas. Verde quieta, ámbar titila suave,
   alerta, vencida y crítica titilan fuerte (Jorge, 1/12/2026). */
.task-luz.tar-luz {
  width: 12px;
  height: 12px;
  margin-right: 2px;
}
.task-luz.tar-luz.is-verde { background: #3ddc7a; border-color: #3ddc7a; box-shadow: 0 0 6px 1px rgba(61, 220, 122, 0.65); }
.task-luz.tar-luz.is-ambar { background: #ffd23f; border-color: #ffd23f; box-shadow: 0 0 7px 1px rgba(255, 210, 63, 0.7); }
.task-luz.tar-luz.is-naranja { background: #ff8a3d; border-color: #ff8a3d; box-shadow: 0 0 8px 2px rgba(255, 138, 61, 0.75); }
.task-luz.tar-luz.is-roja { background: #ff4d4d; border-color: #ff4d4d; box-shadow: 0 0 9px 2px rgba(255, 77, 77, 0.8); }
/* Ya hecha: gris quieta, no avisa (Jorge 1.a, 1/12/2026). */
.task-luz.tar-luz.is-gris { background: #8a929b; border-color: #8a929b; box-shadow: none; animation: none; }
.tar-chat-audit { margin: 0; color: var(--muted, #9aa); flex: 0 0 auto; }
.task-luz.tar-luz.is-suave { animation: tar-luz-suave 2.4s ease-in-out infinite; }
.task-luz.tar-luz.is-fuerte { animation: tar-luz-fuerte 1.1s ease-in-out infinite; }
@keyframes tar-luz-suave {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes tar-luz-fuerte {
  0%, 100% { opacity: 1; transform: scale(1.12); }
  50% { opacity: 0.2; transform: scale(0.9); box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .task-luz.tar-luz.is-suave,
  .task-luz.tar-luz.is-fuerte { animation: none; }
}
@keyframes task-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .task-pin.is-on,
  .task-nav-n.is-on,
  .task-luz.is-titila { animation: none; }
}
.agora-help h3 {
  margin: 16px 0 6px;
  font-size: 0.95rem;
  color: var(--green-soft, #9ff0b8);
}
.agora-help h3:first-child { margin-top: 0; }
.agora-help p { margin: 0 0 8px; line-height: 1.45; }
.agora-help ul,
.agora-help ol { margin: 0 0 4px; padding-left: 1.2rem; }
.agora-help li { margin: 0 0 5px; line-height: 1.4; }
.agora-help .agora-help-no { color: #e6b422; }
.view-panel:not(.detail-shell) > .detail-back-bar {
  float: right;
  margin: 0 0 0 12px;
  padding-top: 2px;
}
#scope-switcher,
#comercial-line {
  width: max-content;
  flex: 0 0 auto;
}
.nav-zone-scope {
  width: max-content;
  flex: 0 0 auto;
}
.nav-zone-modules {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  overflow: visible;
}
.modules-carousel {
  max-width: 100%;
  overflow: hidden;
}
.view-panel:not(.detail-shell) > .hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.view-panel:not(.detail-shell) > .hero > .agora-head-right {
  margin-left: auto;
}
.view-panel:not(.detail-shell) > .hero p,
.view-panel:not(.detail-shell) > .panel > p.help:not([id]) {
  display: none;
}
.view-panel:not(.detail-shell) > .hero h1 {
  font-size: 1.15rem;
  margin: 0;
}
.view-panel:not(.detail-shell) .panel {
  margin-top: 6px;
  padding-top: 8px;
}
.view-panel:not(.detail-shell) .catalogo-toolbar,
.view-panel:not(.detail-shell) .oms-filters {
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  .nav-rail {
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-rail::-webkit-scrollbar {
    display: none;
  }
  .nav-zone-scope,
  .nav-zone-modules,
  .modules-carousel,
  #main-nav,
  #scope-switcher,
  #comercial-line {
    width: max-content !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }
  .nav-rail-sep {
    display: block !important;
    align-self: center;
    height: 28px;
    width: 1px;
    margin: 0 4px;
    background: rgba(53, 230, 107, 0.45);
  }
  .nav-zone-stack {
    position: static;
    justify-content: flex-start;
    gap: 0;
  }
  .nav-zone-label {
    display: block !important;
    position: static !important;
    margin-top: 6px;
    padding: 0 2px;
    font-size: 0.5rem;
    letter-spacing: 0.12em;
    line-height: 1;
    white-space: nowrap;
  }
  .nav-subcontexto-stack {
    margin-left: 2px;
    padding-left: 10px;
    border-left: 1px solid rgba(53, 230, 107, 0.45);
  }
  .nav-rail-sep--brand {
    display: none !important;
  }
  #comercial-line.comercial-line {
    margin-top: 0;
  }
  .header-shell .brand,
  .header-shell .header-actions {
    margin-bottom: 0;
  }
  .brand-logo-img,
  .brand img {
    height: 32px;
    max-width: 148px;
  }
  .main-nav.nav-chips,
  .scope-switcher.nav-chips {
    flex-wrap: nowrap;
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-rail-wrap {
    grid-area: nav;
    min-width: 0;
  }
  .mod-nav-btn {
    display: none !important;
  }
  .nav-rail-wrap {
    position: relative;
  }
  .nav-scroll-hint {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: auto;
    pointer-events: auto;
    cursor: pointer;
    color: #9affc0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 8px #000;
  }
  .nav-scroll-hint--prev {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0));
  }
  .nav-scroll-hint--next {
    right: 0;
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0));
  }
}

/* Desktop: logo, System y botones en el mismo centro. Rótulos un poco más abajo. */
@media (min-width: 721px) {
  .header-shell {
    align-items: center;
    padding: 8px 0 4px;
  }
  .header-shell .brand,
  .header-shell .header-actions {
    margin-bottom: 0;
    align-self: center;
  }
  .nav-rail {
    align-items: center;
  }
  .nav-zone-stack {
    position: relative;
    justify-content: center;
    gap: 0;
  }
  .nav-zone-label {
    position: absolute;
    top: calc(100% + 8px);
    left: 2px;
    padding: 0;
    white-space: nowrap;
  }
  .nav-rail-sep {
    align-self: center;
    height: 28px;
    margin: 0;
  }
  #comercial-line.comercial-line {
    margin-top: 0;
  }
  .main-nav.nav-chips {
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-scroll-hint {
    display: none !important;
  }
  /* Flechitas de Módulos (Jorge 1a, 1/12/2026): encima del borde, solo del lado que tiene más. */
  .modules-carousel {
    position: relative;
  }
  .modules-carousel > .mod-nav-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0 0 2px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 0 10px 9px rgba(0, 0, 0, 0.92);
  }
  .modules-carousel > #mod-prev {
    left: 0;
  }
  .modules-carousel > #mod-next {
    right: 0;
  }
  .modules-carousel > .mod-nav-btn[hidden] {
    display: none !important;
  }
}

/* Shell: el zoom del body no deja hueco negro. La versión queda al pie.
   Una sola grilla (.grid-fill) llega hasta esa línea. */
body:not(.mode-login) {
  display: flex;
  flex-direction: column;
  height: calc(100dvh / var(--ui-zoom));
  min-height: calc(100dvh / var(--ui-zoom));
  max-height: calc(100dvh / var(--ui-zoom));
  overflow: hidden;
}
html.detail-shell-active body:not(.mode-login) {
  height: calc(100dvh / var(--ui-zoom));
  max-height: calc(100dvh / var(--ui-zoom));
  overflow: hidden;
}
body:not(.mode-login) > .site-header {
  flex: 0 0 auto;
}
#app-screen.app-main {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
#app-screen > .footer {
  flex: 0 0 auto;
}
#app-screen > .view-panel:not([hidden]):not(.detail-shell) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
#app-screen > .view-panel.detail-shell:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.header-shell > .nav-rail-wrap {
  grid-area: nav;
  position: relative;
  min-width: 0;
  display: flex;
  align-items: flex-end;
}
.header-shell > .nav-rail-wrap > .nav-rail {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
#app-screen > .view-panel.grid-fill:not([hidden]):not(.is-ppt-ficha):not(:has(#alo-ppt-form-panel:not([hidden]))) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#app-screen > .view-panel.grid-fill.is-ppt-ficha:not([hidden]),
#app-screen > .view-panel.grid-fill:not([hidden]):has(#alo-ppt-form-panel:not([hidden])) {
  display: block;
  overflow: auto;
}
#app-screen > .view-panel.grid-fill:not([hidden]) > * {
  flex: 0 0 auto;
}
#app-screen > .view-panel.grid-fill:not([hidden]) > *:not([hidden]):has(.table-wrap--excel) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.view-panel.grid-fill .hero,
.view-panel.grid-fill .sub-nav,
.view-panel.grid-fill .detail-back-bar {
  flex: 0 0 auto;
}
.view-panel.grid-fill .panel:not([hidden]):has(> .table-wrap--excel) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
}
#view-crm.grid-fill #crm-list-shell > :not(.panel) {
  flex: 0 0 auto;
}
.view-panel.grid-fill .panel:not([hidden]):has(> .table-wrap--excel) > :not(.table-wrap--excel) {
  flex: 0 0 auto;
}
.view-panel.grid-fill .table-wrap--excel {
  min-height: 0 !important;
}
.view-panel.grid-fill .table-wrap--excel:not(.is-h-user) {
  flex: 1 1 auto;
  height: auto !important;
  max-height: none !important;
}
.view-panel.grid-fill .table-wrap--excel.is-h-user {
  flex: 0 0 auto;
}
/* Tareas: la grilla scrollea adentro. Los tildes quedan en el ancho de la ventana. */
#view-tareas,
#view-tareas > .panel,
#view-tareas .oms-filters--row,
#view-tareas .table-wrap--excel {
  min-width: 0;
  max-width: 100%;
}
#view-tareas .table-wrap--excel,
#view-avisos .table-wrap--excel {
  width: 100%;
  overflow: auto;
  max-height: calc(100dvh - 220px);
}
#view-avisos .table-wrap--excel {
  -webkit-overflow-scrolling: touch;
}
#view-avisos #avisos-table {
  width: max-content;
  min-width: 100%;
}
#view-tareas #tar-table {
  width: max-content;
  min-width: 100%;
}
#view-tareas #tar-chips {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 0 4px;
  width: auto;
}
#view-motos.is-ppt-ficha > .oms-motos-panel,
#view-aloise:has(#alo-ppt-form-panel:not([hidden])) > #alo-oms-grilla-panel {
  display: none !important;
}
#alo-ppt-sku-suggest .producto-suggest-item {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 5px 8px;
}
/* Artículo recién sumado desde el buscador: la lista queda abierta y el renglón se ilumina un momento */
/* Fotito a la izquierda (Jorge, 2/12/2026): mismo tamaño que la de Motos, los dos renglones al lado. */
#alo-ppt-sku-suggest .producto-suggest-item.alo-ppt-con-foto {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
#alo-ppt-sku-suggest .alo-ppt-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
#alo-ppt-sku-suggest .alo-ppt-pick.alo-ppt-thumb-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}
#alo-ppt-sku-suggest .alo-ppt-pick.alo-ppt-thumb-btn .ppt-suggest-thumb {
  margin-right: 0;
}
#alo-ppt-sku-suggest .alo-ppt-thumb-vacia {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}
#alo-ppt-sku-suggest .producto-suggest-item.is-sumado {
  animation: alo-ppt-sumado 1.6s ease-out;
}
@keyframes alo-ppt-sumado {
  0%, 35% { background: rgba(46, 204, 113, 0.18); box-shadow: inset 3px 0 0 #2ecc71; }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}
#alo-ppt-sku-suggest .alo-ppt-suggest-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}
#alo-ppt-sku-suggest .producto-suggest-main,
#alo-ppt-sku-suggest .alo-ppt-pick {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}
#alo-ppt-sku-suggest .alo-ppt-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
}
#alo-ppt-sku-suggest .alo-ppt-actions-btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
#alo-ppt-sku-suggest .ppt-moto-cuotas,
#alo-ppt-sku-suggest .alo-ppt-ver {
  margin-right: 0;
  flex: 0 0 auto;
  text-decoration: none;
}
#alo-ppt-sku-suggest .producto-suggest-main strong,
#alo-ppt-sku-suggest .alo-ppt-meta-txt {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#alo-ppt-sku-suggest .alo-ppt-meta-txt {
  opacity: 0.88;
}
#alo-ppt-sku-suggest .alo-stock-chips {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0;
  justify-content: flex-end;
}
#alo-ppt-sku-suggest .alo-stock-chip {
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}
#alo-ppt-sku-suggest .alo-ppt-precios {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 0.72rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
#alo-ppt-sku-suggest .alo-ppt-precio {
  color: var(--muted, #9aa);
}
#alo-ppt-sku-suggest .alo-ppt-precio-lista[title],
.ppt-linea-lista-gris[title] {
  cursor: help;
}
#alo-ppt-sku-suggest .alo-ppt-precio-oferta {
  color: #f6a4c8;
  font-weight: 700;
}
#alo-ppt-sku-suggest .alo-ppt-precio-ok {
  color: var(--green-soft, #9ff0b8);
  font-weight: 700;
}
.alo-stock-chips {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}
.alo-stock-chip {
  font-size: 0.7rem;
  line-height: 1.25;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}
.alo-stock-chip.is-zero {
  font-weight: 600;
  opacity: 0.38;
}
.alo-stock-chip--ens.is-on {
  color: #04140a;
  background: #35e66b;
  border-color: #35e66b;
}
.alo-stock-chip--ens.is-zero {
  color: #35e66b;
  background: rgba(53, 230, 107, 0.06);
  border-color: rgba(53, 230, 107, 0.28);
}
.alo-stock-chip--brs.is-on {
  color: #041018;
  background: #7eb6ff;
  border-color: #7eb6ff;
}
.alo-stock-chip--brs.is-zero {
  color: #7eb6ff;
  background: rgba(126, 182, 255, 0.06);
  border-color: rgba(126, 182, 255, 0.28);
}
.alo-stock-chip--r2.is-on {
  color: #04140a;
  background: #3dbe6a;
  border-color: #3dbe6a;
}
.alo-stock-chip--r2.is-zero {
  color: #b6f5c4;
  background: rgba(36, 140, 70, 0.1);
  border-color: rgba(80, 200, 110, 0.3);
}
.alo-stock-chip--mdq.is-on {
  color: #2a0610;
  background: #f0a0bc;
  border-color: #e090b0;
}
.alo-stock-chip--mdq.is-zero {
  color: #ffd0e0;
  background: rgba(170, 40, 90, 0.1);
  border-color: rgba(230, 90, 140, 0.3);
}
.aloise-cat-picker { display: flex; flex-direction: column; gap: 8px; }
.aloise-cat-hits {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}
.aloise-cat-selected { display: flex; flex-wrap: wrap; gap: 6px; }
.aloise-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(53, 230, 107, 0.35);
  background: rgba(53, 230, 107, 0.08);
  font-size: 0.78rem;
}
.aloise-cat-x {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

.agora-modal-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.agora-modal-help-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #0c1210 0%, #060806 100%);
  border-radius: 16px;
  overflow: auto;
  padding: 14px 16px 18px;
}
.agora-modal-help-layer[hidden] { display: none !important; }
.agora-modal-help-bar { flex: 0 0 auto; margin-bottom: 12px; }
.agora-help-layer-body { min-height: 0; }
.detail-shell > .detail-back-bar,
.detail-back-bar.ppt-ficha-back {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.detail-back-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.detail-back-bar > .link-back {
  margin-right: auto;
}
.detail-back-bar .task-pin,
.detail-back-bar .aviso-pin,
.detail-back-bar .agora-help-btn {
  margin-left: 0;
  flex: 0 0 auto;
}
.detail-back-bar > .agora-corner {
  margin-left: auto;
}

/* Abastecimiento: la celda queda negra. El color vive en la ficha o en el número. */
.ab-renglon {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.ab-renglon:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
#ab-add { margin: 8px 0 12px; }
.abast-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
}
.abast-chip--ens { color: #35e66b; border-color: rgba(53, 230, 107, 0.45); background: rgba(53, 230, 107, 0.08); }
.abast-chip--brs { color: #7eb6ff; border-color: rgba(126, 182, 255, 0.5); background: rgba(80, 140, 230, 0.12); }
.abast-chip--r2 { color: #b6f5c4; border-color: rgba(80, 200, 110, 0.65); background: rgba(36, 140, 70, 0.35); }
.abast-chip--mdq { color: #ffd0e0; border-color: rgba(230, 90, 140, 0.7); background: rgba(170, 40, 90, 0.38); }
.abast-chip--otro { color: #c8c4b8; border-color: rgba(200, 196, 184, 0.35); background: rgba(255, 255, 255, 0.04); }
.abast-chip--si { color: #35e66b; border-color: rgba(53, 230, 107, 0.45); background: rgba(53, 230, 107, 0.08); }
.abast-chip--ope { color: #ff8f73; border-color: rgba(255, 143, 115, 0.5); background: rgba(255, 120, 90, 0.1); cursor: pointer; }
.abast-chip--desde { color: #ffb347; border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 179, 71, 0.08); }
.abast-chip--venta { color: var(--text); border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); }
.abast-chip--ingreso { color: #5ee0c3; border-color: rgba(94, 224, 195, 0.45); background: rgba(94, 224, 195, 0.08); }
.abast-chip--extra { color: #ff7a59; border-color: rgba(255, 122, 89, 0.5); background: rgba(255, 122, 89, 0.1); }
/* Red de seguridad del plan (30/11/2026): Sin explicar y Se repone al facturar, arriba de la grilla. */
.abast-control { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 6px; }
.abast-control-btn { cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 700; }
.abast-chip--sug { color: #e4c56a; border-color: rgba(228, 197, 106, 0.5); background: rgba(228, 197, 106, 0.08); }
.abast-chip--pase { color: #c8c4b8; border-color: rgba(200, 196, 184, 0.4); background: rgba(255, 255, 255, 0.04); }
.abast-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.abast-num--ambar { color: #ffb347; }
.abast-num--rojo { color: #ff6b6b; }
.abast-num--amarillo { color: #ffe14a; }
.abast-num--gris { color: #9aa0a6; }
.abast-num--celeste { color: #7ee7f0; }
.abast-num--verde { color: #35e66b; }
.abast-real { color: var(--muted); font-weight: 500; font-size: 0.78rem; }
.abast-no { font-weight: 700; }
.abast-marca { font-size: 0.68rem; margin-left: 6px; font-weight: 700; }
.abast-marca--hoy { color: #7dff9f; }
.abast-marca--ayer { color: #7eb6ff; }
.abast-luz {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb347;
  margin-left: 6px;
  vertical-align: middle;
}
.abast-obs {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.75rem;
}
.abast-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 0 0 12px;
}
.abast-kpi > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
.abast-kpi span { display: block; color: var(--muted); font-size: 0.75rem; }
.abast-kpi b { display: block; margin-top: 4px; font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.abast-kpi p { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; }
.abast-stock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin: 0 0 12px;
}
.abast-stock-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 9.5rem;
}
.abast-stock-item .abast-real { color: #9aa0a6; }
#alo-abast-panel > .oms-filters--row.abast-barra {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  overflow: visible;
  margin-bottom: 8px;
}
#alo-abast-panel .abast-botones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
#alo-abast-panel .abast-botones:not(:has(button:not([hidden]))) {
  display: contents;
}
#alo-abast-corte { display: contents; }
#alo-abast-corte .chk-row { display: contents; }
#alo-abast-leyenda {
  flex: 1 1 220px;
  margin: 0;
  line-height: 1.25;
}
#alo-abast-ayuda { margin-left: auto; align-self: center; flex: 0 0 auto; }
#view-aloise-abastecimiento .hero-actions { flex-wrap: wrap; justify-content: flex-end; }
.abast-clave { margin: 10px 0 8px; }
.ab-pedir { width: 100%; margin: 8px 0 12px; border-collapse: collapse; }
.ab-pedir th, .ab-pedir td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.ab-pedir .agora-input { width: 5.5rem; }
.ab-sel { width: 16px; height: 16px; accent-color: #7dcea0; }
#alo-abast-table th[data-col="sel"],
#alo-abast-table td[data-col="sel"] { width: 52px; max-width: 52px; text-align: center; }
.ab-sug-tabla tbody tr { cursor: pointer; }
.abast-grupo { margin: 0 0 14px; }
.abast-td-decision, th[data-col="decision"] { width: 5.2rem; text-align: center; }
.abast-decision {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #141414;
  border: 1px solid #3a3a3a;
  vertical-align: middle;
}
.abast-decision.is-on {
  background: #f4f4f4;
  border-color: #f4f4f4;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}
.abast-decision.is-done {
  background: #7dcea0;
  border-color: #7dcea0;
  box-shadow: 0 0 6px rgba(125, 206, 160, 0.55);
}

/* Abastecimiento en dos líneas, filtros de un toque, foto al apoyar, Web ↗, Ingreso nuevo en bloques y
   Armar solicitudes por SOL (Jorge 1a 2a, 1/12/2026). */
.abast-l1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.abast-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.abast-sub.is-ambar { color: #f0b429; }
.abast-sub.is-rojo { color: #ff6b6b; }
.abast-sub.is-verde { color: #35e66b; }
.abast-sub.is-celeste { color: #7eb6ff; }
/* Versus «No se repuso» (3/12/2026): rojo suave, lleno cuando filtra. Celdas de una línea. */
.abast-loc--norepuso { color: #ff6b6b; background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.6); }
.abast-loc--norepuso.is-on { color: #1a0606; background: #ff6b6b; border-color: #ff6b6b; }
#alo-abast-table[data-cols^="versus|"] td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.abast-sel-luz { display: inline-flex; align-items: center; gap: 8px; }
.abast-prod-cel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.abast-prod {
  flex: 1 1 auto;
  min-width: 0;
  -webkit-touch-callout: none;
}
.abast-web {
  flex: 0 0 auto;
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid rgba(126, 182, 255, 0.5);
  border-radius: 999px;
  color: #7eb6ff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  white-space: nowrap;
}
.abast-web:hover { background: rgba(80, 140, 230, 0.14); }
.abast-web.is-off {
  color: #6f747a;
  border-color: rgba(255, 255, 255, 0.14);
  cursor: not-allowed;
}
.abast-web.is-off:hover { background: transparent; }
.abast-off {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 89, 0.5);
  color: #ff7a59;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
}
.abast-toques { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.abast-toque {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.abast-toque b { margin-left: 3px; font-variant-numeric: tabular-nums; color: var(--muted); }
.abast-toque.is-hay b { color: #ffb347; }
.abast-toque.is-on {
  color: #04140a;
  background: #35e66b;
  border-color: #35e66b;
}
.abast-toque.is-on b { color: #04140a; }
/* Tarjeta de la foto: cuelga de <html> (sin el zoom del body) y se escala con --ui-zoom, como el globito. */
.abast-foto-card {
  position: fixed;
  z-index: 10090;
  width: calc(300px * var(--ui-zoom));
  max-width: calc(100vw - 16px);
  padding: calc(8px * var(--ui-zoom));
  background: #121816;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: calc(12px * var(--ui-zoom));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-family: "Montserrat", sans-serif;
  font-size: calc(13px * var(--ui-zoom));
  pointer-events: none;
}
.abast-foto-card[hidden] { display: none; }
.abast-foto-nombre {
  margin: 0 0 calc(6px * var(--ui-zoom));
  line-height: 1.3;
  font-weight: 600;
}
.abast-foto-img {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(120px * var(--ui-zoom));
  border-radius: calc(8px * var(--ui-zoom));
  background: #fff;
  overflow: hidden;
}
.abast-foto-img img {
  display: block;
  max-width: 100%;
  max-height: calc(300px * var(--ui-zoom));
  object-fit: contain;
}
.abast-foto-img .abast-real { color: #555; padding: calc(10px * var(--ui-zoom)); }
/* Tablas chicas de los popups (Ingreso nuevo, Armar solicitudes). */
.abast-tabla-wrap { overflow-x: auto; }
.abast-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.abast-tabla th,
.abast-tabla td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.abast-tabla thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.74rem;
  white-space: nowrap;
}
.abast-tabla--num td,
.abast-tabla--num thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.abast-tabla tbody th { text-align: left; font-weight: 500; }
/* Aprendizaje de Sale de (1/12/2026): cada celda en varias líneas, botones con aire. */
.abast-apr-tabs { margin: 12px 0 8px; }
.abast-apr .abast-tabla td { vertical-align: top; }
.abast-apr .abast-tabla .abast-sub { white-space: normal; }
.abast-apr-ver { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.abast-apr-ver .agora-input { flex: 1 1 100%; min-width: 0; }
.abast-pop-cabeza {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
}
.abast-pop-titulo { margin: 0 0 4px; font-weight: 600; }
.abast-pop-cabeza .abast-real { margin: 0; }
.abast-linea { margin: 0; }
/* Tarjeta ya cargada en ITRIS (3/12/2026): verde quieto y más tenue, para que se vea qué falta. */
.abast-sol-card.is-cargada { border-color: rgba(53, 230, 107, 0.55); opacity: 0.72; }
.abast-sol-card.is-cargada .abast-sol-card-t b { color: #35e66b; }
.abast-sol-card {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.abast-sol-card-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.abast-sol-card-t { margin: 0; line-height: 1.6; }
.abast-sol-card-cuando { margin: 8px 0 10px; color: #e6c15a; }
.abast-sol-card-pie { margin: 10px 0 0; }
.abast-pedir-itris {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.abast-tabla-de { color: var(--muted); }
@media (hover: none) {
  .abast-prod { -webkit-user-select: none; user-select: none; }
}
@media (max-width: 720px) {
  .abast-pop-cabeza { flex-wrap: wrap; }
  .abast-tabla th,
  .abast-tabla td { padding: 6px 8px; }
}
.ab-par { display: flex; align-items: flex-end; gap: 8px; grid-column: 1 / -1; }
.ab-par .medios-field { flex: 1 1 0; }
.ab-swap {
  width: 36px;
  height: 36px;
  margin-bottom: 2px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex: 0 0 36px;
}
.ab-swap span { display: block; font-size: 11px; }
.ab-sku-hits { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ab-sku-hit {
  text-align: left;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}
.abast-historia { color: var(--muted); margin: 8px 0; }
.abast-aviso { color: #e6c15a; margin: 8px 0; }
.abast-obs-n {
  min-width: 1.8rem;
  height: 1.6rem;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
@media (max-width: 720px) {
  .abast-kpi { grid-template-columns: 1fr; }
}
.abast-kpi.is-verde > div:first-child { box-shadow: inset 3px 0 0 #3dd68c; }
.abast-kpi.is-roja > div:first-child { box-shadow: inset 3px 0 0 #e85d5d; }
.abast-corte { margin: 0 0 10px; }
/* Tipo de pedido a simple vista (Jorge, 3/12/2026). */
.abast-tipo { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 0.92em; white-space: nowrap; border: 1px solid transparent; }
.abast-tipo.tipo-venta { color: #9fd0ff; border-color: rgba(120, 180, 255, 0.45); background: rgba(80, 140, 230, 0.12); }
.abast-tipo.tipo-repo { color: #b9e4b9; border-color: rgba(120, 200, 120, 0.4); background: rgba(90, 170, 90, 0.1); }
.abast-tipo.tipo-ingreso { color: #d9c7ff; border-color: rgba(180, 150, 255, 0.45); background: rgba(150, 120, 240, 0.12); }
.abast-tipo.tipo-extra { color: #f6c97a; border-color: rgba(240, 180, 41, 0.5); background: rgba(240, 180, 41, 0.1); }
.abast-tipo.tipo-pase { color: #e0e0e0; border-color: rgba(200, 200, 200, 0.35); background: rgba(200, 200, 200, 0.08); }
/* Frenado esperando el reingreso (Jorge 1b, 3/12/2026): titila hasta que Joaquín decide. */
@keyframes abast-titila { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.abast-titila { animation: abast-titila 1.6s ease-in-out infinite; }
.abast-esperando-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.abast-versus-frase {
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted, #9aa0a6);
  margin: 0;
  white-space: nowrap;
}
#alo-abast-panel.is-versus > .abast-barra,
#alo-abast-panel.is-versus .abast-botones {
  flex-wrap: nowrap;
  align-items: center;
}
#alo-abast-panel.is-versus > .abast-barra {
  padding-top: 10px;
}
.abast-versus-fecha {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}
.abast-versus-fecha > span {
  position: absolute;
  top: -0.55em;
  left: 10px;
  z-index: 1;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--muted, #9aa0a6);
  background: var(--bg, #030403);
  pointer-events: none;
}
.abast-versus-fecha input.agora-input {
  display: block;
  width: 8.2rem;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 4px 8px;
}
.abast-loc {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  flex: 0 0 auto;
}
.abast-loc--ambos,
.abast-loc--ambos.is-on {
  color: var(--text);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}
.abast-loc--ambos.is-on {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
}
.abast-loc--ens,
.abast-loc--ens.is-on {
  color: #04140a;
  background: #35e66b;
  border-color: #35e66b;
}
.abast-loc--ens:not(.is-on) {
  color: #35e66b;
  background: rgba(53, 230, 107, 0.14);
  border-color: rgba(53, 230, 107, 0.75);
}
.abast-loc--brs,
.abast-loc--brs.is-on {
  color: #041018;
  background: #7eb6ff;
  border-color: #7eb6ff;
}
.abast-loc--brs:not(.is-on) {
  color: #7eb6ff;
  background: rgba(126, 182, 255, 0.14);
  border-color: rgba(126, 182, 255, 0.75);
}
.abast-baldes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
.abast-balde {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 190px;
  background: rgba(0, 0, 0, 0.35);
}
.abast-balde strong { display: block; font-size: 0.78rem; margin-bottom: 4px; }
.abast-sug {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 10px;
}
.abast-sug p { margin: 6px 0; }
.abast-cant-mini { width: 64px; margin-left: 6px; display: inline-block; }
.abast-sol-input { max-width: 180px; }
.abast-hilo {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  background: rgba(0, 0, 0, 0.35);
}
.abast-hilo p { margin: 0 0 6px; }
.abast-ev span { color: var(--muted); }
.abast-ev--obs { color: #e6c15a; }
.abast-ev--anulado { color: #d7a3a3; }
.abast-obs-sum {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.abast-stock-line { font-size: 0.85rem; }
.abast-busqueda + .abast-busqueda { margin-top: 18px; }
.abast-cerrar-busqueda { margin-bottom: 8px; }

.log-recorrido {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 14px;
  border-left: 2px solid var(--line);
}
.log-recorrido > li {
  position: relative;
  margin: 0 0 14px;
  padding: 8px 0 8px 10px;
}
.log-recorrido > li::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.log-recorrido > li.log-punto::before { background: var(--green); }
.log-recorrido > li.log-fija::before { background: #d9a400; }
.log-recorrido .log-punto { color: var(--muted); }
.log-recorrido p { margin: 4px 0; line-height: 1.4; }
.log-recorrido .form-actions { margin-top: 10px; gap: 10px; flex-wrap: wrap; }
/* Detalle de la parada (Jorge, 1/12/2026): una línea con la cuenta + «Ver detalle» en popup. */
.log-det-resumen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 8px 0 4px;
}
.log-det-chip { font-size: 0.85rem; color: var(--text); }
.log-det-chip strong { color: var(--muted); font-weight: 600; }
.log-det-bloque + .log-det-bloque { margin-top: 22px; }
.log-det-bloque h3 { margin: 0 0 6px; font-size: 1rem; }
.log-det-bloque > .help { margin: 0 0 10px; }
.log-det-tabla-wrap { overflow-x: auto; }
.log-det-tabla { width: 100%; border-collapse: collapse; }
.log-det-tabla th,
.log-det-tabla td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.log-det-tabla th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.log-det-num { text-align: right; white-space: nowrap; }
.log-det-tarjetas { display: none; list-style: none; margin: 0; padding: 0; }
.log-det-tarjetas li {
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.log-det-tarjetas li + li { margin-top: 10px; }
.log-det-tarjetas p { margin: 0 0 4px; line-height: 1.4; }
.log-det-prod { font-weight: 700; }
.log-det-deps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.log-det-tabla .abast-chip { font-size: 0.78rem; }
.log-det-tabla td .btn-sm { white-space: nowrap; }
.log-det-tarjetas .form-actions { margin-top: 8px; }
/* Por qué así (Jorge 4.a, 1/12/2026): una línea por decisión, con aire. */
.log-porque { margin: 10px 0 12px; }
.log-porque > p { margin: 0 0 4px; }
.log-porque ul { margin: 0; padding-left: 18px; }
.log-porque li { margin: 3px 0; line-height: 1.4; }
/* Llegué en Ruta 2 o en un local (Jorge 6.a): «Sí, todo» o lo que faltó con su motivo. */
.log-llegue h3 { margin: 0 0 8px; font-size: 1rem; }
.log-llegue section + section { margin-top: 18px; }
.log-llegue .form-actions { margin-top: 16px; gap: 10px; flex-wrap: wrap; }
.log-llegue-lista { list-style: none; margin: 0; padding: 0; }
.log-llegue-lista li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.log-llegue-lista li + li { margin-top: 8px; }
.log-llegue-lista .log-llegue-prod { flex: 1 1 220px; line-height: 1.4; }
.log-llegue-lista select.agora-input { min-width: 190px; }
.log-llegue-lista li.is-falto { border-color: #e0b030; }
/* Terminé con lista (Jorge 1.a, 1/12/2026): dos botones grandes arriba, buscador que queda a la
   vista, la lista por remito en filas compactas (una fila = un renglón) y los motivos de un toque. */
.log-ter-preg { margin: 0 0 10px; font-size: 1rem; }
.log-ter-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.log-ter-botones > button { flex: 1 1 150px; min-height: 52px; font-size: 1.02rem; font-weight: 700; }
.log-ter-modo { margin: 0; line-height: 1.6; }
.log-ter-modo .log-chofer-link { margin-left: 6px; color: var(--text); }
.log-ter .log-ter-hora { display: flex; flex-flow: row wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.log-ter .log-ter-hora input.agora-input { flex: 0 0 96px; width: 96px; max-width: 96px; }
.log-ter .log-ter-hora .help { margin: 0; }
.log-ter-buscar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 14px 0 8px;
  padding: 8px 0;
  background: #0a0f0d;
  border-bottom: 1px solid var(--line);
}
.log-ter-buscar-fila { display: flex; align-items: center; gap: 12px; }
.log-ter-buscar-fila input.agora-input { flex: 1 1 auto; min-width: 0; }
.log-ter-buscar-fila .help { flex: 0 0 auto; white-space: nowrap; }
.log-ter-msg { margin: 0; color: #e0b030; font-weight: 600; line-height: 1.4; }
.log-ter-msg:not(:empty) { margin-top: 8px; }
.log-ter-sec + .log-ter-sec { margin-top: 18px; }
.log-ter-sec > h3 { margin: 0 0 6px; font-size: 0.98rem; }
.log-ter-sec--hoy > h3 { color: #b6f5c9; }
.log-ter-filas { list-style: none; margin: 0; padding: 0; }
.log-ter-filas > li {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  line-height: 1.35;
}
.log-ter-filas > li[hidden] { display: none; }
.log-ter-filas > li.log-ter-cab { padding: 2px 8px 4px; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.log-ter-filas > li.log-ter-grupo {
  display: block;
  margin-top: 8px;
  padding: 6px 8px;
  border-bottom: 0;
  border-radius: 6px;
  font-weight: 600;
  color: var(--green-soft, #7fd8a6);
  background: rgba(61, 220, 132, 0.06);
}
.log-ter-filas > li.log-ter-grupo[hidden] { display: none; }
.log-ter-prod, .log-ter-para { min-width: 0; overflow-wrap: anywhere; }
.log-ter-prod strong { font-weight: 600; }
.log-ter-para { color: var(--muted); font-size: 0.9rem; }
.log-ter-chk { justify-self: end; padding: 5px 10px; white-space: nowrap; }
.log-ter-chk:has(input:checked) { border-color: #e0b030; background: rgba(245, 185, 66, 0.14); box-shadow: none; }
.log-ter-chk input { accent-color: #e0b030; }
.log-ter-filas > li.is-falto { background: rgba(245, 185, 66, 0.07); box-shadow: inset 3px 0 0 #e0b030; }
.log-ter-motivos { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0 4px; }
.log-ter-motivos[hidden] { display: none; }
.log-ter-motivos button.is-on { border-color: #e0b030; color: #ffd98a; background: rgba(245, 185, 66, 0.16); }
.log-ter-motivos input.agora-input { flex: 1 1 220px; min-width: 0; }
.log-ter-filas > li.is-sin-motivo .log-ter-motivos { outline: 1px dashed #e0b030; outline-offset: 3px; border-radius: 6px; }
.log-aviso { color: #e0b030; }
.log-salida + .log-salida { margin-top: 18px; }
/* Aire en la salida (Jorge, 1/12/2026): Chofer, Salió y la línea de pases no van pegados. */
.log-salida > p { margin: 6px 0; line-height: 1.4; }
.log-salida > .log-det-resumen { margin: 12px 0; }
.log-salida > .medios-field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin: 14px 0 0; }
.log-salida > .form-actions { margin: 14px 0 18px; gap: 10px; flex-wrap: wrap; }
.log-salida > .form-actions:empty { margin: 0 0 12px; }
.log-salida > .log-recorrido { margin-top: 8px; }
.log-chofer { display: flex; flex-direction: column; gap: 8px; }
.log-chofer-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* La línea del recorrido de quien maneja (Jorge 1.a, 1/12/2026): lo hecho plegado en verde, la
   parada de ahora abierta con borde verde, lo que sigue en gris. Una sola línea de arriba abajo. */
.log-linea { max-width: 760px; }
.log-linea + .log-linea { margin-top: 24px; }
.log-linea > .log-recorrido > li { margin-bottom: 10px; padding: 6px 0 6px 12px; }
.log-linea li.log-hecha::before { background: rgba(53, 230, 107, 0.6); }
.log-linea li.log-hecha > p:first-child strong { color: var(--green-soft, #7fd8a6); font-weight: 600; }
.log-linea li.log-hecha .log-hecho-linea { margin-bottom: 0; }
.log-linea li.log-espera::before { background: var(--line); }
.log-linea li.log-espera strong { color: #cfd6d1; font-weight: 600; }
.log-linea li.log-espera .btn-sm { margin-left: 6px; padding: 4px 10px; }
.log-linea > .log-recorrido > li.log-actual {
  margin: 14px 0;
  padding: 12px 14px 14px;
  border: 1px solid rgba(53, 230, 107, 0.75);
  border-radius: 12px;
  background: rgba(53, 230, 107, 0.08);
  color: var(--text);
}
.log-linea li.log-actual::before { background: var(--green); box-shadow: 0 0 0 4px rgba(53, 230, 107, 0.22); }
.app-main .log-linea .log-actual-titulo { margin: 2px 0 6px; font-size: 1.3rem; line-height: 1.2; }
/* El chofer lo lee en la calle: las filas plegadas no bajan de un tamaño legible. */
.app-main .log-linea li.log-espera > p,
.app-main .log-linea li.log-hecha > p,
.app-main .log-linea li.log-punto > p { font-size: 0.86rem; }
.app-main .log-linea li.log-espera .help,
.app-main .log-linea li.log-punto .help,
.app-main .log-linea .log-hecho-linea { font-size: 0.8rem; }
.log-linea li.log-actual > p { margin: 0 0 6px; font-size: 0.95rem; line-height: 1.4; }
.log-linea li.log-actual .log-det-resumen { margin: 10px 0 4px; }
.log-linea .log-linea-camion { margin: 10px 0 0; }
.log-linea .log-chofer-acciones > * { max-width: 280px; }
.log-linea .log-chofer-acciones > .log-linea-antes { flex: 0 0 auto; min-height: 0; font-size: 0.85rem; }
.log-chofer-dir { font-weight: 600; }
/* No te olvides y la hora de llegada (Jorge, 1/12/2026). */
.log-chofer-ojo { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--amber, #f5b942); background: rgba(245, 185, 66, 0.08); border-radius: 6px; }
.log-chofer-llego { color: var(--green-soft, #7fd8a6); font-weight: 600; }
/* El botón que sigue titila, solo a quien maneja (Jorge 1a 2a, 1/12/2026). */
.log-sigue:not(:disabled) { animation: recibo-sena-titila 1.15s ease-in-out infinite; border-color: #3ddc84; }
.log-chofer-sigue { margin: 8px 0 4px; color: #b6f5c9; font-weight: 600; }
/* Admins y encargados: qué le toca al chofer, quieto; ámbar si tarda (Jorge 1a 2a, 1/12/2026). */
.log-toca:not(:disabled) { border-color: #3ddc84; box-shadow: 0 0 0 1px rgba(61, 220, 132, 0.35); }
.log-toca-nota { max-width: 620px; margin: 10px 0; padding: 8px 12px; border-left: 3px solid #3ddc84; background: rgba(61, 220, 132, 0.07); border-radius: 6px; }
.log-toca-nota p { margin: 0 0 4px; }
.log-toca-nota p:last-child { margin-bottom: 0; }
.log-toca-nota.is-tarde { border-left-color: var(--amber, #f5b942); background: rgba(245, 185, 66, 0.1); }
.log-toca-tarde { color: var(--amber, #f5b942); font-weight: 600; }
/* Ruta 2 por remito (Jorge 1.a, 1/12/2026): cabecera por remito, lo de hoy en verde, preguntar en ámbar. */
.log-det-tabla tr.log-det-grupo td { padding-top: 12px; font-weight: 600; color: var(--green-soft, #7fd8a6); background: rgba(61, 220, 132, 0.05); }
.log-det-tarjetas li.log-det-grupo { list-style: none; margin: 12px 0 4px; font-weight: 600; color: var(--green-soft, #7fd8a6); }
.log-det-chip--hoy,
.log-det-chip--preguntar { padding: 2px 8px; border: 1px solid; border-radius: 999px; }
.log-det-chip--hoy { border-color: #3ddc84; color: #b6f5c9; background: rgba(61, 220, 132, 0.08); }
.log-det-chip--preguntar { border-color: var(--amber, #f5b942); color: #ffd98a; background: rgba(245, 185, 66, 0.08); }
.log-det-chip--hoy strong, .log-det-chip--preguntar strong { color: inherit; }
.log-det-bloque--hoy > h3 { color: #b6f5c9; }
/* Paradas ya hechas: una línea gris con qué pasó (Jorge 2.a, 1/12/2026). */
.log-hecho-linea { margin: 2px 0 6px; color: var(--muted); font-size: 0.85rem; }
/* Lote del viernes 04/12 (Jorge 1.a 2.b 3.a, 1/12/2026). El error de un botón va al lado, en llano. */
.log-btn-error { margin: 6px 0 8px; padding: 6px 10px; border-left: 3px solid #ff7a6b; background: rgba(255, 122, 107, 0.1); border-radius: 6px; color: #ffb4aa; font-weight: 600; line-height: 1.4; }
.log-btn-error[hidden] { display: none; }
.log-btn-error .btn-sm { margin-left: 8px; }
/* «Voy acá ahora»: chico, debajo de la parada que sigue; no compite con el botón que titila. */
.log-linea li.log-espera .log-ahora-fila,
.log-ahora-fila { margin: 6px 0 2px; gap: 8px; }
.log-linea li.log-espera .log-ahora-fila .btn-sm { margin-left: 0; }
.log-ahora { font-size: 0.82rem; }
.log-linea-camion .log-no-entrega { margin-left: 14px; color: #ffd98a; }
.log-falta-chofer { margin: 10px 0; padding: 6px 10px; border-left: 3px solid var(--amber, #f5b942); background: rgba(245, 185, 66, 0.08); border-radius: 6px; }
/* Pedido y no remitido: lo que no se pregunta va plegado (Ya preguntado, Viejas o repetidas). */
.log-det-plegado { margin-top: 22px; }
.log-det-plegado > summary { cursor: pointer; list-style: none; }
.log-det-plegado > summary::-webkit-details-marker { display: none; }
.log-det-plegado > summary h3 { display: inline; margin: 0; font-size: 1rem; color: var(--muted); }
.log-det-plegado > summary::before { content: "▸ "; color: var(--muted); }
.log-det-plegado[open] > summary::before { content: "▾ "; }
.log-det-plegado[open] > summary { margin-bottom: 8px; }
.log-det-plegados { align-self: center; margin: 0 6px; }
/* Antes de Volvió: lo que quedó sin cerrar, en tabla. */
.log-abiertas { width: 100%; margin: 8px 0 12px; }
.log-abiertas td { padding: 6px 8px; }
.log-chofer-acciones {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 12px;
}
.log-chofer-acciones > * {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: auto;
  margin: 0;
  font-size: 0.95rem;
  box-sizing: border-box;
}
.log-chofer-pie { margin: 4px 0 0; }
.log-chofer-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 720px) {
  .log-recorrido { padding-left: 10px; }
  .log-recorrido .form-actions > * { min-height: 40px; }
  .log-linea .log-chofer-acciones > * { max-width: none; }
  .log-linea li.log-espera .btn-sm { min-height: 32px; }
  .app-main .log-linea .log-actual-titulo { font-size: 1.2rem; }
  /* Terminé en el celular: producto arriba, venta abajo y Faltó a la derecha; sin encabezado de columnas. */
  .log-ter-filas > li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 4px; }
  .log-ter-filas > li.log-ter-cab { display: none; }
  .log-ter-prod { grid-column: 1; grid-row: 1; }
  .log-ter-para { grid-column: 1; grid-row: 2; }
  .log-ter-chk { grid-column: 2; grid-row: 1 / span 2; min-height: 40px; }
  .log-ter-motivos { grid-row: 3; }
  .log-ter-motivos button { flex: 1 1 auto; min-height: 38px; }
  .log-ter-motivos input.agora-input { flex: 1 1 100%; }
  .log-det-tabla-wrap { display: none; }
  .log-det-tarjetas { display: block; }
  .log-det-resumen .btn-ghost { min-height: 40px; }
  .log-llegue .form-actions > * { flex: 1 1 auto; min-height: 40px; }
  .log-llegue-lista select.agora-input { flex: 1 1 100%; min-width: 0; }
  #view-logistica .hero { margin-bottom: 4px; }
  #view-logistica .oms-filters--row { gap: 8px; }
}

.log-salida-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}
.log-salida-row .log-salida-vehiculo {
  width: auto;
  min-width: 220px;
  max-width: 360px;
}
.log-chofer {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 200px;
}
.log-chofer > span {
  position: absolute;
  top: -0.55em;
  left: 10px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
  background: #0d110e;
  pointer-events: none;
}
.log-chofer > select {
  width: 100%;
}

.eti-imp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.eti-imp--blanca {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(245, 247, 245, 0.55);
}
.eti-imp--amarilla {
  color: #1a1408;
  background: #ffe08a;
}
.eti-imp--naranja {
  color: #1a1008;
  background: #ff9a3c;
}
.eti-imp--roja {
  color: #fff;
  background: #e23b3b;
}
.eti-pdf {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
  border-radius: 8px;
}

#app-screen > #view-precio:not([hidden]) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#view-precio > .precio-barra {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 10px;
  margin-bottom: 12px;
}
#view-precio > .precio-split {
  flex: 1 1 auto;
  min-height: 0;
}
#view-precio > .precio-split > * {
  min-height: 0;
}
#view-precio > .precio-barra h1 {
  margin: 0;
  flex: 0 0 auto;
}
#view-precio .precio-toolbar {
  display: flex;
  margin-top: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
}
@media (min-width: 1100px) {
  #view-precio > .precio-barra,
  #view-precio .precio-toolbar {
    flex-wrap: nowrap;
  }
}
.precio-raya {
  width: 1px;
  align-self: stretch;
  min-height: 22px;
  background: var(--line);
  flex: 0 0 1px;
}
.precio-modos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.precio-toolbar .btn-ghost.is-on {
  color: #04140a;
  background: #3dd68c;
  border-color: #3dd68c;
}
.precio-toolbar .btn-ghost.is-on[data-precio-oferta="1"] {
  color: #4a1616;
  background: #f0b8b8;
  border-color: #e09090;
}
.precio-split {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}
.precio-col {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
#precio-resultados {
  margin: 0;
  padding: 0 2px 0 0;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgba(210, 220, 210, 0.72) rgba(0, 0, 0, 0.35);
}
#precio-resultados::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
#precio-resultados::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}
#precio-resultados::-webkit-scrollbar-thumb {
  background: rgba(210, 220, 210, 0.72);
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.35);
}
.precio-hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  text-align: left;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  cursor: pointer;
}
.precio-hit.is-off {
  opacity: 0.55;
  cursor: default;
}
.precio-hit-sku {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted, #9aa0a6);
  font-weight: 700;
}
.precio-hit-titrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.precio-hit-tit {
  font-weight: 700;
  min-width: 0;
}
.precio-oferta-chip,
.precio-normal-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}
.precio-oferta-chip {
  color: #4a1616;
  background: #f0b8b8;
  border: 1px solid #e09090;
}
.precio-normal-chip {
  color: #04140a;
  background: #3dd68c;
  border: 1px solid #3dd68c;
}
.precio-hit-desc {
  display: block;
  min-height: 1.15em;
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--muted, #9aa0a6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.precio-ver {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}
.precio-ver .btn-ghost {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 0.78rem;
}
.precio-ver .btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.precio-ver .btn-ghost.is-on {
  color: #04140a;
  background: #3dd68c;
  border-color: #3dd68c;
}
.precio-ver .btn-ghost.is-on[data-precio-ver="oferta"] {
  color: #4a1616;
  background: #f0b8b8;
  border-color: #e09090;
}
.precio-ver .btn-ghost.abast-loc {
  min-height: 28px;
  padding: 2px 8px;
  font-size: 0.72rem;
}
.precio-ver .btn-ghost.abast-loc--ens.is-on {
  color: #04140a;
  background: #35e66b;
  border-color: #35e66b;
}
.precio-ver .btn-ghost.abast-loc--brs.is-on {
  color: #041018;
  background: #7eb6ff;
  border-color: #7eb6ff;
}
.precio-ver .btn-ghost.abast-loc--ens:not(.is-on) {
  color: #35e66b;
  background: rgba(53, 230, 107, 0.14);
  border-color: rgba(53, 230, 107, 0.75);
}
.precio-ver .btn-ghost.abast-loc--brs:not(.is-on) {
  color: #7eb6ff;
  background: rgba(126, 182, 255, 0.14);
  border-color: rgba(126, 182, 255, 0.75);
}
.precio-ver .btn-ghost.abast-loc--r2.is-on {
  color: #04140a;
  background: #3dbe6a;
  border-color: #3dbe6a;
}
.precio-ver .btn-ghost.abast-loc--r2:not(.is-on) {
  color: #b6f5c4;
  background: rgba(36, 140, 70, 0.28);
  border-color: rgba(80, 200, 110, 0.75);
}
.precio-ver .btn-ghost.abast-loc--mdq.is-on {
  color: #2a0610;
  background: #f0a0bc;
  border-color: #e090b0;
}
.precio-ver .btn-ghost.abast-loc--mdq:not(.is-on) {
  color: #ffd0e0;
  background: rgba(170, 40, 90, 0.28);
  border-color: rgba(230, 90, 140, 0.75);
}
.precio-hit-stock {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.precio-hit-stock .abast-chip.is-cero {
  color: rgba(180, 184, 176, 0.38);
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  font-weight: 600;
}
.precio-hit-stock .abast-chip.is-hay {
  padding: 2px 9px;
  font-size: 0.8rem;
}
.precio-hit-stock .abast-chip.is-hay b {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.precio-hit-stock .abast-chip.is-cero b {
  font-weight: 600;
}
.precio-hit-caras {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}
.precio-cara {
  min-width: 0;
}
.precio-cara-k {
  display: block;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--muted, #9aa0a6);
  font-weight: 600;
}
.precio-cara strong {
  display: block;
  margin-top: 1px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.15;
}
.precio-cara--tachado strong {
  color: var(--muted, #9aa0a6);
  text-decoration: line-through;
  font-weight: 700;
}
.precio-nota {
  font-size: 0.75rem;
  color: #ffb347;
}
.precio-hoja {
  min-height: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.precio-hoja-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.precio-hoja-head p {
  margin: 0;
  font-weight: 700;
}
.precio-hoja-head .btn-ghost:disabled {
  opacity: 0.45;
  cursor: default;
}
.precio-hoja-cuerpo {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.precio-hoja iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}
.precio-armando {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: rgba(6, 12, 10, 0.78);
  color: #e8efe9;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.precio-armando[hidden] {
  display: none;
}
.precio-vacio {
  flex: 1 1 auto;
  margin: 0;
  padding: 28px 16px;
  color: var(--muted, #9aa0a6);
}
#precio-msg.is-warn {
  color: #ffb347;
}
@media (max-width: 900px) {
  #app-screen > #view-precio:not([hidden]) {
    display: block;
    overflow: auto;
  }
  .precio-split {
    grid-template-columns: 1fr;
  }
  .precio-col {
    height: auto;
    overflow: visible;
  }
  #precio-resultados {
    max-height: 70vh;
    flex: none;
    overflow-y: auto;
  }
  .precio-hoja,
  .precio-hoja iframe,
  .precio-hoja-cuerpo {
    min-height: 70vh;
    height: auto;
  }
}

.header-lupa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
  flex: none;
}
.header-lupa:hover { color: var(--green, #9dccb0); }
.buscar-results { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.buscar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  text-decoration: none;
}
.buscar-item strong { font-size: 0.95rem; }
.buscar-detalle, .buscar-item .buscar-detalle { color: var(--muted, #9aa); font-size: 0.78rem; font-weight: 500; }
.buscar-luces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.buscar-luces .oms-luz { font-size: 0.72rem; }
#view-equipo .eq-dia-grilla td {
  vertical-align: middle;
  padding-top: 6px;
  padding-bottom: 6px;
}
#view-equipo .eq-dia-grilla .oms-luz {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  white-space: nowrap;
}
#view-equipo .eq-dia-grilla td.eq-dia-luz,
#view-equipo .eq-dia-grilla td.eq-dia-fichar {
  overflow: visible;
  max-width: none;
  white-space: nowrap;
}
#view-equipo .eq-dia-grilla .eq-fichar {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin: 0;
  padding: 0 10px;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 650;
  white-space: nowrap;
  vertical-align: middle;
}
.agora-modal-dialog.is-buscar { width: min(760px, 96vw); }
.equipo-lugares { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.equipo-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.equipo-nav strong { min-width: 11rem; }
.equipo-tol { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #9aa); font-size: 0.85rem; }
.equipo-tol input { width: 4.2rem; }
.equipo-grilla { overflow-x: auto; }
.equipo-grilla table { border-collapse: separate; border-spacing: 4px; min-width: 880px; }
.equipo-grilla th, .equipo-grilla td { vertical-align: top; }
.equipo-grilla th:first-child, .equipo-grilla td:first-child {
  position: sticky; left: 0; background: var(--bg, #030403); z-index: 1; text-align: left; min-width: 9rem;
}
.equipo-grilla thead th { font-size: 0.75rem; color: var(--muted, #9aa); font-weight: 600; }
.equipo-grilla thead th small, .equipo-celda small { display: block; color: var(--muted, #9aa); font-weight: 500; }
.equipo-cob { color: var(--muted, #9aa); font-size: 0.72rem; white-space: nowrap; }
#eq-editor {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 4px 4px;
}
.eq-tramo {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.eq-tramo + .eq-tramo {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.eq-tramo label,
#eq-editor > .medios-field-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted, #9aa);
}
.eq-tramo .agora-input,
.eq-tramo select,
#eq-editor > .medios-field-full .agora-input {
  width: 100%;
}
.eq-tramo-horas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
}
.eq-tramo > .btn-ghost,
#eq-editor > .btn-ghost {
  align-self: flex-start;
}
#eq-histo {
  margin-top: 8px;
}
#eq-histo:not([hidden]) {
  min-height: 46vh;
}
.eq-pop-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.eq-histo-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eq-histo-lista li {
  padding: 14px 16px;
  border: 1px solid var(--line, #d7d2c8);
  border-radius: 12px;
  line-height: 1.45;
}
.eq-seg-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
  margin: 8px 0 18px;
}
.eq-seg-bar label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
}
#eq-seg-tabla tbody tr {
  cursor: pointer;
}
.eq-dia-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 18px;
}
.eq-dia-lista li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #e6e1d8);
  line-height: 1.4;
}
#eq-forzar .medios-fields {
  grid-template-columns: 1.3fr 1.3fr 0.8fr;
  gap: 18px 28px;
}
#eq-forzar label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#eq-forzar .agora-input,
#eq-forzar select {
  width: 100%;
}
@media (max-width: 720px) {
  .eq-tramo-horas,
  #eq-forzar .medios-fields {
    grid-template-columns: 1fr;
  }
}
.equipo-celda {
  display: block; width: 100%; min-width: 7.2rem; min-height: 3.4rem; text-align: left;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 8px;
  color: inherit; padding: 6px 8px; cursor: pointer;
}
.equipo-celda.is-hoy { border-color: rgba(53, 230, 107, 0.55); }
/* Vacaciones (0.8.834): celeste, se distingue de Franco y Cerrado. */
.equipo-celda--vac { background: rgba(56, 170, 230, 0.16); border-color: rgba(56, 170, 230, 0.45); }
.equipo-celda--vac strong { color: #7cc8f0; }
.equipo-celda:hover { border-color: rgba(53, 230, 107, 0.8); }
.equipo-mes .equipo-celda { min-width: 5.4rem; min-height: 2.6rem; padding: 4px; font-size: 0.72rem; }
.equipo-mes table { min-width: 1100px; }
.equipo-celda { font: inherit; }
.aviso-lugar { display: flex; flex-direction: column; gap: 14px; }
.aviso-lugar > .help { margin: 0; line-height: 1.45; }
.aviso-lugar .task-seccion { margin: 2px 0 0; }
.aviso-lista { display: flex; flex-direction: column; gap: 12px; }
.aviso-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
.aviso-card p { margin: 8px 0 0; line-height: 1.45; }
.aviso-card .form-actions,
.aviso-lugar-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.aviso-lugar-pie {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.aviso-lugar .btn-primary,
.aviso-lugar .btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
}
.aviso-card--cerca { border-color: rgba(230, 180, 34, 0.65); }
.aviso-card--vencido { border-color: rgba(214, 69, 69, 0.75); }
.aviso-card strong { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.aviso-card .form-actions { margin-top: 12px; }
.agora-modal-body:has(.precio-cambios-wrap) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.precio-cambios-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.precio-cambios {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  margin-top: 8px;
}
.precio-cambio {
  display: grid;
  grid-template-columns: 22px minmax(0, 1.6fr) minmax(150px, 0.9fr) auto;
  gap: 8px 16px;
  align-items: center;
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
}
.precio-cambio-nom {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.precio-cambio-nom strong { margin-right: 0; }
.precio-cambio-plata { white-space: nowrap; }
.precio-cambio input { width: 18px; height: 18px; margin: 0; }
.precio-cambio { content-visibility: auto; contain-intrinsic-size: auto 46px; }
.precio-cambio.is-oferta { box-shadow: inset 3px 0 0 #e09090; }
.precio-cambio.is-normal { box-shadow: inset 3px 0 0 #3dd68c; }
.precio-cambio.is-bloqueado { opacity: 0.4; }
.precio-cambios-wrap > .agora-input { width: 100%; margin: 0 0 8px; }
.precio-cambios-wrap .precio-ver { margin: 0 0 8px; }
.precio-cambios-wrap .abast-loc { min-height: 28px; padding: 2px 10px; font-size: 0.78rem; }
.precio-cambio-aviso { color: #e6b422; margin: 8px 0 0; }
@media (max-width: 720px) {
  .precio-cambio {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .precio-cambio-plata,
  .precio-cambio .precio-hit-stock { grid-column: 2; }
  .precio-cambio-plata { white-space: normal; }
}
#nav-avisos-n.is-verde.is-on,
#nav-avisos-n.is-ambar.is-on { animation: none; }
@media (max-width: 720px) {
  #view-equipo .form-actions { flex-wrap: wrap; }
  #view-equipo .form-actions .btn-primary,
  #view-equipo .form-actions .btn-ghost { min-height: 48px; flex: 1 1 140px; }
  .equipo-celda { min-height: 48px; }
}
@media (max-width: 720px) {
  .header-lupa { width: 44px; height: 44px; }
  .agora-modal-root:has(.is-buscar) .agora-modal-dialog.is-buscar {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
}

.acc-par, .acc-casa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: end;
}
.acc-par label, .acc-casa-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acc-casa-grupo { margin-top: 8px; }
.acc-casa-grupo h3 { margin: 16px 0 10px; font-size: 14px; }
.acc-casa-campo { position: relative; }
.acc-casa-nota {
  display: none;
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 4px);
  width: min(360px, 78vw);
  padding: 10px 12px;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #d5dbe3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(20, 30, 40, 0.14);
}
.acc-casa-campo:hover .acc-casa-nota,
.acc-casa-campo:focus-within .acc-casa-nota { display: block; }
.acc-casa-actions { margin-top: 18px; }
.acc-tabla { width: 100%; border-collapse: collapse; margin-top: 8px; }
.acc-tabla th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #9aa);
  padding: 0 12px 8px 0;
}
.acc-tabla td { padding: 6px 12px 6px 0; vertical-align: middle; }
.acc-tabla .acc-mod { font-weight: 700; padding-top: 16px; }
.acc-tabla select, .acc-tabla input { width: 100%; }
.acc-tildes { display: flex; flex-direction: column; gap: 16px; }
.acc-tilde-bloque h3 { margin: 0 0 8px; font-size: 13px; }
.acc-tilde-mod { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.acc-til { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.acc-tildes { display: flex; flex-direction: column; gap: 16px; }
.acc-tilde-bloque h3 { margin: 0 0 8px; font-size: 13px; }
.acc-tilde-mod { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.acc-til { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.acc-hist {
  max-height: 9.2rem;
  overflow-y: auto;
  margin: 8px 0 0;
  padding-left: 18px;
}
.acc-hist li { margin: 0 0 6px; }
@media (max-width: 720px) {
  .acc-par, .acc-casa-grid { grid-template-columns: 1fr; }
}
/* Tarjeta de avisos (Jorge, 29/11/2026): el triple de grande, abajo a la derecha.
   Cuelga de <html> (avisos.js), así el zoom del 67% del body no la achica. */
.aviso-esquina {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: min(640px, calc(100vw - 40px));
  pointer-events: none;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
}
.aviso-esquina[hidden] { display: none; }
.aviso-esquina-mazo {
  position: relative;
  pointer-events: auto;
}
.aviso-esquina-sombra {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(8, 12, 9, 0.97);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}
.aviso-esquina-sombra.is-1 { transform: translate(-8px, -8px); }
.aviso-esquina-sombra.is-2 { transform: translate(-16px, -16px); }
.aviso-esquina-card {
  --aviso-color: #ffd23f;
  position: relative;
  z-index: 1;
  background: rgba(8, 12, 9, 0.98);
  border: 1px solid var(--line);
  border-left: 8px solid var(--aviso-color);
  border-radius: 16px;
  padding: 18px 22px 18px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-height: calc(100vh - 60px);
  overflow: auto;
}
.aviso-esquina-card.is-autorizar { --aviso-color: #ff6b6b; }
.aviso-esquina-card.is-urgente { --aviso-color: #ff9f43; }
.aviso-esquina-card.is-hacer { --aviso-color: #ffd23f; }
.aviso-esquina-card.is-saber { --aviso-color: #35e66b; }
.aviso-esquina-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 15px;
}
.aviso-esquina-tipo {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aviso-color);
}
.aviso-esquina-hace { color: var(--muted); }
/* El código del trámite va chico y gris: el título dice qué pasó (Jorge, 2/12/2026). */
.aviso-esquina-codigo {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.aviso-esquina-cuenta {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--aviso-color);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.aviso-esquina-titulo {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}
.aviso-esquina-detalle {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: #d6ddd8;
  /* Resumen de tareas en renglones; si es largo, scrollea adentro (Jorge 2.a, 30/11/2026). */
  white-space: pre-line;
  max-height: 42vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
/* Detalle con marcas (Jorge 1a 2a 3a, 1/12/2026, api/aviso_texto.py): el bloque en verde, el punto
   con lo de antes de los dos puntos en negrita y debajo la tablita de operaciones con su Ver.
   Con tablita la tarjeta se ensancha y la letra baja, así entra cada renglón en una línea. */
.aviso-esquina.is-ancha { width: min(880px, calc(100vw - 40px)); }
.aviso-esquina.is-ancha .aviso-esquina-detalle { max-height: 52vh; font-size: 15px; }
.aviso-bloque {
  margin: 14px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-soft);
}
.aviso-bloque:first-child { margin-top: 0; }
.aviso-punto { margin: 6px 0 2px; line-height: 1.4; }
.aviso-punto b { color: var(--text); font-weight: 600; }
.aviso-bala { color: var(--green-soft); }
.aviso-linea { margin: 3px 0; }
.aviso-tabla-wrap { margin: 4px 0 10px 16px; overflow-x: auto; }
.aviso-tabla { border-collapse: collapse; font-size: 13.5px; line-height: 1.35; }
.aviso-tabla td {
  padding: 4px 14px 4px 0;
  white-space: nowrap;
  vertical-align: top;
  color: #b9c4bd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.aviso-tabla tr:last-child td { border-bottom: 0; }
.aviso-tabla td:first-child { color: var(--text); font-weight: 600; }
.aviso-tabla td > span {
  display: inline-block;
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.aviso-ver { color: var(--green-soft); font-weight: 600; text-decoration: none; }
.aviso-ver:hover { text-decoration: underline; }
.aviso-ver.is-ver { white-space: nowrap; }
.aviso-detalle { margin: 4px 0 0; }
.aviso-esquina-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.aviso-esquina-actions .btn-primary,
.aviso-esquina-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 10px;
  text-decoration: none;
}
.aviso-esquina-sep { flex: 1 1 auto; }
@media (max-width: 720px) {
  .aviso-esquina { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .aviso-esquina-sombra { display: none; }
  .aviso-esquina-card { padding: 14px 16px; max-height: 60vh; }
  .aviso-esquina-titulo { font-size: 18px; }
  .aviso-esquina-detalle { font-size: 15px; }
  .aviso-esquina.is-ancha { width: auto; }
  .aviso-esquina.is-ancha .aviso-esquina-detalle { font-size: 14px; }
  .aviso-tabla-wrap { margin-left: 6px; }
  .aviso-tabla { font-size: 13px; }
  .aviso-esquina-actions .btn-primary,
  .aviso-esquina-actions .btn-ghost { min-height: 42px; padding: 8px 14px; font-size: 15px; }
}

.tramite-titulo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 4px;
}
.tramite-ficha,
.tramite-titulo .tramite-lugar {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 1.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  padding: 0 12px;
}
.tramite-ficha {
  color: var(--green-soft, #9ff0b8);
  border: 1px solid rgba(53, 230, 107, 0.45);
  background: rgba(53, 230, 107, 0.08);
}
.ope-hero-code h1.tramite-titulo .tramite-ficha,
.ope-hero-code h1.tramite-titulo .tramite-lugar {
  min-height: 2.15rem;
  font-size: 1.05rem;
  margin-right: 4px;
}
.tramite-code {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
  word-break: break-word;
}
.ope-hero-code h1.tramite-titulo .tramite-code {
  font-size: clamp(1.534rem, 2.275vw, 1.846rem);
}
.tramite-creo {
  flex-basis: 100%;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}
@media (max-width: 720px) {
  .tramite-code,
  .ope-hero-code h1.tramite-titulo .tramite-code {
    font-size: 13px;
  }
}

.alo-hist-crudo {
  display: grid;
  grid-template-columns: minmax(8rem, 16rem) 1fr;
  gap: 0.25rem 0.75rem;
  max-height: 70vh;
  overflow: auto;
}
.alo-hist-lugares { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.alo-hist-lugares .is-on { background: var(--accent, #1f8f4e); color: #fff; }
.alo-hist-crudo dd { margin: 0; word-break: break-word; }

/* Sin el tilde ver.costos: costo, markup y precio de concesionario no se muestran. */
body.sin-costos .solo-costos,
body.sin-costos [data-col="costo"],
body.sin-costos [data-col^="costo_"],
body.sin-costos [data-col="mk"],
body.sin-costos [data-col="markup"],
body.sin-costos [data-col^="markup_"],
body.sin-costos [data-col="conc_contado"],
body.sin-costos [data-col="conc_fin"] {
  display: none !important;
}

/* Postventa Aloise: cada recuadro del alto que le toca. */
#app-screen > #view-postventa-aloise.grid-fill:has(#pva-ficha:not([hidden])) {
  overflow: auto;
}
#view-postventa-aloise .pva-ficha {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
}
#view-postventa-aloise .pva-ficha .ope-hero-bar { align-items: stretch; }
#view-postventa-aloise .pva-ficha .pva-hero-izq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
}
#view-postventa-aloise .pva-ficha .pva-code { margin: 0; font-weight: 700; }
#view-postventa-aloise .pva-ficha .ope-hero-alarms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
#view-postventa-aloise .pva-ficha .pv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
#view-postventa-aloise .pva-ficha .ope-layout-4q {
  grid-template-rows: auto auto;
  align-items: stretch;
}
#view-postventa-aloise .pva-ficha .ope-q-tl {
  height: auto;
  min-height: 260px;
  max-height: none;
  overflow: visible;
}
#view-postventa-aloise .pva-ficha .ope-q-tr {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}
#view-postventa-aloise .pva-ficha .ope-q-bl,
#view-postventa-aloise .pva-ficha .ope-q-br {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  align-self: stretch;
}
#view-postventa-aloise .pva-ficha #pva-trabajo,
#view-postventa-aloise .pva-ficha #pva-cobros {
  height: 100%;
  box-sizing: border-box;
}
#view-postventa-aloise .pva-ficha .ope-q-tr > #pva-obs-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  height: auto !important;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
#pva-obs-panel .ope-stream-compose,
#pva-obs-panel .ope-obs-card-title { flex-shrink: 0; }
#pva-obs-list.ope-stream-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 6px;
}
#view-postventa-aloise .pva-ficha .pva-prod {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
#view-postventa-aloise .pva-ficha .pva-foto {
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
#view-postventa-aloise .pva-ficha .pva-foto-vacio {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0.7;
}
#view-postventa-aloise .pva-ficha .pv-momento {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
#view-postventa-aloise .pva-ficha h2:not(.ope-cli-identidad) {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
#pva-trabajo .pva-par {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px 12px;
  margin-top: 8px;
}
#pva-trabajo .pva-momento {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
#pva-trabajo .pva-momento h3 { margin: 0 0 6px; font-size: 0.95rem; }
#pva-trabajo textarea { min-height: 52px; }
#view-postventa-aloise .pva-ficha .pva-sku { margin: 0 0 4px; font-size: 1.05rem; }
#pva-cobros .pva-saldos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 8px;
}
#pva-cobros .pva-saldos div {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}
#pva-cobros .pva-saldos span {
  display: block;
  font-size: 0.75rem;
  opacity: 0.75;
}
#pva-cobros .pva-saldos strong { font-size: 1.02rem; font-weight: 700; }
#pva-cliente-card.ope-hero-cliente {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 14px 16px !important;
  box-sizing: border-box;
}
#pva-cliente-card .ope-cli-identidad {
  font-size: 1.74rem;
  line-height: 1.25;
  font-weight: 700;
  color: #f8faf9;
}
#pva-cliente-card .ope-cli-dni-line,
#pva-cliente-card .ope-cli-cel,
#pva-cliente-card .pv-cli-dom { font-size: 0.9rem !important; margin: 0; }
#pva-cliente-card .ope-part-actions { margin-top: auto; }
.pv-svc-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 8px;
}
.pv-svc-card .ope-hero-alarms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
}
.pv-svc-code { font-weight: 700; }
.pv-rcl-motivo { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }




/* Entregar sin cobrar · formulario en el papel o el recibo de la entrega */
.ope-esc-form {
  display: grid;
  gap: 8px;
  margin: 6px 0 10px;
}

/* Cabecera OPE Motos y Aloise en dos pisos: luces arriba, botonera abajo (25/11/2026). */
.ope-hero-alarms.ope-hero-dos-pisos,
#view-aloise-ope .ope-hero-alarms.ope-hero-dos-pisos {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
}
.ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces,
#view-aloise-ope .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  width: 100%;
}
.ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces .ope-flag-estado {
  grid-column: auto;
  width: auto;
}
.ope-hero-alarms.ope-hero-dos-pisos .ope-hero-botonera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ope-hero-alarms.ope-hero-dos-pisos .ope-hero-botonera .btn-ghost {
  min-width: 6.5rem;
  justify-content: center;
  text-align: center;
}
@media (max-width: 899px) {
  .ope-hero-alarms.ope-hero-dos-pisos,
  #view-aloise-ope .ope-hero-alarms.ope-hero-dos-pisos {
    display: flex;
    grid-template-columns: none;
  }
  .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces,
  #view-aloise-ope .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
  }
  .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-luces .ope-flag-estado {
    grid-column: 1 / -1;
  }
  .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-botonera {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .ope-hero-alarms.ope-hero-dos-pisos .ope-hero-botonera .btn-ghost {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
}

/* Cuadrante de la moto compacto: luz fuera del título, botonera Guardar unidad · Pactado · Envíos (25/11/2026). */
.ope-unidad-title .ope-unidad-luz {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin: 0 2px 0 4px;
}
.ope-unidad-botonera {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.ope-btn-luz {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ope-btn-luz .ope-status-light {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin: 0 1px;
}
.mot-envios-popup .ppt-svc-line,
.mot-pacto-popup .alo-pacto-row {
  margin-top: 8px;
}
@media (max-width: 899px) {
  .ope-unidad-botonera {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .ope-unidad-botonera > button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
  .ope-unidad-botonera > button[data-unidad-save] {
    grid-column: 1 / -1;
  }
}

/* Solicitud (25/11/2026): popups Análisis y Decisión Ágora. */
.fin-res-row {
  display: grid;
  grid-template-columns: 14px minmax(7.5em, 10em) minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  padding: 2px 0;
  font-size: 0.86em;
  line-height: 1.25;
}
.fin-res-row[role="button"] {
  cursor: pointer;
}
.fin-res-row[role="button"]:hover .fin-res-valor {
  text-decoration: underline;
}
.fin-res-pieza {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fin-res-valor {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fin-res-quien {
  color: var(--muted);
  font-size: 0.9em;
  white-space: nowrap;
}
.fin-res-obs {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.92em;
  white-space: pre-wrap;
}
.fin-res-linea {
  margin: 4px 0 0;
  font-size: 0.84em;
}
.fin-dec-ops {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0;
}
.fin-dec-op {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.fin-dec-sim,
.fin-dec-hilo {
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  margin-top: 10px;
  padding-top: 8px;
}
.fin-dec-sim h3,
.fin-dec-hilo h3,
.fin-analisis-rapido h3 {
  margin: 4px 0 6px;
  font-size: 0.95em;
}
.fin-dec-hilo-list {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 6px;
}
.fin-dec-ev {
  margin: 4px 0;
  font-size: 0.88em;
}
.fin-btn-dec-agora {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.fin-res-obs-inline {
  color: var(--muted);
  white-space: normal;
}
.fin-res-row .fin-res-valor:has(.fin-res-obs-inline) {
  white-space: normal;
}
.fin-res-favs {
  margin-top: 6px;
}
.fin-res-fav {
  margin: 2px 0;
  font-size: 0.88em;
}
.fin-star {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 1em;
  padding: 0 2px;
  margin-left: 4px;
}
.fin-star.is-on {
  color: #f5b301;
}
/* Caja: «Ver grilla de caja ↗» a la derecha del renglón de Local y Moneda. */
#caja-filters .caja-ver-grilla-field {
  justify-self: end;
  align-self: end;
  grid-column: -2 / -1;
}
#caja-filters .caja-ver-grilla-field .btn-accent {
  min-height: 32px;
  white-space: nowrap;
}

/* Presupuesto Motos y Aloise (26/11/2026): buscador y renglón más bajos.
   Buscador Aloise en 2 renglones: fichas + Cuotas + Ver en una línea a la derecha;
   abajo marca · modelo y precios. Buscador Motos: Cuotas y Ver juntos. */
#alo-ppt-sku-suggest .alo-ppt-actions {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
#alo-ppt-sku-suggest .alo-ppt-sub {
  display: flex;
  align-items: baseline;
  gap: 4px 12px;
  width: 100%;
  min-width: 0;
}
#alo-ppt-sku-suggest .alo-ppt-sub .alo-ppt-meta-txt {
  flex: 0 1 auto;
  max-width: 45%;
  font-size: 0.78rem;
}
#alo-ppt-sku-suggest .alo-ppt-sub .alo-ppt-precios {
  flex: 1 1 auto;
  min-width: 0;
}
.ppt-moto-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-right: 8px;
}
.ppt-moto-acts .ppt-moto-cuotas {
  margin-right: 0;
}
.ppt-moto-acts .ppt-moto-ver {
  text-decoration: none;
}
/* Bonif. % y Recargo % angostos: la regla general input:not(...) los estiraba al 100%. */
#ppt-cuadrantes .ppt-ajuste-lab > input.agora-input.ppt-ajuste,
#alo-ppt-lineas .ppt-ajuste-lab > input.agora-input.ppt-ajuste {
  width: 6rem;
  min-width: 0;
  flex: 0 0 auto;
}
/* Patentamiento / garantía colgada: un renglón y el $ en la misma columna que el del producto. */
#ppt-cuadrantes .ppt-linea > .ppt-svc-line,
#alo-ppt-lineas .ppt-linea > .ppt-svc-line {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  padding: 6px 0 0 10px;
  margin-top: -2px;
}
#ppt-cuadrantes .ppt-linea > .ppt-svc-line .ppt-svc-line-txt,
#alo-ppt-lineas .ppt-linea > .ppt-svc-line .ppt-svc-line-txt {
  gap: 6px 12px;
}
#ppt-cuadrantes .ppt-linea > .ppt-svc-line .ppt-svc-line-precio,
#alo-ppt-lineas .ppt-linea > .ppt-svc-line .ppt-svc-line-precio {
  padding-top: 0;
}
#ppt-cuadrantes a.ppt-linea-web,
#alo-ppt-lineas a.ppt-linea-web {
  text-decoration: none;
}

/* Ficha del cliente: renglón de WhatsApp (embudo único Kommo, 26/11/2026). */
.crm-wa-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin: 0.35rem 0 0.2rem;
  font-size: 0.92rem;
}
.crm-wa-donde {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.crm-wa-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.crm-wa-tag {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.crm-wa-verde { color: #1f7a3a; background: rgba(46, 160, 67, 0.14); border-color: rgba(46, 160, 67, 0.45); }
.crm-wa-ambar { color: #8a5a00; background: rgba(214, 158, 0, 0.16); border-color: rgba(214, 158, 0, 0.5); }
.crm-wa-rojo { color: #a1281f; background: rgba(214, 57, 47, 0.13); border-color: rgba(214, 57, 47, 0.45); }
.crm-wa-gris { color: #4a4f57; background: rgba(120, 128, 140, 0.13); border-color: rgba(120, 128, 140, 0.4); }

.crm-cel-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin: 0.5rem 0; }
.crm-cel-panel #crm-cel-res { flex-basis: 100%; }
.crm-cel-err { color: #a1281f; }
/* Autorizaciones en el encabezado de la operación (Jorge, 30/11/2026): lo pendiente en ámbar
   en el espacio libre debajo de los botones; el historial en el popup «Autorizaciones (N)». */
.ope-aut-slot { margin-top: 10px; display: grid; gap: 8px; max-width: 100%; }
.ope-aut-slot[hidden] { display: none; }
.ope-aut-ambar {
  display: grid; gap: 6px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 179, 71, 0.55); background: rgba(255, 179, 71, 0.1);
}
.ope-aut-ambar .ope-aut-row + .ope-aut-row { border-top: 1px solid rgba(255, 179, 71, 0.3); padding-top: 6px; }
.ope-aut-ambar p { margin: 0; font-size: 0.8rem; line-height: 1.35; color: #ffd08a; }
.ope-aut-ambar p.help { color: var(--muted); font-size: 0.74rem; }
.ope-aut-ambar .ope-btn-bar { margin-top: 4px; }
.ope-aut-barra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ope-aut-barra .alo-fac-antes { display: contents; }
.ope-aut-barra .alo-fac-antes p { margin: 0; font-size: 0.78rem; flex-basis: 100%; }
.ope-aut-pop .ope-aut-row { padding: 8px 0; border-top: 1px solid var(--line); }
.ope-aut-pop .ope-aut-row:first-of-type { border-top: 0; }
.ope-aut-pop .ope-aut-row.is-pend { border-left: 3px solid var(--warn, #ffb347); padding-left: 10px; }
.ope-aut-pop .ope-aut-row p { margin: 2px 0; }

/* Persona o Empresa en el presupuesto (26/11/2026; orden y frases 26/11 noche, pedido de Jorge) */
.ppt-form .ppt-block h3.ppt-cliente-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.ppt-cliente-head .titular-tipo-slot { display: inline-flex; margin-right: auto; }
.titular-tipo { display: inline-flex; gap: 6px; align-items: center; }
.titular-tipo .chk {
  display: inline-flex; gap: 6px; align-items: center; font-weight: 650; font-size: 0.8rem;
  padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer;
}
.titular-tipo .chk:has(input:checked) { border-color: #2ecc71; background: rgba(46, 204, 113, 0.12); }
.ppt-cliente-frases { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.ppt-cliente-frases li {
  position: relative; margin: 0; padding-left: 16px;
  font-size: 0.8rem; line-height: 1.35; color: var(--muted); font-weight: 400;
}
.ppt-cliente-frases li::before {
  content: ""; position: absolute; left: 3px; top: 0.42em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.7;
}
.ppt-cliente-frases li.ppt-cliente-estado { margin: 0; font-weight: 650; }
.ppt-cliente-frases li.ppt-cliente-estado.is-on { color: #f59e0b; }
.ppt-cliente-frases li.ppt-cliente-estado.is-on::before {
  background: #f59e0b; opacity: 1; box-shadow: 0 0 8px #f59e0b;
  animation: ppt-punto-ambar 1.1s ease-in-out infinite;
}
.ppt-cliente-frases li.ppt-cliente-estado.is-ok { color: #2ecc71; }
.ppt-cliente-frases li.ppt-cliente-estado.is-ok::before { background: #2ecc71; opacity: 1; }
@keyframes ppt-punto-ambar { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.25; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .ppt-cliente-frases li.ppt-cliente-estado.is-on::before { animation: none; } }

/* Orden de los campos. Persona: Local | Celular · Apellido | Nombre · DNI.
   Empresa: Local | CUIT · IVA | Razón social · estado ARCA · Contacto · Celular | DNI · Apellido | Nombre. */
.ppt-persona-fields > [data-campo] { order: 50; }
.ppt-persona-fields > [data-campo="celular"] { grid-column: auto; }
.ppt-persona-fields > [data-campo="lugar"] { order: 1; }
.ppt-persona-fields > [data-campo="celular"] { order: 2; }
.ppt-persona-fields > [data-campo="apellido"] { order: 3; }
.ppt-persona-fields > [data-campo="nombre"] { order: 4; }
.ppt-persona-fields > [data-campo="dni"] { order: 5; }
.ppt-persona-fields.es-empresa > [data-campo="cuit"] { order: 2; }
.ppt-persona-fields.es-empresa > [data-campo="iva"] { order: 3; }
.ppt-persona-fields.es-empresa > [data-campo="razon"] { order: 4; }
.ppt-persona-fields.es-empresa > [data-campo="emp-estado"] { order: 5; margin: -6px 0 0; }
.ppt-persona-fields.es-empresa > [data-campo="contacto"] { order: 6; }
.ppt-persona-fields.es-empresa > [data-campo="celular"] { order: 7; }
.ppt-persona-fields.es-empresa > [data-campo="dni"] { order: 8; }
.ppt-persona-fields.es-empresa > [data-campo="apellido"] { order: 9; }
.ppt-persona-fields.es-empresa > [data-campo="nombre"] { order: 10; }
.titular-contacto {
  margin: 4px 0 -4px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 700; color: var(--text);
}
.titular-aviso { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin: 0.35rem 0; }
.ppt-persona-fields.es-empresa > [data-campo="contactos"] { order: 6; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.titular-contactos .btn-sm.is-on { border-color: #2ecc71; background: rgba(46, 204, 113, 0.12); }
/* Quién retira (Jorge, 30/11/2026): dos botones, el elegido encendido en verde; se cambia tocando el otro. */
.recibe-sel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 0; }
.recibe-sel-lbl { font-size: 0.78rem; color: var(--muted, #9aa); font-weight: 600; }
.recibe-sel .recibe-opt { font-weight: 650; }
.recibe-sel .recibe-opt.is-on { border-color: #2ecc71; background: rgba(46, 204, 113, 0.12); color: #c9f5d9; cursor: default; }
.recibe-opciones .btn-sm.is-on { border-color: #2ecc71; background: rgba(46, 204, 113, 0.12); }
.crm-contactos-linea { margin: 4px 0 0; }
.crm-contactos-linea a { margin-right: 10px; }
/* Buscador de préstamos Ágora (Caja → Cuota y Préstamos), 27/11/2026 */
.bp-root { display: flex; flex-direction: column; gap: 8px; }
.bp-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.bp-label .bp-q { font-size: 1rem; }
.bp-out { display: flex; flex-direction: column; gap: 10px; transition: opacity 0.15s; }
.bp-out.bp-cargando { opacity: 0.55; }
.bp-persona { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.bp-persona-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.bp-persona-head strong { font-size: 1.02rem; }
.bp-pre { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; border-left: 4px solid var(--muted); background: rgba(255, 255, 255, 0.03); }
.bp-pre--vivo { cursor: pointer; }
.bp-pre--vivo:hover { background: rgba(53, 230, 107, 0.08); }
.bp-pre-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-pre-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bp-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; color: var(--muted); }
.bp-sit { font-weight: 600; }
.bp-rol { font-size: 0.82rem; color: var(--warn); }
.bp-pre-datos { font-size: 0.86rem; color: var(--text); display: flex; flex-wrap: wrap; gap: 2px 6px; }
.bp-sep { color: var(--muted); }
.bp-venc { color: var(--bad); font-weight: 600; }
.bp-pre-accion { flex: 0 0 auto; max-width: 40%; text-align: right; }
.bp-motivo { font-size: 0.8rem; }
.bp-tono-ok { border-left-color: var(--green); }
.bp-tono-ok .bp-sit { color: var(--green-soft); }
.bp-tono-warn { border-left-color: var(--warn); }
.bp-tono-warn .bp-sit { color: var(--warn); }
.bp-tono-bad { border-left-color: var(--bad); }
.bp-tono-bad .bp-sit { color: var(--bad); }
.bp-tono-muted { opacity: 0.6; }
.bp-sol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 4px 8px; border-left: 4px dashed var(--line); }
.bp-sol--vieja { opacity: 0.6; }
.bp-vacio { margin: 0; }
.bp-elegido { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 720px) {
  .bp-pre { flex-direction: column; align-items: stretch; }
  .bp-pre-accion { max-width: none; text-align: left; }
}


/* Colores por tipo (27/11/2026, pedido de Jorge). Locales: ENS verde, BRS celeste, REM gris (pastilla redonda).
   Trámite: Presupuesto blanco punteado, Operación blanco relleno (etiqueta). Cliente: Persona violeta 👤, Empresa salmón 🏢. */
.oms-kind--PPT-R,
.oms-kind--PPT,
.oms-kind--Presupuesto,
.tramite-ficha.tramite-ficha--ppt {
  color: #f1efe8;
  border: 1px dashed rgba(241, 239, 232, 0.7);
  background: transparent;
}
.oms-kind--OPE,
.oms-kind--Operacion,
.tramite-ficha.tramite-ficha--ope {
  color: #111;
  border: 1px solid #f1efe8;
  background: #f1efe8;
}
.tit-pill {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 0.72rem; font-weight: 700; line-height: 1.2;
  padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; vertical-align: middle;
}
/* Aire fijo entre la pastilla y el nombre (Jorge 1a, 1/12/2026): en un renglón flex el espacio escrito
 * se pierde y el nombre quedaba pegado. Vale en toda pantalla, también en las que vengan. */
.tit-pill:not(:last-child) { margin-right: 6px; }
.tit-pill--compacta { padding: 1px 5px; font-size: 0.72rem; }
.tit-pill--persona { color: #b39dff; border-color: rgba(179, 157, 255, 0.55); background: rgba(179, 157, 255, 0.12); }
.tit-pill--empresa { color: #ff8f6b; border-color: rgba(255, 143, 107, 0.55); background: rgba(255, 143, 107, 0.12); }
td[data-col="nombre"] .tit-pill + .oms-cli-nombre { margin-left: 2px; }
/* Persona / Empresa del presupuesto con sus colores. */
.titular-tipo .chk:has(input[value="persona"]:checked) { border-color: #b39dff; background: rgba(179, 157, 255, 0.14); color: #d6c9ff; }
.titular-tipo .chk:has(input[value="empresa"]:checked) { border-color: #ff8f6b; background: rgba(255, 143, 107, 0.14); color: #ffc2ad; }
/* CRM: altas juntas con su color, fila y encabezado con el borde del tipo (27/11/2026). */
.crm-alta-btns { display: inline-flex; gap: 8px; align-items: center; margin-left: auto; }
.crm-alta-btn { font-weight: 700; }
.crm-alta-btn--persona { color: #b39dff; border-color: rgba(179, 157, 255, 0.6); background: rgba(179, 157, 255, 0.1); }
.crm-alta-btn--empresa { color: #ff8f6b; border-color: rgba(255, 143, 107, 0.6); background: rgba(255, 143, 107, 0.1); }
.crm-row[data-tipo="persona"] > td:first-child { box-shadow: inset 3px 0 0 #b39dff; }
.crm-row[data-tipo="empresa"] > td:first-child { box-shadow: inset 3px 0 0 #ff8f6b; }
#crm-detail-header.crm-head--persona .ope-hero-bar { box-shadow: inset 4px 0 0 #b39dff; }
#crm-detail-header.crm-head--empresa .ope-hero-bar { box-shadow: inset 4px 0 0 #ff8f6b; }
.ope-hero-code h1 .tit-pill { font-size: 0.8rem; vertical-align: middle; }
.chk-chip:has(#crm-f-persona) { color: #b39dff; border-color: rgba(179, 157, 255, 0.5); }
.chk-chip:has(#crm-f-empresa) { color: #ff8f6b; border-color: rgba(255, 143, 107, 0.5); }
/* Ayuda del CUIT: una línea chica abajo del campo (27/11/2026). */
.cuit-ayuda { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.cuit-ayuda:empty { display: none; }
.cuit-ayuda strong { color: var(--text); }
.cuit-ayuda .btn-sm { margin-left: 6px; padding: 1px 8px; }

/* ---------- Buzón: renglón en Caja y popup «Bolsas del buzón» (28/11/2026) ---------- */
.caja-buzon-resumen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 0 8px;
  font-size: 0.82rem;
}
.caja-buzon-resumen strong {
  font-size: 1rem;
}
.caja-buzon-desde {
  color: var(--muted);
  font-size: 0.75rem;
}
.caja-buzon-abrir {
  margin-left: auto;
}
.buzon-pop {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}
.buzon-barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}
.buzon-total {
  font-size: 0.85rem;
  color: var(--muted);
}
.buzon-total strong {
  color: var(--text);
  font-size: 0.95rem;
}
.buzon-ver-rec {
  margin-left: auto;
}
.buzon-cuerpo {
  flex: 1 1 auto;
  min-height: 0;
}
.buzon-tabla {
  max-height: none;
}
#caja-buzon-grilla td.num {
  text-align: right;
  white-space: nowrap;
}
#caja-buzon-grilla td[data-col="sel"],
#caja-buzon-grilla th[data-col="sel"] {
  width: 34px;
  text-align: center;
}
#caja-buzon-grilla tr[data-bolsa] {
  cursor: default;
}
#caja-buzon-grilla .buzon-dif {
  color: #ffc46b;
}
.buzon-pill-celda {
  font-size: 0.7rem;
  padding: 1px 8px;
}
.buzon-code,
.buzon-sin {
  color: var(--muted);
  font-size: 0.72rem;
}
.buzon-cards {
  display: none;
}
.buzon-pie {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 16px;
  padding: 10px 12px;
  background: #070b09;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.buzon-sel {
  font-size: 0.85rem;
  align-self: center;
}
.buzon-fecha {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.buzon-fecha .agora-input {
  width: 128px;
}
.buzon-teso {
  font-size: 0.8rem;
  color: var(--muted);
  align-self: center;
}
.buzon-teso strong {
  color: var(--text);
}
.buzon-recibir {
  margin-left: auto;
  min-height: 36px;
  padding: 0 18px;
}
.buzon-error {
  flex-basis: 100%;
  margin: 0;
  color: #ff9b8a;
  font-size: 0.8rem;
}
.buzon-pie-ver {
  margin: 0;
}
.buzon-det {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.buzon-det-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 0.85rem;
}
.buzon-det-dl dt {
  color: var(--muted);
}
.buzon-det-dl dd {
  margin: 0;
}
.buzon-det-dif {
  margin: 0;
  color: #ffc46b;
  font-size: 0.85rem;
}
@media (max-width: 720px) {
  .buzon-tabla {
    display: none;
  }
  .buzon-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .buzon-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
  }
  .buzon-card-sel {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
  }
  .buzon-card-dato {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .buzon-card-l1 {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .buzon-card-l1 strong {
    font-size: 1.05rem;
  }
  .buzon-card-l2,
  .buzon-card-l3 {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .buzon-ver-rec {
    margin-left: 0;
  }
  .buzon-pie {
    flex-direction: column;
    align-items: stretch;
  }
  .buzon-fecha .agora-input {
    width: 100%;
  }
  .buzon-recibir {
    margin-left: 0;
    min-height: 42px;
  }
}

/* Ctrl+F de System en las grillas (agora-buscar-grilla.js, 28/11/2026).
   Colgada de <html> como el embudo; el JS la escala con el zoom de la página. */
.agora-ctrlf {
  position: fixed;
  z-index: 125;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 340px;
  max-width: calc(100vw - 16px);
  padding: 6px 8px;
  background: #121816;
  color: var(--text);
  border: 1px solid var(--accent, #35e66b);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  font-size: 0.78rem;
}
.agora-ctrlf[hidden] {
  display: none;
}
.agora-ctrlf .agora-input {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.82rem;
}
.agora-ctrlf .btn-sm {
  min-height: 30px;
  min-width: 30px;
  padding: 4px 8px;
  font-size: 0.82rem;
}
.agora-ctrlf-n {
  min-width: 52px;
  text-align: center;
  color: var(--muted, #9aa5a0);
  white-space: nowrap;
}
.agora-ctrlf-n.is-cero {
  color: #e8a33c;
}
.agora-ctrlf-nota {
  flex: 1 0 100%;
  color: #e8a33c;
  font-size: 0.74rem;
}
.agora-ctrlf-nota .link-btn {
  font-size: 0.74rem;
}
table.oms-grilla td.agora-hit,
table.catalogo-grilla td.agora-hit {
  background-color: rgba(53, 230, 107, 0.16) !important;
}
table.oms-grilla tr.agora-hit-fila > td,
table.catalogo-grilla tr.agora-hit-fila > td {
  box-shadow: inset 0 1px 0 rgba(53, 230, 107, 0.55), inset 0 -1px 0 rgba(53, 230, 107, 0.55);
}
table.oms-grilla td.agora-hit-on,
table.catalogo-grilla td.agora-hit-on {
  background-color: rgba(232, 163, 60, 0.42) !important;
  outline: 2px solid #e8a33c;
  outline-offset: -2px;
}

/* Administración: resumen corto arriba de Banco (lote C, 28/11/2026) */
.adm-resumen { margin: 4px 0 10px; padding-left: 18px; font-size: 0.78rem; color: var(--muted, #9aa); }
.adm-resumen li { margin: 2px 0; }
#caja-banco-grilla td[data-col="propuesta"], #caja-medios-grilla td[data-col="detalle"] { max-width: 280px; }

/* IA System (30/11/2026): gasto, tarjetas de decisión, manual e instrucciones */
#view-ia-system .ia-gasto { margin: 6px 0 12px; font-size: 0.85rem; }
#view-ia-system .ia-barra { height: 8px; margin-top: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; max-width: 520px; }
#view-ia-system .ia-barra span { display: block; height: 100%; background: #2f9e5a; }
#view-ia-system .ia-barra span.is-alto { background: #e6b422; }
#view-ia-system .ia-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
#view-ia-system .ia-card p { margin: 0 0 6px; }
#view-ia-system .ia-card textarea, #view-ia-system .ia-card input { width: 100%; }
#view-ia-system .ia-detalle { margin: 6px 0; }
#view-ia-system .ia-detalle summary { cursor: pointer; }
#view-ia-system .ia-pre { white-space: pre-wrap; font-family: inherit; font-size: 0.8rem; max-height: 50vh; overflow-y: auto; margin: 6px 0; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
#view-ia-system #ia-sys-opiniones td[data-col="leyo"], #view-ia-system #ia-sys-opiniones td[data-col="opino"] { max-width: 320px; }

/* Contacto del titular (30/11/2026, js/agora-contacto-titular.js): franja roja de la operación. */
.ope-contacto-rojo {
  display: grid; gap: 6px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 107, 107, 0.55); background: rgba(255, 107, 107, 0.1);
}
.ope-contacto-rojo p { margin: 0; font-size: 0.8rem; line-height: 1.35; color: #ffb3b3; }
.ope-contacto-rojo .ope-btn-bar { margin-top: 2px; }

/* Avisos en el celular (Jorge 1a 2a 3a 4a, 1/12/2026): titila en ámbar, arriba en todas las
   pantallas, hasta que la persona lo activa desde su teléfono. Activado, queda verde en Avisos. */
.hdr-celular,
.avisos-cel-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 28px;
  border: 1px solid rgba(255, 210, 74, 0.6);
  border-radius: 999px;
  background: rgba(255, 210, 74, 0.12);
  color: #ffd24a;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.hdr-celular[hidden],
.avisos-cel-btn[hidden] {
  display: none;
}
.hdr-celular,
.avisos-cel-btn.is-falta {
  animation: cel-titila 1.4s ease-in-out infinite;
}
.hdr-celular:hover,
.avisos-cel-btn:hover {
  background: rgba(255, 210, 74, 0.22);
}
.avisos-cel-btn.is-listo {
  border-color: rgba(53, 230, 107, 0.42);
  background: rgba(53, 230, 107, 0.14);
  color: var(--green-soft);
  animation: none;
}
.avisos-cel-btn.is-listo:hover {
  background: rgba(53, 230, 107, 0.22);
}
@keyframes cel-titila {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 210, 74, 0.12); border-color: rgba(255, 210, 74, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(255, 210, 74, 0.4), 0 0 14px rgba(255, 210, 74, 0.75); border-color: #ffd24a; }
}
.hdr-celular-corto {
  display: none;
}
.avisos-cel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cel-pasos {
  margin: 8px 0 10px 20px;
  padding: 0;
  display: grid;
  gap: 8px;
  line-height: 1.45;
}
.cel-equipo td,
.cel-equipo th {
  padding: 6px 10px;
  white-space: nowrap;
}
.cel-equipo .cel-ok {
  color: var(--green-soft);
  font-weight: 700;
}
.cel-equipo .cel-falta {
  color: #ffd24a;
  font-weight: 700;
}
@media (max-width: 720px) {
  .hdr-celular {
    padding: 4px 8px;
  }
  .hdr-celular-txt {
    display: none;
  }
  .hdr-celular-corto {
    display: inline;
  }
}

/* Globito de ayuda en todo System (Jorge 1a 2a, 1/12/2026, js/agora-globito.js).
   Cuelga de <html>, arriba de los popups y de la tarjeta de avisos. Computadora: mouse quieto.
   Celular: mantener apretado. */
.agora-globito {
  position: fixed;
  z-index: 10100;
  /* Cuelga de <html> (sin el zoom del body): se escala con --ui-zoom para verse del mismo
     tamaño que el resto de System, en la computadora y en el celular (Jorge 1.a, 1/12/2026). */
  max-width: min(calc(360px * var(--ui-zoom)), calc(100vw - 16px));
  padding: calc(8px * var(--ui-zoom)) calc(11px * var(--ui-zoom));
  background: #121816;
  color: var(--text);
  border: 1px solid var(--green-soft, #2ecc71);
  border-radius: calc(10px * var(--ui-zoom));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  font-family: "Montserrat", sans-serif;
  font-size: calc(14px * var(--ui-zoom));
  line-height: 1.4;
  white-space: pre-wrap;
  pointer-events: none;
}
.agora-globito[hidden] { display: none; }

/* Celular: mantener apretado un botón con explicación muestra el globito, no el menú del
   teléfono ni la selección de texto. */
@media (hover: none) {
  button[title], a[title], [role="button"][title], .ope-status-light, .task-luz {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* Historias de Instagram y WhatsApp (1/12/2026). Como Etq. Precios: barra arriba y, en la computadora,
   tres columnas que ocupan el alto (productos · formas de pago · historias), cada una con su scroll.
   En el celular, un paso a la vez con 1 · 2 · 3 arriba. */
#app-screen > #view-historias:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
#view-historias > .hist-barra { display: flex; align-items: center; flex-wrap: wrap; flex: 0 0 auto; gap: 10px; margin-bottom: 10px; }
#view-historias > .hist-barra h1 { margin: 0; flex: 0 0 auto; }
#view-historias .precio-toolbar { display: flex; margin-top: 0; flex: 1 1 auto; align-items: center; gap: 8px; flex-wrap: wrap; }
.precio-toolbar .btn-ghost.is-on[data-hist-tipo="oferta"] { color: #4a1616; background: #f0b8b8; border-color: #e09090; }
.hist-msg:empty { display: none; }
.hist-msg { margin: 0 0 8px; }
.hist-msg.is-warn { color: #ffb347; }
.hist-pasos { display: none; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.hist-pasos .btn-ghost.is-on { color: #04140a; background: #3dd68c; border-color: #3dd68c; }
.hist-split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(300px, 390px) minmax(280px, 350px) minmax(0, 1fr); gap: 14px; }
.hist-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.hist-col-tit { margin: 0; font-size: 0.9rem; color: var(--green-soft); letter-spacing: 0.02em; }
.hist-n { color: var(--muted); font-weight: 500; font-size: 0.85em; }
.hist-col-acc { display: flex; gap: 8px; flex-wrap: wrap; }
.hist-col[data-hist-col="productos"] { overflow: hidden; }
.hist-res { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; scrollbar-gutter: stable; }
.hist-ver .btn-ghost, #hist-ver .btn-ghost, #hist-ops .btn-ghost { min-height: 28px; }
#hist-ver .hist-foto.is-on, #hist-ops .btn-ghost.is-on { color: #04140a; background: #3dd68c; border-color: #3dd68c; }
.hist-hit { flex-direction: row; align-items: stretch; gap: 10px; }
.hist-hit:hover:not(.is-off) { border-color: var(--green); }
.hist-hit.is-sel { border-color: #3dd68c; background: rgba(61, 214, 140, 0.12); box-shadow: inset 3px 0 0 #3dd68c; }
.hist-hit.is-oferta.is-sel { border-color: #e09090; background: rgba(240, 184, 184, 0.1); box-shadow: inset 3px 0 0 #f0b8b8; }
.hist-hit-foto { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; align-self: center; }
.hist-hit-foto img { width: 100%; height: 100%; object-fit: contain; }
.hist-hit-foto span { font-size: 0.6rem; color: #777; text-align: center; padding: 2px; }
.hist-hit-cuerpo { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.hist-hit-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hist-en { font-size: 0.72rem; font-weight: 800; color: #3dd68c; }
.hist-hit.is-oferta .hist-en { color: #f0b8b8; }
.hist-contado { margin: 0; line-height: 1.4; }
.hist-de-medios { color: var(--muted); font-size: 0.72rem; }
.hist-avisos:empty { display: none; }
.hist-aviso { margin: 0; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 179, 71, 0.5); background: rgba(255, 179, 71, 0.08); color: #ffb347; font-size: 0.78rem; }
.hist-promos { display: flex; flex-direction: column; gap: 10px; }
.hist-promo { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(0, 0, 0, 0.28); display: flex; flex-direction: column; gap: 6px; }
.hist-promo-tit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hist-promo-tit strong { font-weight: 700; }
.hist-promo-logos { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.hist-promo-logos img { height: 22px; width: 33px; object-fit: contain; border-radius: 3px; }
.hist-promo-bancos { font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-promo-donde { font-size: 0.72rem; color: #ffb347; font-weight: 700; }
.hist-conv-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; background: #1f2328; border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; }
.hist-promo.is-convenio { border-color: rgba(126, 182, 255, 0.45); }
.hist-promo-destacado { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #ff5a1f; color: #fff; font-size: 0.72rem; font-weight: 800; }
.hist-promo-logos img.hist-conv-logo { height: 30px; width: auto; max-width: 44px; background: #fff; border-radius: 6px; padding: 2px; }
.hist-planes { display: flex; flex-wrap: wrap; gap: 6px; }
.hist-plan { min-height: 28px; padding: 2px 10px; font-size: 0.78rem; }
.hist-plan.is-on { color: #04140a; background: #3dd68c; border-color: #3dd68c; font-weight: 800; }
.hist-sub { margin: 6px 0 0; font-size: 0.78rem; color: var(--green-soft); }
.hist-detalles { display: flex; flex-direction: column; gap: 8px; }
.hist-det { display: flex; flex-direction: column; gap: 4px; }
.hist-det span { font-size: 0.72rem; color: var(--muted); }
.hist-hoja { min-width: 0; }
.hist-hoja .precio-hoja-head { flex-wrap: wrap; }
.hist-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
.hist-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-content: start; }
.hist-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hist-card-top { display: flex; align-items: center; gap: 6px; }
.hist-card-num { width: 24px; height: 24px; border-radius: 50%; background: #3dd68c; color: #04140a; font-weight: 800; font-size: 0.78rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; }
.hist-card-sku { font-size: 0.72rem; color: var(--muted); font-weight: 700; flex: 1 1 auto; }
.hist-card-top .btn-ghost { min-height: 24px; padding: 0 8px; }
.hist-canvas { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); cursor: zoom-in; }
.hist-card-acc { display: flex; gap: 6px; flex-wrap: wrap; }
/* Tanda compartida (Jorge 1a 2a 3, 1/12/2026): con qué formas de pago se sumó cada una y quién. */
.hist-card-cfg { margin: 0; font-size: 0.72rem; line-height: 1.35; color: var(--muted); }
.hist-card .hist-aviso { font-size: 0.72rem; }
.hist-sin { aspect-ratio: 9 / 16; border-radius: 14px; border: 1px dashed rgba(255, 179, 71, 0.6); background: rgba(255, 179, 71, 0.06); color: #ffb347; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-size: 0.8rem; font-weight: 700; }
.hist-en.is-otra { color: var(--muted); font-weight: 700; }
.hist-tanda-help { margin: 0 12px 6px; font-size: 0.74rem; }
.hist-msg .btn-primary { margin-left: 8px; }
.hist-zoom-barra { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.hist-zoom-barra .btn-ghost { min-width: 34px; }
.hist-zoom-n { color: var(--muted); font-size: 0.78rem; margin-left: 6px; }
.hist-zoom { position: relative; height: 72vh; min-height: 320px; overflow: hidden; border-radius: 12px; background: #1a1d1b; cursor: zoom-in; touch-action: none; user-select: none; }
.hist-zoom.is-zoom { cursor: grab; }
.hist-zoom.is-zoom:active { cursor: grabbing; }
.hist-zoom img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); pointer-events: none; }
@media (max-width: 1250px) {
  .hist-split { grid-template-columns: minmax(280px, 340px) minmax(260px, 320px) minmax(0, 1fr); }
  .hist-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}
@media (max-width: 900px) {
  #app-screen > #view-historias:not([hidden]) { display: block; overflow: auto; }
  .hist-pasos { display: flex; }
  .hist-split { display: block; }
  .hist-split > [data-hist-col] { display: none; }
  .hist-split[data-paso="productos"] > [data-hist-col="productos"],
  .hist-split[data-paso="medios"] > [data-hist-col="medios"],
  .hist-split[data-paso="historias"] > [data-hist-col="historias"] { display: flex; }
  .hist-col, .hist-col[data-hist-col="productos"] { overflow: visible; }
  .hist-res { max-height: 70vh; flex: none; }
  .hist-hoja { min-height: 70vh; }
  .hist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 12px; }
}

/* Ficha de la transacción (control de Clara, 1/12/2026): todo un cobro en un popup. */
.trx-ficha { display: flex; flex-direction: column; gap: 12px; }
.trx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trx-bloque { margin: 0; }
.trx-tabla { width: 100%; border-collapse: collapse; }
.trx-tabla th { text-align: left; color: var(--muted); font-weight: 500; padding: 3px 10px 3px 0; vertical-align: top; width: 34%; white-space: nowrap; }
.trx-tabla td { padding: 3px 0; vertical-align: top; word-break: break-word; }
.trx-tabla td .btn-sm { margin: 2px 4px 2px 0; }
.trx-alertas { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.trx-ok { margin: 0; color: var(--green-soft, #7fd99a); }
.trx-hist td { white-space: nowrap; }
.trx-hist td:last-child { white-space: normal; }
#caja-medios-grilla tbody tr[data-medio-fila] { cursor: default; }
@media (max-width: 720px) {
  .trx-grid { grid-template-columns: 1fr; }
  .trx-tabla th { white-space: normal; width: 40%; }
}

/* Préstamos · «Abrió el link» (2/12/2026, SQL 383): T · G · R con su lucecita. */
.link-abre { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.link-abre-rol { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.link-abre-rol.is-no, .link-abre-rol.is-sin { color: var(--muted); opacity: 0.55; font-weight: 400; }
.link-abre-raya { display: inline-block; width: 10px; text-align: center; color: var(--muted); }
.link-abre-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Chat del préstamo: debajo de cada aviso con link, si lo abrieron. */
.pre-chat-abrio { margin-top: 4px; font-size: 0.72rem; color: var(--muted); }
.pre-chat-abrio.is-ok { color: var(--green-soft, #7fd99a); }

/* Solicitud de convenio desde el presupuesto y su registro (3/12/2026, js/convenio-solicitud.js). */
.cvs { display: flex; flex-direction: column; gap: 10px; }
.cvs-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.cvs-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cvs-card p { margin: 0; }
.cvs-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cvs-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.72rem; border: 1px solid var(--line); }
.cvs-falta { margin: 6px 0; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(245, 180, 60, 0.55); background: rgba(245, 180, 60, 0.1); color: var(--text); }
.cvs-chip.is-amber { color: var(--amber, #f5b942); border-color: var(--amber, #f5b942); }
.cvs-chip.is-green { color: var(--green-soft, #5fd38d); border-color: var(--green-soft, #5fd38d); }
.cvs-chip.is-red { color: #ff7a7a; border-color: #ff7a7a; }
.cvs-chip.is-gray { color: var(--muted); }
.cvs-precio { border-left: 3px solid var(--amber, #f5b942); background: rgba(245, 185, 66, 0.08); border-radius: 6px; padding: 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.cvs-precio p { margin: 0; }
.cvs-anteriores summary { cursor: pointer; margin: 4px 0; }
.cvs-anteriores .cvs-card { margin-top: 6px; opacity: 0.85; }
.cvs-filtro { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 10px; }
.cvs-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cvs-resumen h4 { margin: 0 0 4px; }
.cvs-resumen table, .cvs-grilla { width: 100%; border-collapse: collapse; }
.cvs-resumen td, .cvs-resumen th, .cvs-grilla td, .cvs-grilla th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.cvs-grilla td:nth-child(7) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Otros teléfonos de la persona (SQL 406, 3/12/2026) */
.agora-tel-bloque { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.agora-tel-titulo { font-size: 0.78rem; color: var(--muted); }
.agora-tel-lineas { list-style: none; margin: 2px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.agora-tel-lineas li { font-size: 0.78rem; line-height: 1.35; overflow-wrap: anywhere; }
.agora-tel-tabla { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.agora-tel-tabla th, .agora-tel-tabla td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.agora-tel-tabla th { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.agora-tel-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: end; }
.agora-tel-form label { display: flex; flex-direction: column; gap: 4px; }
.agora-tel-form .span-2, .agora-tel-form .agora-tel-err, .agora-tel-form .form-actions { grid-column: 1 / -1; }
.agora-tel-form .form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.agora-tel-err { color: var(--amber, #f0b429); margin: 0; }
.fin-otp-destino { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.fin-otp-destino legend { padding: 0 4px; }
.fin-otp-destino .chk-chip { justify-content: flex-start; }
@media (max-width: 720px) {
  .agora-tel-form { grid-template-columns: 1fr; }
  .agora-tel-tabla th:nth-child(2), .agora-tel-tabla td:nth-child(2) { display: none; }
}

/* N° Ágora del préstamo en la ficha PRE (SQL 407) */
.ope-hero-code p.fin-pre-nro {
  margin: 0 0 2px;
  font-size: 0.82rem;
  color: var(--text);
}
.fin-pre-nro-btn {
  background: none;
  border: 0;
  padding: 0 2px;
  color: var(--green-soft, #7fd99a);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.fin-pre-nro-btn span { font-weight: 400; opacity: 0.6; margin-left: 2px; }
.fin-pre-nro-btn:hover span { opacity: 1; }
.fin-pre-nro-exc { color: var(--muted); font-size: 0.74rem; }
