.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 5rem 1rem 2rem;
  background: var(--bg-light);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.auth-card .btn-block {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.7rem;
  font-size: 0.9375rem;
}

.auth-card .btn-block:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.8125rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.auth-footer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.auth-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Navbar auth links */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-auth-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-auth-link:hover {
  color: var(--text);
}

.nav-auth-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-auth-btn:hover {
  background: var(--blue-hover);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 1001;
  overflow: hidden;
}

.nav-user-dropdown.open {
  display: block;
}

.nav-user-info {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

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

.nav-user-dropdown a,
.nav-user-dropdown button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-family: var(--font);
  color: var(--text-secondary);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
}

.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
  background: var(--bg-light);
}

.nav-user-dropdown button.logout-btn {
  border-top: 1px solid var(--border);
  color: #dc2626;
}

.nav-credits-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
}
