/* ══ CRM (ConsultasPage de la app) ═══════════════════════════════════════════ */
.con-barra .app-main:has(.crm) { padding-left: 0; padding-right: 0; }
.crm { display: flex; flex-direction: column; }

.crm-buscar { display: flex; gap: 6px; margin: -2px 16px 8px; }
.crm-caja-buscar {
    flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 16px; padding: 0 12px; height: 44px;
}
.crm-lupa { font-size: 14px; opacity: .55; }
.crm-caja-buscar input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: #3D2B1F; font-size: 16px;
    font-family: inherit; -webkit-appearance: none; appearance: none;
}
.crm-caja-buscar input::placeholder { color: #9CA3AF; }
.crm-plegar {
    width: 44px; height: 44px; border: none; border-radius: 16px; background: #fff; color: #6B5A4E; font-size: 16px;
    cursor: pointer; flex-shrink: 0;
}

.crm-chips {
    display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; margin-bottom: 6px; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.crm-chips::-webkit-scrollbar { display: none; }
/* Con ratón (ordenador) no se puede arrastrar la fila: barra lateral fina para llegar a las
   últimas listas (Completados). En el móvil sigue oculta. */
@media (hover: hover) and (pointer: fine) {
    .crm-chips { scrollbar-width: thin; scrollbar-color: #C9B99A transparent; padding-bottom: 6px; }
    .crm-chips::-webkit-scrollbar { display: block; height: 8px; }
    .crm-chips::-webkit-scrollbar-thumb { background: #C9B99A; border-radius: 4px; }
}
.crm-chip {
    flex-shrink: 0; border: none; border-radius: 18px; padding: 7px 16px; background: #F0EAE0; color: #3D2B1F;
    font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; font-family: inherit;
}
.crm-chip.sel { background: #3D2B1F; color: #C9B99A; }
.crm-chip.blanco { background: #fff; padding: 7px 12px; font-size: 14px; }
.crm-chip.nueva { background: #8A6D3B; color: #fff; padding: 7px 14px; }

.crm-cargando { display: flex; justify-content: center; padding: 60px 0; }
.crm-cargando .ini-spinner { width: 34px; height: 34px; }
.crm-vacio { text-align: center; color: #9CA3AF; font-size: 14px; margin-top: 40px; }

.crm-sep {
    display: flex; align-items: center; gap: 8px; border: none; background: transparent; width: 100%;
    padding: 16px 20px 2px; cursor: pointer; font-family: inherit; text-align: left;
}
.crm-sep-punto { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }
.crm-sep-tx { font-size: 12px; font-weight: 700; color: #6B5A4E; white-space: nowrap; }
.crm-sep-linea { flex: 1; height: 1px; background: #DDD0C4; }
.crm-sep-flecha { font-size: 14px; color: #A09080; display: flex; align-items: center; }

.crm-tarjeta {
    position: relative; display: flex; margin: 4px 16px; background: #fff; border-radius: 14px; overflow: hidden;
    cursor: pointer; min-height: 48px;
}
.crm-tarjeta:active { background: #FBF8F3; }
.crm-barra { width: 6px; flex-shrink: 0; }
.crm-cont { flex: 1; min-width: 0; padding: 12px 46px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.crm-nombre { font-size: 14px; font-weight: 700; color: #3D2B1F; overflow-wrap: anywhere; }
.crm-comentario { font-size: 12px; color: #8A6D3B; overflow-wrap: anywhere; }
.crm-estado {
    align-self: flex-start; max-width: 100%; border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crm-iconos { display: flex; flex-wrap: wrap; align-items: center; }
.crm-minis { display: inline-flex; gap: 4px; margin: 2px 10px 2px 0; font-size: 15px; line-height: 1; }
.crm-pildora {
    display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; border-radius: 12px;
    padding: 5px 12px; margin: 2px 6px 2px 0; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.crm-cara {
    width: 26px; height: 26px; border-radius: 13px; border: none; color: #fff; font-size: 12px; font-weight: 700;
    margin: 2px 6px 2px 0; cursor: pointer; padding: 0; font-family: inherit;
}
.crm-actuar {
    border: 1px solid; border-radius: 11px; padding: 3px 10px; margin: 2px 6px 2px 0; font-size: 10px; font-weight: 700;
    cursor: pointer; font-family: inherit;
}
.crm-cal {
    position: absolute; right: 10px; top: 8px; display: flex; flex-direction: column; align-items: center;
    font-size: 20px; line-height: 1.1;
}
.crm-cal b { font-size: 11px; }
.crm-nota {
    position: absolute; right: 44px; top: 8px; width: 22px; height: 22px; border-radius: 11px; border: none;
    font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; font-family: inherit;
}
.crm-tarjeta:not(:has(.crm-cal)) .crm-nota { right: 12px; }

/* ── Análisis de la IA de las fotos pendientes (AnalisisIaVista) ── */
.ia-leyenda { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:10.5px; margin:6px 0 2px; }
.ia-resumen { font-style:italic; color:#3D2B1F; font-size:12.5px; margin:4px 0; }
.ia-item { background:#FBF6EC; border:1px solid #EFE6DA; border-radius:8px; padding:6px 10px; margin:4px 0; font-size:12.5px; }
.ia-dibujo { margin:6px 0; font-size:12.5px; }
.ia-svg { background:#fff; border:1px solid #EFE6DA; border-radius:8px; padding:4px; margin-top:4px; }
.ia-svg svg { width:100%; height:auto; display:block; }
.ia-rot { display:block; color:#B7791F; font-weight:700; font-size:11px; letter-spacing:.3px; margin-top:8px; }
.av-ia { padding:0 12px 10px 12px; }
/* Solo el icono: el resumen de la IA se abre al pulsarlo, no ocupa sitio en el aviso. */
.av-ia-btn {
    width: 38px; height: 32px; border: none; border-radius: 10px; cursor: pointer;
    background: #EDE5D8; color: #8A7A63; font-size: 15px; line-height: 1; font-family: inherit;
}
.av-ia-btn.listo { background: #3D2B1F; color: #C9B99A; }
.av-ia-btn:disabled { opacity: .6; cursor: default; }
