/* ==========================================================================
   SISTEMA DE GESTIÓN DE ALMACÉN PARA TABLETS (SIETE-GM / PUERTOS DE FALCÓN)
   Identidad visual: Google Fonts 'Quicksand' (500 y 700), Azul Corporativo (#0d47a1)
   Menú Hamburguesa Lateral Offcanvas, Dashboard Administrativo, Carga Masiva y Exportación
   ========================================================================== */

:root {
    --primary-color: #0d47a1;
    --primary-hover: #1565c0;
    --primary-light: #e3f2fd;
    --primary-dark: #002171;
    --accent-color: #0288d1;
    --success-color: #2e7d32;
    --success-light: #e8f5e9;
    --warning-color: #f57f17;
    --warning-light: #fffde7;
    --danger-color: #c62828;
    --danger-light: #ffebee;
    --gray-bg: #f4f6f9;
    --card-bg: #ffffff;
    --border-color: #cfd8dc;
    --text-color: #263238;
    --text-muted: #546e7a;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-soft: 0 4px 14px rgba(13, 71, 161, 0.08);
    --shadow-hover: 0 8px 24px rgba(13, 71, 161, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    background-color: var(--gray-bg);
    color: var(--text-color);
    margin: 0;
    padding: 15px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    margin-top: 0;
    color: var(--primary-color);
}

/* ==========================================================================
   BARRA INSTITUCIONAL SUPERIOR Y BOTÓN HAMBURGUESA
   ========================================================================== */
.top-bar-institucional {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(13, 71, 161, 0.25);
    position: relative;
    z-index: 100;
    gap: 12px;
}

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

/* Botón Hamburguesa Táctil (Esquina Superior Izquierda) */
.btn-hamburguesa {
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-hamburguesa:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.04);
}

.btn-hamburguesa:active {
    transform: scale(0.95);
}

.btn-hamburguesa svg {
    width: 24px;
    height: 24px;
}

.top-bar-institucional .logo-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-institucional .logo-box svg {
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 5px;
    border-radius: 8px;
}

.top-bar-institucional .logo-text h1 {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.top-bar-institucional .logo-text span {
    font-size: 0.78rem;
    color: #e3f2fd;
    font-weight: 500;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge-terminal {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Indicador de Estado de Conexión (En Línea / Offline) */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.badge-status.online {
    background: rgba(46, 125, 50, 0.25);
    border: 1px solid #81c784;
    color: #ffffff;
}

.badge-status.offline {
    background: rgba(198, 40, 40, 0.35);
    border: 1px solid #ef5350;
    color: #ffffff;
    animation: blinkOffline 2s infinite;
}

@keyframes blinkOffline {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.dot-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.badge-status.online .dot-status {
    background-color: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}

.badge-status.offline .dot-status {
    background-color: #f87171;
    box-shadow: 0 0 8px #f87171;
}

/* Botón de Sincronización Offline */
.btn-sync-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    border-radius: 20px;
    padding: 5px 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-sync-badge svg {
    width: 15px;
    height: 15px;
}

.btn-sync-badge.has-pending {
    background: #f59e0b;
    border-color: #fbbf24;
    color: #78350f;
    font-weight: 700;
    animation: pulseSync 2s infinite;
}

@keyframes pulseSync {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* Selector de Rol de Usuario */
.role-selector-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 2px 10px;
}

.role-selector-box select {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    padding: 4px 0;
}

.role-selector-box select option {
    background: #0d47a1;
    color: #ffffff;
}

/* ==========================================================================
   MENÚ LATERAL DESLIZANTE (SIDEBAR / OFFCANVAS)
   ========================================================================== */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.activo {
    opacity: 1;
    visibility: visible;
}

.sidebar-offcanvas {
    position: fixed;
    top: 0;
    left: -330px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #0b3c8a;
    color: #ffffff;
    z-index: 10000;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar-offcanvas.activo {
    left: 0;
}

.sidebar-header {
    padding: 18px 20px;
    background: #092f6d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
}

.sidebar-brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

.sidebar-brand-sub {
    font-size: 0.74rem;
    color: #bbdefb;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-user-card {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 2px 0;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: #90caf9;
    display: inline-block;
}

/* Lista de Módulos en el Sidebar */
.sidebar-nav-list {
    list-style: none;
    padding: 10px 12px;
    margin: 0;
    flex: 1;
}

.sidebar-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #90caf9;
    padding: 10px 10px 4px 10px;
    font-weight: 700;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 46px; /* Tactilidad cómoda para tablet */
    border: 1px solid transparent;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar-nav-link.active {
    background: #ffffff;
    color: #0d47a1;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #90caf9;
}

.sidebar-nav-link.active svg {
    color: #0d47a1;
}

.sidebar-num-fase {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.sidebar-nav-link.active .sidebar-num-fase {
    background: #0d47a1;
    color: #ffffff;
}

.sidebar-admin-item {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
}

.sidebar-admin-item .sidebar-nav-link {
    color: #fef3c7;
}

.sidebar-admin-item .sidebar-nav-link svg {
    color: #f59e0b;
}

.sidebar-badge-admin {
    background: #f59e0b;
    color: #78350f;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: auto;
}

.sidebar-footer {
    padding: 14px 20px;
    background: #092f6d;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #90caf9;
    text-align: center;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL Y PANELES
   ========================================================================== */
.contenedor {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.registro {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.registro.activo {
    display: block;
}

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

/* ==========================================================================
   CABECERA DE MÓDULO Y BARRA DE ACCIONES DE EXPORTACIÓN
   ========================================================================== */
.header-modulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 14px;
}

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

.header-modulo .modulo-icono {
    background: var(--primary-light);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-modulo .modulo-icono svg {
    width: 24px;
    height: 24px;
}

.header-modulo h6 {
    font-size: 1.22rem;
    color: var(--primary-color);
    margin: 0;
}

.header-modulo .modulo-subtitulo {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Botones Táctiles de Exportación e Impresión en Cada Módulo */
.modulo-acciones-exportar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-exportar {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.btn-exportar:active {
    transform: scale(0.97);
}

.btn-exportar svg {
    width: 16px;
    height: 16px;
}

.btn-exportar.btn-pdf {
    background: #0d47a1;
    color: #ffffff;
    border: 1px solid #0a3880;
    box-shadow: 0 2px 4px rgba(13, 71, 161, 0.2);
    font-weight: 700;
}

.btn-exportar.btn-pdf:hover {
    background: #1565c0;
    color: #ffffff;
    border-color: #0d47a1;
}

.btn-exportar.btn-pdf svg {
    color: #ffffff;
}

.btn-exportar.btn-portada {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.btn-exportar.btn-portada:hover {
    background: #fde68a;
}

/* ==========================================================================
   TARJETAS DE TRABAJO Y FORMULARIO
   ========================================================================== */
.tarjeta-trabajo, .card-operativa {
    background: #ffffff;
    border: 1px solid #cfd8dc;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.tarjeta-trabajo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #cfd8dc;
    flex-wrap: wrap;
    gap: 8px;
}

.tarjeta-trabajo-header h5 {
    font-size: 1rem;
    margin: 0;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tarjeta-trabajo-header h5 svg {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-grupo label {
    font-size: 0.83rem;
    font-weight: 700;
    color: #455a64;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-grupo label .req {
    color: var(--danger-color);
}

.contenedor-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    padding: 8px 12px;
    min-height: 48px; /* Óptimo para tablet táctil */
    transition: all 0.2s ease;
}

.contenedor-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.12);
}

.contenedor-input.input-disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

.contenedor-input svg {
    width: 20px;
    height: 20px;
    color: #546e7a;
    margin-right: 10px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.contenedor-input:focus-within svg {
    color: var(--primary-color);
}

.contenedor-input input,
.contenedor-input select,
.contenedor-input textarea {
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    background: transparent;
    color: #1e293b;
    padding: 2px 0;
}

.contenedor-boton {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(13, 71, 161, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #607d8b;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-success {
    background-color: var(--success-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    cursor: pointer;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger {
    background-color: var(--danger-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
    min-height: 36px;
}

/* ==========================================================================
   DASHBOARD DE ADMINISTRACIÓN (MÉTRICAS Y SEMÁFOROS)
   ========================================================================== */
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.card-kpi {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.card-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.card-kpi.kpi-success::before { background: var(--success-color); }
.card-kpi.kpi-warning::before { background: var(--warning-color); }
.card-kpi.kpi-danger::before { background: var(--danger-color); }
.card-kpi.kpi-info::before { background: var(--accent-color); }

.card-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-kpi-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.card-kpi-valor {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 8px;
}

.card-kpi-sub {
    font-size: 0.8rem;
    color: #64748b;
}

/* Barras de Progreso de Ocupación */
.progress-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-bar-fill.fill-success { background: var(--success-color); }
.progress-bar-fill.fill-warning { background: var(--warning-color); }
.progress-bar-fill.fill-danger { background: var(--danger-color); }

.dashboard-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.badge-estadia-dias {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-estadia-dias.critico {
    background: #fee2e2;
    color: #991b1b;
}

.badge-estadia-dias.normal {
    background: #f1f5f9;
    color: #334155;
}

/* Alerta de Rol Restringido para Administrador */
.banner-admin-lock {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.banner-admin-lock svg {
    width: 32px;
    height: 32px;
    color: #d97706;
    flex-shrink: 0;
}

.banner-admin-lock h5 {
    color: #92400e;
    margin: 0 0 4px 0;
}

.banner-admin-lock p {
    color: #78350f;
    margin: 0;
    font-size: 0.88rem;
}

/* ==========================================================================
   CARGA MASIVA POR LOTES (PRE-INGRESO)
   ========================================================================== */
.lote-upload-area {
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 18px;
    transition: all 0.2s ease;
}

.lote-upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.lote-upload-area svg {
    width: 44px;
    height: 44px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.lote-acciones-rapidas {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tabla-lote-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.tabla-lote-items thead tr {
    background: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
}

.tabla-lote-items th {
    padding: 9px 12px;
    text-align: left;
    color: #334155;
}

.tabla-lote-items td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   MATRIZ DE COTEJO (ARRIBADOS VS FALTANTES)
   ========================================================================== */
.cotejo-resumen-metricas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metrica-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.metrica-card.total { border-left: 5px solid var(--primary-color); }
.metrica-card.arribados { border-left: 5px solid var(--success-color); background: #f1fbf3; }
.metrica-card.faltantes { border-left: 5px solid var(--warning-color); background: #fffcf0; }

.metrica-valor {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.metrica-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.cotejo-tabs-filtros {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.btn-tab-filtro {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 7px 16px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.86rem;
    color: #475569;
    cursor: pointer;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tab-filtro.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.cotejo-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.cotejo-item-card.arribado {
    border-color: #86efac;
    background: #fcfdfc;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.cotejo-item-card.faltante {
    border-color: #fde68a;
    background: #fffdf5;
}

.cotejo-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.badge-contenedor-id {
    background: #0f172a;
    color: #ffffff;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 5px 10px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

.cotejo-item-checks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

.pill-toggle-container {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #ffffff;
}

.pill-toggle-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: #64748b;
    cursor: pointer;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pill-toggle-btn.active.buen-estado,
.pill-toggle-btn.active.coincide {
    background: var(--success-color);
    color: #ffffff;
}

.pill-toggle-btn.active.averiado,
.pill-toggle-btn.active.discrepante {
    background: var(--danger-color);
    color: #ffffff;
}

.btn-toggle-arribo {
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
}

.btn-toggle-arribo.marcar-arribado {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.btn-toggle-arribo.marcar-faltante {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   CHIPS DE CÓDIGOS DE DAÑOS Y FIRMAS
   ========================================================================== */
.catalogo-danos-wrapper {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

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

.chip-dano {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    padding: 8px 14px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    min-height: 42px;
}

.chip-dano.chip-sin-dano.selected {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.chip-dano.selected:not(.chip-sin-dano) {
    background: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
}

.chip-dano .code-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.chip-dano.selected .code-badge {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.firma-digital-box {
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.canvas-firma-contenedor {
    border: 2px dashed #94a3b8;
    border-radius: var(--radius-sm);
    background: #ffffff;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    touch-action: none;
}

.canvas-firma-contenedor canvas {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
}

.firmas-grid-dual {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   PORTADA DE EXPEDIENTE (CARÁTULA VERTICAL)
   ========================================================================== */
.portada-expediente-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.portada-expediente-modal.activo {
    display: flex;
}

.portada-hoja-vertical {
    background: #ffffff;
    width: 100%;
    max-width: 650px;
    min-height: 850px;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 4px solid #0d47a1;
}

.portada-encabezado-institucional {
    text-align: center;
    border-bottom: 3px double #0d47a1;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.portada-encabezado-institucional h3 {
    margin: 0;
    color: #0d47a1;
    font-size: 1.3rem;
}

.portada-encabezado-institucional h2 {
    margin: 6px 0;
    color: #1e293b;
    font-size: 1.45rem;
    letter-spacing: 0.5px;
}

.portada-datos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.portada-dato-fila {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 5px solid #0d47a1;
    font-size: 0.95rem;
}

.portada-dato-fila strong {
    color: #0d47a1;
}

.portada-pie-qr {
    text-align: center;
    padding-top: 20px;
    border-top: 2px dashed #cbd5e1;
}

/* ==========================================================================
   CIERRE PRECINTO DE DESPACHO
   ========================================================================== */
.cierre-precinto-destacado {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2.5px solid #d97706;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.cierre-precinto-destacado .contenedor-input {
    border-color: #d97706;
    background: #ffffff;
    min-height: 56px;
}

.cierre-precinto-destacado .contenedor-input input {
    font-size: 1.25rem;
    font-weight: 700;
    color: #b45309;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN OFICIAL (@media print)
   ========================================================================== */
@media print {
    body {
        background: #ffffff;
        padding: 0;
        margin: 0;
        color: #000000;
    }

    .top-bar-institucional,
    .sidebar-offcanvas,
    .sidebar-backdrop,
    .modulo-acciones-exportar,
    .contenedor-boton,
    .btn-secondary,
    .btn-primary,
    .cotejo-tabs-filtros,
    .banner-regla-exclusion {
        display: none !important;
    }

    .contenedor {
        box-shadow: none;
        border: none;
        padding: 0;
        max-width: 100%;
    }

    .registro {
        display: none !important;
    }

    .registro.activo {
        display: block !important;
    }

    .tarjeta-trabajo {
        border: 1px solid #94a3b8;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .portada-hoja-vertical {
        border: 2px solid #000;
        box-shadow: none;
        max-width: 100%;
        min-height: auto;
    }
}

/* ==========================================================================
   ESTILOS DE BOTÓN PDF REACTIVO Y SUBSISTEMA DE REPORTES / TOC
   ========================================================================== */
.btn-exportar.btn-pdf-bloqueado,
.btn-exportar.btn-pdf[disabled] {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.8 !important;
}

.btn-exportar.btn-pdf-bloqueado svg,
.btn-exportar.btn-pdf[disabled] svg {
    color: #94a3b8 !important;
}

.btn-exportar.btn-pdf-listo {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    animation: pulsoVerdeCertificado 2s infinite ease-in-out;
}

.btn-exportar.btn-pdf-listo svg {
    color: #ffffff !important;
}

.banner-descarga-pdf-exitoso {
    margin-top: 18px;
    background: #ecfdf5;
    border: 1.5px solid #10b981;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    animation: fadeIn 0.3s ease;
}

.banner-descarga-pdf-exitoso strong {
    color: #065f46;
    font-size: 0.98rem;
    display: block;
    margin-bottom: 3px;
}

.banner-descarga-pdf-exitoso span {
    color: #047857;
    font-size: 0.84rem;
}

.banner-descarga-pdf-exitoso .btn-descarga-inmediata {
    background: #059669;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
    transition: all 0.2s ease;
}

.banner-descarga-pdf-exitoso .btn-descarga-inmediata:hover {
    background: #047857;
    transform: translateY(-1px);
}

@keyframes pulsoVerdeCertificado {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.variable-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #1e293b;
    font-weight: 600;
}

.variable-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0d47a1;
    cursor: pointer;
}

/* ==========================================================================
   RESPONSIVIDAD TABLETS
   ========================================================================== */
@media (max-width: 900px) {
    body { padding: 10px; }
    .contenedor { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .dashboard-split-grid { grid-template-columns: 1fr; }
    .top-bar-institucional { flex-direction: column; align-items: flex-start; }
    .top-bar-right { width: 100%; justify-content: space-between; }
}


/* ==========================================================================
   SECCIÓN: RECEPCIÓN DE BUQUE PUERTOS Y MATRIZ DE TRAZABILIDAD
   ========================================================================== */
.buque-tabs-subsecciones {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.btn-tab-subseccion {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-tab-subseccion:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-tab-subseccion.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.subseccion-buque-panel {
    display: none;
}

.subseccion-buque-panel.activo {
    display: block;
    animation: fadeIn 0.25s ease-in-out;
}

/* Métricas de Buque */
.buque-resumen-metricas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.metrica-buque-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.metrica-buque-valor {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
}

.metrica-buque-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

/* Filtros Buque */
.buque-filtros-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.buque-filtros-izq {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.tabla-buque-wrapper {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tabla-buque-puertos {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.tabla-buque-puertos th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    padding: 12px 14px;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

.tabla-buque-puertos td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.tabla-buque-puertos tr:hover td {
    background: #f8fafc;
}

/* Badges Estatus */
.badge-estatus-buque {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-estatus-esperando { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-estatus-gandola { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-estatus-almafalca { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-estatus-aip { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.badge-estatus-costado { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-estatus-directa { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }

.select-cambio-estatus {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.select-cambio-estatus:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

/* Botón Toggle Zona Primaria */
.btn-toggle-zona-primaria {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-toggle-zona-primaria.en-zona {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.btn-toggle-zona-primaria.en-zona:hover {
    background: #bbf7d0;
}

.btn-toggle-zona-primaria.despachado-zona {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}

.btn-toggle-zona-primaria.despachado-zona:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Recuadro Transferencias Buque en Pre-Aviso */
.recuadro-transferencias-buque {
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border: 2px solid #38bdf8;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.recuadro-transf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.recuadro-transf-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tabla-transferencias-buque {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.tabla-transferencias-buque th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.tabla-transferencias-buque td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.btn-confirmar-recepcion {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-confirmar-recepcion:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.btn-confirmar-recepcion.recibido {
    background: #16a34a;
    cursor: default;
    transform: none;
}

/* Tabs por tipo de carga en Matriz de Cotejo */
.cotejo-tipos-carga-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #cbd5e1;
}

.btn-tipo-carga-tab {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tipo-carga-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.btn-tipo-carga-tab.active {
    background: #0d47a1;
    color: #ffffff;
    border-color: #0d47a1;
    box-shadow: 0 2px 6px rgba(13, 71, 161, 0.25);
}

/* Botón Portada Expediente Físico */
.btn-portada-expediente {
    background: #475569;
    color: #ffffff;
    border: 1px solid #334155;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-portada-expediente:hover {
    background: #334155;
}

.btn-portada-expediente.btn-bloqueado {
    background: #e2e8f0;
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: not-allowed;
}


/* ==========================================================================
   LOS 6 ESTATUS OPERATIVOS ESENCIALES (VENEZUELA) Y 2 FLAGS DE EXCEPCIÓN
   ========================================================================== */
.badge-estatus-manifestada {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-estatus-recibida {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.badge-estatus-deposito {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.badge-estatus-inspeccion {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-estatus-levantada {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-estatus-despachada {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* FLAGS DE EXCEPCIÓN Y ALERTA (BLOQUEO Y REZAGO) */
.badge-flag-abandono {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.badge-flag-cautelar {
    background: #991b1b;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    animation: pulsoRojoCautelar 1.8s infinite;
}

@keyframes pulsoRojoCautelar {
    0% { box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(153, 27, 27, 0); }
    100% { box-shadow: 0 0 0 0 rgba(153, 27, 27, 0); }
}

/* BARRA DE ACCIÓN POR LOTE (EXCLUSIVA ADMINISTRADOR) */
.buque-batch-toolbar {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
    animation: fadeIn 0.2s ease-in-out;
}

.buque-batch-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-batch-primaria {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-batch-primaria:hover {
    background: #059669;
}

.btn-batch-despacho {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-batch-despacho:hover {
    background: #dc2626;
}

/* ==========================================================================
   PANELES DE PRECARGA OPERATIVA (CERO RETIPEO - SIMPLIFICACIÓN EXTREMA)
   ========================================================================== */
.panel-precarga-operativa {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 2px solid #93c5fd;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.05);
}

.panel-precarga-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-precarga-titulo {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.panel-precarga-sub {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0 0 10px 0;
}

.carrusel-cargas-precarga {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.card-carga-precarga {
    flex: 0 0 260px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-carga-precarga:hover {
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.card-carga-precarga.activa {
    border: 2px solid #10b981;
    background: #f0fdf4;
}

.card-carga-bl {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 4px;
}

.card-carga-equipo {
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 4px;
}

.card-carga-detalle {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.3;
    margin-bottom: 8px;
}

.btn-seleccionar-precarga {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-seleccionar-precarga:hover {
    background: #0369a1;
}

.card-carga-precarga.activa .btn-seleccionar-precarga {
    background: #10b981;
}

/* BANNERS DE MEDIDA CAUTELAR Y ABANDONO LEGAL EN DESPACHO */
.banner-cautelar-bloqueo {
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 12px 16px;
    color: #991b1b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-abandono-alerta {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    color: #92400e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
