@keyframes auth-dialog-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auth-dialog-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-dialog-panel {
  --auth-radius: 0.75rem;
}

.auth-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: oklch(0.08 0.02 260 / 0.72);
  backdrop-filter: blur(10px);
  animation: auth-dialog-overlay-in 0.22s ease-out;
}

.auth-dialog-panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  overflow: hidden;
  border-radius: var(--auth-radius);
  border: 1px solid oklch(from var(--border) l c h / 0.45);
  background: oklch(from var(--card) l c h / 0.88);
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px oklch(from var(--primary) l c h / 0.06),
    0 0 60px oklch(from var(--primary) l c h / 0.1),
    0 24px 48px -12px oklch(0.05 0.02 260 / 0.45);
  animation: auth-dialog-panel-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-dialog-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--auth-radius);
  color: var(--muted-foreground);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.auth-dialog-close:hover {
  color: var(--foreground);
  background: oklch(from var(--secondary) l c h / 0.7);
}

.auth-dialog-body {
  padding: 1.25rem 1.5rem 1.25rem;
}

.auth-dialog-header {
  text-align: center;
  margin-bottom: 0.875rem;
}

.auth-dialog-logo {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.625rem;
}

.auth-dialog-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.auth-dialog-subtitle {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.auth-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.auth-dialog-close svg {
  width: 1rem;
  height: 1rem;
}

.auth-oauth-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.auth-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--auth-radius);
  border: 1px solid oklch(from var(--border) l c h / 0.75);
  background: oklch(from var(--background) l c h / 0.65);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.auth-oauth-btn:hover {
  border-color: oklch(from var(--primary) l c h / 0.35);
  background: oklch(from var(--secondary) l c h / 0.55);
  box-shadow: 0 4px 14px oklch(from var(--primary) l c h / 0.08);
  transform: translateY(-1px);
}

.auth-oauth-label {
  line-height: 1;
}

.auth-dialog-legal {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
  color: var(--muted-foreground);
}

.auth-dialog-support {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
  color: var(--muted-foreground);
}

.auth-dialog-link {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.auth-dialog-link:hover {
  color: var(--primary);
}

/* ─── Public login gate (same AuthDialog as the header) ─── */

.login-page {
  min-height: 100vh;
  background: var(--background);
}

.auth-dialog-notice {
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid color-mix(in oklab, var(--destructive) 35%, transparent);
  border-radius: 8px;
  background: color-mix(in oklab, var(--destructive) 10%, transparent);
  color: var(--destructive);
  font-size: 12px;
  line-height: 1.55;
}
