/* The account page's own components: sign-in forms, the security sections, the setup
   wizard. Colours come only from brand.css tokens, so light/dark and the printect brand
   all follow without a rule here. */

.acct-wide { max-width: 640px; }
.acct-card + .acct-card, #sec .acct-card { margin-top: 18px; }
#sec { display: block; }
.acct-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; color: var(--text); }
.acct-card .sub { margin: 0 0 14px; color: var(--text-dim); font-size: 13px; line-height: 1.5; }

/* ---- forms */
.f { display: flex; flex-direction: column; gap: 12px; }
.f label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600;
  color: var(--text-dim); }
.f input:not([type=checkbox]), .f select {
  font: inherit; font-size: 15px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  width: 100%; box-sizing: border-box; }
.f input:focus { outline: 2px solid var(--accent-glow); border-color: var(--accent); }
.f .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px;
  letter-spacing: .3em; text-align: center; }
.f .row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; font-size: 13px; }
.f .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--link); font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; padding: 6px 8px; }
.meter { height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger);
  transition: width .2s, background .2s; }
.hint { font-size: 12px; color: var(--text-faint); font-weight: 500; }

.btn { white-space: nowrap; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--accent-deep);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 14px;
  font-weight: 650; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn[disabled] { opacity: .6; cursor: default; filter: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-3); filter: none; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
a.lnk, button.lnk { color: var(--link); font: inherit; font-weight: 600; background: none;
  border: 0; padding: 0; cursor: pointer; text-decoration: none; }
a.lnk:hover, button.lnk:hover { text-decoration: underline; }

/* provider buttons */
.prov { display: flex; flex-direction: column; gap: 10px; }
.prov .g-btn { width: 100%; justify-content: center; box-sizing: border-box; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint);
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mark { display: inline-flex; width: 20px; height: 20px; align-items: center;
  justify-content: center; }
.mark svg { width: 18px; height: 18px; }

/* ---- status messages inside a card */
.note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px;
  line-height: 1.5; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-dim); }
.note.err { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.note.ok { border-color: var(--ok); color: var(--text); }
.note.warn { border-color: var(--warn); color: var(--text); }
.note:empty { display: none; }

/* ---- the security sections: rows of "thing | state | action" */
.rows { display: flex; flex-direction: column; }
.r { display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line-soft); }
.r:first-child { border-top: 0; padding-top: 4px; }
.r .ic { flex: 0 0 34px; height: 34px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: var(--surface-3);
  color: var(--text-dim); }
.r .ic svg { width: 18px; height: 18px; }
.r .tx { flex: 1; min-width: 0; }
.r .tx b { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.r .tx span { display: block; font-size: 12.5px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; }
.r .act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--text-faint); }
.pill.on { color: var(--ok); border-color: var(--ok); }
.pill.off { color: var(--warn); border-color: var(--warn); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- dialogs (setup wizard, confirm it's you) */
dialog.dlg { width: min(460px, calc(100vw - 32px)); padding: 22px 24px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow); }
dialog.dlg::backdrop { background: rgba(0,0,0,.45); }
dialog.dlg h3 { margin: 0 0 6px; font-size: 17px; }
.steps { display: flex; gap: 6px; margin: 0 0 16px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.done { background: var(--accent); }
.qr { display: flex; justify-content: center; margin: 14px 0; }
.qr img { width: 200px; height: 200px; background: #fff; border-radius: 8px; padding: 6px;
  border: 1px solid var(--line); }
.key { display: flex; gap: 8px; align-items: center; justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
  background: var(--surface-3); border-radius: var(--radius-sm); padding: 10px;
  word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 12px 0;
  padding: 14px; border-radius: var(--radius-sm); background: var(--surface-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; }
.dlg-actions:empty { display: none; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 16px; }
details.more summary { cursor: pointer; font-size: 13px; color: var(--link); font-weight: 600; }
details.more[open] summary { margin-bottom: 10px; }

@media (max-width: 520px) {
  .r { flex-wrap: wrap; }
  .r .act { width: 100%; justify-content: flex-start; padding-left: 46px; }
  .codes { grid-template-columns: 1fr; }
}
.acct-msg { max-width: 640px; }
.r .tx b .pill { display: inline-block; margin-left: 8px; vertical-align: 1px; }
.f input.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px;
  letter-spacing: .3em; text-align: center; }
.acct-msg.acct-msg-ok { border-color: var(--ok); color: var(--text); background: var(--surface); }
.acct-msg.acct-msg-warn { border-color: var(--warn); color: var(--text); background: var(--surface); }
.acct-id .acct-name { max-width: none; overflow: visible; }

/* ---- "Sign in to Admin?" (app/native_routes.py): a desktop app asking for this account.
   One card: who is asking and as whom, what it gets and what it does not, where it is
   waiting, Allow / Cancel. Server-rendered, no script. */
main.native { max-width: 30rem; margin: 2.5rem auto; padding: 0 16px; }
.native-card { padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.native-pair { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.native-app, .native-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.native-who { justify-content: flex-end; text-align: right; }
.native-app b, .native-who b { display: block; color: var(--text); font-size: 14px; }
.native-app small, .native-who small { display: block; color: var(--text-faint); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.native-who > span { min-width: 0; }
.native-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid;
  place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  font-size: 18px; }
.native-icon-warn { background: var(--surface-3); color: var(--danger); margin-bottom: 14px; }
.native-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--text);
  font-weight: 650; order: 2; }
.native-link { flex: none; width: 34px; height: 2px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 9px); }
.native-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--text); }
.native-lede { margin: 0 0 20px; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.native-card .native-h { margin: 0 0 10px; font-size: 12px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint); }
.native-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.native-list li, .native-cant { display: flex; gap: 12px; align-items: flex-start; font-size: 14px;
  line-height: 1.45; color: var(--text); }
.native-list svg, .native-cant svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none;
  stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.native-cant { margin: 0 0 18px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--text-dim); }
.native-cant svg { stroke: var(--text-faint); }
.native-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.native-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text); }
.native-chip em { font-style: normal; color: var(--text-faint); font-size: 11.5px; }
.native-none { color: var(--text-faint); font-size: 13px; }
.native-warn { margin: 0 0 20px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5;
  color: var(--text-dim); }
.native-warn code { font-size: 12.5px; color: var(--text); }
.native-actions { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.native-actions .btn { width: 100%; padding: 12px 18px; font-size: 15px; font-weight: 600; }
.native-foot { margin: 16px 0 0; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.native-foot a { color: var(--link); }
@media (max-width: 420px) {
  .native-card { padding: 20px; }
  .native-link { display: none; }
  .native-pair { flex-direction: column; align-items: stretch; }
  .native-who { justify-content: flex-start; text-align: left; }
  .native-avatar { order: 0; }
}
