/* ========== 控制台布局 ========== */
.console-main {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}

.console-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #f0f0f0;
  padding: 20px 0;
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

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

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-id {
  font-size: 11px;
  color: #999;
  font-family: 'SF Mono', Monaco, monospace;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.sidebar-group {
  margin-bottom: 8px;
}

.sidebar-group-title {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #4a4a4a;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-link:hover {
  background: #f5f5f5;
  color: #1a1a2e;
}

.sidebar-link.active {
  background: #f0f4ff;
  color: #4facfe;
}

.sidebar-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
}

/* ========== 内容区 ========== */
.console-content {
  flex: 1;
  margin-left: 240px;
  padding: 28px 32px;
  background: #f8f9fa;
  min-height: calc(100vh - 64px);
}

.console-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.console-desc {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
}

.console-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 24px 0 12px;
}

/* ========== Tab 切换 ========== */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 设置区块 ========== */
.settings-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 12px;
  padding-left: 4px;
}

.settings-card {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.danger-card {
  border: 1px solid #ffccc7;
}

/* ========== 信息列表（基本信息） ========== */
.info-list {
  display: flex;
  flex-direction: column;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #f5f5f5;
  gap: 16px;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  width: 100px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  flex-shrink: 0;
}

.info-value {
  flex: 1;
  font-size: 14px;
  color: #1a1a2e;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-value.mono {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.info-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
}

/* ========== 头像区域 ========== */
.avatar-section {
  position: relative;
  display: inline-block;
}

.avatar-section .info-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0f0f0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.avatar-section .info-avatar:hover {
  opacity: 0.8;
}

/* 头像选择菜单 */
.avatar-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 140px;
  z-index: 50;
  animation: fadeIn 0.15s ease;
}

.avatar-menu.active {
  display: block;
}

.avatar-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}

.avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a2e;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.avatar-menu-item:hover {
  background: #f5f5f5;
}

.avatar-menu-item span {
  font-size: 18px;
  line-height: 1;
}

.info-hint {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

/* ========== 安全设置列表 ========== */
.security-list {
  display: flex;
  flex-direction: column;
}

.security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f5f5f5;
}

.security-item:last-child {
  border-bottom: none;
}

.security-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.security-info p {
  font-size: 13px;
  color: #999;
}

/* ========== 实名认证 ========== */
.realname-display {
  padding: 20px 24px;
}

.realname-display.verified {
  color: #52c41a;
  font-size: 14px;
}

.realname-display.unverified {
  color: #fa8c16;
  font-size: 14px;
}

.realname-form {
  padding: 0 24px 20px;
  max-width: 400px;
}

/* ========== 绑定行（微信/邮箱） ========== */
.bind-row {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bind-row .bind-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.bind-row .bind-info p {
  font-size: 13px;
  color: #999;
}

.bind-row .bind-status-text {
  font-size: 13px;
  color: #52c41a;
  margin-right: 12px;
}

.bind-row .bind-status-text.unbound {
  color: #999;
}

/* ========== 注销账号 ========== */
.deactivate-info {
  padding: 20px 24px;
  border-bottom: 1px solid #f5f5f5;
}

.deactivate-info p {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}

.deactivate-form {
  padding: 20px 24px;
  max-width: 400px;
}

/* ========== 表单通用 ========== */
.form-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  gap: 12px;
}

.form-row.editable {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.form-row.editable label {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.form-row.editable .form-input {
  width: 100%;
  max-width: 320px;
}

.form-actions {
  padding-top: 16px;
  display: flex;
  gap: 12px;
}

/* ========== 按钮变体 ========== */
.btn-text {
  background: none;
  color: #4facfe;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-text:hover {
  background: #f0f4ff;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
  border: 1px solid #ff4d4f;
}

.btn-danger:hover {
  background: #ff7875;
}

/* ========== 工作台项目卡片 ========== */
.console-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.console-project-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
  position: relative;
}

.console-project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(79, 172, 254, 0.2);
}

.console-project-card .product-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.console-project-card .product-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.console-project-card .product-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  margin-bottom: 10px;
}

.console-project-card .product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.console-project-card .product-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f0f4ff;
  color: #4facfe;
  font-weight: 500;
}

/* ========== 统计卡片 ========== */
.console-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.console-stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #999;
}

/* ========== 数据表格 ========== */
.login-logs-table-wrapper {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f5f5f5;
}

.data-table th {
  font-weight: 600;
  color: #666;
  background: #fafafa;
  font-size: 12px;
}

.data-table td {
  color: #4a4a4a;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-success {
  background: #f6ffed;
  color: #52c41a;
}

.status-fail {
  background: #fff1f0;
  color: #ff4d4f;
}

/* ========== 资产中心概览 ========== */
.assets-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px 24px;
}

.asset-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid #f0f0f0;
}

.asset-icon {
  font-size: 32px;
  line-height: 1;
}

.asset-info {
  flex: 1;
}

.asset-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.asset-label {
  font-size: 13px;
  color: #999;
}

/* ========== 占位页面紧凑版 ========== */
.placeholder-page.compact {
  padding: 40px 24px;
}

.placeholder-page.compact .placeholder-icon {
  font-size: 36px;
}

.placeholder-page.compact h3 {
  font-size: 16px;
}

.placeholder-page.compact p {
  font-size: 13px;
}

/* ========== 积分信息（保留兼容） ========== */
.points-info {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 24px;
}

.points-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 40px;
  text-align: center;
  border: 1px solid #f0f0f0;
}

.points-value {
  font-size: 32px;
  font-weight: 700;
  color: #4facfe;
  margin-bottom: 4px;
}

.points-label {
  font-size: 13px;
  color: #999;
}

/* ========== 占位页面 ========== */
.placeholder-page {
  background: #fff;
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.placeholder-page h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.placeholder-page p {
  font-size: 14px;
  color: #999;
}

/* ========== 小弹窗 ========== */
.modal-small {
  max-width: 380px;
}

/* ========== 浮动提示条 ========== */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #1a1a2e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  min-width: 200px;
  justify-content: center;
}

.toast.success {
  background: #52c41a;
}

.toast.error {
  background: #ff4d4f;
}

.toast.warning {
  background: #fa8c16;
}

.toast.info {
  background: #4facfe;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

/* ========== 移动端底部导航 ========== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  height: 100%;
  color: #999;
  font-size: 10px;
  text-decoration: none;
  transition: color 0.2s;
  min-width: 0;
}

.mobile-nav-item.active {
  color: #4facfe;
}

.mobile-nav-icon {
  font-size: 18px;
  line-height: 1;
}

.mobile-nav-label {
  font-size: 9px;
  white-space: nowrap;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .console-sidebar {
    display: none;
  }

  .console-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-bottom: 80px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .console-projects {
    grid-template-columns: 1fr;
  }

  .console-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .info-label {
    width: auto;
  }

  .security-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .bind-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .points-info {
    flex-direction: column;
  }

  .assets-overview {
    grid-template-columns: 1fr;
  }

  .asset-card {
    padding: 16px 20px;
  }

  .asset-value {
    font-size: 20px;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

/* ========== 确认弹窗 ========== */
.confirm-modal .modal-body {
  text-align: center;
}

.confirm-message {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 100px;
}
