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

:root {
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --error: #ef4444;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

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

.container {
  width: 100%;
  max-width: 440px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.card-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #fff;
}

input.invalid {
  border-color: var(--error);
}

input.invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.error {
  display: block;
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  min-height: 1.2em;
}

.btn-submit {
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

.btn-submit:active {
  transform: scale(0.98);
}

.btn-secondary {
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

.success-message {
  text-align: center;
  padding: 1rem 0;
}

.success-message svg {
  color: var(--success);
  margin-bottom: 1rem;
}

.success-message h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hidden {
  display: none;
}
