/* Sign-in, registration, approval, and user administration.
 *
 * These pages are the first surface an operator sees, so they use the dashboard
 * vocabulary rather than one of their own. Every colour, radius, and font here
 * comes from tokens.css, which each template links ahead of this file. Nothing
 * in this stylesheet may introduce a value that is not defined there.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 34rem),
    linear-gradient(180deg, var(--bg), #0b1726);
}

/* --- shells --------------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-shell {
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

/* The admin header mirrors the dashboard titlebar so moving between them does
 * not read as moving between products. */
.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: var(--gap);
}

.admin-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.admin-nav form { margin: 0; }

.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-actions form { margin: 0; }

/* --- surfaces ------------------------------------------------------------- */
.admin-card,
.auth-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 26, 43, .94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.auth-card {
  width: min(100%, 440px);
  padding: 28px;
}

.auth-actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.auth-actions form { flex: 1; margin: 0; }

/* --- typography ----------------------------------------------------------- */
h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.lede, .auth-switch { color: var(--muted); font-size: 12px; line-height: 1.5; }
.muted { color: var(--muted); }
a { color: var(--link); }

/* --- tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }

th {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: left;
  padding: 0 10px 9px;
  white-space: nowrap;
}

td {
  border-top: 1px solid var(--line-soft);
  padding: 9px 10px;
  font-size: 12.5px;
  text-align: left;
  vertical-align: middle;
}

tbody tr:hover td { background: var(--surface-2); }

/* Account status, namespaced away from the dashboard's signal `.status-*`
 * classes: the two vocabularies mean different things and must not collide. */
.user-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
}

.user-status-pending { color: var(--warning); background: rgba(250, 178, 25, .12); }
.user-status-approved { color: var(--good); background: rgba(12, 163, 12, .16); }

/* --- controls ------------------------------------------------------------- */
form { display: grid; gap: 10px; margin-top: 24px; }
label { margin-top: 4px; font-size: 12px; font-weight: 750; }

input, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  padding: 9px 11px;
}

input { background: #11223b; }

button {
  margin-top: 10px;
  background: var(--accent);
  color: #04121f;
  cursor: pointer;
  font-weight: 750;
}

button.secondary {
  background: transparent;
  color: var(--text);
}

button.danger {
  border-color: rgba(208, 59, 59, .65);
  background: rgba(208, 59, 59, .14);
  color: var(--critical);
}

button.compact {
  width: auto;
  margin: 0;
  padding: 6px 9px;
  font-size: 12px;
}

.form-error {
  margin-top: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(208, 59, 59, .5);
  border-radius: var(--radius-sm);
  color: var(--critical);
  background: rgba(208, 59, 59, .1);
}

:focus-visible { outline: 3px solid var(--warning); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media (max-width: 720px) {
  .admin-header { align-items: flex-start; flex-direction: column; }
  .admin-nav { align-items: flex-start; flex-wrap: wrap; }
}
