/* Personal OS · pantalla de entrada y estado de sincronización */
html.pos-locked .app, html.pos-locked .m-tabs, html.pos-locked .m-fab { visibility: hidden; }
#pos-auth {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 50% 18%, rgba(139,124,246,.16), transparent 60%), #09090b;
  opacity: 0; transition: opacity .35s ease; overflow-y: auto;
}
#pos-auth.show { opacity: 1; }
#pos-auth.leave { opacity: 0; pointer-events: none; }
#pos-auth.leave .pa-card { transform: translateY(-14px) scale(.98); }
.pa-card {
  width: 100%; max-width: 380px; text-align: center;
  transform: translateY(18px); transition: transform .6s cubic-bezier(.32,1.25,.4,1);
}
#pos-auth.show .pa-card { transform: none; }
.pa-logo { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 26px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 60%, #3a3060, #17141f 75%); box-shadow: 0 18px 50px rgba(139,124,246,.28), inset 0 1px 0 rgba(255,255,255,.08);
  animation: pa-float 4.5s ease-in-out infinite; }
.pa-logo img { width: 62px; height: 62px; filter: drop-shadow(0 0 10px rgba(139,124,246,.55)); }
@keyframes pa-float { 50% { transform: translateY(-5px); } }
.pa-card h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--text, #ececf1); }
.pa-sub { margin: 8px auto 26px; max-width: 300px; color: var(--text-2, #9b9ba8); font-size: 15px; line-height: 1.45; }
.pa-field { position: relative; display: block; text-align: left; margin-bottom: 12px; }
.pa-field span { display: block; font-size: 13px; color: var(--text-2, #9b9ba8); font-weight: 500; margin: 0 0 6px 4px; }
.pa-field input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 15px; border: 1px solid rgba(255,255,255,.06);
  background: rgba(118,118,128,.16); color: #fff; font: inherit; font-size: 16px; transition: border-color .2s, background .2s;
}
.pa-field input:focus { outline: none; border-color: var(--accent, #8b7cf6); background: rgba(118,118,128,.22); }
.pa-field input[name=password] { padding-right: 52px; }
.pa-eye { position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--text-3, #5f5f6c); display: grid; place-items: center; }
.pa-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pa-err { min-height: 20px; margin: 4px 0 6px; color: var(--alert, #f0718d); font-size: 14px; }
.pa-btn {
  position: relative; width: 100%; height: 54px; border: 0; border-radius: 16px; background: var(--accent, #8b7cf6); color: #0b0b10;
  font: inherit; font-size: 16px; font-weight: 700; box-shadow: 0 12px 30px rgba(139,124,246,.38), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .25s cubic-bezier(.32,1.25,.4,1), filter .2s; cursor: pointer;
}
.pa-btn:active { transform: scale(.97); }
.pa-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2.5px solid rgba(11,11,16,.25); border-top-color: #0b0b10; opacity: 0; animation: pa-rot .7s linear infinite; }
form.busy .pa-btn span { opacity: 0; } form.busy .pa-spin { opacity: 1; } form.busy .pa-btn { pointer-events: none; filter: saturate(.8); }
@keyframes pa-rot { to { transform: rotate(360deg); } }
.pa-foot { margin: 18px 0 0; font-size: 12px; color: var(--text-3, #5f5f6c); }
.pa-opt { display: block; width: 100%; text-align: left; padding: 16px 18px; margin-bottom: 10px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04); color: var(--text, #ececf1); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.pa-opt:hover, .pa-opt:active { border-color: var(--accent, #8b7cf6); }
.pa-opt b { display: block; font-size: 16px; } .pa-opt small { display: block; color: var(--text-2, #9b9ba8); margin-top: 3px; font-size: 13px; }
form.shake { animation: pa-shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes pa-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Punto de estado en el botón de Ajustes */
.m-top-btn { position: relative; }
html[data-sync="pending"] .m-top-btn::after, html[data-sync="offline"] .m-top-btn::after {
  content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, #8b7cf6); box-shadow: 0 0 0 2px var(--bg, #09090b);
}
html[data-sync="offline"] .m-top-btn::after { background: #f0b45c; }
.pos-account { display: flex; align-items: center; gap: 10px; }
.pos-account .pos-dot { width: 8px; height: 8px; border-radius: 50%; background: #4cc9f0; flex: none; }
html[data-sync="pending"] .pos-dot { background: var(--accent, #8b7cf6); }
html[data-sync="offline"] .pos-dot { background: #f0b45c; }
@media (prefers-reduced-motion: reduce) { .pa-logo, form.shake { animation: none; } .pa-card { transition: none; } }
