/* Auth widget — fixed top-left, small and unobtrusive */
#auth-bar {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(17,21,33,.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #8f97b4;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
#auth-bar button {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: #8f97b4;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
#auth-bar button:hover { color: #e8e8f0; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); }
.auth-email { font-size: 11px; color: #4ecdc4; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Auth modal overlay */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.auth-overlay.open { display: flex; }
.auth-box {
  background: #12121a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 32px;
  width: 90%;
  max-width: 380px;
  position: relative;
}
.auth-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  color: #8f97b4; font-size: 18px; cursor: pointer;
}
.auth-box h2 {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #e8e8f0;
  margin-bottom: 20px;
}
#auth-form { display: flex; flex-direction: column; gap: 12px; }
#auth-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #e8e8f0;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
#auth-form input:focus { border-color: #4ecdc4; }
.auth-error { color: #ff5a78; font-size: 13px; min-height: 18px; text-align: center; }
.auth-btn {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #4ecdc4;
  color: #0a0a0f;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.auth-btn:hover { filter: brightness(1.1); }
.auth-btn:disabled { opacity: .5; cursor: default; }
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #8f97b4;
}
.auth-switch a { color: #4ecdc4; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Profile view */
.profile-info { margin: 16px 0; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.profile-label { font-size: 13px; color: #8f97b4; }
.profile-value { font-size: 13px; color: #e8e8f0; font-weight: 600; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.profile-actions .auth-btn { width: 100%; padding: 10px; font-size: 14px; }

/* Light mode */
html[data-theme="light"] #auth-bar { background: rgba(255,255,255,.9); border-color: rgba(0,0,0,.08); color: #555; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
html[data-theme="light"] #auth-bar button { border-color: rgba(0,0,0,.12); color: #555; }
html[data-theme="light"] #auth-bar button:hover { background: rgba(0,0,0,.04); }
html[data-theme="light"] .auth-email { color: #0fa7a0; }
html[data-theme="light"] .auth-box { background: #fff; border-color: rgba(0,0,0,.1); }
html[data-theme="light"] .auth-box h2 { color: #1a1a2e; }
html[data-theme="light"] #auth-form input { background: #f5f5f7; border-color: rgba(0,0,0,.1); color: #1a1a2e; }
