html.bip-quote-scroll-enabled,body.bip-pwa-body{overflow-x:hidden!important;overflow-y:auto!important}
body.bip-pwa-body{margin:0!important;min-height:100vh;background:#f4f7fb;color:#17233b;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;padding:0!important}
body.bip-pwa-body *{box-sizing:border-box}
body.bip-pwa-body a{color:#204D95}
body.bip-pwa-body .bip-wrap{width:min(100%,1480px);margin:0 auto!important;padding:0 18px calc(34px + env(safe-area-inset-bottom));color:#17233b}
body.bip-pwa-body .bip-frontend-wrap{min-height:100vh}
body.bip-pwa-body .bip-topbar{display:none!important}

/* Botones base fuera de wp-admin */
body.bip-pwa-body .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:7px 14px;border:1px solid #c9d2df;border-radius:10px;background:#fff;color:#24364f;text-decoration:none;font:600 13px/1.2 inherit;cursor:pointer;box-shadow:0 1px 2px rgba(6,30,65,.04);appearance:none;-webkit-appearance:none}
body.bip-pwa-body .button:hover{border-color:#9fb3d0;background:#f8fbff;color:#204D95}
body.bip-pwa-body .button-primary,body.bip-pwa-body .bip-primary{background:#204D95!important;border-color:#204D95!important;color:#fff!important}
body.bip-pwa-body .button-primary:hover,body.bip-pwa-body .bip-primary:hover{background:#061E41!important;border-color:#061E41!important;color:#fff!important}
body.bip-pwa-body .button:disabled{opacity:.58;cursor:not-allowed}

/* Cabecera PWA */
.bip-pwa-topbar{position:sticky;top:0;z-index:70;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:24px;margin:0 -18px 22px;padding:calc(12px + env(safe-area-inset-top)) 22px 12px;background:rgba(255,255,255,.94);border-bottom:1px solid #e3e8f0;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 8px 25px rgba(6,30,65,.035)}
.bip-pwa-brand{display:flex;align-items:center;gap:10px;min-width:0}.bip-pwa-brand img{width:44px;height:44px;border-radius:13px;box-shadow:0 8px 20px rgba(32,77,149,.2)}.bip-pwa-brand strong,.bip-pwa-brand small{display:block}.bip-pwa-brand strong{color:#061E41;font-size:14px}.bip-pwa-brand small{margin-top:2px;color:#6d7890;font-size:10px}
.bip-pwa-page-title{min-width:0;border-left:1px solid #e5eaf1;padding-left:22px}.bip-pwa-page-title h1{margin:0;color:#061E41;font-size:22px;line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bip-pwa-page-title p{margin:4px 0 0;color:#6d7890;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bip-pwa-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}.bip-pwa-install,.bip-pwa-logout{min-height:36px;padding:7px 11px;border-radius:9px;border:1px solid #d6deea;background:#fff;color:#204D95;font:700 11px/1 inherit;text-decoration:none;cursor:pointer}.bip-pwa-install{background:#204D95;color:#fff;border-color:#204D95}.bip-pwa-user{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#526078;font-size:11px;font-weight:700}

/* Mensajes */
body.bip-pwa-body .notice{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto 16px!important;max-width:1180px;padding:11px 13px;border:1px solid #cfe8dc;border-left:4px solid #16855b;border-radius:12px;background:#edf9f4;color:#285747;box-shadow:none}
body.bip-pwa-body .notice-error{border-color:#f2cbd2;border-left-color:#c9364e;background:#fff3f5;color:#7b2938}
body.bip-pwa-body .notice p{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0!important;font-size:12px;font-weight:650}
body.bip-pwa-body .notice-dismiss{display:none!important}

/* Wizard PWA */
body.bip-pwa-body #bip-quote-wizard{width:100%;min-width:0}
body.bip-pwa-body .bip-stepper{position:sticky;top:82px;z-index:50;width:min(100%,850px);margin:0 auto 16px;box-shadow:0 8px 24px rgba(6,30,65,.05)}
body.bip-pwa-body .bip-wizard-step{width:min(100%,1180px);max-width:1180px;min-width:0}
body.bip-pwa-body .bip-wizard-step *,body.bip-pwa-body .bip-card *{min-width:0}
body.bip-pwa-body .bip-touch-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
body.bip-pwa-body .bip-touch-card{overflow:hidden}
body.bip-pwa-body .bip-touch-image{aspect-ratio:1/1;height:auto;min-height:0}
body.bip-pwa-body .bip-complex-grid{width:100%}
body.bip-pwa-body input,body.bip-pwa-body select,body.bip-pwa-body textarea{font-size:16px!important;max-width:100%;appearance:auto}
body.bip-pwa-body textarea{resize:vertical}
body.bip-pwa-body .bip-dim-grid>label,body.bip-pwa-body .bip-form-grid>label,body.bip-pwa-body .bip-form-row>label{min-width:0}
body.bip-pwa-body .bip-quote-sheet{align-items:start}
body.bip-pwa-body .bip-total-card{position:sticky;top:158px}
body.bip-pwa-body .bip-material-dual-head,body.bip-pwa-body .bip-material-dual-price{min-width:0}
body.bip-pwa-body .bip-line{min-width:0}
body.bip-pwa-body .bip-line>span:first-child{min-width:0;overflow-wrap:anywhere}
body.bip-pwa-body .bip-summary-shell{max-width:100%}
body.bip-pwa-body .bip-summary-item{min-width:0}
body.bip-pwa-body .bip-bag-quote-card{max-width:100%}

/* Auth */
.bip-pwa-auth{min-height:100vh;display:grid;place-items:center;padding:calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));background:radial-gradient(circle at 20% 10%,#275aa8 0,#0b316a 28%,#061E41 68%)}
.bip-pwa-auth-card{width:min(100%,430px);padding:34px 32px;border-radius:28px;background:#fff;box-shadow:0 24px 90px rgba(0,0,0,.28);text-align:center}.bip-pwa-auth-logo{width:72px;height:72px;border-radius:22px;box-shadow:0 12px 30px rgba(32,77,149,.25)}.bip-pwa-kicker{display:inline-block;margin-top:18px;padding:5px 9px;border-radius:999px;background:#edf4ff;color:#204D95;font-size:9px;font-weight:900;letter-spacing:.12em}.bip-pwa-kicker.denied{background:#fff0f2;color:#c9364e}.bip-pwa-auth-card h1{margin:9px 0 6px;color:#061E41;font-size:30px}.bip-pwa-auth-card>p{margin:0 auto 20px;max-width:330px;color:#67748a;font-size:13px;line-height:1.55}.bip-pwa-auth-card form{text-align:left}.bip-pwa-auth-card label{display:block;color:#3f4e65;font-size:11px;font-weight:750}.bip-pwa-auth-card input[type=text],.bip-pwa-auth-card input[type=password]{width:100%;min-height:48px;margin:6px 0 14px;padding:9px 12px;border:1px solid #d7e0ec;border-radius:11px;background:#fff;font-size:16px;outline:0}.bip-pwa-auth-card input:focus{border-color:#204D95;box-shadow:0 0 0 3px rgba(32,77,149,.1)}.bip-pwa-auth-card .login-remember label{display:flex;align-items:center;gap:7px}.bip-pwa-auth-card .login-submit{margin:18px 0 0}.bip-pwa-auth-card #wp-submit,.bip-pwa-auth-button{display:flex;width:100%;min-height:48px;align-items:center;justify-content:center;border:0;border-radius:11px;background:#204D95;color:#fff;text-decoration:none;font:800 13px/1 inherit;cursor:pointer}.bip-pwa-auth-foot{display:block;margin-top:18px;color:#8792a5;font-size:10px}

/* Splash */
.bip-pwa-splash{position:fixed;inset:0;z-index:999999;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:env(safe-area-inset-top) 20px env(safe-area-inset-bottom);background:#061E41;color:#fff;opacity:1;visibility:visible;transition:opacity .35s ease,visibility .35s ease}.bip-pwa-splash.is-hidden{opacity:0;visibility:hidden;pointer-events:none}.bip-pwa-splash-mark{width:94px;height:94px;border-radius:28px;background:#204D95;display:grid;place-items:center;box-shadow:0 20px 60px rgba(0,0,0,.35);animation:bipSplashPulse 1.5s ease-in-out infinite}.bip-pwa-splash-mark img{width:94px;height:94px;border-radius:28px}.bip-pwa-splash strong{margin-top:24px;font-size:18px;letter-spacing:.13em}.bip-pwa-splash span{margin-top:6px;color:#aec0de;font-size:11px;letter-spacing:.08em;text-transform:uppercase}@keyframes bipSplashPulse{50%{transform:scale(1.035);box-shadow:0 24px 70px rgba(0,0,0,.45)}}

/* Permisos en Configuración wp-admin */
.bip-pwa-setting-url{margin:0 0 14px;padding:11px 12px;border-radius:11px;background:#f5f8fc}.bip-pwa-setting-url small,.bip-pwa-setting-url strong{display:block}.bip-pwa-setting-url small{color:#738097;font-size:9px;text-transform:uppercase;letter-spacing:.07em}.bip-pwa-setting-url strong{margin-top:3px;color:#204D95;font-size:11px;overflow-wrap:anywhere}.bip-frontend-user-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 16px;max-height:360px;overflow:auto}.bip-frontend-user{display:flex!important;align-items:center;gap:9px;margin:0!important;padding:10px;border:1px solid #e2e8f0;border-radius:10px;background:#fbfcfe}.bip-frontend-user input{margin:0!important}.bip-frontend-user strong,.bip-frontend-user small{display:block}.bip-frontend-user small{margin-top:2px;color:#7a879a;font-size:9px;font-weight:500}

/* Tablet landscape / iPad Pro */
@media(max-width:1180px){
  body.bip-pwa-body .bip-wrap{padding-left:14px;padding-right:14px}
  .bip-pwa-topbar{margin-left:-14px;margin-right:-14px;padding-left:16px;padding-right:16px;gap:14px}
  body.bip-pwa-body .bip-touch-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  body.bip-pwa-body .bip-wizard-step{padding:22px}
}

/* iPad vertical + tablets */
@media(max-width:900px){
  .bip-pwa-topbar{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"brand actions" "title title";gap:9px 12px}
  .bip-pwa-brand{grid-area:brand}.bip-pwa-actions{grid-area:actions}.bip-pwa-page-title{grid-area:title;border-left:0;border-top:1px solid #edf0f5;padding:9px 0 0}.bip-pwa-page-title h1{font-size:18px}.bip-pwa-page-title p{font-size:10px}
  body.bip-pwa-body .bip-stepper{top:116px}
  body.bip-pwa-body .bip-touch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.bip-pwa-body .bip-complex-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  body.bip-pwa-body .bip-complex-card{padding:10px}.bip-complex-visual{height:120px}
  body.bip-pwa-body .bip-grid-2,body.bip-pwa-body .bip-quote-sheet{grid-template-columns:1fr!important}
  body.bip-pwa-body .bip-total-card{position:static}
  body.bip-pwa-body .bip-summary-main{grid-template-columns:1fr!important}
  body.bip-pwa-body .bip-summary-item{grid-template-columns:42px minmax(0,1fr)!important}
  body.bip-pwa-body .bip-summary-item-metrics,body.bip-pwa-body .bip-summary-item-actions{grid-column:2!important}
}

/* Phone */
@media(max-width:640px){
  body.bip-pwa-body .bip-wrap{padding:0 10px calc(22px + env(safe-area-inset-bottom))}
  .bip-pwa-topbar{margin:0 -10px 12px;padding:calc(8px + env(safe-area-inset-top)) 11px 9px;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "title title"}
  .bip-pwa-brand img{width:38px;height:38px;border-radius:11px}.bip-pwa-brand strong{font-size:12px}.bip-pwa-brand small{font-size:8.5px}
  .bip-pwa-user{display:none}.bip-pwa-install,.bip-pwa-logout{min-height:34px;padding:6px 9px;font-size:10px}
  .bip-pwa-page-title{padding-top:7px}.bip-pwa-page-title h1{font-size:16px}.bip-pwa-page-title p{display:none}
  body.bip-pwa-body .bip-stepper{top:91px;margin-bottom:10px;padding:5px;border-radius:12px}
  body.bip-pwa-body .bip-stepper button{padding:6px 2px;gap:0}.bip-stepper button span{display:none!important}.bip-stepper button i{width:28px;height:28px;font-size:11px}
  body.bip-pwa-body .bip-wizard-step{padding:14px;border-radius:17px}
  body.bip-pwa-body .bip-wizard-title{margin-bottom:15px}.bip-wizard-title h2{font-size:20px!important}.bip-wizard-title p{font-size:11px;line-height:1.45}.bip-wizard-title>span{font-size:9px}
  body.bip-pwa-body .bip-touch-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}.bip-touch-card{padding:7px!important;border-radius:13px}.bip-touch-card strong{font-size:11px!important}.bip-touch-card small{display:none!important}.bip-touch-card>b{right:6px!important;top:6px!important;width:22px!important;height:22px!important}.bip-touch-image{margin-bottom:7px!important}
  body.bip-pwa-body .bip-complex-grid{grid-template-columns:1fr!important;gap:8px}.bip-complex-card{display:grid;grid-template-columns:88px minmax(0,1fr);grid-template-rows:auto auto;padding:8px!important;column-gap:10px;align-items:center}.bip-complex-visual{grid-row:1/-1;height:74px!important;margin:0!important}.bip-complex-card strong{font-size:14px!important}.bip-complex-card small{font-size:10px!important}.bip-complex-card>b{right:7px!important;top:7px!important}
  body.bip-pwa-body .bip-card{padding:12px!important;border-radius:14px}.bip-card h3{font-size:13px!important}
  body.bip-pwa-body .bip-form-grid,body.bip-pwa-body .bip-form-row,body.bip-pwa-body .bip-dim-grid{grid-template-columns:1fr!important;gap:0!important}
  body.bip-pwa-body .bip-size-presets>div{gap:6px}.bip-size-chip{padding:7px 10px!important}
  body.bip-pwa-body .bip-area-override .bip-form-row{grid-template-columns:1fr!important}
  body.bip-pwa-body .bip-wizard-nav{position:sticky;bottom:0;z-index:20;gap:8px;margin:16px -14px -14px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-radius:0 0 17px 17px;box-shadow:0 -8px 24px rgba(6,30,65,.06)}
  body.bip-pwa-body .bip-wizard-nav .button{flex:1 1 0;min-width:0;min-height:44px;padding:7px 8px!important;font-size:11px;text-align:center;white-space:normal}
  body.bip-pwa-body .bip-wizard-nav>span:empty{display:none}
  body.bip-pwa-body .bip-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.bip-summary-metrics>div{padding:11px 12px!important}
  body.bip-pwa-body .bip-summary-item{display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important}.bip-summary-item-no{width:32px!important;height:32px!important}.bip-summary-item-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.bip-summary-item-actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important}.bip-summary-item-actions .button{flex:1!important}
  body.bip-pwa-body .bip-summary-client-strip{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  body.bip-pwa-body .bip-quote-break section{padding:12px!important}.bip-sheet-head{gap:8px;align-items:flex-start}.bip-sheet-head h3{font-size:12px!important}.bip-line{gap:8px!important;align-items:flex-start}.bip-line>strong{white-space:nowrap}
  body.bip-pwa-body .bip-material-dual-head{display:none!important}.bip-material-dual-price{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}.bip-material-dual-name{grid-column:1/-1!important}.bip-material-price-cell{padding:7px!important;border-radius:9px;background:#f7f9fc}.bip-material-price-cell small{font-size:8px!important}.bip-material-price-cell strong{font-size:11px!important}
  body.bip-pwa-body .bip-total-card{padding:16px!important}.bip-total-card>b{font-size:27px!important}
  .bip-pwa-auth-card{padding:28px 20px;border-radius:23px}.bip-pwa-auth-card h1{font-size:26px}
}

@media(max-width:390px){
  body.bip-pwa-body .bip-touch-grid{grid-template-columns:1fr 1fr!important;gap:7px}
  .bip-pwa-install{display:none!important}
  body.bip-pwa-body .bip-stepper{top:87px}
  body.bip-pwa-body .bip-wizard-step{padding:12px}
  body.bip-pwa-body .bip-wizard-nav{margin-left:-12px;margin-right:-12px;margin-bottom:-12px;padding-left:12px;padding-right:12px}
}

@media(display-mode:standalone){body.bip-pwa-body .bip-pwa-topbar{padding-top:calc(12px + env(safe-area-inset-top))}}

body.bip-pwa-body.bip-is-offline:after{content:'Sin conexión · el cotizador necesita Internet para calcular y guardar';position:fixed;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));z-index:99990;transform:translateX(-50%);max-width:calc(100vw - 24px);padding:8px 12px;border-radius:999px;background:#061E41;color:#fff;font-size:10px;font-weight:750;box-shadow:0 10px 30px rgba(6,30,65,.26);text-align:center}

/* v1.8.0 · Branding oficial + endurecimiento responsive de la PWA */
.bip-pwa-brand{gap:9px;max-width:210px}.bip-pwa-brand img{display:block;width:158px;height:58px;max-width:100%;object-fit:contain;object-position:left center;border-radius:0;box-shadow:none}.bip-pwa-brand small{flex:0 0 auto;margin:0;color:#728097;font-size:9px;font-weight:750;white-space:nowrap}
.bip-pwa-auth-logo{display:block;width:min(100%,270px);height:auto;max-height:112px;margin:0 auto;object-fit:contain;border-radius:0;box-shadow:none}
.bip-pwa-splash-mark{width:min(84vw,360px);height:auto;min-height:118px;padding:22px 24px;border-radius:28px;background:#fff;display:grid;place-items:center;box-shadow:0 22px 70px rgba(0,0,0,.34);animation:bipSplashPulse 1.5s ease-in-out infinite}.bip-pwa-splash-mark img{display:block;width:100%;height:auto;max-height:118px;object-fit:contain;border-radius:0}.bip-pwa-splash span{margin-top:18px;color:#c9d7ec;font-size:10px;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
body.bip-pwa-body .bip-wizard-step,body.bip-pwa-body .bip-card,body.bip-pwa-body .bip-touch-card,body.bip-pwa-body .bip-complex-card{max-width:100%;overflow-wrap:anywhere}
body.bip-pwa-body input,body.bip-pwa-body select,body.bip-pwa-body textarea,body.bip-pwa-body button{min-width:0}
body.bip-pwa-body .bip-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body.bip-pwa-body img{max-width:100%}

@media(max-width:1180px){.bip-pwa-brand{max-width:185px}.bip-pwa-brand img{width:142px;height:52px}.bip-pwa-brand small{font-size:8.5px}}
@media(max-width:900px){.bip-pwa-brand{max-width:180px}.bip-pwa-brand img{width:138px;height:50px}.bip-pwa-brand small{font-size:8px}.bip-pwa-actions{gap:7px}.bip-pwa-user{max-width:110px}}
@media(max-width:640px){.bip-pwa-brand{max-width:155px;gap:5px}.bip-pwa-brand img{width:118px;height:43px}.bip-pwa-brand small{display:none}.bip-pwa-actions{gap:6px}.bip-pwa-install,.bip-pwa-logout{white-space:nowrap}.bip-pwa-auth-logo{width:min(100%,240px)}.bip-pwa-splash-mark{width:min(86vw,310px);min-height:104px;padding:18px 20px;border-radius:24px}.bip-pwa-splash-mark img{max-height:104px}}
@media(max-width:390px){.bip-pwa-brand{max-width:132px}.bip-pwa-brand img{width:112px;height:41px}.bip-pwa-logout{padding-left:8px;padding-right:8px}}
