/* Á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;
}
.agora-date-wrap .agora-date-native {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
}
.agora-date-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
  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;
}

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,
#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,
  #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-comunicacion-notif .table-wrap--excel,
#view-lineas-credito .table-wrap--excel {
  height: auto;
  min-height: 16rem;
  max-height: calc(100dvh - 280px);
}
.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 th,
.oms-motos-panel .oms-grilla td {
  padding: 6px 10px;
  line-height: 1.3;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.oms-motos-panel .oms-grilla th:nth-child(1),
.oms-motos-panel .oms-grilla td:nth-child(1),
.oms-motos-panel .oms-grilla th:nth-child(2),
.oms-motos-panel .oms-grilla td:nth-child(2),
.oms-motos-panel .oms-grilla th:nth-child(3),
.oms-motos-panel .oms-grilla td:nth-child(3),
.oms-motos-panel .oms-grilla th:nth-child(4),
.oms-motos-panel .oms-grilla td:nth-child(4),
.oms-motos-panel .oms-grilla th:nth-child(5),
.oms-motos-panel .oms-grilla td:nth-child(5),
.oms-motos-panel .oms-grilla th:nth-child(6),
.oms-motos-panel .oms-grilla td:nth-child(6),
.oms-motos-panel .oms-grilla th:nth-child(7),
.oms-motos-panel .oms-grilla td:nth-child(7),
.oms-motos-panel .oms-grilla th:nth-child(8),
.oms-motos-panel .oms-grilla td:nth-child(8),
.oms-motos-panel .oms-grilla th:nth-child(9),
.oms-motos-panel .oms-grilla td:nth-child(9),
.oms-motos-panel .oms-grilla th:nth-child(10),
.oms-motos-panel .oms-grilla td:nth-child(10),
.oms-motos-panel .oms-grilla th:nth-child(11),
.oms-motos-panel .oms-grilla td:nth-child(11) {
  min-width: 0;
  width: auto;
  max-width: none;
}
.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; /* syncStickyHeader ajusta el px exacto */
  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;
}
.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: 180px;
  max-width: 260px;
  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.78rem;
  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;
}

.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-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-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;
}
.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: 240px;
  max-width: min(360px, 80vw);
  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 {
  font-size: 0.78rem;
  padding: 4px 0;
  color: var(--text);
}
@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;
}

.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);
}

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

.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: 24px 0 40px;
  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;
  height: 100%;
}
html.detail-shell-active .footer {
  display: none;
}
.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-chk {
  padding-bottom: 10px;
}

.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 {
  position: relative;
  z-index: auto;
}

.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-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;
}

/* 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;
}

.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 {
  max-width: none;
}

#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-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: contents;
}
.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;
  position: relative;
  min-height: 0;
  overflow: hidden;
  align-self: stretch;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0;
}
.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 {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 80px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ppt-cuadrantes-block {
  grid-column: 1 / -1;
  grid-row: 2;
}
.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 {
    max-height: min(52vh, 420px);
  }
  #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;
}

.ppt-suggest-thumb {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
}

.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;
}

.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;
}

.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-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;
  }
}

.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;
}

/* Lucecita neón que recorre el perímetro (anillo visible entre padding y inner) */
.agora-modal-dialog::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220%;
  height: 220%;
  margin-left: -110%;
  margin-top: -110%;
  background: conic-gradient(
    from 0deg,
    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
  );
  animation: agora-modal-neon-orbit 10s linear infinite;
  z-index: 0;
  pointer-events: none;
}

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

@keyframes agora-modal-neon-orbit {
  to {
    transform: rotate(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-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;
}

.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: calc(2.35rem * 21);
  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: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 10px;
  overflow-x: auto;
}
.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;
}
.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 { content: " ▴"; }
.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--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[data-col="nombre"] .oms-cli-nombre {
  color: #f5f7f6;
  font-weight: 650;
  font-size: 0.92rem;
}
.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"] {
  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 {
  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-action-form label {
  font-size: 0.72rem;
  gap: 4px;
}
.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: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.caja-alivio-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
}
.caja-alivio-row .muted {
  color: var(--muted);
  font-size: 0.72rem;
}
.caja-alivio-recv {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}
.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);
}
.chip--fajo {
  background: rgba(53, 230, 107, 0.15);
}
.chip--libro {
  background: rgba(120, 160, 220, 0.15);
}

@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(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  width: 100%;
}

.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: flex-start;
  gap: 6px;
  min-width: 0;
}
.ppt-ms-row > label,
.ppt-ms-row > .ppt-ms-field {
  flex: 1 1 auto;
  min-width: 0;
}
.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-done {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(57, 255, 136, 0.08);
  border: 1px solid rgba(57, 255, 136, 0.22);
}
.ppt-ms-sum {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.76rem;
  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 {
  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.is-selected {
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(57, 255, 136, 0.35);
}
.ppt-cuadrante.is-selected::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(from var(--neon-angle, 0deg), #39ff88, transparent 40%, #39ff88 70%, transparent);
  -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: ppt-neon-spin 2.4s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes ppt-neon-spin {
  to { --neon-angle: 360deg; }
}
@property --neon-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.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;
}
.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;
}
.ppt-porcion-modo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.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;
}
.ppt-cq-blanquear-desk {
  margin-left: auto;
}
.ppt-modo.is-active {
  border-color: #39ff88;
  color: #39ff88;
}
.ppt-cq-remanente.is-ok { color: #9dffc0; }
.ppt-cq-remanente.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: 10px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.ppt-opcion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.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: 0.85em;
  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--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;
}
.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-x: auto;
}
.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;
}
.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%;
}
.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;
}
.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;
}
.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;
}
.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 {
  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-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-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-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;
}
.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;
}
.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;
}
.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-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-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 {
  width: 100%;
  margin-top: 4px;
  min-height: 2.6rem;
  max-height: 6rem;
}
.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-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 {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.28);
}
#view-moto-detail #moto-cobro-side .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-pop {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 140px;
  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);
}
.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 {
    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 {
    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;
  }
  .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;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
}
.plan-id-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  width: 100%;
  max-width: 14rem;
  align-self: flex-start;
  margin-right: auto;
}
.plan-id-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}
.plan-id-field .agora-input,
.plan-id-input {
  width: 100%;
  max-width: 14rem;
  min-height: 38px;
  font-size: 0.92rem !important;
  letter-spacing: 0.02em;
  text-align: left;
}
@media (max-width: 899px) {
  .plan-id-field,
  .plan-id-field .agora-input,
  .plan-id-input {
    max-width: none;
    width: 100%;
  }
}
.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-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;
}
.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: 0.95rem;
  }
  #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;
  }
}

@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: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.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;
}
.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);
}
.fin-hero-cliente .ope-cli-name,
.fin-hero-nombre {
  margin: 0 0 6px;
  font-size: 1.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #f8faf9;
}
.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;
}
#view-financiera-detail .ope-hero-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
}
#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: Cliente | Obs misma fila (altura idéntica); Adjuntos solo izquierda */
@media (min-width: 900px) {
  #view-crm-detail .crm-layout-ficha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    /* Fila 1 toma el resto del alto del shell; auto = Adjuntos. Misma track → equal height. */
    grid-template-rows: minmax(240px, 1fr) auto;
    grid-template-areas:
      "cliente obs"
      "adjuntos .";
    gap: 14px;
    align-items: stretch;
    justify-items: stretch;
    flex: 1 1 auto;
    min-height: 100%;
    height: 100%;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card {
    grid-area: cliente;
  }
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel {
    grid-area: obs;
  }
  #view-crm-detail .crm-layout-ficha > .crm-ficha-adjuntos {
    grid-area: adjuntos;
    min-width: 0;
    align-self: start;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel {
    align-self: stretch;
    justify-self: stretch;
    width: auto;
    /* Critical: let grid row set height — no absolute, no height:100% wars with Motos */
    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: hidden;
    position: static !important;
    inset: auto !important;
    flex: unset !important;
  }
  #view-crm-detail .crm-layout-ficha > .crm-cliente-card {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel .ope-obs-card-title,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel .crm-obs-help,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel .ope-stream-filters,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel .ope-stream-compose {
    flex-shrink: 0;
  }
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel .ope-stream-list,
  #view-crm-detail .crm-layout-ficha > #crm-obs-panel #crm-obs-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
  }
  #view-crm-detail .crm-layout-ficha > .crm-ficha-adjuntos > .crm-adjuntos-card {
    margin: 0 !important;
  }
}

/* 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-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-layout-ficha > #crm-obs-panel {
    min-height: 280px !important;
    max-height: min(60vh, 480px) !important;
    overflow: hidden;
  }
  #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-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;
}

.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: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 10px;
}
#view-postventa-detail .ope-q-tr > #pv-obs-panel,
#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-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-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 26px;
  padding: 1px 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-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-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;
}
.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;
}
.fin-hero-cliente .ope-cli-name,
.fin-hero-nombre {
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1.15;
  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 {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0 10px;
  padding-right: 4px;
}
.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;
}
.fin-chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}
.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: 10px 16px;
  font-size: 12px;
  color: var(--muted, #9aa);
}
.fin-chat-preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--line, #333);
  background: #fff;
}
.fin-chat-preview-sms {
  white-space: pre-wrap;
  font-size: 14px;
  padding: 12px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
}
.fin-layout-pre .fin-pre-q-r3r > .ope-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}



