/* Accounts: sign-in, registration, two-step verification, company users & locations. */

/* ---------- Auth pages ---------- */
.auth-head { text-align: center; margin: 4px 0 22px; }
.auth-head h1 { font-size: 1.45rem; margin: 0 0 6px; }
.auth-head p { color: var(--muted); margin: 0; font-size: .94rem; }
.auth-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px;
  background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); }
.auth-icon.is-success { background: var(--success-bg); color: var(--success); border-color: #bfe3cf; }
.auth-icon.is-warning { background: var(--warning-bg); color: var(--warning); border-color: #f1d9a8; }
.auth-icon.is-danger { background: var(--danger-bg); color: var(--danger); border-color: #f2c4c0; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 16px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-foot { text-align: center; margin: 22px -18px -18px; padding: 14px 18px; border-top: 1px solid var(--border);
  background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: .92rem; color: var(--muted); }
.auth-help { text-align: center; color: var(--muted); font-size: .84rem; margin-top: 14px; }
.auth-help a { color: var(--text-2); }
.auth-email { font-weight: 600; color: var(--text); word-break: break-all; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row label { margin-bottom: 5px; }
.label-row a { font-size: .84rem; font-weight: 500; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.password-wrap .reveal { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); min-height: 34px;
  min-width: 34px; color: var(--muted); }
.btn .icon { flex-shrink: 0; }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .93rem; color: var(--text-2); }
.list-check li { display: flex; gap: 10px; align-items: flex-start; }
.list-check .icon { color: var(--accent); margin-top: 3px; }

/* One-time codes */
.otp-input { font-family: var(--mono) !important; font-size: 1.45rem !important; letter-spacing: .3em; text-align: center;
  min-height: 52px !important; }
.qr-box { display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); width: max-content; margin: 0 auto; }
.qr-box svg { display: block; width: 190px; height: 190px; }
.secret-key { font-family: var(--mono); font-size: .98rem; letter-spacing: .05em; background: var(--surface-2);
  border: 1px dashed var(--border-strong); padding: 8px 12px; border-radius: var(--radius-sm); text-align: center;
  word-break: break-all; user-select: all; }
.setup-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.setup-steps > li { counter-increment: step; position: relative; padding-left: 38px; margin-bottom: 20px; }
.setup-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .8rem;
  font-weight: 700; }
.setup-steps h3 { font-size: .98rem; margin: 2px 0 6px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; list-style: none;
  padding: 16px 20px; margin: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--mono); font-size: 1.02rem; letter-spacing: .04em; }
.recovery-codes li { padding: 4px 0; }

/* ---------- Registration ---------- */
.reg-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.reg-section { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 6px; margin-bottom: 8px; }
.reg-section:first-of-type { border-top: 0; padding-top: 0; }
.reg-section > h2 { font-size: 1.02rem; display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.reg-section > .section-hint { color: var(--muted); font-size: .88rem; margin: 0 0 16px 36px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid;
  place-items: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.terms-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.terms-box .form-field { margin: 0; }
.span-2 { grid-column: 1 / -1; }

/* Radio / checkbox lists rendered by Django (RadioSelect, CheckboxSelectMultiple) */
.choice-list { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.choice-list legend { padding: 0; }
.choice-list > div > div, .inline-choices > div > div { margin: 0; }
.choice-list label, .inline-choices label { font-weight: 500; color: var(--text); display: flex; align-items: flex-start;
  gap: 2px; margin: 0; cursor: pointer; }
.choice-list > div { display: grid; gap: 6px; }
.choice-cards > div { display: grid; gap: 8px; }
.choice-cards label { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px;
  background: var(--surface); transition: border-color .12s, background .12s; }
.choice-cards label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.choice-cols > div { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.inline-choices > div { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-choices label { border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 14px 6px 10px; }
.inline-choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }

/* ---------- Account pages (storefront / staff) ---------- */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .account-grid { grid-template-columns: minmax(0, 1fr); } }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700);
  display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; flex-shrink: 0; text-transform: uppercase; }
.avatar.is-muted { background: var(--surface-3); color: var(--faint); }
.person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person .who { min-width: 0; }
.person .who strong { display: block; color: var(--text); }
.person .who > span { color: var(--muted); font-size: .85rem; display: block; overflow: hidden; text-overflow: ellipsis; }
tr.is-inactive td { color: var(--faint); }
tr.is-inactive .person .who strong { color: var(--muted); }
.perm-list { display: flex; flex-wrap: wrap; gap: 4px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status-row + .status-row { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.status-row h3 { margin: 0 0 2px; font-size: 1rem; }
.status-row p { margin: 0; color: var(--muted); font-size: .9rem; }
.reauth-panel { margin-top: 14px; }
.reauth-panel form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.reauth-panel .form-field { margin: 0; flex: 1; min-width: 200px; }

/* Location cards */
.location-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.location-card { display: flex; flex-direction: column; }
.location-card .card-body { flex: 1; }
.location-card h3 { margin: 0 0 2px; font-size: 1rem; }
.location-card address { font-style: normal; color: var(--text-2); font-size: .92rem; line-height: 1.55; }
.location-card .meta { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.location-card .card-footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.location-card.is-inactive { opacity: .7; }
.location-card .badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.form-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin: 6px 0 12px; font-weight: 700; }

@media (max-width: 640px) {
  .recovery-codes { padding: 14px; gap: 6px 10px; font-size: .95rem; }
  .reg-section > .section-hint { margin-left: 0; }
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .table-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; }
  .table-stack td.actions { justify-content: flex-end; padding-top: 8px; }
  .table-stack td:first-child { padding-bottom: 6px; }
}
@media print {
  .auth-page { background: #fff; }
  .recovery-codes { border: 1px solid #000; }
}
