
.apsfz-wrapper{
  width:100%;
  margin-top:14px;
}
.apsfz-card{
  background:#ffffff;
  border-radius:22px;
  box-shadow:0 16px 40px rgba(15,76,122,0.10);
  padding:22px 24px 22px;
  border:1px solid #e3e9f3;
}
.apsfz-header{
  margin-bottom:14px;
  padding-bottom:14px;
  border-bottom:1px solid #e8eef8;
}

.apsfz-meta-bar{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:12px;
  border-radius:18px;
  border:1px solid #e3e9f3;
  background:#f8fbff;
}
.apsfz-meta-item{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border-radius:14px;
  background:#ffffff;
  border:1px solid #e6eefb;
}
.apsfz-meta-label{
  font-size:11px;
  font-weight:600;
  color:#6b7280;
  letter-spacing:0.02em;
  text-transform:uppercase;
}
.apsfz-meta-value{
  font-size:15px;
  font-weight:900;
  color:#111827;
}
.apsfz-meta-help{
  font-size:11px;
  color:#6b7280;
}
.apsfz-header-main{
  display:flex;
  align-items:center;
  gap:14px;
}
.apsfz-logo-wrap{
  width:104px;
}
.apsfz-logo-wrap img{
  display:block;
  max-width:100%;
  height:auto;
}
.apsfz-title{
  margin:0;
  font-size:28px;
  font-weight:900;
  color:#1769A3;
  letter-spacing:-0.02em;
}
.apsfz-subtitle{
  margin:2px 0 0;
  font-size:14px;
  color:#6b7280;
}

/* Hace que el número de cotización destaque un poco más */
#apsfz_quote_number_display{
  font-size:18px;
  letter-spacing:0.02em;
}
.apsfz-section{
  margin-top:16px;
}


.apsfz-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 18px;
}
.apsfz-field{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.apsfz-field-full{
  grid-column:1 / -1;
}
.apsfz-field label{
  font-size:12px;
  font-weight:500;
  color:#374151;
}
.apsfz-field input,
.apsfz-field select,
.apsfz-field textarea{
  border-radius:12px;
  border:1px solid #d0d7e6;
  padding:8px 10px;
  font-size:13px;
  outline:none;
  transition:0.16s ease-in-out;
}
.apsfz-field input:focus,
.apsfz-field select:focus,
.apsfz-field textarea:focus{
  border-color:#1769A3;
  box-shadow:0 0 0 1px rgba(23,105,162,0.15);
}
.apsfz-input-suffix{
  display:flex;
  align-items:stretch;
}
.apsfz-input-suffix input{
  border-radius:12px 0 0 12px;
  flex:1;
}
.apsfz-input-suffix span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  font-size:12px;
  border-radius:0 12px 12px 0;
  border:1px solid #d0d7e6;
  border-left:none;
  background:#f3f6fb;
  color:#4b5563;
}
.apsfz-radio-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  color:#374151;
}
.apsfz-readonly{
  background:#f3f6fb;
  border-color:#e0e5f2;
}

.apsfz-calculated{
  background:#f3f6fb;
  border-color:#e0e5f2;
}
.apsfz-manual{
  background:#ffffff;
  border-color:#1769A3;
  box-shadow:0 0 0 1px rgba(23,105,162,0.15);
}
.apsfz-hint{
  font-size:11px;
  font-weight:600;
  color:#6b7280;
}
.apsfz-emphasis{
  font-weight:700;
  color:#1769A3;
}
.apsfz-req-list{
  margin:0;
  padding-left:18px;
  font-size:12px;
  color:#4b5563;
}
.apsfz-req-list li{
  margin-bottom:4px;
}
.apsfz-note{
  margin-top:8px;
  font-size:11px;
  color:#6b7280;
}
.apsfz-actions{
  margin-top:18px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.apsfz-btn-primary{
  border:none;
  border-radius:999px;
  padding:9px 20px;
  background:#1769A3;
  color:#ffffff;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(23,105,162,0.35);
  transition:0.17s ease-in-out;
}
.apsfz-btn-primary:hover{
  transform:translateY(-1px);
  background:#145a85;
}

.apsfz-btn-secondary{
  border:1px solid #1769A3;
  border-radius:999px;
  padding:9px 20px;
  background:#ffffff;
  color:#1769A3;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:0.17s ease-in-out;
}
.apsfz-btn-secondary:hover{
  transform:translateY(-1px);
  background:rgba(23,105,163,0.06);
}

.apsfz-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  max-width:360px;
  padding:12px 14px;
  border-radius:14px;
  background:#111827;
  color:#ffffff;
  font-size:13px;
  line-height:1.3;
  box-shadow:0 14px 40px rgba(0,0,0,0.25);
  z-index:999999;
}
.apsfz-toast strong{ font-weight:800; }
@media (max-width: 768px){
  .apsfz-card{
    padding:18px 14px 18px;
  }
  .apsfz-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .apsfz-actions{
    justify-content:stretch;
  }
  .apsfz-meta-bar{
    grid-template-columns:minmax(0,1fr);
  }
  .apsfz-btn-primary{
    width:100%;
    text-align:center;
  }
  .apsfz-btn-secondary{
    width:100%;
    text-align:center;
  }
}


.apsfz-section{
  margin-top:24px;
}
.apsfz-section-title{
  width:100%;
  background:#1769A3;
  color:#FFFFFF;
  font-size:18px;
  font-weight:700;
  text-align:center;
  padding:8px 0;
  margin:0 0 14px 0;
  text-transform:uppercase;
  border-top:2px solid #0F4E73;
  border-bottom:2px solid #0F4E73;
}


.apsfz-print-value{
  border-radius:12px;
  border:1px solid #d0d7e6;
  padding:8px 10px;
  font-size:13px;
  background:#f9fafb;
  color:#111827;
  min-height:32px;
  display:flex;
  align-items:center;
  box-sizing:border-box;
}



/* ==========================
   PDF TEMPLATE (Word-like)
   ========================== */
.apsfz-pdf-wrap{ width: 816px; }
.apsfz-pdf-page{
  position: relative;
  width: 816px; /* letter width @96dpi */
  min-height: 1056px; /* letter height @96dpi */
  background:#fff;
  padding: 48px 56px; /* approx Word margins */
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color:#000;
  font-size: 12pt;
  line-height: 1.25;
}

.apsfz-pdf-top{ margin-bottom: 18px; }
.apsfz-pdf-city{ font-size: 12pt; margin-bottom: 4px; }
.apsfz-pdf-date{ font-size: 12pt; }

.apsfz-pdf-table{
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-size: 12pt;
}
.apsfz-pdf-table td, .apsfz-pdf-table th{
  border: 1px solid #000;
  padding: 8px 10px;
  vertical-align: top;
}
.apsfz-pdf-table .lbl{ width: 40%; font-weight: 700; }
.apsfz-pdf-table .val{ width: 60%; }

.apsfz-pdf-table .section{
  text-align:center;
  font-weight: 700;
  letter-spacing: 2px;
}

.apsfz-pdf-table-3 th{
  text-align:center;
  font-weight:700;
}
.apsfz-pdf-table-3 td{
  text-align:left;
}

.apsfz-pdf-table-1 th{
  text-align:center;
  font-weight:700;
  letter-spacing: 2px;
}

.apsfz-pdf-free{
  margin-top: 6px;
  margin-bottom: 18px;
  font-size: 12pt;
}

.apsfz-pdf-req{
  margin-top: 10px;
  margin-bottom: 18px;
  font-size: 12pt;
}
.apsfz-pdf-req > div{ margin: 2px 0; }

.apsfz-pdf-par{
  margin: 10px 0;
}

.apsfz-pdf-sign{
  margin-top: 22px;
}
.apsfz-pdf-sign-name{ margin-top: 10px; font-weight: 700; }
.apsfz-pdf-sign-title{ }

.apsfz-pdf-footer{
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 28px;
  font-size: 10pt;
  color:#333;
  text-align:right;
}

/* =====================================================
   PDF v2 (igual al Word/PDF de Fianzas)
   ===================================================== */
.apsfz-pdf-page{
  box-sizing:border-box;
  background:#fff;
  color:#0f172a;
  /* Tipografía más alineada al cotizador APS */
  font-family: Helvetica, Arial, sans-serif;
  padding:52px;
}

/* ===== PDF Header (APS Clean / Corporate Modern) ===== */
.apsfz-pdf-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.apsfz-pdf-header-left{
  display:flex;
  align-items:center;
  gap:12px;
}
.apsfz-pdf-logo{
  height:34px;
  width:auto;
}
.apsfz-pdf-doc-title{
  font-size:15pt;
  font-weight:800;
  letter-spacing:0.2px;
}
.apsfz-pdf-doc-sub{
  font-size:11pt;
  opacity:0.85;
  margin-top:2px;
}
.apsfz-pdf-quote-chip{
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:10px 12px;
  min-width:170px;
  text-align:right;
  background:#f8fafc;
}
.apsfz-pdf-quote-chip .lbl{
  font-size:9.5pt;
  text-transform:uppercase;
  letter-spacing:0.08em;
  opacity:0.75;
}
.apsfz-pdf-quote-chip .num{
  font-size:12.5pt;
  font-weight:800;
  margin-top:2px;
  color:#0f172a;
}
.apsfz-pdf-divider{
  height:2px;
  background:#1769A3;
  opacity:0.9;
  margin:14px 0 10px;
  border-radius:2px;
}

.apsfz-pdf-meta{ margin: 16px 0 18px; }
.apsfz-pdf-meta-table{
  width:100%;
  border-collapse:collapse;
  font-size:12pt;
}
.apsfz-pdf-meta-table td{ padding:6px 0; }
.apsfz-pdf-meta-table .k{ width:42%; font-weight:700; }
.apsfz-pdf-meta-table .v{ width:58%; }

.apsfz-pdf-section{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px 14px 14px;
  margin:14px 0 0;
}

.apsfz-pdf-bar{
  background:#1769A3;
  color:#fff;
  font-weight:800;
  text-transform:uppercase;
  /* Más moderno: menos tracking para que no se "rompan" las palabras */
  letter-spacing:0.10em;
  padding:10px 12px;
  font-size:11.5pt;
  margin:0 0 10px;
  border-radius:10px;
}

.apsfz-pdf-details{
  width:100%;
  border-collapse:collapse;
  font-size:12pt;
}
.apsfz-pdf-details td{
  padding:6px 0;
  vertical-align:top;
}
.apsfz-pdf-details .k{ width:42%; font-weight:700; }
.apsfz-pdf-details .v{ width:58%; }

.apsfz-pdf-3col{
  width:100%;
  border-collapse:collapse;
  margin-top:14px;
  font-size:12pt;
}
.apsfz-pdf-3col th{
  border:1px solid #cbd5e1;
  background:#f1f5f9;
  padding:9px 10px;
  text-align:center;
  font-weight:800;
}
.apsfz-pdf-3col td{
  border:1px solid #cbd5e1;
  padding:10px;
  vertical-align:top;
}

.apsfz-pdf-box{
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:10px 12px;
  font-size:12pt;
  line-height:1.35;
  min-height:56px;
}

.apsfz-pdf-req{
  margin:10px 0 18px;
  font-size:12pt;
  padding-left:18px;
}
.apsfz-pdf-req li{ margin:4px 0; }

.apsfz-pdf-close p{
  margin:10px 0;
  font-size:12pt;
}
.apsfz-pdf-sign{ margin-top: 22px; }
.apsfz-pdf-sign-gap{ height: 22px; }
.apsfz-pdf-sign .name{ font-weight:800; margin-top:0; }
.apsfz-pdf-sign .role{ margin-top:2px; }
