/* transporte.css — rubro Transporte y logística (js/transporte.js) */
.tr-demo { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: linear-gradient(135deg, #EEF2FF, #F5EEFF); color: #4338CA; font-size: 12.5px; font-weight: 650; }
.tr-demo .ic { width: 15px; height: 15px; }

/* Copiloto */
.tr-cop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.tr-avisos .card-head h2, .tr-chat .card-head h2 { display: flex; align-items: center; gap: 8px; }
.tr-avisos .card-head .ic, .tr-chat .card-head .ic { width: 18px; height: 18px; color: var(--brand); }
.tr-aviso { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: #F7F8FA; margin-bottom: 8px; box-shadow: inset 3px 0 0 #94A3B8; }
.tr-aviso.is-rojo { background: #FEF2F2; box-shadow: inset 3px 0 0 #DC2626; }
.tr-aviso.is-ambar { background: #FFFBEB; box-shadow: inset 3px 0 0 #F59E0B; }
.tr-aviso.is-verde { background: #F0FDF4; box-shadow: inset 3px 0 0 #16A34A; }
.tr-aviso.is-azul { background: #EFF6FF; box-shadow: inset 3px 0 0 #3B82F6; }
.tr-aviso-ic { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; }
.tr-aviso-ic .ic { width: 17px; height: 17px; }
.tr-aviso.is-rojo .tr-aviso-ic { color: #DC2626; } .tr-aviso.is-ambar .tr-aviso-ic { color: #D97706; } .tr-aviso.is-verde .tr-aviso-ic { color: #16A34A; } .tr-aviso.is-azul .tr-aviso-ic { color: #2563EB; }
.tr-aviso b { display: block; font-size: 14px; }
.tr-aviso p { margin: 3px 0 8px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }

.tr-chat { display: flex; flex-direction: column; }
.tr-chat-log { display: flex; flex-direction: column; gap: 12px; max-height: 560px; min-height: 280px; overflow-y: auto; padding: 4px 2px 10px; scroll-behavior: smooth; }
.tr-msg { display: flex; gap: 8px; align-items: flex-start; }
.tr-msg.is-yo { justify-content: flex-end; }
.tr-msg-av { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #6366F1, #A855F7); color: #fff; }
.tr-msg-av .ic { width: 15px; height: 15px; }
.tr-msg-b { max-width: 92%; padding: 10px 13px; border-radius: 14px; background: #F3F4F6; font-size: 14px; line-height: 1.5; }
.tr-msg-b p { margin: 0 0 8px; } .tr-msg-b p:last-child { margin-bottom: 0; }
.tr-msg-b > .btn { margin-top: 6px; }
.tr-msg.is-yo .tr-msg-b { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.tr-msg.is-ia .tr-msg-b { border-top-left-radius: 4px; }
.tr-pensando { display: flex; gap: 4px; padding: 14px; }
.tr-pensando i { width: 7px; height: 7px; border-radius: 50%; background: #9CA3AF; animation: tr-pt 1s infinite ease-in-out; }
.tr-pensando i:nth-child(2) { animation-delay: .15s; } .tr-pensando i:nth-child(3) { animation-delay: .3s; }
@keyframes tr-pt { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tr-chips .chip { height: auto; min-height: 30px; padding: 5px 11px; text-align: left; }
.tr-sug { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.tr-chat-in { display: flex; gap: 8px; margin-top: 8px; }
.tr-chat-in input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); font: inherit; font-size: 14.5px; background: var(--card); color: var(--ink); }
.tr-chat-in input:focus { outline: none; border-color: var(--brand); }
.tr-chat-in .btn { width: 46px; padding: 0; justify-content: center; }
.tr-ul { margin: 4px 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.tr-ul li.is-rojo { color: #B91C1C; } .tr-ul li.is-ambar { color: #B45309; }
.tr-mini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 10px 0; }
.tr-mini-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.tr-mini-kpis span { font-size: 11.5px; color: var(--mute); }
.tr-mini-kpis b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.tr-cmp > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.tr-cmp b { font-size: 13.5px; }
.tr-ok { display: flex; gap: 7px; align-items: flex-start; color: #15803D; font-size: 13px; font-weight: 550; margin: 8px 0; }
.tr-ok .ic { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }

/* Imprevistos */
.tr-inc { margin: 6px 0; }
.tr-inc-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #FEF2F2; color: #991B1B; margin-bottom: 10px; }
.tr-inc-head .ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.tr-inc-head div { display: flex; flex-direction: column; font-size: 13px; }
.tr-alts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tr-alt { position: relative; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.tr-alt.is-mejor { border-color: #818CF8; box-shadow: 0 6px 18px -10px #6366F1; }
.tr-alt b { font-size: 13.5px; line-height: 1.35; }
.tr-alt p { margin: 0; font-size: 12.5px; color: var(--ink-2); flex: 1; }
.tr-alt .btn { align-self: flex-start; margin-top: 6px; }
.tr-reco { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 11px; font-weight: 700; color: #4338CA; background: #EEF2FF; padding: 2px 8px; border-radius: 99px; margin-bottom: 2px; }
.tr-reco .ic { width: 12px; height: 12px; }
.tr-alt-n { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--mute); }
.tr-alt-n span { display: inline-flex; align-items: center; gap: 4px; } .tr-alt-n .ic { width: 13px; height: 13px; }
.tr-wa { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #F0FDF4; border: 1px dashed #86EFAC; }
.tr-wa > span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; color: #15803D; }
.tr-wa > span .ic { width: 15px; height: 15px; }
.tr-wa p { margin: 6px 0 8px; font-size: 13px; color: var(--ink-2); font-style: italic; }

/* Etiquetas */
.tr-tag-r, .tr-tag-v, .tr-tag-f { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.tr-tag-r { background: #FEE2E2; color: #B91C1C; } .tr-tag-v { background: #DCFCE7; color: #15803D; } .tr-tag-f { background: #E0F2FE; color: #0369A1; }
.tr-tag-f .ic { width: 11px; height: 11px; }
.tr-estado { margin-left: auto; font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: #F3F4F6; color: var(--ink-2); white-space: nowrap; }
.tr-estado.is-enruta, .tr-estado.is-ruta { background: #DBEAFE; color: #1D4ED8; }
.tr-estado.is-programado, .tr-estado.is-prog { background: #F3F4F6; color: #4B5563; }
.tr-estado.is-inc, .tr-estado.is-taller { background: #FEE2E2; color: #B91C1C; }
.tr-estado.is-libre { background: #DCFCE7; color: #15803D; }
.tr-warn { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #FFFBEB; color: #92400E; font-size: 13.5px; margin-bottom: 12px; }
.tr-warn .ic, .tr-warn-s .ic { width: 16px; height: 16px; flex-shrink: 0; }
.tr-warn-s { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #B91C1C; margin: 8px 0 0; }

/* Envíos y planificador */
.tr-cta { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; background: linear-gradient(135deg, #EEF2FF, #FAF5FF); border-color: #E0E7FF; }
.tr-cta > .ic { width: 26px; height: 26px; color: #6366F1; flex-shrink: 0; }
.tr-cta div { flex: 1; display: flex; flex-direction: column; }
.tr-cta span { font-size: 13px; color: var(--ink-2); }
.tr-planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tr-plan { text-align: left; border: 1.5px solid var(--line-2); background: var(--card); border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.tr-plan:hover { border-color: #C3C8D0; }
.tr-plan.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tr-plan-t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.tr-plan-t .ic { width: 18px; height: 18px; color: var(--brand); }
.tr-plan-t em { margin-left: auto; font-style: normal; font-size: 11px; background: #DCFCE7; color: #15803D; padding: 2px 8px; border-radius: 99px; }
.tr-plan-s { font-size: 12.5px; color: var(--mute); }
.tr-plan-n { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.tr-plan-body { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.tr-mapa-card { position: sticky; top: 76px; }
.tr-mapa { width: 100%; height: auto; display: block; background: radial-gradient(circle at 40% 35%, #F1F5F9, #E8EDF3); border-radius: 12px; }
.tr-c { fill: #CBD5E1; } .tr-c-on { fill: #334155; }
.tr-lbl { font-size: 8.5px; fill: #475569; font-family: inherit; font-weight: 500; }
.tr-lbl-b { font-weight: 700; fill: var(--brand); }
.tr-base { fill: var(--brand); stroke: #fff; stroke-width: 1.5; }
.tr-truck circle { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.tr-truck text { font-size: 7px; font-weight: 700; text-anchor: middle; fill: var(--brand); }
.tr-rutas { display: flex; flex-direction: column; gap: 10px; }
.tr-ruta-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-ruta-h .muted { font-size: 12.5px; }
.tr-chofer { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.tr-chofer .ic { width: 14px; height: 14px; }
.tr-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.tr-paradas { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 10px 0; font-size: 13px; font-weight: 550; }
.tr-paradas .ic { width: 13px; height: 13px; color: var(--mute); }
.tr-paradas .is-base { color: var(--mute); font-weight: 500; }
.tr-carga { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.tr-bar { flex: 1; height: 7px; border-radius: 99px; background: #EEF0F3; overflow: hidden; min-width: 60px; }
.tr-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.tr-bar.is-ambar > span { background: #F59E0B; }
.tr-ruta-n { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.tr-plan-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.tr-plan-pie .muted { font-size: 13px; }

/* Viajes */
.tr-viajes { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.tr-viajes .legend { margin-top: 8px; font-size: 12px; color: var(--mute); }
.tr-vlist { display: flex; flex-direction: column; gap: 10px; }
.tr-vcard { text-align: left; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 6px; width: 100%; border: 1.5px solid var(--line); }
.tr-vcard.is-on { border-color: var(--brand); }
.tr-vcard.is-inc { box-shadow: inset 3px 0 0 #DC2626, var(--shadow); }
.tr-vcard-h { display: flex; align-items: center; gap: 8px; }
.tr-vcard-r { font-size: 13.5px; font-weight: 550; }
.tr-vcard-p { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.tr-vcard .muted { font-size: 12.5px; }
.tr-det { margin-bottom: 14px; }
.tr-det-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 10px; }
.tr-sub { display: block; font-size: 13px; margin: 12px 0 6px; }
.tr-det-g .tr-sub { margin-top: 0; }
.tr-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.tr-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #E5E7EB; }
.tr-timeline li { position: relative; padding: 0 0 14px 6px; display: flex; flex-direction: column; font-size: 13px; }
.tr-timeline li::before { content: ""; position: absolute; left: -18px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #CBD5E1; }
.tr-timeline li.is-ok::before { background: #16A34A; border-color: #16A34A; }
.tr-timeline b { font-size: 14px; }
.tr-eventos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; max-height: 220px; overflow-y: auto; }
.tr-eventos span { display: inline-block; min-width: 46px; color: var(--mute); font-variant-numeric: tabular-nums; }

/* Chofer en el celular */
.tr-chofer-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tr-chofer-card h2 { font-size: 28px; margin: 0; }
.tr-chofer-card p { margin: 0 0 6px; color: var(--ink-2); }
.tr-big { min-height: 56px; font-size: 16.5px; justify-content: center; width: 100%; }
.tr-big .ic { width: 20px; height: 20px; }
.tr-prob { display: grid; gap: 8px; margin-bottom: 14px; }
.tr-prob input { position: absolute; opacity: 0; pointer-events: none; }
.tr-prob span { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; }
.tr-prob span .ic { width: 18px; height: 18px; color: var(--mute); }
.tr-prob input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.tr-prob input:checked + span .ic { color: var(--brand); }

/* Flota */
.tr-flota { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tr-cam { display: flex; flex-direction: column; gap: 10px; }
.tr-cam-h { display: flex; align-items: center; gap: 10px; }
.tr-cam-h > div { display: flex; flex-direction: column; min-width: 0; }
.tr-cam-h > div span { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-cam-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.tr-cam-ic .ic { width: 21px; height: 21px; }
.tr-cam-d { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; color: var(--ink-2); }
.tr-cam-d span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.tr-cam-d .ic { width: 13px; height: 13px; flex-shrink: 0; }
.tr-serv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; font-size: 12.5px; }
.tr-serv .muted { grid-column: 1 / -1; font-size: 12px; }
.tr-vs { display: flex; flex-wrap: wrap; gap: 5px; }
.tr-v { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 7px; background: #F3F4F6; color: var(--ink-2); white-space: nowrap; }
.tr-v.is-ambar { background: #FEF3C7; color: #92400E; } .tr-v.is-rojo { background: #FEE2E2; color: #B91C1C; }
.tr-cam-a { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }

/* Cotizador */
.tr-cot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.tr-cot-r { display: flex; flex-direction: column; gap: 2px; }
.tr-precio { font-size: 34px; font-weight: 750; letter-spacing: -.02em; color: var(--brand); line-height: 1.15; }
.tr-desg { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.tr-desg > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tr-desg > div span { color: var(--ink-2); }
.tr-desg .is-tot { border-bottom: 0; font-weight: 650; }
.tr-desg .is-gan { border: 0; color: #15803D; }
.tr-cot-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tr-param .form-grid { margin-top: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1080px) {
  .tr-cop, .tr-plan-body, .tr-viajes, .tr-cot, .tr-det-g { grid-template-columns: 1fr; }
  .tr-mapa-card { position: static; max-width: 460px; }
  .tr-planes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tr-cmp { grid-template-columns: 1fr; }
  .tr-param .form-grid { grid-template-columns: 1fr; }
  .tr-cta { flex-direction: column; align-items: flex-start; }
  .tr-chat-log { max-height: 460px; }
}
.tr-plan-intro { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.tr-plan-intro .ic { width: 18px; height: 18px; color: #6366F1; flex-shrink: 0; margin-top: 2px; }
.tr-lbl-f { fill: #A3ADBB; font-weight: 400; font-size: 7.5px; }

/* Chofer: elegir camión, mapas de ida y vuelta */
.tr-elegir { display: flex; flex-direction: column; gap: 10px; }
.tr-elegir-c { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; width: 100%; border: 1.5px solid var(--line); }
.tr-elegir-c:hover { border-color: #C3C8D0; }
.tr-elegir-c.is-mio { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tr-elegir-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-elegir-t b { font-size: 17px; }
.tr-elegir-t > span { font-size: 13px; color: var(--ink-2); }
.tr-elegir-t .tr-elegir-r { font-weight: 600; color: var(--ink); }
.tr-elegir-t .muted { font-size: 12.5px; }
.tr-ch-mapas { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
.tr-ch-mapas.is-dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tr-ch-mapas .card { position: relative; }
.tr-ch-mapas .tr-sub { margin: 0 0 8px; }
.tr-ch-mapas .is-apagado .tr-mapa { opacity: .45; }
.tr-ch-mapas .is-bloq .tr-mapa { opacity: .3; filter: grayscale(1); }
.tr-ch-lock { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); margin: 0; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; text-align: center; width: max-content; max-width: 85%; }
.tr-ch-lock .ic { width: 15px; height: 15px; flex-shrink: 0; }
@media (max-width: 640px) { .tr-ch-mapas.is-dos { grid-template-columns: 1fr; } }
