/* SuzateiHome 登录 / 注册弹窗 · 视觉对齐 suzatei-home.css 变量 */

.auth-entry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-user {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
}
.auth-user.is-on { display: inline-flex; }
.auth-user__avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.auth-user__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-1);
}
.auth-menu button,
.auth-menu a {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.auth-menu button:hover,
.auth-menu a:hover {
  background: var(--soft-accent);
  color: var(--text);
}
.auth-menu button.is-danger:hover { color: var(--accent); }

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(12, 8, 18, 0.66);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.auth-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.auth-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 22px 70px rgba(12, 8, 18, 0.36);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.18s;
}
.auth-overlay.is-open .auth-dialog { transform: none; }

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
}
.auth-close:hover {
  background: var(--soft-accent);
  color: var(--text);
}
.auth-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.auth-dialog__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 35px;
  margin-bottom: 18px;
}
.auth-dialog__head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}
.auth-dialog__head h2 {
  margin: 0 0 3px;
  font-size: 18px;
}
.auth-dialog__head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 17px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}
.auth-tabs button {
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--text-dim);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.auth-tabs button.is-active {
  background: var(--grad-primary);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 4px 12px rgba(227, 101, 142, 0.22);
}

.auth-form {
  display: grid;
  gap: 13px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  text-align: left;
}
.auth-form label > span {
  color: var(--text-dim);
  font-size: 12px;
}
.auth-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}
.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--soft-accent);
}
.auth-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-primary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--grad-primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(227, 101, 142, 0.22);
}
.auth-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.auth-message {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.09);
  color: #f87171;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}
.auth-message.is-ok {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.09);
  color: #34d399;
}

html.theme-light .auth-overlay {
  background: rgba(40, 24, 32, 0.42);
}
