/* =========================================================
   登录 / 注册 / 用户中心 公共样式
   ========================================================= */

.auth-page {
  background: linear-gradient(135deg, #eef2ff 0%, #f6f8fd 40%, #ecfeff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-wrap {
  width: 100%;
  max-width: 460px;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow, 0 24px 60px rgba(15, 23, 42, 0.10));
  border: 1px solid var(--border, #e6ebf5);
  padding: 36px 34px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text, #0f172a);
  margin-bottom: 22px;
}

.auth-brand .brand-name {
  font-size: 20px;
  font-weight: 700;
  background: var(--grad, linear-gradient(135deg, #06b6d4, #4f46e5));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--text-dim, #475569);
  text-align: center;
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-alert {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  word-break: break-all;
}

.auth-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-alert-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.auth-alert-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-light, #d4deef);
  border-radius: 10px;
  font-size: 15px;
  background: #fbfcff;
  color: var(--text, #0f172a);
  transition: border-color .2s, box-shadow .2s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #fff;
}

.auth-tip {
  font-size: 12px;
  color: var(--text-mute, #94a3b8);
  margin-top: 5px;
}

.auth-code-row {
  display: flex;
  gap: 10px;
}

.auth-code-row input {
  flex: 1;
}

.auth-code-row .btn-sm {
  height: 44px;
  white-space: nowrap;
  padding: 0 16px;
  font-size: 14px;
}

.auth-code-row .btn-sm:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim, #475569);
  margin: 18px 0 6px;
  cursor: pointer;
}

.auth-agree input {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--primary, #4f46e5);
}

.auth-agree a {
  color: var(--primary, #4f46e5);
}

.btn-block {
  width: 100%;
  height: 46px;
  font-size: 16px;
  font-weight: 600;
}

.btn-block:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-dim, #475569);
}

.auth-footer a {
  color: var(--primary, #4f46e5);
  font-weight: 600;
  text-decoration: none;
}

.auth-admin-entry {
  margin-top: 8px;
  font-size: 13px;
}

.auth-admin-entry a {
  color: var(--text-dim, #64748b);
  font-weight: 400;
}

/* ---------- 用户中心 ---------- */
.user-center {
  min-height: 100vh;
  background: var(--bg, #f6f8fd);
}

.user-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border, #e6ebf5);
  padding: 14px 0;
}

.user-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
}

.user-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text, #0f172a);
  font-weight: 700;
}

.user-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.user-hello {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.user-hello small {
  font-size: 13px;
  color: var(--text-mute, #94a3b8);
  font-weight: 400;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.user-stat {
  background: #fff;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 14px;
  padding: 18px 20px;
}

.user-stat .label {
  font-size: 13px;
  color: var(--text-mute, #94a3b8);
}

.user-stat .value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.user-panel {
  background: #fff;
  border: 1px solid var(--border, #e6ebf5);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.user-panel h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.user-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  font-size: 14px;
}

.user-meta .item {
  color: var(--text-dim, #475569);
}

.user-meta .item b {
  color: var(--text, #0f172a);
  font-weight: 600;
}

.user-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-role {
  display: inline-block;
  background: var(--grad-soft, rgba(6, 182, 212, 0.10));
  color: var(--primary, #4f46e5);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

.badge-role.admin {
  background: #fef3c7;
  color: #b45309;
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; }
  .user-topbar .container { padding: 0 16px; }
}
