/* signin.css — the cockpit sign-in gate, the "Use Touch ID next time?" offer and the Sign-in devices sheet (2026-10-20).
   Uses the app.css theme tokens (--teal, --card, --border, --text, --muted, --on-accent) so it follows light/dark and the
   personal theme. Phone: fits 390 px with a 16 px gutter, no sideways scroll; inputs are 16 px so iOS does not zoom. */
.auth-gate { overflow-y: auto; padding: 24px 16px; box-sizing: border-box; }
.si-card { width: 100%; max-width: 380px; margin: auto; text-align: center; box-sizing: border-box; }
.si-card img { height: 36px; margin-bottom: 18px; }
.si-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.01em; }
.si-sub { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 0 20px; }
.si-form { display: flex; flex-direction: column; gap: 10px; text-align: left; margin: 0; }
.si-field { display: flex; flex-direction: column; gap: 5px; }
.si-field-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.si-field-h span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.si-input { width: 100%; box-sizing: border-box; padding: 12px 13px; border-radius: 11px; border: 1px solid var(--border-strong, var(--border));
  background: var(--card); color: var(--text); font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.si-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.si-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; box-sizing: border-box; min-height: 46px;
  padding: 11px 16px; border-radius: 11px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border-strong, var(--border)); background: var(--card); color: var(--text); transition: filter .15s, background .15s, opacity .15s; }
.si-btn:hover { filter: brightness(1.04); }
.si-btn:disabled { opacity: .6; cursor: default; }
.si-btn svg { flex: 0 0 auto; }
.si-btn[hidden], .si-pw[hidden], .si-err[hidden], .si-link[hidden] { display: none !important; }
.si-primary, .si-pk { background: var(--teal); border-color: transparent; color: var(--on-accent, #fff); box-shadow: 0 1px 3px rgba(15,165,162,.22); }
.si-ghost { background: none; border-color: var(--border); color: var(--muted); }
.si-google { background: var(--card); }
.si-btn.busy .si-lbl::after { content: ''; display: inline-block; width: 11px; height: 11px; margin-left: 8px; vertical-align: -1px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: si-spin .8s linear infinite; }
@keyframes si-spin { to { transform: rotate(360deg); } }
.si-or { display: flex; align-items: center; gap: 10px; color: var(--dim, var(--muted)); font-size: 11px; margin: 2px 0; }
.si-or::before, .si-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.si-pw { display: flex; flex-direction: column; gap: 10px; }
.si-link { background: none; border: 0; padding: 2px 0; color: var(--teal); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; }
.si-link:hover { text-decoration: underline; }
.si-forgot { align-self: center; }
.si-err { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; text-align: left;
  background: rgba(248,97,90,.10); border: 1px solid rgba(248,97,90,.55); color: #d2443d; word-break: break-word; }
:root[data-theme="dark"] .si-err { color: #ff8a84; }
.si-err.info { background: color-mix(in srgb, var(--teal) 9%, transparent); border-color: color-mix(in srgb, var(--teal) 40%, transparent); color: var(--text); }
.si-fine { margin-top: 16px; font-size: 11px; color: var(--dim, var(--muted)); line-height: 1.5; }

/* "Use Touch ID next time?" — non-blocking, bottom of the screen */
.si-offer { position: fixed; z-index: 99990; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(440px, calc(100vw - 32px));
  box-sizing: border-box; display: flex; gap: 12px; padding: 14px 15px; border-radius: 14px; background: var(--card); color: var(--text);
  border: 1px solid var(--border-strong, var(--border)); box-shadow: 0 12px 34px rgba(0,0,0,.18); animation: si-up .22s ease-out; }
@keyframes si-up { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.si-offer-ic { flex: 0 0 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.si-offer-body { min-width: 0; flex: 1; }
.si-offer-t { font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.si-offer-s { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.si-offer-s.ok { color: var(--teal); } .si-offer-s.err { color: #d2443d; }
.si-offer-a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.si-btn.sm { width: auto; min-height: 34px; padding: 7px 13px; font-size: 12.5px; border-radius: 9px; }
body.is-mobile .si-offer { bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); }

/* Sign-in devices sheet */
.si-sheet-wrap { position: fixed; inset: 0; z-index: 100000; background: rgba(0,0,0,.42); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.si-sheet { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; background: var(--card); color: var(--text);
  border: 1px solid var(--border-strong, var(--border)); border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.si-sheet-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.si-sheet-t { font-weight: 800; font-size: 16px; }
.si-sheet-s { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.si-x { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.si-sec { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 6px; }
.si-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.si-row-cta { border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent); background: color-mix(in srgb, var(--teal) 7%, transparent); border-radius: 12px; padding: 10px 12px; }
.si-row-m { min-width: 0; flex: 1; }
.si-row-t { font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }
.si-row-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.si-tag { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); vertical-align: 1px; }
.si-muted { font-size: 12.5px; color: var(--muted); padding: 4px 0 8px; }
.si-foot { font-size: 11px; color: var(--dim, var(--muted)); margin-top: 12px; line-height: 1.45; }
.si-danger { color: #d2443d; }
.si-btn.armed { background: #d2443d; color: #fff; border-color: transparent; }
.si-btn.si-all { margin-top: 10px; width: 100%; }
body.is-mobile .si-sheet-wrap { align-items: flex-end; padding: 0; }
body.is-mobile .si-sheet { max-width: none; border-radius: 18px 18px 0 0; max-height: 86vh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* desktop header account menu */
.si-acct { position: relative; }
.si-acct-btn { width: 32px; height: 32px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800; cursor: pointer; border: 1px solid var(--border-strong, var(--border)); background: var(--fill, transparent); color: var(--text); font-family: inherit; }
.si-acct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 600; min-width: 220px; background: var(--card); border: 1px solid var(--border-strong, var(--border));
  border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.16); padding: 6px; }
.si-acct-menu[hidden] { display: none; }
.si-acct-who { padding: 8px 10px 9px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; word-break: break-all; }
.si-acct-menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.si-acct-menu button:hover { background: var(--fill-hover, rgba(0,0,0,.05)); }
