/* ========== 顾问个人中心 - 整体布局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --sidebar-w: 240px;
  --header-h: 60px;
  --primary-dark: #0d1b3e;
  --primary-blue: #1a237e;
  --accent-gold: #d4af37;
  --sidebar-bg: #0f1a2e;
  --sidebar-hover: #1a2d50;
  --sidebar-active: rgba(212, 175, 55, 0.15);
  --text-light: #e0e0e0;
  --text-muted: #8892a4;
  --card-bg: #ffffff;
  --bg-main: #f0f2f5;
  --border: #e8eaed;
  --success: #00c853;
  --warning: #ff9800;
  --danger: #ef5350;
  --info: #2196f3;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-main);
  color: #333;
  min-height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.cc-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cc-header-left {
  display: flex; align-items: center; gap: 16px;
}

.cc-logo {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent-gold); font-size: 20px; font-weight: bold;
  text-decoration: none;
}

.cc-logo svg { width: 32px; height: 32px; }

.cc-back-link {
  color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px;
  padding: 4px 12px; border: 1px solid rgba(255,255,255,0.2); border-radius: 4px;
  transition: all 0.2s;
}
.cc-back-link:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

.cc-header-right {
  display: flex; align-items: center; gap: 16px;
}

.cc-user-info {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-size: 14px;
}

.cc-user-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent-gold); background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-gold); font-size: 18px; font-weight: bold;
}

.cc-logout-btn {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2); padding: 6px 16px;
  border-radius: 4px; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.cc-logout-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ========== 侧边栏 ========== */
.cc-sidebar {
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  overflow-y: auto; overflow-x: hidden;
  z-index: 999;
}

.cc-sidebar::-webkit-scrollbar { width: 4px; }
.cc-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* 侧边栏用户卡片 */
.cc-sidebar-user {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.cc-sidebar-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent-gold); margin-bottom: 8px;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-gold); font-size: 24px; font-weight: bold;
}

.cc-sidebar-name {
  color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 2px;
}

.cc-sidebar-status {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  margin-top: 4px;
}
.cc-sidebar-status.approved { background: rgba(0,200,83,0.15); color: var(--success); }
.cc-sidebar-status.pending { background: rgba(255,152,0,0.15); color: var(--warning); }
.cc-sidebar-status.rejected { background: rgba(239,83,80,0.15); color: var(--danger); }

/* 侧边栏菜单 */
.cc-nav-section { padding: 12px 0; }

.cc-nav-title {
  padding: 8px 20px 4px; font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.cc-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: var(--text-light); font-size: 14px;
  cursor: pointer; transition: all 0.15s; text-decoration: none;
  border-left: 3px solid transparent;
}
.cc-nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.cc-nav-item.active {
  background: var(--sidebar-active); color: var(--accent-gold);
  border-left-color: var(--accent-gold);
}

.cc-nav-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.cc-nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 10px; min-width: 20px; text-align: center;
}

/* ========== 主内容区 ========== */
.cc-main {
  margin-left: var(--sidebar-w); margin-top: var(--header-h);
  padding: 24px; min-height: calc(100vh - var(--header-h));
}

/* ========== 页面面板（每个子页面） ========== */
.cc-page { display: none; }
.cc-page.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 通用卡片 ========== */
.cc-card {
  background: var(--card-bg); border-radius: 12px;
  padding: 24px; margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cc-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.cc-card-title { font-size: 17px; font-weight: 600; color: #1a1a1a; }

/* ========== 统计卡片行 ========== */
.cc-stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.cc-stat-card {
  background: var(--card-bg); border-radius: 12px; padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex; align-items: center; gap: 16px;
  transition: transform 0.2s;
}
.cc-stat-card:hover { transform: translateY(-2px); }

.cc-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.cc-stat-icon.blue { background: #e3f2fd; color: #1565c0; }
.cc-stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.cc-stat-icon.orange { background: #fff3e0; color: #e65100; }
.cc-stat-icon.purple { background: #f3e5f5; color: #6a1b9a; }
.cc-stat-icon.gold { background: #fff8e1; color: #f57f17; }

.cc-stat-number { font-size: 28px; font-weight: bold; color: #1a1a1a; }
.cc-stat-label { font-size: 13px; color: #888; margin-top: 2px; }

/* ========== 表单样式 ========== */
.cc-form-group { margin-bottom: 16px; }
.cc-form-group label {
  display: block; font-size: 13px; font-weight: 500; color: #555;
  margin-bottom: 6px;
}
.cc-form-group label .required { color: var(--danger); margin-left: 2px; }

.cc-input, .cc-textarea, .cc-select {
  width: 100%; padding: 10px 14px; font-size: 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fafbfc; color: #333; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.cc-input:focus, .cc-textarea:focus, .cc-select:focus {
  border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
  background: #fff;
}
.cc-textarea { resize: vertical; min-height: 100px; }

.cc-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* ========== 按钮 ========== */
.cc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  border: none; border-radius: 8px; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}
.cc-btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), #3949ab);
  color: #fff;
}
.cc-btn-primary:hover { box-shadow: 0 4px 12px rgba(26,35,126,0.3); transform: translateY(-1px); }
.cc-btn-success {
  background: linear-gradient(135deg, #00c853, #00e676); color: #fff;
}
.cc-btn-success:hover { box-shadow: 0 4px 12px rgba(0,200,83,0.3); }
.cc-btn-danger {
  background: var(--danger); color: #fff;
}
.cc-btn-danger:hover { background: #e53935; }
.cc-btn-outline {
  background: #fff; color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}
.cc-btn-outline:hover { background: rgba(26,35,126,0.04); }
.cc-btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.cc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ========== 表格 ========== */
.cc-table-wrap { overflow-x: auto; }
.cc-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.cc-table th {
  text-align: left; padding: 12px 16px; background: #f8f9fb;
  color: #666; font-weight: 500; font-size: 13px;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.cc-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.cc-table tbody tr:hover { background: #fafbfc; }

.cc-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 500;
}
.cc-badge.pending { background: #fff3e0; color: #e65100; }
.cc-badge.approved { background: #e8f5e9; color: #2e7d32; }
.cc-badge.rejected { background: #ffebee; color: #c62828; }

.cc-empty {
  text-align: center; padding: 60px 20px; color: #999;
}
.cc-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ========== 弹窗 ========== */
.cc-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; animation: fadeIn 0.2s;
}
.cc-modal {
  background: #fff; border-radius: 16px; padding: 32px;
  max-width: 560px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.cc-modal h3 { font-size: 18px; margin-bottom: 20px; color: #1a1a1a; }
.cc-modal-actions {
  display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px;
}

/* ========== 头像上传区 ========== */
.cc-avatar-upload {
  display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
}
.cc-avatar-preview {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--border); background: #f5f5f5;
}
.cc-avatar-upload-btn {
  position: relative; overflow: hidden;
}
.cc-avatar-upload-btn input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.cc-upload-progress {
  height: 4px; background: #e0e0e0; border-radius: 2px; margin-top: 8px;
  overflow: hidden; display: none;
}
.cc-upload-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
  border-radius: 2px; transition: width 0.3s;
}

/* ========== 标签输入 ========== */
.cc-tag-input-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px; border: 1px solid var(--border); border-radius: 8px;
  min-height: 42px; align-items: center; background: #fafbfc;
  transition: border-color 0.2s;
}
.cc-tag-input-wrap:focus-within {
  border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
  background: #fff;
}
.cc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: linear-gradient(135deg, var(--primary-blue), #3949ab);
  color: #fff; border-radius: 14px; font-size: 12px;
}
.cc-tag-remove { cursor: pointer; font-size: 14px; line-height: 1; opacity: 0.8; }
.cc-tag-remove:hover { opacity: 1; }
.cc-tag-input {
  border: none; outline: none; flex: 1; min-width: 80px;
  background: transparent; font-size: 14px; padding: 4px;
}

/* ========== Toast 提示 ========== */
.cc-toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 8px; color: #fff; font-size: 14px;
  z-index: 3000; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: slideDown 0.3s ease;
}
.cc-toast.success { background: #00c853; }
.cc-toast.error { background: #ef5350; }
.cc-toast.warning { background: #ff9800; }
.cc-toast.info { background: #2196f3; }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== 审核状态条 ========== */
.cc-review-bar {
  padding: 12px 20px; border-radius: 10px; margin-bottom: 20px;
  font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.cc-review-bar.pending { background: #fff8e1; color: #e65100; border-left: 4px solid #ff9800; }
.cc-review-bar.approved { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #00c853; }
.cc-review-bar.rejected { background: #ffebee; color: #c62828; border-left: 4px solid #ef5350; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .cc-sidebar {
    transform: translateX(-100%); transition: transform 0.3s;
    width: 260px;
  }
  .cc-sidebar.open { transform: translateX(0); }
  .cc-main { margin-left: 0; padding: 16px; }
  .cc-header { padding: 0 16px; }

  .cc-mobile-menu-btn {
    display: block !important;
    background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
  }

  .cc-form-row { grid-template-columns: 1fr; }
  .cc-stats-row { grid-template-columns: repeat(2, 1fr); }
}

.cc-mobile-menu-btn { display: none; }

@media (max-width: 480px) {
  .cc-stats-row { grid-template-columns: 1fr; }
}
