:root {
  --purple-50:  #EEEDFE;
  --purple-200: #AFA9EC;
  --purple-400: #7F77DD;
  --purple-600: #534AB7;
  --purple-800: #3C3489;
  --coral-50:   #FAECE7;
  --coral-600:  #993C1D;
  --text:       #1a1a1a;
  --text-muted: #6b6b6b;
  --text-faint: #9e9e9e;
  --border:     rgba(0,0,0,0.12);
  --border-md:  rgba(0,0,0,0.2);
  --bg:         #ffffff;
  --bg-surface: #f7f6f2;
  --radius-md:  8px;
  --radius-lg:  12px;
}

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

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

.card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}

.card-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--purple-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--purple-800);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.01em; margin-bottom: 6px;
}

.subtitle {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 2rem; line-height: 1.5;
}

.messages { margin-bottom: 1.25rem; }
.msg-error {
  font-size: 13px; color: #993C1D;
  background: var(--coral-50); border-radius: var(--radius-md);
  padding: 10px 14px; border: 0.5px solid #F0997B;
}

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

label {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px var(--purple-50);
}

.btn-submit {
  width: 100%;
  height: 42px;
  margin-top: 1.5rem;
  font-size: 14px; font-weight: 500;
  background: var(--text);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}

.btn-submit:hover { opacity: .85; }

.back-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 13px;
  color: var(--text-faint);
  text-decoration: none;
}

.back-link:hover { color: var(--purple-600); }
