/* =========================================================
   mejoras.css — Pulido visual de Gestión TecnoAires
   Mantiene el diseño original (colores, estructura, menús); solo mejora
   detalles: sombras, bordes, transiciones, tablas, formularios, modales,
   login, vista del técnico y animaciones de carga.
   Se carga DESPUÉS de styles.css.
   ========================================================= */

:root {
    --ta-radius: 14px;
    --ta-radius-sm: 10px;
    --ta-shadow-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .06);
    --ta-shadow-2: 0 6px 16px rgba(15, 23, 42, .08);
    --ta-shadow-3: 0 18px 40px rgba(15, 23, 42, .16);
    --ta-ease: cubic-bezier(.22, .61, .36, 1);
    --ta-ring: 0 0 0 .22rem rgba(29, 85, 151, .18);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; animation: taPageIn .28s var(--ta-ease) backwards; }
@keyframes taPageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Título de página ---------- */
.page-title h1 { letter-spacing: -.01em; }
.page-title h1 i { color: var(--brand-blue); opacity: .9; }

/* ---------- Tarjetas ---------- */
.card {
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: var(--ta-radius);
    box-shadow: var(--ta-shadow-1);
    transition: box-shadow .25s var(--ta-ease), transform .25s var(--ta-ease);
    overflow: hidden;
}
.card:hover { box-shadow: var(--ta-shadow-2); }
.card-header { font-weight: 700; letter-spacing: .01em; }

/* Estadísticas del dashboard */
.stat-card { border-radius: var(--ta-radius); transition: transform .25s var(--ta-ease), box-shadow .25s var(--ta-ease); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--ta-shadow-2); }
.stat-icon { transition: transform .3s var(--ta-ease); }
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

/* ---------- Botones ---------- */
.btn {
    border-radius: var(--ta-radius-sm);
    font-weight: 600;
    transition: transform .15s var(--ta-ease), box-shadow .2s var(--ta-ease), background-color .2s, border-color .2s, color .2s;
}
.btn:not(:disabled):not(.disabled):hover { transform: translateY(-1px); box-shadow: var(--ta-shadow-2); }
.btn:not(:disabled):not(.disabled):active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:focus-visible { outline: 0; box-shadow: var(--ta-ring); }
.btn:disabled, .btn.disabled { opacity: .65; }
.btn-sm { border-radius: 8px; }
.btn-close { transition: transform .2s var(--ta-ease); }
.btn-close:hover { transform: rotate(90deg); }

/* ---------- Formularios ---------- */
.form-label { font-weight: 600; color: var(--text-primary); font-size: .9rem; margin-bottom: .3rem; }
.form-control, .form-select {
    border-radius: var(--ta-radius-sm);
    border: 1.5px solid #dbe3ee;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-control:hover, .form-select:hover { border-color: #b8c7db; }
.form-control:focus, .form-select:focus { border-color: var(--brand-blue); box-shadow: var(--ta-ring); }
.form-control::placeholder { color: #a3b1c2; }
.input-group > .form-control, .input-group > .form-select { border-radius: var(--ta-radius-sm); }
.input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group-text { border: 1.5px solid #dbe3ee; background: #f1f5f9; }
.form-check-input:checked { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.form-check-input:focus { box-shadow: var(--ta-ring); }
.is-invalid, .form-control.is-invalid { animation: taShake .35s; }
@keyframes taShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Tablas ---------- */
.table-responsive { border-radius: var(--ta-radius); border: 1px solid rgba(15, 23, 42, .06); background: var(--card-bg); box-shadow: var(--ta-shadow-1); }
.table { margin-bottom: 0; }
.table > thead th, .table > thead.table-light th {
    background: #f1f5f9 !important; color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
    font-weight: 700; border-bottom: 2px solid #e2e8f0; white-space: nowrap;
}
.table > tbody > tr { transition: background-color .15s; }
.table-hover > tbody > tr:hover > * { background-color: rgba(29, 85, 151, .05); }
.table > :not(caption) > * > * { padding: .7rem .8rem; vertical-align: middle; border-bottom-color: #edf1f6; }
.table > tbody > tr:last-child > * { border-bottom: 0; }
.table .btn-sm { padding: .25rem .5rem; }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
/* aparición escalonada de filas */
.table > tbody > tr:not(.ta-sk-row) { animation: taRowIn .3s var(--ta-ease) both; }
.table > tbody > tr:nth-child(1) { animation-delay: .00s; } .table > tbody > tr:nth-child(2) { animation-delay: .02s; }
.table > tbody > tr:nth-child(3) { animation-delay: .04s; } .table > tbody > tr:nth-child(4) { animation-delay: .06s; }
.table > tbody > tr:nth-child(5) { animation-delay: .08s; } .table > tbody > tr:nth-child(n+6) { animation-delay: .10s; }
@keyframes taRowIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Insignias */
.badge { border-radius: 999px; font-weight: 600; letter-spacing: .01em; }

/* ---------- Modales ---------- */
.modal-content { border: 0; border-radius: 18px; box-shadow: var(--ta-shadow-3); overflow: hidden; }
.modal-header { border-bottom: 1px solid #edf1f6; padding: 1rem 1.25rem; }
.modal-title { font-weight: 700; }
.modal-footer { border-top: 1px solid #edf1f6; background: #fafcfe; gap: .5rem; }
.modal.fade .modal-dialog { transform: translateY(18px) scale(.97); transition: transform .28s var(--ta-ease), opacity .2s; }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .5; backdrop-filter: blur(2px); }

/* ---------- Paginación / alertas / dropdowns ---------- */
.page-link { transition: background-color .15s, color .15s; }
.alert { border: 0; border-radius: var(--ta-radius-sm); box-shadow: var(--ta-shadow-1); }
.alert-info { background: #e8f1fb; color: #134074; }
.alert-warning { background: #fff6e0; color: #7a5200; }
.dropdown-menu { border: 0; border-radius: 12px; box-shadow: var(--ta-shadow-3); }
.dropdown-item { border-radius: 8px; transition: background-color .15s; }

/* ---------- Menú superior ---------- */
.navbar { box-shadow: 0 2px 14px rgba(10, 35, 66, .25); }
.navbar .nav-link { border-radius: 8px; position: relative; transition: background-color .2s, color .2s; }
.navbar .nav-link:hover { background: rgba(255, 255, 255, .12); }
@media (min-width: 992px) {
    .navbar .nav-link::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: #fff; transform: scaleX(0); transition: transform .25s var(--ta-ease); }
    .navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
}
.logo-navbar { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25)); }

/* ---------- Login ---------- */
.login-page .container { border-radius: 22px; animation: taLoginIn .55s var(--ta-ease) both; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.login-page .container img { animation: taLogoIn .7s .1s var(--ta-ease) both; }
.login-page .form-group { animation: taPageIn .5s var(--ta-ease) both; }
.login-page .form-group:nth-of-type(1) { animation-delay: .15s; } .login-page .form-group:nth-of-type(2) { animation-delay: .22s; }
.login-page input[type=input], .login-page input[type=password], .login-page input[type=text] { border-radius: var(--ta-radius-sm); transition: border-color .2s, box-shadow .2s; }
.login-page .btn-login { border-radius: 12px; letter-spacing: .06em; transition: transform .15s var(--ta-ease), box-shadow .25s; position: relative; overflow: hidden; }
.login-page .btn-login:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(29, 85, 151, .35); }
.login-page .btn-login::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); }
.login-page .btn-login:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .7s; }
@keyframes taLoginIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes taLogoIn { from { opacity: 0; transform: scale(.7) translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Vista del técnico (tablet): botones y campos más grandes y táctiles ---------- */
body:has(#formRegistroTerreno) .btn { min-height: 46px; font-size: 1rem; }
body:has(#formRegistroTerreno) .form-control, body:has(#formRegistroTerreno) .form-select { min-height: 48px; font-size: 1rem; }
body:has(#formRegistroTerreno) .card { border-radius: 18px; }
body:has(#formRegistroTerreno) #rtPasosBarra, body:has(#formRegistroTerreno) .progress { border-radius: 999px; overflow: hidden; }
body:has(#formRegistroTerreno) .progress-bar { transition: width .4s var(--ta-ease); }
body:has(#formRegistroTerreno) [id^="rtPaso"], body:has(#formRegistroTerreno) .rt-paso { animation: taStepIn .3s var(--ta-ease) both; }
@keyframes taStepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* ---------- Scroll y selección ---------- */
::selection { background: rgba(29, 85, 151, .22); }

/* =========================================================
   ANIMACIONES DE CARGA
   ========================================================= */

/* Barra fina superior */
#ta-topbar {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 20001; pointer-events: none;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
    box-shadow: 0 0 8px rgba(98, 177, 69, .6);
    transition: width .2s ease-out, opacity .25s;
}

/* Botón con spinner */
.ta-btn-cargando { position: relative; pointer-events: none; }
.ta-btn-cargando .ta-btn-txt { opacity: .85; }
.ta-btn-spin {
    display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -.15em;
    border: .16em solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: taSpin .65s linear infinite;
}
@keyframes taSpin { to { transform: rotate(360deg); } }
.ta-btn-cargando .ta-btn-txt .fa-spinner { display: none; }

/* Skeleton */
.ta-sk-bar {
    display: block; height: 14px; border-radius: 7px;
    background: linear-gradient(90deg, #e9eef5 25%, #f6f8fb 37%, #e9eef5 63%); background-size: 400% 100%;
    animation: taShimmer 1.3s ease infinite;
}
.ta-sk-row td { padding-top: .95rem !important; padding-bottom: .95rem !important; }
@keyframes taShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ta-tabla-cargando { position: relative; }
.ta-tabla-cargando tbody { opacity: .45; transition: opacity .15s; pointer-events: none; }
.ta-tabla-cargando::after {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-blue), transparent); background-size: 50% 100%; background-repeat: no-repeat;
    animation: taSlide 1s linear infinite;
}
@keyframes taSlide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* Tarjeta de guardado (estilo BRautos con colores TecnoAires) */
#ta-loading-overlay {
    position: fixed; inset: 0; z-index: 20000; display: none; align-items: center; justify-content: center;
    background: rgba(10, 35, 66, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 16px;
}
#ta-loading-overlay.ta-show { display: flex; animation: taFade .2s ease both; }
@keyframes taFade { from { opacity: 0; } to { opacity: 1; } }
html.ta-bloqueado { overflow: hidden; }

.ta-loading-card {
    position: relative; width: 100%; max-width: 360px; background: #fff; border-radius: 22px; padding: 30px 28px 26px;
    text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: taPop .35s var(--ta-ease) both;
}
@keyframes taPop { from { opacity: 0; transform: scale(.88) translateY(10px); } to { opacity: 1; transform: none; } }

.ta-spinner { position: relative; width: 92px; height: 92px; margin: 0 auto 18px; }
.ta-ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; }
.ta-ring:nth-child(1) { border-top-color: var(--brand-blue); animation: taSpin 1.1s linear infinite; }
.ta-ring:nth-child(2) { inset: 9px; border-right-color: var(--brand-green); animation: taSpin 1.5s linear infinite reverse; }
.ta-ring:nth-child(3) { inset: 18px; border-bottom-color: #4f8fd6; animation: taSpin 1.9s linear infinite; }
.ta-ring:nth-child(4) { inset: 27px; border-left-color: #9bd286; animation: taSpin 2.3s linear infinite reverse; }
.ta-spinner-center {
    position: absolute; inset: 31px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; animation: taPulse 1.6s ease-in-out infinite;
}
@keyframes taPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.ta-loading-title { font-size: 1.2rem; font-weight: 800; color: var(--brand-blue-dark); margin-bottom: 4px; }
.ta-loading-sub { font-size: .9rem; color: var(--text-secondary); margin-bottom: 16px; }
.ta-dots span { animation: taDot 1.2s infinite; opacity: .2; }
.ta-dots span:nth-child(2) { animation-delay: .2s; } .ta-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes taDot { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.ta-progress { height: 8px; background: #e8eef6; border-radius: 999px; overflow: hidden; }
.ta-progress-fill {
    height: 100%; width: 0; border-radius: 999px; transition: width .25s ease-out;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-green)); background-size: 200% 100%; animation: taBarMove 1.6s linear infinite;
}
@keyframes taBarMove { to { background-position: -200% 0; } }
.ta-progress-text { font-size: .78rem; color: var(--text-light); margin-top: 8px; font-weight: 600; letter-spacing: .02em; }

/* Éxito: el spinner se reemplaza por un check verde */
.ta-loading-ok {
    position: absolute; left: 50%; top: 30px; width: 92px; height: 92px; margin-left: -46px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-green), #3f9a28); color: #fff; display: none; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(98, 177, 69, .45);
}
.ta-loading-ok svg { width: 44px; height: 44px; }
.ta-loading-ok svg path { stroke-dasharray: 30; stroke-dashoffset: 30; }
#ta-loading-overlay.ta-ok .ta-spinner { visibility: hidden; }
#ta-loading-overlay.ta-ok .ta-loading-ok { display: flex; animation: taSuccessPop .4s var(--ta-ease) both; }
#ta-loading-overlay.ta-ok .ta-loading-ok svg path { animation: taDraw .45s .15s ease-out forwards; }
#ta-loading-overlay.ta-ok .ta-progress-fill { animation: none; background: var(--brand-green); }
@keyframes taSuccessPop { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes taDraw { to { stroke-dashoffset: 0; } }

/* =========================================================
   Técnico: buscador de clientes y vehículos existentes
   ========================================================= */
.rt-resultados {
    position: absolute; left: 0; right: 0; top: calc(100% - 22px); z-index: 30; background: #fff; border: 1.5px solid #dbe3ee;
    border-radius: 12px; box-shadow: var(--ta-shadow-3); max-height: 320px; overflow-y: auto; margin-top: 26px; animation: taPageIn .18s var(--ta-ease) both;
}
#rtBuscadorWrap .rt-resultados { top: 100%; margin-top: 4px; }
.rt-res, .rt-veh {
    display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #edf1f6;
    padding: 12px 14px; min-height: 52px; transition: background-color .15s; cursor: pointer; color: var(--text-primary);
}
.rt-res:last-child { border-bottom: 0; }
.rt-res:hover, .rt-res:active { background: #eef4fb; }
.rt-res span, .rt-veh span { font-size: .85rem; color: var(--text-secondary); }
.rt-res-vacio { padding: 14px; color: var(--text-secondary); font-size: .9rem; }
.rt-veh { border: 1.5px solid #dbe3ee; border-radius: 12px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.rt-veh:hover, .rt-veh:active { border-color: var(--brand-blue); background: #eef4fb; }
.rt-veh-otro { justify-content: center; color: var(--brand-blue); font-weight: 700; border-style: dashed; }
.rt-elegido {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 14px;
    background: #f0f8ec; border: 1.5px solid #bfe0b1; border-radius: 12px; animation: taPageIn .2s var(--ta-ease) both;
}
.rt-aviso-nuevo { color: var(--text-secondary); background: #f1f5f9; border-radius: 10px; padding: 8px 12px; }
.form-control.rt-readonly, .form-control[readonly].rt-readonly { background: #f1f5f9; color: #475569; border-style: dashed; }


/* ===== Modo escáner (inventario) ===== */
.esc-modal .esc-input { border: 2px solid #1D5597; font-weight: 700; letter-spacing: .5px; }
.esc-modal .esc-input:focus { box-shadow: 0 0 0 .25rem rgba(29,85,151,.2); }
.esc-estado { border-radius: 10px; padding: 14px 16px; font-size: 1.05rem; border: 1px solid transparent; transition: background .2s; }
.esc-estado.esc-pop { animation: escPop .28s ease-out; }
@keyframes escPop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
.esc-espera { background: #eef3fa; color: #1D5597; border-color: #d4e1f2; }
.esc-ok { background: #e7f5e1; color: #2f6b1d; border-color: #bfe3b2; }
.esc-alerta { background: #fff4d6; color: #8a5a00; border-color: #f3d98b; }
.esc-error { background: #fde8e8; color: #a11d1d; border-color: #f5b5b5; }
.esc-lista { max-height: 260px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.esc-lista thead th { position: sticky; top: 0; background: #f8fafc; z-index: 1; font-size: .8rem; }
.esc-anulada td { text-decoration: line-through; opacity: .5; }

/* ===== Guías paso a paso (tour) ===== */
.ta-tour-ov { position: fixed; inset: 0; z-index: 3000; }
.ta-tour-block { position: absolute; inset: 0; }
.ta-tour-spot { position: absolute; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(10,35,66,.68); transition: top .35s ease, left .35s ease, width .35s ease, height .35s ease, opacity .2s; outline: 3px solid #62B145; animation: taPulse 1.6s ease-in-out infinite; }
.ta-sinfoco .ta-tour-block { background: rgba(10,35,66,.68); }
@keyframes taPulse { 0%,100% { outline-color: rgba(98,177,69,1); outline-offset: 0; } 50% { outline-color: rgba(98,177,69,.35); outline-offset: 5px; } }
.ta-tour-card { position: absolute; width: min(380px, calc(100vw - 24px)); background: #fff; border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.35); border-top: 5px solid #1D5597; transition: top .35s ease, left .35s ease; }
.ta-tour-card.ta-movil { width: auto; transform: none !important; max-height: 70vh; overflow-y: auto; }
.ta-pop { animation: taPop .3s ease-out; }
@keyframes taPop { 0% { opacity: 0; transform: translateY(8px) scale(.97); } 100% { opacity: 1; transform: none; } }
.ta-tour-card.ta-pop:not(.ta-movil) { animation-name: taFade; }
@keyframes taFade { 0% { opacity: .2; } 100% { opacity: 1; } }
.ta-tour-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ta-tour-ico { width: 38px; height: 38px; border-radius: 50%; background: #eaf1fb; color: #1D5597; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 1.05rem; }
.ta-tour-tit { font-weight: 800; color: #0a2342; font-size: 1.05rem; flex: 1; line-height: 1.25; }
.ta-tour-x { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: #94a3b8; padding: 0 4px; min-width: 36px; min-height: 36px; }
.ta-tour-txt { color: #334155; font-size: .95rem; line-height: 1.5; }
.ta-tour-ejbtn { margin-top: 10px; border: 1.5px dashed #62B145; background: #f6faf4; color: #3f7d2b; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .85rem; min-height: 38px; }
.ta-tour-ej { margin-top: 8px; }
.ta-ej-mock { background: #f1f5f9; border: 1px solid #dbe3ee; border-left: 4px solid #1D5597; border-radius: 8px; padding: 10px 12px; font-size: .88rem; color: #1e293b; line-height: 1.6; }
.ta-ej-tag { background: #1D5597; color: #fff; border-radius: 6px; padding: 1px 7px; font-size: .72rem; font-weight: 700; }
.ta-tour-dots { display: flex; gap: 5px; justify-content: center; margin: 12px 0 10px; }
.ta-tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; transition: all .25s; }
.ta-tour-dots i.done { background: #9bd18a; }
.ta-tour-dots i.on { background: #1D5597; width: 22px; border-radius: 6px; }
.ta-tour-btns { display: flex; align-items: center; gap: 8px; }
.ta-tour-grow { flex: 1; }
.ta-tour-skip { border: 0; background: transparent; color: #64748b; font-size: .85rem; text-decoration: underline; min-height: 40px; padding: 0 4px; }
.ta-tour-prev, .ta-tour-next { border-radius: 10px; font-weight: 700; padding: 8px 14px; min-height: 42px; border: 1.5px solid #1D5597; }
.ta-tour-prev { background: #fff; color: #1D5597; }
.ta-tour-next { background: #1D5597; color: #fff; }
.ta-tour-next:hover { background: #164578; }

.ta-inv { position: fixed; right: 16px; bottom: 16px; z-index: 2500; width: min(400px, calc(100vw - 32px)); background: #fff; border-radius: 16px; box-shadow: 0 14px 40px rgba(10,35,66,.35); border-left: 6px solid #62B145; display: flex; gap: 12px; padding: 14px 16px; }
.ta-inv-ico { width: 44px; height: 44px; border-radius: 50%; background: #eaf1fb; color: #1D5597; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: 0 0 auto; }
.ta-inv-body b { color: #0a2342; }
.ta-inv-body .small { color: #475569; margin: 2px 0 10px; }
.ta-inv-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ta-inv-btns button { border-radius: 9px; font-weight: 700; font-size: .85rem; padding: 7px 12px; min-height: 40px; border: 1.5px solid #cbd5e1; background: #fff; color: #475569; }
.ta-inv-btns .ta-inv-go { background: #62B145; border-color: #62B145; color: #fff; }
.ta-inv-btns .ta-inv-never { border-color: transparent; text-decoration: underline; color: #64748b; }

.ta-help-btn .ta-help-txt { margin-left: .35rem; }
@media (max-width: 575px) { .ta-help-btn .ta-help-txt { display: none; } }
.ta-menu { position: fixed; z-index: 2600; width: min(340px, calc(100vw - 16px)); background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(10,35,66,.3); padding: 8px; max-height: 75vh; overflow-y: auto; }
.ta-menu-tit { font-weight: 800; color: #0a2342; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; }
.ta-menu-it { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 10px; min-height: 52px; color: #1e293b; }
.ta-menu-it:hover { background: #eef3fa; }
.ta-menu-it > i:first-child { width: 22px; text-align: center; color: #1D5597; font-size: 1.1rem; }
.ta-menu-it > span { flex: 1; display: block; font-size: .9rem; line-height: 1.25; }
.ta-menu-it em { display: block; font-style: normal; font-size: .72rem; color: #3f7d2b; font-weight: 700; }
.ta-menu-it .ta-ok { color: #62B145; }
.ta-nueva { flex: 0 0 auto !important; flex-basis: auto; background: #fff4d6; color: #8a5a00; border-radius: 999px; padding: 2px 9px; font-size: .7rem !important; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .ta-tour-spot, .ta-tour-card, .ta-pop { animation: none !important; transition: none !important; } }
.ta-help-btn .ta-help-txt { font-size: .85rem; font-weight: 600; }
.esc-qty { max-width: 130px; margin: 0 auto; }
.esc-qty .form-control { padding: .25rem .1rem; }

/* ===== Historial por vehículo / cliente ===== */
.his-resumen { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.his-resumen > div { flex: 1 1 110px; background: #eef3fa; border-radius: 10px; padding: .55rem .75rem; text-align: center; }
.his-resumen b { display: block; color: #0a2342; font-size: 1.05rem; }
.his-resumen span { font-size: .75rem; color: #64748b; }
.his-linea { position: relative; padding-left: 34px; }
.his-linea::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 3px; background: #d4e1f2; border-radius: 2px; }
.his-item { position: relative; margin-bottom: .75rem; }
.his-punto { position: absolute; left: -34px; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: #1D5597; color: #fff; display: flex; align-items: center; justify-content: center; font-size: .72rem; box-shadow: 0 0 0 4px #fff; }
.his-checklist .his-punto { background: #62B145; }
.his-solicitud .his-punto { background: #f59e0b; }
.his-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: .65rem .85rem; }
.his-solicitud .his-card { border-style: dashed; background: #fffbf0; }
.sb-aviso:not(.d-none){display:flex !important}

/* Menús desplegables sobre fondo claro (ej. "Resumen PDF" en Inventario) */
.menu-claro { background: #fff; padding: .4rem; min-width: 14rem; }
.menu-claro .dropdown-item { color: #1e293b; padding: .55rem .9rem; }
.menu-claro .dropdown-item:hover, .menu-claro .dropdown-item:focus { background: #eef3fa; color: #1D5597; transform: none; }

/* ===== Ajustes móvil (Etapa 6) ===== */
html { height: auto; overflow-x: clip; }
body { height: auto; min-height: 100vh; min-height: 100dvh; overflow-x: clip; max-width: 100%; padding-bottom: env(safe-area-inset-bottom); }
.logo-navbar { flex-shrink: 0; }
.navbar-brand { min-width: 0; }
/* el menú lateral muestra siempre los textos */
.offcanvas .nav-link span { display: inline !important; }
.offcanvas .nav-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: 1.05rem; min-height: 52px; }
.offcanvas .nav-link i { width: 24px; text-align: center; }
.offcanvas { max-width: 86vw; }
@media (max-width: 639px) {
  .ta-tour-card.ta-movil { padding: 12px 14px 10px; }
  .ta-tour-card.ta-movil .ta-tour-txt { font-size: .9rem; line-height: 1.4; }
  .ta-tour-card.ta-movil .ta-tour-dots { margin: 8px 0 6px; }
  .ta-tour-card.ta-movil .ta-tour-ico { width: 32px; height: 32px; }
  .ta-tour-card.ta-movil .ta-tour-tit { font-size: .98rem; }
  .ta-inv { left: 10px; right: 10px; width: auto; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .ta-menu { max-height: 70dvh; }
}
/* el dropdown oculto no debe ensanchar la página; se ancla dentro de la pantalla */
.navbar .dropdown-menu { max-width: calc(100vw - 16px); }
@media (max-width: 639px) {
  .navbar .dropdown { position: static; }
  .navbar .dropdown-menu { position: absolute !important; left: 8px !important; right: 8px !important; top: 100% !important; transform: none !important; width: auto; margin-top: 4px; }
  .navbar { position: relative; }
}
.logo-navbar { filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
/* Guía estable: el recuadro y la tarjeta no se animan ni se mueven */
.ta-tour-ov { overscroll-behavior: contain; touch-action: none; }
.ta-tour-spot, .ta-tour-card { transition: none !important; }
.ta-tour-card { touch-action: pan-y; }
@media (max-width: 639px) {
  .ta-tour-card.ta-movil { position: absolute; bottom: auto; max-height: 46vh; }
}
