/* ===== Estructura de páginas ===== */
#view{min-height:100dvh}
.page{max-width:720px;margin:0 auto;padding:calc(var(--sat) + 12px) 16px calc(var(--sab) + var(--tab-h) + 28px)}
body:not(.has-tabbar) .page{padding-bottom:calc(var(--sab) + 28px)}
.page-top{padding:10px 4px 12px}
.title{margin:0;font-size:var(--fs-title1);line-height:1.1;font-weight:700;letter-spacing:-.02em}
.page>.title{margin:4px 4px 14px}
.page-lead{margin:-4px 4px 16px;color:var(--ink-2);font-size:var(--fs-subhead)}
.sec{margin:0 0 22px}
.sec-h{margin:0 4px 8px}
.sec-hrow{display:flex;align-items:baseline;justify-content:space-between;margin:0 4px 8px}
.sec-hrow .sec-h{margin:0}
.nav-top{display:flex;align-items:center;justify-content:space-between;min-height:44px;margin:0 -8px 6px}
.nav-back{display:inline-flex;align-items:center;gap:2px;min-height:44px;padding:0 8px;border:0;background:none;color:var(--tint);font-size:var(--fs-body)}
.nav-back .ic{width:22px;height:22px}
.nav-act{width:44px;height:44px;border:0;background:none;color:var(--tint);display:grid;place-items:center;border-radius:var(--r-sm)}
.nav-act:active{background:var(--blue-t)}

/* ===== Barra inferior ===== */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:var(--z-nav);display:grid;grid-template-columns:repeat(5,1fr);align-items:stretch;
  height:calc(var(--tab-h) + var(--sab));padding:0 calc(var(--sar) + 4px) var(--sab) calc(var(--sal) + 4px);
  background:color-mix(in srgb,var(--surface) 88%,transparent);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:.5px solid var(--line-2)}
body:not(.has-tabbar) .tabbar,html.kb-open .tabbar{display:none}
.tabbar a,.tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;background:none;color:var(--muted);font-size:var(--fs-caption);font-weight:500;letter-spacing:.01em;min-width:44px;white-space:nowrap}
/* Sección activa: color, peso y una píldora detrás del ícono (no solo el color) */
.tabbar a>.ic{width:56px;height:32px;padding:3px 15px;border-radius:var(--r-pill);box-sizing:border-box;transition:background-color .15s}
.tabbar .on{color:var(--tint);font-weight:600}
.tabbar a.on>.ic{background:var(--blue-t)}
/* «Administración» no cabe a 12 px en un celular angosto: ahí se muestra «Admin.» (el nombre accesible es completo) */
.tl-s{display:none}
/* Logotipo y módulos de cada sección: solo en el menú lateral de computadora (desktop.css) */
.tb-brand,.tb-sub,.tb-copy{display:none}
@media (max-width:439px){.tabbar .tl-l{display:none}.tabbar .tl-s{display:inline}}
.tabbar a:active,.tabbar button:active{opacity:.6}
.tab-plus{width:46px;height:32px;border-radius:var(--r-sm);background:var(--cta);color:var(--on-color);display:grid;place-items:center;margin-bottom:1px;transition:transform .14s}
.tab-plus .ic{width:22px;height:22px}
.tab-new:active .tab-plus{transform:scale(.92)}
.tab-new{color:var(--ink-2)!important}

/* ===== Inicio ===== */
.home-top{padding:8px 4px 6px;margin-bottom:18px}
.brandline{display:flex;align-items:center;gap:10px;min-height:44px}
.brand-mark{width:34px;height:34px;object-fit:contain}
.brandline .wordmark{font-size:25px}
.home-top .band{margin:12px 0 22px;max-width:220px}
.greet{margin:0;font-size:var(--fs-title1);line-height:1.08;font-weight:700;letter-spacing:-.02em}
.greet-sub{margin:6px 0 0;font-size:var(--fs-title3);color:var(--ink-2)}
.divs{display:grid;gap:12px}
@media (min-width:600px){.divs{grid-template-columns:1fr 1fr}}
.div-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px 16px 4px;box-shadow:var(--shadow-1)}
.div-head{display:flex;align-items:center;gap:14px}
.div-ic{width:48px;height:48px;border-radius:var(--r-sm);background:var(--blue-t);color:var(--tint);display:grid;place-items:center;flex:none}
.div-ic .ic{width:28px;height:28px}
.div-card:nth-child(2) .div-ic{background:var(--orange-t);color:var(--cta-ink)}
.div-head h2{margin:0;font-size:var(--fs-title3);font-weight:700}
.div-head p{margin:2px 0 0;font-size:var(--fs-subhead);color:var(--ink-2)}
.div-act{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px;margin-top:14px;padding:0 2px;border:0;border-top:1px solid var(--line);background:none;color:var(--cta-ink);font-size:var(--fs-body);font-weight:600}
.div-act .ic{width:18px;height:18px}
.div-act:active{opacity:.6}
.draft-card{background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--orange);border-radius:var(--r);padding:12px 14px;margin:0 0 10px;box-shadow:var(--shadow-1)}
.dc-main{display:flex;align-items:center;gap:12px}
.dc-main b{display:block;font-size:var(--fs-body);font-weight:600}
.dc-main small{display:block;font-size:var(--fs-subhead);color:var(--ink-2);font-variant-numeric:tabular-nums}
.dc-ic{width:36px;height:36px;border-radius:var(--r-sm);background:var(--orange-t);color:var(--cta-ink);display:grid;place-items:center;flex:none}
.dc-ic.puerto{background:var(--blue-t);color:var(--tint)}
.dc-acts{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}

/* ===== Asistente ===== */
.wiz{min-height:100dvh}
.wiz-top{position:sticky;top:0;z-index:var(--z-sticky);display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:6px;
  padding:calc(var(--sat) + 4px) 12px 6px 6px;background:color-mix(in srgb,var(--canvas) 90%,transparent);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.wiz-title{display:flex;flex-direction:column;align-items:flex-start;min-width:0;border:0;background:none;padding:2px 4px;text-align:left;color:var(--ink);border-radius:var(--r-sm)}
.wiz-title small{font-size:var(--fs-footnote);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.wiz-title b{font-size:var(--fs-title3);font-weight:700;letter-spacing:-.01em;line-height:1.15}
.wiz-title:active{background:var(--fill)}
.co-chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border-radius:var(--r-xs);background:#fff;border:1px solid var(--line)}
.co-chip img.mark{width:22px;height:22px;object-fit:contain}
.co-chip img.wide{height:16px;width:auto;max-width:72px}
.co-chip b{font-family:var(--font-brand);font-weight:800;font-stretch:75%;font-size:var(--fs-subhead);color:var(--c1,#354FA3)}
.wiz-progress{position:sticky;top:calc(var(--sat) + 58px);z-index:calc(var(--z-sticky) - 1);height:4px;margin:0 16px;background:var(--fill);border-radius:var(--r-2xs);overflow:hidden}
.wiz-progress i{display:block;height:100%;border-radius:var(--r-2xs);transition:width .25s var(--ease);background:repeating-linear-gradient(90deg,var(--blue) 0 9px,var(--blue-d) 9px 12px,var(--blue-m) 12px 14px)}
.wiz-body{max-width:720px;margin:0 auto;padding:16px 16px calc(var(--bar-h) + var(--sab) + 28px)}
html.kb-open .wiz-body{padding-bottom:40vh}
.actionbar{position:fixed;left:0;right:0;bottom:0;z-index:var(--z-nav);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:10px;
  padding:10px calc(16px + var(--sar)) calc(10px + var(--sab)) calc(16px + var(--sal));background:color-mix(in srgb,var(--surface) 92%,transparent);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-top:.5px solid var(--line-2)}
@media (min-width:760px){.actionbar{padding-left:calc(50% - 344px);padding-right:calc(50% - 344px)}}
html.kb-open .actionbar{display:none}
.actionbar .ic{width:20px;height:20px}
.center{text-align:center}

/* Fotos */
.cam-btn{margin:0 0 12px;cursor:pointer}
.ph-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 10px}
.ph{position:relative;aspect-ratio:4/3;border-radius:var(--r-sm);border:1.5px dashed var(--line-2);background:var(--surface-2) center/cover no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  color:var(--muted);font-size:var(--fs-footnote);font-weight:500;text-align:center;padding:6px;cursor:pointer;overflow:hidden}
.ph-ic .ic{width:26px;height:26px}
.ph:active{transform:scale(.98)}
.ph.has{border:0;justify-content:flex-end;align-items:stretch;padding:0}
.ph.has span{background:linear-gradient(transparent,rgba(0,0,0,.6));color:var(--on-color);padding:14px 8px 6px;font-weight:600;text-align:left}
.card.ev>.btn-ghost{margin:0 0 12px -8px;cursor:pointer}
.ph-big{display:block;width:100%;max-height:46dvh;object-fit:contain;border-radius:var(--r-sm);background:#000}
.sheet-acts label{cursor:pointer}
.att-list{list-style:none;margin:0;padding:0}
.att{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.att-ic{flex:none;width:42px;height:42px;border-radius:var(--r-xs);display:grid;place-items:center;font-size:var(--fs-caption);font-weight:800;color:var(--on-color);background:#B4441A center/cover no-repeat}
.att-ic.img{background-color:var(--blue)}
.att-tx{flex:1;min-width:0;display:flex;flex-direction:column}
.att-tx b{font-size:var(--fs-subhead);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-tx small{font-size:var(--fs-footnote);color:var(--muted)}
.att-b{display:flex;flex:none}
.att-b .icon-btn{width:44px;height:44px}
.att-b .ic{width:19px;height:19px}
.grp-b[data-atts]{padding-top:4px}
.grp-b[data-atts] .add-btn{margin:12px 0 10px;cursor:pointer}

/* Revisión */
.issues{background:var(--warn-t);border-radius:var(--r);padding:14px 14px 6px;margin:0 0 18px}
.issues-h{display:flex;align-items:center;gap:8px;color:var(--warn);font-size:var(--fs-body)}
.issues>p{margin:4px 0 8px;font-size:var(--fs-subhead);color:var(--ink-2)}
.issue{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:8px 4px;border:0;border-top:1px solid color-mix(in srgb,var(--warn) 18%,transparent);background:none;color:var(--ink);font-size:var(--fs-body);text-align:left}
.issue:active{opacity:.6}
.ok-box{display:flex;align-items:center;gap:10px;background:var(--ok-t);color:var(--ok);border-radius:var(--r);padding:14px;margin:0 0 18px;font-weight:500}
.sumlist{margin:0 0 10px}
.sumlist>div{display:grid;grid-template-columns:minmax(96px,34%) 1fr;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.sumlist>div:last-child{border-bottom:0}
.sumlist dt{color:var(--muted);font-size:var(--fs-subhead)}
.sumlist dd{margin:0;font-size:var(--fs-subhead);word-break:break-word}
.sumlist dd i{color:var(--muted)}
.plant-info{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;padding:12px;border-radius:var(--r-sm);background:var(--surface-2);margin:0 0 14px}
.plant-info>.btn-ghost{grid-column:2;justify-self:start;margin-left:-12px}
.plant-info>.ic{color:var(--tint);margin-top:2px}
.plant-info>div{flex:1;min-width:0}
.plant-info b{display:block}
.plant-info small{color:var(--ink-2);font-size:var(--fs-subhead)}
.card.sol>.btn-ghost{margin:-4px 0 12px -8px}

/* Nuevo documento y empresas */
.new-opts,.co-list{display:flex;flex-direction:column;gap:10px;padding-bottom:4px}
.new-opt,.co-opt{display:flex;align-items:center;gap:14px;width:100%;min-height:72px;padding:12px 14px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface-2);color:var(--ink);text-align:left}
.new-opt:active,.co-opt:active{background:var(--fill)}
.new-ic{width:48px;height:48px;border-radius:var(--r-sm);display:grid;place-items:center;background:var(--blue-t);color:var(--tint);flex:none}
.new-opt:nth-child(2) .new-ic{background:var(--orange-t);color:var(--cta-ink)}
.new-ic .ic{width:28px;height:28px}
.new-tx,.co-tx{flex:1;min-width:0;display:flex;flex-direction:column}
.new-tx b,.co-tx b{font-size:var(--fs-body);font-weight:600}
.new-tx small,.co-tx small{font-size:var(--fs-subhead);color:var(--ink-2)}
.co-tx b{font-size:var(--fs-subhead)}
.co-logo{flex:none;display:grid;place-items:center;background:#fff;border-radius:var(--r-sm);border:1px solid var(--line)}
.co-logo.mark{width:48px;height:48px}.co-logo.mark img{width:36px;height:36px;object-fit:contain}
.co-logo.wide{width:72px;height:48px}.co-logo.wide img{width:58px;height:auto}
.co-logo.sm{padding:0;min-height:0}  /* anula el relleno de .sm (botones): descentraba el logotipo */
.co-logo.sm.mark{width:34px;height:34px}.co-logo.sm.mark img{width:24px;height:24px}
.co-logo.sm.wide{width:48px;height:34px}.co-logo.sm.wide img{width:38px}
.co-logo.lg.mark{width:88px;height:88px}.co-logo.lg.mark img{width:68px;height:68px}
.co-logo.lg.wide{width:150px;height:88px}.co-logo.lg.wide img{width:124px}
.co-hero{display:flex;align-items:center;gap:16px;margin:4px 4px 14px}
.co-sw{display:flex;align-items:center;gap:6px}
.co-sw i{width:22px;height:22px;border-radius:var(--r-xs)}
.co-sw small{margin-left:6px;color:var(--ink-2);font-size:var(--fs-subhead)}
.co-form .grp-b{margin-bottom:14px}
.co-form .btn-ghost{margin-top:6px}

/* Documento: detalle y generado */
.doc-hero{display:flex;align-items:center;gap:14px;margin:0 4px 18px}
.doc-hero small{color:var(--muted);font-size:var(--fs-subhead)}
.doc-hero h1{margin:0;font-size:var(--fs-title2);font-weight:700}
.doc-hero p{margin:2px 0 0;font-size:var(--fs-subhead);color:var(--ink-2)}
.act-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 20px}
.act{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:78px;padding:10px 4px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--tint);font-size:var(--fs-footnote);font-weight:500;text-align:center;line-height:1.15;box-shadow:var(--shadow-1)}
.act .ic{width:26px;height:26px}
.act span{color:var(--ink)}
.act:active{background:var(--fill);transform:scale(.97)}
.done{padding-top:calc(var(--sat) + 36px);text-align:center}
.done-hero{margin:0 0 26px}
.done-check{width:72px;height:72px;margin:0 auto 14px;border-radius:50%;background:var(--ok);color:var(--on-color);display:grid;place-items:center;animation:pop .45s cubic-bezier(.2,1.5,.4,1) both}
.done-check .ic{width:38px;height:38px}
@keyframes pop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}
.done h1{margin:0 0 6px;font-size:var(--fs-title1);font-weight:700;letter-spacing:-.01em}
.done .mono{margin:0;font-size:var(--fs-body);color:var(--ink-2);overflow-wrap:anywhere;word-break:normal}
.done-meta{margin:4px 0 0;font-size:var(--fs-subhead);color:var(--muted)}
.done-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 4px}
.done-grid .act{min-height:84px;font-size:var(--fs-subhead)}
.done .btn-ghost{margin-top:8px}

/* WhatsApp */
.wa-chat{background:#E9E4DC;border-radius:var(--r);padding:14px;margin:0 0 6px}
:root[data-theme="dark"] .wa-chat{background:#0B141A}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .wa-chat{background:#0B141A}}
.wa-bubble{background:#DCF8C6;color:#111B21;border-radius:var(--r-sm) var(--r-sm) var(--r-sm) var(--r-2xs);padding:10px 12px 12px;font:var(--fs-body)/1.45 -apple-system,Helvetica,Arial,sans-serif;white-space:pre-wrap;word-break:break-word;box-shadow:0 1px 1px rgba(0,0,0,.12);max-width:92%}
:root[data-theme="dark"] .wa-bubble{background:#005C4B;color:#E9EDEF}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .wa-bubble{background:#005C4B;color:#E9EDEF}}

/* Visor y código para Excel */
.vw{display:flex;flex-direction:column;gap:14px;padding:4px 0}
.vw-page{margin:0}
.vw-page img{display:block;width:100%;height:auto;border-radius:var(--r-xs);box-shadow:var(--shadow-2);background:#fff}
.vw-page figcaption{font-size:var(--fs-footnote);color:var(--muted);text-align:center;margin-top:6px}
.vw-file{display:flex;gap:12px;align-items:center;padding:14px;border-radius:var(--r-sm);background:var(--surface-2)}
.vw-file>.ic{width:28px;height:28px;color:var(--warn)}
.vw-file small{display:block;color:var(--ink-2);font-size:var(--fs-subhead)}
.xl-codes{display:flex;flex-direction:column;gap:12px;align-items:stretch}
.xl-card{margin:0;background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);padding:14px;display:flex;flex-direction:column;align-items:center;gap:10px}
.xl-pdf{width:100%;height:auto;image-rendering:pixelated}
.xl-qr{width:70%;max-width:260px;aspect-ratio:1;image-rendering:pixelated}
.xl-err{padding:30px;color:#6B7486}
.xl-card figcaption{text-align:center;color:#1A2233;font-size:var(--fs-subhead)}
.xl-card figcaption b{display:block;font-variant-numeric:tabular-nums;letter-spacing:.03em}
.xl-card figcaption span{color:#5D6778;font-size:var(--fs-footnote)}
.steps-list{margin:0 0 12px;padding-left:22px;font-size:var(--fs-body);line-height:1.6}
.steps-list .ic{display:inline;width:18px;height:18px;vertical-align:-3px;color:var(--tint)}
.about{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 0 8px;color:var(--muted);font-size:var(--fs-subhead)}
.about img{width:36px;height:36px;object-fit:contain}
/* Ícono y nombre de la app (CONTROL PERCONSUR), arriba del logotipo de la empresa */
.app-id{display:inline-flex;align-items:center;gap:10px;margin-bottom:6px}
.app-id .app-ic,.about .app-id .app-ic{width:44px;height:44px;border-radius:10px;object-fit:cover;box-shadow:var(--shadow-1)}
.app-id .app-nm{font-weight:700;font-size:var(--fs-subhead);letter-spacing:.04em;color:var(--ink)}
.app-id.sm{gap:8px;margin-bottom:4px}
.app-id.sm .app-ic{width:28px;height:28px;border-radius:7px}
.app-id.sm .app-nm{font-size:var(--fs-footnote);color:var(--ink-2)}
.about span{font-weight:600;color:var(--ink-2)}
.about small{font-size:var(--fs-footnote)}
/* Aviso de derechos de autor (inicio de sesión y Ajustes) */
.legal-copy{display:block;margin-top:6px;font-size:var(--fs-caption);color:var(--muted);text-align:center}
.wordmark.sm{font-size:20px}
.cat-form{padding-top:4px}
.cat-form .btn-danger{margin-top:10px}

/* ===== Acceso ===== */
.login{position:fixed;inset:0;z-index:var(--z-login);background:var(--canvas);overflow-y:auto;-webkit-overflow-scrolling:touch;transition:opacity .25s ease}
.login.out{opacity:0;pointer-events:none}
.login-in{max-width:420px;margin:0 auto;padding:calc(var(--sat) + 44px) calc(20px + var(--sar)) calc(var(--sab) + 32px) calc(20px + var(--sal))}
.login-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin-bottom:28px}
.login-mark{width:58px;height:58px;object-fit:contain}
.login-word{font-size:30px}
.login-brand .band{width:160px}
.login-title{margin:0;font-size:var(--fs-title1);font-weight:700;letter-spacing:-.02em}
.login-sub{margin:6px 0 22px;color:var(--ink-2);font-size:var(--fs-body)}
.login-form .fld{margin-bottom:16px}
.login-form .in-act.on{color:var(--cta-ink)}
.login-form .in-act{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.login-msg{min-height:22px;margin:-4px 2px 14px;font-size:var(--fs-subhead);color:var(--ink-2)}
.login-msg.warn{color:var(--warn)}
.login-msg:empty{margin-bottom:6px}
.login-terms{margin:16px 0 0;text-align:center;color:var(--muted);font-size:var(--fs-footnote);line-height:1.45}
.login-terms a{color:var(--tint);font-weight:600}
.login-foot{margin:28px 0 0;text-align:center;color:var(--muted);font-size:var(--fs-footnote)}
/* Aviso institucional de acceso restringido: sobrio, parte de la composición (no es un error ni bloquea nada) */
.login-notice{display:flex;align-items:flex-start;gap:12px;margin:24px 0 0;padding:14px 16px;border:1px solid var(--line);border-left:3px solid var(--tint);border-radius:var(--r-sm);background:var(--surface)}
.ln-ic{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--blue-t);color:var(--tint)}
.ln-ic .ic{width:18px;height:18px}
.login-notice p{margin:0;font-size:var(--fs-footnote);line-height:1.45;color:var(--ink-2)}
.login-notice b{display:block;margin:1px 0 3px;font-size:var(--fs-caption);font-weight:700;letter-spacing:.09em;color:var(--tint)}
.shake{animation:shake .38s ease}
@keyframes shake{20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(3px)}}

/* ===== Transición de marca al iniciar sesión (ui/components/brandIntro.js) =====
   Entrada: el logotipo se revela en diagonal (máscara que sigue el trazo naranja), luego el nombre, la banda corrugada y
   «Bienvenido». Salida: el fondo se desvanece sobre el panel y el logotipo viaja a su lugar en el encabezado. */
.brand-intro{position:fixed;inset:0;z-index:var(--z-intro);display:grid;place-items:center;overflow:hidden}
.bi-bg{position:absolute;inset:0;background:var(--canvas);transition:opacity .44s ease .06s}
.bi-in{position:relative;display:flex;flex-direction:column;align-items:center;gap:14px;padding:24px;text-align:center}
.bi-logo{width:96px;height:96px;transform-origin:0 0;transition:transform .52s var(--ease),opacity .4s ease}
.bi-mark{display:block;width:100%;height:100%;object-fit:contain;animation:biMark .62s var(--ease) both;
  -webkit-mask-image:linear-gradient(135deg,#000 45%,transparent 55%);mask-image:linear-gradient(135deg,#000 45%,transparent 55%);
  -webkit-mask-size:300% 300%;mask-size:300% 300%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:0 0;mask-position:0 0}
.bi-word{font-size:36px;animation:biWord .5s var(--ease) .24s both}
.bi-band{width:168px;transform-origin:left center;animation:biBand .46s var(--ease) .5s both}
.bi-msg{margin:4px 0 0;font-size:var(--fs-subhead);color:var(--ink-2);animation:biFade .4s ease .78s both}
@keyframes biMark{from{opacity:0;transform:translate(-8px,8px) scale(.94);-webkit-mask-position:100% 100%;mask-position:100% 100%}30%{opacity:1}to{opacity:1;transform:none;-webkit-mask-position:0 0;mask-position:0 0}}
@keyframes biWord{from{opacity:0;transform:translateY(8px);letter-spacing:.16em}to{opacity:1;transform:none;letter-spacing:.02em}}
@keyframes biBand{from{transform:scaleX(0)}to{transform:none}}
@keyframes biFade{from{opacity:0}to{opacity:1}}
@media (min-width:700px){.bi-logo{width:120px;height:120px}.bi-word{font-size:42px}.bi-band{width:200px}}
.brand-intro.bi-out{pointer-events:none}
.brand-intro.bi-out .bi-bg{opacity:0}
.brand-intro.bi-out .bi-word,.brand-intro.bi-out .bi-band,.brand-intro.bi-out .bi-msg{opacity:0;transition:opacity .18s ease;animation:none}
.bi-logo.fade{opacity:0;transform:scale(.92)}
.bi-hidden{visibility:hidden}
/* Reducir movimiento: sin revelado ni desplazamientos; la marca aparece quieta y solo se desvanece */
.bi-still .bi-mark,.bi-still .bi-word,.bi-still .bi-band,.bi-still .bi-msg{animation:none;-webkit-mask-image:none;mask-image:none}
.bi-still .bi-in{transition:opacity .24s ease}
.bi-still.bi-out .bi-in{opacity:0}
@media (prefers-reduced-motion:reduce){.brand-intro .bi-bg,.brand-intro .bi-in,.brand-intro .bi-logo{transition-duration:.24s!important;transition-delay:0s!important}}

/* ===== Información compartida (Ajustes → Información compartida) ===== */
.sync-role{display:flex;align-items:center;gap:8px;margin:0 0 8px}
.sync-ro{font-size:var(--fs-caption);font-weight:600;color:var(--ink-2)}
.sync-set .gps-st.busy{color:var(--tint)}
.sync-set [data-state]>.gps-st{margin:0 0 6px}
/* Publicando (ui/components/publishSignal.js): el logotipo emite ondas de señal hacia arriba, a la nube */
.ps-wrap{display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px 0 14px;margin:0 0 10px;border-bottom:1px solid var(--line)}
.ps-wrap[hidden]{display:none}
.ps-stage{display:flex;flex-direction:column;align-items:center}
.ps-cloud svg{display:block;width:66px;height:49px;animation:psCloud 1.6s ease-in-out infinite}
.ps-cl{fill:var(--blue-t);stroke:var(--tint);stroke-width:1.4}
.ps-ok{stroke:var(--ok);stroke-width:1.8;stroke-dasharray:9;stroke-dashoffset:9;opacity:0}
/* Cada onda es el borde superior de un círculo: nace justo encima del logotipo, sube y se abre hasta la nube */
.ps-waves{position:relative;width:72px;height:56px}
.ps-waves i{position:absolute;left:50%;bottom:-22px;width:30px;height:30px;margin-left:-15px;border-radius:50%;border:3px solid transparent;border-top-color:var(--brand-orange);
  opacity:0;animation:psWave 1.6s cubic-bezier(.33,.4,.45,1) infinite;transition:opacity .25s ease}
.ps-waves i:nth-child(2){animation-delay:-.53s}
.ps-waves i:nth-child(3){animation-delay:-1.07s}
.ps-mark{width:46px;height:46px;object-fit:contain;margin-top:4px}
.ps-cap{margin:0;font-size:var(--fs-subhead);font-weight:600;color:var(--tint);text-align:center}
@keyframes psWave{0%{transform:translateY(0) scale(.45);opacity:0}16%{opacity:1}72%{opacity:.85}100%{transform:translateY(-44px) scale(1.5);opacity:0}}
@keyframes psCloud{0%,62%,100%{transform:scale(1)}80%{transform:scale(1.06)}}
/* Publicado: las ondas se apagan y la nube muestra la palomita */
.ps-stage.ps-done .ps-waves i{animation:none;opacity:0}
.ps-stage.ps-done .ps-cloud svg{animation:none}
.ps-stage.ps-done .ps-ok{opacity:1;animation:psCheck .42s ease .05s forwards}
.ps-stage.ps-done+.ps-cap{color:var(--ok)}
@keyframes psCheck{to{stroke-dashoffset:0}}
/* Versión pequeña (aviso de Inicio): un punto de señal sube del logotipo a la nube */
.ps-mini{position:relative;display:inline-block;flex:none;width:38px;height:18px}
.ps-mm{position:absolute;left:0;bottom:0;width:15px;height:15px;object-fit:contain}
.ps-mc{position:absolute;right:0;top:0;width:18px;height:14px}
.ps-mc path{fill:var(--blue-t);stroke:var(--tint);stroke-width:1.8}
.ps-dot{position:absolute;left:13px;bottom:7px;width:4px;height:4px;border-radius:50%;background:var(--brand-orange);animation:psDot 1.1s ease-in-out infinite}
@keyframes psDot{0%{transform:translate(0,0);opacity:0}25%{opacity:1}85%{opacity:1}100%{transform:translate(9px,-8px);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .ps-waves i,.ps-cloud svg,.ps-dot{animation:none}
  .ps-waves i{opacity:.9}
  .ps-waves i:nth-child(1){transform:translateY(-6px) scale(.65)}
  .ps-waves i:nth-child(2){transform:translateY(-20px) scale(.95);opacity:.65}
  .ps-waves i:nth-child(3){transform:translateY(-34px) scale(1.25);opacity:.4}
  .ps-dot{opacity:1;transform:translate(5px,-4px)}
  .ps-stage.ps-done .ps-ok{animation:none;stroke-dashoffset:0}
}
.sync-dec-acts{display:grid;gap:8px;margin:10px 0 4px}
.sync-dec-acts .btn-primary,.sync-dec-acts .btn-secondary{white-space:normal;text-align:center;min-height:48px}
/* Aviso en Inicio: modo consulta o publicación del capturista */
.sync-pill{display:inline-flex;align-items:center;gap:6px;margin:10px 0 0;padding:5px 11px;border-radius:var(--r-pill);background:var(--fill);color:var(--ink-2);font-size:var(--fs-footnote);font-weight:600;text-decoration:none;max-width:100%}
.sync-pill .ic{width:16px;height:16px;flex:none}
.sync-pill.warn{background:var(--orange-t);color:var(--cta-ink)}
.sync-pill span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sync-pill:empty{display:none}
/* Modo solo consulta: sin botones de captura (la base local además rechaza cualquier escritura) */
html.ro .tab-new,html.ro [data-new],html.ro [data-add],html.ro [data-newdelay],html.ro [data-newop],html.ro button[data-status],html.ro .pk-new,html.ro .dc-acts,html.ro [data-g-adjust],html.ro .gps-sug{display:none!important}
html.ro .tabbar{grid-template-columns:repeat(4,1fr)}
/* Al recibir información nueva la pantalla se redibuja sin animación de entrada */
html.sync-refresh #view>*{animation:none!important}

/* ===== Tarifario (#/tarifario): zonas → tarjeta por ciudad de origen con tabla de plantas y tarifas ===== */
.tf-tiles{margin-bottom:14px}
.tf-count{margin:0 4px 10px;font-size:var(--fs-footnote);color:var(--muted)}
.tf-zone{margin:0 0 20px}
.tf-zone .sec-hrow{gap:12px}
.tf-n{font-size:var(--fs-footnote);color:var(--muted);white-space:nowrap}
.tf-grid{display:grid;gap:10px}
.tf-card{min-width:0;padding:12px 14px 4px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1)}
.tf-o{margin:0 0 4px;font-size:var(--fs-body);font-weight:600;line-height:1.3}
.tf-t{width:100%;border-collapse:collapse;font-size:var(--fs-subhead)}
.tf-t th{padding:4px 0 6px;border-bottom:1px solid var(--line);font-size:var(--fs-caption);font-weight:600;color:var(--muted);text-align:left}
.tf-t td{padding:9px 0;border-bottom:1px solid var(--line);color:var(--ink)}
.tf-t tr:last-child td{border-bottom:0}
.tf-t .r{padding-left:12px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.tf-t td.r{font-weight:600}
.tf-u{display:inline-flex;align-items:center;gap:4px}
.tf-u .ic{width:18px;height:18px}
@media (min-width:700px){.tf-grid{grid-template-columns:repeat(auto-fill,minmax(330px,1fr))}}
.tf-acts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.tf-t tr[data-route],.tf-t tr[data-extra]{cursor:pointer}
.tf-t tr[data-route]:hover td,.tf-t tr[data-extra]:hover td{background:var(--fill)}
.tf-t tr[data-route]:focus-visible,.tf-t tr[data-extra]:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.tf-ed{display:inline-flex;margin-left:6px;vertical-align:-2px;color:var(--muted)}
.tf-ed .ic{width:14px;height:14px}
.tf-t td.tf-miss{font-weight:400;color:var(--muted)}
.tf-sheetname{display:flex;align-items:center;gap:6px;margin:0 0 12px;font-weight:600;color:var(--ink-2)}
.tf-sheetname .ic{width:16px;height:16px;flex:none}
/* División del apartado (Puerto o Campo) sobre el nombre y cargos adicionales de División Puerto */
.tf-div{display:flex;align-items:center;gap:6px;margin:0 0 2px;font-size:var(--fs-footnote);font-weight:600;color:var(--blue);text-transform:uppercase;letter-spacing:.04em}
.tf-div .ic{width:16px;height:16px;flex:none}
.tf-extras{max-width:560px}
.tf-extras .grp-note{margin:0 4px}
