
/* ==========================================================================
   TABLA COMPACTA FLUIDA & RESPONSIVE PROPORCIONAL
   ========================================================================== */
.embarque-table-wrapper.glass-panel,
.aduana-table-wrapper.glass-panel {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
}

.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.table-contenedores {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table-contenedores th {
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #f8fafc;
    color: #0f172a;
    border-bottom: 1.5px solid var(--luna-border);
    white-space: nowrap;
}

.table-contenedores td {
    padding: 8px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.table-contenedores th.col-chk, .table-contenedores td.col-chk { width: 34px; text-align: center; }
.table-contenedores th.col-num, .table-contenedores td.col-num { width: 32px; text-align: center; color: #64748b; font-weight: 700; }
.table-contenedores th.col-cont { width: 135px; }
.table-contenedores th.col-vins { min-width: 180px; }
.table-contenedores th.col-bl { width: 90px; }
.table-contenedores th.col-naviera { width: 110px; }
.table-contenedores th.col-fecha { width: 125px; }
.table-contenedores th.col-puerto { width: 100px; }
.table-contenedores th.col-accion { width: 115px; text-align: center; }

/* Contenedor Badge */
.container-master-badge {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.container-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 3px 7px;
    width: fit-content;
}

.container-badge-top i {
    color: #0284c7;
    font-size: 13px;
}

.container-badge-top .cont-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 11.5px;
    color: #0369a1;
}

.cont-units-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    width: fit-content;
}

/* VINs List en Contenedor */
.container-vins-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 250px;
}

.vin-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 6px;
    transition: all 0.15s ease;
}

.vin-item-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.vin-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.vin-code-box {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 1px 4px;
}

.vin-code-box:hover {
    background: #4f46e5;
    color: #ffffff;
}

.btn-vin-detail-eye {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 4px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}

.btn-vin-detail-eye:hover {
    background: #0f172a;
    color: #ffffff;
}

.vin-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-size: 10.5px;
    margin-top: 2px;
}

.vin-item-model {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.vin-item-color {
    font-size: 10px;
    color: #475569;
    font-weight: 600;
}

/* Badges de Tabla */
.badge-bl {
    display: inline-block;
    padding: 2px 6px;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 800;
    color: #6d28d9;
    white-space: nowrap;
}

.badge-naviera {
    display: inline-block;
    padding: 3px 6px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: #0f172a;
    max-width: 110px;
    line-height: 1.15;
    text-align: center;
}

.badge-fecha-arribo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #be123c;
    max-width: 125px;
}

.fecha-compact-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
}

.fecha-row {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.fecha-row.llegada {
    color: #991b1b;
    font-weight: 800;
}

.badge-puerto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

/* Botón Acción Contenedor */
.btn-move-container-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.btn-move-container-action.btn-to-aduana {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
}

.btn-move-container-action.btn-to-aduana:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    transform: translateY(-1px);
}

.btn-move-container-action.btn-to-almacen {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
}

.btn-move-container-action .count-bubble {
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
}

/* ==========================================================================
   LUNA VIPS — STYLESHEET (PREMIUM LIGHT LUXURY THEME)
   Fondo Claro, Alta Legibilidad, Contraste Cristalino y Colores Vivos por Modelo
   ========================================================================== */

:root {
    --luna-bg: #f1f5f9;
    --luna-bg-subtle: #f8fafc;
    --luna-surface: #ffffff;
    --luna-surface-card: #ffffff;
    --luna-surface-light: #f8fafc;
    --luna-border: #e2e8f0;
    --luna-border-focus: #4f46e5;
    
    --luna-primary: #4f46e5;
    --luna-primary-hover: #4338ca;
    --luna-primary-glow: rgba(79, 70, 229, 0.2);
    
    --luna-reserva: #059669;
    --luna-reserva-hover: #047857;
    --luna-reserva-glow: rgba(5, 150, 105, 0.2);
    
    --luna-purple: #7c3aed;
    --luna-purple-glow: rgba(124, 58, 237, 0.2);

    --luna-accent: #6366f1;
    --luna-gold: #d97706;
    --luna-success: #16a34a;
    --luna-warning: #d97706;
    --luna-danger: #dc2626;
    --luna-info: #0284c7;

    --luna-text: #0f172a;
    --luna-text-muted: #475569;
    --luna-text-dim: #64748b;

    --luna-radius-sm: 8px;
    --luna-radius-md: 12px;
    --luna-radius-lg: 16px;
    --luna-radius-full: 9999px;

    --luna-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --luna-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --luna-shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    --luna-glow: 0 0 20px rgba(79, 70, 229, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.luna-vips-body {
    background-color: var(--luna-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(226, 232, 240, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(241, 245, 249, 0.9) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(226, 232, 240, 0.6) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--luna-text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   PANTALLA DE INICIO DE SESIÓN VIP (LIGHT)
   ========================================================================== */
.luna-login-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, #f8fafc, #e2e8f0);
}

.luna-login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    padding: 40px 32px;
    box-shadow: var(--luna-shadow-lg);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.luna-brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.luna-logo-badge {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.luna-brand-header h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 1.5px;
    color: #0f172a;
    margin-bottom: 4px;
}

.luna-brand-header p {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--luna-text-dim);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.forgot-link {
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #3730a3;
    text-decoration: underline;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 15px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-md);
    color: #0f172a;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.font-bold { font-weight: 700; }

.required {
    color: #dc2626;
    font-weight: bold;
}

.login-error-msg {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: var(--luna-radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}

/* ==========================================================================
   BOTONES VIP
   ========================================================================== */
.btn-luna-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    border: 1px solid #0f172a;
    border-radius: var(--luna-radius-md);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.btn-luna-primary:hover {
    background: linear-gradient(135deg, #334155, #1e293b);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

/* BOTÓN DESTACADO PARA REGISTRAR RESERVA */
.btn-luna-reserva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: 1px solid #047857;
    border-radius: var(--luna-radius-md);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.btn-luna-reserva:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

.btn-luna-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    border-radius: var(--luna-radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--luna-shadow-sm);
}

.btn-luna-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* BOTÓN DESTACADO PARA IMPRIMIR ACTA VIP */
.btn-luna-print {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 24px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: 1px solid #1d4ed8;
    border-radius: var(--luna-radius-md);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
}

.btn-luna-print i {
    font-size: 1.25rem;
    color: #ffffff;
}

.btn-luna-print:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

/* BOTÓN PILL DE TABLA PARA VER / IMPRIMIR ACTA */
.btn-acta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-acta-pill:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

/* BOTÓN PILL DE DEVOLUCIÓN AL ALMACÉN */
.btn-devolver-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-devolver-pill:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
    transform: translateY(-1px);
}

/* BOTÓN TOGGLE DE ESTADO DE SOLUCIÓN */
.btn-solucionado-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-solucionado-toggle:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* BANNER DE DEVOLUCIÓN EN TARJETA DE VEHÍCULO */
.devolucion-card-banner {
    background: rgba(239, 68, 68, 0.12);
    border-top: 1px solid rgba(239, 68, 68, 0.3);
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 16px;
    font-size: 11.5px;
}

.badge-tag.devuelto,
.badge-tag.devuelto-almacen {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}


/* ==========================================================================
   NAVBAR VIP SUPERIOR (LIGHT)
   ========================================================================== */
.luna-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--luna-border);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 20px;
    box-shadow: var(--luna-shadow-sm);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-toggle-btn {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    color: #334155;
    width: 38px;
    height: 38px;
    border-radius: var(--luna-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.luna-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.luna-nav-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.luna-nav-titles h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 1.2px;
    color: #0f172a;
    line-height: 1.1;
}

.luna-nav-titles span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--luna-text-dim);
}

.nav-center {
    flex: 1;
    max-width: 550px;
}

.nav-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 480px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-full);
    padding: 0 14px;
    height: 42px;
    transition: all 0.25s ease;
}

.nav-search-bar:focus-within {
    background: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    max-width: 540px;
}

.nav-search-bar i.bx-search {
    color: #64748b;
    font-size: 1.2rem;
    margin-right: 10px;
}

.nav-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #0f172a;
    width: 100%;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
}

.nav-search-bar input::placeholder {
    color: #94a3b8;
}

.clear-search-btn {
    background: #e2e8f0;
    border: none;
    color: #64748b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: var(--luna-radius-full);
    border: 1px solid var(--luna-border);
}

.user-role-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--luna-radius-full);
    letter-spacing: 0.5px;
}

.user-role-badge.admin { background: #fef3c7; color: #b45309; font-weight: 900; }
.user-role-badge.user { background: #e0e7ff; color: #4338ca; }
.user-role-badge.viewer { background: #f1f5f9; color: #475569; }

.user-tag {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    font-family: 'JetBrains Mono', monospace;
}

.btn-portal-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    color: var(--luna-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-portal-back:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: var(--luna-radius-md);
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   ESTRUCTURA DE LAYOUT: SIDEBAR + CONTENIDO PRINCIPAL
   ========================================================================== */
.luna-layout-container {
    display: flex;
    min-height: calc(100vh - 72px);
    width: 100%;
}

/* ==========================================================================
   SIDEBAR LATERAL VIP (LIGHT)
   ========================================================================== */
.luna-sidebar {
    width: 270px;
    background: #ffffff;
    border-right: 1px solid var(--luna-border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    z-index: 90;
    box-shadow: var(--luna-shadow-sm);
}

.luna-sidebar.collapsed {
    width: 80px;
}

.luna-sidebar.collapsed .sidebar-label,
.luna-sidebar.collapsed .nav-text,
.luna-sidebar.collapsed .sidebar-quick-actions,
.luna-sidebar.collapsed .sidebar-footer-text {
    display: none;
}

.luna-sidebar.collapsed .nav-item-content {
    justify-content: center;
}

.luna-sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 12px;
}

.luna-sidebar.collapsed .nav-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 2px 5px;
    font-size: 9px;
}

.sidebar-header {
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: #4f46e5;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
    background: #e2e8f0;
    color: #3730a3;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 995;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}


.sidebar-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: var(--luna-text-dim);
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--luna-radius-md);
    color: var(--luna-text-muted);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
    width: 100%;
}

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-nav-item .nav-icon {
    font-size: 20px;
    color: var(--luna-text-dim);
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-nav-item:hover .nav-icon {
    color: #4f46e5;
    transform: scale(1.1);
}

.sidebar-nav-item.active {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    font-weight: 800;
}

.sidebar-nav-item.active .nav-icon {
    color: #4f46e5;
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 4px;
    background: #4f46e5;
    border-radius: 0 4px 4px 0;
}

/* Badges del Sidebar */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    line-height: 1;
}

.nav-badge.badge-primary { background: #e0e7ff !important; color: #3730a3 !important; border-color: #c7d2fe !important; }
.nav-badge.badge-warning { background: #fef3c7 !important; color: #92400e !important; border-color: #fde68a !important; }
.nav-badge.badge-success { background: #dcfce7 !important; color: #166534 !important; border-color: #bbf7d0 !important; }
.nav-badge.badge-info    { background: #e0f2fe !important; color: #0369a1 !important; border-color: #bae6fd !important; }
.nav-badge.badge-purple  { background: #f3e8ff !important; color: #5b21b6 !important; border-color: #ddd6fe !important; }

.sidebar-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--luna-border);
}

.btn-sidebar-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: var(--luna-radius-md);
    color: #15803d;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn-sidebar-action.secondary {
    background: #f8fafc;
    border-color: var(--luna-border);
    color: var(--luna-text-muted);
}

.btn-sidebar-action.secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sidebar-footer-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
}

.sidebar-footer-icon {
    font-size: 22px;
    color: #10b981;
}

.sidebar-footer-text .title {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

.sidebar-footer-text .sub {
    font-size: 10.5px;
    color: #059669;
    font-weight: 700;
    display: block;
}

/* ==========================================================================
   CONTENIDO PRINCIPAL Y SECCIONES
   ========================================================================== */
.luna-main-content {
    flex: 1;
    padding: 24px 28px 60px;
    max-width: 1600px;
    min-width: 0;
}

.luna-section {
    animation: fadeIn 0.3s ease-out;
}

.section-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.section-title-box h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-box h2 i {
    color: #4f46e5;
}

.section-title-box p {
    font-size: 13px;
    color: var(--luna-text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   KPIs GRID (LIGHT)
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--luna-shadow-sm);
    min-height: 94px;
    box-sizing: border-box;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: var(--luna-shadow);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    transition: transform 0.25s ease;
}

.kpi-card:hover .kpi-icon svg {
    transform: scale(1.12);
}

.total-card .kpi-icon { background: #e0e7ff; color: #4338ca; }
.incidencias-card .kpi-icon { background: #fee2e2; color: #dc2626; }
.rely-card .kpi-icon, .model-rely .kpi-icon { background: #e0f2fe; color: #0284c7; }
.cross-card .kpi-icon, .model-cross .kpi-icon { background: #fee2e2; color: #7c3aed; }
.rav4-card .kpi-icon, .model-rav4 .kpi-icon { background: #fee2e2; color: #dc2626; }
.nissan-card .kpi-icon, .model-nissan .kpi-icon { background: #fef3c7; color: #d97706; }
.kia-card .kpi-icon, .model-kia .kpi-icon { background: #e0e7ff; color: #4338ca; }
.green-card .kpi-icon { background: #dcfce7; color: #15803d; }
.amber-card .kpi-icon { background: #fef3c7; color: #b45309; }
.model-otro .kpi-icon { background: #f1f5f9; color: #475569; }

.kpi-card.model-card.active {
    border-color: #4338ca;
    box-shadow: 0 0 0 2px rgba(67, 56, 202, 0.25), var(--luna-shadow);
    background: #fafafa;
}

.kpi-card.incidencias-card:hover {
    border-color: #fca5a5;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.12);
}

.kpi-card.incidencias-card.active {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25), var(--luna-shadow);
    background: #fff5f5;
}

.incidencias-card .kpi-value.has-incidencias {
    color: #dc2626;
}

.kpi-card .kpi-icon i {
    transition: transform 0.25s ease;
}

.kpi-card:hover .kpi-icon i {
    transform: scale(1.12);
}

.kpi-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.kpi-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.kpi-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0;
}

.kpi-sub {
    font-size: 11px;
    color: var(--luna-text-dim);
    margin-top: 3px;
}

/* Desglose de Colores en Tarjetas de Modelos */
.kpi-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 6px;
}

.kpi-color-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.kpi-color-chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.kpi-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.kpi-color-name {
    font-size: 11px;
    color: #475569;
}

.kpi-color-qty {
    font-weight: 800;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.07);
    padding: 0 4px;
    border-radius: 4px;
    font-size: 11px;
}

.kpi-color-empty {
    font-size: 11px;
    color: var(--luna-text-dim);
    font-style: italic;
    margin-top: 2px;
}

.kpi-color-loading {
    font-size: 10.5px;
    color: var(--luna-text-dim);
}

/* ==========================================================================
   TOOLBAR & FILTROS (LIGHT)
   ========================================================================== */
.toolbar-section {
    margin-bottom: 24px;
}

.toolbar-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 12px 18px;
    box-shadow: var(--luna-shadow-sm);
}

.model-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-btn {
    padding: 8px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--luna-radius-full);
    color: var(--luna-text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* ── BOTONES DE FILTRO CON COLORES VIVOS POR MODELO ── */
.pill-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.pill-btn[data-model="Rely"].active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.pill-btn[data-model="Cross"].active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.pill-btn[data-model="Rav4"].active {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.pill-btn[data-model="Nissan"].active {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.pill-btn[data-model="Otros"].active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.pill-btn[data-model*="Kia"].active,
.pill-btn[data-model*="kia"].active {
    background: #4338ca;
    border-color: #4338ca;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.35);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--luna-text-dim);
    font-size: 14px;
    pointer-events: none;
}

.luna-select {
    padding: 9px 14px 9px 32px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-md);
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.luna-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.view-toggle-group {
    display: flex;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-md);
    padding: 3px;
}

.view-toggle-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: var(--luna-radius-sm);
    color: var(--luna-text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.view-toggle-btn.active {
    background: #0f172a;
    color: #ffffff;
}

/* ==========================================================================
   SHOWROOM CARDS GRID CON COLORES DE MODELO RESTAURADOS (LIGHT)
   ========================================================================== */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

.vehicle-card {
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--luna-shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    border-top: 4px solid #4f46e5;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--luna-shadow-lg);
}

/* ── 1. RELY (CIAN / TURQUESA) ── */
.vehicle-card.model-rely {
    border-top: 4px solid #0284c7;
}
.vehicle-card.model-rely .card-header-bar {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid #bae6fd;
}
.vehicle-card.model-rely .model-tag {
    color: #0369a1;
}
.vehicle-card.model-rely .year-tag {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}
.vehicle-card.model-rely:hover {
    border-color: #0284c7;
}

/* ── 2. CROSS (PÚRPURA / VIOLETA) ── */
.vehicle-card.model-cross {
    border-top: 4px solid #7c3aed;
}
.vehicle-card.model-cross .card-header-bar {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-bottom: 1px solid #e9d5ff;
}
.vehicle-card.model-cross .model-tag {
    color: #6d28d9;
}
.vehicle-card.model-cross .year-tag {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}
.vehicle-card.model-cross:hover {
    border-color: #7c3aed;
}

/* ── 3. RAV4 (ROJO / CORAL / CARMESÍ) ── */
.vehicle-card.model-rav4 {
    border-top: 4px solid #e11d48;
}
.vehicle-card.model-rav4 .card-header-bar {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border-bottom: 1px solid #fecdd3;
}
.vehicle-card.model-rav4 .model-tag {
    color: #be123c;
}
.vehicle-card.model-rav4 .year-tag {
    background: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
}
.vehicle-card.model-rav4:hover {
    border-color: #e11d48;
}

/* ── 4. NISSAN (ÁMBAR / NARANJA / DORADO) ── */
.vehicle-card.model-nissan {
    border-top: 4px solid #d97706;
}
.vehicle-card.model-nissan .card-header-bar {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom: 1px solid #fde68a;
}
.vehicle-card.model-nissan .model-tag {
    color: #b45309;
}
.vehicle-card.model-nissan .year-tag {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}
.vehicle-card.model-nissan:hover {
    border-color: #d97706;
}

/* ── 5. KIA (ÍNDIGO / AZUL REAL VIP) ── */
.vehicle-card.model-kia {
    border-top: 4px solid #4338ca;
}
.vehicle-card.model-kia .card-header-bar {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-bottom: 1px solid #c7d2fe;
}
.vehicle-card.model-kia .model-tag {
    color: #3730a3;
}
.vehicle-card.model-kia .year-tag {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.vehicle-card.model-kia:hover {
    border-color: #4338ca;
}

/* ── 6. OTROS MODELOS (ÍNDIGO / AZUL VIP) ── */
.vehicle-card.model-otro {
    border-top: 4px solid #4f46e5;
}
.vehicle-card.model-otro .card-header-bar {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-bottom: 1px solid #c7d2fe;
}
.vehicle-card.model-otro .model-tag {
    color: #3730a3;
}
.vehicle-card.model-otro .year-tag {
    background: #e0e7ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}
.vehicle-card.model-otro:hover {
    border-color: #4f46e5;
}

.card-header-bar {
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.model-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.model-tag {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 16px;
}

.year-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.card-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.card-brand-badge svg {
    display: block;
}

.card-brand-badge.brand-toyota {
    color: #dc2626;
    background: #fee2e2;
    border-color: #fca5a5;
}

.card-brand-badge.brand-nissan {
    color: #d97706;
    background: #fef3c7;
    border-color: #fde68a;
}

.card-brand-badge.brand-rely {
    color: #0284c7;
    background: #e0f2fe;
    border-color: #bae6fd;
}

.card-brand-badge.brand-kia {
    color: #4338ca;
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.card-brand-badge.brand-generic {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.vehicle-card:hover .card-brand-badge {
    transform: scale(1.12);
}

/* Badges de Estado en Modo Claro */
.status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--luna-radius-full);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge.disponible { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.status-badge.reservado { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.status-badge.vendido { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.status-badge.transito { background: #f3e8ff; color: #6d28d9; border: 1px solid #d8b4fe; }
.status-badge.aduana { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.status-badge.entregado { background: #d1fae5; color: #047857; border: 1px solid #6ee7b7; }
.status-badge.devuelto, .status-badge.devolucion { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

.card-vin-box {
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--luna-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vin-info span {
    font-size: 10px;
    color: var(--luna-text-dim);
    font-weight: 800;
    text-transform: uppercase;
}

.vin-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.btn-copy-vin {
    background: transparent;
    border: none;
    color: var(--luna-text-dim);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-copy-vin:hover {
    color: #4f46e5;
    background: #e0e7ff;
}

.card-specs-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #ffffff;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-item .label {
    font-size: 11px;
    color: var(--luna-text-dim);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.spec-item .val {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2px;
}

.spec-item .val.price {
    color: #059669;
    font-family: 'JetBrains Mono', monospace;
}

.card-footer-actions {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--luna-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.card-author {
    font-size: 11px;
    color: var(--luna-text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.card-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--luna-border);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--luna-shadow-sm);
}

.action-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.action-icon-btn.finish-btn {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #059669;
}

.action-icon-btn.finish-btn:hover {
    background: #10b981;
    border-color: #059669;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: scale(1.08);
}

.action-icon-btn.hold-btn {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #d97706;
}

.action-icon-btn.hold-btn:hover {
    background: #f59e0b;
    border-color: #d97706;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transform: scale(1.08);
}

.action-icon-btn.reserva-btn:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.action-icon-btn.delete-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   TABLA DE DATOS VIP (LIGHT)
   ========================================================================== */
.glass-panel {
    background: #ffffff;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    overflow: hidden;
    box-shadow: var(--luna-shadow-sm);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.luna-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.luna-table th {
    padding: 14px 18px;
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid var(--luna-border);
    white-space: nowrap;
}

.luna-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    vertical-align: middle;
}

.luna-table tr:hover td {
    background: #f8fafc;
}

/* ==========================================================================
   SECCIÓN 2: RESERVAS (TARJETAS & CARACTERÍSTICAS)
   ========================================================================== */
.reservas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
}

.reserva-card {
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--luna-shadow-sm);
    display: flex;
    flex-direction: column;
}

.reserva-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: var(--luna-shadow-lg);
}

.reserva-card-header {
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--luna-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reserva-folio {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.reserva-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reserva-vehiculo-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.reserva-vehiculo-title h4 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.reserva-comprador-box {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 12px 14px;
}

.reserva-comprador-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.reserva-comprador-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--luna-text-muted);
}

.reserva-logistica-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.log-item {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.log-item .label {
    color: var(--luna-text-dim);
    font-size: 10.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.log-item .val {
    color: #0f172a;
    font-weight: 700;
    margin-top: 2px;
}

.badge-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

.badge-tag.concesionario { background: #f3e8ff; color: #6d28d9; border: 1px solid #d8b4fe; }
.badge-tag.particular { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-tag.distribuidor { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-tag.institucion, .badge-tag.institución { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.sig-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #16a34a;
}

.sig-status-badge.pending {
    color: #d97706;
}

.reserva-card-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--luna-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* ==========================================================================
   SECCIÓN 4: COMPRADORES (DIRECTORIO CRM)
   ========================================================================== */
.compradores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.comprador-card {
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.25s ease;
    box-shadow: var(--luna-shadow-sm);
}

.comprador-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: var(--luna-shadow);
}

.comprador-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.comprador-name-box h4 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.comprador-name-box .rif-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #4f46e5;
    font-weight: 800;
}

.comprador-units-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: var(--luna-radius-md);
    border: 1px solid var(--luna-border);
}

.comprador-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #15803d;
    border-radius: var(--luna-radius-md);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-whatsapp:hover {
    background: #16a34a;
    color: #ffffff;
}

/* ==========================================================================
   SECCIÓN 5: LOGÍSTICA (GRÚAS Y CIGÜEÑAS)
   ========================================================================== */
.logistica-section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.logistica-section-title h3 {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logistica-section-title span {
    font-size: 12px;
    color: var(--luna-text-muted);
}

.logistica-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.transporte-card {
    background: #ffffff;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s ease;
    box-shadow: var(--luna-shadow-sm);
}

.transporte-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
}

.transporte-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.transporte-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.transporte-details-box {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 12px 14px;
    font-size: 12.5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==========================================================================
   MODALES VIP & FORMULARIOS (LIGHT)
   ========================================================================== */
body.modal-open {
    overflow: hidden !important;
}

.luna-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    z-index: 2000;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
    animation: fadeIn 0.25s ease-out;
}

.luna-modal-card {
    width: 100%;
    max-width: 640px;
    max-height: calc(100dvh - 32px);
    max-height: calc(100vh - 32px);
    height: auto;
    margin: auto;
    background: #ffffff;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.luna-modal-card.large-modal {
    max-width: 820px;
    max-height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
}

.luna-modal-card form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    height: auto;
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1.5px solid var(--luna-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative;
    z-index: 10;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.modal-title-group h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.modal-title-group p {
    font-size: 12px;
    color: var(--luna-text-muted);
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--luna-text-dim);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #0f172a;
}

.modal-body-scroll {
    padding: 20px 22px;
    overflow-y: auto !important;
    overflow-x: hidden;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 165px) !important;
    max-height: calc(100vh - 165px) !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y !important;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 8px;
    display: block;
}

.modal-body-scroll::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 8px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1.5px solid var(--luna-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    position: relative;
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
}

.form-section-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #eef2ff;
    border-left: 3.5px solid #4f46e5;
    border-radius: 0 var(--luna-radius-sm) var(--luna-radius-sm) 0;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #4338ca;
    margin-bottom: 14px;
}

/* Vista previa del vehículo en reserva */
.vehicle-selection-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.preview-item {
    display: flex;
    flex-direction: column;
}

.preview-label {
    font-size: 10.5px;
    color: var(--luna-text-dim);
    text-transform: uppercase;
    font-weight: 800;
}

.preview-val {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2px;
}

/* Card de detalles de delivery */
.delivery-details-card {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.delivery-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

/* Gasolina Toggle */
.gasolina-toggle-group {
    display: flex;
    gap: 12px;
}

.radio-pill {
    cursor: pointer;
    flex: 1;
}

.radio-pill input {
    display: none;
}

.pill-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: var(--luna-radius-md);
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: var(--luna-text-muted);
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
}

.radio-pill input:checked + .pill-badge.pill-yes {
    background: #dcfce7;
    border-color: #16a34a;
    color: #15803d;
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.2);
}

.radio-pill input:checked + .pill-badge.pill-no {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   FIRMA DIGITAL (CANVAS PAD - LIGHT)
   ========================================================================== */
.signature-container-card {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: var(--luna-radius-md);
    padding: 16px;
}

.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.signature-header label {
    font-size: 12.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
}

.btn-clear-sig {
    background: #ffffff;
    border: 1px solid var(--luna-border);
    color: var(--luna-text-dim);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-clear-sig:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.signature-canvas-wrapper {
    position: relative;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--luna-radius-md);
    overflow: hidden;
    height: 150px;
    cursor: crosshair;
}

#signature-pad {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.signature-guide-line {
    position: absolute;
    bottom: 24px;
    left: 20px;
    right: 20px;
    border-bottom: 1px dotted #cbd5e1;
    text-align: center;
    pointer-events: none;
}

.signature-guide-line span {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* ==========================================================================
   ACTA DE ENTREGA VIP (MODAL & IMPRESIÓN)
   ========================================================================== */
.acta-modal-card {
    max-width: 880px;
    width: 95%;
}

.acta-print-wrapper {
    padding: 24px 28px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 12px;
    margin: 12px 16px;
    overflow-y: auto;
    max-height: 80vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border-top: 4px solid #0f172a;
    border-bottom: 4px solid #0f172a;
    box-shadow: var(--luna-shadow);
}

.acta-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.acta-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acta-logo-box {
    width: 44px;
    height: 44px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.acta-brand h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #0f172a;
    margin: 0;
}

.acta-brand p {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #64748b;
    margin: 2px 0 0;
}

.acta-folio-box {
    text-align: right;
}

.acta-folio-box .folio-label {
    font-size: 9.5px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.acta-folio-box .folio-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.acta-folio-box .folio-date {
    font-size: 11px;
    color: #64748b;
    display: block;
}

.acta-grid-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.acta-col {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.acta-col-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.acta-col-title i {
    font-size: 15px;
    color: #0f172a;
}

.acta-table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.acta-table-mini th {
    text-align: left;
    color: #64748b;
    font-weight: 700;
    padding: 2.5px 0;
    width: 44%;
    vertical-align: top;
}

.acta-table-mini td {
    color: #0f172a;
    padding: 2.5px 0;
    font-weight: 600;
    word-break: break-word;
}

.acta-doc-rendered-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.acta-doc-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.acta-doc-label i {
    font-size: 18px;
    color: #0f172a;
}

.acta-doc-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 270px;
    max-width: 540px;
    width: 100%;
    background: #ffffff;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.acta-doc-img-container img {
    max-height: 258px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.acta-legal-terms {
    font-size: 10.5px;
    line-height: 1.45;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 0;
}

.acta-legal-terms strong {
    color: #0f172a;
    font-weight: 800;
}

.acta-signatures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 14px;
    padding-top: 6px;
}

.acta-sig-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sig-image-container {
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sig-image-container img {
    max-height: 50px;
    max-width: 180px;
    object-fit: contain;
}

.no-sig-text {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

.sig-seal-container {
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.official-seal {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    background: #f1f5f9;
    border: 1.5px solid #0f172a;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.sig-line {
    width: 80%;
    border-bottom: 1.5px solid #0f172a;
    margin: 6px 0;
}

.sig-name {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
}

.sig-role {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.acta-single-page {
    padding: 24px 28px;
    background: #ffffff;
    color: #0f172a;
    border-radius: 12px;
    margin-bottom: 24px;
    border-top: 4px solid #0f172a;
    border-bottom: 4px solid #0f172a;
    box-shadow: var(--luna-shadow);
}

.acta-single-page:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   IMPRESIÓN (PRINT MEDIA)
   ========================================================================== */
@media print {
    @page {
        size: letter portrait;
        margin: 10mm;
    }

    body {
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body * {
        visibility: hidden !important;
    }

    #modal-acta-entrega,
    #modal-acta-entrega #acta-print-content,
    #modal-acta-entrega #acta-print-content * {
        visibility: visible !important;
    }

    #modal-acta-entrega {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: auto !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        z-index: 999999 !important;
    }

    .acta-modal-card {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        width: 100% !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print,
    .modal-header,
    .modal-footer {
        display: none !important;
    }

    .acta-print-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .acta-single-page {
        page-break-after: always !important;
        break-after: page !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 10px 14px !important;
        border-top: 4px solid #0f172a !important;
        border-bottom: 4px solid #0f172a !important;
    }

    .acta-single-page:last-child {
        page-break-after: auto !important;
        break-after: auto !important;
    }
}

/* ==========================================================================
   EMPTY STATE & FOOTER (LIGHT)
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1.5px dashed var(--luna-border);
    border-radius: var(--luna-radius-lg);
    box-shadow: var(--luna-shadow-sm);
}

.empty-icon {
    font-size: 48px;
    color: var(--luna-text-dim);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--luna-text-muted);
    margin-bottom: 18px;
}

.luna-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-top: 1px solid var(--luna-border);
    background: #ffffff;
    font-size: 12px;
    color: var(--luna-text-muted);
    font-weight: 600;
    box-shadow: var(--luna-shadow-sm);
}

/* ==========================================================================
   MULTI-SELECT DE VINS (LIGHT)
   ========================================================================== */
.vin-multiselect-container {
    position: relative;
    width: 100%;
}

.vin-multiselect-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-md);
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vin-multiselect-header:focus-within,
.vin-multiselect-header:hover {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.vin-multiselect-header input {
    background: transparent;
    border: none;
    outline: none;
    color: #0f172a;
    font-size: 13.5px;
    flex: 1;
    padding: 0;
}

.vin-count-tag {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.vin-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-lg);
    box-shadow: var(--luna-shadow-lg);
    z-index: 1000;
    overflow: hidden;
    animation: fadeIn 0.18s ease-out;
}

.vin-search-box {
    position: relative;
    padding: 10px 12px 6px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-bottom: 1px solid var(--luna-border);
}

.vin-search-box i {
    position: absolute;
    left: 24px;
    color: #64748b;
    font-size: 1.15rem;
    pointer-events: none;
}

.vin-search-box input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px 9px 38px;
    color: #0f172a;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.vin-search-box input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.vin-search-box input::placeholder {
    color: #94a3b8;
    font-size: 12px;
}

.vin-multiselect-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid var(--luna-border);
}

.btn-vin-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
}

.btn-select-all {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.btn-select-all:hover {
    background: #4f46e5;
    color: #ffffff;
}

.btn-clear-all {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.btn-clear-all:hover {
    background: #dc2626;
    color: #ffffff;
}

.vin-dropdown-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--luna-border);
}

.btn-mini-link {
    background: transparent;
    border: none;
    color: #4f46e5;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-mini-link:hover {
    text-decoration: underline;
}

.vin-items-scroll {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.vin-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    border-bottom: 1px solid #f1f5f9;
}

.vin-item-row:last-child {
    border-bottom: none;
}

.vin-item-row:hover {
    background: #f1f5f9;
}

.vin-item-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.vin-item-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vin-item-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vin-item-meta {
    font-size: 11.5px;
    color: var(--luna-text-muted);
    display: flex;
    gap: 8px;
    margin-top: 1px;
}

.vin-item-code {
    font-family: 'JetBrains Mono', monospace;
    color: #4f46e5;
    font-weight: 800;
}

/* Chips de VINs Seleccionados */
.selected-vins-chips-wrapper {
    margin-top: 10px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--luna-radius-md);
    padding: 10px 14px;
}

.chips-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--luna-text-dim);
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

.chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vin-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #4338ca;
    font-weight: 700;
}

.vin-chip:hover {
    background: #c7d2fe;
}

.vin-chip-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

.btn-remove-chip {
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-remove-chip:hover {
    color: #991b1b;
}

/* ==========================================================================
   CAJAS DINÁMICAS DE ENTREGA & LOGÍSTICA (LIGHT)
   ========================================================================== */
.dynamic-delivery-box {
    background: #f8fafc;
    border: 1.5px solid var(--luna-border);
    border-radius: var(--luna-radius-lg);
    padding: 16px 18px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.25s ease-out;
}

.delivery-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 800;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--luna-border);
    color: #0f172a;
}

/* Tarjetas Dinámicas de Grúas Múltiples */
.grua-card-item {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--luna-radius-md);
    padding: 14px 16px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--luna-shadow-sm);
}

.grua-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.grua-badge-num {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.grua-vin-assigned {
    font-size: 12px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

/* Subida de Cédula y Documentos */
.doc-upload-container {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--luna-radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-upload-container label {
    font-size: 11.5px;
    font-weight: 800;
    color: #334155;
}

.doc-upload-box {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.file-input-hidden {
    display: none;
}

.btn-upload-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--luna-radius-md);
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.btn-upload-doc:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.btn-upload-doc.btn-camera-doc {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.btn-upload-doc.btn-camera-doc:hover {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.file-upload-name {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.doc-preview-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 6px;
    background: #ffffff;
    border-radius: 8px;
    width: fit-content;
    border: 1px solid var(--luna-border);
}

.doc-preview-thumb img {
    max-height: 80px;
    max-width: 180px;
    border-radius: 6px;
    border: 1px solid var(--luna-border);
    object-fit: cover;
}

.btn-remove-thumb {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-thumb:hover {
    background: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   FICHA TÉCNICA VIP - REDISEÑO MODAL (LIGHT)
   ========================================================================== */
.detail-card-modal {
    max-width: 680px;
    width: 94vw;
    background: #ffffff;
    border: 1px solid var(--luna-border);
    box-shadow: var(--luna-shadow-lg);
}

.ficha-hero-banner {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: var(--luna-shadow-sm);
    position: relative;
    overflow: hidden;
}

.ficha-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ficha-hero-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ficha-model-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.ficha-year-tag {
    background: #e2e8f0;
    color: #1e293b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.ficha-vin-container {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 14px;
}

.ficha-vin-meta {
    margin-bottom: 4px;
}

.ficha-vin-lbl {
    font-size: 10.5px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ficha-vin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ficha-vin-code {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 1.5px;
    word-break: break-all;
}

.btn-copy-vin-glow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-copy-vin-glow:hover {
    background: #4f46e5;
    color: #ffffff;
}

/* Grilla de Especificaciones */
.ficha-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 580px) {
    .ficha-grid {
        grid-template-columns: 1fr;
    }
    .ficha-grid .ficha-card {
        grid-column: span 1 !important;
    }
}

.ficha-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: 12px;
    padding: 11px 14px;
    transition: all 0.2s ease;
}

.ficha-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: var(--luna-shadow-sm);
    transform: translateY(-1px);
}

.ficha-card-highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ficha-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.ficha-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ficha-card-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ficha-card-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ficha-card-val.text-dim {
    color: #94a3b8;
    font-weight: 500;
}

/* Caja de Observaciones */
.ficha-notes-box {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.ficha-notes-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ficha-notes-body {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    font-weight: 500;
}

/* Footer de Auditoría */
.ficha-audit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 11.5px;
    color: #64748b;
    flex-wrap: wrap;
    font-weight: 600;
}

.ficha-audit-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ficha-audit-item strong {
    color: #1e293b;
}

/* ==========================================================================
   SECCIONES: EMBARQUE Y ADUANA + IMPORTADOR DE EXCEL (LIGHT)
   ========================================================================== */
.badge-contenedor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 800;
    color: #0369a1;
    letter-spacing: 0.5px;
}

.badge-bl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #6d28d9;
}

.badge-naviera {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.badge-fecha-arribo {
    font-size: 12px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.badge-fecha-arribo i {
    color: #4f46e5;
    font-size: 14px;
}

.badge-puerto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.badge-puerto i {
    color: #0284c7;
    font-size: 14px;
}

/* Botones de acción en tabla de embarque y aduana */
.btn-action-transition {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-to-aduana {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

.btn-to-aduana:hover {
    background: #d97706;
    color: #ffffff;
}

.btn-to-almacen {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.btn-to-almacen:hover {
    background: #16a34a;
    color: #ffffff;
}

.btn-to-embarque {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.btn-to-embarque:hover {
    background: #0284c7;
    color: #ffffff;
}

/* Modal Importador Excel */
.excel-dropzone {
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.25s ease;
}

.excel-dropzone:hover, .excel-dropzone.dragover {
    border-color: #4f46e5;
    background: #eef2ff;
    transform: scale(1.01);
}

.dropzone-icon {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 8px;
    display: inline-block;
}

.excel-dropzone h4 {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.excel-dropzone p {
    font-size: 12px;
    color: #64748b;
}

.excel-file-summary-card {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: 12px;
    padding: 14px 18px;
}

.file-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.file-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.excel-file-icon {
    font-size: 2rem;
    color: #16a34a;
}

.file-title-block h4 {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.file-title-block span {
    font-size: 11px;
    color: #64748b;
}

.file-badges-block {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.preview-badge.badge-vehicles {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.preview-badge.badge-containers {
    background: #f3e8ff;
    color: #6d28d9;
    border: 1px solid #e9d5ff;
}

.preview-badge.badge-sheets {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.stage-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .stage-options-grid {
        grid-template-columns: 1fr;
    }
}

.stage-option {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stage-option:hover, .stage-option.active {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #4338ca;
}

.stage-option input[type="radio"] {
    accent-color: #4f46e5;
    cursor: pointer;
}

/* ==========================================================================
   TOOLBARS, BUSCADORES Y SELECTORES MODERNOS VIP (LIGHT)
   ========================================================================== */
.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 280px;
    max-width: 360px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.search-input-box:focus-within {
    background: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    transform: translateY(-1px);
}

.search-input-box .search-icon-main,
.search-input-box > i.bx-search {
    position: absolute;
    left: 14px;
    font-size: 1.15rem;
    color: #64748b;
    pointer-events: none;
}

.search-input-box input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    background: transparent;
    border: none;
    outline: none;
    color: #0f172a;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
}

.search-input-box input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.btn-clear-search-box {
    position: absolute;
    right: 10px;
    background: #e2e8f0;
    border: none;
    color: #64748b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-clear-search-box:hover {
    background: #fee2e2;
    color: #dc2626;
}

.select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 180px;
    max-width: 240px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.select-wrapper:hover {
    border-color: #94a3b8;
}

.select-wrapper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.select-wrapper .select-icon-main,
.select-wrapper > i:first-child {
    position: absolute;
    left: 13px;
    font-size: 1.15rem;
    color: #64748b;
    pointer-events: none;
}

.select-wrapper .select-chevron {
    position: absolute;
    right: 12px;
    font-size: 1.1rem;
    color: #94a3b8;
    pointer-events: none;
    transition: transform 0.25s ease;
}

.select-wrapper:focus-within .select-chevron {
    transform: rotate(180deg);
    color: #4f46e5;
}

.luna-select {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 40px;
    background: transparent;
    border: none;
    outline: none;
    color: #0f172a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.luna-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    padding: 12px 16px !important;
}

/* ==========================================================================
   VISTA AGRUPADA POR CONTENEDOR (LIGHT)
   ========================================================================== */
.table-contenedores tbody tr.row-container-group {
    background: #ffffff;
    border-bottom: 1.5px solid var(--luna-border);
    transition: background-color 0.2s ease;
}

.table-contenedores tbody tr.row-container-group:hover {
    background: #f8fafc;
}

.container-master-badge {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.container-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 6px 10px;
}

.container-badge-top i {
    color: #0284c7;
    font-size: 1.15rem;
}

.container-badge-top .cont-num {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 13.5px;
    color: #0369a1;
    letter-spacing: 0.5px;
}

.cont-units-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    width: fit-content;
}

.container-vins-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(210px, 1fr));
    gap: 8px;
}

@media (max-width: 1400px) {
    .container-vins-grid {
        grid-template-columns: 1fr;
    }
}

.vin-item-card {
    background: #f8fafc;
    border: 1px solid var(--luna-border);
    border-radius: 9px;
    padding: 6px 9px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vin-item-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: var(--luna-shadow-sm);
}

.vin-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 4px;
}

.vin-code-box {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    font-weight: 800;
    color: #4f46e5;
    background: #eef2ff;
    border-radius: 5px;
    padding: 2px 6px;
    transition: all 0.15s ease;
}

.vin-code-box:hover {
    background: #4f46e5;
    color: #ffffff;
}

.btn-vin-detail-eye {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    border-radius: 5px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
}

.btn-vin-detail-eye:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.vin-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11.5px;
}

.vin-item-model {
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vin-item-model small {
    color: #64748b;
    font-weight: 600;
}

.vin-item-color {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.btn-move-container-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: var(--luna-shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-move-container-action.btn-to-aduana {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
}

.btn-move-container-action.btn-to-aduana:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.btn-move-container-action.btn-to-almacen {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
}

.btn-move-container-action.btn-to-almacen:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-move-container-action .count-bubble {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
}

.btn-container-back {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-container-back:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.color-bullet {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    margin-right: 4px;
    vertical-align: middle;
}


/* ==========================================================================
   SISTEMA DE DISEÑO ULTRA RESPONSIVE (LUNA VIPS)
   Optimizado para Monitores 4K, 1440p, 1080p, Laptops 1366px, Tablets y Móviles
   ========================================================================== */

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
}

.luna-layout-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    display: flex;
}

.luna-main-content {
    flex: 1;
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 20px 24px 60px;
}

/* Tablas con scroll interno suave y contenedor fluido */
.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--luna-radius-lg);
    box-sizing: border-box;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
    width: 7px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--luna-primary);
}

.luna-table {
    width: 100%;
    min-width: 700px;
}

.table-contenedores {
    min-width: 860px;
}

/* ── BREAKPOINT 1: MONITORES MEDIANOS Y LAPTOPS (<= 1440px) ── */
@media (max-width: 1440px) {
    .container-vins-grid {
        grid-template-columns: 1fr !important;
        gap: 6px;
    }
    .luna-sidebar {
        width: 240px;
    }
    .luna-main-content {
        padding: 18px 20px 50px;
    }
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
}

/* ── BREAKPOINT 2: LAPTOPS COMPACTAS Y MONITORES 1366px / 1280px (<= 1200px) ── */
@media (max-width: 1200px) {
    .luna-sidebar {
        width: 210px;
        padding: 16px 10px;
    }
    .sidebar-nav-item {
        padding: 10px 10px;
        font-size: 13px;
    }
    .nav-center {
        max-width: 380px;
    }
    .toolbar-wrapper {
        gap: 10px;
        padding: 10px 14px;
    }
    .kpi-card {
        padding: 12px 14px;
    }
    .kpi-value {
        font-size: 20px;
    }
}

/* ── BREAKPOINT 3: TABLETS Y PANTALLAS TÁCTILES (<= 1024px) ── */
@media (max-width: 1024px) {
    .sidebar-close-btn {
        display: flex !important;
    }

    .luna-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 290px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        z-index: 1000 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25) !important;
        overflow-y: auto !important;
        padding: 20px 16px 40px !important;
    }

    .luna-sidebar.open, 
    .luna-sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    .luna-sidebar .sidebar-label,
    .luna-sidebar.collapsed .sidebar-label {
        display: block !important;
    }

    .luna-sidebar .nav-text,
    .luna-sidebar.collapsed .nav-text {
        display: inline-block !important;
    }

    .luna-sidebar .sidebar-nav-item,
    .luna-sidebar.collapsed .sidebar-nav-item {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 14px !important;
        width: 100% !important;
    }

    .luna-sidebar .nav-item-content,
    .luna-sidebar.collapsed .nav-item-content {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    .luna-sidebar .nav-badge,
    .luna-sidebar.collapsed .nav-badge {
        position: static !important;
        display: inline-flex !important;
    }

    .luna-sidebar .sidebar-quick-actions,
    .luna-sidebar.collapsed .sidebar-quick-actions {
        display: flex !important;
        flex-direction: column !important;
    }

    .luna-sidebar .sidebar-footer-card,
    .luna-sidebar.collapsed .sidebar-footer-card {
        display: flex !important;
    }

    .luna-sidebar .sidebar-footer-text,
    .luna-sidebar.collapsed .sidebar-footer-text {
        display: block !important;
    }

    .luna-main-content {
        padding: 16px 16px 40px;
    }
    .nav-center {
        max-width: 280px;
    }
    .luna-navbar {
        padding: 10px 16px;
    }
    .luna-nav-titles h2 {
        font-size: 17px;
    }
    .luna-nav-titles span {
        display: none;
    }

    /* Modales adaptados a Tablets */
    .luna-modal-overlay {
        padding: 10px 8px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .luna-modal-card {
        max-height: calc(100dvh - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        width: 95vw !important;
        border-radius: 14px !important;
        margin: auto !important;
    }
    .modal-header {
        padding: 12px 16px !important;
        flex-shrink: 0 !important;
    }
    .modal-body-scroll {
        padding: 14px 16px !important;
        flex: 1 1 0% !important;
        min-height: 0 !important;
        max-height: calc(100dvh - 145px) !important;
        max-height: calc(100vh - 145px) !important;
        overflow-y: auto !important;
        touch-action: pan-y !important;
    }
    .modal-footer {
        padding: 12px 16px !important;
        flex-shrink: 0 !important;
        gap: 10px !important;
    }
}
/* ── BREAKPOINT 4: TABLETS VERTICALES Y PHABLETS (<= 768px) ── */
@media (max-width: 768px) {
    .section-top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .toolbar-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .model-pills {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .toolbar-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .search-input-box {
        min-width: 100% !important;
        max-width: 100% !important;
    }
    .select-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
    .vehicles-grid, .reservas-grid, .compradores-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .acta-grid-details {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    .acta-header-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .acta-folio-box {
        text-align: left !important;
    }
    .acta-signatures-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    .ficha-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Barra de Búsqueda Global y Header Ultra-Responsive en Móvil */
    .luna-navbar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 14px !important;
        gap: 8px 10px !important;
    }
    .nav-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .luna-nav-titles h2 {
        font-size: 15px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 155px !important;
    }
    .nav-right {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }
    .user-pill {
        padding: 4px 8px !important;
    }
    .user-role-badge {
        font-size: 9.5px !important;
        padding: 2px 6px !important;
    }
    .user-tag {
        display: none !important;
    }
    .btn-portal-back {
        padding: 6px 10px !important;
        height: 34px !important;
    }
    .btn-portal-back span {
        display: none !important;
    }
    .btn-logout {
        width: 34px !important;
        height: 34px !important;
    }
    .nav-center {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        order: 3 !important;
        margin-top: 4px !important;
        display: block !important;
    }
    .nav-search-bar {
        display: flex !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1.5px solid var(--luna-border) !important;
        border-radius: var(--luna-radius-full) !important;
        box-shadow: 0 1px 3px rgba(30, 58, 138, 0.06) !important;
        position: relative !important;
        align-items: center !important;
    }
    .nav-search-bar:focus-within {
        border-color: var(--luna-primary) !important;
        box-shadow: 0 0 0 3px var(--luna-primary-glow) !important;
    }
    .nav-search-bar i.bx-search {
        position: absolute !important;
        left: 12px !important;
        font-size: 18px !important;
        color: #1d4ed8 !important;
        pointer-events: none !important;
    }
    .nav-search-bar input {
        width: 100% !important;
        height: 38px !important;
        padding: 8px 36px 8px 38px !important;
        font-size: 13px !important;
        border: none !important;
        outline: none !important;
        background: transparent !important;
        color: var(--luna-text) !important;
        font-weight: 600 !important;
        text-overflow: ellipsis !important;
    }
    .nav-search-bar input::placeholder {
        font-size: 12px !important;
        color: #64748b !important;
    }
    .clear-search-btn {
        position: absolute !important;
        right: 8px !important;
        font-size: 18px !important;
        color: #94a3b8 !important;
    }
}

/* ── BREAKPOINT 5: SMARTPHONES (<= 480px) ── */
@media (max-width: 480px) {
    .luna-navbar {
        padding: 8px 10px !important;
    }
    .luna-nav-titles h2 {
        font-size: 13px !important;
        max-width: 110px !important;
    }
    .luna-nav-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
    .sidebar-toggle-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 20px !important;
    }
    .user-pill {
        padding: 3px 6px !important;
    }
    .nav-search-bar input {
        font-size: 12px !important;
        height: 36px !important;
    }
    .luna-main-content {
        padding: 12px 10px 30px;
    }
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
    .luna-modal-overlay {
        padding: 6px 4px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .luna-modal-card {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 12px) !important;
        max-height: calc(100vh - 12px) !important;
        border-radius: 12px !important;
        margin: auto !important;
    }
    .modal-header {
        padding: 10px 14px !important;
        flex-shrink: 0 !important;
    }
    .modal-body-scroll {
        padding: 12px 14px !important;
        flex: 1 1 0% !important;
        min-height: 0 !important;
        max-height: calc(100dvh - 130px) !important;
        max-height: calc(100vh - 130px) !important;
        overflow-y: auto !important;
        touch-action: pan-y !important;
    }
    .modal-footer {
        padding: 10px 14px !important;
        flex-direction: row !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        justify-content: space-between !important;
    }
    .modal-footer button {
        flex: 1 1 50% !important;
        width: auto !important;
        height: 42px !important;
        font-size: 13px !important;
        padding: 0 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }
}


/* Botones de Eliminación Admin */
.admin-only {
    display: none !important;
}

body.admin-mode .admin-only {
    display: inline-flex !important;
}

.btn-luna-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--luna-radius-md);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
    transition: all 0.2s ease;
}

.btn-luna-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-luna-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--luna-radius-md);
    background: #ffffff;
    color: #ef4444;
    border: 1.5px solid #fecaca;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-luna-danger-outline:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.btn-delete-container-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-delete-container-action:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
    transform: scale(1.05);
}

.btn-vin-delete-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-vin-delete-item:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}

.vin-actions-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── ESTILOS EXCLUSIVOS SECCIÓN HOLD ── */
.accion-salida-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #f59e0b !important;
}

.badge-hold, .status-badge.hold, .status-badge.en-hold {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.hold-user-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.hold-contact-box {
    padding: 10px 16px !important;
    background: #fffbeb !important;
    border-top: 1px dashed #fde68a !important;
    border-bottom: 1px dashed #fde68a !important;
    font-size: 12px;
    color: #0f172a !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.hold-contact-box strong {
    color: #0f172a !important;
}

.hold-card-audit-bar {
    padding: 9px 16px !important;
    background: #f8fafc !important;
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

.hold-card-notes-box {
    padding: 8px 16px !important;
    font-size: 12px;
    color: #92400e !important;
    background: #fef3c7 !important;
    border-left: 3px solid #f59e0b !important;
    font-style: italic;
}

.hold-card-footer {
    padding: 12px 16px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 16px 16px;
}

/* ==========================================================================
   TARJETAS AGRUPADAS POR CONTACTO / LOTE EN HOLD (ALTO CONTRASTE)
   ========================================================================== */
.hold-lot-card {
    background: #ffffff !important;
    border: 1.5px solid #fde68a !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.25s ease;
    margin-bottom: 16px;
}

.hold-lot-card:hover {
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.15) !important;
    border-color: #f59e0b !important;
}

.hold-lot-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
    padding: 16px 20px !important;
    border-bottom: 1.5px solid #fde68a !important;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.hold-lot-title-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hold-lot-name {
    font-size: 16.5px !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hold-lot-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #475569;
}

.hold-lot-badge {
    background: #f59e0b !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 12.5px !important;
    padding: 4px 14px !important;
    border-radius: 20px !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.hold-lot-toolbar {
    padding: 10px 20px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hold-lot-selection-info {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hold-lot-select-all-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.hold-lot-select-all-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

.hold-lot-units-container {
    padding: 14px 20px !important;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff !important;
}

.hold-unit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    transition: all 0.15s ease;
    gap: 10px;
}

.hold-unit-row:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

.hold-unit-row.selected {
    background: #fffbeb !important;
    border-color: #fde68a !important;
}

.hold-unit-chk-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-grow: 1;
    user-select: none;
}

.hold-unit-chk-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.hold-unit-vin {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 13.5px;
    color: #d97706;
}

.hold-unit-specs {
    font-size: 12px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hold-unit-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hold-lot-footer {
    padding: 14px 20px !important;
    background: #f8fafc !important;
    border-top: 1.5px solid #e2e8f0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-hold-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-hold-despacho {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.btn-hold-despacho:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-hold-liberar {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1.5px solid #fca5a5 !important;
}
.btn-hold-liberar:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* ==========================================================================
   MODAL DE HOLD & SELECTOR MULTI-VIN (ALTO CONTRASTE)
   ========================================================================== */
.hold-modal-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.hold-modal-card .modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
}

.hold-modal-card .modal-header h3 {
    color: #0f172a !important;
    font-size: 17px;
    font-weight: 800;
}

.hold-modal-card .modal-header p {
    color: #475569 !important;
    font-size: 12px;
}

.hold-summary-card {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.hold-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hold-summary-title {
    font-size: 15px;
    font-weight: 800;
    color: #92400e !important;
}

.hold-vins-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding: 4px 0;
}

.hold-vin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #f59e0b;
    color: #b45309;
    padding: 4px 10px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.hold-vin-chip .chip-remove {
    cursor: pointer;
    color: #ef4444;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    transition: color 0.15s;
}

.hold-vin-chip .chip-remove:hover {
    color: #b91c1c;
}

.hold-multiselect-dropdown {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px;
    margin-top: 6px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hold-vin-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12px;
    color: #1e293b;
}

.hold-vin-option:hover {
    background: #f1f5f9;
}

.hold-vin-option.selected {
    background: #fef3c7;
    font-weight: 700;
    color: #92400e;
}

.hold-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #0f172a !important;
    margin-bottom: 6px;
}

.hold-audit-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #334155 !important;
}

.hold-field-hint {
    color: #64748b !important;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

/* ==========================================================================
   FACTURACIÓN — ESTILOS ESPECÍFICOS
   ========================================================================== */

.facturacion-view-container {
    padding: 0;
}

.facturacion-table-wrapper.glass-panel {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1.5px solid var(--luna-border, #e2e8f0);
    border-radius: var(--luna-radius-lg, 16px);
}

.factura-item-row {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s ease;
}

.factura-item-row:hover {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.fiscal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
    color: #334155;
}

.fiscal-label {
    font-weight: 500;
    color: #64748b;
}

.fiscal-value {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: #0f172a;
}

.badge-green {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
}

.btn-action-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-action-sm:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
}

.btn-danger-sm {
    color: #ef4444 !important;
}

.btn-danger-sm:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

/* Selector Buscador de Vehículos en Facturación */
.factura-veh-picker {
    position: relative;
    width: auto;
    min-width: 270px;
    max-width: 440px;
    flex: 1 1 auto;
}

.factura-veh-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 32px;
    padding: 5px 10px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 11.5px;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.factura-veh-trigger:hover {
    border-color: #10b981;
    background: #f8fafc;
}

.factura-veh-trigger.active {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.factura-veh-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    width: 100%;
}

.factura-veh-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 440px;
    max-width: 88vw;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.25), 0 4px 10px -2px rgba(15, 23, 42, 0.1);
    z-index: 1050;
    overflow: hidden;
    animation: fadeInDown 0.15s ease-out;
}

.factura-veh-search-box {
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.factura-veh-search-box input {
    width: 100%;
    padding: 6px 10px;
    font-size: 11.5px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
}

.factura-veh-search-box input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.factura-veh-pills {
    display: flex;
    gap: 5px;
    padding: 6px 10px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
}

.factura-veh-pill {
    padding: 3px 8px;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.factura-veh-pill:hover,
.factura-veh-pill.active {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.factura-veh-list {
    max-height: 230px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.factura-veh-option {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}

.factura-veh-option:hover {
    background: #f0fdf4;
}

.factura-veh-option.selected {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
}

.factura-veh-option.ya-facturado {
    background: #fff5f5;
    border-left: 3px solid #f87171;
}
.factura-veh-option.ya-facturado:hover {
    background: #fee2e2;
}

.factura-veh-opt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.factura-veh-opt-vin {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.factura-veh-opt-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
}

.factura-veh-opt-placa {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
    font-size: 10.5px;
}

.factura-veh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}
.factura-veh-badge.disponible {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.factura-veh-badge.despachado {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.factura-veh-badge.finalizado {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}
.factura-veh-badge.otro {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Botón de Facturación en Tarjeta de Despacho */
.btn-factura-card {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-factura-card.generar {
    background: #ecfdf5;
    color: #047857;
    border: 1.5px solid #a7f3d0;
}

.btn-factura-card.generar:hover {
    background: #d1fae5;
    border-color: #34d399;
    color: #065f46;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.btn-factura-card.imprimir {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1.5px solid #bfdbfe;
}

.btn-factura-card.imprimir:hover {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}



@media (max-width: 768px) {
    #modal-factura .luna-modal-card,
    #modal-detalle-factura .luna-modal-card {
        max-width: 98vw !important;
        margin: 8px;
    }

    .factura-item-row div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
    }

    .factura-item-row div[style*="grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
}

/* ==========================================================================
   TABLA FINALIZADOS: AJUSTE ULTRA-COMPACTO Y PROPORCIONAL SIN SCROLL HORIZONTAL
   ========================================================================== */
.finalizados-table-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
}

/* En pantallas de escritorio / laptop evitamos la barra horizontal forzando ajuste proporcional */
@media (min-width: 1025px) {
    .finalizados-table-wrapper .table-responsive {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.table-finalizados {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse;
}

.table-finalizados th {
    padding: 10px 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    white-space: normal !important;
    line-height: 1.25;
    box-sizing: border-box;
}

.table-finalizados td {
    padding: 9px 6px !important;
    font-size: 12px;
    vertical-align: middle;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Proporciones de las 11 Columnas (Suman 100%) */
.table-finalizados .col-fin-folio       { width: 8.5%; }
.table-finalizados .col-fin-vin         { width: 14%; }
.table-finalizados .col-fin-modelo      { width: 11%; }
.table-finalizados .col-fin-cliente     { width: 12.5%; }
.table-finalizados .col-fin-modo        { width: 7.5%; text-align: center; }
.table-finalizados .col-fin-transporte  { width: 12%; }
.table-finalizados .col-fin-km          { width: 4.5%; text-align: center; }
.table-finalizados .col-fin-gas         { width: 4%; text-align: center; }
.table-finalizados .col-fin-firma       { width: 7.5%; text-align: center; }
.table-finalizados .col-fin-auditoria   { width: 10%; }
.table-finalizados .col-fin-acciones    { width: 8.5%; text-align: center; }

/* Celdas específicas */
.table-finalizados td.col-fin-folio {
    line-height: 1.25;
}

.table-finalizados td.col-fin-vin {
    font-size: 11px !important;
    letter-spacing: -0.2px;
    word-break: break-all;
    line-height: 1.25;
}

.table-finalizados td.col-fin-modelo {
    font-size: 11.5px;
    line-height: 1.25;
}

.table-finalizados td.col-fin-cliente {
    font-size: 11.5px;
    line-height: 1.25;
}

.table-finalizados td.col-fin-modo {
    text-align: center;
}

.table-finalizados td.col-fin-modo .badge-tag {
    font-size: 10px;
    padding: 3px 6px;
    display: inline-block;
    white-space: nowrap;
}

.table-finalizados td.col-fin-transporte {
    font-size: 11px;
    line-height: 1.25;
}

.table-finalizados td.col-fin-km {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.table-finalizados td.col-fin-gas {
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.table-finalizados td.col-fin-firma {
    text-align: center;
}

.table-finalizados td.col-fin-firma .sig-status-badge {
    font-size: 10px;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
}

.table-finalizados td.col-fin-auditoria {
    font-size: 10.5px;
    line-height: 1.3;
}

/* Columna de Acciones: Botones apilados compactos */
.table-finalizados td.col-fin-acciones {
    padding: 6px 4px !important;
}

.table-finalizados .actions-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.table-finalizados .actions-cell .btn-acta-pill,
.table-finalizados .actions-cell .btn-devolver-pill,
.table-finalizados .actions-cell .btn-solucionado-toggle {
    width: 100% !important;
    max-width: 82px !important;
    box-sizing: border-box !important;
    padding: 4px 6px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
}

.table-finalizados .actions-cell .btn-acta-pill i,
.table-finalizados .actions-cell .btn-devolver-pill i,
.table-finalizados .actions-cell .btn-solucionado-toggle i {
    font-size: 12px !important;
}

@media (max-width: 1024px) {
    .finalizados-table-wrapper .table-responsive {
        overflow-x: auto !important;
    }
    .table-finalizados {
        min-width: 960px !important;
    }
}

/* ========================================================================= */
/* MÓDULO DE GASTOS Y ANALÍTICAS DE VEHÍCULOS (LUNA VIPS)                    */
/* ========================================================================= */

/* Botón de gastos en la tarjeta del vehículo */
.action-icon-btn.gastos-btn {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    border-color: rgba(2, 132, 199, 0.2);
}
.action-icon-btn.gastos-btn:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.action-icon-btn.gastos-btn:hover i {
    color: #ffffff !important;
}

/* Badge de gastos en la tarjeta del vehículo */
.card-gastos-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 14px;
    margin: 8px 14px 4px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: 8px;
    font-size: 11.5px;
    color: #0369a1;
    cursor: pointer;
    transition: all 0.2s ease;
}
.card-gastos-badge:hover {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.16), rgba(99, 102, 241, 0.16));
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}
.card-gastos-badge i {
    font-size: 14px;
    color: #0284c7;
}
.card-gastos-badge strong {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: #0f172a;
}

/* Badge de gastos en la tabla */
.table-gastos-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 6px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    cursor: pointer;
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
}
.table-gastos-pill:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Hero del modal de gastos */
.gastos-vehicle-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.gastos-vehicle-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.gastos-vehicle-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.gastos-vehicle-specs {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.gastos-vehicle-specs span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.gastos-vehicle-specs strong {
    color: #1e293b;
}
.gastos-vehicle-total-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 18px;
    text-align: right;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.gastos-vehicle-total-box .total-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #64748b;
}
.gastos-vehicle-total-box .total-amount {
    font-size: 22px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #0284c7;
}

/* Formulario de registro de gasto */
.gastos-form-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.gastos-form-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gastos-inputs-grid {
    display: grid;
    grid-template-columns: 140px 140px 1.6fr 1.2fr auto;
    gap: 12px;
    align-items: flex-end;
}
@media (max-width: 900px) {
    .gastos-inputs-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 550px) {
    .gastos-inputs-grid {
        grid-template-columns: 1fr;
    }
}

.gasto-nuevo-concepto-wrapper {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}
.gasto-nuevo-concepto-wrapper input {
    width: 100%;
    border: 1px solid #86efac;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    color: #166534;
}
.gasto-nuevo-concepto-wrapper small {
    display: block;
    color: #15803d;
    font-size: 11px;
    margin-top: 5px;
    line-height: 1.3;
}

/* Contenedor de la tabla de gastos */
.gastos-table-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

/* Modal de Analíticas Globales */
.analiticas-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (max-width: 900px) {
    .analiticas-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .analiticas-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.analitica-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.analitica-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}
.analitica-kpi-card.kpi-blue::before { background: #0284c7; }
.analitica-kpi-card.kpi-indigo::before { background: #6366f1; }
.analitica-kpi-card.kpi-emerald::before { background: #10b981; }
.analitica-kpi-card.kpi-amber::before { background: #f59e0b; }

.analitica-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.kpi-blue .analitica-kpi-icon { background: #e0f2fe; color: #0284c7; }
.kpi-indigo .analitica-kpi-icon { background: #e0e7ff; color: #6366f1; }
.kpi-emerald .analitica-kpi-icon { background: #dcfce7; color: #10b981; }
.kpi-amber .analitica-kpi-icon { background: #fef3c7; color: #f59e0b; }

.analitica-kpi-info {
    display: flex;
    flex-direction: column;
}
.analitica-kpi-info .kpi-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.4px;
}
.analitica-kpi-info .kpi-num {
    font-size: 22px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: #0f172a;
    line-height: 1.2;
    margin: 2px 0;
}
.analitica-kpi-info .kpi-hint {
    font-size: 11px;
    color: #94a3b8;
}

/* Grid de Tarjetas de Analíticas por Concepto */
.analiticas-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.analitica-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    cursor: pointer;
}
.analitica-item-card:hover {
    border-color: #6366f1;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}
.analitica-item-card.has-expenses {
    border-left: 4px solid #6366f1;
}
.analitica-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.analitica-card-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.analitica-card-count {
    font-size: 11px;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}
.analitica-card-amount {
    font-size: 18px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #0f172a;
    margin-bottom: 8px;
}
.analitica-progress-bg {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.analitica-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #0284c7);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.analitica-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Bloque para crear analítica directamente */
.crear-analitica-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.crear-analitica-box input {
    flex: 1;
    min-width: 220px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.crear-analitica-box input:focus {
    border-color: #6366f1;
}

/* Badge del concepto en las tablas */
.concepto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
}



