/* Sign-in and profile pages (templates/accounts/). Tokens come from base.css. */
body { min-height: 100vh; display: flex; flex-direction: column; }
.acct { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.acct.narrow { max-width: 420px; }
.acct h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; }
.acct .sub { color: var(--text3); font-size: 14.5px; line-height: 1.55; margin-bottom: 24px; }
.acct-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 16px; }
.acct-card h2 { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.acct-card .hint { font-size: 13px; color: var(--text3); margin-bottom: 14px; line-height: 1.5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px;
  font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text);
}
.btn:hover { border-color: var(--text3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: none; color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); width: auto; }
.btn.small { width: auto; padding: 8px 16px; font-size: 13.5px; }
.btn svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12.5px; color: var(--text3); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field { width: 100%; padding: 11px 14px; font: inherit; font-size: 14.5px; color: var(--text); margin-bottom: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.field:focus { outline: none; border-color: var(--accent); }
.flabel { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin: 4px 0 6px; }
.flabel .opt { font-weight: 400; color: var(--text3); }
.fhint { font-size: 12.5px; color: var(--text3); margin: -4px 0 12px; line-height: 1.45; }
.pw { position: relative; }
.pw .field { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px; height: 30px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text2); background: var(--bg3); border: 0; border-radius: 8px; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); }
.acct-card form .btn.primary { margin-top: 6px; }
.links { margin-top: 12px; font-size: 13.5px; text-align: center; }
.links a, .switch a { color: var(--accent); text-decoration: none; font-weight: 500; }
.links a:hover, .switch a:hover { text-decoration: underline; }
.switch { text-align: center; font-size: 14px; color: var(--text3); margin-top: 4px; }
.narrow-form { max-width: 380px; }
.flash { padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--accentdim); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.fine { font-size: 12.5px; color: var(--text3); line-height: 1.55; margin-top: 16px; }
.fine a { color: var(--text2); }

/* Profile */
.who { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.who img, .who .initial { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.who .initial { display: grid; place-items: center; background: var(--accentdim); color: var(--accent); font-size: 22px; font-weight: 700; }
.who .name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.who .email { font-size: 13.5px; color: var(--text3); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats div { background: var(--bg3); border-radius: var(--radius-sm); padding: 10px 12px; }
.stats dt { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; }
.stats dd { font-size: 18px; font-weight: 650; margin-top: 3px; font-family: var(--mono); }
.teams-label { font-size: 12.5px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; margin: 14px 0 8px; }
.team-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.team-pick label {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
}
.team-pick input { position: absolute; opacity: 0; pointer-events: none; }
.team-pick img { width: 22px; height: 22px; object-fit: contain; }
.team-pick label:has(input:checked) { border-color: var(--accent); background: var(--accentdim); color: var(--text); }
.team-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-link { display: block; margin: -8px 0 16px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none; border: 1px dashed var(--border2); border-radius: var(--radius-sm); }
.admin-link:hover { border-color: var(--accent); }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.row-actions .field { margin: 0; max-width: 160px; }
@media (max-width: 560px) { .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
