/* NGGARAGE · Ajuste focalizado de Stock. Conserva datos y operaciones. */
#stockTable .gg-stock-photo-wrap .gg-stock-camera,
#stockTable .gg-stock-photo-wrap .gg-stock-carfax{
  position:absolute!important;z-index:6!important;bottom:3px!important;
  display:grid!important;place-items:center!important;width:19px!important;height:19px!important;
  padding:0!important;border-radius:4px!important;background:rgba(9,20,36,.91)!important;
  color:#fff!important;border:1px solid rgba(255,255,255,.78)!important;
  box-shadow:0 1px 2px #0006!important;opacity:1!important;visibility:visible!important;
}
#stockTable .gg-stock-photo-wrap .gg-stock-camera{right:24px!important}
#stockTable .gg-stock-photo-wrap .gg-stock-carfax{right:3px!important;font-size:12px!important;line-height:1!important;font-weight:900!important}
#stockTable .gg-stock-photo-wrap .gg-stock-camera svg{width:12px!important;height:12px!important}
@media(min-width:901px){
 #stockTable{overflow-x:auto!important;max-width:100%!important}
 #stockTable .stock-compact-table{width:100%!important;min-width:940px!important;table-layout:fixed!important}
 #stockTable .stock-compact-table th:nth-child(1){width:10%!important}
 #stockTable .stock-compact-table th:nth-child(2){width:28%!important}
 #stockTable .stock-compact-table th:nth-child(3){width:5%!important}
 #stockTable .stock-compact-table th:nth-child(4){width:9%!important}
 #stockTable .stock-compact-table th:nth-child(5){width:11%!important}
 #stockTable .stock-compact-table th:nth-child(6){width:7%!important}
 #stockTable .stock-compact-table th:nth-child(7){width:11%!important}
 #stockTable .stock-compact-table th:nth-child(8){width:11%!important}
 #stockTable .stock-compact-table th:nth-child(9){width:8%!important}
 #stockTable .stock-compact-table .stock-main-row td{height:65px!important;padding:4px 5px!important;vertical-align:middle!important}
 #stockTable .gg-stock-photo-wrap{flex:0 0 86px!important;width:86px!important;height:55px!important}
 #stockTable .gg-stock-vehicle{gap:8px!important;min-width:0!important}
 #stockTable .gg-stock-name{font-size:12.5px!important}
 #stockTable .gg-stock-sub{font-size:10px!important;line-height:1.25!important;max-height:27px!important}
 #stockTable .gg-stock-actions{gap:2px!important;flex-wrap:nowrap!important}
 #stockTable .gg-stock-iconbtn{min-width:24px!important;width:24px!important;height:28px!important;padding:3px!important}
}
@media(max-width:900px){
 /* Tarjetas de cuatro filas: foto y nombre, matrícula y estado, datos, coste y acciones. */
 #stockTable{width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important}
 #stockTable .stock-compact-table,#stockTable .stock-compact-table tbody{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
 #stockTable .stock-compact-table tr.stock-main-row{
   display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
   grid-template-rows:auto auto auto auto auto!important;gap:5px 8px!important;
   align-items:center!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;
   margin:0 0 8px!important;padding:9px!important;border:1px solid #dbe3ed!important;
   border-radius:11px!important;box-shadow:0 1px 3px #0f172a0d!important;
 }
 #stockTable .stock-compact-table tr.stock-main-row>td{
   display:block!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
   width:auto!important;height:auto!important;min-height:0!important;margin:0!important;
   padding:0!important;border:0!important;overflow:visible!important;white-space:normal!important;
   font-size:11px!important;justify-self:stretch!important;
 }
 #stockTable .stock-main-row>td:nth-child(2){grid-column:1/-1!important;grid-row:1!important;padding-bottom:6px!important;border-bottom:1px solid #e2e8f0!important}
 #stockTable .stock-main-row>td:nth-child(1){grid-column:1!important;grid-row:2!important}
 #stockTable .stock-main-row>td:nth-child(7){grid-column:2!important;grid-row:2!important;justify-self:end!important;text-align:right!important}
 #stockTable .stock-main-row>td:nth-child(3){grid-column:1!important;grid-row:3!important}
 #stockTable .stock-main-row>td:nth-child(4){grid-column:2!important;grid-row:3!important}
 #stockTable .stock-main-row>td:nth-child(5){grid-column:1!important;grid-row:4!important}
 #stockTable .stock-main-row>td:nth-child(6){grid-column:2!important;grid-row:4!important}
 #stockTable .stock-main-row>td:nth-child(8){grid-column:1!important;grid-row:5!important}
 #stockTable .stock-main-row>td:nth-child(9){grid-column:2!important;grid-row:5!important;justify-self:end!important}
 #stockTable .stock-main-row>td:nth-child(3):before,#stockTable .stock-main-row>td:nth-child(4):before,
 #stockTable .stock-main-row>td:nth-child(5):before,#stockTable .stock-main-row>td:nth-child(6):before,
 #stockTable .stock-main-row>td:nth-child(8):before{
   display:block!important;font-size:9px!important;line-height:1.1!important;color:#64748b!important;
   margin:0 0 2px!important;font-weight:600!important;letter-spacing:0!important;
 }
 #stockTable .gg-stock-vehicle{display:flex!important;flex-direction:row!important;gap:8px!important;align-items:center!important}
 #stockTable .gg-stock-photo-wrap{flex:0 0 78px!important;width:78px!important;height:54px!important}
 #stockTable .gg-stock-name{font-size:13px!important;line-height:1.2!important}
 #stockTable .gg-stock-sub{font-size:10px!important;line-height:1.2!important;max-height:36px!important;overflow:hidden!important}
 #stockTable .gg-stock-plate{min-width:0!important;width:max-content!important;height:25px!important;font-size:11px!important;padding:0 5px!important}
 #stockTable .gg-stock-status{font-size:9px!important;line-height:1.1!important;padding:4px 5px!important;white-space:nowrap!important}
 #stockTable .gg-stock-price{font-size:12px!important}
 #stockTable .gg-stock-actions{display:flex!important;gap:3px!important;justify-content:flex-end!important;flex-wrap:nowrap!important}
 #stockTable .gg-stock-actions .gg-stock-iconbtn{
   flex:0 0 27px!important;min-width:27px!important;width:27px!important;height:28px!important;
   min-height:28px!important;padding:2px!important;font-size:13px!important;
 }
 #stockTable .gg-stock-actions .gg-stock-iconbtn[title="Editar"]{flex:0 0 27px!important;min-width:27px!important}
 #stockTable .ng-mobile-edit-label{display:none!important}
 #stockTable .stock-detail-row.hidden{display:none!important}
 #stockTable .stock-compact-table tr.stock-detail-row{margin:-4px 0 8px!important}
 #stockTable .stock-compact-table tr.stock-detail-row>td{padding:8px!important}
 #stock .toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:7px!important}
 #stock .toolbar #searchStock{grid-column:1/-1!important}
 #stock .toolbar input,#stock .toolbar select{width:100%!important;min-width:0!important;max-width:100%!important;font-size:12px!important;padding:8px 6px!important;height:36px!important}
 #stock .panel-head{gap:6px!important}
 #stock .panel-head h2{font-size:16px!important}
 #stock .panel-head>.btn,#stock .panel-head>button{padding:7px 9px!important;font-size:11px!important;min-height:32px!important}
}
@media(max-width:390px){
 #stockTable .gg-stock-photo-wrap{flex:0 0 70px!important;width:70px!important;height:50px!important}
 #stockTable .stock-compact-table tr.stock-main-row{padding:7px!important;gap:4px 6px!important}
 #stockTable .gg-stock-name{font-size:12px!important}
 #stockTable .gg-stock-sub{font-size:9.5px!important}
}
@media(min-width:901px){
 #stock .toolbar{display:grid!important;grid-template-columns:minmax(0,1.2fr) repeat(3,minmax(0,1fr))!important;gap:8px!important}
 #stock .toolbar input,#stock .toolbar select{width:100%!important;min-width:0!important;max-width:100%!important}
}
@media(max-width:900px){
 #stockTable .gg-stock-plate{min-width:96px!important;width:max-content!important;max-width:100%!important;padding:0 5px 0 22px!important;font-size:11px!important;overflow:visible!important}
}

/* 2026-11-06: unir DETALLE a COSTE REAL y evitar scroll horizontal en escritorio. */
@media(min-width:901px){
 #stockTable{overflow-x:hidden!important;width:100%!important}
 #stockTable .stock-compact-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
 #stockTable .stock-compact-table th:nth-child(1){width:9%!important}
 #stockTable .stock-compact-table th:nth-child(2){width:27%!important}
 #stockTable .stock-compact-table th:nth-child(3){width:5%!important}
 #stockTable .stock-compact-table th:nth-child(4){width:8%!important}
 #stockTable .stock-compact-table th:nth-child(5){width:10%!important}
 #stockTable .stock-compact-table th:nth-child(6){width:7%!important}
 #stockTable .stock-compact-table th:nth-child(7){width:11%!important}
 #stockTable .stock-compact-table th:nth-child(8){width:14%!important}
 #stockTable .stock-compact-table th:nth-child(9){width:9%!important}
 #stockTable .stock-compact-table th,#stockTable .stock-compact-table td{min-width:0!important;box-sizing:border-box!important}
 #stockTable .stock-main-row td:nth-child(8){padding-right:2px!important}
 #stockTable .stock-main-row td:nth-child(9){padding-left:2px!important}
 #stockTable .gg-stock-actions{gap:1px!important;justify-content:flex-start!important}
 #stockTable .gg-stock-iconbtn{width:22px!important;min-width:22px!important;height:25px!important;padding:2px!important}
}
