/* ===== 企业AI工作台 样式 ===== */

.workspace-body {
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  overflow: hidden;
}

/* ===== 左侧导航 ===== */
.ws-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
}

.ws-logo { padding: 0 8px 20px; border-bottom: 1px solid var(--border-soft); }
.ws-logo .brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.ws-logo .brand-text strong { font-size: 15px; }
.ws-logo .brand-text small { font-size: 10px; }

.ws-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
  overflow-y: auto;
}

.ws-nav-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 10px 8px;
}

.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-dim);
  transition: all 0.18s;
  font-weight: 500;
}
.ws-nav-item:hover { color: #fff; background: var(--bg-card); }
.ws-nav-item.active {
  color: #fff;
  background: rgba(79, 124, 255, 0.14);
  border: 1px solid rgba(79, 124, 255, 0.3);
}
.ws-ico { font-size: 16px; width: 20px; text-align: center; }

/* ===== 右侧主区域 ===== */
.ws-main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  min-width: 0;
}

.ws-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.ws-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.ws-menu-btn span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

.ws-topbar-title { display: flex; align-items: center; gap: 12px; }
.ws-page-title { font-size: 16px; font-weight: 700; }
.ws-company { font-size: 13px; color: var(--text-faint); }

.ws-topbar-actions { display: flex; align-items: center; gap: 12px; }
.ws-company-chip {
  font-size: 13px;
  color: #b8ccff;
  background: rgba(79, 124, 255, 0.1);
  border: 1px solid rgba(79, 124, 255, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 500;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ===== 内容区 ===== */
.ws-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.ws-view { display: none; }
.ws-view.active { display: block; animation: stepIn 0.3s ease; }

/* ===== 总览 ===== */
.ws-greeting { margin-bottom: 28px; }
.ws-greeting h1 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.ws-greeting p { font-size: 15px; color: var(--text-dim); }
.greet-company { color: var(--cyan); font-weight: 700; }
.greet-sub { margin-top: 4px; }

/* 数据卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.stat-label { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; }
.stat-value {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  display: inline;
}
.stat-unit { font-size: 15px; color: var(--text-faint); font-weight: 600; }
.stat-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  color: var(--text-faint);
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 面板 */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.panel-highlight {
  background: linear-gradient(135deg, rgba(79,124,255,0.12), rgba(34,211,238,0.06));
  border-color: rgba(79, 124, 255, 0.35);
}
.panel-head { margin-bottom: 20px; }
.panel-head h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.panel-sub { font-size: 13px; color: var(--text-faint); }

/* 体检高亮卡片 */
.hl-score-row { display: flex; align-items: center; gap: 32px; margin-bottom: 20px; }
.hl-score { display: flex; align-items: baseline; gap: 6px; }
.hl-score-num { font-size: 52px; font-weight: 900; line-height: 1; }
.hl-score-total { font-size: 16px; color: var(--text-faint); }
.hl-opps { display: flex; flex-direction: column; }
.hl-opps-num { font-size: 28px; font-weight: 800; color: var(--cyan); }
.hl-opps-label { font-size: 12px; color: var(--text-faint); }

/* 优先升级列表 */
.priority-list { display: flex; flex-direction: column; gap: 14px; }
.priority-item {
  display: flex;
  gap: 16px;
  padding: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  align-items: flex-start;
}
.priority-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--cyan);
  line-height: 1;
  flex-shrink: 0;
}
.priority-main { flex: 1; }
.priority-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.priority-stars { color: #fbbf24; font-size: 12px; letter-spacing: 1px; margin-left: 8px; }
.priority-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.priority-save { font-size: 12px; color: var(--green); font-weight: 600; }
.priority-detail { flex-shrink: 0; align-self: center; }

/* AI今日建议 */
.panel-ai { border-color: rgba(34, 211, 238, 0.3); }
.ai-tip {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 18px;
}
.ai-tip p { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 6px; }
.ai-tip p:last-child { margin-bottom: 0; }
.ai-tip strong { color: #fff; }

/* 快速开始 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.quick-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.quick-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.quick-ico { font-size: 26px; margin-bottom: 12px; }
.quick-card strong { font-size: 15px; margin-bottom: 6px; }
.quick-card p { font-size: 13px; color: var(--text-dim); }

/* ===== AI体检内嵌报告 ===== */
.ws-report-embed .gauge { width: 160px; height: 160px; }
.ws-report-embed .gauge-inner { width: 118px; height: 118px; padding-top: 42px; }
.ws-report-embed .gauge-num { font-size: 40px; }

/* ===== 占位页 ===== */
.placeholder-view {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.placeholder-ico { font-size: 48px; margin-bottom: 20px; }
.placeholder-view h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.placeholder-view .ph-sub { font-size: 15px; color: var(--text-dim); margin-bottom: 28px; }
.ph-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.1);
  border: 1px solid rgba(79, 124, 255, 0.3);
  color: #b8ccff;
  font-size: 14px;
  font-weight: 600;
}
.ph-badge .pulse-dot { width: 7px; height: 7px; }

/* ===== 会员中心 ===== */
.membership-card {
  text-align: center;
  padding: 48px 24px;
}
.membership-card .ph-badge { margin-top: 8px; }
.member-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.member-row .k { color: var(--text-dim); }
.member-row .v { color: #fff; font-weight: 600; }

/* ===== 设置 ===== */
.settings-list { margin-top: 8px; }
.setting-actions { margin-top: 24px; }

/* ===== 弹窗 ===== */
.modal { display: none; }
.modal.show { display: block; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
}
.modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 480px;
  z-index: 301;
  max-height: 80dvh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #fff; }
.modal-body h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.modal-body p { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 10px; }
.modal-body .modal-save { color: var(--green); font-weight: 600; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ws-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s;
    width: 260px;
  }
  .ws-sidebar.open { transform: translateX(0); }
  .ws-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 45;
  }
  .ws-backdrop.show { display: block; }
  .ws-main { margin-left: 0; }
  .ws-menu-btn { display: flex; }
  .ws-company-chip { display: none; }
  .ws-content { padding: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .hl-score-row { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-view.active { animation: none !important; }
}

/* ===== AI获客入口卡片 ===== */
.acq-entry {
  text-align: center;
  padding: 40px 24px;
}
.acq-entry-ico {
  font-size: 48px;
  margin-bottom: 16px;
}
.acq-entry h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
}
.acq-entry-desc {
  font-size: 14px;
  color: var(--text-faint, #8a91a8);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 24px;
}
