/* The auth service's sign-in look (cmd/auth/web/theme.css), copied so the
   admin sign-in matches it. */

:root {
  --bg: #0d0c0f;
  --surface: #18171b;
  --field: #262626;
  --border: #2b2a30;
  --text: #fafafa;
  --muted: #9a9aa2;
  --dim: #6b6b73;
  --accent: #d9622b;
  --accent-hover: #e4703a;
  --accent-dim: #5a3420;
  --error: #ff7a6b;
  --ok: #5fd08a;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page { width: 100%; max-width: 420px; }

.logo { display: block; height: 40px; width: auto; margin: 0 auto 36px; }

h1 {
  margin: 0 0 28px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
}

.lede { margin: -16px 0 28px; text-align: center; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

/* Fields ------------------------------------------------------------------ */

label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.req { color: var(--accent); }

input[type=email], input[type=password], input[type=text] {
  width: 100%;
  margin: 0 0 20px;
  padding: 14px 16px;
  background: var(--field);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
}

input::placeholder { color: var(--dim); }

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 98, 43, 0.25);
}

/* Reveal sits inside the field, so the input keeps room for its own text. */
.reveal-wrap { position: relative; }
.reveal-wrap input { padding-right: 48px; }
.reveal {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.reveal:hover { color: var(--text); }
.reveal svg { width: 18px; height: 18px; }

/* Buttons ----------------------------------------------------------------- */

button {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.btn {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { background: var(--accent-dim); color: var(--dim); cursor: not-allowed; }

.btn-ghost {
  width: 100%;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--field);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: #2f2f2f; }

/* Side-by-side choices stack on a phone rather than squeeze. */
.actions { display: flex; gap: 12px; }
.actions > * { flex: 1; width: auto; }
@media (max-width: 380px) {
  .actions { flex-direction: column; }
}

/* Provider buttons -------------------------------------------------------- */

.provider {
  width: 100%;
  margin: 0 0 12px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--field);
  color: var(--text);
  border-color: var(--border);
}
.provider:hover { background: #2f2f2f; }
.provider svg { width: 18px; height: 18px; }
/* Apple's guidelines: black or white, their mark, their wording. */
.provider.apple { background: #000; color: #fff; border-color: #000; }
.provider.apple:hover { background: #111; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
  color: var(--dim);
  font-size: 0.85rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Links and small print --------------------------------------------------- */

a { color: var(--muted); }
a:hover { color: var(--text); }

.row-end { text-align: right; margin: -10px 0 20px; }
.row-end a { font-size: 0.95rem; }

.footer-link { margin: 24px 0 0; text-align: center; font-size: 0.95rem; }

.note, .hint, .dest, .detail {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.note { border-top: 1px solid var(--border); padding-top: 18px; }

.msg { margin: 0; font-size: 1.05rem; }
.desc { margin: 0 0 20px; color: var(--muted); }
.client, .app { color: var(--text); font-weight: 600; }

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: rgba(255, 122, 107, 0.1);
  border: 1px solid rgba(255, 122, 107, 0.3);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.92rem;
}
.error:empty { display: none; padding: 0; border: 0; }

/* Badge: who Stryd says the app is. The colour carries no warning; every
   self-registered client wears one, so the wording below does that work. */
.badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge-ok {
  background: rgba(95, 208, 138, 0.12);
  border: 1px solid rgba(95, 208, 138, 0.35);
  color: var(--ok);
}
.badge-open {
  background: var(--field);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Disclosure: what Stryd did and did not check. Sits above the buttons so it
   is read before the decision, not after it. */
.disclosure {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: var(--field);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.disclosure a { color: var(--text); text-decoration: underline; }

/* Scope list: one line per thing the app is asking for. */
.scopes { margin: 0 0 20px; padding: 0; list-style: none; }
.scopes li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.scopes li:last-child { border-bottom: 1px solid var(--border); }
.scopes li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Status marks ------------------------------------------------------------ */

.mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
}
.mark.ok { background: rgba(95, 208, 138, 0.14); color: var(--ok); }
.mark.bad { background: rgba(255, 122, 107, 0.14); color: var(--error); }

.centered { text-align: center; }

.code {
  margin: 16px 0 0;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}
