/* Login screen, account button, sync status, logins table */
.who { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.who:hover b { text-decoration: underline; }
body.auth-open .app, body.auth-open .tabbar, body.auth-open .sheet, body.auth-open .sheet-scrim, body.auth-open .drawer, body.auth-open .scrim, body.auth-open #sync-status, body.auth-open #toast { display: none !important; }
body.auth-open { overflow: hidden; height: 100vh; }
/* dark sidebar column runs the full page height even when the sticky aside is shorter than a long page */
@media (min-width: 901px) { .app { background: linear-gradient(to right, var(--navy) var(--side), transparent var(--side)); } }
#auth { position: fixed; inset: 0; z-index: 200; display: flex; padding: 16px; overflow-y: auto;
  background: radial-gradient(1000px 500px at 70% 10%, var(--navy-3), var(--navy)); }
.auth-stack { margin: auto; width: 100%; max-width: 600px; display: grid; gap: 14px; justify-items: center; }
.auth-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 14px; padding: 28px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: grid; gap: 14px; }
.auth-logo { width: 150px; justify-self: start; background: var(--navy); padding: 10px 14px; border-radius: 8px; }
.auth-card h1 { font-size: 1.35rem; }
.auth-card form { display: grid; gap: 12px; }
.auth-card .f { display: grid; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.auth-card .f input { padding: 11px 12px; min-height: 46px; border: 1px solid var(--line); border-radius: 9px; font: 400 16px var(--body); background: #fff; }
.auth-card .btn.primary { min-height: 48px; font-size: 15px; }
.auth-err { margin: 0; color: var(--bad); font-weight: 500; min-height: 1.2em; }
.auth-wait { margin: 0; color: var(--muted); text-align: center; padding: 30px 0; }
.auth-lang { display: flex; justify-content: center; border-top: 1px solid var(--line-2); }
.auth-lang .lang-switch { margin-top: 12px; }
#sync-status { position: fixed; right: 16px; bottom: 14px; z-index: 60; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font: 600 12px/1 var(--body);
  padding: 7px 11px; border-radius: 999px; box-shadow: 0 2px 8px rgba(11,23,46,.12); }
#sync-status[data-s=saving]::before, #sync-status[data-s=offline]::before, #sync-status[data-s=saved]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--info); }
#sync-status[data-s=saved]::before { background: var(--good); }
#sync-status[data-s=offline] { color: var(--warn); background: var(--warn-bg); border-color: #ecd98a; }
#sync-status[data-s=offline]::before { background: var(--warn); }
#sync-status[data-s=error] { color: var(--bad); background: var(--bad-bg); border-color: #f0b8bb; cursor: pointer; }
@media (max-width: 900px) { #sync-status { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); right: auto; left: 10px; } }
tr.dim td { opacity: .55; }
.logins select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
/* Demo-mode login picker (only rendered when the server runs with DEMO_MODE=1) */
.auth-demo { width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 18px 18px 14px; color: #fff; display: grid; gap: 12px; }
.auth-demo h2 { font-size: 1.05rem; color: #fff; }
.demo-group h3 { font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 0 0 7px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip { display: grid; gap: 1px; text-align: left; min-height: 44px; padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; max-width: 100%; }
.demo-chip b { font-weight: 600; font-size: 13.5px; }
.demo-chip small { font-size: 11.5px; color: var(--muted); }
.demo-chip:hover { border-color: var(--red); background: var(--hover); }
.demo-note { margin: 0; font-size: 12px; color: rgba(255,255,255,.65); }
@media (max-width: 480px) { .auth-demo { padding: 16px 14px 12px; } .demo-chip { flex: 1 1 calc(50% - 4px); } }
@media (min-width: 900px) {
  .auth-stack { max-width: 1000px; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; justify-items: stretch; }
  .auth-card { max-width: none; }
  .auth-demo { align-self: center; }
  .demo-group { display: grid; grid-template-columns: 108px 1fr; align-items: start; gap: 8px; }
  .demo-group h3 { margin: 0; padding-top: 14px; }
}
