/*
 CARGODEC LEGACY STYLE
 ORDEN=1
 ID=
 EXTRAIDO_DE=index.html
*/

*{box-sizing:border-box;text-transform:uppercase}body{font-family:Arial,sans-serif;background:#f3f6fb;color:#001b44;margin:0}.wrap{max-width:1280px;margin:auto;padding:16px}.tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.tabs button,.btn{border:0;border-radius:14px;padding:11px 16px;font-weight:900;font-size:14px;background:#e5e7eb;cursor:pointer}.tabs button.active,.orange{background:#ff9900}.green{background:#16a34a!important;color:white}.red{background:#dc2626!important;color:white}.blue{background:#2563eb!important;color:white}.card{background:white;border:1px solid #d8e1ee;border-radius:18px;padding:16px;margin-bottom:16px;box-shadow:0 8px 20px #dbe4f0}h1{font-size:28px;margin:0 0 12px}h2{font-size:20px;margin:14px 0 10px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.photoRow{display:flex;gap:12px;align-items:flex-start;flex-wrap:wrap}.photoBox{width:210px;border:1px solid #d8e1ee;border-radius:14px;padding:10px;background:#f8fafc}label{font-weight:900;display:block;margin-bottom:5px}input,select,textarea{width:100%;border:1px solid #ccd6e2;border-radius:12px;padding:10px;font-size:16px;background:white}textarea{height:135px;font-family:Consolas,monospace;text-transform:none}.msg{padding:10px;border-radius:12px;margin:10px 0;font-weight:900}.ok{background:#e6faef;color:#047857}.err{background:#fee2e2;color:#b91c1c}.thumb{width:100%;height:95px;object-fit:cover;border-radius:10px;background:#e5e7eb;border:1px solid #d8e1ee}.thumbSmall{width:82px;height:66px;object-fit:cover;border-radius:9px;background:#e5e7eb;border:1px solid #d8e1ee}.vehicle-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:13px}.vcard{border:1px solid #d8e1ee;border-radius:16px;padding:13px;background:white}.vcard h2{margin-top:0}.mini{display:flex;gap:8px;margin:8px 0}.lote{border-top:1px solid #e5eaf1;padding:9px 0}.status{font-weight:900;border-radius:16px;padding:6px 10px;display:inline-block;font-size:13px}.PEDIMENTACION{background:#64748b;color:white}.VALIDACION{background:#f97316;color:white}.PAGO{background:#eab308;color:#111827}.PAGADO{background:#22c55e;color:white}.DODA{background:#7c3aed;color:white}.ENESPERADECARTAPORTE{background:#0ea5e9;color:white}.ESPERANDOTRANSFER{background:#1e40af;color:white}.SALIDADEBODEGA{background:#57534e;color:white}.ADUANA{background:#dc2626;color:white}.ADUANALIBERADA{background:#16a34a;color:white}.LIBERADO{background:#059669;color:white}.DISPONIBLE{background:#9ca3af;color:white}.SINPEDIMENTO{background:#111827;color:white}.pedimento-guardado{color:#16a34a!important;font-weight:900}.pedimento-pendiente{color:#001b44}.infoItem.docOk{border-color:#16a34a;background:#ecfdf5}.dodaOk{color:#16a34a;font-weight:900}.dodaBad{color:#dc2626;font-weight:900}table{width:100%;border-collapse:collapse;background:white;font-size:14px}th,td{text-align:left;padding:9px;border-bottom:1px solid #edf1f7;vertical-align:middle}th{background:#f6f8fb}.hide{display:none}.actions{display:flex;gap:6px;flex-wrap:wrap}.actions button{border:0;border-radius:9px;padding:7px 9px;cursor:pointer}.waBox{background:#0f172a;color:white;border-radius:16px;padding:14px}.waBox textarea{background:#111827;color:white;border-color:#334155;min-height:180px}.subtle{color:#64748b;font-size:13px}.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.lote select{margin-top:0}.lote .btn{padding:8px 10px;font-size:13px}.tableWrap{overflow:auto}.pill{display:inline-block;border-radius:999px;padding:5px 9px;background:#eef2f7;font-weight:900;font-size:12px;margin-right:5px}.vehicle-grid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));align-items:start}.vcard{padding:14px}.vehHead{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.vehName{font-size:18px;font-weight:900;line-height:1.2}.inlinePlate{font-size:18px;margin-left:8px;white-space:nowrap}.vehPlacas{font-size:16px;font-weight:900;color:#0f172a;white-space:nowrap}.lote{border-top:1px solid #e5eaf1;padding:12px 0}.loteTitle{font-size:16px;font-weight:900;margin-bottom:8px}.infoGrid{display:grid;grid-template-columns:1fr;gap:6px;margin:8px 0}.infoItem{font-size:13px;background:#f8fafc;border:1px solid #e5eaf1;border-radius:10px;padding:7px 8px}.infoItem b{display:block;font-size:12px;color:#64748b;margin-bottom:2px}.pedHeadLine{display:grid;grid-template-columns:1fr 170px;gap:8px;align-items:end;margin-bottom:8px}.pedTitle b{display:block;font-size:12px;color:#64748b;margin-bottom:4px}.pedNumber{font-weight:900;font-size:18px;color:#001b44}.pedMetricsLine{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:center;margin-top:8px}.pedMetric{display:flex;align-items:center;gap:6px;font-size:12px;color:#001b44;border-right:1px solid #dbe3ef;min-width:0}.pedMetric:last-child{border-right:0}.pedMetric i{font-style:normal;font-size:18px}.pedMetric span{display:block;font-size:10px;color:#64748b;font-weight:900}.pedMetric strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pedStatusSelect select{height:42px;font-size:13px;font-weight:900}.viajeStatusBox{border-top:1px solid #e5eaf1;margin-top:8px;padding-top:10px}.tripControls{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end}.tripControls label{font-size:12px;margin:0 0 4px;color:#001b44}.tripControls select{height:42px;font-size:13px}.tripStatusLabel{font-size:12px;font-weight:900;color:#64748b;margin-bottom:4px}.statusLine{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.statusControls{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:center;margin-top:8px}.statusControls select,.statusControls .btn{width:100%;height:48px;font-size:14px;border-radius:14px}.statusControls .btn{padding:0 10px;display:flex;align-items:center;justify-content:center}.excelBtn{display:block;text-align:center;text-decoration:none;margin-top:12px;padding:12px 14px;border-radius:14px}.thumbSmall{width:90px;height:72px}.mini{margin:10px 0 8px}.mediaSummary{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%}.photosMini{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.totalGuias{margin-left:auto;border:1px solid #d8e1ee;background:#f8fafc;border-radius:12px;padding:10px 14px;width:170px;height:92px;font-size:14px;font-weight:900;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.totalGuias strong{display:block;color:#001b44;font-size:34px;line-height:1;margin-top:6px;text-align:center;width:100%}.waBox{margin-top:18px}.toast{position:fixed;right:20px;top:20px;background:#0f172a;color:white;border-radius:14px;padding:12px 16px;font-weight:900;z-index:9999;box-shadow:0 10px 25px #0003;display:none}.toast.ok{background:#16a34a}.toast.err{background:#dc2626}
.tabs button{display:inline-flex;align-items:center;gap:8px;line-height:1}
.tabs button .tabSvg{width:22px;height:22px;display:inline-block;flex:0 0 auto;color:#111827}
.tabs button.active .tabSvg{color:#111827}
.kpiIcon svg{width:32px;height:32px;color:white}
.hlTitleIcon{width:32px;height:32px;border-radius:8px;background:#eef5ff;display:inline-flex;align-items:center;justify-content:center;margin-right:10px;vertical-align:middle;color:#2563eb}
.hlTitleIcon svg{width:21px;height:21px}
@media(max-width:850px){.grid,.grid2{grid-template-columns:1fr}.photoBox{width:calc(50% - 8px)}.tabs button{font-size:12px;padding:9px 10px}.vehicle-grid{grid-template-columns:1fr}.vehHead{align-items:flex-start;flex-direction:column}.vehPlacas{white-space:normal}.infoGrid{grid-template-columns:1fr}.statusControls{grid-template-columns:1fr 1fr}.excelBtn{font-size:13px}.thumbSmall{width:82px;height:66px}.totalGuias{width:145px;height:80px}.totalGuias strong{font-size:28px}}

/* EQUIPO COMPACTAS */
.savedGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,360px));gap:12px;align-items:start}
.savedCard{border:1px solid #d8e1ee;border-radius:16px;padding:13px;background:white;width:100%;max-width:360px}
.savedHead{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:900;margin-bottom:10px;white-space:nowrap}
.savedHead .placaInline{margin-left:auto;font-size:16px}
.savedPhotos{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.savedPhotos img{width:118px;height:92px;object-fit:cover;border-radius:11px;border:1px solid #d8e1ee;background:#e5e7eb;cursor:zoom-in}
.savedActions{margin-top:10px;display:flex;gap:8px}
.savedActions .btn{padding:8px 10px;font-size:12px}
.photoBox{width:240px}
.thumb{height:110px;cursor:zoom-in}
.imgModal{position:fixed;inset:0;background:rgba(15,23,42,.86);display:none;align-items:center;justify-content:center;z-index:10000;padding:20px}
.imgModal img{max-width:94vw;max-height:92vh;border-radius:14px;background:white;box-shadow:0 20px 50px #0008}
.imgModal.show{display:flex}
@media(max-width:850px){.savedGrid{grid-template-columns:1fr}.savedCard{max-width:none}.savedHead{white-space:normal}.savedHead .placaInline{margin-left:0}.savedPhotos img{width:112px;height:88px}.photoBox{width:calc(50% - 8px)}}

.vehicleActions{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-top:12px}
.vehicleActions .btn,.vehicleActions a{width:100%;text-align:center;text-decoration:none;border-radius:14px;padding:0 14px;display:flex;align-items:center;justify-content:center;min-height:54px;height:54px;font-size:14px;line-height:1.15;white-space:normal}
.purple{background:#7c3aed!important;color:white}
@media(max-width:850px){.vehicleActions{grid-template-columns:1fr}}

.topMenu{background:#0f172a;color:white;border-radius:0 0 18px 18px;margin:0 0 16px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 8px 20px #0002}
.topBrand{font-weight:900;font-size:20px;letter-spacing:.5px;white-space:nowrap}.topApps{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.topApps button{border:0;border-radius:999px;padding:10px 16px;font-weight:900;background:#1e293b;color:white;cursor:pointer}.topApps button.active{background:#ff9900;color:#111827}.topApps button.soon{opacity:.75;background:#334155}.appNotice{background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:12px;margin-bottom:14px;font-weight:900;color:#9a3412}.vehicleActions{align-items:stretch}.vehicleActions .btn,.vehicleActions a{min-height:72px;height:72px;font-size:15px;line-height:1.2;word-break:normal}.vehName,.vehPlacas,.inlinePlate{font-size:17px!important}
@media(max-width:850px){.topMenu{align-items:flex-start;flex-direction:column}.topBrand{font-size:18px}.vehicleActions .btn,.vehicleActions a{min-height:58px;height:58px}}


.versionBadge{background:#0f172a;color:#fff;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:900;margin-left:10px;white-space:nowrap}
.dashHeader{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.freeBox{display:inline-flex;align-items:center;gap:8px;background:#eef2f7;border:1px solid #d8e1ee;border-radius:999px;padding:8px 12px;font-weight:900;color:#001b44}
.freeBox strong{font-size:20px}


/* DASHBOARD V5.2 */
.generalHero{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px;margin-bottom:18px}
.kpiCard{border:1px solid #d8e1ee;border-radius:16px;background:#fff;padding:16px;display:flex;align-items:center;gap:14px;min-height:88px;box-shadow:0 4px 12px #dbe4f070}
.kpiIcon{width:48px;height:48px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:25px;color:white;background:#2563eb;flex:0 0 48px}
.kpiIcon.green{background:#16a34a}.kpiIcon.orange{background:#f97316}.kpiIcon.purple{background:#7c3aed}.kpiIcon.yellow{background:#eab308}.kpiIcon.blue{background:#0ea5e9}
.kpiText b{display:block;color:#64748b;font-size:12px;letter-spacing:.4px;margin-bottom:5px}.kpiText strong{display:block;font-size:28px;line-height:1;color:#001b44}
.generalGrid{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;align-items:start}
.generalPanel{border:1px solid #d8e1ee;border-radius:16px;background:white;padding:16px;min-height:270px}
.statusLineGeneral{display:grid;grid-template-columns:170px 1fr 42px;gap:10px;align-items:center;margin:13px 0;font-weight:800;font-size:14px}
.barTrack{height:12px;background:#eef2f7;border-radius:999px;overflow:hidden}.barFill{height:100%;border-radius:999px;background:#2563eb}.barFill.PEDIMENTACION{background:#64748b}.barFill.VALIDACION{background:#f97316}.barFill.PAGO{background:#eab308}.barFill.PAGADO{background:#22c55e}.barFill.DODA{background:#7c3aed}.barFill.ENESPERADECARTAPORTE{background:#0ea5e9}.barFill.ESPERANDOTRANSFER{background:#1e40af}.barFill.SALIDADEBODEGA{background:#57534e}.barFill.ADUANA{background:#dc2626}.barFill.ADUANALIBERADA{background:#16a34a}.barFill.LIBERADO{background:#059669}.barFill.DISPONIBLE{background:#9ca3af}
.movItem{display:grid;grid-template-columns:16px 1fr auto;gap:9px;align-items:center;border-bottom:1px solid #edf1f7;padding:9px 0;font-size:13px}.dot{width:12px;height:12px;border-radius:50%;display:block;background:#2563eb}.dot.PEDIMENTACION{background:#64748b}.dot.VALIDACION{background:#f97316}.dot.PAGO{background:#eab308}.dot.PAGADO{background:#22c55e}.dot.DODA{background:#7c3aed}.dot.ENESPERADECARTAPORTE{background:#0ea5e9}.dot.ESPERANDOTRANSFER{background:#1e40af}.dot.SALIDADEBODEGA{background:#57534e}.dot.ADUANA{background:#dc2626}.dot.ADUANALIBERADA{background:#16a34a}.dot.LIBERADO{background:#059669}.dot.DISPONIBLE{background:#9ca3af}
.pendingMini{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:10px}.pendingMiniCard{border:1px solid #d8e1ee;border-radius:14px;padding:12px;background:#f8fafc}.pendingMiniCard b{display:block;font-size:16px;margin-bottom:4px}.pendingMiniCard .small{color:#64748b;font-size:12px;font-weight:800}
.vehicleActions{align-items:stretch}.vehicleActions .btn,.vehicleActions a{height:72px!important;min-height:72px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.15!important;padding:0 14px!important;margin:0!important}
@media(max-width:900px){.generalHero{grid-template-columns:1fr 1fr}.generalGrid{grid-template-columns:1fr}.statusLineGeneral{grid-template-columns:120px 1fr 34px}.kpiText strong{font-size:24px}}
@media(max-width:560px){.generalHero{grid-template-columns:1fr}}


/* OPERACIONES V5.7 */
.opDash{background:#07111f!important;color:#f8fafc!important;border-color:#223149!important;box-shadow:0 18px 50px #0f172a55!important}
.opTop{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid #25354f;border-radius:14px;padding:14px 16px;margin-bottom:14px;background:linear-gradient(135deg,#0b1626,#101f34)}
.opTitle{display:flex;align-items:center;gap:14px}.opTitle h1{margin:0;color:#fff}.opSub{color:#ff9900;font-weight:900}.opLive{display:flex;gap:18px;align-items:center;flex-wrap:wrap;font-weight:900}.opLive .clock{font-size:22px;color:#72e084}.opLive .online{color:#72e084}.opKpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:14px}.opKpi{background:#0d1a2c;border:1px solid #25354f;border-radius:13px;padding:14px;min-height:92px}.opKpi span{display:block;color:#94a3b8;font-size:12px;font-weight:900}.opKpi strong{display:block;color:#fff;font-size:28px;margin-top:6px}.opKpi small{color:#72e084;font-weight:900}.opGrid{display:grid;grid-template-columns:1fr 360px;gap:12px}.opPanel{background:#0d1a2c;border:1px solid #25354f;border-radius:14px;padding:12px}.opPanel h2{color:#fff;margin-top:0}.opTable{width:100%;border-collapse:collapse;background:transparent;color:#fff}.opTable th,.opTable td{border-bottom:1px solid #25354f;padding:10px;text-align:center}.opTable th{background:#101f34;color:#fff}.opTable td:first-child,.opTable th:first-child{text-align:left}.opGuides{display:inline-block;min-width:92px;text-align:right;background:#102b4f;padding:6px 10px;border-radius:8px;font-weight:900}.opStatusItem{display:grid;grid-template-columns:1fr auto;gap:10px;border-bottom:1px solid #25354f;padding:9px 0;align-items:center}.opStatusItem b{background:#13243a;border-radius:8px;min-width:42px;text-align:center;padding:6px;color:#fff}.opEvents{margin-top:12px;max-height:210px;overflow:auto}.opFooter{margin-top:12px;border:1px solid #14532d;background:#052e1a;color:#bbf7d0;border-radius:12px;padding:12px;font-weight:900}.opNext{color:#72e084;font-size:20px}.opBadge{display:inline-flex;gap:6px;align-items:center;justify-content:center;min-width:130px}.opBadge .dotMini{width:10px;height:10px;border-radius:50%;background:#fff;display:inline-block}@media(max-width:1100px){.opKpis{grid-template-columns:repeat(2,1fr)}.opGrid{grid-template-columns:1fr}}@media(max-width:600px){.opKpis{grid-template-columns:1fr}}


.amazonHero{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.amazonKpi{background:#0f172a;color:white;border-radius:18px;padding:18px;box-shadow:0 8px 20px #dbe4f0}.amazonKpi span{display:block;color:#cbd5e1;font-size:12px;font-weight:900}.amazonKpi strong{display:block;font-size:32px;margin-top:5px}.amazonUpload{border:2px dashed #cbd5e1;background:#f8fafc;border-radius:18px;padding:18px;margin:12px 0}.amazonCols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.amazonResult{max-height:280px;overflow:auto;background:#f8fafc;border:1px solid #d8e1ee;border-radius:14px;padding:12px}.dup{background:#fee2e2;color:#991b1b;border-radius:10px;padding:8px;margin:6px 0;font-weight:900}.validBox{background:#e6faef;color:#047857;border-radius:12px;padding:10px;font-weight:900;margin:8px 0}.warnBox{background:#fff7ed;color:#9a3412;border-radius:12px;padding:10px;font-weight:900;margin:8px 0}.amazonTableWrap{overflow:auto;max-height:460px;border:1px solid #d8e1ee;border-radius:14px}.amazonTableWrap table th{position:sticky;top:0;z-index:1}.jsonPreview{white-space:pre-wrap;text-transform:none;font-family:Consolas,monospace;font-size:12px;background:#0f172a;color:white;border-radius:14px;padding:12px;max-height:300px;overflow:auto}.amazonDetailHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.amazonPager{display:flex;align-items:center;gap:10px;font-weight:900}.amazonPager button{border:0;border-radius:12px;padding:10px 14px;font-weight:900;background:#e5e7eb;cursor:pointer}.amazonTabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}.amazonTab{border:0;border-radius:999px;padding:10px 16px;font-weight:900;background:#e5e7eb;color:#0b2349;cursor:pointer}.amazonTab.active{background:#ff9800;color:#111827}.amazonGrid2{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.amazonInfoBox{background:#f8fafc;border:1px solid #d8e1ee;border-radius:14px;padding:12px}.amazonInfoBox span{display:block;color:#5b6c86;font-size:12px;font-weight:900}.amazonInfoBox b{font-size:20px}.amazonDiffList{max-height:220px;overflow:auto;border:1px solid #f2b8b8;border-radius:12px;padding:8px;background:#fff7f7}.amazonDetailTable{width:100%;border-collapse:collapse}.amazonDetailTable th,.amazonDetailTable td{padding:9px;border-bottom:1px solid #e5e7eb;text-align:left}.amazonDetailTable th{background:#f1f5f9}.amazonViewBtn{background:#2563eb;color:white;border:0;border-radius:10px;padding:8px 10px;font-weight:900;cursor:pointer}@media(max-width:900px){.amazonHero,.amazonCols{grid-template-columns:1fr}}

.pedActions{display:inline-flex;gap:6px;margin-left:8px;vertical-align:middle}.pedIcon{border:0;background:#eef2f7;border-radius:8px;padding:3px 6px;cursor:pointer;font-size:14px}.pedIcon:hover{background:#dbeafe}.statusAutosave{display:grid;grid-template-columns:1fr!important}.statusAutosave select{height:48px}.opStatusSelect{background:#0f172a;color:white;border:1px solid #334155;border-radius:12px;padding:6px 8px;font-size:12px;font-weight:900;min-width:190px}.opPedCell{cursor:pointer;font-weight:900}.opPedCell.ok{color:#72e084}.bitacoraBox{max-height:420px;overflow:auto;text-align:left}.bitacoraItem{border-bottom:1px solid #e5e7eb;padding:9px 0}.bitacoraItem b{display:block;color:#001b44}.bitacoraItem small{color:#64748b}.printIconOk{color:#16a34a;font-weight:900}

/* OPERACIONES V7.6 - tabla limpia */
.opTable{table-layout:fixed;}
.opTable th,.opTable td{padding:10px 8px;}
.opTable th:nth-child(1),.opTable td:nth-child(1){width:90px;text-align:left;}
.opTable th:nth-child(2),.opTable td:nth-child(2){width:210px;text-align:left;}
.opTable th:nth-child(3),.opTable td:nth-child(3){width:92px;text-align:center;}
.opTable th:nth-child(4),.opTable td:nth-child(4){width:235px;text-align:center;}
.opTable th:nth-child(5),.opTable td:nth-child(5){width:145px;text-align:center;}
.opTable th:nth-child(6),.opTable td:nth-child(6){width:150px;text-align:center;}
.opTable th:nth-child(7),.opTable td:nth-child(7){width:95px;text-align:center;}
.opPedCell,.opPedCell.ok{background:transparent!important;color:#f8fafc!important;white-space:nowrap;}
.opPedNum{display:inline-block;min-width:76px;color:#f8fafc;font-size:18px;font-weight:900;letter-spacing:.3px;}
.opPedNum.ok{color:#72e084!important;}
.opPedCheck{color:#72e084;font-weight:900;margin-left:2px;}
.opPedCell .pedIcon{background:transparent!important;color:#f8fafc;border:0;padding:2px 4px;margin-left:5px;font-size:16px;box-shadow:none;}
.opPedCell .pedIcon:hover{background:#13243a!important;border-radius:6px;}
.opGuides{min-width:76px;text-align:right;}
@media(max-width:1100px){.opTable{min-width:980px;}}



/* OPERACIONES V7.6 - ajuste visual final */
.wrap{max-width:1540px;}
.opDash{padding:16px!important;}
.opGrid{grid-template-columns:minmax(1050px,1fr) 360px!important;align-items:start;}
.opPanel:first-child{overflow-x:auto;}
.opTable{min-width:1070px!important;width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;}
.opTable th,.opTable td{padding:9px 8px!important;vertical-align:middle!important;}
.opTable th:nth-child(1),.opTable td:nth-child(1){width:95px!important;text-align:left!important;}
.opTable th:nth-child(2),.opTable td:nth-child(2){width:245px!important;text-align:left!important;}
.opTable th:nth-child(3),.opTable td:nth-child(3){width:95px!important;text-align:center!important;}
.opTable th:nth-child(4),.opTable td:nth-child(4){width:220px!important;text-align:center!important;}
.opTable th:nth-child(5),.opTable td:nth-child(5){width:150px!important;text-align:center!important;}
.opTable th:nth-child(6),.opTable td:nth-child(6){width:160px!important;text-align:center!important;}
.opTable th:nth-child(7),.opTable td:nth-child(7){width:105px!important;text-align:center!important;}
.opPedCell,.opPedCell.ok{background:transparent!important;background-color:transparent!important;border:0!important;color:#f8fafc!important;white-space:nowrap!important;}
.opPedWrap{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important;min-width:220px!important;}
.opPedNum,.opPedNum.ok{display:inline!important;background:transparent!important;background-color:transparent!important;border:0!important;box-shadow:none!important;color:#f8fafc!important;font-size:18px!important;font-weight:900!important;letter-spacing:.2px!important;min-width:auto!important;padding:0!important;line-height:1!important;}
.opPedNum.ok{color:#f8fafc!important;}
.opPedCheck{color:#4ade80!important;font-size:18px!important;font-weight:900!important;margin-left:0!important;}
.opPedCell .pedIcon{background:transparent!important;background-color:transparent!important;color:#f8fafc!important;border:0!important;border-radius:6px!important;padding:2px 3px!important;margin:0!important;font-size:17px!important;line-height:1!important;box-shadow:none!important;}
.opPedCell .pedIcon:hover{background:#16263d!important;}
.opGuides{min-width:82px!important;width:82px!important;text-align:right!important;background:#102b4f!important;padding:7px 10px!important;border-radius:8px!important;font-weight:900!important;color:#f8fafc!important;}
.opStatusSelect{min-width:205px!important;width:205px!important;height:34px!important;font-size:12px!important;padding:6px 10px!important;}
@media(max-width:1250px){.opGrid{grid-template-columns:1fr!important}.opTable{min-width:1070px!important}}



/* AJUSTES OPERACIONES V6.6 */
.opKpis{grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:stretch!important;}
.opKpi{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:16px 10px!important;}
.opKpi span,.opKpi strong,.opKpi small{text-align:center!important;width:100%!important;}
.opKpi span{line-height:1.25!important;}
.opKpi strong{line-height:1!important;margin:8px 0 4px!important;}
.opGrid{grid-template-columns:minmax(0,1fr) 340px!important;align-items:start!important;}
.opPanel{min-width:0!important;}
.opTable{table-layout:fixed!important;width:100%!important;}
.opTable th,.opTable td{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;vertical-align:middle!important;}
.opTable th:nth-child(1),.opTable td:nth-child(1){width:88px!important;text-align:left!important;}
.opTable th:nth-child(2),.opTable td:nth-child(2){width:225px!important;text-align:left!important;}
.opTable th:nth-child(3),.opTable td:nth-child(3){width:96px!important;text-align:left!important;}
.opTable th:nth-child(4),.opTable td:nth-child(4){width:215px!important;text-align:left!important;}
.opTable th:nth-child(5),.opTable td:nth-child(5){width:195px!important;text-align:center!important;white-space:normal!important;line-height:1.15!important;font-size:13px!important;}
.opTable th:nth-child(6),.opTable td:nth-child(6){width:145px!important;text-align:center!important;}
.opTable th:nth-child(7),.opTable td:nth-child(7){width:95px!important;text-align:center!important;}
.opGuides{min-width:86px!important;width:86px!important;text-align:center!important;padding:8px 8px!important;margin-left:0!important;display:inline-block!important;}
.opPedCell{background:transparent!important;border:0!important;color:#fff!important;display:flex!important;align-items:center!important;gap:10px!important;white-space:nowrap!important;}
.opPedNum{font-size:20px!important;font-weight:900!important;color:#fff!important;letter-spacing:.3px!important;display:inline-block!important;min-width:92px!important;}
.opPedNum.ok{color:#fff!important;}
.opPedCheck{color:#4ade80!important;font-size:18px!important;font-weight:900!important;margin-left:0!important;}
.pedIcon{background:transparent!important;color:#e8eef8!important;border:0!important;box-shadow:none!important;padding:2px!important;font-size:17px!important;line-height:1!important;min-width:auto!important;}
.pedIcon:hover{transform:none!important;color:#72e084!important;}
.opStatusSelect{width:100%!important;max-width:205px!important;height:38px!important;font-size:13px!important;border-radius:10px!important;padding:7px 30px 7px 12px!important;background:#0f172a!important;color:#fff!important;border:1px solid #334155!important;}
.opFooter{text-align:left!important;}
@media(max-width:1100px){.opGrid{grid-template-columns:1fr!important}.opKpis{grid-template-columns:repeat(3,1fr)!important}}
@media(max-width:700px){.opKpis{grid-template-columns:repeat(2,1fr)!important}.opTable{min-width:980px!important}}


/* === v6.7 MOBILE DASHBOARD RESPONSIVE === */
@media (max-width: 768px){
  body{
    margin:0 !important;
    padding:8px !important;
    overflow-x:hidden !important;
  }

  .opdash,
  .dashboard-operativo,
  .operativo-wrap,
  .wrap,
  .container{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:10px !important;
    box-sizing:border-box !important;
  }

  .op-head,
  .top-operativo,
  .operativo-header{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:8px !important;
  }

  .op-head h1,
  .top-operativo h1,
  .operativo-header h1{
    font-size:22px !important;
    line-height:1.1 !important;
  }

  .op-time,
  .op-online,
  .auto-refresh{
    font-size:14px !important;
  }

  .op-kpis,
  .kpi-row,
  .stats-row,
  .cards-row{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
  }

  .op-kpi,
  .kpi,
  .stat-card{
    min-height:78px !important;
    padding:12px !important;
    text-align:center !important;
  }

  .op-kpi .num,
  .kpi .num,
  .stat-card .num{
    font-size:24px !important;
  }

  .op-main,
  .dashboard-grid,
  .operativo-grid{
    display:block !important;
  }

  .op-card,
  .panel,
  .card{
    width:100% !important;
    margin-bottom:12px !important;
    overflow:hidden !important;
  }

  .op-table-wrap,
  .table-wrap,
  .table-responsive{
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  table{
    min-width:760px !important;
    font-size:13px !important;
  }

  th,td{
    padding:8px 6px !important;
    white-space:nowrap !important;
  }

  .pedimento-cell,
  .ped-cell,
  td:nth-child(2){
    min-width:160px !important;
  }

  .guias-cell,
  .guias-badge,
  td:nth-child(3){
    min-width:78px !important;
    text-align:center !important;
  }

  .status-select,
  select{
    max-width:160px !important;
    font-size:12px !important;
  }

  .eventos,
  .ultimos-eventos,
  .status-flow,
  .flujo-status{
    max-height:none !important;
    overflow:visible !important;
  }

  .footer-operativo,
  .op-footer{
    font-size:13px !important;
    display:block !important;
    line-height:1.5 !important;
  }
}

@media (max-width: 480px){
  .op-kpis,
  .kpi-row,
  .stats-row,
  .cards-row{
    grid-template-columns:1fr !important;
  }

  .op-head h1,
  .top-operativo h1,
  .operativo-header h1{
    font-size:20px !important;
  }

  table{
    min-width:720px !important;
  }
}


.loginBar{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin:8px 0 12px;font-weight:900;color:#0b2349}.loginBar span{background:#eef4fb;border:1px solid #d8e1ee;border-radius:999px;padding:8px 14px}.dangerConfirm{font-weight:900;color:#991b1b}.pais-ok{color:#16a34a;font-weight:900}

/* === V7.6 PIE HIGH/LOW DASHBOARD === */
.hlPieGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px;align-items:stretch}
.hlPieCard{background:#fff;border:1px solid #d8e1ee;border-radius:16px;padding:16px;box-shadow:0 4px 12px #dbe4f070;height:100%;box-sizing:border-box}
.hlPieCard h2{margin:0 0 12px;color:#001b44;font-size:18px}
.hlPieBody{display:grid;grid-template-columns:46% 54%;gap:12px;align-items:center;min-height:210px}
.hlNums{display:none}
.hlLabel{font-weight:900;color:#0f172a;font-size:13px;margin-bottom:4px}
.hlHighVal{font-size:28px;font-weight:900;color:#16a34a;line-height:1}
.hlLowVal{font-size:28px;font-weight:900;color:#2563eb;line-height:1}
.hlPct{font-size:18px;color:#334155;font-weight:800;margin-top:4px}
.hlDonut{width:170px;height:170px;display:block;margin:auto}
.hlLegend{font-size:14px;font-weight:800;line-height:1.7;color:#0f172a}
.hlDot{display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:8px;vertical-align:middle}
.hlDot.high{background:#16a34a}.hlDot.low{background:#2563eb}.hlDot.green{background:#16a34a}.hlDot.red{background:#dc2626}
.hlPieSide{border-left:1px solid #e5eaf1;padding-left:14px}
.hlLegend strong{display:block;font-size:20px;line-height:1.1;margin:4px 0}
.hlLegend .pct{display:block;font-size:18px;font-weight:900;color:#334155;margin-top:3px}
.hlLegend .sub{display:block;font-size:13px;font-weight:900;color:#001b44;margin-top:2px}
.hlCompare.compact{font-size:12px;margin-top:10px;padding:10px}
@media(max-width:1200px){.hlPieSide{border-left:0;padding-left:0}.hlPieGrid{grid-template-columns:1fr}}

.aduanaPieWrap{display:contents}.aduanaPieWrap .hlPieCard{max-width:none}.aduanaPieWrap .hlDonut{width:145px;height:145px}
.hlUpdate{margin-top:12px;background:#f8fafc;border:1px solid #e5eaf1;border-radius:10px;padding:10px;color:#64748b;font-size:12px;font-weight:800}
.hlCompare{margin-top:12px;background:#ecfdf5;border:1px solid #86efac;border-radius:10px;padding:10px;color:#047857;font-size:12px;font-weight:900;line-height:1.6}
@media(max-width:1200px){.hlPieGrid{grid-template-columns:1fr}.hlPieBody{grid-template-columns:1fr}.hlDonut{width:145px;height:145px}}


/* === V7.6 HISTORIAL ALINEADO === */
.histCardV72{position:relative;min-height:205px;max-height:205px;overflow:hidden}
.histHeadV72{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start;margin-bottom:6px}
.histTitleV72{font-size:22px;font-weight:900;color:#001b44;line-height:1.1}
.histTotalsV72{text-align:right;font-weight:900;color:#001b44;line-height:1.35;white-space:nowrap;font-size:14px}
.histTotalsV72 span{display:block}
.histPlateV72{font-size:14px;color:#001b44;font-weight:800;margin-bottom:2px}
.histDateV72{font-size:12px;color:#64748b;border-bottom:1px solid #e5eaf1;padding-bottom:4px;margin-bottom:6px}
.histRowsV72{height:112px;overflow:hidden}
.histRowV72{display:grid;grid-template-columns:minmax(145px,1fr) 105px 74px;gap:8px;align-items:center;border-bottom:1px solid #edf1f7;padding:7px 0;font-size:15px;color:#001b44}
.histRowV72 .hrPed{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.histRowV72 .hrStatus{text-align:left;white-space:nowrap;font-weight:800}
.histRowV72 .hrGuias{text-align:right;white-space:nowrap;font-weight:900;font-variant-numeric:tabular-nums}
.histPagerV72{position:absolute;left:14px;right:14px;bottom:8px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;font-weight:900;color:#64748b}
.histPagerV72 button{border:0;background:#eef2f7;border-radius:8px;padding:4px 9px;font-weight:900;cursor:pointer;color:#001b44}
@media(max-width:850px){.histCardV72{max-height:230px;min-height:230px}.histRowV72{grid-template-columns:minmax(120px,1fr) 95px 70px;font-size:14px}.histTotalsV72{font-size:13px}}


/* === V7.6 HISTORIAL FINAL ALINEADO === */
.histFinalCard{
  position:relative!important;
  height:205px!important;
  min-height:205px!important;
  max-height:205px!important;
  overflow:hidden!important;
  padding:14px 16px 38px!important;
}
.histFinalHead{
  display:grid!important;
  grid-template-columns:1fr auto!important;
  gap:12px!important;
  align-items:start!important;
  margin-bottom:4px!important;
}
.histFinalTitle{
  font-size:22px!important;
  line-height:1.1!important;
  font-weight:900!important;
  color:#001b44!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.histFinalPlate{
  margin-top:2px!important;
  font-size:14px!important;
  font-weight:900!important;
  color:#001b44!important;
}
.histFinalTotals{
  text-align:right!important;
  font-size:15px!important;
  font-weight:900!important;
  color:#001b44!important;
  line-height:1.35!important;
  white-space:nowrap!important;
}
.histFinalTotals span{display:block!important}
.histFinalDate{
  font-size:12px!important;
  color:#64748b!important;
  border-bottom:1px solid #e5eaf1!important;
  padding-bottom:6px!important;
  margin-bottom:4px!important;
}
.histFinalRows{
  height:92px!important;
  overflow:hidden!important;
}
.histFinalRow{
  display:grid!important;
  grid-template-columns:minmax(180px,1fr) 120px 92px!important;
  gap:8px!important;
  align-items:center!important;
  border-bottom:1px solid #edf1f7!important;
  padding:7px 0!important;
  font-size:15px!important;
  color:#001b44!important;
}
.histFinalPed{
  font-weight:900!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.histFinalStatus{
  font-weight:900!important;
  white-space:nowrap!important;
  text-align:left!important;
}
.histFinalGuias{
  font-weight:900!important;
  text-align:right!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums!important;
}
.histFinalPager{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:34px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  z-index:20!important;
  background:linear-gradient(180deg,rgba(255,255,255,.88),#fff 55%)!important;
  color:#64748b!important;
  font-size:12px!important;
  font-weight:900!important;
  pointer-events:auto!important;
}
.histFinalPager button{
  border:0!important;
  background:#eef2f7!important;
  color:#001b44!important;
  border-radius:8px!important;
  padding:5px 10px!important;
  font-weight:900!important;
  cursor:pointer!important;
  line-height:1!important;
}
@media(max-width:850px){
  .histFinalCard{height:220px!important;min-height:220px!important;max-height:220px!important}
  .histFinalRow{grid-template-columns:minmax(130px,1fr) 112px 86px!important;font-size:14px!important}
}


/* V7.6 historial */
.histV75Row,.histFinalRow{
grid-template-columns:minmax(210px,1fr) 135px 95px !important;
}
.histV75Ped,.histFinalPed{
padding-left:10px !important;
}
.histV75Status,.histFinalStatus{
transform:translateX(-18px) !important;
}
.histV75Guias,.histFinalGuias{
display:flex !important;
justify-content:flex-end !important;
align-items:center !important;
gap:6px !important;
}
.histV75Pager,.histFinalPager{
height:30px !important;
bottom:2px !important;
}


/* === HISTORIAL COMO REFERENCIA === */
#hist.card{padding:14px 16px 12px!important;border-radius:14px!important}
#hist h1{font-size:26px!important;margin:0 0 8px!important;color:#001b44!important}
#hist .histGridRef{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px 12px!important;align-items:start!important}
.histRefCard{position:relative!important;height:214px!important;overflow:hidden!important;border:1px solid #d8e1ee!important;border-radius:9px!important;background:#fff!important;padding:12px 14px 32px!important;box-shadow:none!important}
.histRefTop{display:grid!important;grid-template-columns:1fr auto!important;gap:10px!important;align-items:start!important;margin-bottom:8px!important}
.histRefTitle{cursor:pointer!important;font-size:18px!important;line-height:1.05!important;font-weight:900!important;color:#001b44!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.histRefTitle .check{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:18px!important;height:18px!important;margin-right:9px!important;border-radius:3px!important;background:#2fbf71!important;color:#fff!important;font-size:13px!important;vertical-align:1px!important}
.histRefPlate{font-size:11px!important;font-weight:900!important;color:#001b44!important;margin:4px 0 0 24px!important}
.histRefPlate .pin{margin-left:-24px!important;margin-right:8px!important;color:#ef3b70!important}
.histRefTotals{display:grid!important;grid-template-columns:auto auto!important;gap:22px!important;text-align:center!important;color:#001b44!important;font-weight:900!important;white-space:nowrap!important;font-size:11px!important;line-height:1.15!important}
.histRefMetric strong{display:block!important;font-size:12px!important;margin-bottom:8px!important}
.histRefMetric span{display:block!important;font-size:11px!important;font-weight:700!important}
.histRefDate{font-size:10px!important;color:#334155!important;border-bottom:1px solid #e5eaf1!important;padding-bottom:8px!important;margin-bottom:4px!important}
.histRefTableHead,.histRefRow{display:grid!important;grid-template-columns:minmax(170px,1fr) 118px 70px!important;gap:8px!important;align-items:center!important}
.histRefTableHead{font-size:9px!important;font-weight:900!important;color:#001b44!important;padding:2px 0 4px!important;border-bottom:1px solid #eef2f7!important}
.histRefRow{font-size:11px!important;color:#001b44!important;font-weight:900!important;height:21px!important;border-bottom:1px solid #edf1f7!important}
.histRefPed{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.histRefStatus{white-space:nowrap!important}
.histRefStatus .okbox{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:12px!important;height:12px!important;margin-right:8px!important;border-radius:2px!important;background:#2fbf71!important;color:#fff!important;font-size:9px!important}
.histRefGuias{white-space:nowrap!important;text-align:right!important;font-variant-numeric:tabular-nums!important}
.histRefPager{position:absolute!important;left:0!important;right:0!important;bottom:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:22px!important;font-size:12px!important;font-weight:900!important;color:#001b44!important}
.histRefPager button{border:0!important;background:#f1f3f7!important;color:#001b44!important;border-radius:8px!important;width:30px!important;height:25px!important;padding:0!important;font-weight:900!important;cursor:pointer!important;line-height:1!important}
@media(max-width:1100px){#hist .histGridRef{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:760px){#hist .histGridRef{grid-template-columns:1fr!important}.histRefTableHead,.histRefRow{grid-template-columns:minmax(135px,1fr) 105px 62px!important}}


.viajeStatusBox{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 4px}.viajeStatusBox .infoItem{min-height:72px}.semaforoBox{display:flex;align-items:center;gap:10px}.semaforoIcon{width:34px;height:54px;border-radius:12px;background:#111827;padding:5px;display:flex;flex-direction:column;gap:4px;justify-content:center}.semLight{width:15px;height:15px;border-radius:50%;background:#374151;margin:auto}.semLight.red.on{background:#dc2626;box-shadow:0 0 8px #dc2626}.semLight.green.on{background:#16a34a;box-shadow:0 0 8px #16a34a}.semLight.yellow.on{background:#f59e0b;box-shadow:0 0 8px #f59e0b}.cruceSelect{height:44px;font-weight:900}.viajeSelect{height:44px;font-weight:900}

/* AJUSTES LAYOUT TARJETAS 3 COLUMNAS + CRUCE */
.wrap{max-width:1500px!important;}
.vehicle-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;align-items:start!important;}
.vcard{padding:13px!important;min-width:0!important;}
.mediaSummary{display:grid!important;grid-template-columns:1fr 150px!important;gap:10px!important;align-items:stretch!important;border-bottom:1px solid #e5eaf1!important;padding-bottom:10px!important;margin-bottom:6px!important;}
.photosMini{display:flex!important;gap:8px!important;align-items:center!important;min-width:0!important;}
.thumbSmall{width:68px!important;height:76px!important;object-fit:cover!important;border-radius:10px!important;}
.totalGuias{width:auto!important;height:76px!important;margin-left:0!important;border-left:3px solid #dbeafe!important;border-radius:12px!important;padding:8px 10px!important;}
.totalGuias strong{font-size:28px!important;}
.lote{padding:10px 0!important;}
.pedHeadLine{grid-template-columns:1fr 126px!important;gap:8px!important;align-items:center!important;}
.pedNumber{font-size:16px!important;}
.pedStatusSelect select{height:38px!important;font-size:12px!important;padding:7px!important;}
.pedMetricsLine{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;margin-top:6px!important;}
.pedMetric{gap:4px!important;font-size:11px!important;padding-right:3px!important;}
.pedMetric i{font-size:15px!important;width:18px!important;text-align:center!important;flex:0 0 18px!important;}
.pedMetric strong{font-size:11px!important;}
.pedMetric span{font-size:9px!important;}
.viajeStatusBox{border-top:1px solid #dbe3ef!important;margin-top:10px!important;padding-top:10px!important;}
.tripControls{display:grid!important;grid-template-columns:1.05fr 72px 1.05fr!important;gap:8px!important;align-items:end!important;}
.tripControls label{font-size:11px!important;font-weight:900!important;white-space:nowrap!important;}
.tripControls select{height:40px!important;font-size:12px!important;padding:7px!important;}
.semaforoOnly{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;align-self:start!important;margin-top:-2px!important;}
.semaforoOnly label{text-align:center!important;margin-bottom:3px!important;}
.semaforoBox{display:flex!important;align-items:center!important;gap:7px!important;}
.semaforoIcon{transform:scale(.9)!important;transform-origin:center!important;}
.resultadoField select{font-size:13px!important;font-weight:900!important;}
.vehicleActions{border-top:1px solid #e5eaf1!important;margin-top:12px!important;padding-top:10px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
.vehicleActions .btn,.vehicleActions a{height:48px!important;min-height:48px!important;font-size:12px!important;padding:0 8px!important;}
.vehicleActions .subtle{grid-column:1/-1!important;text-align:center!important;font-size:11px!important;}
.pedActions{display:inline-flex!important;gap:4px!important;align-items:center!important;margin-left:6px!important;}
.pedIcon{font-size:14px!important;line-height:1!important;vertical-align:middle!important;}
.previewIcon{color:#2563eb!important;}
@media(max-width:1200px){.vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.wrap{max-width:1100px!important;}}
@media(max-width:800px){.vehicle-grid{grid-template-columns:1fr!important;}.mediaSummary{grid-template-columns:1fr!important}.tripControls{grid-template-columns:1fr!important}.vehicleActions{grid-template-columns:1fr!important}}



/* AJUSTE FINAL: SEMAFORO CENTRADO, SELECTORES ANCHOS Y WHATSAPP COMPACTO */
.tripControls{grid-template-columns:minmax(180px,1.45fr) 58px minmax(118px,.82fr)!important;gap:10px!important;align-items:end!important;}
.statusCruceField{min-width:0!important;}
.statusCruceField select{font-size:11px!important;font-weight:900!important;padding:6px 8px!important;min-width:0!important;}
.resultadoField select{font-size:12px!important;font-weight:900!important;padding:6px 8px!important;min-width:0!important;}
.semaforoOnly{align-self:center!important;justify-self:center!important;align-items:center!important;margin-top:-6px!important;}
.semaforoOnly label{text-align:center!important;font-size:11px!important;margin-bottom:2px!important;}
.semaforoIcon{width:32px!important;height:56px!important;margin:0 auto!important;}
.waBox{max-width:980px!important;margin-left:0!important;margin-right:auto!important;}
.waBox textarea{min-height:165px!important;white-space:pre!important;overflow:auto!important;font-size:15px!important;line-height:1.38!important;}
@media(max-width:800px){.tripControls{grid-template-columns:1fr 58px 1fr!important}.waBox{max-width:100%!important}}


/* === MEJORAS MENU Y PEDIMENTOS V7.7 === */
.tabs{gap:8px;margin-bottom:14px}
.tabs button{font-size:12px!important;padding:9px 13px!important;border-radius:13px!important;letter-spacing:.2px!important;min-height:40px!important}
.tabs button .tabSvg{width:18px!important;height:18px!important}
#peds h1{font-size:28px;margin-bottom:18px}
#peds .pedRangeGrid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:12px;align-items:end;max-width:980px}
#peds .pedAdminActions{margin:18px 0 14px;display:flex;gap:10px;flex-wrap:wrap}
#peds .pedToolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0 12px}
#peds .pedFilters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
#peds .pedFilters input,#peds .pedFilters select{height:40px;font-size:13px;border-radius:12px;min-width:210px;width:auto}
#peds .pedFilters select{min-width:160px}
#peds table{font-size:13px;border-radius:14px;overflow:hidden}
#peds th{font-size:12px;letter-spacing:.25px;color:#0f172a;background:#f3f6fb;padding:10px 9px}
#peds td{padding:9px;border-bottom:1px solid #eef2f7}
#peds tbody tr:hover{background:#f8fafc}
#peds .actions button{padding:6px 8px;border-radius:8px;background:#f1f5f9}
#peds .status{font-size:12px;padding:6px 10px}
#peds .btn{font-size:13px;padding:10px 14px;border-radius:13px}
#peds .pill{font-size:12px;padding:6px 10px;background:#eef4fb}
@media(max-width:900px){#peds .pedRangeGrid{grid-template-columns:1fr}#peds .pedFilters input,#peds .pedFilters select{width:100%}.tabs button{font-size:11px!important;padding:8px 10px!important}}


/* === AJUSTES FINALES: LOGO, DASHBOARD, HISTORIAL Y SELECTORES === */
.topBrand{display:flex!important;align-items:center!important;gap:12px!important}
.clientLogo{height:38px;max-width:190px;object-fit:contain;background:white;border-radius:10px;padding:4px 8px}
.tabs button{font-size:11px!important;padding:8px 11px!important}
.hlPieGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important}
.hlPieCard{min-height:255px!important;height:100%!important}
.hlPieBody{height:calc(100% - 44px)!important;align-items:center!important}
.hlPieSide .pct{display:block;font-size:18px;font-weight:900;color:#0f172a;margin-top:4px}
.histCruceLine{margin-top:8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.histCruceLine label{font-size:11px;color:#64748b;margin:0;font-weight:900}
.histCruceLine select{width:150px;height:34px;font-size:12px;font-weight:900;padding:5px 8px;border-radius:10px}
.statusCruceField select{min-width:210px!important;font-size:11px!important}
.resultadoField select{min-width:145px!important;font-size:11px!important}
.semaforoOnly{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;padding-top:0!important}
@media(max-width:1200px){.hlPieGrid{grid-template-columns:1fr!important}.clientLogo{height:32px;max-width:150px}}


/* === FIX HISTORIAL COMPACTO + SOLO LOGO === */
.topBrand span{display:none!important}
.clientLogoOnly{height:46px!important;max-width:260px!important;background:white!important;border-radius:12px!important;padding:5px 10px!important}
.histRefTop{grid-template-columns:1fr auto!important;align-items:start!important}
.histRefTotals{grid-template-columns:auto auto!important;gap:22px!important;align-items:start!important}
.histRefDateFlex{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;font-size:10px!important;color:#334155!important;border-bottom:1px solid #e5eaf1!important;padding:4px 0 6px!important;margin-bottom:4px!important}
.histRefDateFlex .histCruceLine{margin:0!important;display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important}
.histRefDateFlex .histCruceLine label{font-size:10px!important;color:#64748b!important;font-weight:900!important;margin:0!important}
.histRefDateFlex .histCruceLine select{width:145px!important;height:28px!important;font-size:11px!important;font-weight:900!important;padding:3px 8px!important;border-radius:9px!important}



/* === HISTORIAL V7.6: COMPLETADO ANCHO + SELECTOR A LA DERECHA === */
.histRefCard{height:260px!important;min-height:260px!important;max-height:260px!important;padding:12px 14px 34px!important;}
.histRefDateFlex{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;font-size:10px!important;line-height:1.18!important;padding:4px 0 7px!important;margin-bottom:4px!important;border-bottom:1px solid #e5eaf1!important;}
.histRefDateFlex>span{flex:1 1 auto!important;min-width:0!important;white-space:nowrap!important;overflow:visible!important;color:#334155!important;}
.histRefDateFlex .histCruceLine{margin:0!important;flex:0 0 auto!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;white-space:nowrap!important;}
.histRefDateFlex .histCruceLine label{display:none!important;}
.histRefDateFlex .histCruceLine select{width:165px!important;height:30px!important;font-size:11px!important;font-weight:900!important;padding:3px 8px!important;border-radius:9px!important;}
.histRefTableHead,.histRefRow{grid-template-columns:minmax(170px,1fr) 118px 70px!important;}
.histRefRow{min-height:21px!important;font-size:11px!important;line-height:1.15!important;}
.histRefPager{height:28px!important;bottom:2px!important;}
@media(max-width:850px){.histRefCard{height:270px!important;min-height:270px!important;max-height:270px!important}.histRefDateFlex>span{white-space:normal!important}}


/* HISTORIAL LIMPIO FINAL */
.histRefCard{height:224px!important;min-height:224px!important;max-height:224px!important;padding:12px 14px 24px!important;}
.histRefTop{grid-template-columns:1fr auto!important;align-items:start!important;margin-bottom:5px!important;}
.histRefTitle{font-size:18px!important;}
.histRefPlate{display:none!important;}
.histRefTotals{gap:28px!important;align-items:start!important;}
.histRefMetric strong{font-size:13px!important;margin-bottom:0!important;}
.histRefMetric span{display:none!important;}
.histRefDateFlex{padding:2px 0 6px!important;margin-bottom:4px!important;gap:10px!important;}
.histRefDateFlex>span{flex:1 1 auto!important;white-space:nowrap!important;min-width:260px!important;}
.histRefDateFlex .histCruceLine{flex:0 0 172px!important;justify-content:flex-end!important;}
.histRefDateFlex .histCruceLine select{width:172px!important;height:30px!important;font-size:11px!important;font-weight:900!important;}
.histRefTableHead,.histRefRow{grid-template-columns:80px minmax(125px,1fr) 82px!important;gap:6px!important;}
.histRefTableHead{font-size:9px!important;padding:2px 0 3px!important;}
.histRefRow{height:20px!important;min-height:20px!important;font-size:11px!important;}
.histRefTipo{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.histRefPed{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.histRefGuias{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;text-align:right!important;}
.histRefTotalLine{font-size:10px!important;font-weight:900!important;color:#001b44!important;text-align:right!important;padding-top:4px!important;}
.histRefPager{bottom:1px!important;height:22px!important;}
.histRefPager.empty{display:none!important;}
@media(max-width:760px){.histRefTableHead,.histRefRow{grid-template-columns:70px minmax(105px,1fr) 72px!important}.histRefDateFlex>span{min-width:0!important;white-space:normal!important}.histRefDateFlex .histCruceLine{flex:0 0 145px!important}.histRefDateFlex .histCruceLine select{width:145px!important}}

/* HISTORIAL V3: 4 columnas, selector abajo, busqueda y menu ocultable */
.menuCollapsed .tabs,.menuCollapsed .topApps,.menuCollapsed .loginBar{display:none!important}
.clientLogo{cursor:pointer}
.histHeaderClean{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.histHeaderClean h1{margin:0!important}
.histSearch{max-width:360px;height:38px;font-size:13px;font-weight:800;border-radius:12px;padding:8px 12px}
#hist .histGridRef{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
.histRefCard{height:220px!important;min-height:220px!important;max-height:220px!important;padding:12px 14px 24px!important}
.histRefTop{margin-bottom:8px!important}
.histRefTitle{font-size:17px!important}
.histRefTotals{gap:20px!important}
.histRefMetric strong{font-size:13px!important}
.histRefDateFlex{display:block!important;border-bottom:1px solid #e5eaf1!important;padding:0 0 6px!important;margin-bottom:4px!important}
.histRefDateFlex>span{display:block!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:10px!important}
.histRefDateFlex .histCruceLine{display:none!important}
.histRefTableHead,.histRefRow{grid-template-columns:92px minmax(88px,1fr) 66px!important;gap:4px!important}
.histRefTableHead{font-size:9px!important}
.histRefRow{height:19px!important;min-height:19px!important;font-size:10.5px!important}
.histRefTipo{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.histRefBottom{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding-top:5px!important}
.histRefBottom .histCruceLine{display:block!important;flex:0 0 118px!important;margin:0!important}
.histRefBottom .histCruceLine select{width:118px!important;height:28px!important;font-size:10.5px!important;font-weight:900!important;padding:3px 6px!important;border-radius:9px!important}
.histRefTotalLine{font-size:10px!important;font-weight:900!important;color:#001b44!important;text-align:right!important;padding:0!important;white-space:nowrap!important}
@media(max-width:1280px){#hist .histGridRef{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:900px){#hist .histGridRef{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:600px){#hist .histGridRef{grid-template-columns:1fr!important}.histHeaderClean{flex-direction:column;align-items:stretch}.histSearch{max-width:none}}



/* === PENDIENTES PRO + ESTADO POR VIAJE === */
#dash{background:#f7f9fc!important;border:0!important;box-shadow:none!important;padding:0!important}
#dash .dashHeader{background:white;border:1px solid #dbe4f0;border-radius:22px;padding:18px 22px;margin-bottom:16px;box-shadow:0 10px 28px rgba(15,23,42,.06)}
#dash h1{letter-spacing:.5px;font-size:30px!important;color:#001b44!important}
#dash .freeBox{background:#eef4fb!important;border:1px solid #dbeafe!important;border-radius:999px!important;padding:12px 18px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
#dash .vehicle-grid{grid-template-columns:repeat(auto-fill,minmax(390px,1fr))!important;gap:16px!important}
.proPendingCard{border:1px solid #d9e5f4!important;border-radius:22px!important;padding:16px!important;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;box-shadow:0 12px 28px rgba(15,23,42,.08)!important;overflow:hidden!important}
.proPendingCard:hover{transform:translateY(-1px);box-shadow:0 16px 34px rgba(15,23,42,.11)!important;transition:.18s ease}
.proVehHead{border-bottom:1px solid #edf2f7!important;padding-bottom:10px!important;margin-bottom:12px!important;align-items:flex-start!important}
.proVehHead .vehName{font-size:18px!important;color:#001b44!important;letter-spacing:.2px!important}
.estadoBadge{font-size:11px;font-weight:900;color:#334155;background:#f1f5f9;border:1px solid #dbe4f0;border-radius:999px;padding:7px 9px;white-space:nowrap;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.mediaSummary{background:#f8fafc;border:1px solid #edf2f7;border-radius:16px;padding:10px!important;margin-bottom:10px!important}
.photosMini img{box-shadow:0 4px 12px rgba(15,23,42,.12)}
.totalGuias{background:white!important;border:1px solid #dbeafe!important;box-shadow:0 4px 12px rgba(37,99,235,.08)!important;color:#64748b!important}
.lote{background:white;border:1px solid #eef2f7!important;border-radius:16px!important;margin:10px 0!important;padding:12px!important;box-shadow:0 4px 14px rgba(15,23,42,.04)!important}
.loteTitle{font-size:15px!important;color:#001b44!important;margin-bottom:10px!important}
.pedHeadLine{grid-template-columns:minmax(0,1fr) 145px!important}
.pedTitle b,.pedMetric span,.proTripPanel label{color:#64748b!important;letter-spacing:.35px!important}
.pedNumber{font-size:17px!important;letter-spacing:.2px!important}
.pedStatusSelect select,.proTripControls select{border:1px solid #d6e1ef!important;background:#fff!important;box-shadow:0 1px 0 rgba(255,255,255,.7)!important}
.pedMetricsLine{background:#f8fafc;border-radius:14px;padding:8px 7px;margin-top:10px!important}
.pedMetric{border-right:1px solid #dbe4f0!important}
.proTripPanel{background:#f8fafc!important;border:1px solid #e1e9f4!important;border-radius:18px!important;padding:12px!important;margin-top:12px!important}
.proTripControls{display:grid!important;grid-template-columns:1.25fr 1.15fr .95fr 64px!important;gap:10px!important;align-items:end!important}
.proTripControls label{font-size:10px!important;margin-bottom:5px!important;display:block!important}
.proTripControls select{height:42px!important;border-radius:13px!important;font-size:11px!important;font-weight:900!important;padding:7px 9px!important;min-width:0!important;width:100%!important}
.estadoField{min-width:0!important}.estadoSelect{font-size:11px!important}
.semaforoOnly{margin:0!important;align-self:end!important;background:white;border:1px solid #e1e9f4;border-radius:14px;padding:5px 4px 6px!important;height:66px;justify-content:center!important}
.semaforoOnly label{font-size:9px!important;margin:0 0 2px!important}.semaforoIcon{width:28px!important;height:48px!important}
.proActions{grid-template-columns:repeat(2,minmax(0,1fr))!important;background:white;border:1px solid #eef2f7!important;border-radius:18px!important;padding:10px!important;margin-top:12px!important}
.proActions .btn,.proActions a{border-radius:14px!important;box-shadow:0 6px 14px rgba(15,23,42,.08)!important;letter-spacing:.2px!important}
@media(max-width:900px){#dash .vehicle-grid{grid-template-columns:1fr!important}.proTripControls{grid-template-columns:1fr 1fr!important}.semaforoOnly{height:auto}.estadoBadge{max-width:130px}}
@media(max-width:560px){.proTripControls{grid-template-columns:1fr!important}.pedHeadLine{grid-template-columns:1fr!important}.proActions{grid-template-columns:1fr!important}.estadoBadge{display:none}}


/* === AJUSTE PENDIENTES ELEGANTE + DESTINO === */
#dash{padding:14px!important}#dash h1{font-size:23px!important;letter-spacing:.4px}.vehicle-grid{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))!important;gap:12px!important}.proPendingCard{border-radius:14px!important;padding:12px!important;box-shadow:0 7px 18px rgba(15,23,42,.07)!important}.proVehHead{align-items:center!important;margin-bottom:8px!important}.vehName{font-size:15px!important;display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}.inlinePlate,.vehPlacas{font-size:14px!important}.destinoInline{display:inline-block;min-width:150px;max-width:190px}.destinoSelect{height:34px!important;font-size:11px!important;font-weight:800!important;padding:6px 9px!important;border-radius:11px!important;background:#fff!important}.thumbSmall{width:72px!important;height:58px!important;border-radius:8px!important}.totalGuias{width:132px!important;height:66px!important;font-size:11px!important;padding:8px!important}.totalGuias strong{font-size:25px!important}.lote{padding:9px 0!important}.loteTitle{font-size:13px!important;margin-bottom:6px!important}.pedHeadLine{grid-template-columns:1fr 132px!important;gap:8px!important}.pedTitle b{font-size:10px!important}.pedNumber{font-size:14px!important}.pedIcon{font-size:11px!important;padding:4px!important}.pedStatusSelect select{height:34px!important;font-size:11px!important;padding:6px 8px!important}.pedMetric i{font-size:14px!important}.pedMetric strong{font-size:11px!important}.pedMetric span{font-size:9px!important}.proTripPanel{border-top:1px solid #e7edf5!important;margin-top:8px!important;padding-top:9px!important}.proTripControls{display:grid!important;grid-template-columns:1.25fr 1fr 82px!important;gap:8px!important;align-items:end!important}.proTripControls label{font-size:10px!important;color:#64748b!important;letter-spacing:.3px!important;white-space:nowrap!important}.viajeSelect,.cruceSelect{height:34px!important;font-size:11px!important;padding:6px 8px!important;border-radius:11px!important}.semaforoOnly{min-height:auto!important;border:1px solid #dbe4f0!important;border-radius:12px!important;padding:5px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;background:#f8fafc!important}.semaforoIcon{width:28px!important;height:45px!important;border-radius:10px!important;padding:4px!important;gap:3px!important}.semLight{width:12px!important;height:12px!important}.proActions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.proActions .btn,.proActions a{height:42px!important;min-height:42px!important;font-size:11px!important;border-radius:12px!important;padding:0 8px!important}.configPanel{max-width:720px}.configAdd{display:grid;grid-template-columns:1fr 190px;gap:10px;align-items:center}.destinosList{margin-top:14px;display:grid;gap:8px}.destinoItem{display:flex;justify-content:space-between;align-items:center;border:1px solid #dbe4f0;background:#f8fafc;border-radius:12px;padding:9px 10px;font-size:13px;font-weight:900}.destinoItem .btn{font-size:11px;padding:7px 10px;border-radius:10px}@media(max-width:900px){.vehicle-grid{grid-template-columns:1fr!important}.proTripControls{grid-template-columns:1fr 1fr 82px!important}.destinoInline{max-width:165px}}@media(max-width:560px){.pedHeadLine,.proTripControls,.configAdd{grid-template-columns:1fr!important}.destinoInline{width:100%;max-width:none}.proActions{grid-template-columns:1fr!important}}


/* === DASHBOARD SEMAFORO EN TARJETAS === */
.semaforoDashboard{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:0 0 14px!important}
.semaforoSummaryCard{border-radius:16px;padding:13px 15px;background:#fff;border:1px solid #dbe4f0;box-shadow:0 7px 18px rgba(15,23,42,.06)}
.semaforoSummaryCard span{display:block;font-size:11px;font-weight:900;color:#64748b;letter-spacing:.35px}.semaforoSummaryCard strong{display:block;font-size:30px;color:#001b44;line-height:1;margin-top:7px}
.semaforoSummaryCard.yellow{border-left:5px solid #eab308}.semaforoSummaryCard.green{border-left:5px solid #22c55e}.semaforoSummaryCard.red{border-left:5px solid #ef4444}
.semaforoDashPanel{grid-column:1/-1;background:#fff;border:1px solid #dbe4f0;border-radius:18px;padding:14px;box-shadow:0 7px 18px rgba(15,23,42,.06)}
.semaforoDashPanel h2{font-size:15px!important;margin:0 0 10px!important;color:#001b44!important;letter-spacing:.35px!important}.semaforoDashGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.semaforoDashCard{border:1px solid #e1e9f4;border-radius:14px;background:#f8fafc;padding:10px;min-height:104px}.semaforoDashCard.green{background:#f0fdf4}.semaforoDashCard.red{background:#fef2f2}.semaforoDashCard.yellow{background:#fffbeb}
.semaforoDashTop{display:flex;align-items:center;gap:6px;margin-bottom:7px}.semaforoDashTop span{font-size:16px}.semaforoDashTop b{font-size:11px;letter-spacing:.3px}.semaforoDashCard strong{display:block;font-size:13px;line-height:1.15;color:#001b44}.semaforoDashCard small{display:block;margin-top:5px;font-size:10px;color:#64748b;font-weight:800}.semaforoDashCard em{display:block;margin-top:7px;font-size:10px;font-style:normal;font-weight:900;color:#0f172a}
@media(max-width:900px){.semaforoDashboard{grid-template-columns:1fr}.semaforoDashPanel{grid-column:auto}}



/* === REFINAMIENTO SEMAFORO DE CRUCES DETALLADO === */
.semaforoDashboard{display:block!important;margin:0 0 14px!important}
.semaforoSummaryCard{display:none!important}
.semaforoDashPanel{background:#fff!important;border:1px solid #dbe4f0!important;border-radius:16px!important;padding:12px 14px!important;box-shadow:0 8px 20px rgba(15,23,42,.045)!important}
.semaforoDashPanel h2{font-size:15px!important;margin:0 0 12px!important;color:#001b44!important;letter-spacing:.25px!important}
.semaforoDashGrid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(285px,1fr))!important;gap:10px!important}
.semaforoDashCard{border:1px solid #e1e9f4!important;border-radius:14px!important;background:#fff!important;padding:10px 12px!important;min-height:0!important;box-shadow:0 4px 12px rgba(15,23,42,.035)!important}
.semaforoDashCard.yellow{background:#fffaf0!important;border-color:#fde68a!important}.semaforoDashCard.green{background:#f0fdf4!important;border-color:#bbf7d0!important}.semaforoDashCard.red{background:#fef2f2!important;border-color:#fecaca!important}
.semaforoDashTop{display:grid!important;grid-template-columns:auto 1fr!important;align-items:start!important;gap:10px!important;margin-bottom:8px!important}.semaforoMainStatus{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important}.semaforoMainStatus span{font-size:14px!important}.semaforoMainStatus b{font-size:12px!important;letter-spacing:.25px!important;color:#001b44!important}.semaforoCruceBox{justify-self:end!important;text-align:right!important;min-width:128px!important}.semaforoCruceText{display:block!important;font-size:10.5px!important;font-weight:900!important;color:#0f172a!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.semaforoCruceText.warn{color:#b45309!important;white-space:normal!important}.semaforoGuiasTotal{display:block!important;margin-top:4px!important;font-size:10px!important;font-weight:900!important;color:#64748b!important;letter-spacing:.15px!important}
.semaforoVehLine{display:grid!important;grid-template-columns:1fr!important;gap:2px!important;margin-bottom:8px!important}.semaforoVehLine strong{display:block!important;font-size:14px!important;line-height:1.12!important;color:#001b44!important}.semaforoVehLine small{display:block!important;font-size:11px!important;color:#64748b!important;font-weight:800!important;margin:0!important}
.semaforoPedList{display:grid!important;gap:5px!important;margin:8px 0 0!important}.semaforoPedRow{display:grid!important;grid-template-columns:58px 76px 78px 1fr!important;align-items:center!important;gap:6px!important;padding:5px 6px!important;border-radius:9px!important;background:rgba(255,255,255,.72)!important;border:1px solid rgba(203,213,225,.75)!important;font-size:11px!important;font-weight:800!important;color:#001b44!important}.semPedBloque{white-space:nowrap!important}.semPedNumero{font-weight:900!important}.semPedGuias{font-size:10px!important;color:#475569!important;white-space:nowrap!important}.semPedStatus{font-size:10px!important;text-align:right!important;white-space:nowrap!important;background:transparent!important;color:#001b44!important;border-radius:0!important;padding:0!important}.semPedStatus.PAGADO{background:transparent!important;color:#001b44!important}.semaforoPedEmpty{font-size:11px!important;color:#64748b!important;font-weight:800!important}
.semaforoDashCard em{display:none!important}
@media(max-width:700px){.semaforoDashGrid{grid-template-columns:1fr!important}.semaforoPedRow{grid-template-columns:52px 70px 72px 1fr!important;font-size:10px!important}}


.adminGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.adminKpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.adminKpi{background:#f8fafc;border:1px solid #d8e1ee;border-radius:14px;padding:12px}.adminKpi span{display:block;color:#64748b;font-size:11px;font-weight:900}.adminKpi b{font-size:20px}.searchGrid{display:grid;grid-template-columns:2fr 1fr auto;gap:10px;align-items:end}.smallTable{font-size:12px}.smallTable th,.smallTable td{padding:7px}.vucemBox{background:#f8fafc;border:1px dashed #94a3b8;border-radius:14px;padding:12px}@media(max-width:900px){.adminGrid,.searchGrid{grid-template-columns:1fr}.adminKpis{grid-template-columns:1fr}}


/* === v1.1.3 dashboard periodos + fondo azul marino === */
body{background:#071A3D!important;}
.wrap{background:transparent!important;}
#general.card{background:#f7f9fc!important;border:0!important;box-shadow:0 14px 38px rgba(0,0,0,.18)!important;}
.hlCardTitleRow{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px;}
.hlCardTitleRow h2{margin:0!important;line-height:1.2;}
.dashPeriodControl{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap;min-width:160px;}
.dashPeriodControl select{height:34px;border:1px solid #d8e1ee;border-radius:10px;background:#fff;color:#001b44;font-size:12px;font-weight:900;padding:0 28px 0 10px;outline:none;max-width:210px;}
.dashPeriodControl .dashPeriodSub{min-width:112px;}
.dashPeriodControl .dashPeriodSub.wide{min-width:190px;}
@media(max-width:760px){.hlCardTitleRow{flex-direction:column;align-items:stretch}.dashPeriodControl{justify-content:flex-start}.dashPeriodControl select{width:100%;max-width:100%;}.dashPeriodControl .dashPeriodSub,.dashPeriodControl .dashPeriodSub.wide{width:100%;min-width:0}}


/* === CONTROL VALIDACION v1.4.0 === */
.controlValPage .dashHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.controlValGrid{align-items:start}
.controlPanel{border:1px solid #d8e1ee;border-radius:16px;background:#f8fafc;padding:14px}
.controlPanel h2{margin-top:0}
.cvResumen{border:1px dashed #cbd5e1;border-radius:14px;background:white;padding:12px;min-height:120px}
.cvResumen table{font-size:13px}
.cvChecklist{display:grid;gap:8px;margin-top:12px;font-weight:900;font-size:13px;color:#334155}
.cvChecklist div{background:white;border:1px solid #e5eaf1;border-radius:12px;padding:9px 10px}
@media(max-width:850px){.controlValGrid{grid-template-columns:1fr}.controlValPage textarea{height:120px}.controlValPage .grid{grid-template-columns:1fr}}

.histRefTitle{cursor:pointer}
.histRefTools{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 8px}.histRefTools .btn{font-size:11px;padding:6px 9px;border-radius:10px}

/* === LOGIN FORMAL V2.0.4 === */
.loginOverlay{position:fixed;inset:0;background:linear-gradient(135deg,#061b3a,#0b2349);display:none;align-items:center;justify-content:center;z-index:99999;padding:22px}
.loginOverlay.show{display:flex}
.loginCard{width:min(480px,94vw);background:white;border-radius:28px;padding:30px;box-shadow:0 25px 70px rgba(0,0,0,.38);border:1px solid #d9e4f3}
.loginLogo{display:block;margin:0 auto 18px;max-width:230px;max-height:70px;object-fit:contain}
.loginCard h1{font-size:30px;margin:0 0 6px;text-align:center;color:#08214a}
.loginCard p{text-align:center;color:#64748b;font-weight:800;margin:0 0 22px}.loginCard label{margin-top:12px}.loginCard input{height:52px;font-size:18px}.loginActions{display:flex;gap:12px;margin-top:18px}.loginActions .btn{flex:1}.loginHint{margin-top:16px;background:#eef6ff;border:1px solid #cfe4ff;color:#12345d;border-radius:16px;padding:12px;font-weight:800;font-size:14px}.topBrand img{cursor:pointer}


/* FIX FOTOS: ocultar preview vacía y expandir botón de carga */
.equipoPhotoSplit:not(.hasPhoto){grid-template-columns:1fr!important;}
.equipoPhotoSplit:not(.hasPhoto) .equipoPreview{display:none!important;}
.equipoPhotoSplit.hasPhoto .equipoPreview{display:block!important;}
.equipoPreview[src=""], .equipoPreview:not([src]){display:none!important;}
.equipoPhotoSplit.hasPhoto .equipoPreview[src]:not([src=""]){display:block!important;}


/* === CARGA HISTORICA EN CONFIGURACION v2.0.38 === */
.historicalConfigBox{border-left:5px solid #2563eb!important}
.historicNotice{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:12px;padding:10px 12px;font-weight:800;margin:10px 0 14px;font-size:12px}
.historicGrid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;align-items:end}
.historicGrid input,.historicGrid select{width:100%;height:42px;border:1px solid #dbe4f0;border-radius:12px;padding:0 10px;font-weight:800;background:white;color:#0f172a}
.historicCheck{display:flex;gap:8px;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px;font-weight:800;font-size:12px;min-height:42px}
.historicActions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.historicRules{margin-top:12px;background:white;border:1px solid #e2e8f0;border-radius:14px;padding:12px}
.historicRules h3{margin:0 0 10px;color:#001b44;font-size:15px}
@media(max-width:1000px){.historicGrid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.historicGrid{grid-template-columns:1fr}}


/* === MONITOR BACKEND HISTORICO v2.0.38 === */
.historicoMonitor{margin-top:12px;border:1px solid #dbeafe;background:#f8fbff;border-radius:14px;padding:12px}
.historicoMonitorHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.historicoMonitorHead h3{margin:0;font-size:15px;color:#0f172a}
.histStatGrid{display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));gap:8px;margin-bottom:10px}
.histStat{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:8px;text-align:center}
.histStat b{display:block;font-size:18px;color:#0f172a;line-height:1.1}.histStat span{font-size:10px;color:#64748b;font-weight:800;letter-spacing:.04em}
.histBar{height:10px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin:8px 0}.histBar>div{height:100%;background:#2563eb;width:0%}
.histLog{background:#0f172a;color:#dbeafe;border-radius:12px;padding:10px;font-family:Consolas,Monaco,monospace;font-size:12px;line-height:1.45;max-height:180px;overflow:auto;white-space:pre-wrap}
.histEstado{font-size:12px;font-weight:900;border-radius:999px;padding:6px 10px;background:#e2e8f0;color:#334155}.histEstado.EN_PROCESO{background:#fef3c7;color:#92400e}.histEstado.TERMINADO{background:#dcfce7;color:#166534}.histEstado.ERROR{background:#fee2e2;color:#991b1b}

/* v79 Carga Historica profesional */
.histFileNow{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:10px 0}.histFileNow .box,.histDirStatus .box{background:#fff;border:1px solid #dbe4f0;border-radius:12px;padding:9px;font-weight:900;color:#0f172a;word-break:break-all}.histFileNow span,.histDirStatus span{display:block;margin-top:4px;font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.histControls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.histLogToggle{margin-top:8px}.histLog.hide{display:none}.histSummary{margin-top:10px;background:#ecfdf5;border:1px solid #bbf7d0;color:#064e3b;border-radius:12px;padding:10px;font-size:12px;font-weight:900}.histSummaryGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px}.histSummaryGrid div{background:white;border:1px solid #bbf7d0;border-radius:10px;padding:8px}.histSummaryGrid b{display:block;font-size:18px}.histResultsWrap{overflow:auto}.histResultsTable{width:100%;border-collapse:collapse;font-size:12px}.histResultsTable th,.histResultsTable td{border-bottom:1px solid #e5e7eb;padding:6px;text-align:left}.histBadge{display:inline-flex;border-radius:999px;padding:3px 8px;font-size:10px;font-weight:900}.histBadge.ok{background:#dcfce7;color:#166534}.histBadge.err{background:#fee2e2;color:#991b1b}.histBadge.warn{background:#fef3c7;color:#92400e}.histEmpty{background:#fff;border:1px dashed #cbd5e1;border-radius:12px;padding:12px;color:#64748b;font-weight:800}.histEstado.CANCELADO{background:#e5e7eb;color:#374151}


/* === v2.0.43 Media operativa bajo semáforos === */
.mediaOperativaPanel{background:#fff;border:1px solid #dbe4f0;border-radius:18px;padding:14px;margin:0 0 14px;box-shadow:0 7px 18px rgba(15,23,42,.055);min-height:190px;contain:layout paint}
.mediaOperativaHead{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px;min-height:42px}
.mediaOperativaHead h2{font-size:15px!important;margin:0!important;color:#001b44!important;letter-spacing:.35px!important}
.mediaOperativaTabs{display:flex;gap:8px;flex-wrap:wrap;align-items:end}.mediaOperativaTabs label{display:flex;flex-direction:column;gap:3px;font-size:9px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.25px}.mediaOperativaTabs input{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:10px;padding:6px 8px;font-size:11px;font-weight:900}.mediaOperativaTabs button{border:1px solid #0b4ea2;background:#0b4ea2;color:#fff;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:900;cursor:pointer}.mediaOperativaTabs button:disabled{opacity:.65;cursor:wait}
.mediaOperativaGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;min-height:102px}.mediaOperativaCard{border:1px solid #e1e9f4;background:#f8fafc;border-radius:14px;padding:11px 12px;min-height:78px}.mediaOperativaCard span{display:block;font-size:10px;color:#64748b;font-weight:900;letter-spacing:.35px;text-transform:uppercase}.mediaOperativaCard strong{display:block;margin-top:7px;font-size:24px;line-height:1;color:#001b44;font-weight:900}.mediaOperativaCard small{display:block;margin-top:4px;font-size:10px;color:#64748b;font-weight:800}.mediaOperativaCard.high{border-left:4px solid #16a34a}.mediaOperativaCard.low{border-left:4px solid #2563eb}.mediaOperativaCard.usd strong{font-size:20px}.mediaOperativaPeriodo{margin:0 0 10px;font-size:12px;color:#0f172a;font-weight:900;min-height:18px}.mediaOperativaLoading{visibility:hidden;min-height:31px;margin:0 0 10px;padding:8px 10px;border-radius:12px;background:#eff6ff;border:1px solid #bfdbfe;color:#0b4ea2;font-size:11px;font-weight:900;box-sizing:border-box}.mediaOperativaLoading.show{visibility:visible}.mediaOperativaNote{margin:10px 0 0;font-size:11px;color:#64748b;font-weight:800;min-height:16px;display:block}
@media(max-width:720px){.mediaOperativaHead{align-items:flex-start}.mediaOperativaGrid{grid-template-columns:1fr 1fr}.mediaOperativaCard strong{font-size:20px}}


/* Dashboard búsqueda mercancía: contribuciones en segundo renglón */
.tablaBusquedaMercancia .mercContribRow td{background:#f8fbff;border-bottom:1px solid #e6eef8;}
.mercContribLine{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;}
.mercContribLeft{display:flex;align-items:center;gap:8px;flex-wrap:wrap;text-align:left;}
.mercContribLabel{font-weight:900;color:#475569;margin-right:4px;}
.mercContribChip{display:inline-flex;align-items:center;gap:7px;margin:3px 0;padding:5px 10px;border:1px solid #bfdbfe;border-radius:999px;background:#eff6ff;color:#0b2a5b;font-size:12px;font-weight:800;white-space:nowrap;}
.mercContribChip small{font-size:10px;color:#64748b;font-weight:800;text-transform:uppercase;}
.mercTotalChip{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border:1px solid #bbf7d0;border-radius:999px;background:#dcfce7;color:#064e3b;font-size:12px;font-weight:900;white-space:nowrap;}
.busquedaMercanciaHintLine{margin-top:9px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.busquedaMercanciaTotalEncontradas{display:none;align-items:center;gap:8px;margin-left:auto;font-size:12px;font-weight:900;color:#0b2a5b;text-transform:uppercase;}
.busquedaMercanciaTotalEncontradas .totalBadge{display:inline-flex;align-items:center;padding:6px 12px;border:1px solid #bbf7d0;border-radius:999px;background:#dcfce7;color:#047857;font-weight:900;}
.tablaBusquedaMercancia th,.tablaBusquedaMercancia td{text-align:center;}
.tablaBusquedaMercancia td.descCell{text-align:left;}
.tablaBusquedaMercancia td.num{text-align:right;}

/* v64: cápsulas compactas de tasas/pagos - mismo diseño, solo texto interno */
.mercContribChip.v64,.pedTaxChip.v64{display:inline-flex!important;align-items:center!important;gap:4px!important;margin:2px 0!important;padding:3px 8px!important;border:1px solid #bfdbfe!important;border-radius:999px!important;background:#eff6ff!important;color:#0b2a5b!important;font-size:11px!important;font-weight:700!important;line-height:1.1!important;white-space:nowrap!important;}
.mercContribChip.v64 .taxBlue,.pedTaxChip.v64 .taxBlue{color:#0b63f6!important;font-weight:900!important;}
.mercContribChip.v64 .taxText,.pedTaxChip.v64 .taxText{color:#0b2a5b!important;font-weight:700!important;}
.mercContribChip.v64 .taxMeta,.pedTaxChip.v64 .taxMeta{color:#64748b!important;font-size:10px!important;font-weight:600!important;text-transform:none!important;}
.mercContribLine{align-items:center!important;}
.mercContribLeft{gap:6px!important;}


/* v65: ajuste puntual dashboard - forma de pago 0 y alineacion interna de capsula */
.mercContribChip.v64{
  display:inline-flex!important;
  align-items:center!important;
  vertical-align:middle!important;
  gap:3px!important;
  min-height:20px!important;
  height:20px!important;
  padding:2px 7px!important;
  line-height:1!important;
}
.mercContribChip.v64 .taxBlue,.mercContribChip.v64 .taxText,.mercContribChip.v64 .taxMeta{
  display:inline-flex!important;
  align-items:center!important;
  line-height:1!important;
}
.mercContribChip.v64 .taxMeta{
  font-size:9px!important;
  font-weight:500!important;
  color:#64748b!important;
}



/* v72 responsive real SOLO Operacion (#dash) y Dashboard (#opdash) */
#dash .vehicle-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
  align-items:start !important;
}
#dash .vcard,
#dash .proPendingCard{
  min-width:0 !important;
  max-width:none !important;
}
#dash .mediaSummary{
  min-width:0 !important;
}
#dash .pedNumber,
#dash .pedMetric strong,
#dash .loteTitle{
  font-size:13px !important;
}
#dash .pedTitle b{
  display:none !important;
}
#dash .pedHeadLine{
  grid-template-columns:minmax(0,1fr) 118px !important;
}
#dash .pedMetricsLine{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
#dash .vehicleActions{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
}
#dash .vehicleActions .btn,
#dash .vehicleActions a{
  min-height:42px !important;
  height:42px !important;
  padding:6px 8px !important;
  font-size:11px !important;
}
#opdash .generalHero,
#opdash .hlPieGrid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
}
#opdash .generalGrid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
}
@media(max-width:1250px){
  #dash .vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #dash .vehicleActions{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
  #opdash .generalHero,#opdash .hlPieGrid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  #opdash .generalGrid{grid-template-columns:1fr !important;}
}
@media(max-width:760px){
  .wrap{max-width:none !important;width:100% !important;padding:8px !important;overflow-x:hidden !important;}
  #dash.card,#opdash.card{padding:10px !important;border-radius:14px !important;overflow:hidden !important;}
  #dash .dashHeader{gap:8px !important;margin-bottom:8px !important;}
  #dash .dashHeader h1,#opdash h1{font-size:20px !important;}
  #dash .vehicle-grid{grid-template-columns:1fr !important;gap:10px !important;}
  #dash .vcard,#dash .proPendingCard{width:100% !important;min-width:0 !important;padding:10px !important;border-radius:14px !important;}
  #dash .vehHead,#dash .proVehHead{display:flex !important;flex-direction:column !important;align-items:flex-start !important;gap:6px !important;}
  #dash .vehName,#dash .vehPlacas,#dash .inlinePlate{font-size:14px !important;white-space:normal !important;}
  #dash .mediaSummary{display:grid !important;grid-template-columns:1fr !important;gap:8px !important;}
  #dash .photosMini{display:grid !important;grid-template-columns:1fr 1fr !important;gap:8px !important;width:100% !important;}
  #dash .photosMini img,#dash .thumbSmall{width:100% !important;height:82px !important;object-fit:cover !important;}
  #dash .totalGuias{width:100% !important;height:auto !important;min-height:58px !important;margin:0 !important;padding:8px 10px !important;}
  #dash .totalGuias strong{font-size:26px !important;}
  #dash .lote{padding:8px 0 !important;}
  #dash .pedHeadLine{grid-template-columns:1fr !important;gap:6px !important;margin-bottom:5px !important;}
  #dash .pedStatusSelect select{height:36px !important;font-size:11px !important;}
  #dash .pedMetricsLine{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:4px !important;}
  #dash .pedMetric{font-size:10px !important;gap:3px !important;}
  #dash .pedMetric i{font-size:14px !important;}
  #dash .pedMetric span{font-size:9px !important;}
  #dash .pedMetric strong{font-size:11px !important;}
  #dash .tripControls{grid-template-columns:1fr !important;gap:6px !important;}
  #dash .tripControls select,#dash .cruceSelect,#dash .viajeSelect{height:38px !important;font-size:12px !important;}
  #dash .vehicleActions{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:6px !important;}
  #dash .vehicleActions .btn,#dash .vehicleActions a{height:40px !important;min-height:40px !important;font-size:10px !important;padding:5px !important;}
  #dash .waBox{padding:10px !important;margin-top:10px !important;}
  #dash .waBox textarea{min-height:130px !important;font-size:12px !important;}
  #opdash .generalHero,#opdash .hlPieGrid,#opdash .generalGrid{grid-template-columns:1fr !important;gap:10px !important;}
  #opdash .generalKpi,#opdash .hlPieCard,#opdash .card{min-width:0 !important;width:100% !important;}
  #opdash .hlPieBody{grid-template-columns:1fr !important;min-height:auto !important;}
  #opdash .statusLineGeneral{grid-template-columns:1fr !important;gap:4px !important;font-size:12px !important;}
  #opdash table{font-size:12px !important;}
  #opdash th,#opdash td{padding:6px !important;}
}

