/* ================= 日常集 · Daily Atlas 认证门禁与账号中心样式 ================= */

.auth-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(245, 240, 232, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: opacity 0.28s ease;
}

.auth-gate-backdrop[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card, #fffdfa);
  border: 1px solid var(--line, #ded5c8);
  border-radius: var(--radius, 22px);
  box-shadow: 0 24px 60px rgba(63, 48, 36, 0.14), 0 4px 16px rgba(63, 48, 36, 0.06);
  padding: 28px 26px 24px;
  color: var(--ink, #29251f);
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
  animation: authCardPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authCardPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(116, 109, 99, 0.15);
}

.auth-brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--plum, #4d3045);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(77, 48, 69, 0.25);
}

.auth-brand-titles {
  display: flex;
  flex-direction: column;
}

.auth-brand-titles strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #29251f);
  line-height: 1.25;
}

.auth-brand-titles span {
  font-size: 11.5px;
  color: var(--muted, #746d63);
  margin-top: 1px;
}

.auth-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--plum, #4d3045);
  background: var(--plum-soft, #e8dfe5);
  padding: 4px 10px;
  border-radius: 999px;
}

.auth-title-area h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #29251f);
  letter-spacing: -0.02em;
}

.auth-title-area p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted, #746d63);
  line-height: 1.5;
}

.auth-init-notice {
  background: var(--sage-soft, #dfe8df);
  border: 1px solid rgba(98, 122, 103, 0.28);
  color: #3a4f3e;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #29251f);
}

.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line, #ded5c8);
  background: #fbf8f3;
  color: var(--ink, #29251f);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--plum, #4d3045);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(77, 48, 69, 0.12);
}

.auth-error-msg {
  background: rgba(180, 77, 67, 0.1);
  border: 1px solid rgba(180, 77, 67, 0.28);
  color: var(--red, #b44d43);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.4;
}

.auth-submit-btn {
  margin-top: 4px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: none;
  background: var(--plum, #4d3045);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 18px rgba(77, 48, 69, 0.22);
}

.auth-submit-btn:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-mode-switch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted, #746d63);
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 4px 2px;
  color: var(--plum, #4d3045);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link-btn:hover {
  opacity: 0.8;
}

.auth-guest-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--muted, #746d63);
  font-size: 11.5px;
}

.auth-guest-divider::before,
.auth-guest-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(116, 109, 99, 0.18);
}

.auth-guest-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(98, 122, 103, 0.45);
  background: rgba(223, 232, 223, 0.35);
  color: #3d5242;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-guest-btn:hover {
  background: rgba(223, 232, 223, 0.65);
  border-color: var(--sage, #627a67);
}

/* ================= 游客模式横幅 (.guest-mode-banner) ================= */
.guest-mode-banner {
  background: linear-gradient(90deg, #eee2ce 0%, #f3dfd6 100%);
  border-bottom: 1px solid rgba(165, 124, 69, 0.25);
  color: #5c4322;
  padding: 9px 18px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 95;
  position: sticky;
  top: 0;
}

.guest-mode-banner[hidden] {
  display: none !important;
}

.guest-mode-banner-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  line-height: 1.4;
}

.guest-mode-login-btn {
  background: var(--plum, #4d3045);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(77, 48, 69, 0.18);
  transition: opacity 0.2s, transform 0.15s;
}

.guest-mode-login-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ================= 侧边栏与顶栏用户徽章 ================= */
.auth-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(104, 87, 68, 0.12);
}

.auth-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line, #ded5c8);
  background: var(--card, #fffdfa);
  color: var(--ink, #29251f);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  max-width: 100%;
}

.auth-user-badge:hover {
  background: var(--plum-soft, #e8dfe5);
  border-color: rgba(77, 48, 69, 0.25);
}

.auth-user-badge.sidebar-full {
  width: 100%;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
}

.auth-user-badge-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================= 账号与权限中心弹窗 (.auth-account-modal) ================= */
.auth-account-modal {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(41, 37, 31, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-account-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.auth-account-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card, #fffdfa);
  border: 1px solid var(--line, #ded5c8);
  border-radius: var(--radius, 22px);
  box-shadow: 0 24px 60px rgba(41, 37, 31, 0.18);
  padding: 22px 24px;
  color: var(--ink, #29251f);
}

.auth-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line, #ded5c8);
}

.auth-account-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.auth-section-card {
  background: #fbf8f3;
  border: 1px solid var(--line, #ded5c8);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.auth-section-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-profile-meta strong {
  display: block;
  font-size: 15px;
}

.auth-profile-meta small {
  color: var(--muted, #746d63);
  font-size: 12px;
}

.auth-inline-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.auth-inline-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, #ded5c8);
  background: #fff;
  font-size: 13px;
}

.auth-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.auth-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(222, 213, 200, 0.8);
  border-radius: 10px;
  font-size: 13px;
}

.auth-member-info strong {
  font-weight: 600;
}

.auth-member-info small {
  display: block;
  font-size: 11.5px;
  color: var(--muted, #746d63);
}

.auth-danger-btn {
  background: rgba(180, 77, 67, 0.1);
  color: var(--red, #b44d43);
  border: 1px solid rgba(180, 77, 67, 0.25);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.auth-danger-btn:hover {
  background: rgba(180, 77, 67, 0.18);
}

@media (max-width: 640px) {
  .auth-card {
    padding: 22px 18px 20px;
  }
  .guest-mode-banner {
    padding: 8px 12px;
    font-size: 12px;
  }
}
