/* EVREV 登录/注册 与 用户中心 页面样式（沿用站点设计变量） */

/* hidden 属性被 display:grid 覆盖的问题：强制隐藏 */
.account-layout[hidden],
[hidden].account-layout {
  display: none !important;
}

.auth-page main {
  min-height: 100vh;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 18px 64px;
}

.auth-card {
  width: min(460px, 100%);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 900;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft-blue);
}

.auth-tab {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(64, 83, 190, 0.12);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field textarea {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(64, 110, 255, 0.14);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.auth-send {
  min-height: 48px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.auth-send[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-field-error {
  margin: -8px 0 0;
  color: #d43c3c;
  font-size: 0.82rem;
}

.auth-banner {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
}

.auth-banner.is-error {
  border: 1px solid rgba(212, 60, 60, 0.3);
  background: rgba(212, 60, 60, 0.08);
  color: #b52f2f;
}

.auth-banner.is-info {
  border: 1px solid rgba(64, 110, 255, 0.3);
  background: rgba(64, 110, 255, 0.08);
  color: #2f55c9;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-wechat {
  width: 100%;
}

.auth-foot {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* 用户中心 */
.account-main {
  padding: 130px clamp(18px, 4vw, 64px) 80px;
  max-width: 1080px;
  margin: 0 auto;
}

.account-layout {
  display: grid;
  gap: 24px;
}

.account-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
  flex: none;
}

.account-id {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.account-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.account-section-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 900;
}

.account-section-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.booking-grid .is-full {
  grid-column: 1 / -1;
}

.booking-list {
  display: grid;
  gap: 14px;
}

.booking-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.booking-item.is-cancelled {
  opacity: 0.62;
}

.booking-model {
  font-weight: 900;
  font-size: 1rem;
}

.booking-meta {
  color: var(--muted);
  font-size: 0.82rem;
  display: grid;
  gap: 2px;
}

.booking-status {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--soft-blue);
  color: #2f55c9;
}

.booking-status[data-status="cancelled"] {
  background: #f4f4f6;
  color: var(--muted);
}

.booking-status[data-status="confirmed"] {
  background: var(--soft-purple);
  color: #6f3fd4;
}

.booking-item-actions {
  display: flex;
  gap: 8px;
}

.booking-empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.auth-gate {
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 48px 20px;
}

.loading-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* 认证页页头固定为浅色样式：页面背景是白色，未滚动态的白色导航会隐形 */
.auth-page .site-header:not(.nav-scrolled) {
  border-bottom-color: rgba(231, 233, 242, 0.8);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

body.auth-page .site-header:not(.nav-scrolled) .nav-links a,
body.auth-page .site-header:not(.nav-scrolled) .nav-drop-trigger {
  color: #454b5a;
}

body.auth-page .site-header:not(.nav-scrolled) .nav-links a:hover,
body.auth-page .site-header:not(.nav-scrolled) .nav-drop-trigger:hover {
  color: var(--blue);
}

body.auth-page .site-header:not(.nav-scrolled) .brand-logo {
  filter: brightness(0) opacity(0.88);
}

@media (max-width: 640px) {
  .booking-grid {
    grid-template-columns: 1fr;
  }

  .account-actions {
    margin-left: 0;
  }
}
