/**
 * 登录 / 注册 / 账号中心样式
 */

/* ===== 认证外壳 ===== */
.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-view {
  width: 100%;
  max-width: 380px;
}

.auth-card {
  padding: 24px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

/* ===== 卡片头部 ===== */
.auth-card-head {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.auth-title {
  font-size: 17px;
  font-weight: 600;
}

.auth-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ===== 登录方式 Tabs ===== */
.auth-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 16px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.auth-tab {
  flex: 1;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: var(--r-xs);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 500;
}

/* ===== 面板与提交按钮 ===== */
.auth-panel {
  display: flex;
  flex-direction: column;
}

.auth-submit {
  width: 100%;
  margin-top: 16px;
  padding: 10px 20px;
}

/* ===== Magic Link 验证区 ===== */
.magic-verify-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.magic-verify-section .field:last-child {
  margin-bottom: 10px;
}

/* ===== 分隔线 ===== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--text-3);
  font-size: 12px;
}

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

/* ===== uTools 登录按钮 ===== */
.auth-utools {
  width: 100%;
  padding: 10px 16px;
}

/* ===== 底部文字 ===== */
.auth-footer-text {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.auth-link-btn {
  padding: 0 1px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

/* ===== 验证码行 ===== */
.register-code-row {
  display: flex;
  gap: 8px;
}

.register-code-row .form-input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  letter-spacing: 0.1em;
}

.register-code-row .btn-secondary {
  flex-shrink: 0;
  min-width: 104px;
  padding-left: 12px;
  padding-right: 12px;
}

/* ===== 加载态 ===== */
.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-2);
  font-size: 13px;
}

/* ============================================================
 * 账号中心
 * ============================================================ */

.profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 15.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-email {
  font-size: 12.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--success);
}

/* 积分统计条 */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 11px 8px;
  background: var(--surface);
}

.profile-stat-label {
  font-size: 12px;
  color: var(--text-3);
}

.profile-stat-value {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--accent);
}

.profile-stat-value.is-secondary {
  font-size: 16px;
  color: var(--text-2);
}

.profile-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.profile-card-foot-text {
  font-size: 12.5px;
  color: var(--text-3);
}

/* 身份卡右侧操作区 */
.profile-identity-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.profile-identity-actions .btn-secondary {
  padding: 6px 13px;
  font-size: 13px;
}

/* 编辑资料（身份卡内展开） */
.profile-edit {
  margin-top: 14px;
}

.profile-edit .form-actions {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .auth-card {
    padding: 20px 16px 18px;
  }

  .profile-identity {
    flex-direction: column;
    align-items: flex-start;
  }
}
