/* Keep custom cursor visible and readable above the auth layer */
body:has(.auth-overlay) #cursor,
body:has(.auth-overlay) #cursor-ring,
body:has(.auth-overlay) #cb-cursor,
body:has(.auth-overlay) #cb-ring {
  mix-blend-mode: normal;
}

/* ── Auth Modal ──────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: auth-fade-in 0.25s ease;
}

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

.auth-box {
  background: var(--bg-mid, #0f0f0f);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  animation: auth-slide-up 0.3s var(--spring, cubic-bezier(0.34,1.56,0.64,1));
  position: relative;
}

@keyframes auth-slide-up {
  from { transform: translateY(24px); opacity:0; }
  to   { transform: translateY(0);    opacity:1; }
}

.auth-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--text, #f0f0f0);
  margin-bottom: 4px;
}

.auth-sub {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint, #666);
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-raised, #1a1a1a);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-dim, #888);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 7px;
  cursor: none;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: var(--bg-float, rgba(255,255,255,0.06));
  color: var(--text, #f0f0f0);
}

.auth-field {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint, #666);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: var(--bg-raised, #1a1a1a);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text, #f0f0f0);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease;
  box-sizing: border-box;
  cursor: none;
}

.auth-input:focus {
  border-color: var(--amber, oklch(0.78 0.18 68));
}

.auth-select {
  width: 100%;
  background: var(--bg-raised, #1a1a1a);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text, #f0f0f0);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  outline: none;
  cursor: none;
  appearance: none;
}

.auth-error {
  background: oklch(0.45 0.22 25 / 0.15);
  border: 1px solid oklch(0.55 0.22 25 / 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  color: oklch(0.75 0.18 25);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  margin-bottom: 14px;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--amber, oklch(0.78 0.18 68));
  color: oklch(0.12 0.02 60);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: none;
  transition: all 0.18s ease;
  margin-top: 6px;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: 0.5;
}

.auth-hint {
  margin-top: 16px;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-faint, #555);
}

.auth-hint a {
  color: var(--text-dim, #888);
  cursor: none;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  background: transparent;
  color: var(--text-faint, #666);
  font-size: 14px;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.auth-close:hover {
  background: var(--bg-raised, #1a1a1a);
  color: var(--text, #f0f0f0);
}

/* User app accent override */
.auth-box--user .auth-input:focus  { border-color: var(--violet, oklch(0.68 0.28 295)); }
.auth-box--user .auth-submit       { background: var(--violet, oklch(0.68 0.28 295)); color: #fff; }
.auth-box--user .auth-tab.active   { color: var(--violet, oklch(0.68 0.28 295)); }

/* ── OAuth divider ───────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border, rgba(255,255,255,0.1));
}
.auth-divider span {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint, #555);
}

/* ── Google button ───────────────────────────────────────── */
.auth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 10px;
  background: var(--bg-raised, #1a1a1a);
  color: var(--text, #f0f0f0);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: none;
  transition: all 0.18s ease;
}
.auth-google:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.28);
  background: var(--bg-float, rgba(255,255,255,0.06));
  transform: translateY(-1px);
}
.auth-google:disabled { opacity: 0.5; }
