/* HireWise 数据控制台 · 框架壳 — 侧边栏 / 顶栏 / 内容区 / 全局搜索下拉 / 窄屏适配
 * 对应 console.main.js
 */

/* ══════════════════════════════════════════════════════════════
 * Console Override — 后台独立页面布局
 * 脱离插件 360px 面板限制，改为全屏后台
 * ══════════════════════════════════════════════════════════════ */
html, body { background: #F8FAFC; }
body { font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif; margin: 0; }

/* ── 框架：侧边栏 + 玻璃顶栏 + 内容区 ── */
.console-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* 侧边栏 */
.console-sidebar {
  width: 240px; flex-shrink: 0;
  background: #fff; border-right: 1px solid #E2E8F0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.console-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 12px; }
.console-brand .logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: transparent;
  object-fit: cover; display: block;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .28); flex-shrink: 0;
}
.console-brand .brand-text { font-weight: 650; font-size: 14px; color: #0F172A; line-height: 32px; min-width: 0; }
.console-brand .brand-text small { display: block; font-size: 10.5px; color: #94A3B8; font-weight: 450; letter-spacing: .4px; margin-top: 1px; white-space: nowrap; }

/* 分组导航 */
.console-nav { flex: 1; padding: 4px 12px; overflow-y: auto; }
.console-nav .nav-label { font-size: 11px; font-weight: 600; color: #94A3B8; letter-spacing: .8px; padding: 14px 10px 6px; }
.console-tab {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: transparent; text-align: left;
  color: #334155; font-size: 13.5px; font-weight: 480;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; position: relative;
  transition: background .15s ease, color .15s ease;
  font-family: inherit;
}
.console-tab svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; opacity: .85; }
.console-tab .tab-text { white-space: nowrap; }
.console-tab:hover { background: #F1F5F9; color: #0F172A; }
.console-tab.active { background: #EFF4FF; color: #1D4ED8; font-weight: 560; }
.console-tab.active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: #2563EB;
}

/* 侧边栏底部：用户卡 + 退出 */
.console-side-foot { border-top: 1px solid #EEF2F7; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.side-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #93C5FD, #2563EB); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.side-user-meta { min-width: 0; }
.side-user-meta b { display: block; font-size: 12.5px; font-weight: 560; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta span { font-size: 11px; color: #94A3B8; }
.console-logout {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #E2E8F0; background: #fff; color: #64748B;
  font-size: 12.5px; padding: 7px 14px; border-radius: 8px; cursor: pointer;
  font-family: inherit; transition: color .15s, border-color .15s;
}
.console-logout svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.console-logout:hover { color: #DC2626; border-color: #DC2626; }

/* 右侧主体 */
.console-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.console-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 56px; display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid #E2E8F0;
}
.console-crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #94A3B8; }
.console-crumb b { color: #0F172A; font-weight: 560; }
.console-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: #F1F5F9; border: 1px solid transparent; border-radius: 8px;
  padding: 6px 10px; width: 240px; color: #94A3B8; font-size: 13px;
  transition: border-color .15s, background .15s;
}
.console-search:focus-within { border-color: #E2E8F0; background: #fff; }
.console-search input { border: none; background: transparent; outline: none; flex: 1; min-width: 0; font-size: 13px; color: #0F172A; font-family: inherit; }
.console-search input::placeholder { color: #94A3B8; }
.console-search kbd { font-family: inherit; font-size: 11px; background: #fff; border: 1px solid #E2E8F0; border-radius: 5px; padding: 1px 5px; color: #64748B; }

/* 顶栏全局搜索下拉面板 */
.console-search { position: relative; }
.cs-panel {
  display: none; position: absolute; top: 100%; left: 0; width: 340px; margin-top: 8px;
  background: #fff; border: 1px solid #E2E8F0; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
  padding: 6px; max-height: 420px; overflow-y: auto; z-index: 120;
}
.cs-panel.open { display: block; }
.cs-group-title { font-size: 11px; font-weight: 600; color: #94A3B8; padding: 8px 10px 4px; }
.cs-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: transparent; text-align: left; font-family: inherit;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: #0F172A; transition: background .12s;
}
.cs-item:hover { background: #F1F5F9; }
.cs-item .cs-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cs-item .cs-sub { font-size: 12px; color: #94A3B8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0; }
.cs-item .cs-score { font-size: 11px; font-weight: 600; color: #2563EB; background: #EFF4FF; border-radius: 5px; padding: 1px 6px; flex-shrink: 0; }
.cs-item .cs-tag { font-size: 11px; border-radius: 5px; padding: 1px 6px; flex-shrink: 0; }
.cs-item .cs-tag.gr { color: #16A34A; background: #F0FDF4; }
.cs-item .cs-tag.gy { color: #64748B; background: #F1F5F9; }
/* 行内文本空态：下拉/小组件级（LIST-DESIGN §5 变体） */
.empty-inline { font-size: 12.5px; color: #94A3B8; text-align: center; padding: 18px 12px 14px; }

.topbar-icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: #64748B; cursor: pointer; transition: background .15s, color .15s;
}
.topbar-icon-btn:hover { background: #F1F5F9; color: #0F172A; }
.topbar-icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.topbar-icon-btn { position: relative; }
.topbar-icon-btn .ping { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #F59E0B; border: 2px solid #fff; }

/* 顶栏头像 + 通知浮层 */
.topbar-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #93C5FD, #2563EB); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0; cursor: pointer;
  transition: box-shadow .15s;
}
.topbar-avatar:hover { box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

/* 侧边栏：徽标 / 状态点 / 用量卡 */
.tab-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: #DBEAFE; color: #1D4ED8;
  padding: 1px 7px; border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #F59E0B; flex-shrink: 0; }
.side-usage { display: none; margin: 12px; padding: 14px; border-radius: 10px; background: linear-gradient(180deg, #FBFCFE, #F4F7FB); border: 1px solid #EEF2F7; }
.side-usage.show { display: block; }
.side-usage .t { display: flex; justify-content: space-between; font-size: 12px; color: #64748B; font-weight: 500; margin-bottom: 8px; }
.side-usage .t b { color: #0F172A; font-variant-numeric: tabular-nums; font-weight: 600; }
.side-usage-bar { height: 5px; border-radius: 3px; background: #E2E8F0; overflow: hidden; }
.side-usage-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #3B82F6, #2563EB); transition: width .4s ease; }
.side-usage-link { margin-top: 9px; font-size: 12px; color: #2563EB; font-weight: 550; cursor: pointer; }
.side-usage-link:hover { color: #1D4ED8; }

/* 内容区 */
.console-main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 28px 60px; box-sizing: border-box; }

/* 窄屏：侧边栏收缩为图标模式 */
@media (max-width: 920px) {
  .console-sidebar { width: 60px; }
  .console-brand { justify-content: center; padding: 16px 8px 10px; }
  /* 图标模式侧栏放不下切换器：整体隐藏（范围锁定不丢，展开侧栏即恢复） */
  .plat-switch { display: none !important; }
  .console-brand .brand-text, .console-nav .nav-label, .console-tab .tab-text { display: none; }
  .console-tab { justify-content: center; padding: 10px 0; }
  .console-tab.active::before { left: -8px; }
  .console-nav { padding: 4px 8px; }
  .side-user-meta { display: none; }
  .side-usage.show { display: none; }
  .side-user { justify-content: center; }
  .console-logout { padding: 7px 0; }
  .console-search { width: 160px; }
  .console-search kbd { display: none; }
  /* 总览页窄屏：4 KPI → 2 列，两栏堆叠，按钮紧凑 */
  .ov-kpis { grid-template-columns: repeat(2, 1fr); }
  .ov-grid2 { grid-template-columns: 1fr; }
  .ov-head { flex-direction: column; align-items: flex-start; }
  .ov-head-actions { width: 100%; }
  .ov-head-actions .ov-btn { flex: 1; justify-content: center; }
  .dt-table { font-size: 12.5px; }
  .dt-table thead th, .dt-table tbody td { padding-left: 12px; padding-right: 12px; }
}
.console-page { display: none; }
.console-page.active { display: block; }
/* .console-page-head 已随 11-30 "页面大标题移除"下线（顶栏面包屑承担定位） */

/* ═══ 统一加载态（所有页面/区块共用，2026-10-10） ═══ */
.c-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px 16px; min-height: 46vh; color: #94A3B8; font-size: 12.5px;
}
.c-loading .c-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid #E2E8F0; border-top-color: #2563EB;
  animation: cspin .8s linear infinite;
}
.c-loading.mini { min-height: 0; flex-direction: row; gap: 9px; padding: 20px 0; }
.c-loading.mini .c-spin { width: 16px; height: 16px; border-width: 2px; }
@keyframes cspin { to { transform: rotate(360deg); } }

/* ═══ 平台范围切换器（11-23 定稿：C3 hover 展开式 + 品牌短名胶囊） ═══ */
/* 品牌行 240px 放不下全名常驻（覆盖事故根因）→ 平时仅「短名胶囊+▾」，
   hover 平滑展开平台全名；面板徽章同用短名胶囊（猎聘/BOSS 市场通称） */
.plat-switch { position: relative; margin-left: auto; flex-shrink: 0; }
.plat-trigger {
  display: flex; align-items: center;
  border: 0.5px solid #CBD5E1; border-radius: 999px; padding: 4px 7px 4px 5px;
  background: #FFFFFF; cursor: pointer; color: #0F172A;
}
.plat-trigger:hover { background: #F1F5F9; border-color: #94A3B8; }
.plat-pill {
  height: 18px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .2px;
  color: #FFFFFF; flex-shrink: 0;
  max-width: 60px; overflow: hidden;
  /* 收起方向即时响应（移开就还原）；展开方向的延迟在 hover 态声明，防路过闪变 */
  transition: max-width .45s cubic-bezier(.4, 0, .2, 1), padding .45s cubic-bezier(.4, 0, .2, 1);
}
.plat-pill-lp { background: linear-gradient(135deg, #D85A30, #B9411C); }
.plat-pill-boss { background: linear-gradient(135deg, #378ADD, #2563EB); }
.plat-trigger-name {
  max-width: 0; margin-left: 0; overflow: hidden; white-space: nowrap;
  font-size: 12px; font-weight: 600;
  transition: max-width .45s cubic-bezier(.4, 0, .2, 1), margin-left .45s cubic-bezier(.4, 0, .2, 1);
}
/* V1 交叉换装：胶囊收起 ↔ 全名展开，同一时刻只有一种身份在场（防「BOSS BOSS直聘」重复感） */
/* 展开加 0.12s 意图延迟：停留才展开，鼠标路过不闪变 */
.plat-switch:hover .plat-trigger-name, .plat-switch.open .plat-trigger-name {
  max-width: 90px; margin-left: 2px; transition-delay: .12s;
}
.plat-switch:hover .plat-pill, .plat-switch.open .plat-pill {
  max-width: 0; padding-left: 0; padding-right: 0; transition-delay: .12s;
}
.plat-caret { width: 11px; height: 11px; stroke: #94A3B8; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-left: 3px; transition: transform .15s; flex-shrink: 0; }
.plat-switch.open .plat-caret { transform: rotate(180deg); }
.plat-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 200px;
  background: #FFFFFF; border: 0.5px solid #CBD5E1; border-radius: 12px;
  padding: 10px 12px; z-index: 70; box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}
.plat-panel-head { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: #94A3B8; margin: 0 0 8px 4px; }
.plat-panel-head .sub { margin-left: auto; font-size: 10.5px; }
.plat-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 10px; border-radius: 8px; border: none; background: transparent;
  cursor: pointer; text-align: left; font-size: 12px; color: #475569;
}
.plat-item:hover { background: #F1F5F9; color: #0F172A; }
/* 悬停预览目标平台色（轻一度）：切到谁，谁的颜色先亮出来 */
.plat-item:not(.on):hover.plat-item-lp { background: #FCF3EE; color: #993C1D; }
.plat-item:not(.on):hover.boss-item { background: #F0F7FD; color: #185FA5; }
/* 选中态 = 当前平台色（修正：BOSS 项此前缺 boss-item 类，选中误落猎聘橙） */
.plat-item.on { background: #FAECE7; color: #993C1D; font-weight: 560; }
.plat-item.boss-item.on, .plat-item.boss-item.on:hover { background: #E6F1FB; color: #185FA5; }
.plat-item.on:hover { background: #FAECE7; }
.plat-check {
  width: 13px; height: 13px; stroke: #993C1D; fill: none; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; margin-left: auto; display: none; flex-shrink: 0;
}
.plat-item.boss-item .plat-check { stroke: #185FA5; }
.plat-item.on .plat-check { display: block; }

/* ═══ 页面级空态（图标 + 文案，2026-10-10；小组件级仍用 .empty-inline） ═══ */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 46vh; padding: 24px 12px; text-align: center;
}
.empty-state .es-icon {
  width: 42px; height: 42px; border-radius: 50%; background: #F1F5F9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M4 7l3-3h10l3 3'/%3E%3Cpath d='M9 12h6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 22px;
}
.empty-state .es-txt { font-size: 12.5px; color: #94A3B8; }
