/* Shared dark-auth chrome — AuthChromeCssContract */
:root {
  --wo-dark: #1a1a1e;
  --wo-dark-elevated: #2a2a2f;
  --wo-yellow-spark: #ffcb00;
  --wo-blue-lab: #5968ea;
  --wo-text: #ffffff;
  --wo-text-secondary: #dadada;
  --wo-text-muted: #b4b6ba;
  --wo-danger: #ff6b6b;
  --wo-success: #10b981;
  /*
   * Teseracto field ink — Restrained semantic tint on console dark.
   * Idle leans Blue Lab (shell secondary). Spark stays on chrome only.
   * Verifying / error shift chroma for state without flooding the form.
   */
  --wo-teseracto-ink: #4a4e5e;
  --wo-teseracto-ink-verifying: #565f7a;
  --wo-teseracto-ink-error: #6a5256;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-body: Inter, sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --text-title: 1.5rem;
  --text-body: 0.875rem;
  --text-label: 0.75rem;
}

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

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background: var(--wo-dark);
  font-family: var(--font-body);
  color: var(--wo-text);
  overflow-x: hidden;
}

/* Teseracto brand field — decorative canvas behind auth chrome */
#teseracto-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  touch-action: none;
  display: block;
  contain: strict;
}

.auth-wrap,
main {
  position: relative;
  z-index: 1;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  animation: auth-fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-wrap {
    animation: none;
  }
}

.auth-logo {
  display: block;
  height: 108px;
  width: auto;
  margin: 0 auto;
  opacity: 1;
  background: transparent;
}

.auth-title-mark {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0;
  line-height: 0;
}

.auth-card {
  background: var(--wo-dark-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--wo-text);
}

.auth-subtitle {
  margin: 0 0 28px;
  font-size: var(--text-body);
  color: var(--wo-text-muted);
  line-height: 1.5;
}

.auth-label {
  display: block;
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wo-text-muted);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(26, 26, 30, 0.8);
  color: var(--wo-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
}

.auth-input::placeholder {
  color: var(--wo-text-muted);
}

.auth-input:focus-visible {
  border-color: var(--wo-yellow-spark);
}

.auth-input[aria-invalid="true"] {
  border-color: var(--wo-danger);
}

.auth-btn-primary {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(255, 203, 0, 0.65);
  border-radius: var(--radius-md);
  background: rgba(255, 203, 0, 0.22);
  color: var(--wo-yellow-spark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.auth-btn-primary:hover:not(:disabled) {
  background: rgba(255, 203, 0, 0.3);
}

.auth-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-btn-primary:focus-visible {
  outline: 2px solid var(--wo-yellow-spark);
  outline-offset: 2px;
}

.auth-btn-primary:disabled {
  opacity: 0.45;
  cursor: wait;
}

.auth-btn-secondary {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--wo-text-secondary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-body);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-btn-secondary:hover {
  color: var(--wo-text);
  border-color: rgba(255, 255, 255, 0.28);
}

.auth-btn-secondary:focus-visible {
  outline: 2px solid var(--wo-yellow-spark);
  outline-offset: 2px;
}

.auth-error {
  margin-top: 12px;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--wo-danger);
}

.auth-error:empty {
  display: none;
}

.auth-info {
  margin-top: 12px;
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--wo-success);
}

.auth-info:empty {
  display: none;
}

.auth-forgot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--wo-text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color 0.15s ease;
}

.auth-forgot-btn:hover {
  color: var(--wo-text-secondary);
}

.auth-forgot-btn:focus-visible {
  outline: 2px solid var(--wo-yellow-spark);
  outline-offset: 2px;
}

.password-field {
  position: relative;
  margin-bottom: 16px;
}

.password-field .auth-input {
  margin-bottom: 0;
  padding-right: 5.5rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  margin: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--wo-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.password-toggle:hover {
  color: var(--wo-text-secondary);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--wo-yellow-spark);
  outline-offset: 2px;
}
