/* ═══════════════════════════════════════════════════════════
   TMV Tasación Propiedad Horizontal — v1.0.0
   Specificity: body .tmv-ph-wrap para combatir "Reviews News"
═══════════════════════════════════════════════════════════ */

/* RESET dentro del contenedor */
body .tmv-ph-wrap,
body .tmv-ph-wrap * {
  box-sizing: border-box !important;
  -webkit-text-fill-color: unset !important;
}

body .tmv-ph-wrap {
  font-family: 'Segoe UI', Arial, sans-serif !important;
  color: #1a1a2e !important;
  max-width: 1200px !important;
  margin: 0 auto 2rem !important;
  padding: 0 !important;
}

/* ── Header ── */
body .tmv-ph-header {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: 1.4rem 1.8rem !important;
  border-radius: 12px 12px 0 0 !important;
  margin-bottom: 0 !important;
}
body .tmv-ph-logo {
  font-size: 2rem !important;
  font-weight: 900 !important;
  color: #e94560 !important;
  -webkit-text-fill-color: #e94560 !important;
  letter-spacing: -1px !important;
}
body .tmv-ph-header h2 {
  margin: 0 !important;
  font-size: 1.25rem !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  padding: 0 !important;
}
body .tmv-ph-sub {
  margin: 0.15rem 0 0 !important;
  font-size: 0.78rem !important;
  color: #a8c7fa !important;
  -webkit-text-fill-color: #a8c7fa !important;
}

/* ── Cards ── */
body .tmv-ph-card {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: none !important;
  padding: 1.4rem 1.6rem !important;
}
body .tmv-ph-card:last-of-type {
  border-radius: 0 0 12px 12px !important;
}

/* ── Section titles ── */
body .tmv-ph-section-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #0f3460 !important;
  -webkit-text-fill-color: #0f3460 !important;
  margin: 0 0 1rem !important;
  padding-bottom: 0.5rem !important;
  border-bottom: 2px solid #e94560 !important;
}

body .tmv-ph-hint {
  font-size: 0.82rem !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  margin: -0.5rem 0 0.8rem !important;
}

/* ── Grid ── */
body .tmv-ph-grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.8rem 1.2rem !important;
}
body .tmv-ph-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.8rem 1.2rem !important;
}

/* ── Fields & Inputs ── */
body .tmv-ph-field label {
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  -webkit-text-fill-color: #374151 !important;
  margin-bottom: 0.3rem !important;
}
body .tmv-ph-input,
body .tmv-ph-select {
  width: 100% !important;
  padding: 0.45rem 0.7rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
  background: #f8fafc !important;
  transition: border-color 0.2s !important;
  outline: none !important;
}
body .tmv-ph-input:focus,
body .tmv-ph-select:focus {
  border-color: #0f3460 !important;
  background: #fff !important;
}

/* ── Construccion / BCE row ── */
body .tmv-ph-row-constr,
body .tmv-ph-row-bcg,
body .tmv-ph-row-bce {
  background: #f0f4ff !important;
  border: 1px solid #c7d7f8 !important;
  border-radius: 8px !important;
  padding: 0.8rem !important;
  margin-bottom: 0.7rem !important;
  display: grid !important;
  gap: 0.5rem 0.8rem !important;
  align-items: end !important;
}
body .tmv-ph-row-constr { grid-template-columns: repeat(5,1fr) 2fr auto !important; }
body .tmv-ph-row-bcg    { grid-template-columns: 2fr 1fr 1fr auto !important; }
body .tmv-ph-row-bce    { grid-template-columns: 2fr 1fr 1fr auto !important; }

body .tmv-ph-row-unidad {
  background: #fff8f0 !important;
  border: 1px solid #fcd9a5 !important;
  border-radius: 8px !important;
  padding: 1rem !important;
  margin-bottom: 0.9rem !important;
}
body .tmv-ph-unidad-header {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto !important;
  gap: 0.5rem 0.8rem !important;
  align-items: end !important;
  margin-bottom: 0.6rem !important;
}
body .tmv-ph-bce-block {
  padding-left: 0.5rem !important;
  border-left: 3px solid #fcd9a5 !important;
  margin-top: 0.5rem !important;
}
body .tmv-ph-bce-title {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #92400e !important;
  -webkit-text-fill-color: #92400e !important;
  margin-bottom: 0.4rem !important;
}

/* ── Buttons ── */
body .tmv-ph-btn-add {
  background: none !important;
  border: 1.5px dashed #0f3460 !important;
  color: #0f3460 !important;
  -webkit-text-fill-color: #0f3460 !important;
  border-radius: 6px !important;
  padding: 0.4rem 1rem !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-top: 0.5rem !important;
  transition: background 0.2s !important;
}
body .tmv-ph-btn-add:hover {
  background: #e8f0fe !important;
}
body .tmv-ph-btn-del {
  background: #fee2e2 !important;
  border: none !important;
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
  border-radius: 4px !important;
  padding: 0.3rem 0.6rem !important;
  cursor: pointer !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
body .tmv-ph-btn-del-bce {
  background: #fef3c7 !important;
  border: none !important;
  color: #92400e !important;
  -webkit-text-fill-color: #92400e !important;
  border-radius: 4px !important;
  padding: 0.25rem 0.5rem !important;
  cursor: pointer !important;
  font-size: 0.75rem !important;
}
body .tmv-ph-btn-add-bce {
  background: none !important;
  border: 1px dashed #d97706 !important;
  color: #d97706 !important;
  -webkit-text-fill-color: #d97706 !important;
  border-radius: 5px !important;
  padding: 0.25rem 0.7rem !important;
  font-size: 0.76rem !important;
  cursor: pointer !important;
  margin-top: 0.35rem !important;
}
body .tmv-ph-actions {
  display: flex !important;
  gap: 1rem !important;
  justify-content: center !important;
  margin: 1.2rem 0 !important;
  flex-wrap: wrap !important;
}
body .tmv-ph-wrap .tmv-ph-actions .tmv-ph-btn-calc,
body .tmv-ph-btn-calc {
  background: #e94560 !important;
  background-color: #e94560 !important;
  background-image: linear-gradient(135deg, #e94560 0%, #c0253e 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  padding: 0.75rem 2.2rem !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 4px 14px rgba(233,69,96,0.35) !important;
  opacity: 1 !important;
  text-decoration: none !important;
  display: inline-block !important;
}
body .tmv-ph-wrap .tmv-ph-actions .tmv-ph-btn-calc:hover,
body .tmv-ph-btn-calc:hover {
  background: #c0253e !important;
  background-color: #c0253e !important;
  background-image: linear-gradient(135deg, #c0253e 0%, #a01f35 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body .tmv-ph-wrap .tmv-ph-actions .tmv-ph-btn-save,
body .tmv-ph-btn-save {
  background: #0f3460 !important;
  background-color: #0f3460 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.6rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-block !important;
}
body .tmv-ph-wrap .tmv-ph-actions .tmv-ph-btn-print,
body .tmv-ph-btn-print {
  background: #16a34a !important;
  background-color: #16a34a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none !important;
  border-color: transparent !important;
  border-radius: 8px !important;
  padding: 0.75rem 1.6rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-block !important;
}

/* ── Tables ── */
body .tmv-ph-table-scroll { overflow-x: auto !important; }
body .tmv-ph-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.82rem !important;
  margin-top: 0.8rem !important;
}
body .tmv-ph-table th {
  background: #0f3460 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: 0.5rem 0.6rem !important;
  text-align: left !important;
  white-space: nowrap !important;
}
body .tmv-ph-table td {
  padding: 0.4rem 0.6rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
  white-space: nowrap !important;
}
body .tmv-ph-table tr:nth-child(even) td { background: #f8fafc !important; }
body .tmv-ph-table .tmv-ph-total td {
  background: #0f3460 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 700 !important;
}
body .tmv-ph-table tfoot td {
  background: #e94560 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 700 !important;
  padding: 0.55rem 0.6rem !important;
}

/* ── Resultado terreno ── */
body .tmv-ph-resultado-terreno { margin-top: 1rem !important; }

/* ── Firma ── */
body .tmv-ph-firma {
  text-align: right !important;
  font-size: 0.75rem !important;
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  margin-top: 0.8rem !important;
}

/* ── Utilidades ── */
body .tmv-ph-hidden { display: none !important; }

/* ── Print ── */
@media print {
  body .tmv-ph-actions,
  body .tmv-ph-btn-add,
  body .tmv-ph-btn-del,
  body .tmv-ph-btn-del-bce,
  body .tmv-ph-btn-add-bce { display: none !important; }
  body .tmv-ph-wrap { max-width: 100% !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  body .tmv-ph-grid-2,
  body .tmv-ph-grid-3 { grid-template-columns: 1fr !important; }
  body .tmv-ph-row-constr { grid-template-columns: 1fr 1fr !important; }
  body .tmv-ph-unidad-header { grid-template-columns: 1fr 1fr !important; }
}
