
/* Estilos personalizados para Sistema Rent a Car */

@font-face {
    font-family: 'Inter';
    src: url('../vendor/fonts/inter-latin.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

[v-cloak] { display: none !important; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Scrollbar moderno */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Transiciones suaves */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Tarjetas y sombras */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Badges de estado */
.badge-disponible {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.badge-alquilado {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.badge-mantenimiento {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.badge-activo {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}
.badge-finalizado {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.badge-cancelado {
    background-color: #ffe4e6;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

/* Estados de reserva */
.badge-reserva-pendiente { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-reserva-confirmada { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-reserva-convertida { background-color: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.badge-reserva-cancelada { background-color: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-reserva-no_show { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Estados del depósito de garantía */
.badge-deposito-retenido { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-deposito-devuelto { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-deposito-parcial { background-color: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.badge-deposito-aplicado { background-color: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-deposito-sin_deposito { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* Daños y multas: estado del caso, cobro al cliente, reparación y gravedad */
.badge-caso-abierto, .badge-caso-abierta { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-caso-cerrado, .badge-caso-cerrada { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-caso-anulado, .badge-caso-anulada { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-cobro-pendiente { background-color: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-cobro-parcial { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-cobro-cobrado { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-cobro-condonado { background-color: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.badge-cobro-no_aplica { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-reparacion-pendiente { background-color: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-reparacion-en_reparacion { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-reparacion-reparado { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-reparacion-no_requiere { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-severidad-leve { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-severidad-moderado { background-color: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-severidad-grave { background-color: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }

/* ==========================================================
   Calendario de disponibilidad (línea de tiempo por vehículo)
   ========================================================== */
.ad-cal { overflow-x: auto; }
.ad-cal-grid { min-width: calc(200px + var(--ad-cal-dias, 31) * 38px); }
.ad-cal-row { display: flex; border-bottom: 1px solid #f1f5f9; }
.ad-cal-row:last-child { border-bottom: 0; }
.ad-cal-row--head { background: #f8fafc; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 6; }
.ad-cal-veh {
    width: 200px; flex: none; position: sticky; left: 0; z-index: 5;
    background: #fff; border-right: 1px solid #e2e8f0;
    padding: 8px 12px 8px 20px; display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.ad-cal-row--head .ad-cal-veh { background: #f8fafc; }
.ad-cal-track {
    position: relative; flex: 1; display: grid;
    grid-template-columns: repeat(var(--ad-cal-dias, 31), minmax(38px, 1fr));
    min-height: 50px;
}
.ad-cal-day {
    text-align: center; padding: 6px 0; border-left: 1px solid #f1f5f9;
    font-size: 10px; line-height: 1.2; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em;
}
.ad-cal-day strong { display: block; font-size: 13px; color: #334155; font-weight: 700; }
.ad-cal-day--finde { background: #f8fafc; }
.ad-cal-day--hoy { background: #eff6ff; color: #2563eb; }
.ad-cal-day--hoy strong { color: #1d4ed8; }
.ad-cal-cell { border-left: 1px solid #f1f5f9; }
.ad-cal-cell--finde { background: #fafbfc; }
.ad-cal-cell--hoy { background: #eff6ff; }
.ad-cal-cell--click { cursor: pointer; }
.ad-cal-cell--click:hover { background: #dbeafe; }
.ad-cal-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 3; pointer-events: none; }
.ad-cal-bar {
    position: absolute; top: 9px; height: 32px; border-radius: 8px; padding: 0 8px;
    font-size: 11px; font-weight: 700; line-height: 32px; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border: 1px solid transparent; cursor: pointer; transition: filter .15s, box-shadow .15s;
}
.ad-cal-bar:hover { filter: brightness(.96); box-shadow: 0 2px 8px rgba(15, 23, 42, .18); z-index: 4 !important; }
.ad-cal-bar--renta { background: #2563eb; color: #fff; border-color: #1d4ed8; }
.ad-cal-bar--vencido { background: #e11d48; color: #fff; border-color: #be123c; }
.ad-cal-bar--finalizado { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.ad-cal-bar--reserva { background: #10b981; color: #fff; border-color: #059669; }
.ad-cal-bar--pendiente { background: #fef3c7; color: #92400e; border: 1px dashed #f59e0b; }
.ad-cal-bar--taller {
    color: #7c2d12; border-color: #fdba74;
    background: repeating-linear-gradient(135deg, #ffedd5 0 8px, #fed7aa 8px 16px);
}
.ad-cal-bar--taller-ok { opacity: .55; }
.ad-cal-legend-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid transparent; flex: none; }

/* Espacio reservado para sello físico sobre el papel */
.ad-physical-stamp-box {
    border: 1.5px dashed #94a3b8;
    border-radius: 10px;
    background: #f8fafc;
}

/* Estilos de Impresión para Contratos */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-contract, #printable-contract *,
    #printable-voucher, #printable-voucher *,
    #printable-receipt, #printable-receipt *,
    #printable-ticket-80mm, #printable-ticket-80mm * {
        visibility: visible;
    }
    #printable-contract,
    #printable-voucher,
    #printable-receipt {
        position: absolute !important;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20px;
        background: white;
    }
    #printable-ticket-80mm {
        position: absolute !important;
        left: 0;
        top: 0;
        width: 76mm !important;
        max-width: 76mm !important;
        margin: 0 !important;
        padding: 4mm !important;
        border: 0 !important;
        box-shadow: none !important;
        background: white !important;
    }
    .no-print {
        display: none !important;
    }
    /* Los paneles laterales deben neutralizarse para que el contrato se imprima completo */
    .ad-drawer-overlay,
    .ad-drawer-head,
    .ad-drawer-foot {
        display: none !important;
    }
    .ad-drawer-root,
    .ad-drawer-panel {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        inset: auto !important;
        box-shadow: none !important;
    }
    .ad-drawer-body {
        overflow: visible !important;
        padding: 0 !important;
    }
}

/* Personalización de SweetAlert2 */
.swal2-popup.swal2-toast {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    padding: 0.75rem 1rem !important;
}
.swal2-toast .swal2-title {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.swal2-toast .swal2-html-container {
    font-size: 0.75rem !important;
    color: #475569 !important;
    margin-top: 0.25rem !important;
}

/* Modal grande SweetAlert2 */
.swal2-popup:not(.swal2-toast) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    border-radius: 1.5rem !important;
    overflow: hidden !important; /* Enmarca la barra de carga dentro de las curvas */
}
.swal2-popup:not(.swal2-toast) .swal2-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-top: 1rem !important;
}
.swal2-popup:not(.swal2-toast) .swal2-html-container {
    font-size: 0.95rem !important;
    color: #64748b !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
}
.swal2-popup:not(.swal2-toast) .swal2-timer-progress-bar {
    background: #10b981 !important; /* Verde esmeralda fluido a juego con el check */
    height: 5px !important;
}

/* Los diálogos usan un velo limpio (sin desenfoque) para mantener la nitidez
   de la aplicación y que la apertura se perciba inmediata */
.swal2-container.swal2-center {
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* La alerta de bienvenida usa este mismo velo (igual que "eliminar vehículo"):
   sin desenfoque, para que la animación sea fluida */

/* Los toasts (notificaciones en la esquina) nunca deben tener fondo ni blur */
.swal2-container.swal2-top-end,
.swal2-container:has(.swal2-toast),
.swal2-container.swal2-top-right {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
/* ...y nunca deben bloquear los clics sobre el resto de la aplicación */
.swal2-container:has(.swal2-toast),
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-right {
    pointer-events: none !important;
}
.swal2-container:has(.swal2-toast) .swal2-toast {
    pointer-events: auto !important;
}

/* =====================================================
   SWEETALERT2 · MOVIMIENTO FLUIDO
   Mismo lenguaje de animación que los paneles laterales:
   entradas cortas, sin rebotes y respuesta inmediata
   ===================================================== */
.swal2-container.swal2-center{
  --swal2-show-animation: swal2-show .19s cubic-bezier(.16,1,.3,1);
  --swal2-hide-animation: swal2-hide .12s cubic-bezier(.4,0,1,1) forwards;
}

/* Se redefinen los keyframes con el MISMO nombre para no romper la
   detección de animationend con la que SweetAlert2 retira el popup */
@keyframes swal2-show{
  from{ transform:translate3d(0,-10px,0) scale(.96); opacity:0; }
  to{ transform:translate3d(0,0,0) scale(1); opacity:1; }
}
@keyframes swal2-hide{
  from{ transform:translate3d(0,0,0) scale(1); opacity:1; }
  to{ transform:translate3d(0,-6px,0) scale(.98); opacity:0; }
}

.swal2-popup{
  border-radius:18px !important;
  transition:none !important;
  will-change:transform, opacity;
  box-shadow:0 24px 60px -20px rgba(15,23,42,.45), 0 8px 20px -12px rgba(15,23,42,.25) !important;
}
.swal2-title{ margin-bottom:.35rem !important; }
.swal2-html-container{ margin-top:.15rem !important; }

/* =====================================================
   SWEETALERT2 · BOTONES CON ANIMACIÓN
   Mismo lenguaje visual que los botones del sistema
   ===================================================== */
.swal2-actions{
    gap:10px !important;
    margin-top:20px !important;
}
.swal2-confirm,
.swal2-cancel,
.swal2-styled{
    position:relative !important;
    overflow:hidden !important;
    isolation:isolate !important;
    height:42px !important;
    padding:0 22px !important;
    border-radius:12px !important;
    font-size:13.5px !important;
    font-weight:600 !important;
    line-height:1 !important;
    border:1px solid transparent !important;
    box-shadow:none !important;
    transition:
        transform .15s cubic-bezier(.2,.8,.3,1),
        box-shadow .15s ease,
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease !important;
}
.swal2-confirm::before,
.swal2-cancel::before{
    content:'';
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.4) 50%,transparent 80%);
    transform:translateX(-120%);
    transition:transform .32s ease;
}
.swal2-confirm:hover::before,
.swal2-cancel:hover::before{ transform:translateX(120%); }
.swal2-confirm:hover,
.swal2-cancel:hover{
    transform:translateY(-1px) !important;
}
.swal2-confirm:active,
.swal2-cancel:active{
    transform:translateY(0) scale(.98) !important;
    transition-duration:.06s !important;
}
.swal2-confirm:focus-visible,
.swal2-cancel:focus-visible{
    outline:2px solid rgba(37,99,235,.4) !important;
    outline-offset:2px !important;
}
.swal2-confirm--danger:focus-visible{
    outline:2px solid rgba(225,29,72,.4) !important;
}
.swal2-confirm{
    background:#2563EB !important;
    color:#fff !important;
    border-color:#2563EB !important;
    box-shadow:0 1px 2px rgba(37,99,235,.3) !important;
}
.swal2-confirm:hover{
    background:#1D4ED8 !important;
    border-color:#1D4ED8 !important;
    box-shadow:0 10px 20px -12px rgba(37,99,235,.85) !important;
}
.swal2-confirm--danger{
    background:#E11D48 !important;
    border-color:#E11D48 !important;
    box-shadow:0 1px 2px rgba(225,29,72,.3) !important;
}
.swal2-confirm--danger:hover{
    background:#BE123C !important;
    border-color:#BE123C !important;
    box-shadow:0 10px 20px -12px rgba(225,29,72,.85) !important;
}
.swal2-cancel{
    background:#fff !important;
    color:#475569 !important;
    border-color:#E2E8F0 !important;
}
.swal2-cancel:hover{
    background:#F8FAFC !important;
    color:#0F172A !important;
    border-color:#CBD5E1 !important;
    box-shadow:0 8px 16px -14px rgba(15,23,42,.5) !important;
}
/* Estado de carga del botón (SweetAlert2 lo activa con .swal2-loading) */
.swal2-confirm.swal2-loading{
    background:#1D4ED8 !important;
    color:transparent !important;
    cursor:progress !important;
}

/* =====================================================
   LOGIN AUTODRIVE (split 50/50 - Sin scroll y limpio)
   Todas las clases llevan prefijo "ad-" para no chocar.
   ===================================================== */
.ad-login{ 
  font-family:'Inter',system-ui,sans-serif; 
}

/* ---------- Panel derecho animado ---------- */
.ad-stage{
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(37,99,235,.55), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(26,0,170,.55), transparent 60%),
    #0f1729;
}

.ad-grid{
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:linear-gradient(to bottom,#000 30%,transparent 85%);
          mask-image:linear-gradient(to bottom,#000 30%,transparent 85%);
}
.ad-orb{ position:absolute; border-radius:9999px; filter:blur(60px); opacity:.5; animation:ad-float 14s ease-in-out infinite; }
@keyframes ad-float{ 0%,100%{ transform:translate(0,0) } 50%{ transform:translate(30px,-40px) } }

/* Carrusel de funciones (solo CSS, 5 diapositivas x 5 s) */
.ad-slide{ position:absolute; inset:0; opacity:0; animation:ad-slide 25s infinite; }
@keyframes ad-slide{
  0%{ opacity:0; transform:translateY(14px) }
  3%,17%{ opacity:1; transform:none }
  20%{ opacity:0; transform:translateY(-14px) }
  100%{ opacity:0 }
}

/* Ciudad en movimiento (parallax) */
.ad-skyline{ display:flex; align-items:flex-end; width:200%; animation:ad-scroll 40s linear infinite; }
.ad-skyline.ad-far{ animation-duration:70s; opacity:.35; }
.ad-skyline > div{ display:flex; align-items:flex-end; width:50%; gap:6px; padding:0 3px; height:100%; }
.ad-bld{ flex:1; background:linear-gradient(to top,#1d2b52,#26396e); border-radius:3px 3px 0 0; position:relative; }
.ad-bld::after{ content:""; position:absolute; inset:10px 22% 10px; opacity:.5;
  background-image:radial-gradient(circle,#7aa2ff 1.2px,transparent 1.6px); background-size:10px 14px; }
@keyframes ad-scroll{ from{ transform:translateX(0) } to{ transform:translateX(-50%) } }

/* Carretera y auto */
.ad-road{ background:#090d18; border-top:1px solid rgba(255,255,255,.12); }
.ad-lane{ height:4px; width:100%;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.75) 0 34px,transparent 34px 80px);
  animation:ad-lane 1s linear infinite; }
@keyframes ad-lane{ to{ background-position:-80px 0 } }
.ad-car{ animation:ad-bounce .55s ease-in-out infinite; filter:drop-shadow(0 12px 18px rgba(37,99,235,.55)); }
@keyframes ad-bounce{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-3px) } }
.ad-speed span{ position:absolute; height:2px; border-radius:2px;
  background:linear-gradient(90deg,transparent,rgba(147,180,255,.9)); animation:ad-speed .9s linear infinite; }
@keyframes ad-speed{ from{ transform:translateX(40px); opacity:0 } 30%{ opacity:1 } to{ transform:translateX(-90px); opacity:0 } }

/* ---------- Formulario ---------- */
.ad-field{ transition:border-color .2s, box-shadow .2s; }
.ad-field:focus-within{ border-color:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,.15); }

/* =====================================================
   SIDEBAR · apertura suave tipo spring
   El cierre se mantiene rápido; solo la apertura es pausada.
   ===================================================== */
aside.ad-sidebar{
  width:5rem;
  transition:width 280ms cubic-bezier(.4,0,.2,1);
  will-change:width;
}
aside.ad-sidebar.ad-sidebar--open{
  width:16rem;
  transition:width 480ms cubic-bezier(.4,0,.2,1);
}

/* Encabezado (logo) */
.ad-sidebar .ad-brand-header{
  transition:padding 480ms cubic-bezier(.4,0,.2,1);
}

/* Texto de la marca: se revela deslizándose */
.ad-sidebar .ad-brand-text{
  max-width:150px;
  margin-left:.75rem;
  opacity:1;
  transform:translateX(0);
  transition:
    max-width 480ms cubic-bezier(.4,0,.2,1),
    margin-left 480ms cubic-bezier(.4,0,.2,1),
    opacity 240ms ease 120ms,
    transform 400ms cubic-bezier(.4,0,.2,1) 60ms;
}
.ad-sidebar .ad-brand-text--hidden{
  max-width:0;
  margin-left:0;
  opacity:0;
  transform:translateX(-8px);
  transition:
    max-width 200ms ease,
    margin-left 200ms ease,
    opacity 120ms ease,
    transform 180ms ease;
}

/* Etiquetas del menú: wipe + fade con pequeño retardo al abrir */
.ad-sidebar .ad-nav-label{
  max-width:200px;
  margin-left:.75rem;
  opacity:1;
  transform:translateX(0);
  white-space:nowrap;
  transition:
    max-width 480ms cubic-bezier(.4,0,.2,1),
    margin-left 480ms cubic-bezier(.4,0,.2,1),
    opacity 240ms ease 120ms,
    transform 400ms cubic-bezier(.4,0,.2,1) 60ms;
}
.ad-sidebar .ad-nav-label--hidden{
  max-width:0;
  margin-left:0;
  opacity:0;
  transform:translateX(-8px);
  transition:
    max-width 200ms ease,
    margin-left 200ms ease,
    opacity 120ms ease,
    transform 180ms ease;
}

/* Nombre del perfil */
.ad-sidebar .ad-profile-text{
  max-width:150px;
  opacity:1;
  transform:translateX(0);
  transition:
    max-width 480ms cubic-bezier(.4,0,.2,1),
    opacity 240ms ease 120ms,
    transform 400ms cubic-bezier(.4,0,.2,1) 60ms;
}
.ad-sidebar .ad-profile-text--hidden{
  max-width:0;
  opacity:0;
  transform:translateX(-8px);
  transition:
    max-width 200ms ease,
    opacity 120ms ease,
    transform 180ms ease;
}

/* Botones y chevrons que aparecen/desaparecen */
.ad-sidebar-fade-enter-active{ transition:opacity .3s ease .22s; }
.ad-sidebar-fade-leave-active{ transition:opacity .14s ease; }
.ad-sidebar-fade-enter-from,
.ad-sidebar-fade-leave-to{ opacity:0; }

/* Grupos y separadores del sidebar */
.ad-sidebar-nav{
  scrollbar-width:thin;
  scrollbar-color:rgba(148,163,184,.25) transparent;
}
.ad-sidebar-nav::-webkit-scrollbar{ width:5px; }
.ad-sidebar-nav::-webkit-scrollbar-track{ background:transparent; }
.ad-sidebar-nav::-webkit-scrollbar-thumb{ background:rgba(148,163,184,.22); border-radius:999px; }
.ad-sidebar-nav::-webkit-scrollbar-thumb:hover{ background:rgba(148,163,184,.4); }
.ad-nav-group{ display:flex; flex-direction:column; gap:4px; }
.ad-nav-group + .ad-nav-group{
  margin-top:10px;
  padding-top:12px;
  border-top:1px solid rgba(51,65,85,.55);
}
.ad-nav-group-label{
  padding:0 12px 4px;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#64748B;
  white-space:nowrap;
  overflow:hidden;
  max-height:24px;
  opacity:1;
  transition:max-height 240ms ease, padding 240ms ease, opacity 200ms ease 80ms;
}
.ad-nav-group-label--hidden{
  max-height:0;
  padding-top:0;
  padding-bottom:0;
  opacity:0;
  transition:max-height 180ms ease, padding 180ms ease, opacity 100ms ease;
}

/* =====================================================
   LOGIN · animación del ojo (mostrar/ocultar contraseña)
   ===================================================== */
.ad-eye-btn{
  transition:color .2s ease, background-color .2s ease, transform .15s ease;
}
.ad-eye-btn:hover{ background-color:rgba(37,99,235,.08); }
.ad-eye-btn:active{ transform:scale(.88); }
.ad-eye-btn i{ display:block; }

.eye-swap-enter-active,
.eye-swap-leave-active{
  transition:opacity .16s ease, transform .16s ease;
}
.eye-swap-enter-from{
  opacity:0;
  transform:scale(.55) rotate(-30deg);
}
.eye-swap-leave-to{
  opacity:0;
  transform:scale(.55) rotate(30deg);
}

/* =====================================================
   DASHBOARD · PALETA Y UTILIDADES
   Primario #2563EB · Oscuro #0F172A · Semánticos sparingly
   ===================================================== */
.ad-quickbar{
  background:#fff;
  border:1px solid #E2E8F0;
  border-radius:14px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  padding:7px 10px;
}
.ad-quick-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:32px;
  padding:0 12px;
  border-radius:9px;
  border:1px solid #E2E8F0;
  background:#fff;
  color:#475569;
  font-size:12px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  isolation:isolate;
  transition:
    transform .22s cubic-bezier(.34,1.4,.64,1),
    background-color .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .22s ease;
}
.ad-quick-btn::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(110deg,transparent 18%,rgba(255,255,255,.4) 50%,transparent 82%);
  transform:translateX(-120%);
  transition:transform .65s ease;
}
.ad-quick-btn:hover::before{ transform:translateX(120%); }
.ad-quick-btn i{ font-size:11px; color:#94A3B8; transition:color .18s ease, transform .22s cubic-bezier(.34,1.4,.64,1); }
.ad-quick-btn:hover{
  background:#F8FAFC;
  border-color:#CBD5E1;
  color:#0F172A;
  transform:translateY(-2px);
  box-shadow:0 8px 16px -12px rgba(15,23,42,.5);
}
.ad-quick-btn:hover i{ color:#2563EB; transform:scale(1.1); }
.ad-quick-btn:active{ transform:translateY(0) scale(.97); transition-duration:.08s; }
.ad-quick-btn:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }
.ad-quick-btn--primary{
  background:#2563EB;
  border-color:#2563EB;
  color:#fff;
  box-shadow:0 1px 2px rgba(37,99,235,.28);
}
.ad-quick-btn--primary i{ color:#fff; }
.ad-quick-btn--primary:hover{
  background:#1D4ED8;
  border-color:#1D4ED8;
  color:#fff;
  box-shadow:0 12px 22px -12px rgba(37,99,235,.85);
}
.ad-quick-btn--primary:hover i{ color:#fff; }

/* Franja KPI unificada */
.ad-kpi-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  background:#fff;
  border:1px solid #E2E8F0;
  border-radius:16px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  overflow:hidden;
}
.ad-kpi{
  padding:12px 16px;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  border-top:1px solid #F1F5F9;
  border-left:1px solid #F1F5F9;
}
.ad-kpi:nth-child(odd){ border-left:none; }
.ad-kpi:nth-child(-n+2){ border-top:none; }
.ad-kpi-label{
  font-size:10px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:#94A3B8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ad-kpi-foot{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  flex-wrap:wrap;
}
.ad-kpi-value{
  font-size:22px;
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.15;
  color:#0F172A;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ad-kpi-delta{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:11px;
  font-weight:700;
  padding:2px 7px;
  border-radius:999px;
  white-space:nowrap;
}
.ad-kpi-delta i{ font-size:9px; }
.ad-kpi-delta.is-up{ background:#ECFDF5; color:#047857; }
.ad-kpi-delta.is-down{ background:#FEF2F2; color:#B91C1C; }
.ad-kpi-delta.is-flat{ background:#F1F5F9; color:#475569; }
.ad-kpi-hint{
  font-size:11px;
  color:#64748B;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (min-width:1024px){
  .ad-kpi-strip{ grid-template-columns:repeat(4,minmax(0,1fr)); }
  .ad-kpi{ padding:12px 14px; }
  .ad-kpi:nth-child(odd){ border-left:1px solid #F1F5F9; }
  .ad-kpi:nth-child(2){ border-left:1px solid #F1F5F9; }
  .ad-kpi:first-child{ border-left:none; }
  .ad-kpi:nth-child(n+3){ border-top:none; }
  .ad-kpi-value{ font-size:24px; }
}
@media (min-width:1440px){
  .ad-kpi{ padding:14px 18px; }
  .ad-kpi-value{ font-size:26px; }
}

/* Acciones rápidas: se compactan para no romper la fila en anchos medios */
@media (max-width:1279px){
  .ad-quick-btn{ padding:0 11px; font-size:11.5px; }
}

/* Bloqueo de scroll del fondo cuando hay un panel lateral abierto */
body.ad-lock-scroll{ overflow:hidden; }

/* =====================================================
   NOTIFICACIONES (SWEETALERT2)
   La barra de progreso se ancla al borde derecho para que
   se consuma hacia la derecha (y no hacia la izquierda)
   ===================================================== */
.swal2-timer-progress-bar{
  margin-left:auto !important;
  margin-right:0 !important;
  transform-origin:right center !important;
}
.swal2-toast .swal2-timer-progress-bar{
  background:rgba(37,99,235,.85) !important;
}

/* =====================================================
   ALERTA DE BIENVENIDA · ANIMACIÓN LIGERA
   Solo transform/opacity (se ejecutan en la GPU), sin
   animar width/top/left que obligan a recalcular layout.
   ===================================================== */
.ad-welcome-popup .swal2-icon{
  animation:ad-icon-pop .42s cubic-bezier(.16,1,.3,1) .05s both;
  will-change:transform, opacity;
}
@keyframes ad-icon-pop{
  from{ transform:scale(.55); opacity:0; }
  to{ transform:scale(1); opacity:1; }
}
/* Barra de progreso: se consume con scaleX (compositor) en vez de width */
.ad-welcome-popup .swal2-timer-progress-bar{
  width:100% !important;
  transition:none !important;
  transform-origin:right center !important;
  will-change:transform;
  animation:ad-welcome-bar 1.6s linear forwards;
}
@keyframes ad-welcome-bar{
  from{ transform:scaleX(1); }
  to{ transform:scaleX(0); }
}

/* =====================================================
   SISTEMA DE BOTONES · ANIMACIONES Y MICRO-INTERACCIÓN
   ===================================================== */
.ad-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:40px;
  padding:0 18px;
  border-radius:12px;
  border:1px solid transparent;
  font-size:13.5px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  overflow:hidden;
  isolation:isolate;
  user-select:none;
  transition:
    transform .22s cubic-bezier(.34,1.4,.64,1),
    box-shadow .22s ease,
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease;
}
/* Barrido de luz que recorre el botón al entrar */
.ad-btn::before{
  content:'';
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(110deg,transparent 18%,rgba(255,255,255,.38) 50%,transparent 82%);
  transform:translateX(-120%);
  transition:transform .65s ease;
}
.ad-btn:hover::before{ transform:translateX(120%); }
.ad-btn:hover{ transform:translateY(-2px); }
.ad-btn:active{ transform:translateY(0) scale(.97); transition-duration:.08s; }
.ad-btn:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }
.ad-btn:disabled,
.ad-btn[disabled]{ opacity:.5; pointer-events:none; }
.ad-btn i{ transition:transform .22s cubic-bezier(.34,1.4,.64,1); }
.ad-btn:hover i.fa-arrow-right,
.ad-btn:hover i.fa-arrow-right-long{ transform:translateX(3px); }
.ad-btn:hover i.fa-check{ transform:scale(1.12); }
.ad-btn:hover i.fa-plus{ transform:rotate(90deg); }

/* Primario · acción principal */
.ad-btn--primary{
  background:#2563EB;
  color:#fff;
  box-shadow:0 1px 2px rgba(37,99,235,.3);
}
.ad-btn--primary:hover{
  background:#1D4ED8;
  box-shadow:0 12px 24px -12px rgba(37,99,235,.85);
}
/* Login · variante con degradado */
.ad-btn--login{
  background:linear-gradient(90deg,#2563EB,#4F46E5);
  box-shadow:0 10px 24px -14px rgba(37,99,235,.9);
}
.ad-btn--login:hover{
  background:linear-gradient(90deg,#1D4ED8,#4338CA);
  box-shadow:0 16px 30px -14px rgba(37,99,235,1);
}

/* Éxito · confirmar */
.ad-btn--success{
  background:#059669;
  color:#fff;
  box-shadow:0 1px 2px rgba(5,150,105,.3);
}
.ad-btn--success:hover{
  background:#047857;
  box-shadow:0 12px 24px -12px rgba(5,150,105,.8);
}

/* Peligro · eliminar */
.ad-btn--danger{
  background:#E11D48;
  color:#fff;
  box-shadow:0 1px 2px rgba(225,29,72,.3);
}
.ad-btn--danger:hover{
  background:#BE123C;
  box-shadow:0 12px 24px -12px rgba(225,29,72,.8);
}

/* Secundario · contorno neutro */
.ad-btn--secondary{
  background:#fff;
  border-color:#E2E8F0;
  color:#475569;
}
.ad-btn--secondary:hover{
  background:#F8FAFC;
  border-color:#CBD5E1;
  color:#0F172A;
  box-shadow:0 8px 18px -14px rgba(15,23,42,.55);
}

/* Fantasma · acción terciaria */
.ad-btn--ghost{
  background:transparent;
  color:#64748B;
}
.ad-btn--ghost:hover{
  background:#F1F5F9;
  color:#0F172A;
}

/* Chip con acción (ver todos, ver contrato) */
.ad-chip-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 11px;
  border-radius:999px;
  border:1px solid #DBEAFE;
  background:#EFF6FF;
  color:#1D4ED8;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:
    transform .2s cubic-bezier(.34,1.4,.64,1),
    background-color .2s ease,
    box-shadow .2s ease;
}
.ad-chip-link:hover{
  transform:translateY(-1px);
  background:#DBEAFE;
  box-shadow:0 8px 16px -12px rgba(37,99,235,.9);
}
.ad-chip-link:active{ transform:translateY(0) scale(.97); transition-duration:.08s; }
.ad-chip-link:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }

/* Enlaces con flecha que avanza al pasar el mouse */
.ad-link-arrow{ transition:color .18s ease; }
.ad-link-arrow i{ transition:transform .2s cubic-bezier(.34,1.4,.64,1); }
.ad-link-arrow:hover i{ transform:translateX(3px); }

/* Botón de icono en tablas */
.ad-icon-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:10px;
  font-size:14px;
  color:#64748B;
  background:transparent;
  border:1px solid transparent;
  cursor:pointer;
  transition:
    transform .2s cubic-bezier(.34,1.4,.64,1),
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    box-shadow .2s ease;
}
.ad-icon-btn:hover{
  transform:translateY(-2px) scale(1.05);
  background:#EFF6FF;
  border-color:#DBEAFE;
  color:#2563EB;
  box-shadow:0 8px 16px -10px rgba(37,99,235,.7);
}
.ad-icon-btn:active{ transform:translateY(0) scale(.96); }
.ad-icon-btn:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }
.ad-icon-btn--danger:hover{
  background:#FEF2F2;
  border-color:#FECDD3;
  color:#E11D48;
  box-shadow:0 8px 16px -10px rgba(225,29,72,.7);
}

/* =====================================================
   PANELES LATERALES DESLIZANTES (DRAWERS)
   Sustituyen a los popups centrados con fondo desenfocado
   ===================================================== */
.ad-drawer-enter-active,
.ad-drawer-leave-active{ transition:opacity .24s ease; }
.ad-drawer-enter-active .ad-drawer-panel,
.ad-drawer-leave-active .ad-drawer-panel{ transition:transform .32s cubic-bezier(.4,0,.2,1); }
.ad-drawer-enter-from,
.ad-drawer-leave-to{ opacity:0; }
.ad-drawer-enter-from .ad-drawer-panel,
.ad-drawer-leave-to .ad-drawer-panel{ transform:translateX(100%); }

.ad-drawer-panel{
  display:flex;
  flex-direction:column;
  width:100%;
  max-width:640px;
  background:#fff;
  box-shadow:-20px 0 48px -24px rgba(15,23,42,.45);
}
.ad-drawer-panel--wide{ max-width:760px; }
.ad-drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 24px;
  border-bottom:1px solid #f1f5f9;
  background:#fff;
  flex-shrink:0;
}
.ad-drawer-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:22px 24px;
}
.ad-drawer-foot{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:16px 24px;
  border-top:1px solid #f1f5f9;
  background:#f8fafc;
  flex-shrink:0;
}
.ad-drawer-close{
  color:#94a3b8;
  transition:color .18s ease, background-color .18s ease;
  border-radius:10px;
  padding:6px;
  flex-shrink:0;
}
.ad-drawer-close:hover{ color:#0f172a; background:#f1f5f9; }

@media (max-width:640px){
  .ad-drawer-panel,
  .ad-drawer-panel--wide{ max-width:100%; }
  .ad-drawer-head,
  .ad-drawer-body,
  .ad-drawer-foot{ padding-left:16px; padding-right:16px; }
}

/* =====================================================
   FORMULARIO DE VEHÍCULO · SECCIONES Y CAMPOS
   ===================================================== */
.ad-form-seccion{
  background:#fff;
  border:1px solid #E2E8F0;
  border-radius:16px;
  padding:18px;
}
.ad-form-seccion-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:14px;
  margin-bottom:16px;
  border-bottom:1px solid #F1F5F9;
}
.ad-form-seccion-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1rem;
  flex-shrink:0;
}
.ad-form-seccion-title{
  font-size:15px;
  font-weight:700;
  color:#0F172A;
  line-height:1.25;
}
.ad-form-seccion-sub{
  font-size:12px;
  color:#94A3B8;
  line-height:1.35;
  margin-top:2px;
}
.ad-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:16px 18px;
}
.ad-form-grid > .col-span-2{ grid-column:span 2; }
@media (max-width:520px){
  .ad-form-grid{ grid-template-columns:minmax(0,1fr); }
  .ad-form-grid > .col-span-2{ grid-column:span 1; }
}
.ad-form-label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  color:#475569;
  margin-bottom:6px;
  line-height:1.25;
}
.ad-form-input{
  box-sizing:border-box;
  width:100%;
  height:42px;
  padding:0 13px;
  border-radius:11px;
  border:1px solid #E2E8F0;
  background:#fff;
  font-size:14px;
  line-height:1.4;
  color:#0F172A;
  transition:border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
textarea.ad-form-input{
  height:auto;
  min-height:88px;
  padding:10px 13px;
}
select.ad-form-input{
  cursor:pointer;
  padding-right:10px;
}
.ad-form-placa-fija{
  box-sizing:border-box;
  height:42px;
  min-width:96px;
  padding:0 12px;
  border-radius:11px;
  border:1px solid #CBD5E1;
  background:#F8FAFC;
  color:#334155;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:14px;
  font-weight:700;
  user-select:none;
  cursor:not-allowed;
  flex-shrink:0;
}
.ad-form-doc-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.ad-form-doc-tipo{
  width:84px;
  flex-shrink:0;
  padding-left:10px;
  padding-right:6px;
  font-weight:600;
}
.ad-form-input:focus{
  outline:none;
  border-color:#2563EB;
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
}
.ad-form-input::placeholder{ color:#CBD5E1; }
.ad-form-input.ad-campo-error{
  border-color:#F87171;
  background:#FEF2F2;
}
.ad-form-input.ad-campo-error:focus{
  border-color:#E11D48;
  box-shadow:0 0 0 3px rgba(225,29,72,.14);
}
.ad-form-error{
  font-size:12px;
  color:#DC2626;
  margin-top:5px;
  display:flex;
  align-items:center;
  gap:5px;
}
.ad-form-error::before{
  content:'';
  width:5px;
  height:5px;
  border-radius:999px;
  background:#DC2626;
  flex-shrink:0;
}
.ad-form-hint{
  font-size:11.5px;
  color:#94A3B8;
  margin-top:5px;
  line-height:1.35;
}
.ad-form-preview-placa{
  margin-top:9px;
  font-size:12.5px;
  color:#64748B;
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#F1F5F9;
  border-radius:9px;
  padding:5px 11px;
}
.ad-form-preview-placa strong{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  color:#1D4ED8;
  letter-spacing:.04em;
}
.ad-form-preview{
  width:108px;
  height:92px;
  border-radius:12px;
  border:1px solid #E2E8F0;
  background:#F8FAFC;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.ad-form-upload{
  box-sizing:border-box;
  height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 13px;
  border-radius:11px;
  border:1px dashed #CBD5E1;
  background:#F8FAFC;
  color:#475569;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .18s ease, background-color .18s ease, color .18s ease;
}
.ad-form-upload:hover{
  border-color:#2563EB;
  background:#EFF6FF;
  color:#1D4ED8;
}
.ad-form-upload i{ font-size:12px; color:#94A3B8; }
.ad-form-upload:hover i{ color:#2563EB; }

/* =====================================================
   CATÁLOGO DE VEHÍCULOS · DETALLE (MODAL SOLO LECTURA)
   ===================================================== */
.veh-dato{
  background:#f8fafc;
  border:1px solid #f1f5f9;
  border-radius:12px;
  padding:9px 12px;
  min-width:0;
}
.veh-dato-label{
  display:block;
  font-size:10px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#94a3b8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.veh-dato-valor{
  display:block;
  margin-top:3px;
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.veh-panel{
  background:#f8fafc;
  border:1px solid #f1f5f9;
  border-radius:14px;
  padding:13px 15px;
}
.veh-panel-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:10px;
}

/* =====================================================
   CATÁLOGO DE VEHÍCULOS · LISTADO EN TABLA
   ===================================================== */
.cat-tabla{ min-width:690px; }
.cat-tabla thead th{ white-space:nowrap; }
.cat-tabla tbody td{ vertical-align:middle; }
/* Cabeceras interactivas de ordenamiento con animación */
.ad-sort-th{ transition:color .18s ease, background-color .18s ease; }
.ad-sort-th.is-sorted{ color:#1D4ED8; }
.ad-sort-label{ display:inline-flex; align-items:center; gap:6px; }
.ad-sort-pill{
  position:relative;
  width:20px;
  height:20px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#94A3B8;
  background:transparent;
  transition:background-color .22s ease, color .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
}
.ad-sort-th:hover .ad-sort-pill{
  background:#EFF6FF;
  color:#2563EB;
  transform:translateY(-1px) scale(1.06);
}
.ad-sort-pill.is-active{
  background:#DBEAFE;
  color:#1D4ED8;
  box-shadow:inset 0 0 0 1px rgba(37,99,235,.18), 0 1px 3px rgba(37,99,235,.12);
}
.ad-sort-th:active .ad-sort-pill{ transform:scale(.92); }
.ad-sort-svg{ width:13px; height:13px; overflow:visible; }
.ad-sort-dual{
  opacity:.72;
  transform-origin:center;
  transition:opacity .2s ease, transform .22s ease;
}
.ad-sort-th:hover .ad-sort-dual{ opacity:1; }
.ad-sort-pill.is-active .ad-sort-dual{ opacity:0; transform:scale(.55); }
.ad-sort-arrow{
  opacity:0;
  transform-origin:center;
  transform:scale(.6) rotate(0deg);
  transition:transform .34s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
.ad-sort-pill.is-active.is-asc .ad-sort-arrow{
  opacity:1;
  transform:scale(1) rotate(0deg);
}
.ad-sort-pill.is-active.is-desc .ad-sort-arrow{
  opacity:1;
  transform:scale(1) rotate(180deg);
}
/* Botón interactivo sobre miniatura de vehículo */
.ad-veh-thumb-btn{
  position:relative;
  width:42px;
  height:42px;
  border-radius:12px;
  overflow:hidden;
  background:#F1F5F9;
  border:1px solid #E2E8F0;
  flex-shrink:0;
  cursor:pointer;
  padding:0;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ad-veh-thumb-btn:hover{
  transform:scale(1.05);
  border-color:#93C5FD;
  box-shadow:0 4px 12px -4px rgba(37,99,235,.32);
}
.ad-veh-thumb-btn:active{ transform:scale(.97); }
.ad-veh-thumb-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,.38);
  color:#fff;
  opacity:0;
  transition:opacity .18s ease;
}
.ad-veh-thumb-btn:hover .ad-veh-thumb-overlay,
.ad-veh-thumb-btn:focus-visible .ad-veh-thumb-overlay{ opacity:1; }
.cat-tabla th,
.cat-tabla td{ padding-left:10px; padding-right:10px; }
.cat-tabla th:first-child,
.cat-tabla td:first-child{ padding-left:16px; }
.cat-tabla th:last-child,
.cat-tabla td:last-child{ padding-right:16px; }

/* La columna de acciones queda siempre visible al hacer scroll horizontal */
.cat-tabla th:last-child,
.cat-tabla td:last-child{
  position:sticky;
  right:0;
  z-index:5;
  background:#fff;
  box-shadow:-10px 0 14px -12px rgba(15,23,42,.35);
}
.cat-tabla thead th:last-child{ background:#f8fafc; z-index:6; }
.cat-tabla tbody tr:hover td:last-child{ background:#eff6ff; }

/* Revelado progresivo: se retiran columnas secundarias según el ancho */
@media (max-width:1399px){
  .cat-col-km{ display:none; }
}
@media (max-width:1199px){
  .cat-col-sec{ display:none; }
}
@media (max-width:1079px){
  .cat-col-cat{ display:none; }
  .cat-tabla th,
  .cat-tabla td{ padding-left:8px; padding-right:8px; }
  .cat-tabla th:first-child,
  .cat-tabla td:first-child{ padding-left:14px; }
  .cat-tabla th:last-child,
  .cat-tabla td:last-child{ padding-right:14px; }
}

/* =====================================================
   DASHBOARD · CARRUSEL ENCAPSULADO DE WIDGETS
   Autoplay 5 s · pausa al pasar el mouse · flechas y dots
   ===================================================== */
.ad-widget-carousel{
  overflow:hidden;
  isolation:isolate;
  container-type:inline-size;
}

/* Barra de progreso del autoplay */
.ad-widget-progress{
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:#f1f5f9;
  z-index:25;
}
.ad-widget-progress > span{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,#2563eb,#60a5fa);
  animation:adWidgetProgress 5000ms linear forwards;
}
.ad-widget-progress > span.is-paused{ animation-play-state:paused; }
@keyframes adWidgetProgress{
  from{ width:0; }
  to{ width:100%; }
}

/* Pista y slides */
.ad-widget-viewport{ overflow:hidden; }
.ad-widget-track{
  display:flex;
  height:100%;
  transition:transform 520ms cubic-bezier(.4,0,.2,1);
  will-change:transform;
}
.ad-widget-slide{
  min-width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  padding:16px 48px 8px;
  background:#fff;
}

/* Encabezado común de cada widget */
.ad-widget-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid #f1f5f9;
  flex-shrink:0;
}
.ad-widget-icon{
  width:34px;
  height:34px;
  border-radius:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.85rem;
  flex-shrink:0;
}
.ad-widget-title{
  font-size:14px;
  font-weight:700;
  color:#0f172a;
  line-height:1.25;
}
.ad-widget-subtitle{
  font-size:11px;
  color:#94a3b8;
  line-height:1.35;
  margin-top:1px;
}
.ad-widget-badge{
  font-size:10px;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
}
@container (min-width:520px){
  .ad-widget-title{ font-size:15px; }
  .ad-widget-subtitle{ font-size:11.5px; }
}

/* Cuerpo y gráficas */
.ad-widget-body{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding-top:10px;
}
.ad-widget-chart{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  width:100%;
}
.ad-widget-chart canvas{
  max-width:100%;
  max-height:100%;
}

/* Widget de flota: se adapta al ancho real del carrusel (container queries) */
.ad-fleet-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,180px) minmax(0,1fr);
  align-items:center;
  gap:16px;
}
.ad-fleet-visual{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.ad-fleet-layout .ad-widget-chart{
  width:100%;
  max-width:180px;
  max-height:180px;
  aspect-ratio:1;
  margin:0 auto;
}
.ad-fleet-legend{
  display:none;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}
.ad-fleet-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  font-weight:600;
  color:#64748b;
  white-space:nowrap;
}
.ad-fleet-legend i{
  width:8px;
  height:8px;
  border-radius:3px;
  display:inline-block;
}
.ad-fleet-side{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
}
.ad-fleet-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.ad-fleet-side .ad-mini-stat{ padding:5px 8px; }
.ad-fleet-progress{
  height:7px;
  border-radius:999px;
  background:#f1f5f9;
  overflow:hidden;
}
.ad-fleet-progress > span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#34d399,#10b981);
  transition:width .5s cubic-bezier(.4,0,.2,1);
}

/* Carrusel con más espacio vertical */
@container (min-width:560px){
  .ad-fleet-layout{
    grid-template-columns:minmax(0,220px) minmax(0,1fr);
  }
  .ad-fleet-layout .ad-widget-chart{
    max-width:220px;
    max-height:220px;
  }
}

/* Carrusel ancho (dashboard apilado) */
@container (min-width:700px){
  .ad-fleet-layout{
    grid-template-columns:minmax(0,240px) minmax(0,1fr);
    gap:20px;
  }
  .ad-fleet-layout .ad-widget-chart{
    max-width:240px;
    max-height:240px;
  }
  .ad-fleet-side{ gap:11px; }
  .ad-fleet-side .ad-mini-stat{ padding:6px 9px; }
}

/* Carrusel estrecho (mitad del dashboard en 1024–1279) */
@container (max-width:470px){
  .ad-fleet-layout{
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    align-content:center;
  }
  .ad-fleet-layout .ad-widget-chart{
    max-width:158px;
    max-height:158px;
  }
  .ad-fleet-legend{ display:flex; }
  .ad-fleet-occ,
  .ad-fleet-note{ display:none; }
  .ad-fleet-side{ display:block; }
  .ad-fleet-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ad-fleet-side .ad-mini-stat{ padding:6px 8px; }
  .ad-fleet-side .ad-mini-value{ font-size:14px; }
}

/* Panel de últimos alquileres */
.ad-recent-panel{ container-type:inline-size; }
.ad-recent-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #f1f5f9;
  transition:background-color .2s ease, border-color .2s ease;
}
.ad-recent-row:hover{
  background:#eff6ff;
  border-color:#dbeafe;
}
.ad-recent-dates{ display:none; }
@container (min-width:420px){
  .ad-recent-dates{ display:flex; }
}

/* Pie común */
.ad-widget-foot{
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:8px;
  margin-top:8px;
  border-top:1px solid #f1f5f9;
}

/* Mini tarjetas de métricas */
.ad-mini-stat{
  background:#f8fafc;
  border:1px solid #f1f5f9;
  border-radius:10px;
  padding:7px 10px;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}
.ad-mini-label{
  display:block;
  font-size:10px;
  line-height:1.25;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-weight:700;
  color:#94a3b8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ad-mini-value{
  display:block;
  margin-top:2px;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@container (min-width:520px){
  .ad-mini-value{ font-size:15px; }
}

/* Tarjetas de alertas (colores semánticos reservados) */
.ad-alert-tile{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:12px;
  padding:10px 12px;
  border:1px solid transparent;
}
.ad-alert-tile--danger{
  background:#fff1f2;
  border-color:#ffe4e6;
  color:#be123c;
}
.ad-alert-tile--warning{
  background:#fffbeb;
  border-color:#fef3c7;
  color:#b45309;
}

/* Ranking de vehículos */
.ad-rank-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:9px 10px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #f1f5f9;
}
.ad-rank-index{
  width:22px;
  height:22px;
  border-radius:7px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  background:#e2e8f0;
  color:#475569;
  flex-shrink:0;
  margin-top:1px;
}
.ad-rank-index.is-first{ background:#fbbf24; color:#78350f; }
.ad-rank-index.is-second{ background:#bfdbfe; color:#1e40af; }
.ad-rank-index.is-third{ background:#fde68a; color:#92400e; }
.ad-rank-bar{
  height:4px;
  border-radius:999px;
  background:#e2e8f0;
  margin-top:6px;
  overflow:hidden;
}
.ad-rank-bar > span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#93c5fd,#2563eb);
  transition:width .4s cubic-bezier(.4,0,.2,1);
}

/* Flechas laterales */
.ad-carousel-arrow{
  position:absolute;
  top:calc(50% - 20px);
  transform:translateY(-50%);
  z-index:20;
  width:32px;
  height:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.94);
  border:1px solid #e2e8f0;
  color:#475569;
  font-size:.72rem;
  box-shadow:0 2px 8px rgba(15,23,42,.08);
  transition:background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.ad-carousel-arrow:hover{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
  transform:translateY(-50%) scale(1.06);
}
.ad-carousel-arrow--prev{ left:9px; }
.ad-carousel-arrow--next{ right:9px; }

/* Navegación inferior */
.ad-widget-nav{
  flex-shrink:0;
  height:34px;
  border-top:1px solid #f1f5f9;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  padding:0 14px;
  background:#fff;
  z-index:20;
}
.ad-widget-status{
  display:flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  font-weight:600;
  color:#94a3b8;
  white-space:nowrap;
}
.ad-widget-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
}
.ad-widget-dot{
  position:relative;
  width:7px;
  height:7px;
  border-radius:999px;
  background:#cbd5e1;
  transition:width .28s ease, background-color .28s ease;
}
.ad-widget-dot::after{
  content:'';
  position:absolute;
  inset:-6px;
}
.ad-widget-dot:hover{ background:#94a3b8; }
.ad-widget-dot.is-active{ width:22px; background:#2563eb; }
.ad-widget-count{
  justify-self:end;
  font-size:10px;
  font-weight:700;
  color:#64748b;
  white-space:nowrap;
}

@container (max-width:520px){
  .ad-widget-slide{ padding-left:30px; padding-right:30px; }
  .ad-widget-head{ gap:8px; }
  .ad-widget-icon{ width:30px; height:30px; border-radius:9px; font-size:.75rem; }
  .ad-widget-badge{ font-size:9.5px; padding:3px 8px; }
  .ad-widget-foot{ gap:8px; }
  .ad-foot-hint{ display:none; }
  .ad-mini-label{ font-size:9px; letter-spacing:.03em; }
  .ad-carousel-arrow{ width:24px; height:24px; font-size:.62rem; }
  .ad-carousel-arrow--prev{ left:3px; }
  .ad-carousel-arrow--next{ right:3px; }
  .ad-mant-total{ display:none; }
}

@media (max-width:640px){
  .ad-widget-slide{ padding:14px 38px 6px; }
  .ad-carousel-arrow{ width:28px; height:28px; }
  .ad-carousel-arrow--prev{ left:5px; }
  .ad-carousel-arrow--next{ right:5px; }
  .ad-widget-status{ font-size:0; gap:0; }
  .ad-widget-status i{ font-size:10px; }
}

/* =====================================================
   DASHBOARD · ESCALA ADAPTATIVA (solo el contenido del dashboard)
   Agranda tipografía y componentes según el tamaño de pantalla,
   manteniendo todo dentro del alto visible (sin scroll vertical).
   Los porcentajes de alto/ancho se adaptan solos al área disponible.
   ===================================================== */
main.ad-dashboard-main .ad-dashboard-view{
  --ad-z:1;
  zoom:var(--ad-z);
}
@media (min-width:1440px) and (min-height:700px){
  main.ad-dashboard-main .ad-dashboard-view{ --ad-z:1.1; }
}
@media (min-width:1680px) and (min-height:800px){
  main.ad-dashboard-main .ad-dashboard-view{ --ad-z:1.2; }
}
@media (min-width:1840px) and (min-height:880px){
  main.ad-dashboard-main .ad-dashboard-view{ --ad-z:1.25; }
}
@media (min-width:2200px) and (min-height:1000px){
  main.ad-dashboard-main .ad-dashboard-view{ --ad-z:1.4; }
}
@media (min-width:2500px) and (min-height:1200px){
  main.ad-dashboard-main .ad-dashboard-view{ --ad-z:1.6; }
}

/* En pantallas menores a 1024 el panel derecho se apila y el dashboard puede desplazarse */
@media (max-width:1023px){
  main.ad-dashboard-main{ overflow-y:auto; }
  main.ad-dashboard-main .ad-dashboard-view{ height:auto; min-height:100%; }
  .ad-dashboard-view .ad-dashboard-grid{ flex:none; }
  .ad-dashboard-grid .ad-widget-carousel{ min-height:440px; }
  .ad-dashboard-grid .ad-recent-panel{ min-height:380px; }
}

@media (prefers-reduced-motion:reduce){
  .ad-login *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
  .ad-slide:first-child{ opacity:1 !important; }
  aside.ad-sidebar,
  .ad-sidebar *,
  .ad-eye-btn,
  .eye-swap-enter-active,
  .eye-swap-leave-active{ transition-duration:.01ms !important; }
  .ad-widget-track,
  .ad-widget-dot,
  .ad-carousel-arrow,
  .ad-rank-bar > span{ transition-duration:.01ms !important; }
  .ad-widget-progress > span{ animation-duration:.01ms !important; }
}

/* =====================================================
   DASHBOARD · NIVEL 1 (saludo, KPIs con ícono, tabla compacta)
   ===================================================== */
.ad-quickbar{ padding:8px 12px; }
.ad-quick-btn{ height:34px; }
.ad-greet{ line-height:1.2; padding-left:4px; }
.ad-greet-title{ font-size:15px; font-weight:700; color:#0f172a; letter-spacing:-.01em; }
.ad-greet-title span{ color:#2563eb; }
.ad-greet-date{
  display:flex; align-items:center; gap:6px;
  margin-top:2px; font-size:11.5px; font-weight:500; color:#94a3b8;
}
.ad-greet-date i{ font-size:10.5px; }

/* KPIs con ícono */
.ad-kpi-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.ad-kpi-icon{
  width:28px; height:28px; border-radius:9px; flex-shrink:0;
  display:grid; place-items:center; font-size:12px;
}
.ad-kpi-warn{ color:#e11d48; font-weight:700; }

/* Flota: 3 indicadores en una fila */
.ad-fleet-side .ad-fleet-stats--3{ grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Tabla compacta de últimos alquileres */
.ad-recent-table{
  width:100%; table-layout:fixed;
  border-collapse:separate; border-spacing:0; font-size:12px;
}
.ad-recent-table thead th{
  position:sticky; top:0; z-index:1;
  background:#f8fafc; text-align:left;
  font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#94a3b8;
  padding:8px 12px; border-bottom:1px solid #e2e8f0;
}
.ad-recent-table tbody td{
  padding:9px 12px; border-bottom:1px solid #f1f5f9; vertical-align:middle;
}
.ad-recent-table tbody tr{ cursor:pointer; transition:background-color .15s ease; }
.ad-recent-table tbody tr:hover,
.ad-recent-table tbody tr:focus-visible{ background:#eff6ff; outline:none; }
.ad-recent-table tbody tr:last-child td{ border-bottom:none; }
.ad-recent-table .ad-col-code{ width:21%; }
.ad-recent-table .ad-col-veh{ width:21%; }
.ad-recent-table .ad-col-estado{ width:15%; }
.ad-recent-table .ad-col-total{ width:14%; text-align:right; font-weight:700; color:#0f172a; white-space:nowrap; }
.ad-recent-code{ font-weight:700; color:#2563eb; white-space:nowrap; }
.ad-cell-text{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-estado{
  display:inline-block; padding:2px 8px; border-radius:999px;
  font-size:10.5px; font-weight:700; text-transform:capitalize;
  border:1px solid transparent; white-space:nowrap;
}
.ad-estado--activo{ background:#e0f2fe; color:#075985; border-color:#bae6fd; }
.ad-estado--vencido{ background:#ffe4e6; color:#be123c; border-color:#fecdd3; }
.ad-estado--finalizado{ background:#f1f5f9; color:#475569; border-color:#e2e8f0; }
.ad-estado--cancelado{ background:#fef3c7; color:#92400e; border-color:#fde68a; }
@container (max-width:520px){
  .ad-recent-table .ad-col-veh{ display:none; }
}


/* =====================================================
   CONFIGURACIÓN · APPLE-STYLE CAPSULE TAB BAR & PÁGINA
   ===================================================== */
.ad-apple-tabbar-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:22px;
}
.ad-apple-tabbar{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px;
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:none;
  border-radius:9999px;
  background:rgba(255,255,255,.88);
  -webkit-backdrop-filter:blur(16px) saturate(180%);
  backdrop-filter:blur(16px) saturate(180%);
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 12px 28px -16px rgba(15,23,42,.18), 0 1px 3px rgba(15,23,42,.04), inset 0 1px 0 rgba(255,255,255,.95);
}
.ad-apple-tabbar::-webkit-scrollbar{ display:none; }
.ad-apple-tab-slider{
  position:absolute;
  top:5px;
  bottom:5px;
  left:0;
  border-radius:9999px;
  pointer-events:none;
  background:linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
  box-shadow:0 2px 10px -3px rgba(37,99,235,.26), inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(37,99,235,.16);
  transition:transform 420ms cubic-bezier(.32,1.18,.36,1), width 360ms cubic-bezier(.32,1.18,.36,1), opacity 180ms ease;
  will-change:transform,width;
}
.ad-apple-tab-btn{
  position:relative;
  z-index:1;
  min-width:98px;
  padding:8px 16px;
  border-radius:9999px;
  border:0;
  background:transparent;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  color:#64748B;
  cursor:pointer;
  flex-shrink:0;
  user-select:none;
  transition:color 220ms ease, transform 160ms ease;
}
.ad-apple-tab-btn:hover{ color:#0F172A; }
.ad-apple-tab-btn:active{ transform:scale(.96); }
.ad-apple-tab-btn.is-active{ color:#1D4ED8; }
.ad-apple-tab-icon{
  font-size:15px;
  line-height:1;
  transition:transform 280ms cubic-bezier(.34,1.56,.64,1);
}
.ad-apple-tab-btn.is-active .ad-apple-tab-icon{ transform:scale(1.08); }
.ad-apple-tab-text{
  font-size:11.5px;
  font-weight:600;
  letter-spacing:.01em;
  line-height:1.15;
}
.ad-apple-tab-btn.is-active .ad-apple-tab-text{ font-weight:700; }
@media (max-width:640px){
  .ad-apple-tab-btn{ min-width:82px; padding:7px 13px; }
  .ad-apple-tab-text{ font-size:11px; }
}
/* Transición fluida entre paneles de configuración */
.ad-tab-fade-enter-active{ transition:opacity .22s ease, transform .24s cubic-bezier(.22,1,.36,1); }
.ad-tab-fade-leave-active{ display:none; }
.ad-tab-fade-enter-from{}

/* =====================================================
   CENTRO DE NOTIFICACIONES (TOPBAR + SWITCHES CONFIG)
   ===================================================== */
.ad-notif-wrap{
  position:relative;
}
.ad-notif-btn{
  position:relative;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid #E2E8F0;
  background:#FFFFFF;
  color:#475569;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background-color .18s ease, border-color .18s ease, color .18s ease, transform .14s ease, box-shadow .18s ease;
}
.ad-notif-btn:hover{
  background:#F8FAFC;
  border-color:#CBD5E1;
  color:#0F172A;
}
.ad-notif-btn.is-open{
  background:#EFF6FF;
  border-color:#93C5FD;
  color:#1D4ED8;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.ad-notif-btn:active{ transform:scale(.95); }
.ad-notif-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:9999px;
  background:#EF4444;
  color:#FFFFFF;
  font-size:10px;
  font-weight:700;
  line-height:18px;
  text-align:center;
  border:2px solid #FFFFFF;
  box-shadow:0 2px 6px rgba(239,68,68,.38);
}
.ad-notif-badge.is-normal{
  background:#2563EB;
  box-shadow:0 2px 6px rgba(37,99,235,.32);
}
.ad-notif-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:392px;
  max-width:calc(100vw - 24px);
  background:#FFFFFF;
  border:1px solid rgba(226,232,240,.95);
  border-radius:18px;
  box-shadow:0 24px 48px -12px rgba(15,23,42,.20), 0 4px 12px rgba(15,23,42,.06);
  z-index:60;
  overflow:hidden;
}
.ad-notif-list{
  max-height:360px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#CBD5E1 transparent;
}
.ad-notif-list::-webkit-scrollbar{ width:5px; }
.ad-notif-list::-webkit-scrollbar-thumb{ background:#CBD5E1; border-radius:999px; }
.ad-notif-item{ transition:background-color .16s ease; }
.ad-notif-item:hover{ background:#F8FAFC; }
.ad-notif-item.is-unread{ background:#F5F9FF; }
.ad-notif-item.is-unread:hover{ background:#EDF4FF; }
.ad-dropdown-fade-enter-active{ transition:opacity .18s ease, transform .2s cubic-bezier(.22,1,.36,1); }
.ad-dropdown-fade-leave-active{ transition:opacity .13s ease, transform .13s ease; }
.ad-dropdown-fade-enter-from, .ad-dropdown-fade-leave-to{ opacity:0; transform:translateY(-6px) scale(.98); }
.ad-switch{
  position:relative;
  display:inline-flex;
  align-items:center;
  width:44px;
  height:25px;
  border-radius:9999px;
  border:0;
  padding:2px;
  background:#CBD5E1;
  cursor:pointer;
  flex-shrink:0;
  transition:background-color .22s ease, opacity .18s ease;
}
.ad-switch.is-on{ background:#2563EB; }
.ad-switch:disabled{ opacity:.55; cursor:not-allowed; }
.ad-switch-thumb{
  width:21px;
  height:21px;
  border-radius:9999px;
  background:#FFFFFF;
  box-shadow:0 1px 3px rgba(15,23,42,.25);
  transition:transform .24s cubic-bezier(.32,1.18,.36,1);
}
.ad-switch.is-on .ad-switch-thumb{ transform:translateX(19px); }

/* ==========================================================
   CUSTOM DROPDOWN (<ad-select>) Y CALENDARIO (<ad-datepicker>)
   ========================================================== */
.ad-select-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.ad-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  background-color: #ffffff;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.ad-select-trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
}
.ad-select-trigger.is-open {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}
.ad-select-trigger:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.ad-select-caret {
  flex-shrink: 0;
  color: #64748b;
  font-size: 11px;
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), color .16s ease;
}
.ad-select-trigger.is-open .ad-select-caret {
  transform: rotate(180deg);
  color: #2563eb;
}
.ad-select-popover {
  position: fixed;
  z-index: 10050;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 14px;
  box-shadow: 0 22px 44px -12px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 6px;
  overflow: hidden;
  animation: adPopoverIn .16s cubic-bezier(.22, 1, .36, 1);
}
@keyframes adPopoverIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ad-select-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.ad-select-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  color: #0f172a;
}
.ad-select-list {
  max-height: 248px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.ad-select-list::-webkit-scrollbar { width: 5px; }
.ad-select-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.ad-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.ad-select-option:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}
.ad-select-option.is-selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.ad-select-option:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

/* Calendario personalizado <ad-datepicker> */
.ad-dp-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.ad-dp-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.ad-dp-trigger:hover:not(:disabled) {
  border-color: #cbd5e1;
}
.ad-dp-trigger.is-open {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.ad-dp-trigger:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.ad-dp-popover {
  position: fixed;
  z-index: 10055;
  width: 312px;
  max-width: calc(100vw - 24px);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 16px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.22), 0 6px 14px rgba(15, 23, 42, 0.06);
  padding: 12px;
  animation: adPopoverIn .16s cubic-bezier(.22, 1, .36, 1);
}
.ad-dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.ad-dp-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .14s ease;
}
.ad-dp-nav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ad-dp-pill-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all .14s ease;
}
.ad-dp-pill-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.ad-dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.ad-dp-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 0;
  text-transform: uppercase;
}
.ad-dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.ad-dp-day {
  height: 34px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .12s ease;
}
.ad-dp-day:hover:not(.is-selected) {
  background: #eff6ff;
  color: #1d4ed8;
}
.ad-dp-day.is-other {
  color: #cbd5e1;
  font-weight: 500;
}
.ad-dp-day.is-today:not(.is-selected) {
  border: 1.5px solid #2563eb;
  color: #1d4ed8;
}
.ad-dp-day.is-selected {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.35);
}
.ad-dp-months-grid, .ad-dp-years-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px 0;
}
.ad-dp-grid-item {
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  cursor: pointer;
  transition: all .14s ease;
}
.ad-dp-grid-item:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.ad-dp-grid-item.is-active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.ad-dp-timebar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ad-dp-time-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px 6px;
}
.ad-dp-time-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
}
.ad-dp-time-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.ad-dp-foot {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ==========================================================================
   CONTRATO DE ARRENDAMIENTO · formulario con vista previa en vivo,
   checklist de inventario, medidor de combustible e impresión oficial
   ========================================================================== */

/* --- Paneles: formulario en dos columnas y visor del documento --- */
.ad-drawer-panel--contrato{ max-width:1280px; }
.ad-drawer-panel--documento{ max-width:900px; }

.ad-contrato-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);
  grid-template-rows:minmax(0,1fr);
}
.ad-contrato-form{ min-height:0; }
.ad-contrato-preview{
  min-height:0;
  overflow-y:auto;
  padding:22px 24px;
  background:#EEF2F7;
  border-left:1px solid #E2E8F0;
}
.ad-contrato-visor{ background:#EEF2F7; }

/* Hoja de papel donde se dibuja <contrato-documento> */
.ad-contrato-hoja{
  max-width:820px;
  margin:0 auto;
  padding:34px 38px;
  background:#fff;
  border:1px solid #E2E8F0;
  border-radius:6px;
  box-shadow:0 1px 2px rgba(15,23,42,.06), 0 12px 32px -18px rgba(15,23,42,.28);
}

/* Pestañas Formulario / Vista previa: solo cuando no caben las dos columnas */
.ad-contrato-tabs{
  display:none;
  gap:6px;
  padding:10px 24px;
  border-bottom:1px solid #F1F5F9;
  background:#fff;
  flex-shrink:0;
}
.ad-contrato-tab{
  flex:1 1 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  height:36px;
  border-radius:10px;
  font-size:13px;
  font-weight:600;
  color:#64748B;
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  transition:background-color .18s ease, color .18s ease, border-color .18s ease;
}
.ad-contrato-tab:hover{ color:#0F172A; }
.ad-contrato-tab.is-active{ background:#EFF6FF; border-color:#BFDBFE; color:#1D4ED8; }
.ad-contrato-tab:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }

@media (max-width:1023px){
  .ad-contrato-tabs{ display:flex; }
  .ad-contrato-layout{ grid-template-columns:minmax(0,1fr); }
  .ad-contrato-preview{ border-left:0; }
  .ad-contrato-layout > .is-hidden-mobile{ display:none; }
}
@media (max-width:640px){
  .ad-contrato-tabs{ padding-left:16px; padding-right:16px; }
  .ad-contrato-preview{ padding:14px 10px; }
  .ad-contrato-hoja{ padding:20px 16px; }
}

/* --- Secciones del formulario --- */
.ad-contrato-seccion{
  border:1px solid #E2E8F0;
  border-radius:14px;
  padding:14px 16px;
  background:#fff;
}
.ad-contrato-seccion-title{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#334155;
  margin-bottom:10px;
}
.ad-contrato-seccion-title > i{ color:#2563EB; font-size:12px; }
.ad-opcional{
  font-size:10.5px;
  font-weight:600;
  text-transform:none;
  letter-spacing:0;
  color:#64748B;
  background:#F1F5F9;
  padding:2px 8px;
  border-radius:999px;
}
.ad-contrato-switch-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 0;
  border-top:1px solid #F1F5F9;
}
.ad-contrato-seccion-title + .ad-contrato-switch-row,
.ad-contrato-switch-row--head{ border-top:0; padding-top:0; }
.ad-contrato-switch-row--head{ padding-bottom:0; }

.ad-contrato-aviso,
.ad-contrato-alerta,
.ad-contrato-ok{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  font-size:12.5px;
  line-height:1.45;
}
.ad-contrato-aviso > i,
.ad-contrato-alerta > i,
.ad-contrato-ok > i{ margin-top:2px; flex-shrink:0; }
.ad-contrato-aviso{ background:#FFFBEB; border:1px solid #FDE68A; color:#92400E; }
.ad-contrato-alerta{ background:#FFF1F2; border:1px solid #FECDD3; color:#9F1239; }
.ad-contrato-ok{ background:#ECFDF5; border:1px solid #A7F3D0; color:#065F46; }

.ad-contrato-foot-hint{
  margin-right:auto;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:#64748B;
}
@media (max-width:640px){
  .ad-contrato-foot-hint{ display:none; }
}

.ad-btn-mini{
  display:inline-flex;
  align-items:center;
  gap:5px;
  height:28px;
  padding:0 10px;
  border-radius:8px;
  border:1px solid #E2E8F0;
  background:#fff;
  font-size:11.5px;
  font-weight:600;
  color:#475569;
  transition:background-color .16s ease, color .16s ease;
}
.ad-btn-mini:hover{ background:#F1F5F9; color:#0F172A; }
.ad-btn-mini:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }

/* --- Checklist de inventario (formulario de entrega y devolución) --- */
.ad-checklist-count{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:11px;
  font-weight:700;
  letter-spacing:0;
  color:#1D4ED8;
  background:#EFF6FF;
  padding:1px 8px;
  border-radius:999px;
}
.ad-checklist-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
  gap:10px 16px;
}
.ad-checklist-grid--form{ grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.ad-checklist-grupo{ min-width:0; }
.ad-checklist-grupo-title{
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748B;
  padding-bottom:4px;
  margin-bottom:4px;
  border-bottom:1px solid #F1F5F9;
}

.ad-check{
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  padding:6px 8px;
  border-radius:9px;
  border:1px solid transparent;
  cursor:pointer;
  user-select:none;
  transition:background-color .16s ease, border-color .16s ease;
}
.ad-check:hover{ background:#F8FAFC; }
.ad-check > input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.ad-check-box{
  width:18px;
  height:18px;
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:5px;
  border:1.5px solid #CBD5E1;
  background:#fff;
  transition:background-color .16s ease, border-color .16s ease;
}
.ad-check-box > i{
  font-size:10px;
  color:#fff;
  opacity:0;
  transform:scale(.6);
  transition:opacity .14s ease, transform .18s cubic-bezier(.32,1.18,.36,1);
}
.ad-check.is-checked .ad-check-box{ background:#2563EB; border-color:#2563EB; }
.ad-check.is-checked .ad-check-box > i{ opacity:1; transform:scale(1); }
.ad-check > input:focus-visible + .ad-check-box{ outline:2px solid #2563EB; outline-offset:2px; }
.ad-check-label{ font-size:13px; color:#334155; line-height:1.3; min-width:0; }
.ad-check.is-no-entregado .ad-check-label{ color:#94A3B8; }
.ad-check.is-faltante{ background:#FFF1F2; border-color:#FECDD3; }
.ad-check.is-faltante .ad-check-label{ color:#BE123C; font-weight:600; }
.ad-check-tag{
  margin-left:auto;
  flex-shrink:0;
  font-size:9.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:2px 7px;
  border-radius:999px;
  background:#F1F5F9;
  color:#64748B;
  white-space:nowrap;
}
.ad-check-tag--faltante{ background:#FFE4E6; color:#BE123C; }

.ad-check--acepta{
  align-items:flex-start;
  padding:12px 14px;
  border:1px solid #E2E8F0;
  background:#F8FAFC;
  border-radius:12px;
}
.ad-check--acepta:hover{ background:#F1F5F9; }
.ad-check--acepta .ad-check-box{ margin-top:1px; }
.ad-check--acepta .ad-check-label{ font-size:12.5px; color:#475569; line-height:1.45; }
.ad-check--acepta.is-checked{ background:#EFF6FF; border-color:#BFDBFE; }
.ad-check--acepta.is-checked .ad-check-label{ color:#1E3A8A; }

/* --- Selector de nivel de combustible (formulario) --- */
.ad-fuel-picker{
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:4px;
}
.ad-fuel-opt{
  height:36px;
  border-radius:8px;
  border:1px solid #E2E8F0;
  background:#F8FAFC;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:11.5px;
  font-weight:700;
  color:#94A3B8;
  transition:background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.ad-fuel-opt:hover{ border-color:#93C5FD; color:#1D4ED8; }
.ad-fuel-opt.is-filled{ background:#DBEAFE; border-color:#BFDBFE; color:#1D4ED8; }
.ad-fuel-opt.is-selected{
  background:#2563EB;
  border-color:#2563EB;
  color:#fff;
  box-shadow:0 4px 10px -4px rgba(37,99,235,.55);
}
.ad-fuel-opt:focus-visible{ outline:2px solid #2563EB; outline-offset:2px; }
@media (max-width:420px){
  .ad-fuel-picker{ gap:3px; }
  .ad-fuel-opt{ height:34px; font-size:10px; border-radius:7px; }
}

/* --- Documento del contrato (<contrato-documento>) --- */
.ad-contrato-doc{ hyphens:auto; -webkit-hyphens:auto; overflow-wrap:break-word; }

/* Medidor de combustible de solo lectura (E ▮▮▮▮▮▮▮▮ F) */
.ad-fuel-box{ flex:1 1 240px; min-width:220px; }
.ad-fuel-gauge{ display:flex; align-items:center; gap:7px; }
.ad-fuel-ef{ font-size:10px; font-weight:800; color:#64748B; }
.ad-fuel-track{
  flex:1 1 auto;
  max-width:260px;
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:3px;
}
.ad-fuel-seg{
  height:12px;
  border-radius:3px;
  background:#F1F5F9;
  border:1px solid #CBD5E1;
}
.ad-fuel-seg.is-filled{ background:#10B981; border-color:#059669; }
.ad-fuel-seg.is-filled:nth-child(-n+4){ background:#F59E0B; border-color:#D97706; }
.ad-fuel-seg.is-filled:nth-child(-n+2){ background:#F43F5E; border-color:#E11D48; }
.ad-fuel-label{
  min-width:34px;
  margin-left:4px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;
  font-weight:800;
  color:#0F172A;
}

/* Chips de condiciones (seguro, responsabilidad, deducible) */
.ad-chip{
  display:inline-flex;
  align-items:center;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid #E2E8F0;
  background:#F8FAFC;
  color:#334155;
  font-weight:700;
  white-space:nowrap;
}
.ad-chip--on{ background:#ECFDF5; border-color:#A7F3D0; color:#065F46; }
.ad-chip--off{ background:#FFF1F2; border-color:#FECDD3; color:#9F1239; }

/* Inventario dentro del documento */
.ad-checklist-item{
  display:flex;
  align-items:center;
  gap:6px;
  padding:1.5px 0;
  font-size:11px;
  color:#334155;
}
.ad-checklist-item > i:first-child{ width:12px; flex-shrink:0; color:#94A3B8; }
.ad-checklist-item > i.fa-square-check{ color:#1D4ED8; }
.ad-checklist-item.is-faltante{ color:#BE123C; font-weight:700; }
.ad-checklist-item.is-faltante > i:first-child{ color:#BE123C; }
.ad-checklist-flag{ color:#E11D48; font-size:10px; margin-left:auto; }

/* --- Impresión del contrato oficial --- */
@page{ size:letter portrait; margin:12mm 13mm 14mm; }

@media print{
  #printable-contract,
  #printable-voucher{ padding:0 !important; }
  #printable-contract.ad-contrato-hoja,
  #printable-voucher.ad-contrato-hoja{
    max-width:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
  .ad-contrato-visor{ background:#fff !important; }

  .ad-contrato-doc{
    color:#000;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .ad-contrato-doc p{ orphans:3; widows:3; }
  .ad-contrato-doc h2,
  .ad-contrato-doc h4{ break-after:avoid; page-break-after:avoid; }
  .ad-avoid-break{ break-inside:avoid; page-break-inside:avoid; }

  /* En papel, el inventario se reparte en 4 columnas para ocupar menos espacio */
  .ad-contrato-doc .ad-checklist-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px 12px; }
  .ad-contrato-doc .ad-checklist-item{ font-size:10px; padding:1px 0; }
}

/* --- Comprobante de Arrendamiento Carta (.ad-voucher-carta) --- */
.ad-voucher-carta{
  font-size:10.5px;
  line-height:1.35;
  color:#0F172A;
  -webkit-print-color-adjust:exact;
  print-color-adjust:exact;
}
.ad-vc-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:10px;
  border-bottom:2px solid #0F172A;
  margin-bottom:8px;
}
.ad-vc-logo{
  width:52px;
  height:52px;
  border-radius:12px;
  background:#0F172A;
  padding:6px;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ad-vc-topbar{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  border-radius:10px;
  padding:6px 10px;
  margin-bottom:8px;
}
.ad-vc-meta{ display:flex; flex-direction:column; min-width:0; }
.ad-vc-meta span{ font-size:8.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#64748B; }
.ad-vc-meta strong{ font-size:10.5px; color:#0F172A; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-vc-sec{
  margin-top:8px;
  border:1px solid #CBD5E1;
  border-radius:10px;
  overflow:hidden;
  background:#FFFFFF;
}
.ad-vc-sec-head{
  background:#0F172A;
  color:#FFFFFF;
  font-size:9.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  padding:5px 10px;
}
.ad-vc-sec-body{ padding:8px 10px; }
.ad-vc-k{
  display:block;
  font-size:8.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:#64748B;
}
.ad-vc-v{
  color:#0F172A;
  border-bottom:1px solid #E2E8F0;
  padding-bottom:2px;
  min-height:15px;
}

/* --- Ticket Térmico 80mm de Caja (.ad-ticket-80mm) --- */
.ad-ticket-80mm{
  width:302px; /* ~80mm a 96dpi */
  max-width:100%;
  padding:18px 16px;
  border-radius:8px;
  border:1px solid #E2E8F0;
  box-shadow:0 12px 28px -12px rgba(15,23,42,.18);
  font-family:'Courier New',Courier,ui-monospace,SFMono-Regular,Menlo,monospace;
  color:#0F172A;
  line-height:1.38;
}
.ad-ticket-sep{
  border-top:1.5px dashed #94A3B8;
  margin:9px 0;
}
@media print{
  body.ad-printing-80mm{ background:#fff !important; }
  .ad-voucher-carta .ad-vc-topbar{ padding:4px 8px; }
  .ad-voucher-carta .ad-vc-sec{ margin-top:6px; }
  .ad-voucher-carta .ad-vc-sec-body{ padding:6px 8px; }
}

/* --- Drawer lateral adaptable en móvil / tablet (< 1024px) --- */
@media (max-width: 1023.98px){
  aside.ad-sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    width:16rem !important;
    transform:translateX(-105%);
    transition:transform 260ms cubic-bezier(.4,0,.2,1);
    box-shadow:0 24px 48px -12px rgba(15,23,42,.55);
  }
  aside.ad-sidebar.ad-sidebar--mobile-open{
    transform:translateX(0);
  }
  aside.ad-sidebar .ad-brand-text,
  aside.ad-sidebar .ad-nav-label,
  aside.ad-sidebar .ad-nav-group-label,
  aside.ad-sidebar .ad-profile-text{
    max-width:200px !important;
    opacity:1 !important;
    transform:none !important;
  }
  aside.ad-sidebar .ad-brand-text,
  aside.ad-sidebar .ad-nav-label{
    margin-left:.75rem !important;
  }
}
