/* Sign-in, set-password and Accounts pages. Tokens, .btn and the focus
   ring come from the cursor workbench's ide.css, loaded first — this file
   is layout only, and a raw colour here would be right in one theme only. */

body.auth { overflow: auto; background: var(--s-1); }

.auth-shell {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--s-0); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  padding: 28px 28px 22px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand img { width: 28px; height: 28px; }
.auth-brand .name { font-family: var(--display); font-weight: 800; font-size: var(--t-xl); color: var(--fg); }
.auth-brand .sub { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.08em; color: var(--fg-3); }

.auth h1 { font-family: var(--display); font-size: var(--t-xl); font-weight: 700; margin: 0 0 6px; color: var(--fg); }
.auth p.lead { margin: 0 0 18px; color: var(--fg-2); font-size: var(--t-md); line-height: 1.5; }

.auth-field { display: block; margin-bottom: 14px; }
.auth-field span { display: block; margin-bottom: 5px; font-size: var(--t-sm); font-weight: 600; color: var(--fg-2); }
.auth-field input,
.auth-field select {
  width: 100%; font: inherit; font-size: var(--t-lg); color: var(--fg);
  background: var(--s-0); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 8px 10px;
  transition: border-color var(--dur-1) var(--ease-out);
}
.auth-field input:hover { border-color: var(--ink-26); }
.auth-field input:focus { border-color: var(--blue-600); }

.auth .btn.block { width: 100%; justify-content: center; padding: 8px 12px; font-size: var(--t-md); }

.auth-msg { min-height: 18px; margin: 10px 0 0; font-size: var(--t-sm); line-height: 1.45; }
.auth-msg.bad { color: var(--bad); }
.auth-msg.ok { color: var(--ok); }

.auth-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: var(--t-sm); color: var(--fg-3); line-height: 1.5;
}

/* ---- Accounts (admin) ---- */
.acct { max-width: 920px; margin: 0 auto; padding: 28px 16px 48px; }
.acct-top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.acct-top .spacer { flex: 1; }
.acct-top .who { font-family: var(--mono); font-size: var(--t-sm); color: var(--fg-3); }
.acct-panel {
  background: var(--s-0); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 18px 20px; margin-bottom: 18px;
}
.acct-panel h2 { font-family: var(--display); font-size: var(--t-lg); font-weight: 700; margin: 0 0 12px; }
.acct-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.acct-add .auth-field { margin: 0; flex: 1 1 220px; }

.acct-table { width: 100%; border-collapse: collapse; font-size: var(--t-md); }
.acct-table th {
  text-align: left; font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-3); font-weight: 700;
  padding: 6px 8px; border-bottom: 1px solid var(--line-2);
}
.acct-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.acct-table td.email { font-weight: 600; word-break: break-all; }
.acct-table td.actions { text-align: right; white-space: nowrap; }
.acct-table td.actions .btn + .btn { margin-left: 6px; }
.acct-table tr.off td:not(.actions) { color: var(--fg-3); }
.pill {
  display: inline-block; font-family: var(--mono); font-size: var(--t-xs); font-weight: 700;
  padding: 2px 6px; border-radius: var(--r-xs);
}
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.role { color: var(--accent-ink); background: var(--accent-soft); }

@media (max-width: 640px) {
  .acct-table th:nth-child(4), .acct-table td:nth-child(4) { display: none; }
  .acct-table td.actions { white-space: normal; }
  .acct-table td.actions .btn { margin: 2px 0 2px 6px; }
}

/* ---- shared pieces added with the Account page ---- */
.auth-kicker {
  font-family: var(--mono); font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px;
}
.auth-hint { display: block; margin-top: 5px; font-style: normal; font-size: var(--t-sm); color: var(--fg-3); }
.auth-rules {
  margin: 0 0 16px; padding: 10px 12px 10px 28px; border-radius: var(--r-md);
  background: var(--info-soft); border: 1px solid var(--line);
  font-size: var(--t-sm); line-height: 1.55; color: var(--fg-2);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.btn { text-decoration: none; }

.acct.narrow { max-width: 640px; }
.acct-email { font-family: var(--display); font-size: var(--t-xl); margin: 0; word-break: break-all; }
.acct-role { font-family: var(--mono); font-size: var(--t-sm); color: var(--fg-3); margin-top: 2px; }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.acct-row-text { flex: 1 1 260px; min-width: 0; }
.acct-row-text h2 { margin: 0 0 4px; }
.acct-row-text > span { font-size: var(--t-md); color: var(--fg-2); line-height: 1.5; }
.acct-row .linkbox { flex: 1 1 100%; }
.acct-row.danger { border-color: var(--bad-line-2); }
.acct-table td.email .you {
  margin-left: 8px; font-family: var(--mono); font-size: var(--t-xs); font-weight: 700;
  color: var(--fg-3); border: 1px solid var(--line-2); border-radius: var(--r-xs); padding: 1px 5px;
}

.linkbox {
  margin-top: 14px; padding: 12px; border-radius: var(--r-md);
  background: var(--info-soft); border: 1px solid var(--line-2);
}
.linkbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--t-md); }
.linkbox-url {
  display: block; margin: 8px 0 6px; padding: 7px 9px; border-radius: var(--r-sm);
  background: var(--s-0); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: var(--t-sm); color: var(--fg); word-break: break-all; user-select: all;
}
.linkbox-note { margin: 0; font-size: var(--t-sm); color: var(--fg-3); }
.linkbox-note.warn { color: var(--bad); }
