/* Auth Pages */

.auth-page {
  min-height: 100vh;
  background-color: var(--ui-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-panel {
  background-color: var(--ui-surface);
  border-radius: 12px;
  padding: var(--space-xl);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.auth-panel--shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.auth-header {
  margin-bottom: var(--space-lg);
}

.auth-title {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ui-text);
  margin: 0 0 var(--space-sm) 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-md);
  color: var(--ui-muted);
  margin: 0;
  line-height: 1.5;
}

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

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

.auth-label {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ui-text);
  letter-spacing: 0.01em;
}

.auth-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-md);
  color: var(--ui-text);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--ui-accent);
  background-color: rgba(255, 255, 255, 0.08);
}

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

.auth-input--code {
  text-align: center;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0.2em;
  padding: var(--space-md);
}

.auth-button {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ui-text);
  background: linear-gradient(135deg, var(--ui-accent) 0%, #4A7AD8 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(91, 141, 239, 0.45),
    0 2px 4px rgba(74, 122, 216, 0.35);
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.15s ease;
}

.auth-button:hover {
  background: linear-gradient(135deg, #4A7AD8 0%, #3D6BC4 100%);
  box-shadow: 
    0 6px 16px rgba(91, 141, 239, 0.55),
    0 3px 6px rgba(74, 122, 216, 0.45);
  transform: translateY(-2px) scale(1.02);
}

.auth-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 2px 6px rgba(91, 141, 239, 0.5),
    0 1px 2px rgba(74, 122, 216, 0.4);
}

.auth-help-text {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-sm);
  color: var(--ui-muted);
  line-height: 1.6;
  margin: 0;
}

.auth-link {
  color: var(--ui-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #6B9DFF;
  text-decoration: underline;
}

.auth-errors {
  background-color: rgba(224, 90, 90, 0.1);
  border: 1px solid rgba(224, 90, 90, 0.3);
  border-radius: 8px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.auth-error {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro", sans-serif;
  font-size: var(--text-sm);
  color: #E05A5A;
  margin: 0;
}

.auth-error + .auth-error {
  margin-top: var(--space-xs);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .auth-page {
    padding: var(--space-md);
  }

  .auth-panel {
    padding: var(--space-lg);
  }

  .auth-title {
    font-size: var(--text-lg);
  }
}
