:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1d23;
  --muted: #6b7280;
  --border: #e3e5e8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --error: #dc2626;
  --success: #059669;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #1a1d23;
    --text: #e8e9ec;
    --muted: #9199a6;
    --border: #2c2f36;
    --accent: #6366f1;
    --accent-hover: #7477f3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}

.card.wide {
  max-width: 480px;
}

h1 {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

input, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; }

button, .btn {
  display: inline-block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s;
}

button:hover, .btn:hover { background: var(--accent-hover); }

.error {
  margin-top: 1rem;
  color: var(--error);
  font-size: 0.88rem;
}

.status {
  margin-top: 1rem;
  color: var(--success);
  font-size: 0.88rem;
}

.hint {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.link-row {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.link-row a { color: var(--accent); text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.account-bar {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-bar a { color: var(--muted); }

.center-text { text-align: center; }
