/* Veluma — Login Screen Styles
 *
 * The first impression of Veluma — the page users see before authentication.
 * Cream background with subtle gradient, centered card with the wordmark
 * above and email/password form below.
 */

/* ─────────────────────────────────────────────
 * Login page container
 * ───────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--color-surface-page);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}

/* Subtle brand gradient washes behind the card */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 1200px 600px at 80% -10%, rgba(254, 1, 154, 0.06), transparent 60%),
    radial-gradient(ellipse 800px 400px at -10% 110%, rgba(28, 2, 100, 0.05), transparent 50%);
  z-index: 0;
}

/* Paper-grain noise overlay for depth */
.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' /><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: multiply;
  z-index: 1;
}

/* ─────────────────────────────────────────────
 * Login card
 * ───────────────────────────────────────────── */

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface-card);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.login-card-brand {
  text-align: center;
  margin-bottom: var(--space-8);
}

.login-card-wordmark {
  width: 380px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.login-card-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

/* Tagline directly under the wordmark — a quieter navy sibling of the
 * "POWERED BY LUMENASA AI" footer. Grouped tight to the wordmark above. */
.login-card-tagline {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-mono);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

/* ─────────────────────────────────────────────
 * Login form
 * ───────────────────────────────────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.login-form-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--space-2);
}

.login-form-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--space-4);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.login-field-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.login-field-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-surface-page);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--easing-default),
              box-shadow var(--duration-fast) var(--easing-default);
}

.login-field-input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: var(--shadow-focus);
}

.login-field-input:disabled {
  background: var(--color-border-soft);
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────
 * Primary action button
 * ───────────────────────────────────────────── */

/* Primary action (PINK). White label on #E0017F at rest (~4.7:1 AA); rest
 * equals the old hover shade, so the fill no longer darkens on hover. */
.login-submit {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-action-primary);
  color: var(--color-on-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing-default),
              color var(--duration-fast) var(--easing-default),
              transform var(--duration-fast) var(--easing-default);
  margin-top: var(--space-2);
}

.login-submit:hover:not(:disabled) {
  background: var(--color-action-primary-hover);
  color: var(--color-text-inverse);
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.login-submit:disabled {
  background: var(--color-brand-muted);
  cursor: not-allowed;
}

.login-submit-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(28, 2, 100, 0.25);
  border-top-color: var(--color-on-primary);
  border-radius: var(--radius-full);
  animation: shell-spin 0.6s linear infinite;
  margin-right: var(--space-2);
  vertical-align: middle;
}

/* Secondary text link — "Forgot password?" / "Back to sign in" */
.login-link {
  display: block;
  width: 100%;
  margin-top: var(--space-3);
  padding: var(--space-2);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-align: center;
  cursor: pointer;
  transition: color var(--duration-fast) var(--easing-default);
}

.login-link:hover {
  color: var(--color-brand-primary);
  text-decoration: underline;
}

/* ─────────────────────────────────────────────
 * Status messages — errors and notices
 * ───────────────────────────────────────────── */

.login-message {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.login-message.is-error {
  background: rgba(184, 40, 40, 0.08);
  border: 1px solid rgba(184, 40, 40, 0.2);
  color: var(--color-status-error);
}

.login-message.is-info {
  background: rgba(46, 92, 138, 0.08);
  border: 1px solid rgba(46, 92, 138, 0.2);
  color: var(--color-status-info);
}

.login-message.is-success {
  background: rgba(46, 125, 91, 0.08);
  border: 1px solid rgba(46, 125, 91, 0.2);
  color: var(--color-status-success);
}

/* ─────────────────────────────────────────────
 * Footer / helper links
 * ───────────────────────────────────────────── */

.login-helper {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-6);
}

.login-helper-link {
  color: var(--color-brand-primary);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.login-helper-link:hover {
  text-decoration: underline;
}

.login-page-footer {
  position: absolute;
  bottom: var(--space-6);
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-mono);
  text-transform: uppercase;
  color: var(--color-text-muted);
  z-index: 2;
}

/* ─────────────────────────────────────────────
 * Responsive
 * ───────────────────────────────────────────── */

@media (max-width: 480px) {
  .login-card {
    padding: var(--space-6) var(--space-5);
  }

  .login-card-wordmark {
    width: 300px;
  }
}
