.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay, rgba(0,0,0,0.65));
  z-index: 920;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-overlay.open { display: flex; }
.auth-modal {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card, #1a1a1a);
  border: 1px solid var(--border-strong, #333);
  border-radius: 14px;
  padding: 22px 20px 18px;
}
.auth-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin: 0 0 4px;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-secondary, #888);
  margin: 0 0 14px;
  line-height: 1.4;
}
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-tab {
  flex: 1;
  background: var(--bg-elevated, #222);
  border: 1px solid var(--border-strong, #333);
  color: var(--text-secondary, #888);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: #111;
  border-color: #fff;
}
.auth-modal label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary, #888);
  margin-bottom: 6px;
}
.auth-modal input {
  width: 100%;
  background: var(--bg-input, #111);
  border: 1px solid var(--border-strong, #333);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  margin-bottom: 12px;
  outline: none;
}
.auth-modal input:focus { border-color: #555; }
.auth-name-row { display: none; }
.auth-name-row.show { display: block; }
.auth-actions { display: flex; gap: 8px; margin-top: 4px; }
.auth-cancel {
  flex: 1;
  background: var(--bg-elevated, #222);
  border: 1px solid var(--border-strong, #333);
  color: var(--text-secondary, #888);
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}
.auth-submit {
  flex: 1.4;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.auth-submit:hover { opacity: 0.9; }
.auth-submit:disabled { opacity: 0.55; cursor: default; }
.auth-msg { font-size: 13px; margin-top: 10px; min-height: 18px; line-height: 1.35; }
.auth-msg.ok { color: var(--green, #7A9F7A); }
.auth-msg.err { color: #9F7A7A; }
.site-header-auth {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header-auth:hover { color: var(--text-primary); background: var(--bg-elevated); }
