/* Deliberately self-contained: the login page must render correctly even if the
   rest of the app's stylesheet is unreachable. */
:root {
  --bg: #0e1013;
  --card: #181d23;
  --line: #262d36;
  --line-strong: #37414d;
  --text: #e8ecf1;
  --text-dim: #9aa6b4;
  --text-faint: #6b7784;
  --accent: #e1306c;
  --err: #f0506b;
  --err-soft: rgba(240, 80, 107, .14);
  --gradient: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --line: #dfe4ea;
    --line-strong: #c3ccd6;
    --text: #141a20;
    --text-dim: #5a6673;
    --text-faint: #8794a1;
    --accent: #d62a62;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: 100%;
  max-width: 360px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.brand h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.brand .sub { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); }
.mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient);
  box-shadow: 0 2px 12px rgba(238, 42, 123, .35);
  flex: 0 0 auto;
}

form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

input {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
input:focus { outline: none; border-color: var(--accent); }

#code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 20px;
  letter-spacing: .4em;
  text-align: center;
  padding-left: .4em; /* compensate for the trailing letter-space */
}

.btn {
  font: inherit;
  font-weight: 500;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background .12s, opacity .12s;
}
.btn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.error {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--err-soft);
  color: var(--err);
  font-size: 12.5px;
}

.foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
}
