/*
  Aviacargo Express · Dashboard Modern V1 · Fase 1 visual
  Alcance: estructura exterior, navegación, encabezado y presentación general.
  No modifica ids, data-tab, eventos, permisos, cálculos ni datos.
*/
:root{
  --dash-navy:#062b5f;
  --dash-navy-2:#0a438c;
  --dash-blue:#0b66c3;
  --dash-blue-soft:#eaf3ff;
  --dash-red:#df2638;
  --dash-ink:#10233e;
  --dash-muted:#667892;
  --dash-line:#dbe7f5;
  --dash-bg:#f4f8fd;
  --dash-card:#ffffff;
  --dash-sidebar:258px;
  --dash-radius:18px;
  --dash-shadow:0 16px 38px rgba(6,43,95,.08);
}

body:not(.auth-locked){
  background:linear-gradient(135deg,#f7fbff 0%,#eef5fc 45%,#f8fbff 100%)!important;
  color:var(--dash-ink);
}

body:not(.auth-locked) .app,
body:not(.auth-locked) .shell,
body:not(.auth-locked) .top-frame{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

body:not(.auth-locked) .app{padding:0!important;}
body:not(.auth-locked) .shell{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}

/* Estructura: encabezado superior + navegación lateral + módulo activo. */
body:not(.auth-locked) .top-frame{
  min-height:100vh;
  display:grid!important;
  grid-template-columns:var(--dash-sidebar) minmax(0,1fr);
  grid-template-rows:76px minmax(calc(100vh - 76px),auto);
  align-items:start;
  gap:0;
  background:var(--dash-bg);
}

/* Encabezado azul corporativo. */
body:not(.auth-locked) .browser-bar.compact-header{
  grid-column:1/-1;
  grid-row:1;
  position:sticky!important;
  top:0;
  z-index:1200;
  min-height:76px!important;
  height:76px!important;
  padding:0 26px!important;
  display:flex!important;
  align-items:center!important;
  gap:22px!important;
  overflow:visible!important;
  color:#fff!important;
  background:linear-gradient(115deg,#052b61 0%,#074b9f 58%,#0759b6 100%)!important;
  border:0!important;
  box-shadow:0 10px 30px rgba(4,35,77,.22)!important;
}
body:not(.auth-locked) .browser-bar.compact-header::after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:1px;
  background:rgba(255,255,255,.14);
}
body:not(.auth-locked) .browser-bar.compact-header .header-left{
  width:auto!important;min-width:270px!important;height:76px!important;flex:0 0 auto!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;
}
body:not(.auth-locked) .browser-bar.compact-header .top-logo,
body:not(.auth-locked) .brand-logo.top-logo{
  content:url('../assets/v106-logo-horizontal-clean.png')!important;
  width:168px!important;min-width:168px!important;max-width:168px!important;height:58px!important;max-height:58px!important;
  object-fit:contain!important;filter:brightness(0) invert(1) drop-shadow(0 4px 10px rgba(0,0,0,.16))!important;
}
body:not(.auth-locked) .browser-bar.compact-header .browser-title{display:none!important;}
body:not(.auth-locked) .browser-bar.compact-header .header-actions{
  margin-left:auto!important;flex:1 1 auto!important;min-width:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:nowrap!important;
}
body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip{
  order:10;height:44px!important;min-height:44px!important;max-width:235px!important;padding:0 14px!important;border-radius:13px!important;
  color:#fff!important;background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.22)!important;box-shadow:none!important;
  backdrop-filter:blur(10px);
}
body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip::before{
  content:"";width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:linear-gradient(135deg,#fff,#cfe5ff);box-shadow:inset 0 0 0 2px rgba(255,255,255,.55);
}
body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip .role{color:#cfe6ff!important;}
body:not(.auth-locked) .browser-bar.compact-header .portal-action-btn,
body:not(.auth-locked) .browser-bar.compact-header .portal-logout-btn,
body:not(.auth-locked) .portal-action-btn,
body:not(.auth-locked) .portal-logout-btn{
  height:38px!important;min-height:38px!important;padding:0 10px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#eef7ff!important;box-shadow:none!important;font-size:12px!important;font-weight:800!important;border-bottom:0!important;
}
body:not(.auth-locked) .browser-bar.compact-header .portal-action-btn:hover,
body:not(.auth-locked) .browser-bar.compact-header .portal-logout-btn:hover{
  background:rgba(255,255,255,.12)!important;color:#fff!important;transform:none!important;border-bottom:0!important;
}
body:not(.auth-locked) #btnPortalLogout{background:rgba(255,255,255,.12)!important;padding:0 14px!important;}

/* Campana: reutiliza la alerta operacional existente sin cambiar su función. */
body:not(.auth-locked) #operationalReviewAlert{
  position:fixed!important;right:252px;top:20px;z-index:1300!important;width:38px!important;height:38px!important;min-width:38px!important;border-radius:12px!important;
  border:1px solid rgba(255,255,255,.2)!important;background:rgba(255,255,255,.10)!important;color:#fff!important;box-shadow:none!important;margin:0!important;
}
body:not(.auth-locked) #operationalReviewAlert::before{content:"🔔";font-size:17px;line-height:1;}
body:not(.auth-locked) #operationalReviewAlert span{
  position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--dash-red);color:#fff;font-size:11px;display:grid;place-items:center;border:2px solid #0751a6;
}

/* Navegación lateral. */
body:not(.auth-locked) .tabs[role="tablist"]{
  grid-column:1;
  grid-row:2;
  position:sticky!important;
  top:76px;
  align-self:start;
  height:calc(100vh - 76px);
  min-height:calc(100vh - 76px)!important;
  padding:18px 14px 20px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:5px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  border:0!important;
  border-right:1px solid var(--dash-line)!important;
  box-shadow:8px 0 24px rgba(6,43,95,.035)!important;
  scrollbar-width:thin!important;
  z-index:600;
}
body:not(.auth-locked) .dashboard-nav-brand{
  display:flex;align-items:center;gap:10px;margin:0 2px 15px;padding:12px;border:1px solid #dce9f7;border-radius:15px;background:linear-gradient(135deg,#f8fbff,#edf6ff);color:var(--dash-navy);
}
body:not(.auth-locked) .dashboard-nav-mark{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(135deg,var(--dash-blue),var(--dash-navy));color:#fff;font-size:18px;}
body:not(.auth-locked) .dashboard-nav-brand strong{display:block;font-size:13px;line-height:1.15;}
body:not(.auth-locked) .dashboard-nav-brand small{display:block;margin-top:3px;color:var(--dash-muted);font-size:10px;}
body:not(.auth-locked) .dashboard-nav-label{
  margin:14px 10px 5px;color:#1c5ca5;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;
}
body:not(.auth-locked) .dashboard-nav-label:first-of-type{margin-top:0;}
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn,
body:not(.auth-locked) .tabs[role="tablist"] .tab-clientes-prioridad{
  position:relative!important;width:100%!important;min-width:0!important;min-height:42px!important;height:42px!important;flex:0 0 42px!important;
  padding:0 12px 0 44px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;
  border:0!important;border-radius:12px!important;background:transparent!important;color:#18365d!important;box-shadow:none!important;
  font-size:13px!important;font-weight:750!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn::before{
  position:absolute;left:13px;top:50%;transform:translateY(-50%);width:21px;text-align:center;font-size:17px;line-height:1;filter:saturate(.75);
}
body:not(.auth-locked) .tabs .tab-btn[data-tab="clientes"]::before{content:"♙";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="cotizacion"]::before{content:"▤";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="cotizaRapido"]::before{content:"ϟ";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="reportes"]::before{content:"▣";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="tracking"]::before{content:"⌖";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="rastreoPublico"]::before{content:"⌕";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="ventas"]::before{content:"↗";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="valores"]::before{content:"◇";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="ingreso"]::before{content:"♢";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="vuelos"]::before{content:"✈";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="auditoria"]::before{content:"▧";}
body:not(.auth-locked) .tabs .tab-btn[data-tab="usuarios"]::before{content:"♧";}
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn:hover{
  background:#edf5ff!important;color:var(--dash-blue)!important;transform:none!important;border:0!important;
}
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn.active,
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn[aria-selected="true"]{
  color:#fff!important;background:linear-gradient(135deg,#075db9,#084790)!important;box-shadow:0 8px 18px rgba(7,83,168,.18)!important;border:0!important;
}
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn.active::after,
body:not(.auth-locked) .tabs[role="tablist"] .tab-btn[aria-selected="true"]::after{display:none!important;}

/* Área principal: conserva cada módulo, mejora la envolvente. */
body:not(.auth-locked) .top-frame > .tab-panel{
  grid-column:2;
  grid-row:2;
  width:100%;
  min-width:0;
  padding:22px 24px 36px!important;
  background:transparent!important;
  overflow-x:hidden!important;
}
body:not(.auth-locked) .top-frame > .tab-panel.hidden{display:none!important;}
body:not(.auth-locked) .placeholder-card,
body:not(.auth-locked) .module-card{
  border:1px solid var(--dash-line)!important;
  border-radius:var(--dash-radius)!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:var(--dash-shadow)!important;
}
body:not(.auth-locked) .placeholder-card > div:first-child h2{
  color:var(--dash-navy)!important;font-size:22px!important;letter-spacing:-.025em!important;
}
body:not(.auth-locked) .placeholder-card > div:first-child p{color:var(--dash-muted)!important;}
body:not(.auth-locked) .module-frame{border-radius:14px!important;background:#fff!important;}
body:not(.auth-locked) .btn{border-radius:11px!important;}
body:not(.auth-locked) input,
body:not(.auth-locked) select,
body:not(.auth-locked) textarea{border-radius:11px;}

/* Desktop intermedio: compacta acciones sin modificar comportamiento. */
@media(max-width:1280px){
  :root{--dash-sidebar:232px;}
  body:not(.auth-locked) .browser-bar.compact-header{padding:0 18px!important;gap:14px!important;}
  body:not(.auth-locked) .browser-bar.compact-header .header-left{min-width:225px!important;}
  body:not(.auth-locked) .browser-bar.compact-header .top-logo,body:not(.auth-locked) .brand-logo.top-logo{width:145px!important;min-width:145px!important;max-width:145px!important;}
  body:not(.auth-locked) .browser-bar.compact-header .portal-action-btn,body:not(.auth-locked) .browser-bar.compact-header .portal-logout-btn{font-size:11px!important;padding:0 7px!important;}
  body:not(.auth-locked) #operationalReviewAlert{right:226px;}
}

/* Tablet y móvil: navegación horizontal desplazable, sin ocultar módulos permitidos. */
@media(max-width:980px){
  body:not(.auth-locked) .top-frame{display:block!important;min-height:100vh;}
  body:not(.auth-locked) .browser-bar.compact-header{position:sticky!important;height:auto!important;min-height:70px!important;padding:10px 14px!important;flex-wrap:wrap!important;}
  body:not(.auth-locked) .browser-bar.compact-header .header-left{height:50px!important;min-width:170px!important;}
  body:not(.auth-locked) .browser-bar.compact-header .top-logo,body:not(.auth-locked) .brand-logo.top-logo{width:132px!important;min-width:132px!important;max-width:132px!important;height:48px!important;}
  body:not(.auth-locked) .browser-bar.compact-header .header-actions{width:100%!important;justify-content:flex-start!important;overflow-x:auto!important;padding-bottom:2px;}
  body:not(.auth-locked) #operationalReviewAlert{position:absolute!important;right:14px;top:15px;}
  body:not(.auth-locked) .tabs[role="tablist"]{
    position:sticky!important;top:0!important;width:100%!important;height:auto!important;min-height:58px!important;padding:8px 10px!important;display:flex!important;flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;border-right:0!important;border-bottom:1px solid var(--dash-line)!important;
  }
  body:not(.auth-locked) .dashboard-nav-brand,body:not(.auth-locked) .dashboard-nav-label{display:none!important;}
  body:not(.auth-locked) .tabs[role="tablist"] .tab-btn,body:not(.auth-locked) .tabs[role="tablist"] .tab-clientes-prioridad{width:auto!important;min-width:max-content!important;height:40px!important;min-height:40px!important;flex:0 0 auto!important;padding:0 13px 0 38px!important;}
  body:not(.auth-locked) .tabs[role="tablist"] .tab-btn::before{left:11px;}
  body:not(.auth-locked) .top-frame > .tab-panel{padding:14px 10px 28px!important;}
}

@media(max-width:620px){
  body:not(.auth-locked) .browser-bar.compact-header .portal-action-btn{display:none!important;}
  body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip{order:1;max-width:210px!important;}
  body:not(.auth-locked) #btnPortalLogout{margin-left:auto!important;}
  body:not(.auth-locked) .placeholder-card{border-radius:14px!important;padding:12px!important;}
  body:not(.auth-locked) .top-frame > .tab-panel{padding-left:7px!important;padding-right:7px!important;}
}

/* V150 · Tablas operativas utilizables desde celular. */
@media(max-width:760px){
  body:not(.auth-locked) .audit-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    -webkit-overflow-scrolling:touch;
    position:relative;
  }
  body:not(.auth-locked) .audit-table{
    min-width:980px!important;
  }
  body:not(.auth-locked) .audit-table th:last-child,
  body:not(.auth-locked) .audit-table td:last-child{
    position:sticky;
    right:0;
    z-index:2;
    background:#fff;
    box-shadow:-8px 0 12px rgba(6,43,95,.08);
  }
  body:not(.auth-locked) .audit-table th:last-child{
    z-index:3;
    background:#f3f8fe;
  }
  body:not(.auth-locked) .audit-table td:last-child .btn,
  body:not(.auth-locked) .audit-table td:last-child button{
    min-height:36px!important;
    white-space:nowrap!important;
  }
  body:not(.auth-locked) #quoteHistorySearch,
  body:not(.auth-locked) #guideHistorySearch,
  body:not(.auth-locked) #quotePendingSearch{
    width:100%!important;
    min-width:0!important;
  }
}

/* ==========================================================
   Menú retráctil definitivo V2
   El botón se crea desde index-tabs-v103.js, archivo que el
   portal ya carga. No depende de modificar el index.html.
   ========================================================== */
:root{--avia-sidebar-open:258px;--avia-sidebar-closed:76px;}

/* Oculta visualmente la barra vertical, manteniendo rueda/touch. */
body:not(.auth-locked) .tabs[role="tablist"]{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
body:not(.auth-locked) .tabs[role="tablist"]::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}

/* Botón real, fuera del contenedor con scroll para que no se recorte. */
body:not(.auth-locked) .avia-sidebar-collapse-toggle{
  position:fixed!important;
  left:calc(var(--avia-sidebar-open) - 16px)!important;
  top:96px!important;
  z-index:99999!important;
  width:34px!important;
  height:42px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:2px solid #fff!important;
  border-radius:0 12px 12px 0!important;
  background:#075db9!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(6,43,95,.28)!important;
  cursor:pointer!important;
  font:900 27px/1 Arial,sans-serif!important;
  opacity:1!important;
  visibility:visible!important;
}
body:not(.auth-locked) .avia-sidebar-collapse-toggle:hover{background:#df2638!important;}
body:not(.auth-locked) .avia-sidebar-collapse-toggle span{display:block;transform:translateY(-1px);}

/* Contracción real de la primera columna y ampliación del módulo. */
body:not(.auth-locked).avia-sidebar-is-collapsed .top-frame{
  grid-template-columns:var(--avia-sidebar-closed) minmax(0,1fr)!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .avia-sidebar-collapse-toggle{
  left:calc(var(--avia-sidebar-closed) - 16px)!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"]{
  padding-left:9px!important;
  padding-right:9px!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-brand,
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-label{
  display:none!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"] .tab-btn,
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"] .tab-clientes-prioridad{
  width:56px!important;
  min-width:56px!important;
  max-width:56px!important;
  padding:0!important;
  justify-content:center!important;
  color:transparent!important;
  text-indent:-9999px!important;
  overflow:hidden!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"] .tab-btn::before{
  left:50%!important;
  transform:translate(-50%,-50%)!important;
  color:#18365d!important;
  text-indent:0!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"] .tab-btn.active::before,
body:not(.auth-locked).avia-sidebar-is-collapsed .tabs[role="tablist"] .tab-btn[aria-selected="true"]::before{
  color:#fff!important;
}

/* Marca escrita junto al avión, independiente del contenido de la imagen. */
body:not(.auth-locked) .avia-header-wordmark{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:118px!important;
  margin-left:2px!important;
  line-height:.92!important;
  white-space:nowrap!important;
}
body:not(.auth-locked) .avia-header-wordmark strong{
  color:#fff!important;
  font-size:16px!important;
  font-weight:950!important;
  letter-spacing:.02em!important;
}
body:not(.auth-locked) .avia-header-wordmark em{
  margin-top:5px!important;
  color:#ffb8c1!important;
  font-size:11px!important;
  font-style:normal!important;
  font-weight:950!important;
  letter-spacing:.20em!important;
}

@media(max-width:1280px){:root{--avia-sidebar-open:232px;}}
@media(max-width:980px){
  body:not(.auth-locked) .avia-sidebar-collapse-toggle{display:none!important;}
  body:not(.auth-locked).avia-sidebar-is-collapsed .top-frame{display:block!important;}
  body:not(.auth-locked) .avia-header-wordmark{display:none!important;}
}

/* ==========================================================
   AVIACARGO · CORRECCIÓN VISUAL DIRECTA V2
   Solo corrige tres detalles visuales del dashboard existente.
   ========================================================== */

/* 1) Quita completamente la marca repetida del extremo superior izquierdo. */
body:not(.auth-locked) .browser-bar.compact-header .dashboard-header-brand,
body:not(.auth-locked) .browser-bar.compact-header .dashboard-header-brand-copy,
body:not(.auth-locked) .browser-bar.compact-header .avia-header-wordmark,
body:not(.auth-locked) .browser-bar.compact-header .browser-title,
body:not(.auth-locked) .browser-bar.compact-header .window-dots{
  display:none!important;
}

body:not(.auth-locked) .browser-bar.compact-header .header-left{
  width:0!important;
  min-width:0!important;
  max-width:0!important;
  flex:0 0 0!important;
  gap:0!important;
  overflow:visible!important;
}

/* 2) Convierte el icono azul lateral en el logo corporativo real. */
body:not(.auth-locked) .dashboard-nav-brand{
  min-height:66px!important;
  padding:10px 40px 10px 10px!important;
  gap:10px!important;
  overflow:visible!important;
}

body:not(.auth-locked) .dashboard-nav-mark{
  display:block!important;
  width:58px!important;
  min-width:58px!important;
  height:42px!important;
  flex:0 0 58px!important;
  border:0!important;
  border-radius:10px!important;
  background-color:#fff!important;
  background-image:url('../assets/aviacargoexpress-avion-clean-v72.png')!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:contain!important;
  box-shadow:0 4px 10px rgba(6,43,95,.08)!important;
  color:transparent!important;
  font-size:0!important;
  line-height:0!important;
  overflow:hidden!important;
}

/* 3) Separa Salir, campana y usuario para evitar que se peguen. */
body:not(.auth-locked) .browser-bar.compact-header .header-actions{
  margin-left:auto!important;
  padding-left:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:14px!important;
  flex-wrap:nowrap!important;
  overflow:visible!important;
}

body:not(.auth-locked) #btnPortalLogout{
  order:20!important;
  position:relative!important;
  flex:0 0 auto!important;
  margin:0 4px 0 0!important;
  padding:0 15px!important;
  z-index:2!important;
}

body:not(.auth-locked) #operationalReviewAlert{
  order:30!important;
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  margin:0 5px!important;
  transform:none!important;
  z-index:3!important;
}

body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip{
  order:40!important;
  position:relative!important;
  flex:0 0 auto!important;
  min-width:198px!important;
  max-width:270px!important;
  margin:0 0 0 5px!important;
  padding:0 14px!important;
  z-index:2!important;
}

/* Mantiene el logo lateral visible incluso con menú contraído. */
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-brand{
  display:flex!important;
  justify-content:center!important;
  padding:8px 3px!important;
  margin:0 0 12px!important;
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}

body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-brand-copy,
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-sidebar-toggle{
  display:none!important;
}

body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-mark{
  width:54px!important;
  min-width:54px!important;
  height:42px!important;
  flex-basis:54px!important;
}

@media(max-width:1280px){
  body:not(.auth-locked) .browser-bar.compact-header .header-actions{
    gap:10px!important;
    padding-left:10px!important;
  }
  body:not(.auth-locked) .browser-bar.compact-header .portal-user-chip{
    min-width:180px!important;
    max-width:230px!important;
  }
}

@media(max-width:980px){
  body:not(.auth-locked) .browser-bar.compact-header .header-left{
    display:none!important;
  }
  body:not(.auth-locked) .browser-bar.compact-header .header-actions{
    width:100%!important;
    padding-left:0!important;
    justify-content:flex-start!important;
    gap:8px!important;
    overflow-x:auto!important;
  }
}

/* AVIACARGO · LOGO LATERAL SOLO AVIÓN V1 */
body:not(.auth-locked) .dashboard-nav-mark{
  width:48px!important;
  min-width:48px!important;
  height:42px!important;
  flex:0 0 48px!important;
  background-image:url('../assets/aviacargoexpress-avion-clean-v72.png')!important;
  background-size:44px auto!important;
  background-position:center!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-mark{
  width:54px!important;
  min-width:54px!important;
  flex-basis:54px!important;
  background-size:46px auto!important;
}

/* AVIACARGO · LOGO LATERAL SOLO AVIÓN · CORRECCIÓN V2 */
body:not(.auth-locked) .dashboard-nav-mark{
  width:50px!important;
  min-width:50px!important;
  max-width:50px!important;
  height:44px!important;
  flex:0 0 50px!important;
  background-image:url('../assets/aviacargoexpress-avion-clean-v72.png')!important;
  background-repeat:no-repeat!important;
  background-size:118px auto!important;
  background-position:left center!important;
  background-color:#fff!important;
  color:transparent!important;
  font-size:0!important;
  overflow:hidden!important;
}
body:not(.auth-locked).avia-sidebar-is-collapsed .dashboard-nav-mark{
  width:54px!important;
  min-width:54px!important;
  max-width:54px!important;
  flex-basis:54px!important;
  background-size:124px auto!important;
  background-position:left center!important;
}


/* V176: estabilidad de paneles y tablas. La navegación es la única que muestra un módulo. */
body:not(.auth-locked) .top-frame > .tab-panel[hidden],
body:not(.auth-locked) .top-frame > .tab-panel.hidden,
body:not(.auth-locked) .top-frame > .tab-panel[aria-hidden="true"]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body:not(.auth-locked) .top-frame > .tab-panel:not(.hidden):not([hidden]){
  visibility:visible!important;
  pointer-events:auto!important;
}
@media (min-width:981px){
  body:not(.auth-locked) .audit-table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
  }
  body:not(.auth-locked) .audit-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }
  body:not(.auth-locked) .audit-table th,
  body:not(.auth-locked) .audit-table td{
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    padding-left:9px!important;
    padding-right:9px!important;
  }
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(1){width:17%}
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(2){width:15%}
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(3){width:16%}
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(4){width:17%}
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(5){width:13%}
  body:not(.auth-locked) #panelAuditoria .audit-table th:nth-child(6){width:22%}
}
