/* RepuestoApp · Fase 1 responsive mobile-first
   Capa aislada: no modifica la lógica ni la experiencia de escritorio. */

.mobile-pos-dock{display:none}
.mobile-only{display:none!important}

@media (max-width:1024px){
  html,body{max-width:100%;overflow-x:hidden}
  body.repuestoapp-light{min-width:0}
  body.repuestoapp-light.mobile-nav-open{overflow:hidden}

  body.repuestoapp-light .workspace{margin-left:0!important;min-width:0;width:100%}
  body.repuestoapp-light .sidebar{
    width:min(86vw,320px)!important;
    transform:translateX(-104%)!important;
    transition:transform .22s ease!important;
    z-index:80!important;
    box-shadow:18px 0 42px rgba(5,31,58,.28)!important;
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
  body.repuestoapp-light .sidebar.open{transform:translateX(0)!important}
  body.repuestoapp-light .sidebar-overlay{
    position:fixed!important;inset:0!important;z-index:70!important;
    background:rgba(5,25,46,.58)!important;backdrop-filter:blur(2px);
  }
  body.repuestoapp-light .sidebar-overlay.show{display:block!important}
  body.repuestoapp-light .side-nav a{min-height:48px!important;padding:11px 13px!important}
  body.repuestoapp-light .sidebar-scroll-hint{min-height:42px}

  body.repuestoapp-light .topbar{
    min-height:64px!important;height:auto!important;
    padding:8px 14px!important;gap:10px!important;
    position:sticky!important;top:0!important;z-index:60!important;
  }
  body.repuestoapp-light .menu-toggle{
    display:grid!important;place-items:center!important;flex:0 0 44px!important;
    width:44px!important;height:44px!important;border-radius:13px!important;
    font-size:0!important;background:linear-gradient(145deg,#0b75bd,#11b7cf)!important;
    border:1px solid rgba(255,255,255,.2)!important;color:#fff!important;
    box-shadow:0 8px 18px rgba(4,77,126,.2)!important;
  }
  body.repuestoapp-light .menu-toggle:before{content:"☰";font-size:22px;line-height:1;color:#fff}
  body.repuestoapp-light .topbar-title{min-width:0;flex:1}
  body.repuestoapp-light .topbar-title span{display:none!important}
  body.repuestoapp-light .topbar-title strong{
    display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-size:15px!important;color:#17385f!important;
  }
  body.repuestoapp-light .topbar-actions{gap:7px!important;flex:0 0 auto}
  body.repuestoapp-light .topbar-actions .status-dot{display:none!important}
  body.repuestoapp-light .topbar-actions>.icon-btn{width:42px!important;height:42px!important}

  body.repuestoapp-light .content{
    width:100%!important;max-width:none!important;min-width:0!important;
    padding:22px 18px calc(36px + env(safe-area-inset-bottom))!important;
  }
  body.repuestoapp-light .content>*{min-width:0}

  body.repuestoapp-light .section-head,
  body.repuestoapp-light .hero-panel{
    flex-direction:column!important;align-items:stretch!important;gap:14px!important;
  }
  body.repuestoapp-light .section-head{margin-bottom:18px!important}
  body.repuestoapp-light .section-head h1,
  body.repuestoapp-light .hero-panel h1{font-size:clamp(27px,5vw,36px)!important;line-height:1.08!important}
  body.repuestoapp-light .head-actions,
  body.repuestoapp-light .hero-actions,
  body.repuestoapp-light .sales-day-actions,
  body.repuestoapp-light .category-header-actions{
    width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:9px!important;
  }
  body.repuestoapp-light .head-actions>.btn,
  body.repuestoapp-light .hero-actions>.btn,
  body.repuestoapp-light .sales-day-actions>.btn,
  body.repuestoapp-light .category-header-actions>.btn{flex:1 1 190px;min-height:44px}

  body.repuestoapp-light .premium-card,
  body.repuestoapp-light .metric-card,
  body.repuestoapp-light .corp-panel{max-width:100%;min-width:0}

  body.repuestoapp-light .dashboard-grid,
  body.repuestoapp-light .split-layout,
  body.repuestoapp-light .pos-layout,
  body.repuestoapp-light .special-orders-layout,
  body.repuestoapp-light .returns-layout,
  body.repuestoapp-light .reservations-layout{grid-template-columns:1fr!important}

  body.repuestoapp-light .metric-grid,
  body.repuestoapp-light .clients-kpis,
  body.repuestoapp-light .credit-products-summary,
  body.repuestoapp-light .credit-profile-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.repuestoapp-light .table-card{overflow:hidden!important}
  body.repuestoapp-light .table-toolbar{flex-wrap:wrap!important;align-items:stretch!important;gap:10px!important}
  body.repuestoapp-light .table-toolbar>.search-box,
  body.repuestoapp-light .inventory-live-toolbar>.search-box{flex:1 1 100%;max-width:none!important;min-width:0!important}
  body.repuestoapp-light .toolbar-meta{margin-left:0!important}
  body.repuestoapp-light .table-wrap{
    width:100%;max-width:100%;overflow-x:auto!important;overflow-y:visible;
    -webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;
  }
  body.repuestoapp-light .table-wrap>table{min-width:720px}
  body.repuestoapp-light .table-wrap:after{
    content:"Desliza horizontalmente para ver más";display:block;
    position:sticky;left:0;width:max-content;margin:8px 12px 10px;
    color:#7b8da8;font-size:10px;font-weight:700;letter-spacing:.02em;
  }

  body.repuestoapp-light .form-grid,
  body.repuestoapp-light .customer-direct-grid,
  body.repuestoapp-light .customer-register-grid,
  body.repuestoapp-light .credit-abono-grid,
  body.repuestoapp-light .company-store-type-change,
  body.repuestoapp-light .report-meta{min-width:0}

  body.repuestoapp-light input,
  body.repuestoapp-light select,
  body.repuestoapp-light textarea,
  body.repuestoapp-light button{max-width:100%}
  body.repuestoapp-light input,
  body.repuestoapp-light select,
  body.repuestoapp-light textarea{font-size:16px!important}
  body.repuestoapp-light input:not([type="checkbox"]):not([type="radio"]),
  body.repuestoapp-light select{min-height:44px}
  body.repuestoapp-light textarea{min-height:92px}
  body.repuestoapp-light .btn{min-height:44px}

  body.repuestoapp-light dialog.modal,
  body.repuestoapp-light .modal{
    max-width:calc(100vw - 24px)!important;width:min(620px,calc(100vw - 24px))!important;
    max-height:calc(100dvh - 24px)!important;overflow:auto!important;margin:auto!important;
  }

  /* Punto de venta: una sola columna, controles táctiles y acceso rápido al carrito. */
  body.repuestoapp-light .pos-layout{display:grid!important;gap:16px!important}
  body.repuestoapp-light .catalog-panel,
  body.repuestoapp-light .checkout-panel{width:100%!important;max-width:none!important;min-width:0!important}
  body.repuestoapp-light .catalog-head,
  body.repuestoapp-light .checkout-head{gap:10px!important;flex-wrap:wrap!important}
  body.repuestoapp-light .catalog-head-actions{width:100%;display:flex;gap:8px;flex-wrap:wrap}
  body.repuestoapp-light .catalog-head-actions .btn{flex:1 1 145px;min-height:44px}
  body.repuestoapp-light .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.repuestoapp-light .product-tile{min-width:0!important;min-height:112px!important;padding:13px!important}
  body.repuestoapp-light .product-tile-meta{min-width:0}
  body.repuestoapp-light .product-tile-meta strong{overflow-wrap:anywhere}
  body.repuestoapp-light .cart-row{min-width:0}
  body.repuestoapp-light .totals-box{margin-bottom:68px}

  .mobile-pos-dock{
    display:flex;position:fixed;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));
    z-index:66;align-items:center;justify-content:space-between;gap:12px;
    min-height:56px;padding:8px 9px 8px 15px;border-radius:18px;
    background:linear-gradient(110deg,#063d70,#0879b4 60%,#09a8b8);
    color:#fff;box-shadow:0 16px 38px rgba(4,54,94,.32);border:1px solid rgba(255,255,255,.22);
  }
  .mobile-pos-dock[hidden]{display:none!important}
  .mobile-pos-dock-copy{min-width:0;display:grid;gap:1px}
  .mobile-pos-dock-copy small{font-size:10px;color:#c9f1fa;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
  .mobile-pos-dock-copy strong{font-size:17px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-pos-dock-button{min-height:40px!important;padding:0 15px!important;border:1px solid rgba(255,255,255,.3)!important;border-radius:12px!important;background:#fff!important;color:#075c91!important;font-weight:900!important;white-space:nowrap}

  /* Catálogo / clientes / fiados: evitar paneles angostos y controles imposibles de tocar. */
  body.repuestoapp-light .clients-toolbar,
  body.repuestoapp-light .credit-customer-browser-head,
  body.repuestoapp-light .credit-filter-actions,
  body.repuestoapp-light .credit-profile-section-head{flex-wrap:wrap!important;gap:10px!important}
  body.repuestoapp-light .clients-search,
  body.repuestoapp-light .credit-profile-search-wrap{width:100%;max-width:none!important}

  /* Respeta áreas seguras de teléfonos con notch/barra de gestos. */
  @supports(padding:max(0px)){
    body.repuestoapp-light .topbar{padding-left:max(14px,env(safe-area-inset-left))!important;padding-right:max(14px,env(safe-area-inset-right))!important}
    body.repuestoapp-light .content{padding-left:max(18px,env(safe-area-inset-left))!important;padding-right:max(18px,env(safe-area-inset-right))!important}
  }
}

@media (max-width:760px){
  body.repuestoapp-light .content{padding:18px 13px calc(32px + env(safe-area-inset-bottom))!important}
  body.repuestoapp-light .section-head h1,
  body.repuestoapp-light .hero-panel h1{font-size:28px!important}
  body.repuestoapp-light .section-head p,
  body.repuestoapp-light .hero-panel p{font-size:13px!important;line-height:1.55!important}

  body.repuestoapp-light .metric-grid,
  body.repuestoapp-light .clients-kpis,
  body.repuestoapp-light .credit-products-summary,
  body.repuestoapp-light .credit-profile-stat-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
  body.repuestoapp-light .metric-card{padding:14px!important;gap:10px!important}
  body.repuestoapp-light .metric-card strong{font-size:21px!important}

  body.repuestoapp-light .form-grid,
  body.repuestoapp-light .customer-direct-grid,
  body.repuestoapp-light .customer-register-grid,
  body.repuestoapp-light .credit-abono-grid,
  body.repuestoapp-light .report-meta,
  body.repuestoapp-light .package-fields{grid-template-columns:1fr!important}
  body.repuestoapp-light .form-grid>.full,
  body.repuestoapp-light .form-grid>.full-span,
  body.repuestoapp-light .customer-direct-grid>.full,
  body.repuestoapp-light .customer-register-grid>.full{grid-column:1!important}

  body.repuestoapp-light .premium-card{border-radius:18px!important}
  body.repuestoapp-light .focus-card,
  body.repuestoapp-light .rate-card{width:100%!important;max-width:none!important;padding:20px!important}
  body.repuestoapp-light .center-stage{padding:0!important;display:block!important}

  body.repuestoapp-light .row-actions,
  body.repuestoapp-light .modal-actions,
  body.repuestoapp-light .form-actions{gap:8px!important;flex-wrap:wrap!important}
  body.repuestoapp-light .row-actions .btn,
  body.repuestoapp-light .modal-actions .btn,
  body.repuestoapp-light .form-actions .btn{min-height:42px}

  body.repuestoapp-light .inventory-actions>.btn{flex:1 1 calc(50% - 8px)!important;min-width:145px!important}
  body.repuestoapp-light .inventory-search-tools{width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  body.repuestoapp-light .inventory-search-tools .btn{width:100%!important}

  body.repuestoapp-light .product-grid{grid-template-columns:1fr 1fr!important}
  body.repuestoapp-light .cart-row{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}

  body.repuestoapp-light .subscription-global-banner{margin-bottom:16px!important;padding:12px 14px!important}
  body.repuestoapp-light .subscription-global-banner>strong{display:none!important}

  body.repuestoapp-light .toast{left:12px!important;right:12px!important;top:76px!important;min-width:0!important;width:auto!important}
}

@media (max-width:520px){
  body.repuestoapp-light .topbar{min-height:60px!important;padding:7px 10px!important}
  body.repuestoapp-light .menu-toggle{width:42px!important;height:42px!important;flex-basis:42px!important}
  body.repuestoapp-light .topbar-title strong{font-size:14px!important}
  body.repuestoapp-light .topbar-actions>.icon-btn{width:40px!important;height:40px!important}

  body.repuestoapp-light .content{padding:15px 10px calc(28px + env(safe-area-inset-bottom))!important}
  body.repuestoapp-light .section-head{gap:10px!important;margin-bottom:15px!important}
  body.repuestoapp-light .section-head h1,
  body.repuestoapp-light .hero-panel h1{font-size:25px!important}

  body.repuestoapp-light .metric-grid,
  body.repuestoapp-light .clients-kpis,
  body.repuestoapp-light .credit-products-summary,
  body.repuestoapp-light .credit-profile-stat-grid{grid-template-columns:1fr!important}

  body.repuestoapp-light .head-actions,
  body.repuestoapp-light .hero-actions,
  body.repuestoapp-light .sales-day-actions,
  body.repuestoapp-light .category-header-actions{display:grid!important;grid-template-columns:1fr!important}
  body.repuestoapp-light .head-actions>.btn,
  body.repuestoapp-light .hero-actions>.btn,
  body.repuestoapp-light .sales-day-actions>.btn,
  body.repuestoapp-light .category-header-actions>.btn{width:100%!important;min-width:0!important}

  body.repuestoapp-light .inventory-actions>.btn{flex:1 1 100%!important;width:100%!important}
  body.repuestoapp-light .inventory-search-tools{grid-template-columns:1fr!important}

  body.repuestoapp-light .product-grid{grid-template-columns:1fr!important}
  body.repuestoapp-light .product-tile{min-height:94px!important}

  body.repuestoapp-light .premium-card,
  body.repuestoapp-light .corp-panel,
  body.repuestoapp-light .special-orders-layout>.premium-card,
  body.repuestoapp-light .returns-layout>.premium-card,
  body.repuestoapp-light .reservations-layout>.premium-card{padding:16px!important}

  body.repuestoapp-light .table-wrap>table{min-width:640px}
  .mobile-pos-dock{left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));border-radius:16px}
  .mobile-pos-dock-button{padding:0 12px!important}
}

@media (max-width:370px){
  body.repuestoapp-light .topbar-title strong{font-size:13px!important}
  body.repuestoapp-light .topbar-actions>.icon-btn:last-child{display:none!important}
  .mobile-pos-dock-copy strong{font-size:15px}
  .mobile-pos-dock-button{font-size:12px!important}
}

@media (orientation:landscape) and (max-height:520px) and (max-width:1024px){
  body.repuestoapp-light .sidebar{width:min(72vw,320px)!important}
  body.repuestoapp-light .brand-block{padding-bottom:10px!important}
  body.repuestoapp-light .side-nav a{min-height:42px!important;padding-top:8px!important;padding-bottom:8px!important}
  body.repuestoapp-light .topbar{min-height:54px!important}
}

@media (prefers-reduced-motion:reduce){
  body.repuestoapp-light .sidebar,.mobile-pos-dock{transition:none!important;scroll-behavior:auto!important}
}

/* ==========================================================
   RepuestoApp · Fase 4.1 · Interfaz móvil premium
   Mejora exclusivamente visual / navegación táctil.
   No modifica lógica de negocio ni escritorio.
   ========================================================== */

.mobile-app-nav{display:none}
.mobile-app-nav[hidden]{display:none!important}
.mobile-app-nav__item{appearance:none;-webkit-appearance:none}

@media (max-width:760px){
  body.repuestoapp-light.mobile-premium-ui{
    background:#f4f8fc!important;
    -webkit-tap-highlight-color:transparent;
  }

  /* Barra superior más compacta, limpia y con sensación de app. */
  body.repuestoapp-light.mobile-premium-ui .topbar{
    min-height:58px!important;
    padding-top:max(7px,env(safe-area-inset-top))!important;
    background:rgba(255,255,255,.96)!important;
    border-bottom:1px solid #dfe9f4!important;
    box-shadow:0 7px 24px rgba(13,51,88,.08)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }
  body.repuestoapp-light.mobile-premium-ui .menu-toggle{
    width:40px!important;height:40px!important;flex-basis:40px!important;border-radius:12px!important;
    box-shadow:0 7px 15px rgba(5,96,151,.16)!important;
  }
  body.repuestoapp-light.mobile-premium-ui .topbar-title strong{
    font-size:14px!important;font-weight:850!important;letter-spacing:-.01em!important;
  }
  body.repuestoapp-light.mobile-premium-ui .topbar-actions>.icon-btn{
    width:40px!important;height:40px!important;border-radius:12px!important;
  }

  /* Contenido: más aire lateral, menos espacio desperdiciado vertical. */
  body.repuestoapp-light.mobile-premium-ui .content{
    padding:14px 11px calc(92px + env(safe-area-inset-bottom))!important;
  }
  body.repuestoapp-light.mobile-premium-ui.mobile-pos-screen .content{
    padding-bottom:calc(162px + env(safe-area-inset-bottom))!important;
  }
  body.repuestoapp-light.mobile-premium-ui .section-head{
    margin-bottom:13px!important;gap:9px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .section-head h1,
  body.repuestoapp-light.mobile-premium-ui .hero-panel h1{
    font-size:24px!important;line-height:1.08!important;letter-spacing:-.025em!important;
  }
  body.repuestoapp-light.mobile-premium-ui .section-head p,
  body.repuestoapp-light.mobile-premium-ui .hero-panel p{
    margin-top:4px!important;font-size:12.5px!important;line-height:1.48!important;color:#647b96!important;
  }

  /* Tarjetas con proporción más propia de una app móvil. */
  body.repuestoapp-light.mobile-premium-ui .premium-card,
  body.repuestoapp-light.mobile-premium-ui .corp-panel,
  body.repuestoapp-light.mobile-premium-ui .metric-card,
  body.repuestoapp-light.mobile-premium-ui .table-card{
    border-radius:16px!important;
    border-color:#dfe8f2!important;
    box-shadow:0 7px 22px rgba(18,54,87,.07)!important;
  }
  body.repuestoapp-light.mobile-premium-ui .premium-card,
  body.repuestoapp-light.mobile-premium-ui .corp-panel{
    padding:14px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .metric-grid,
  body.repuestoapp-light.mobile-premium-ui .clients-kpis,
  body.repuestoapp-light.mobile-premium-ui .credit-products-summary,
  body.repuestoapp-light.mobile-premium-ui .credit-profile-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .metric-card{
    min-height:94px!important;padding:12px!important;gap:7px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .metric-card strong{font-size:20px!important;line-height:1.05!important}
  body.repuestoapp-light.mobile-premium-ui .metric-card small{font-size:10.5px!important;line-height:1.3!important}

  /* Botones y campos cómodos para pulgar, pero sin verse gigantes. */
  body.repuestoapp-light.mobile-premium-ui .btn{
    min-height:42px!important;border-radius:12px!important;padding:9px 13px!important;font-size:13px!important;
  }
  body.repuestoapp-light.mobile-premium-ui input:not([type="checkbox"]):not([type="radio"]),
  body.repuestoapp-light.mobile-premium-ui select,
  body.repuestoapp-light.mobile-premium-ui textarea{
    border-radius:12px!important;border-color:#d9e5f0!important;background:#fff!important;
  }
  body.repuestoapp-light.mobile-premium-ui input:not([type="checkbox"]):not([type="radio"]),
  body.repuestoapp-light.mobile-premium-ui select{min-height:43px!important}
  body.repuestoapp-light.mobile-premium-ui textarea{min-height:86px!important}
  body.repuestoapp-light.mobile-premium-ui label{font-size:12px!important}

  /* Acciones principales: ocupan el ancho cuando realmente ayuda. */
  body.repuestoapp-light.mobile-premium-ui .head-actions,
  body.repuestoapp-light.mobile-premium-ui .hero-actions,
  body.repuestoapp-light.mobile-premium-ui .sales-day-actions,
  body.repuestoapp-light.mobile-premium-ui .category-header-actions{
    gap:7px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .head-actions>.btn,
  body.repuestoapp-light.mobile-premium-ui .hero-actions>.btn,
  body.repuestoapp-light.mobile-premium-ui .sales-day-actions>.btn,
  body.repuestoapp-light.mobile-premium-ui .category-header-actions>.btn{
    flex:1 1 calc(50% - 7px)!important;min-width:0!important;
  }

  /* Tablas: área táctil clara y desplazamiento horizontal más evidente. */
  body.repuestoapp-light.mobile-premium-ui .table-wrap{
    margin-left:-4px;margin-right:-4px;width:calc(100% + 8px)!important;
    border-radius:13px!important;background:#fff;
    scrollbar-width:thin;
  }
  body.repuestoapp-light.mobile-premium-ui .table-wrap>table{min-width:680px}
  body.repuestoapp-light.mobile-premium-ui .table-wrap th{white-space:nowrap;font-size:11px!important}
  body.repuestoapp-light.mobile-premium-ui .table-wrap td{font-size:12px!important}
  body.repuestoapp-light.mobile-premium-ui .table-wrap:after{
    margin:6px 10px 8px!important;font-size:9.5px!important;
  }

  /* POS: catálogo compacto y carrito accesible con una mano. */
  body.repuestoapp-light.mobile-premium-ui .pos-layout{gap:11px!important}
  body.repuestoapp-light.mobile-premium-ui .catalog-panel,
  body.repuestoapp-light.mobile-premium-ui .checkout-panel{border-radius:16px!important}
  body.repuestoapp-light.mobile-premium-ui .product-grid{gap:8px!important}
  body.repuestoapp-light.mobile-premium-ui .product-tile{
    min-height:102px!important;padding:11px!important;border-radius:14px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .product-tile-meta strong{font-size:12.5px!important;line-height:1.28!important}
  body.repuestoapp-light.mobile-premium-ui .mobile-pos-dock{
    left:9px;right:9px;bottom:calc(72px + env(safe-area-inset-bottom));
    min-height:54px;border-radius:16px;padding:7px 8px 7px 13px;
    box-shadow:0 14px 30px rgba(4,54,94,.27);
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-pos-dock-copy strong{font-size:14px}
  body.repuestoapp-light.mobile-premium-ui .mobile-pos-dock-button{min-height:38px!important;font-size:12px!important}

  /* Menú lateral como panel de funciones avanzadas. */
  body.repuestoapp-light.mobile-premium-ui .sidebar{
    width:min(88vw,330px)!important;border-radius:0 20px 20px 0!important;
    box-shadow:22px 0 46px rgba(3,28,52,.28)!important;
  }
  body.repuestoapp-light.mobile-premium-ui .brand-block{padding-top:max(18px,env(safe-area-inset-top))!important}
  body.repuestoapp-light.mobile-premium-ui .side-nav a{min-height:46px!important;border-radius:11px!important;margin-bottom:3px!important}

  /* Modales: se sienten como hojas/paneles de app en móvil. */
  body.repuestoapp-light.mobile-premium-ui dialog.modal,
  body.repuestoapp-light.mobile-premium-ui .modal{
    width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;border-radius:20px!important;
  }

  /* Navegación inferior principal. Se crea desde los enlaces reales del sidebar. */
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav{
    display:grid;
    grid-template-columns:repeat(var(--mobile-nav-count,5),minmax(0,1fr));
    position:fixed;
    left:8px;right:8px;
    bottom:max(8px,env(safe-area-inset-bottom));
    z-index:65;
    min-height:60px;
    padding:5px 5px;
    border:1px solid rgba(205,219,233,.95);
    border-radius:18px;
    background:rgba(255,255,255,.96);
    box-shadow:0 14px 38px rgba(12,43,72,.19);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__item{
    position:relative;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:2px;min-width:0;min-height:48px;padding:3px 2px;
    border:0;background:transparent;color:#69809a;text-decoration:none;
    font:inherit;cursor:pointer;border-radius:13px;
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__icon{
    display:grid;place-items:center;width:27px;height:24px;
    font-size:18px;line-height:1;filter:saturate(.9);
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__label{
    max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    font-size:9.5px;line-height:1.05;font-weight:800;letter-spacing:.005em;
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__item.active{
    color:#086aa5;background:#eaf6fb;
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__item.active:before{
    content:"";position:absolute;top:2px;left:50%;transform:translateX(-50%);
    width:24px;height:3px;border-radius:9px;background:linear-gradient(90deg,#0b80bd,#0bb8bf);
  }
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__item:active{transform:scale(.97)}

  /* Avisos / banners no deben comerse media pantalla. */
  body.repuestoapp-light.mobile-premium-ui .subscription-global-banner{
    margin-bottom:10px!important;padding:10px 12px!important;border-radius:13px!important;
  }
  body.repuestoapp-light.mobile-premium-ui .subscription-global-banner span{font-size:11px!important}

  /* Toasts por encima de la navegación inferior. */
  body.repuestoapp-light.mobile-premium-ui .toast{top:66px!important;z-index:120!important}
}

@media (max-width:390px){
  body.repuestoapp-light.mobile-premium-ui .content{padding-left:9px!important;padding-right:9px!important}
  body.repuestoapp-light.mobile-premium-ui .metric-grid,
  body.repuestoapp-light.mobile-premium-ui .clients-kpis,
  body.repuestoapp-light.mobile-premium-ui .credit-products-summary,
  body.repuestoapp-light.mobile-premium-ui .credit-profile-stat-grid{gap:7px!important}
  body.repuestoapp-light.mobile-premium-ui .metric-card{padding:10px!important}
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav__label{font-size:9px}
  body.repuestoapp-light.mobile-premium-ui .mobile-app-nav{left:5px;right:5px;border-radius:16px}
}

@media (min-width:761px){
  .mobile-app-nav{display:none!important}
}
