/* Diluo sign-in — the whole stylesheet.
 *
 * No fonts, no images, no CDN: a login page that pulls a webfont from a third
 * party tells that third party who is signing in and when, and adds a host the
 * visitor's browser must reach before the form is usable. System fonts only.
 */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #d9dce1;
  --text: #1c1f23;
  --muted: #5f6672;
  --accent: #2f5bd7;
  --accent-hover: #274bb4;
  --error-bg: #fdf2f2;
  --error-line: #f0c2c2;
  --error-text: #8a1f1f;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 22rem;
  padding: 2rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.brand {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
}

.field {
  display: block;
  margin-bottom: 0.875rem;
}

.label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(47 91 215 / 12%);
}

.error {
  margin: 0.875rem 0 0;
  padding: 0.5rem 0.7rem;
  font-size: 0.8125rem;
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  border-radius: 6px;
}

button {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

.totp-title {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
}

.enroll-block {
  margin: 0 0 1rem;
  text-align: center;
}

.qr {
  display: block;
  width: 176px;
  height: 176px;
  margin: 0 auto 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.secret {
  margin: 0 0 0.25rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text);
  user-select: all;
  word-break: break-all;
}

.hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.back {
  margin-top: 0.625rem;
  color: var(--accent);
  background: transparent;
  border: 0;
}

.back:hover:not(:disabled) {
  background: transparent;
  color: var(--accent-hover);
}
