:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-edge: #334155;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --teal: #14b8a6;
  --teal-strong: #0d9488;
  --red: #f87171;
  --green: #4ade80;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px env(safe-area-inset-bottom);
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin: auto 0;
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand h1 {
  color: var(--teal);
  font-size: 28px;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.brand p {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 6px 0;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}

input:focus {
  border-color: var(--teal);
}

.otp-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

button {
  font-family: inherit;
}

button.primary {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  background: var(--teal-strong);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button.primary:hover:not(:disabled),
button.primary:focus-visible {
  background: var(--teal);
}

button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

button.ghost:hover,
button.ghost:focus-visible {
  color: var(--text);
  border-color: var(--text-dim);
}

.error {
  color: var(--red);
  font-size: 13px;
  margin: 12px 0 0 0;
  min-height: 18px;
}

.hint {
  color: var(--text-dim);
  font-size: 13px;
  margin: -8px 0 16px 0;
  line-height: 1.5;
}

.info-row {
  font-size: 14px;
  color: var(--text);
  background: #0f172a;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 12px 0 8px 0;
  text-align: center;
}

.info-row:empty {
  display: none;
}

.ok-msg {
  color: var(--green);
  font-size: 13px;
  text-align: center;
  margin: 12px 0 0 0;
}

.hidden { display: none; }

.legal {
  margin-top: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
}

.legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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