/* v29 · Chip de actualización, aviso de sesión vencida y de versión nueva (sólo el panel del superadmin). */
.ms-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
#adminView .ms-refresh{display:flex;align-items:center;gap:6px;min-width:0}
#adminView .ms-refresh[hidden],#adminView .ms-session[hidden],#adminView .ms-version[hidden],#adminView .ms-version [hidden]{display:none!important}
#adminView .ms-refresh-state{max-width:270px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.3;color:var(--muted,#c4abc8);border:1px solid var(--line,#4c2767);border-radius:999px;padding:5px 10px}
#adminView .ms-refresh[data-state=paused] .ms-refresh-state,#adminView .ms-refresh[data-state=money] .ms-refresh-state,#adminView .ms-refresh[data-state=retrying] .ms-refresh-state,#adminView .ms-refresh[data-state=limited] .ms-refresh-state,#adminView .ms-refresh[data-state=stopped] .ms-refresh-state,#adminView .ms-refresh[data-state=note] .ms-refresh-state{color:#ffe3b5;border-color:#cd8c3d;background:rgba(59,39,22,.55)}
#adminView .ms-refresh[data-state=offline] .ms-refresh-state,#adminView .ms-refresh[data-state=expired] .ms-refresh-state{color:#ffc2ca;border-color:#b34b5a;background:rgba(70,18,30,.55)}
#adminView .ms-refresh-now{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:5px 10px;font-size:12px;font-weight:700;white-space:nowrap}
#adminView .ms-refresh-now:disabled{opacity:.55;cursor:not-allowed}
#adminView .ms-refresh-auto{display:inline-flex;align-items:center;gap:6px;min-height:34px;font-size:11px;font-weight:600;color:var(--muted,#c4abc8);white-space:nowrap;cursor:pointer}
#adminView .ms-refresh-auto input{flex:0 0 auto;width:16px;height:16px;margin:0;padding:0;accent-color:var(--ms-gold,#ffc94f)}
#adminView .ms-refresh-short{display:none}
/* v29 N5: the short state line under the title (phones) and the ☰ menu block (≤359 px) only exist on those widths. */
#adminView .ms-refresh-phone,#adminView .ms-refresh-menu{display:none}
#adminView .ms-refresh :focus-visible,#adminView .ms-session :focus-visible,#adminView .ms-version :focus-visible,#adminView .ms-confirm :focus-visible{outline:3px solid #ffe083;outline-offset:2px}
/* v29 review #10: fixed notices start below the iPhone strip (v28.1 block of admin-app.css). */
#adminView .ms-session{position:fixed;z-index:40;top:calc(12px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 24px));box-sizing:border-box;display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid #d15b6c;border-radius:16px;background:#2a0f1c;color:#fff;box-shadow:0 18px 60px rgba(0,0,0,.55)}
#adminView .ms-session>div{min-width:0;flex:1}
#adminView .ms-session strong{display:block;font-size:15px}
#adminView .ms-session p{margin:4px 0 0;font-size:12px;line-height:1.5;color:#ffd9df}
#adminView .ms-session button{flex:0 0 auto;min-height:44px;white-space:nowrap}
/* v29 review #10: «Hay una versión nueva» sticks right under the top bar: --ms-topbar-h is its real height (measured by
   auto-refresh.js) plus the iPhone strip. It stays under the bar (z-index 8 < 9), so it never covers its buttons. */
#adminView .ms-version{position:sticky;top:calc(var(--ms-topbar-h,86px) + env(safe-area-inset-top,0px));z-index:8;margin:12px clamp(14px,3vw,48px) 0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:12px 16px;border:1px solid #cd8c3d;border-radius:14px;background:#2b1d10;color:#ffe9c4}
#adminView .ms-version p{margin:0;font-size:13px;line-height:1.45;flex:1 1 260px}
#adminView .ms-version .ms-version-hint{flex-basis:100%;font-size:12px;color:#ffd79a}
#adminView .ms-version .ms-version-hint:empty{display:none}
#adminView .ms-version button{min-height:40px}
/* v29 review #5: «Tenés cambios sin guardar» before «Actualizar ahora» (a dialog of the panel, not the browser's). */
#adminView .ms-confirm{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:22px;border:1px solid #cd8c3d;border-radius:18px;background:#1c1022;color:#fff;box-shadow:0 30px 100px rgba(0,0,0,.6)}
#adminView .ms-confirm::backdrop{background:rgba(5,2,11,.73)}
#adminView .ms-confirm h2{margin:0 0 8px;font-size:18px;line-height:1.3}
#adminView .ms-confirm p{margin:0 0 18px;font-size:14px;line-height:1.5;color:#f2e4c9}
#adminView .ms-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
#adminView .ms-confirm-actions button{min-height:44px;padding:10px 16px}
/* Narrower screens: the long labels stay for screen readers (visually hidden), the short ones are only visual. */
@media(max-width:1120px){#adminView .ms-refresh-long{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}#adminView .ms-refresh-short{display:inline}#adminView .ms-refresh-state{max-width:190px}}
@media(max-width:820px){#adminView .ms-refresh-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}#adminView .ms-refresh-now{min-width:40px;min-height:40px;justify-content:center;font-size:15px}#adminView .ms-refresh-state{max-width:130px}#adminView .ms-version{top:calc(var(--ms-topbar-h,76px) + env(safe-area-inset-top,0px));margin:10px 12px 0}}
/* Phones (v29 review #28): the chip stays on the top bar's line, no second row. The state is a dot on ↻ (its full text
   stays for screen readers, in the tooltip and in the announcements) and a small «Auto» switch; it takes the account
   name's place. The top bar keeps its position from the v28.1 block (env(safe-area-inset-top)). */
@media(max-width:520px){
  #adminView .ms-session{flex-direction:column;align-items:stretch}
  #adminView .ms-session button{width:100%}
  #adminView .ms-refresh{gap:4px}
  #adminView .ms-refresh-state{position:absolute;width:1px;height:1px;max-width:none;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  #adminView .ms-refresh-now{position:relative;min-width:44px;min-height:44px;padding:0}
  #adminView .ms-refresh-now::after{content:"";position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:#50e3c2;box-shadow:0 0 0 2px #12081c}
  #adminView .ms-refresh:is([data-state=paused],[data-state=money],[data-state=retrying],[data-state=limited],[data-state=stopped],[data-state=note]) .ms-refresh-now::after{background:#f0a53c}
  #adminView .ms-refresh:is([data-state=offline],[data-state=expired]) .ms-refresh-now::after{background:#ff6374}
  #adminView .ms-refresh:is([data-state=manual],[data-state=follower],[data-state=background]) .ms-refresh-now::after{background:#9d8fae}
  #adminView .ms-refresh-auto{gap:4px;min-height:44px}
  #adminView .header-actions.ms-has-refresh .account-pill{display:none}
  #adminView .header-actions:has(#saveState.is-unsaved) .ms-refresh{display:none}
  /* v29 N5: a state that is not «Automático» (a note, money, retrying, offline, another window, changes, manual) is also
     a short text under the title (two lines at most): it takes the eyebrow's place, so the top bar does not grow
     (no second row). */
  #adminView .dashboard-topbar>div:has(>.ms-refresh-phone:not([hidden])){min-width:0}
  #adminView .dashboard-topbar>div:has(>.ms-refresh-phone:not([hidden])) .eyebrow{display:none}
  #adminView .ms-refresh-phone:not([hidden]){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-width:100%;margin:2px 0 0;overflow:hidden;overflow-wrap:anywhere;font-size:11px;line-height:1.3;font-weight:700;color:#ffe3b5}
  #adminView .ms-refresh-phone:is([data-state=offline]){color:#ffc2ca}
  #adminView .ms-refresh-phone:is([data-state=manual],[data-state=follower]){color:#d7c9e4}
  #adminView .ms-version{top:calc(var(--ms-topbar-h,72px) + env(safe-area-inset-top,0px))}
  #adminView .ms-confirm-actions{flex-direction:column-reverse}
  #adminView .ms-confirm-actions button{width:100%}
}
/* ≤359 px: no room for «Auto» on the top bar; the state and the switch are in the ☰ menu (v29 N5). */
@media(max-width:359px){
  #adminView .ms-refresh-auto{display:none}
  #adminView .ms-refresh-menu:not([hidden]){display:grid;gap:6px;margin:12px 12px 0;padding:10px 12px;border:1px solid var(--line,#4c2767);border-radius:12px}
  #adminView .ms-refresh-menu-title{margin:0;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted,#c4abc8)}
  #adminView .ms-refresh-menu-state{margin:0;font-size:12px;line-height:1.45;color:#f2e4c9;overflow-wrap:anywhere}
  #adminView .ms-refresh-menu-auto{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px;font-weight:700;color:#fff;cursor:pointer}
  #adminView .ms-refresh-menu-auto input{flex:0 0 auto;width:18px;height:18px;margin:0;accent-color:var(--ms-gold,#ffc94f)}
}
