.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card .logo {
  justify-content: center;
  margin-bottom: 8px;
}

.auth-card h1 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-card .lead {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.input-wrap {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
.input-wrap .pre {
  padding: 0 2px 0 14px;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}
.input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
}
.input-wrap input::placeholder { color: var(--text-faint); }

.auth-card .btn { margin-top: 8px; }
.auth-alt {
  text-align: center;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.auth-alt a { color: var(--accent); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.form-error {
  display: none;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.9rem;
}
.form-error.show { display: block; }

.back-home {
  position: fixed;
  top: 22px;
  left: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
  z-index: 10;
}
.back-home:hover { color: var(--text); }

/* Card entrance (keyframes defined in style.css, loaded first). */
.auth-card { animation: floatUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
}
