*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e8edf4;
  --muted: #9aa8b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --error: #f87171;
  --success: #4ade80;
  --border: #2d3a4d;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1a2332;
    --muted: #5c6b7a;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #d8dee8;
  }
}

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

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.title {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.subtitle {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary {
  margin-top: 1rem;
  width: 100%;
  min-height: 48px;
  padding: 0.875rem 1.25rem;
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-large {
  min-height: 56px;
  font-size: 1.125rem;
}

.btn-link {
  background: transparent;
  color: var(--muted);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-link:hover {
  color: var(--text);
}

.top-bar {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.user-label {
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: capitalize;
}

.message {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.message.error {
  background: rgba(248, 113, 113, 0.15);
  color: var(--error);
}

.message.success {
  background: rgba(74, 222, 128, 0.15);
  color: var(--success);
}
