* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #171717;
  --text-muted: #737373;
  --accent: #0a0a0a;
  --error: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-bottom: 28px;
  padding: 0 8px;
}

.logo img {
  max-height: 150px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

input[type="email"],
input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

input::placeholder {
  color: var(--text-muted);
}

.btn {
  height: 44px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  margin-top: 4px;
}

.btn-primary:hover {
  background: #262626;
}

.btn-primary:active {
  opacity: 0.9;
}

.messages {
  list-style: none;
  margin-bottom: 20px;
}

.messages li {
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.messages li.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: -4px;
}

.password-row {
  display: none;
}

.password-row.visible {
  display: block;
}
