/* Sign-in screens (#/login, #/setup, #/invite, #/link), account settings and the Users tab. */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 32px 16px; }
.auth-card {
  margin: auto 0; /* centred when it fits, scrolls from the top when it doesn't */
  width: min(440px, 100%); background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(22px, 5vw, 34px); display: flex; flex-direction: column; gap: 16px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-dim); }
.auth-brand img { width: 28px; height: 28px; }
.auth-card h1 { font-size: 24px; }
.auth-card p { margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; color: var(--text-dim); font-size: 14px; }
.auth-form input:not([type=checkbox]) {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--text); font-size: 16px; outline: 0; width: 100%;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form .btn.primary { padding: 12px 20px; font-size: 16px; }
.hint { font-size: 12px; color: var(--text-faint); }
.code-input { font-size: 26px !important; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.wide-code { letter-spacing: 0.2em; text-transform: uppercase; }
.auth-steps { color: var(--text-dim); font-size: 14px; }
.qr { background: #fff; border-radius: 12px; padding: 10px; width: min(220px, 70%); align-self: center; }
.qr svg { display: block; width: 100%; height: auto; }
.small-qr { width: 160px; align-self: flex-start; }
.secret { display: inline-block; margin-top: 4px; letter-spacing: 0.05em; user-select: all; }
.center { text-align: center; }
.backup-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.backup-codes code { display: block; text-align: center; font-size: 15px; padding: 6px; }

.account-form { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.account-form h3 { font-size: 16px; }
.account-form p { margin: 0; }
.device-list, .user-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; }
.device-list li, .user-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.device-list li:last-child, .user-list li:last-child { border-bottom: 0; }
.user-main { flex: 1; min-width: 220px; }
.user-main .pill { margin-left: 4px; }
.is-disabled .user-main b { color: var(--text-faint); text-decoration: line-through; }
.section-head.full { width: 100%; }
.invite-form { padding: 14px; border: 1px solid var(--accent); border-radius: 12px; }
.link-panel { border-color: var(--accent); }
.link-row { width: 100%; }
.link-row input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--text); }

.log-table { width: 100%; display: flex; flex-direction: column; font-size: 13px; max-height: 420px; overflow: auto; }
.log-row { display: grid; grid-template-columns: 170px 150px 110px 1fr 120px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.log-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bad-row span:nth-child(2) { color: var(--bad); }

@media (max-width: 700px) {
  .log-row { grid-template-columns: 1fr 1fr; }
  .log-row span:nth-child(4), .log-row span:nth-child(5) { display: none; }
}
