/**
 * shared.css — 阅微数字员工平台通用样式覆盖
 * 引入方式：<link rel="stylesheet" href="/dict_static/shared.css">
 * 覆盖各页面不一致的 topbar / 按钮 / 卡片等元素
 */

/* ── 全局基础 ── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1D2129;
  background: #F5F6F8;
}

/* ── Topbar 统一规范（覆盖各页命名差异）── */
/* 支持 .topbar / .std-topbar 两种命名 */
.topbar, .std-topbar {
  background: #fff !important;
  border-bottom: 1px solid #E5E6EB !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 24px !important;
  gap: 12px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  flex-shrink: 0 !important;
}

/* Logo 方块 */
.topbar-logo, .std-topbar-logo,
.topbar-icon {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  background: #165DFF !important;
  background-image: none !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
  /* 清掉 delivery_companion 的大尺寸 */
}

/* 如果 topbar-icon 里面有 h1，隐藏文字 */
.topbar-icon + .topbar-text { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; }
.topbar-icon + .topbar-text h1 { font-size: 15px !important; font-weight: 600 !important; color: #1D2129 !important; margin: 0 !important; }
.topbar-icon + .topbar-text p { display: none !important; }

/* 品牌名 */
.topbar-name, .std-topbar-name {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1D2129 !important;
  letter-spacing: -0.2px !important;
}

/* 副标题 */
.topbar-sub, .std-topbar-sub {
  font-size: 13px !important;
  color: #86909C !important;
}

/* 分隔线 */
.topbar-sep {
  width: 1px !important;
  height: 16px !important;
  background: #E5E6EB !important;
  flex-shrink: 0 !important;
}

/* 右侧操作区 */
.topbar-right { margin-left: auto !important; }

/* 设置按钮 */
.topbar-settings {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  color: #86909C !important;
  text-decoration: none !important;
  transition: background .15s !important;
}
.topbar-settings:hover { background: #F2F3F5 !important; color: #1D2129 !important; }

/* ── Tab 导航统一 ── */
.tab-bar, .tab-nav {
  background: #fff;
  border-bottom: 1px solid #E5E6EB;
  display: flex;
  padding: 0 24px;
  gap: 0;
  flex-shrink: 0;
}

.tab-item, .tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  color: #86909C;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  transition: color .15s, border-color .15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
}
.tab-item:hover, .tab-btn:hover { color: #1D2129; }
.tab-item.active, .tab-btn.active {
  color: #165DFF;
  border-bottom-color: #165DFF;
  font-weight: 600;
}

/* ── 按钮统一 ── */
.btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #E5E6EB;
  background: #fff;
  color: #4E5969;
  transition: border-color .15s, color .15s;
  font-weight: 500;
  line-height: 1.5;
}
.btn:hover { border-color: #165DFF; color: #165DFF; }
.btn-primary { background: #165DFF !important; color: #fff !important; border-color: #165DFF !important; }
.btn-primary:hover { background: #0E44D1 !important; opacity: 1 !important; }
.btn-primary:disabled { background: #9AB5F7 !important; cursor: not-allowed !important; border-color: #9AB5F7 !important; }

/* ── 卡片 / 面板 ── */
.section, .card, .panel {
  background: #fff;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
}

/* ── Spinner ── */
.spinner {
  border: 2px solid #E5E6EB !important;
  border-top-color: #165DFF !important;
  border-radius: 50%;
  animation: yw-spin .7s linear infinite;
}
@keyframes yw-spin { to { transform: rotate(360deg); } }

/* ── 清掉 delivery_companion 的特殊大 topbar ── */
/* topbar-text 下的 description 段落隐藏 */
.topbar .topbar-text p,
.topbar .topbar-desc {
  display: none !important;
}
