/* CPT AA · Asociados Autorizados — estilos de las pantallas propias (public/aa.js).
   Sólo se carga en la instancia de CPT AA. Usa las variables de marca de styles.css (--navy = celeste CPT,
   --magenta = naranja CPT, sobrescritas por branding.ts) y agrega sólo clases con prefijo aa-. */

/* El hover de los botones de acción usa --magenta-dark, que branding.ts no sobrescribe: naranja CPT oscuro. */
:root { --magenta-dark: #e68900; }
.aa-full.aa-ancho .intake-body { max-width: 1080px; }
.aa-full .intake-top .cpt-lockup .cpt-flag { height: 24px; }
.aa-full .intake-top .cpt-aa { font-size: 12px; height: 22px; padding: 0 6px; }
.aa-mt { margin-top: 12px; }
.aa-centro { text-align: center; }
.aa-centro-txt { text-align: center; }
.aa-izq { text-align: left; }
.aa-wrap { white-space: normal !important; }
.aa-verde { color: var(--ok); font-size: 16px; }
.aa-debe { color: var(--magenta) !important; }

/* Botones extra */
.aa-btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); margin-top: 10px; }
.aa-btn-outline:hover { background: #f3fafe; }
.aa-btn-outline:disabled { opacity: .55; cursor: not-allowed; }
.aa-btn-danger { background: #fff; color: var(--danger); border: 1.5px solid #f1b4b4; margin-top: 10px; }
.aa-btn-danger:hover { background: #fef2f2; }
.btn.btn-sm { width: auto; }
.aa-badge { display: inline-block; margin-left: 6px; background: #fff; color: var(--magenta); font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }

/* Avisos */
.iv-note.aa-ok { background: #ecfdf3; border-color: #bbf7d0; border-left-color: var(--ok); color: #14532d; margin: 0 0 14px; max-width: none; }
.iv-note.aa-bad { background: #fef2f2; border-color: #fecaca; border-left-color: var(--danger); color: #7f1d1d; margin: 0 0 14px; max-width: none; }
.aa-ancho-nota { max-width: none !important; margin: 0 0 16px !important; }
.welcome-badge.aa-badge-ok { background: #ecfdf3; border-color: #bbf7d0; color: var(--ok); }
.welcome-badge.aa-badge-bad { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.aa-verdict-chico { font-size: 24px !important; }
.verdict-note.aa-motivo { font-size: 15px; }
.aa-pasos { text-align: left; font-size: 13px; color: #6b5200; margin: 12px auto 0; max-width: 380px; padding-left: 20px; line-height: 1.6; }

/* Cámara de rostro */
.aa-cam.face { aspect-ratio: 3 / 4; max-height: 60vh; margin: 0 auto; }

/* Teléfono */
.aa-phone-row { display: flex; align-items: stretch; gap: 8px; }
.aa-isd { display: inline-flex; align-items: center; padding: 0 12px; border: 1.5px solid #d9dbe4; border-radius: 9px; background: #f5f6fb; font-weight: 700; color: var(--navy); white-space: nowrap; }
.aa-phone-row input { flex: 1; min-width: 0; }
.aa-phone-row input:disabled { background: #f5f6fb; color: var(--muted); }

/* Intentos (3 puntos) */
.aa-intentos { display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.aa-intentos i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; }
.aa-intentos i.usado { background: #d9dde9; }
.aa-intentos span { margin-left: 4px; }

.aa-filtros { grid-template-columns: repeat(2, 1fr); }
.aa-hint-datos { margin: -8px 0 16px; }

/* Estado de Cuenta */
.aa-full .saldo-card.vacio { background: linear-gradient(150deg, #8a94a6 0%, #6b7280 70%); }
.aa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aa-kpi-ancho { grid-column: 1 / -1; }
.aa-alias { background: #fff; border: 1.5px solid #b5e2f6; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.aa-alias-l { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.aa-alias-fila { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.aa-alias-v { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 800; color: #0c1240; letter-spacing: .02em; }
.aa-alias-fila .btn { margin: 0 0 0 auto; }
.aa-sec { font-size: 13px; font-weight: 800; color: var(--navy); margin: 20px 0 8px; }
.aa-lista { background: #fff; border: 1px solid #e6e8f2; border-radius: 12px; overflow: hidden; }
.aa-fila { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #eef0f6; }
.aa-fila:last-child { border-bottom: 0; }
.aa-fila-main { flex: 1; min-width: 0; }
.aa-fila-t { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.aa-fila-s { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.aa-fila-r { text-align: right; flex: none; }
.aa-fila-r b { display: block; font-size: 14px; color: var(--navy); font-variant-numeric: tabular-nums; }
.aa-vacio { text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.5; padding: 18px 14px; background: #fff; border: 1px dashed #d9dbe4; border-radius: 12px; margin-bottom: 12px; }
.aa-captura { display: flex; gap: 8px; margin: 4px 0 10px; }
.aa-captura .btn { margin-top: 0; flex: 1; }
.aa-comp-vacio { border: 1.5px dashed #c9ced8; border-radius: 12px; padding: 18px; text-align: center; font-size: 13px; color: var(--muted); background: #fafbfc; margin-bottom: 12px; }
.aa-comp-img { display: block; max-width: 100%; max-height: 420px; margin: 4px auto 12px; border: 1px solid #e5e7eb; border-radius: 10px; }
.aa-check { list-style: none; margin: 0 0 14px; padding: 0; background: #fff; border: 1px solid #e6e8f2; border-radius: 12px; text-align: left; }
.aa-check li { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #eef0f6; font-size: 13.5px; line-height: 1.4; }
.aa-check li:last-child { border-bottom: 0; }
.aa-ck { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--ok); }
.aa-ck.bad { background: var(--danger); }
.aa-ck.info { background: #9aa3b2; }
.aa-st { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.aa-st-aprobada { background: #e7f7ee; color: #15803d; }
.aa-st-en_aprobacion { background: #fef3c7; color: #92400e; }
.aa-st-en_revision { background: #fee2e2; color: #b91c1c; }
.aa-st-rechazada { background: #eef0f4; color: #4b5563; }

/* Casa Matriz · transferencias */
.aa-mkpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.aa-mkpis > div { background: var(--magenta-soft); border: 1px solid #ffd8a8; border-radius: 12px; padding: 12px 10px; text-align: center; min-width: 0; }
.aa-mkpis .kpi-v { font-size: 17px; color: #0c1240; }
.aa-tr { background: #fff; border: 1px solid #e6e8f2; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.7fr) auto; gap: 12px 18px; align-items: start; }
.aa-tr.rev { border-left: 4px solid var(--danger); }
.aa-tr.pend { border-left: 4px solid #e0a800; }
.aa-tr-dist { font-size: 14.5px; font-weight: 800; color: #0c1240; }
.aa-tr-meta { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.aa-tr-monto { font-size: 20px; font-weight: 800; color: #0c1240; font-variant-numeric: tabular-nums; margin-top: 4px; }
.aa-tr-leido { display: flex; flex-wrap: wrap; gap: 6px; }
.aa-tr-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.aa-tr-acts .btn { margin-top: 0; }
.aa-motivos { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: #7f1d1d; line-height: 1.45; }
.aa-tr-extracto { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; border-radius: 9px; padding: 8px 10px; cursor: pointer; }
.aa-tr-extracto input { width: 18px; height: 18px; flex: none; }
.aa-tr-msg { grid-column: 1 / -1; margin: 0; text-align: left; min-height: 0; }
.aa-tr-msg:empty { display: none; }

/* Modal y aviso flotante */
.aa-modal-bg { position: fixed; inset: 0; z-index: 300; background: rgba(12, 18, 64, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.aa-modal { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 20px 20px 16px; color: var(--ink); }
.aa-modal h2 { font-size: 18px; font-weight: 800; color: #0c1240; margin: 0 0 8px; }
.aa-modal p { font-size: 14px; line-height: 1.5; color: #4b5563; margin: 0 0 12px; }
.aa-modal textarea { width: 100%; box-sizing: border-box; border: 1.5px solid #d9dbe4; border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; }
.aa-modal-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.aa-modal-acts .btn { width: auto; margin-top: 0; }
.aa-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 400; background: #0c1240; color: #fff; padding: 12px 18px; border-radius: 11px; font-size: 13.5px; font-weight: 600; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: opacity .2s; }
.aa-toast.on { opacity: 1; }

@media (max-width: 760px) {
  .aa-tr { grid-template-columns: minmax(0, 1fr); }
  .aa-tr-acts { justify-content: flex-start; }
  .aa-mkpis { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .aa-captura { flex-direction: column; }
  .aa-alias-v { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .aa-toast { transition: none; } }
