/* Auth Pages for React CDN Version */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem var(--space-lg) var(--space-xl);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-xs);
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  height: 2.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 150ms ease;
}

.oauth-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.oauth-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.auth-divider {
  position: relative;
  margin: var(--space-xl) 0;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  padding: 0 var(--space-md);
  background: var(--bg-card);
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

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

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 0.75rem;
  color: var(--primary);
  cursor: pointer;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 var(--space-sm) 0 2.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text);
  transition: all 150ms ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

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

.password-requirements {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
}

.requirement {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.requirement.met {
  color: #16a34a;
}

.requirement svg {
  opacity: 0.3;
}

.requirement.met svg {
  opacity: 1;
}

.error-message {
  padding: var(--space-sm) var(--space-md);
  background: color-mix(in srgb, #ef4444 10%, transparent);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: #ef4444;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  height: 2.75rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-fg);
  cursor: pointer;
  transition: all 150ms ease;
}

.submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.terms-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.terms-text a {
  color: var(--primary);
}

.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  min-width: 200px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.user-info {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xs);
}

.user-info-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.user-info-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xs) 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.user-dropdown-item:hover {
  background: var(--accent);
  color: var(--text);
}

.user-dropdown-item.danger {
  color: #ef4444;
}

.user-dropdown-item.danger:hover {
  background: color-mix(in srgb, #ef4444 10%, transparent);
}

/* Auth buttons */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-ghost {
  padding: var(--space-xs) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-primary {
  padding: var(--space-xs) var(--space-md);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-fg);
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* OAuth Confirmation Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 24rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--space-md);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.modal-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.modal-note {
  font-size: 0.8125rem;
  background: var(--accent);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.modal-note strong {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.btn-cancel {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-cancel:hover {
  background: var(--accent);
  color: var(--text);
}

.btn-confirm {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-fg);
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-confirm:hover {
  opacity: 0.9;
}
