:root{
  --abn-green:#B8C320;
  --abn-green-dark:#9aa31a;
  --abn-olive-bg:#e9e9e9;
  --abn-text:#111;
  --abn-muted:rgba(0,0,0,.70);
  --abn-border:rgba(0,0,0,.14);
  --abn-soft:rgba(0,0,0,.06);
  --abn-shadow:0 18px 40px rgba(0,0,0,.18);
  --abn-radius:18px;
  --abn-radius-sm:12px;
}

*{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  padding:24px 0;
  background:var(--abn-olive-bg);
  color:var(--abn-text);
  font-family:Arial, Helvetica, sans-serif;
}

.contenedor-premium{
  width:min(1180px,94%);
  margin:0 auto;
  background:#fff;
  border-radius:var(--abn-radius);
  box-shadow:var(--abn-shadow);
  padding:28px 34px 18px;
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:10px;
}

.logo{ display:block; height:120px; width:auto; }
.tarifas-img{ display:block; height:130px; width:auto; }

.titulo-centrado{
  text-align:center;
  margin:8px 0 16px;
  font-size:44px;
  font-weight:800;
  letter-spacing:.2px;
}

/* =========================
   CATEGORÍAS / SUBCATS
========================= */
#categorias, #subcategorias{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:14px;
}

#categorias{ margin:10px 0 10px; }
#subcategorias{ margin:10px 0 18px; gap:12px; }

.categoria, .subcat{
  border:1px solid rgba(0,0,0,.22);
  background:#efefef;
  color:#111;
  padding:12px 26px;
  border-radius:var(--abn-radius-sm);
  cursor:pointer;
  font-weight:800;
  letter-spacing:.35px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 6px 14px rgba(0,0,0,.12);
}

.subcat{
  padding:10px 18px;
  min-width:140px;
}

.categoria:hover, .subcat:hover{ filter:brightness(1.01); }

.categoria.activa, .subcat.activa{
  background:var(--abn-green);
  border-color:rgba(0,0,0,.30);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4), 0 10px 18px rgba(0,0,0,.14);
}

.subcat-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.subcat-ficha-slot{
  min-height:34px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.abn-ficha-btn{
  border:1px solid rgba(0,0,0,.20);
  background:#efefef;
  color:#111;
  padding:4px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:800;
  letter-spacing:.2px;
  font-size:11px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), 0 3px 8px rgba(0,0,0,.10);
}
.abn-ficha-btn:hover{ filter:brightness(1.01); }

/* =========================
   BUSCADOR
========================= */
.buscador{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:10px 10px;
  margin:8px 0 14px;
  padding:0 18px;
}

#buscar{
  flex:0 1 340px;
  max-width:340px;
  min-width:240px;
  height:44px;
  border-radius:10px;
  border:1px solid var(--abn-border);
  padding:0 14px;
  font-size:15px;
  outline:none;
  box-shadow:0 1px 0 var(--abn-soft);
}

#dto1,#dto2,#dto3{
  width:76px;
  height:44px;
  border-radius:10px;
  border:1px solid var(--abn-border);
  padding:0 10px;
  text-align:center;
  font-size:14px;
  font-weight:700;
  outline:none;
  box-shadow:0 1px 0 var(--abn-soft);
}

#dtoTotal{
  width:110px;
  height:44px;
  border-radius:10px;
  border:1px solid var(--abn-border);
  padding:0 10px;
  text-align:center;
  font-size:14px;
  font-weight:700;
  outline:none;
  box-shadow:0 1px 0 var(--abn-soft);
}

.buscador button{
  height:44px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.20);
  background:#efefef;
  padding:0 12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7), 0 6px 14px rgba(0,0,0,.12);
  white-space:nowrap;
}

#modificarDtoGlobal,
#verPresupuesto{
  background:var(--abn-green);
  border-color:rgba(0,0,0,.25);
  color:#fff;
}
#modificarDtoGlobal:hover,
#verPresupuesto:hover{ filter:brightness(1.02); }

#limpiar{
  background:#dc3545 !important;
  color:#fff !important;
  border-color:rgba(0,0,0,.25) !important;
}
#limpiar:hover{ filter:brightness(1.03); }

#descargarPdfBtn{
  order:999;
  flex-basis:100%;
  width:fit-content;
  margin-left:0 !important;
  justify-self:center;
  background:#007bff !important;
  border-color:#007bff !important;
  color:#fff !important;
}

/* =========================
   TABLA TARIFA
========================= */
#tabla-tarifa{
  width:100%;
  border:1px solid var(--abn-border);
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}

#tabla-tarifa table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

#tabla-tarifa thead th{
  background:var(--abn-green);
  color:#fff;
  font-weight:900;
  text-align:center;
  padding:6px 10px;
  font-size:14px;
  white-space:nowrap;
  vertical-align:middle;
}

#tabla-tarifa td{
  padding:4px 10px;
  border-top:1px solid rgba(0,0,0,.08);
  font-size:13px;
  line-height:1.15;
}

#tabla-tarifa tbody tr:nth-child(even){ background:rgba(0,0,0,.02); }

#tabla-tarifa thead th:nth-child(1){ width:15%; }
#tabla-tarifa thead th:nth-child(2){ width:55%; }
#tabla-tarifa thead th:nth-child(3){ width:10%; }
#tabla-tarifa thead th:nth-child(4){ width:10%; }
#tabla-tarifa thead th:nth-child(5){ width:10%; }

.btnAdd{
  width:30px;
  height:30px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.20);
  background:var(--abn-green);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.btnAdd:hover{ filter:brightness(1.02); }

.resaltadoABN{
  background:rgba(184,195,32,.25);
  border-radius:4px;
  padding:0 2px;
}

/* =========================
   PRESUPUESTO
========================= */
#presupuesto-container{ width:100%; }

#presupuesto-container table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--abn-border);
  border-radius:10px;
  overflow:hidden;
  table-layout:fixed;
}

#presupuesto-container thead th{
  background:var(--abn-green);
  color:#fff;
  font-weight:900;
  padding:10px 8px;
  font-size:12px;
  white-space:nowrap;
  text-align:center;
  vertical-align:middle;
}

#presupuesto-container td{
  padding:9px 8px;
  border-top:1px solid rgba(0,0,0,.08);
  font-size:11px;
  line-height:1.15;
}

/* descripción compacta (2 líneas) */
#presupuesto-container tbody td:nth-child(2){
  font-size:10.5px;
  line-height:1.05;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

/* Botonera en presupuesto */
.botonVerde{
  background:var(--abn-green);
  border:1px solid rgba(0,0,0,.20);
  color:#fff;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  margin:10px 8px 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), 0 8px 16px rgba(0,0,0,.12);
}

.btn-danger{
  background:#dc3545;
  border:1px solid rgba(0,0,0,.20);
  color:#fff;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  margin:10px 0 0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 8px 16px rgba(0,0,0,.12);
}

/* =========================
   FOOTER
========================= */
footer{
  text-align:center;
  margin-top:18px;
  padding-top:10px;
  color:rgba(0,0,0,.65);
  font-size:13px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1020px){
  .buscador{ flex-wrap:wrap; }
  #buscar{ flex:1 1 100%; max-width:100%; }
}

@media (max-width: 920px){
  body{ padding:14px 0; }
  .contenedor-premium{ padding:18px 16px 14px; }
  .logo{ height:95px; }
  .tarifas-img{ height:105px; }
  .titulo-centrado{ font-size:34px; }
}

/* ===== AJUSTE v7.8: tipografía, centrado y densidad de trabajo ===== */
:root{
  --abn-typewriter:"Special Elite","Courier Prime","Courier New",monospace;
}
html, body, body *{
  font-family:var(--abn-typewriter);
}
body{
  padding:16px 0;
}
.contenedor-premium{
  width:min(1460px,96vw);
  padding:20px 22px 18px;
  border-radius:28px;
}
.header,
.header-profesional,
.header-compacto{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) auto;
  align-items:center;
  gap:18px;
  margin-bottom:12px;
  padding:4px 6px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.brand-block,
.brand-lockup{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}
.logo{
  width:96px;
  height:96px;
}
.tarifas-img{
  height:82px;
}
.brand-kicker,
.eyebrow,
.panel-kicker,
.section-kicker,
.control-label,
.field-label{
  font-family:var(--abn-typewriter);
  letter-spacing:.06em;
}
.titulo-centrado,
.titulo-inline,
.section-title,
.panel-heading h2,
.abn-dialog__topbar h2,
.abn-ui-head h3{
  font-family:var(--abn-typewriter);
  font-weight:400;
}
.titulo-centrado,
.titulo-inline{
  font-size:clamp(2.2rem,3.8vw,3.5rem);
  line-height:.95;
}
.brand-subtitle{
  margin:8px 0 0;
  font-size:.9rem;
}
.panel-seccion,
.panel,
.panel-nav,
.panel-operativa-wrap{
  padding:14px 16px;
  border-radius:20px;
}
.section-head{
  margin-bottom:10px;
}
.section-title{
  font-size:1.02rem;
  line-height:1.15;
}
#categorias,
#subcategorias,
.fila-categorias,
.fila-subcategorias{
  display:flex;
  flex-wrap:wrap;
  justify-content:center !important;
  align-items:center;
  gap:10px;
  text-align:center;
}
#categorias,
.fila-categorias{
  margin:8px 0 0;
}
#subcategorias,
.fila-subcategorias{
  margin:8px 0 0;
  min-height:0;
}
.subcat-item{
  align-items:center;
}
.categoria,
.subcat{
  min-width:138px;
  min-height:40px;
  padding:9px 16px !important;
  font-size:.88rem !important;
}
.abn-ficha-btn{
  min-height:30px;
  padding:6px 10px !important;
  font-size:.76rem !important;
}
.panel-operaciones,
.buscador-profesional,
.buscador.buscador-profesional{
  grid-template-columns:minmax(240px,1.15fr) minmax(420px,1.25fr) minmax(330px,.95fr) !important;
  gap:12px !important;
}
.control-card,
.panel-operaciones .control-card{
  padding:12px 14px;
  border-radius:18px;
}
#buscar,
#dto1,
#dto2,
#dto3,
#dtoTotal{
  height:42px;
  font-size:.92rem;
  border-radius:12px;
}
.descuentos-panel{ gap:10px; }
.descuentos-heading{ gap:10px; }
.descuentos-grid{ gap:10px; }
.acciones-panel{ gap:10px; }
.acciones-principales{
  display:flex !important;
  flex-wrap:wrap;
  gap:8px;
  align-items:stretch;
}
.acciones-principales > button{
  flex:1 1 calc(50% - 4px);
  min-width:140px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#verPresupuesto,
#descargarPdfBtn,
#nuevaOferta,
#limpiar,
#editarOfertaBtn,
#abnOpcionesAvanzadasBtn,
#abnAccionesWrap > button,
#abnAccionesMenu .abn-acciones-item,
.botonVerde,
#modificarDtoGlobal,
#portesBtn,
#observacionesBtn,
#lineaManualBtn,
#borrarPresupuesto{
  min-height:40px;
  padding:9px 14px !important;
  font-size:.88rem !important;
}
#editarOfertaBtn{
  width:100%;
}
#descargarPdfBtn{
  flex:1 1 100%;
  width:100%;
}
#tabla-tarifa{
  margin-top:12px;
}
#tabla-tarifa thead th,
#presupuesto-container thead th,
#resultado-unico thead th{
  padding:10px 8px;
  font-size:.88rem;
}
#tabla-tarifa td,
#presupuesto-container td,
#resultado-unico td{
  padding:8px 8px;
  font-size:.84rem;
  line-height:1.15;
}
.btnAdd{
  width:34px !important;
  min-height:34px;
}
footer{
  padding-top:12px;
  font-size:.85rem;
}
@media (max-width:1180px){
  .panel-operaciones,
  .buscador-profesional,
  .buscador.buscador-profesional{
    grid-template-columns:1fr 1fr !important;
  }
  .acciones-panel{
    grid-column:1 / -1;
  }
}
@media (max-width:860px){
  .header,
  .header-profesional,
  .header-compacto{
    grid-template-columns:1fr;
    justify-items:center;
    text-align:center;
  }
  .brand-block,
  .brand-lockup{
    flex-direction:column;
    text-align:center;
  }
  .panel-operaciones,
  .buscador-profesional,
  .buscador.buscador-profesional{
    grid-template-columns:1fr !important;
  }
  .acciones-principales > button{
    flex:1 1 100%;
    min-width:0;
  }
}

/* ===== Final layout override ===== */
:root{
  --brand-green:#B8C320;
  --olive:#e9e9e9;
  --border:#d7d7d7;
  --shadow-soft:0 10px 24px rgba(0,0,0,.10);
}
html,body{height:100%;}
body{
  font-family:"Courier New", Courier, monospace !important;
  background:var(--olive) !important;
  padding:12px 0 !important;
}
.contenedor-premium{
  width:min(1080px, 92%) !important;
  padding:16px 20px 14px !important;
  border-radius:18px !important;
}
.hero-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:16px;
  padding:10px 14px 12px;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
  margin-bottom:12px;
}
.header.header-main{
  display:grid !important;
  grid-template-columns:112px 1fr 112px;
  align-items:center;
  gap:8px;
  margin-bottom:4px;
}
.logo{height:68px !important; width:auto; justify-self:start; display:block;}
.tarifas-img{height:70px !important; width:auto; justify-self:end; display:block;}
.header-center{display:flex; justify-content:center; align-items:center;}
.titulo-centrado{
  margin:0 !important;
  font-size:28px !important;
  line-height:1.05 !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
  text-align:center;
}
.section-lead{ text-align:center; margin:2px 0 8px; }
.section-kicker{
  font-size:13px;
  font-weight:800;
  letter-spacing:.4px;
  line-height:1.15;
}
.section-helper{
  font-size:11px;
  font-weight:600;
  opacity:.82;
  margin-top:4px;
  line-height:1.25;
}
.operativa-lead .section-helper{ margin-top:7px; }
#categorias,#subcategorias{
  display:flex !important;
  justify-content:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
}
#categorias{ margin:6px 0 !important; }
#subcategorias{ margin:6px 0 2px !important; }
.categoria,.subcat{
  min-height:34px !important;
  padding:7px 16px !important;
  border-radius:12px !important;
  font-size:13px !important;
  font-weight:800 !important;
  font-family:"Courier New", Courier, monospace !important;
}
.subcat{ min-width:120px !important; padding:6px 12px !important; }
.buscador.buscador-profesional{
  display:grid !important;
  grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1.3fr) !important;
  gap:10px !important;
  align-items:stretch !important;
  padding:0 !important;
  margin:0 !important;
}
.control-card{
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  padding:9px 10px 10px;
  min-height:unset !important;
}
.control-label{
  margin:0 0 7px !important;
  color:var(--brand-green) !important;
  text-align:center;
  font-size:14px !important;
  font-weight:900 !important;
}
.control-search #buscar{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  height:36px !important;
  border-radius:10px !important;
  padding:0 11px !important;
  font-size:13px !important;
  font-family:"Courier New", Courier, monospace !important;
}
.descuentos-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  align-items:end;
}
.discount-field{ display:flex; flex-direction:column; gap:4px; }
.field-label{
  display:block;
  text-align:center !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1.1;
  margin:0 !important;
}
#dto1,#dto2,#dto3,#dtoTotal{
  width:100% !important;
  min-width:0 !important;
  height:34px !important;
  line-height:34px !important;
  padding:0 8px !important;
  border-radius:9px !important;
  text-align:center !important;
  font-size:13px !important;
  font-weight:800 !important;
  font-family:"Courier New", Courier, monospace !important;
}
#dtoTotal{ min-width:86px !important; }
#modificarDtoGlobal{
  display:block;
  margin:8px auto 0;
  height:34px !important;
  min-height:34px !important;
  padding:0 12px !important;
  font-size:12px !important;
  border-radius:10px !important;
}
.acciones-panel{ display:flex; flex-direction:column; }
.acciones-principales,
.acciones-secundarias{
  display:grid !important;
  align-items:center;
  gap:6px !important;
}
.acciones-principales{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 42px;
  margin-bottom:6px;
}
.acciones-secundarias{
  grid-template-columns:minmax(0,1fr) auto;
}
.acciones-panel button,
#abnAccionesWrap > button,
.abn-acciones-item,
#editarOfertaBtn,
#limpiar,
#verPresupuesto,
#nuevaOferta,
#descargarPdfBtn{
  width:100%;
  height:34px !important;
  min-height:34px !important;
  padding:0 10px !important;
  font-size:12px !important;
  font-weight:800 !important;
  border-radius:10px !important;
  white-space:nowrap !important;
  font-family:"Courier New", Courier, monospace !important;
}
#verPresupuesto,#nuevaOferta,#limpiar,#editarOfertaBtn{
  background:#efefef !important;
  color:#111 !important;
  border:1px solid rgba(0,0,0,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72), 0 5px 12px rgba(0,0,0,.12) !important;
}
#limpiar{ background:#efefef !important; color:#111 !important; }
#verPresupuesto.activa,
#nuevaOferta.activa,
.categoria.activa,.subcat.activa{
  background:var(--brand-green) !important;
  color:#fff !important;
}
button:active,
.categoria:active,
.subcat:active,
.btnAdd:active{
  transform:translateY(1px) scale(.99);
}
#abnAccionesMount,
#editarOfertaMount{ display:contents; }
#abnAccionesWrap{ position:relative; display:block; z-index:50; }
#abnOpcionesAvanzadasBtn{
  width:42px !important;
  min-width:42px !important;
  padding:0 !important;
  font-size:18px !important;
  line-height:1 !important;
}
#abnOpcionesAvanzadasBtn::before{ content:'...'; }
#abnOpcionesAvanzadasBtn{ color:transparent !important; }
#abnAccionesMenu{
  position:absolute;
  top:38px;
  right:0;
  display:none;
  min-width:138px;
  background:#fff;
  border:1px solid rgba(0,0,0,.16);
  border-radius:12px;
  padding:6px;
  box-shadow:var(--shadow-soft);
  z-index:999;
}
#abnAccionesMenu[data-open="1"]{ display:grid; gap:6px; }
.abn-acciones-item{ width:100% !important; }
#descargarPdfBtn{
  margin-top:6px;
  justify-self:start;
  width:auto !important;
  padding:0 14px !important;
}
#tabla-tarifa{ margin-top:10px; }
#tabla-tarifa thead th{
  padding:5px 8px !important;
  font-size:12px !important;
}
#tabla-tarifa td{ font-size:12px !important; padding:4px 8px !important; }
#presupuesto-container thead th{ padding:8px 6px !important; font-size:11px !important; }
#presupuesto-container td{ padding:7px 6px !important; font-size:10.5px !important; }
footer{ margin-top:12px !important; font-size:12px !important; }
@media (max-width:980px){
  .contenedor-premium{ width:min(96%, 100%) !important; }
  .buscador.buscador-profesional{ grid-template-columns:1fr !important; }
  .descuentos-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .acciones-principales{ grid-template-columns:1fr 1fr 42px; }
}
@media (max-width:720px){
  .header.header-main{ grid-template-columns:72px 1fr 72px !important; }
  .logo{ height:52px !important; }
  .tarifas-img{ height:54px !important; }
  .titulo-centrado{ font-size:22px !important; }
}


/* ===== strict preservation patch: compact scale + action layout ===== */
.contenedor-premium{
  width:min(1000px, 88%) !important;
  padding:14px 18px 14px !important;
}
.hero-card{
  padding:8px 12px 10px !important;
  margin-bottom:10px !important;
}
.header.header-main{
  grid-template-columns:84px 1fr 84px !important;
  gap:6px !important;
  margin-bottom:2px !important;
}
.logo{height:56px !important;}
.tarifas-img{height:58px !important;}
.titulo-centrado{
  font-size:22px !important;
  line-height:1.02 !important;
  margin:0 !important;
}
.section-lead{
  margin:0 0 6px !important;
}
.section-kicker{
  font-size:12px !important;
  margin-bottom:3px !important;
}
.section-helper{
  font-size:10px !important;
  line-height:1.25 !important;
  opacity:.74 !important;
}
.operativa-lead .section-helper{margin-top:6px !important;}
#categorias,#subcategorias{gap:6px !important;}
.categoria,.subcat{
  min-height:30px !important;
  padding:6px 14px !important;
  font-size:12px !important;
}
.subcat{min-width:110px !important;}
.buscador.buscador-profesional{
  grid-template-columns:minmax(0,1fr) minmax(0,1.08fr) minmax(0,1.12fr) !important;
  gap:8px !important;
  align-items:start !important;
}
.control-card{
  padding:8px 9px 9px !important;
  border-radius:14px !important;
}
.control-label{
  color:var(--brand-green) !important;
  font-size:13px !important;
  margin:0 0 6px !important;
}
.control-search #buscar{
  height:34px !important;
  font-size:12px !important;
  padding:0 10px !important;
}
.descuentos-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) minmax(98px,1.1fr) !important;
  gap:6px !important;
}
.discount-field{gap:3px !important;}
.field-label{
  display:flex !important;
  justify-content:center !important;
  align-items:flex-end !important;
  min-height:15px !important;
  font-size:10.5px !important;
  line-height:1.05 !important;
  white-space:nowrap !important;
}
#dto1,#dto2,#dto3,#dtoTotal{
  height:30px !important;
  min-height:30px !important;
  line-height:1.15 !important;
  padding:0 8px !important;
  font-size:12px !important;
}
#dtoTotal{min-width:98px !important;}
#modificarDtoGlobal{
  height:30px !important;
  min-height:30px !important;
  font-size:11px !important;
  padding:0 10px !important;
  margin-top:7px !important;
}
.acciones-principales{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 34px !important;
  gap:4px !important;
  margin-bottom:4px !important;
}
.acciones-secundarias{
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:4px !important;
}
.acciones-panel button,
#abnAccionesWrap > button,
.abn-acciones-item,
#editarOfertaBtn,
#limpiar,
#verPresupuesto,
#nuevaOferta{
  height:32px !important;
  min-height:32px !important;
  font-size:11px !important;
  padding:0 10px !important;
}
#verPresupuesto,#limpiar,#editarOfertaBtn,#abnOpcionesAvanzadasBtn{
  background:#efefef !important;
  color:#111 !important;
}
#nuevaOferta{
  background:var(--brand-green) !important;
  border-color:rgba(0,0,0,.25) !important;
  color:#fff !important;
}
#nuevaOferta:hover,
#nuevaOferta:focus-visible{
  filter:brightness(1.04);
}
#limpiar{
  min-width:88px !important;
}
#editarOfertaBtn{
  width:100% !important;
}
#abnOpcionesAvanzadasBtn{
  width:34px !important;
  min-width:34px !important;
  padding:0 !important;
  font-size:18px !important;
  color:#111 !important;
}
#abnOpcionesAvanzadasBtn::before{content:none !important;}
#abnAccionesMenu{
  top:34px !important;
  right:0 !important;
}
#tabla-tarifa{margin-top:8px !important;}
#tabla-tarifa thead th{padding:4px 6px !important;font-size:11px !important;}
#tabla-tarifa td{padding:3px 6px !important;font-size:11px !important;}
footer{margin-top:10px !important;font-size:11px !important;}
@media (max-width: 980px){
  .contenedor-premium{width:min(96%,100%) !important;}
  .buscador.buscador-profesional{grid-template-columns:1fr !important;}
}


.acciones-principales{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:space-between !important;
  align-items:stretch !important;
  gap:12px !important;
}

#verPresupuesto,
#nuevaOferta{
  flex:0 0 42.5% !important;
  width:42.5% !important;
  max-width:42.5% !important;
  min-width:0 !important;
}

#abnOpcionesAvanzadasBtn{
  flex:0 0 52px !important;
  width:52px !important;
  min-width:52px !important;
  max-width:52px !important;
  padding:0 !important;
}

.acciones-principales > button{
  margin:0 !important;
}


.acciones-principales{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:space-between !important;
  align-items:stretch !important;
  gap:8px !important;
}

#verPresupuesto,
#nuevaOferta{
  flex:0 0 40.5% !important;
  width:40.5% !important;
  max-width:40.5% !important;
  min-width:0 !important;
}

#abnOpcionesAvanzadasBtn{
  flex:0 0 46px !important;
  width:46px !important;
  min-width:46px !important;
  max-width:46px !important;
  padding:0 !important;
}

.acciones-principales > button{
  margin:0 !important;
}


.acciones-principales{
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:flex-start !important;
  align-items:stretch !important;
  gap:6px !important;
  width:100% !important;
  box-sizing:border-box !important;
  overflow:visible !important;
}

#verPresupuesto,
#nuevaOferta,
#abnOpcionesAvanzadasBtn{
  box-sizing:border-box !important;
  margin:0 !important;
}

#verPresupuesto,
#nuevaOferta{
  flex:0 0 38% !important;
  width:38% !important;
  max-width:38% !important;
  min-width:0 !important;
}

#abnOpcionesAvanzadasBtn{
  flex:0 0 40px !important;
  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;
  padding:0 !important;
}

.acciones-principales > button{
  margin:0 !important;
}

/* ===== equal card heights without stretching inner content ===== */
.buscador.buscador-profesional{
  align-items:stretch !important;
  grid-auto-rows:1fr !important;
}

.buscador.buscador-profesional > .control-card{
  height:100% !important;
  min-height:0 !important;
  box-sizing:border-box !important;
}

.control-search,
.descuentos-panel,
.acciones-panel{
  align-self:stretch !important;
}

.control-search #buscar{
  flex:0 0 auto !important;
  height:34px !important;
  min-height:34px !important;
  max-height:34px !important;
}

.descuentos-panel .descuentos-grid,
.acciones-panel .acciones-principales,
.acciones-panel .acciones-secundarias,
#modificarDtoGlobal{
  flex:none !important;
}

/* ===== final professional dropdown menu overrides ===== */
.acciones-principales{
  overflow:visible !important;
}

#abnAccionesWrap{
  position:relative !important;
  z-index:80 !important;
}

#abnOpcionesAvanzadasBtn{
  position:relative !important;
  z-index:81 !important;
}

#abnAccionesMenu{
  position:absolute !important;
  top:46px !important;
  right:0 !important;
  left:auto !important;
  display:none !important;
  min-width:196px !important;
  padding:6px !important;
  border:1px solid rgba(17,17,17,.10) !important;
  border-radius:12px !important;
  background:#fff !important;
  box-shadow:0 10px 26px rgba(0,0,0,.12) !important;
  z-index:9999 !important;
  overflow:hidden !important;
}

#abnAccionesMenu[data-open="1"]{
  display:grid !important;
  gap:0 !important;
}

#abnAccionesMenu .abn-acciones-item{
  width:100% !important;
  min-height:42px !important;
  height:42px !important;
  padding:0 14px !important;
  border:0 !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#222 !important;
  box-shadow:none !important;
  font-size:15px !important;
  font-weight:700 !important;
  text-align:left !important;
  justify-content:flex-start !important;
  white-space:nowrap !important;
}

#abnAccionesMenu .abn-acciones-item + .abn-acciones-item{
  border-top:1px solid rgba(17,17,17,.08) !important;
}

#abnAccionesMenu .abn-acciones-item:hover{
  background:#f6f6f6 !important;
}

#abnAccionesMenu .abn-acciones-item:active{
  transform:translateY(1px) !important;
}

#abnAccionesMenu .abn-acciones-danger{
  color:#222 !important;
}

#abnAccionesMenu .abn-acciones-dark{
  color:#b42318 !important;
}

#abnAccionesMenu .abn-acciones-dark:hover{
  background:#fef3f2 !important;
}

/* ===== ver oferta: compactación segura sin romper layout ===== */
#presupuesto-container{
  margin-top:12px !important;
}

#presupuesto-container table{
  width:100% !important;
  table-layout:fixed !important;
}

#presupuesto-container thead th,
#presupuesto-container td{
  vertical-align:middle !important;
}

/* más ancho para descripción, menos hueco entre código y descripción */
#presupuesto-container thead th:nth-child(1),
#presupuesto-container tbody td:nth-child(1){
  width:11% !important;
  padding-right:4px !important;
}
#presupuesto-container thead th:nth-child(2),
#presupuesto-container tbody td:nth-child(2){
  width:31% !important;
  padding-left:4px !important;
}
#presupuesto-container thead th:nth-child(3),
#presupuesto-container tbody td:nth-child(3){ width:8% !important; }
#presupuesto-container thead th:nth-child(4),
#presupuesto-container tbody td:nth-child(4){ width:5% !important; }
#presupuesto-container thead th:nth-child(5),
#presupuesto-container tbody td:nth-child(5){ width:6% !important; }
#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6){ width:16% !important; }
#presupuesto-container thead th:nth-child(7),
#presupuesto-container tbody td:nth-child(7){ width:6% !important; }
#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){ width:7% !important; }
#presupuesto-container thead th:nth-child(9),
#presupuesto-container tbody td:nth-child(9){ width:10% !important; }

/* compactar separaciones de las columnas numéricas */
#presupuesto-container thead th:nth-child(n+3):nth-child(-n+8),
#presupuesto-container tbody td:nth-child(n+3):nth-child(-n+8){
  padding-left:3px !important;
  padding-right:3px !important;
}

/* títulos centrados sobre sus valores */
#presupuesto-container thead th:nth-child(n+3),
#presupuesto-container tbody td:nth-child(n+3){
  text-align:center !important;
}

/* descripción en una línea */
#presupuesto-container tbody td:nth-child(2){
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  display:table-cell !important;
  line-height:1.15 !important;
}

/* dto también en una línea */
#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6){
  white-space:nowrap !important;
}

/* total más cerca de acción */
#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){
  padding-right:2px !important;
}
#presupuesto-container thead th:nth-child(9),
#presupuesto-container tbody td:nth-child(9){
  padding-left:2px !important;
}

/* acciones compactas con iconos */
#presupuesto-container .acciones{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  flex-wrap:nowrap !important;
}

#presupuesto-container .btnEdit,
#presupuesto-container .btnDelete{
  position:relative !important;
  width:34px !important;
  min-width:34px !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 !important;
  border-radius:9px !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  text-indent:-9999px !important;
  font-size:0 !important;
  line-height:0 !important;
  box-shadow:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#fff !important;
}
#presupuesto-container .btnEdit{
  border:1px solid rgba(0,0,0,.16) !important;
}
#presupuesto-container .btnDelete{
  border:1px solid rgba(180,35,24,.22) !important;
  background:#fff !important;
}
#presupuesto-container .btnEdit::before,
#presupuesto-container .btnDelete::before{
  position:absolute !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-indent:0 !important;
  font-size:16px !important;
  line-height:1 !important;
  font-weight:700 !important;
}
#presupuesto-container .btnEdit::before{
  content:"✎" !important;
  color:#222 !important;
}
#presupuesto-container .btnDelete::before{
  content:"🗑" !important;
  color:#b42318 !important;
  font-size:15px !important;
}
#presupuesto-container .btnEdit:hover{
  background:#f5f5f5 !important;
}
#presupuesto-container .btnDelete:hover{
  background:#fef3f2 !important;
}

/* fila total algo más limpia */
#presupuesto-container .fila-total-oferta td{
  padding-top:10px !important;
  padding-bottom:10px !important;
  border-top:1px solid rgba(0,0,0,.10) !important;
}
#presupuesto-container .fila-total-oferta td:nth-child(5),
#presupuesto-container .fila-total-oferta td:nth-child(7){
  font-weight:800 !important;
}

/* botones inferiores más contenidos y acordes */
.presupuesto-acciones{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:10px 12px !important;
  margin-top:14px !important;
}

#portesBtn,
#observacionesBtn,
#lineaManualBtn,
#borrarPresupuesto{
  min-height:36px !important;
  height:36px !important;
  padding:0 16px !important;
  border-radius:12px !important;
  font-size:14px !important;
  font-weight:800 !important;
  margin:0 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45), 0 6px 14px rgba(0,0,0,.10) !important;
}

#portesBtn,
#observacionesBtn,
#lineaManualBtn{
  background:var(--abn-green) !important;
  border:1px solid rgba(0,0,0,.18) !important;
  color:#fff !important;
}

#borrarPresupuesto{
  background:#dc3545 !important;
  border:1px solid rgba(0,0,0,.18) !important;
  color:#fff !important;
}

/* ===== ver oferta: compactación adicional de columnas ===== */
#presupuesto-container thead th:nth-child(1),
#presupuesto-container tbody td:nth-child(1){
  width:10% !important;
  padding-right:2px !important;
}
#presupuesto-container thead th:nth-child(2),
#presupuesto-container tbody td:nth-child(2){
  width:35% !important;
  padding-left:2px !important;
}
#presupuesto-container thead th:nth-child(3),
#presupuesto-container tbody td:nth-child(3){ width:7.5% !important; }
#presupuesto-container thead th:nth-child(4),
#presupuesto-container tbody td:nth-child(4){ width:4% !important; }
#presupuesto-container thead th:nth-child(5),
#presupuesto-container tbody td:nth-child(5){ width:5.5% !important; }
#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6){ width:15% !important; }
#presupuesto-container thead th:nth-child(7),
#presupuesto-container tbody td:nth-child(7){ width:5.5% !important; }
#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){ width:6% !important; }
#presupuesto-container thead th:nth-child(9),
#presupuesto-container tbody td:nth-child(9){ width:9.5% !important; }

#presupuesto-container thead th:nth-child(n+3):nth-child(-n+8),
#presupuesto-container tbody td:nth-child(n+3):nth-child(-n+8){
  padding-left:1px !important;
  padding-right:1px !important;
}

#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6){
  font-size:12px !important;
  letter-spacing:-0.01em !important;
}

#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){
  padding-right:0 !important;
}
#presupuesto-container thead th:nth-child(9),
#presupuesto-container tbody td:nth-child(9){
  padding-left:0 !important;
}

#presupuesto-container .acciones{
  gap:4px !important;
}

#presupuesto-container .btnEdit,
#presupuesto-container .btnDelete{
  width:32px !important;
  min-width:32px !important;
  height:32px !important;
  min-height:32px !important;
  border-radius:8px !important;
}


/* ===== ver oferta: compactación extra fina para dar más ancho a descripción ===== */
#presupuesto-container thead th:nth-child(1),
#presupuesto-container tbody td:nth-child(1){
  width:9.5% !important;
  padding-right:1px !important;
}

#presupuesto-container thead th:nth-child(2),
#presupuesto-container tbody td:nth-child(2){
  width:37.5% !important;
  padding-left:1px !important;
}

#presupuesto-container thead th:nth-child(3),
#presupuesto-container tbody td:nth-child(3){ width:6.2% !important; }

#presupuesto-container thead th:nth-child(4),
#presupuesto-container tbody td:nth-child(4){ width:3.2% !important; }

#presupuesto-container thead th:nth-child(5),
#presupuesto-container tbody td:nth-child(5){ width:4.8% !important; }

#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6){ width:14.2% !important; }

#presupuesto-container thead th:nth-child(7),
#presupuesto-container tbody td:nth-child(7){ width:4.9% !important; }

#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){ width:5.5% !important; }

#presupuesto-container thead th:nth-child(9),
#presupuesto-container tbody td:nth-child(9){ width:8.8% !important; }

#presupuesto-container thead th:nth-child(3),
#presupuesto-container tbody td:nth-child(3){
  padding-right:0 !important;
}

#presupuesto-container thead th:nth-child(4),
#presupuesto-container tbody td:nth-child(4){
  padding-left:0 !important;
  padding-right:0 !important;
}

#presupuesto-container thead th:nth-child(5),
#presupuesto-container tbody td:nth-child(5),
#presupuesto-container thead th:nth-child(6),
#presupuesto-container tbody td:nth-child(6),
#presupuesto-container thead th:nth-child(7),
#presupuesto-container tbody td:nth-child(7),
#presupuesto-container thead th:nth-child(8),
#presupuesto-container tbody td:nth-child(8){
  padding-left:0 !important;
  padding-right:0 !important;
}

#presupuesto-container thead th,
#presupuesto-container tbody td{
  line-height:1.02 !important;
}

#presupuesto-container tbody td{
  padding-top:6px !important;
  padding-bottom:6px !important;
}

#presupuesto-container tbody tr{
  height:auto !important;
}

#presupuesto-container .fila-total-oferta td{
  padding-top:6px !important;
  padding-bottom:6px !important;
}

/* ===== botones inferiores integrados con la web ===== */
.presupuesto-acciones{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  align-items:center !important;
  gap:8px 10px !important;
  margin-top:12px !important;
}

#portesBtn,
#observacionesBtn,
#lineaManualBtn,
#borrarPresupuesto{
  height:32px !important;
  min-height:32px !important;
  padding:0 14px !important;
  border-radius:10px !important;
  font-size:12px !important;
  font-weight:800 !important;
  letter-spacing:0 !important;
  margin:0 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65), 0 4px 10px rgba(0,0,0,.08) !important;
}

#portesBtn,
#observacionesBtn,
#lineaManualBtn{
  background:#efefef !important;
  color:#111 !important;
  border:1px solid rgba(0,0,0,.18) !important;
}

#portesBtn:hover,
#observacionesBtn:hover,
#lineaManualBtn:hover{
  background:#f5f5f5 !important;
}

#borrarPresupuesto{
  background:#dc3545 !important;
  color:#fff !important;
  border:1px solid rgba(0,0,0,.18) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 4px 10px rgba(0,0,0,.10) !important;
}

#borrarPresupuesto:hover{
  filter:brightness(1.03) !important;
}

/* ===== ajuste final tabla resultados: compactar interlineado real ===== */
#tabla-tarifa table,
#tabla-tarifa tbody,
#tabla-tarifa tr,
#tabla-tarifa td,
#tabla-tarifa th{
  border-collapse:collapse !important;
}

#tabla-tarifa thead th{
  padding:4px 6px !important;
  line-height:1.05 !important;
}

#tabla-tarifa tbody tr{
  height:auto !important;
}

#tabla-tarifa td{
  padding-top:2px !important;
  padding-bottom:2px !important;
  padding-left:8px !important;
  padding-right:8px !important;
  line-height:1.02 !important;
  vertical-align:middle !important;
}

#tabla-tarifa .btn-add,
#tabla-tarifa button,
#tabla-tarifa .add-btn,
#tabla-tarifa .btn-mas{
  height:32px !important;
  min-height:32px !important;
  width:32px !important;
  min-width:32px !important;
  padding:0 !important;
  line-height:32px !important;
}

.parpadeo{animation:parpadeo 1s infinite;}
@keyframes parpadeo{0%{opacity:1;}50%{opacity:.3;}100%{opacity:1;}}


/* Nueva oferta: llamada de atención */
#abnNuevaOfertaAviso{
  position:relative;
}

#nuevaOferta.abn-attention{
  animation:abnShake .45s ease-in-out 4, abnPulseGlow 1.1s ease-in-out 3;
  transform-origin:center;
}

@keyframes abnShake{
  0%,100%{ transform:translateX(0); }
  20%{ transform:translateX(-4px) rotate(-1deg); }
  40%{ transform:translateX(4px) rotate(1deg); }
  60%{ transform:translateX(-3px) rotate(-1deg); }
  80%{ transform:translateX(3px) rotate(1deg); }
}

@keyframes abnPulseGlow{
  0%,100%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.45),
      0 8px 16px rgba(0,0,0,.12),
      0 0 0 0 rgba(152, 183, 38, .00);
  }
  50%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.45),
      0 10px 18px rgba(0,0,0,.16),
      0 0 0 8px rgba(152, 183, 38, .28);
  }
}


#descargarPdfBtn.abn-pdf-attention{
  animation:abnPdfShake .45s ease-in-out 4, abnPdfPulse 1.05s ease-in-out 3;
  transform-origin:center;
}

@keyframes abnPdfShake{
  0%,100%{ transform:translateX(0); }
  20%{ transform:translateX(-4px) rotate(-1deg); }
  40%{ transform:translateX(4px) rotate(1deg); }
  60%{ transform:translateX(-3px) rotate(-1deg); }
  80%{ transform:translateX(3px) rotate(1deg); }
}

@keyframes abnPdfPulse{
  0%,100%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.28),
      0 8px 16px rgba(0,0,0,.12),
      0 0 0 0 rgba(0,123,255,.00);
  }
  50%{
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.28),
      0 10px 18px rgba(0,0,0,.16),
      0 0 0 8px rgba(0,123,255,.24);
  }
}


/* ===== Header OferTool estilo lateral ===== */
.header.header-main{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:18px !important;
  margin-bottom:8px !important;
  padding:6px 8px 14px !important;
  border-bottom:1px solid rgba(0,0,0,.08) !important;
}

.header-center{
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
  flex:0 1 auto !important;
}

.logo{
  height:42px !important;
  width:auto !important;
  justify-self:auto !important;
  flex:0 0 auto !important;
}

.tarifas-img{
  display:none !important;
}

.titulo-centrado{
  margin:0 !important;
  font-family:Arial, Helvetica, sans-serif !important;
  font-size:17px !important;
  line-height:1.1 !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
  text-align:left !important;
  color:#222 !important;
}

@media (max-width: 860px){
  .header.header-main{
    gap:12px !important;
    padding:6px 6px 12px !important;
  }
  .logo{
    height:38px !important;
  }
  .titulo-centrado{
    font-size:16px !important;
  }
}
