/* ── PawLink Auth Pages ── */

/* Nav auth widget */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color 0.15s;
}
.nav-auth-user:hover { color: var(--teal-600); }
.nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  font-weight: 700;
  font-size: var(--text-sm);
}
.nav-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-auth-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-auth-logout {
  background: none;
  border: 1px solid var(--slate-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--slate);
  cursor: pointer;
  transition: all 0.15s;
}
.nav-auth-logout:hover {
  border-color: var(--red, #ef4444);
  color: var(--red, #ef4444);
}

/* Auth page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 48px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 48px 40px;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  text-decoration: none;
  color: var(--navy);
}
.auth-logo svg {
  width: 32px;
  height: 32px;
  color: var(--teal-500);
}
.auth-logo span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-bottom: 8px;
}
.auth-card .auth-subtitle {
  text-align: center;
  color: var(--slate);
  font-size: var(--text-sm);
  margin-bottom: 32px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--slate-light);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.auth-tab.active {
  color: var(--teal-600);
  border-bottom-color: var(--teal-500);
}
.auth-tab:hover:not(.active) {
  color: var(--navy);
}

/* Google button */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-family: 'Roboto', var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 0;
}
.auth-google-btn:hover { background: #f8f9fa; }
.auth-google-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-google-btn svg { flex-shrink: 0; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--slate-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--navy);
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.12);
}
.auth-field input.field-error {
  border-color: var(--red, #ef4444);
}
.auth-field .field-error-msg {
  color: var(--red, #ef4444);
  font-size: var(--text-xs);
  margin-top: 4px;
}
.auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--teal-500);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.auth-submit:hover { background: var(--teal-600); }
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--slate);
  font-size: var(--text-xs);
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-light);
}

/* Magic link section */
.auth-magic {
  text-align: center;
}
.auth-magic-btn {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1.5px solid var(--slate-light);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.auth-magic-btn:hover {
  border-color: var(--teal-500);
  color: var(--teal-600);
}

/* Success state */
.auth-success {
  text-align: center;
  padding: 24px 0;
}
.auth-success svg {
  width: 48px;
  height: 48px;
  color: var(--teal-500);
  margin-bottom: 16px;
}
.auth-success h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.auth-success p {
  color: var(--slate);
  font-size: var(--text-sm);
}

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: var(--text-sm);
  color: var(--slate);
}
.auth-footer a {
  color: var(--teal-600);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* Toast */
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.auth-toast.error { background: var(--red, #ef4444); }

/* Profile page */
.profile-page {
  padding: 100px 24px 48px;
  max-width: 640px;
  margin: 0 auto;
}
.profile-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 40px;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-header h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0;
}
.profile-header p {
  color: var(--slate);
  font-size: var(--text-sm);
  margin: 4px 0 0;
}
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.profile-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-light);
}
.profile-section h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 16px;
}
.profile-danger-btn {
  background: none;
  border: 1.5px solid var(--red, #ef4444);
  color: var(--red, #ef4444);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.profile-danger-btn:hover {
  background: var(--red, #ef4444);
  color: #fff;
}

/* Pet cards on profile */
.pet-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--teal-50, #f0fdfa);
  border-radius: var(--radius-md);
  border: 1px solid var(--teal-100, #ccfbf1);
}
.pet-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--teal-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-700);
  font-weight: 700;
  font-size: 1.1rem;
}
.pet-card-avatar img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .auth-card { padding: 32px 24px; }
  .profile-card { padding: 28px 20px; }
  .profile-header { flex-direction: column; text-align: center; }
  .nav-auth-name { display: none; }
}
