/* Auth page — Acid Terminal overrides (loads after acid-terminal.css) */

body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

body.auth-page .auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
}

body.auth-page .auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  text-decoration: none;
}

body.auth-page h1.auth-heading {
  font-family: var(--font-display) !important;
  font-size: clamp(1.35rem, 3vw, 1.65rem) !important;
  font-weight: 500 !important;
  color: var(--text-primary) !important;
  text-align: center;
  text-transform: none !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
  max-width: none !important;
  margin-bottom: 8px;
}

body.auth-page .auth-tagline {
  font-size: 16px !important;
  color: var(--text-secondary) !important;
  text-align: center;
  line-height: 1.55;
  margin-bottom: 28px;
}

body.auth-page .auth-card {
  width: 100%;
  padding: 28px 28px 24px !important;
}

body.auth-page .auth-tabs {
  gap: 4px;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 4px;
  margin-bottom: 24px;
}

body.auth-page .auth-tab {
  flex: 1;
  text-align: center;
  font: 500 0.8125rem/1.25 var(--font-mono) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary) !important;
  padding: 11px 8px;
  border-radius: 0 !important;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

body.auth-page .auth-tab.active {
  background: var(--acid) !important;
  color: #000 !important;
}

body.auth-page .auth-tab:hover:not(.active) {
  color: var(--text-primary) !important;
}

body.auth-page .form-label,
body.auth-page .auth-form .form-label,
body.auth-page label.form-label {
  display: block;
  font: 500 0.75rem/1.3 var(--font-mono) !important;
  color: var(--text-secondary) !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin-bottom: 8px !important;
}

body.auth-page .form-label .required {
  color: var(--acid) !important;
}

body.auth-page input.form-input,
body.auth-page select.form-input,
body.auth-page textarea.form-input {
  width: 100%;
  font-size: 15px !important;
  line-height: 1.45 !important;
  padding: 12px 14px !important;
  min-height: 44px;
}

body.auth-page textarea.form-input {
  min-height: 96px;
  resize: vertical;
}

body.auth-page .auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.auth-page .sso-btn {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px !important;
  font: 500 0.8125rem/1.25 var(--font-mono) !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 0 !important;
  color: var(--text-primary) !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--line-strong) !important;
}

body.auth-page .sso-btn:hover {
  border-color: var(--acid-dim) !important;
  color: var(--acid) !important;
  background: transparent !important;
}

body.auth-page .divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 0.6875rem/1 var(--font-mono);
  color: var(--text-muted) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 22px 0;
}

body.auth-page .divider-text::before,
body.auth-page .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

body.auth-page .auth-submit {
  width: 100%;
  margin-top: 6px;
}

body.auth-page .auth-link {
  font-size: 13px !important;
  font-weight: 500;
  color: var(--acid) !important;
  text-align: right;
  display: block;
  margin-top: 4px;
  padding: 4px 0;
  background: none !important;
  border: none !important;
  min-height: auto !important;
  cursor: pointer;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: color 0.15s var(--ease-system);
}

body.auth-page .auth-link:hover,
body.auth-page .auth-link:focus-visible {
  color: var(--acid-bright) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.auth-page .auth-card-footer {
  text-align: center;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  margin-top: 22px;
  line-height: 1.55;
}

body.auth-page .auth-card-footer a,
body.auth-page .auth-card-footer button {
  color: var(--acid) !important;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px !important;
}

body.auth-page .auth-card-footer a:hover,
body.auth-page .auth-card-footer button:hover {
  color: var(--text-primary) !important;
}

body.auth-page .auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 13px !important;
  color: var(--text-muted) !important;
}

body.auth-page .trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.auth-page .trust-item i {
  color: var(--acid) !important;
}

body.auth-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  margin-top: 20px;
  text-decoration: none;
  font-family: var(--font-mono);
}

body.auth-page .back-link:hover {
  color: var(--acid) !important;
}

body.auth-page .auth-message {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 0;
  font-size: 14px !important;
  line-height: 1.5;
}

body.auth-page .auth-message.show {
  display: block;
}

body.auth-page .auth-message.error {
  background: rgba(214, 40, 40, 0.1);
  color: #f87171;
  border: 1px solid rgba(214, 40, 40, 0.35);
}

body.auth-page .auth-message.success {
  background: rgba(197, 254, 73, 0.08);
  color: var(--acid);
  border: 1px solid var(--acid-dim);
}

body.auth-page .logged-in-notice {
  display: none;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 0;
  background: rgba(197, 254, 73, 0.06) !important;
  border: 1px solid var(--acid-dim) !important;
}

body.auth-page .logged-in-notice.show {
  display: block;
}

body.auth-page .logged-in-notice p {
  font-size: 14px !important;
  color: var(--text-secondary) !important;
  line-height: 1.55;
  margin-bottom: 6px;
}

body.auth-page .logged-in-notice .notice-email {
  font-weight: 500;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  margin-bottom: 8px;
}

body.auth-page .logged-in-notice .notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

body.auth-page .btn-ghost-light {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--line-strong) !important;
  min-height: 40px;
  padding: 10px 16px !important;
  font: 500 0.75rem/1.25 var(--font-mono) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.auth-page .btn-ghost-light:hover {
  border-color: var(--acid-dim) !important;
  color: var(--acid) !important;
}

body.auth-page.auth-page--signed-in .auth-tabs,
body.auth-page.auth-page--signed-in .tab-panel {
  display: none !important;
}

body.auth-page .profile-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

body.auth-page .profile-section-title {
  font: 500 0.6875rem/1 var(--font-mono) !important;
  color: var(--acid) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

body.auth-page .hint {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  margin-top: 6px;
  line-height: 1.45;
}

body.auth-page .name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

body.auth-page .tab-panel {
  display: none;
}

body.auth-page .tab-panel.active {
  display: block;
}

body.auth-page .github-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

body.auth-page .pw-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

body.auth-page .pw-bar {
  height: 3px;
  flex: 1;
  background: var(--line-strong);
  transition: background 0.15s ease;
}

body.auth-page .pw-bar.weak {
  background: #f87171;
}

body.auth-page .pw-bar.medium {
  background: var(--acid-dim);
}

body.auth-page .pw-bar.strong {
  background: var(--acid);
}

/* Acid Terminal loading overlay */
body.auth-page .loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92) !important;
  backdrop-filter: blur(4px);
}

body.auth-page .auth-loading-panel {
  background: #050505;
  border: 1px solid var(--line);
  padding: 44px 56px;
  text-align: center;
  min-width: 280px;
}

body.auth-page .acid-spinner {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

body.auth-page .acid-spinner__ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--line);
}

body.auth-page .acid-spinner__arc {
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--acid);
  animation: auth-spin 0.9s linear infinite;
}

body.auth-page .auth-loading-label {
  font: 400 14px/1.45 var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 14px;
}

body.auth-page .auth-loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body.auth-page .auth-loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--acid);
  animation: auth-fade 1.2s ease-in-out infinite;
}

body.auth-page .auth-loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

body.auth-page .auth-loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@keyframes auth-fade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@media (max-width: 520px) {
  body.auth-page {
    padding: 20px 12px;
    align-items: flex-start;
  }

  body.auth-page .auth-wrapper {
    max-width: 100%;
  }

  body.auth-page h1.auth-heading {
    font-size: 1.35rem !important;
  }

  body.auth-page .auth-tagline {
    font-size: 15px !important;
    margin-bottom: 22px;
  }

  body.auth-page .auth-card {
    padding: 22px 16px 20px !important;
  }

  body.auth-page .auth-tab {
    font-size: 0.75rem !important;
    padding: 10px 6px;
  }

  body.auth-page .logged-in-notice .notice-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.auth-page .logged-in-notice .notice-actions .btn,
  body.auth-page .logged-in-notice .notice-actions .btn-ghost-light {
    width: 100% !important;
  }

  body.auth-page .auth-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  body.auth-page .name-row {
    grid-template-columns: 1fr;
  }

  body.auth-page .auth-loading-panel {
    padding: 36px 24px;
    margin: 0 12px;
    width: calc(100% - 24px);
  }
}
