/* 用户中心样式 */

/* ===================== 页面头部 ===================== */
.user-hero {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #fff;
  padding: 84px 0 72px;
  text-align: center;
}
.user-hero .eyebrow { background: rgba(255,255,255,.12); color: #bcd0ff; }
.user-hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.user-hero p {
  font-size: 18px;
  color: #c7d2e4;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================== 登录页面 ===================== */
.login-wrap {
  max-width: 480px;
  margin: 0 auto;
}
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  flex: 1;
  padding: 14px 0;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color .2s;
}
.tab-btn.active {
  color: var(--brand);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.login-form {
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}
.code-input-wrap {
  display: flex;
  gap: 12px;
}
.code-input-wrap input {
  flex: 1;
}
.captcha-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}
.captcha-wrap input {
  flex: 1;
}
.captcha-wrap img {
  border: 1px solid var(--line);
}
.btn-code {
  padding: 12px 20px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.btn-code:hover:not(:disabled) {
  background: var(--brand);
  color: #fff;
}
.btn-code:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-submit:hover:not(:disabled) {
  background: var(--brand-light);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.btn-submit.btn-lg {
  padding: 16px;
  font-size: 17px;
}
.login-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.login-footer p {
  font-size: 13px;
  color: var(--muted);
}
.login-footer a {
  color: var(--brand);
  text-decoration: none;
}
.login-footer a:hover {
  text-decoration: underline;
}

/* ===================== 用户中心布局 ===================== */
.user-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 992px) {
  .user-layout {
    grid-template-columns: 1fr;
  }
}

/* ===================== 用户卡片 ===================== */
.user-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}
.user-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--brand-soft);
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.user-info .user-phone {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.user-info .user-level {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}
.user-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-item {
  text-align: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.user-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.btn-action svg {
  width: 18px;
  height: 18px;
}
.btn-action.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-action.btn-primary:hover {
  background: var(--brand-light);
}
.btn-action.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-action.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ===================== 内容卡片 ===================== */
.content-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.card-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.view-all {
  font-size: 14px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.view-all:hover {
  text-decoration: underline;
}

/* ===================== 空状态 ===================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--muted);
}
.empty-icon svg {
  width: 100%;
  height: 100%;
}
.empty-state p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}
.empty-state .btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.empty-state .btn-primary:hover {
  background: var(--brand-light);
}

/* ===================== 授权列表 ===================== */
.auth-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-item {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.auth-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.auth-info {
  flex: 1;
  min-width: 300px;
}
.auth-domain {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.auth-domain code {
  padding: 2px 8px;
  background: #fff;
  border-radius: 4px;
  font-size: 14px;
}
.auth-product {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-code {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-code code.small {
  padding: 2px 6px;
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  word-break: break-all;
}
.auth-time {
  font-size: 13px;
  color: var(--muted);
}
.auth-status {
  display: flex;
  align-items: center;
}
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 768px) {
  .auth-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .auth-status {
    width: 100%;
  }
  .auth-actions {
    width: 100%;
  }
}

/* ===================== 徽章 ===================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success {
  background: #dcfce7;
  color: #16a34a;
}
.badge-warning {
  background: #fef3c7;
  color: #d97706;
}
.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

/* ===================== 表格 ===================== */
.table-wrap {
  overflow-x: auto;
}
.auth-table {
  width: 100%;
  border-collapse: collapse;
}
.auth-table th,
.auth-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.auth-table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
}
.auth-table td {
  font-size: 14px;
  color: var(--text);
}
.auth-table code {
  padding: 2px 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
}
.auth-table code.small {
  font-size: 11px;
  word-break: break-all;
}

/* ===================== 分页 ===================== */
.pagination {
  margin-top: 24px;
  text-align: center;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}
.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.pagination .current,
.pagination span.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ===================== 购买授权表单 ===================== */
.buy-auth-form {
  max-width: 600px;
}
.form-tips {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.required {
  color: #dc2626;
}
.form-notice {
  margin: 24px 0;
  padding: 20px;
  background: var(--brand-soft);
  border-radius: 12px;
  border-left: 4px solid var(--brand);
}
.form-notice h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}
.form-notice ul {
  margin: 0;
  padding-left: 20px;
}
.form-notice li {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===================== Toast 提示 ===================== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: transform .3s, opacity .3s;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast-success {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}
.toast-error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

/* ===================== 快速操作卡片 ===================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.quick-action-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.quick-action-item:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.quick-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  border-radius: 10px;
  color: var(--brand);
}
.quick-icon svg {
  width: 22px;
  height: 22px;
}
.quick-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.quick-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ===================== 下载按钮 ===================== */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.btn-download:hover {
  background: var(--brand-light);
}
.btn-download svg {
  width: 14px;
  height: 14px;
}
.text-muted {
  font-size: 13px;
  color: var(--muted);
}

/* ===================== 响应式 ===================== */
@media (max-width: 768px) {
  .login-card {
    padding: 28px 20px;
  }
  .user-card {
    position: static;
  }
  .content-card {
    padding: 20px;
  }
  .auth-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .auth-status {
    margin-left: 0;
  }
  .auth-table th,
  .auth-table td {
    padding: 10px 8px;
    font-size: 13px;
  }
}
