/* ════════════════════════════════════════════════════════ */
/*                     INTAKE — HERO                       */
/* ════════════════════════════════════════════════════════ */
.ai-hero{
  background:linear-gradient(135deg,
    rgba(139,92,246,.08),
    rgba(232,96,44,.08));
  border:1px solid rgba(139,92,246,.2);
  border-radius:16px;
  padding:28px 24px;
  text-align:center;
  margin-bottom:16px;}

.ai-hero-icon{
  font-size:34px;
  margin-bottom:10px;}

.ai-hero-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:6px;
  background:linear-gradient(135deg,
    var(--purple),
    var(--acc));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;}

.ai-hero-sub{
  font-size:12px;
  color:var(--text2);
  max-width:500px;
  margin:0 auto;}

/* ════════════════════════════════════════════════════════ */
/*                   INTAKE — LAYOUT                       */
/* ════════════════════════════════════════════════════════ */

.ingreso-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-bottom:14px;}

@media (max-width:860px){
  .ingreso-cols{grid-template-columns:1fr;}}

/* ════════════════════════════════════════════════════════ */
/*                   INTAKE — DROP ZONE                    */
/* ════════════════════════════════════════════════════════ */

.drop-zone{
  position:relative;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;

  min-height:180px;

  padding:36px 24px;

  background:var(--bg2);

  border:2px dashed var(--border2);
  border-radius:var(--r);

  text-align:center;

  cursor:pointer;

  transition:
    border-color .2s ease,
    background .2s ease;}

.drop-zone:hover,
.drop-zone.drag{
  border-color:var(--acc);
  background:rgba(232,96,44,.04);}

.drop-zone input[type=file]{
  position:absolute;
  inset:0;

  width:100%;
  height:100%;

  opacity:0;
  cursor:pointer;}

.dz-icon{
  font-size:32px;
  margin-bottom:12px;
  pointer-events:none;}

.dz-title{
  font-size:14px;
  font-weight:700;
  margin-bottom:6px;
  pointer-events:none;}

.dz-sub{
  font-size:11.5px;
  color:var(--text2);
  line-height:1.5;
  pointer-events:none;}

/* ════════════════════════════════════════════════════════ */
/*                  INTAKE — ANALISIS PANEL                */
/* ════════════════════════════════════════════════════════ */

.analisis-panel{
  display:flex;
  flex-direction:column;

  min-height:180px;

  padding:18px;

  background:var(--bg2);

  border:1px solid var(--border);
  border-radius:var(--r);}

.analisis-title{
  display:flex;
  align-items:center;
  gap:7px;

  margin-bottom:14px;

  font-size:12px;
  font-weight:700;

  color:var(--acc);

  text-transform:uppercase;
  letter-spacing:.04em;}

/* ════════════════════════════════════════════════════════ */
/*                     INTAKE — STEPS                      */
/* ════════════════════════════════════════════════════════ */

.ai-step-mini{
  display:flex;
  align-items:center;
  gap:10px;

  padding:8px 0;

  border-bottom:1px solid var(--border);

  font-size:12.5px;
  color:var(--text2);

  transition:color .2s ease;}

.ai-step-mini:last-child{
  border-bottom:none;}

.ai-step-mini .ico{
  width:24px;
  height:24px;

  display:flex;
  align-items:center;
  justify-content:center;

  flex-shrink:0;

  border-radius:50%;

  font-size:11px;

  transition:background .2s ease;}

.ai-step-mini.pend .ico{
  background:var(--bg3);
  color:var(--text3);}

.ai-step-mini.run{
  color:var(--acc);}

.ai-step-mini.run .ico{
  background:rgba(232,96,44,.15);
  color:var(--acc);
  animation:pulse 1s infinite;}

.ai-step-mini.done{
  color:var(--text);}

.ai-step-mini.done .ico{
  background:rgba(34,197,94,.15);
  color:var(--green);}

/* ════════════════════════════════════════════════════════ */
/*                  INTAKE — RESULT WRAPPER                */
/* ════════════════════════════════════════════════════════ */

.ai-result{
  display:none;

  width:100%;
  overflow:hidden;

  margin-top:4px;
  padding:22px;

  background:var(--bg2);

  border:1px solid var(--border);
  border-radius:18px;}

.ai-result.show{
  display:block;
  animation:fadeUp .25s ease both;}

.ai-fields-wrap{
  display:flex;
  flex-direction:column;
  gap:22px;

  width:100%;}

/* ════════════════════════════════════════════════════════ */
/*                 INTAKE RESULT HEADER                    */
/* ════════════════════════════════════════════════════════ */

.ai-result-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;

  margin-bottom:24px;
  padding-bottom:18px;

  border-bottom:1px solid var(--border);}

.ai-result-title-wrap{
  display:flex;
  flex-direction:column;
  gap:6px;}

.ai-result-title{
  font-size:20px;
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--text);}

.ai-result-subtitle{
  font-size:13px;
  line-height:1.5;
  color:var(--text2);}

/* ════════════════════════════════════════════════════════ */
/*                    INTAKE — GROUPS                      */
/* ════════════════════════════════════════════════════════ */

.ai-group{
  padding:22px;

  background:linear-gradient(
    180deg,
    rgba(255,255,255,.02),
    rgba(255,255,255,.01));

  border:1px solid var(--border);
  border-radius:18px;}

.ai-group-title{
  display:flex;
  align-items:center;
  gap:10px;

  margin-bottom:20px;
  padding-bottom:12px;

  font-size:11px;
  font-weight:800;

  color:var(--text2);

  text-transform:uppercase;
  letter-spacing:.1em;

  border-bottom:1px solid rgba(255,255,255,.05);}

.ai-group-title::before{
  content:"";

  width:4px;
  height:14px;

  border-radius:999px;
  background:var(--acc);}

/* ════════════════════════════════════════════════════════ */
/*                DATOS DE LA CAUSA — GRID                 */
/* ════════════════════════════════════════════════════════ */

.ai-grid-causa{
  display:flex;
  flex-direction:column;
  gap:14px;}

.ai-causa-row{
  display:grid;
  gap:14px;}

.ai-causa-row.top{grid-template-columns:repeat(3,minmax(0,1fr));}
.ai-causa-row.bottom{grid-template-columns:repeat(2,minmax(0,1fr));}

/* ════════════════════════════════════════════════════════ */
/*               DATOS DEL CLIENTE — GRID                   */
/* ════════════════════════════════════════════════════════ */

.ai-clientes-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;}

.ai-cliente-col{
  display:flex;
  flex-direction:column;
  gap:12px;}

.ai-cliente-head{
  display:flex;
  align-items:center;
  gap:8px;

  margin-bottom:2px;

  font-size:11px;
  font-weight:800;

  color:var(--text2);

  text-transform:uppercase;
  letter-spacing:.08em;}

.ai-cliente-head::before{
  content:"";

  width:6px;
  height:6px;
  
  border-radius:50%;
  background:var(--acc);}

/* ════════════════════════════════════════════════════════ */
/*               OBSERVACIONES — LAYOUT                     */
/* ════════════════════════════════════════════════════════ */

.ai-observaciones{
  min-height:150px;}

.ai-observaciones .ai-field-value{
  line-height:1.75;
  white-space:pre-wrap;}

/* ════════════════════════════════════════════════════════ */
/*                  INTAKE — GENERIC GRID                  */
/* ════════════════════════════════════════════════════════ */

.ai-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  width:100%;}

.ai-fields.single{
  grid-template-columns:1fr;}

.ai-fields.full{
  grid-column:1/-1;}

/* ════════════════════════════════════════════════════════ */
/*                    INTAKE FIELD CARD                    */
/* ════════════════════════════════════════════════════════ */

.ai-field{
  position:relative;

  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:10px;

  min-height:88px;

  padding:16px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.018),
      rgba(255,255,255,.01));

  border:1px solid rgba(255,255,255,.05);
  border-radius:14px;

  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;}

.ai-field:hover{
  transform:translateY(-1px);}

.ai-field.detected{
  border-color:rgba(46,204,113,.25);
  background:rgba(46,204,113,.04);}

.ai-field.missing{
  border-color:rgba(255,170,0,.22);
  background:rgba(255,170,0,.04);}

.ai-field label{
  font-size:10px;
  font-weight:800;

  color:var(--text3);

  text-transform:uppercase;
  letter-spacing:.08em;}

.ai-field-value{
  font-size:13.5px;
  font-weight:600;
  line-height:1.55;

  color:var(--text);

  word-break:break-word;}

.ai-field-empty{
  color:var(--text3);
  font-style:italic;}

/* ════════════════════════════════════════════════════════ */
/*                      FIELD BADGES                       */
/* ════════════════════════════════════════════════════════ */

.field-badge{
  position:absolute;
  top:12px;
  right:12px;

  width:22px;
  height:22px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:999px;

  font-size:12px;
  font-weight:700;}

.field-badge.ok{
  background:rgba(46,204,113,.12);
  color:#2ecc71;}

.field-badge.warn{
  background:rgba(255,170,0,.12);
  color:#ffaa00;}

/* ════════════════════════════════════════════════════════ */
/*                     NEED TEXT                           */
/* ════════════════════════════════════════════════════════ */

.need{
  display:flex;
  align-items:center;
  gap:4px;

  margin-top:4px;

  font-size:10px;
  color:var(--red);}

.need::before{
  content:"!";

  width:12px;
  height:12px;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  flex-shrink:0;

  background:var(--red);
  color:#fff;

  border-radius:50%;
  
  font-size:8px;
  font-weight:800;}

/* ════════════════════════════════════════════════════════ */
/*                       RESPONSIVE                        */
/* ════════════════════════════════════════════════════════ */

@media (max-width:960px){
  .ai-clientes-grid{grid-template-columns:1fr;}
  .ai-causa-row.top{grid-template-columns:1fr;}
  .ai-causa-row.bottom{grid-template-columns:1fr;}
  .ai-fields{grid-template-columns:1fr;}
  .ai-result-header{flex-direction:column;}}

  /* ════════════════════════════════════════════════════════ */
/*                INPUTS EDITABLES IA                      */
/* ════════════════════════════════════════════════════════ */

.ai-input{
  width:100%;
  background:transparent;
  border:none;
  outline:none;
  color:var(--text);
  font-size:14px;
  font-weight:600;
  font-family:inherit;
  padding:0;
  margin:0;}

.ai-input::placeholder{
  color:var(--text3);
  opacity:.7;}

.ai-field{position:relative;}

.ai-field input{background:transparent !important;}