/* ============================================================
   login.css — Login page
   Uses --ds-* design tokens
   ============================================================ */

/* Center the page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Messages (fixed, centered) */
.messages {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  list-style: none; padding: 0; margin: 0;
  width: min(92vw, 420px);
  z-index: 5;
}
.messages li {
  margin: 6px 0; padding: 10px 12px; border-radius: 10px;
  text-align: center; font-size: 14px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  color: var(--ds-text);
}
.messages li.error {
  background: rgba(220,61,74,.12);
  border-color: rgba(220,61,74,.35);
  color: #ffb3bc;
}
.messages li.success {
  background: rgba(52,199,89,.12);
  border-color: rgba(52,199,89,.35);
  color: #b0f0c0;
}

/* Login card */
#login-card {
  width: min(92vw, 380px);
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius);
  padding: 22px 18px 18px;
  box-shadow: var(--ds-shadow-hover);
}

/* Title */
.login-title {
  margin: 2px 0 12px;
  text-align: center;
  color: var(--ds-text);
  font-size: 22px;
  font-weight: 700;
}

/* Input fields */
.input-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.input-row label {
  font-size: 12px;
  color: var(--ds-text-muted);
  margin-left: 28px;
}
.input-row input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border-radius: var(--ds-radius-sm);
  border: 1px solid var(--ds-border);
  background: rgba(0,0,0,.25);
  color: var(--ds-text);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.input-row input:focus {
  border-color: var(--ds-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(88,166,255,.15);
  background: rgba(0,0,0,.3);
}

/* Field icon */
.field-icon {
  position: absolute; left: 10px; top: 32px;
  color: var(--ds-accent); pointer-events: none;
}

/* CTA button */
.btn-cta {
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: var(--ds-radius-sm);
  background: var(--ds-accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(88,166,255,.2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(88,166,255,.3);
}

/* Small screens */
@media (max-height: 520px) {
  .login-page { align-items: flex-start; padding-top: 16px; }
  #login-card { margin-top: 8px; }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .btn-cta { transition: none; }
}
