/* Estilos compartidos por las herramientas de CAD/CAM (despiece.html, optimizacion.html) */
.herr-barra { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.herr-tabs { display: flex; gap: 4px; overflow-x: auto; max-width: 100%; }
.herr-tabs button { background: #1a1a1a; border: 1px solid #2d2d2d; color: #9ca3af; padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; }
.herr-tabs button.on { color: #111; background: #f59e0b; border-color: #f59e0b; }
.herr-acciones { display: flex; flex-wrap: wrap; gap: 6px; }
.herr-btn { background: #1a1a1a; border: 1px solid #2d2d2d; color: #e5e7eb; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s; }
.herr-btn:hover { border-color: #f59e0b; }
.herr-btn.prim { background: #f59e0b; border-color: #f59e0b; color: #111; }
.herr-btn.prim:hover { background: #fbbf24; }
.herr-btn.peq { padding: 4px 9px; font-size: 12px; }
.herr-btn.borrar { color: #f87171; }
.herr-btn:disabled { opacity: .5; cursor: not-allowed; }
.herr-estado { font-size: 12px; color: #9ca3af; margin: 0 0 14px; }
.herr-card { background: #1a1a1a; border: 1px solid #2d2d2d; border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.herr-card h2 { color: #fff; font-weight: 800; font-size: 17px; margin: 0 0 12px; }
.herr-card h3 { color: #f59e0b; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }
.herr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
/* Etiquetas de una y dos líneas: las casillas quedan alineadas abajo */
.herr-grid > label { justify-content: flex-end; min-width: 0; }
.herr-grid > label select { max-width: 100%; }
.herr-grid > label.check { align-self: end; min-height: 36px; }
.herr-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9ca3af; }
.herr-card label.check { flex-direction: row; align-items: center; gap: 8px; color: #e5e7eb; font-size: 13px; }
.herr-card input, .herr-card select, .herr-card textarea { background: #111; border: 1px solid #2d2d2d; color: #fff; border-radius: 8px; padding: 7px 9px; font-size: 14px; min-width: 0; font-family: inherit; }
.herr-card input:focus, .herr-card select:focus, .herr-card textarea:focus { outline: 2px solid #f59e0b; outline-offset: -1px; }
.herr-card input[type=checkbox] { width: 17px; height: 17px; accent-color: #f59e0b; padding: 0; }
.herr-card textarea { width: 100%; min-height: 110px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.herr-card table { border-collapse: collapse; width: 100%; font-size: 13px; }
.herr-card th, .herr-card td { border-bottom: 1px solid #2d2d2d; padding: 6px; text-align: left; vertical-align: middle; }
.herr-card th { color: #9ca3af; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.herr-card td input, .herr-card td select { width: 100%; padding: 5px 7px; }
.herr-card td input.corto { max-width: 90px; text-align: right; }
.herr-card .num { text-align: right; white-space: nowrap; }
.herr-card .c { text-align: center; }
.herr-card td.editado input { border-color: #f59e0b; background: #2a1f0a; }
.herr-card tr.excluida td { opacity: .4; }
.herr-scroll { overflow-x: auto; }
.herr-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.herr-cab input.nombre { font-size: 16px; font-weight: 800; flex: 1; min-width: 160px; }
.herr-resumen { font-size: 12px; color: #9ca3af; margin-bottom: 4px; }
.herr-resumen.mal { color: #f87171; }
.herr-nota { color: #9ca3af; font-size: 12px; margin-top: 8px; line-height: 1.5; }
.herr-vacio { text-align: center; color: #9ca3af; padding: 34px 18px; }
.herr-avisos { border-left: 4px solid #ef4444; background: #2a1414; color: #fecaca; padding: 10px 14px 10px 30px; border-radius: 10px; margin: 0 0 16px; font-size: 13px; list-style: disc; }
.herr-datos { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.herr-datos > div { background: #111; border: 1px solid #2d2d2d; border-radius: 10px; padding: 8px 14px; font-size: 12px; color: #9ca3af; }
.herr-datos b { display: block; font-size: 20px; color: #fff; }
.herr-tablero { margin: 14px 0 24px; }
.herr-tablero-cab { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; color: #e5e7eb; font-size: 14px; }
svg.plano { width: 100%; height: auto; display: block; border-radius: 8px; }
.herr-mini { width: 90px; height: 60px; background: #111; border: 1px solid #2d2d2d; border-radius: 6px; }
.herr-pago { border: 1px solid rgba(245, 158, 11, .35); background: #1f1a10; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #e5e7eb; }

#informe { display: none; }
@media print {
  body { background: #fff !important; color: #111 !important; font-size: 10.5px; }
  nav, #mobile-menu, .no-imprimir { display: none !important; }
  #informe { display: block; font-family: Arial, sans-serif; }
  #informe h1 { font-size: 18px; margin: 0 0 4px; }
  #informe h2 { font-size: 14px; margin: 16px 0 6px; }
  #informe table { border-collapse: collapse; width: 100%; font-size: 9.5px; margin-bottom: 8px; }
  #informe th, #informe td { border-bottom: 1px solid #ccc; padding: 3px 4px; text-align: left; }
  #informe .num { text-align: right; }
  #informe .c { text-align: center; }
  #informe .pie { color: #666; font-size: 9px; margin-top: 16px; }
  #informe .salto { break-before: page; }
  #informe .herr-tablero { break-inside: avoid; }
  #informe svg.plano { max-height: 62vh; border: 1px solid #999; }
}
