:root {
  --bg: #eef3f7;
  --bg-soft: #f5f7fa;
  --panel: #ffffff;
  --line: #d7e0ea;
  --line-strong: #c9d4df;
  --text: #243447;
  --text-strong: #1f2d3d;
  --muted: #6b7c93;
  --primary: #0076fe;
  --primary-strong: #005ecb;
  --primary-soft: #e8f3fb;
  --sidebar-bg: #157ec9;
  --sidebar-active: #0f6bb0;
  --success: #1e9b6c;
  --warning: #fa8c16;
  --danger: #d6544b;
  --purple: #722ed1;
  --radius-sm: 4px;
  --radius-md: 6px;
  --shadow: 0 1px 3px rgba(15, 35, 64, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button, input, select, textarea { font: inherit; outline: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* 顶部通栏 Topbar */
.topbar {
  height: 56px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #dfe6ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #1687d3, #0f72bb);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-copy strong {
  font-size: 14px;
  color: var(--text-strong);
}
.brand-copy span {
  font-size: 9px;
  color: #8a9aae;
  letter-spacing: 0.04em;
}
.brand-divider {
  width: 1px;
  height: 18px;
  background: #dce4ed;
}
.brand-sys-title {
  font-size: 13px;
  font-weight: 600;
  color: #4a5d78;
}
.topbar-nav {
  display: flex;
  gap: 4px;
}
.topbar-nav-item {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: #4a5d78;
  font-size: 13px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.topbar-nav-item:hover { background: #f0f4f9; color: var(--primary); }
.topbar-nav-item.active { background: #e6f0ff; color: var(--primary); font-weight: 600; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-company {
  color: #334155;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.topbar-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
}
.topbar-avatar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.topbar-avatar {
  width: 28px;
  height: 28px;
  background: #0076fe;
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}

/* 布局 App Shell */
.app-shell {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 56px);
}

/* 左侧主导航 Sidebar */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.06);
  overflow-y: auto;
}
.sidebar-search-wrap {
  padding: 12px 10px 8px;
}
.sidebar-search-input {
  width: 100%;
  height: 30px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
}
.sidebar-search-input::placeholder { color: rgba(255,255,255,0.65); }
.sidebar-group {
  padding: 6px 0;
}
.sidebar-section-title {
  padding: 8px 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.sidebar-menu-list {
  list-style: none;
}
.sidebar-menu-item {
  padding: 10px 18px 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  text-decoration: none;
}
.sidebar-menu-item:hover { background: rgba(0,0,0,0.08); color: #fff; }
.sidebar-menu-item.active {
  background: #0e63a3;
  color: #fff;
  font-weight: 600;
  border-left: 4px solid #ffba00;
}

/* 右侧主工作区 Main Shell */
.main-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #f0f2f5;
}
.page-tab-bar {
  height: 38px;
  background: #fff;
  border-bottom: 1px solid #dfe6ee;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-tab {
  padding: 4px 12px;
  border-radius: 3px 3px 0 0;
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}
.page-tab:hover { background: #e2e8f0; color: var(--primary); }
.page-tab.active {
  background: #e6f0ff;
  color: #0076fe;
  font-weight: 600;
  border: 1px solid #bae0ff;
  border-bottom-color: #e6f0ff;
}
.page-tab .tab-close {
  display: inline-block;
  font-size: 11px;
  margin-left: 4px;
  color: #94a3b8;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  text-align: center;
  line-height: 14px;
}
.page-tab .tab-close:hover {
  background: rgba(0,0,0,0.12);
  color: #1e293b;
}

/* 页面内容容器 */
.page-container {
  padding: 14px 18px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* 面包屑与顶部标题操作条 */
.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 12px 18px;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}
.page-breadcrumb a {
  color: #475569;
}
.page-breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.page-breadcrumb .current {
  color: #1e293b;
  font-weight: 600;
}
.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 按钮规范 */
.ebs-btn-primary {
  height: 32px;
  padding: 0 16px;
  background-color: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  cursor: pointer;
}
.ebs-btn-primary:hover { background-color: var(--primary-strong); border-color: var(--primary-strong); }
.ebs-btn-default {
  height: 32px;
  padding: 0 14px;
  background-color: #fff;
  color: #334155;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  cursor: pointer;
}
.ebs-btn-default:hover { border-color: var(--primary); color: var(--primary); }
.ebs-btn-text {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

/* 内容卡片 */
.ebs-card {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.ebs-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}
.ebs-card-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background-color: var(--primary);
  margin-right: 8px;
  border-radius: 2px;
}

/* 表单组 Grid (支持一行3个布局) */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 20px;
}
.form-item-col2, .form-item-col3, .form-item-full { grid-column: 1 / -1; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}
.form-group label.required::before {
  content: "*";
  color: #e11d48;
  margin-right: 4px;
}
.form-ctrl {
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 12px;
  background: #fff;
  color: #1e293b;
}
.form-ctrl:focus {
  border-color: #0076fe;
  box-shadow: 0 0 0 2px rgba(0, 118, 254, 0.12);
}
.form-ctrl:disabled, .form-ctrl[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}
textarea.form-ctrl {
  height: 80px;
  padding: 8px 10px;
  resize: vertical;
}

/* 提示文字 */
.form-tip-alert {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  color: #cf1322;
  font-size: 12px;
  line-height: 1.6;
}

/* 附件列表样式 */
.att-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.att-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: #0076fe;
  text-decoration: none;
}
.att-tag:hover { background: #e6f0ff; }

/* 状态徽标 Badge */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.status-draft { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.status-processing { background: #e6f7ff; color: #0076fe; border: 1px solid #91d5ff; }
.status-submitted { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }
.status-rejected { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.status-completed { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

.scope-tag {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 4px;
}
.scope-same { background: #e6f4ff; color: #1677ff; }
.scope-lower { background: #f6ffed; color: #52c41a; }

.overdue-pill {
  color: #cf1322;
  background: #fff1f0;
  border: 1px solid #ffa39e;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* 表格样式 */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}
table.cscec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
table.cscec-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #ebeef5;
}
table.cscec-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ebeef5;
  border-right: 1px solid #ebeef5;
  color: #1e293b;
}
table.cscec-table tr:hover td {
  background-color: #f6faff;
}

/* 详情键值网格 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 24px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-item.full-col {
  grid-column: 1 / -1;
}
.detail-label {
  font-size: 12px;
  color: #64748b;
}
.detail-value {
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
  word-break: break-all;
}
.detail-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 14px;
  line-height: 1.6;
  font-size: 13px;
  color: #334155;
  white-space: pre-wrap;
}

/* 底部操作固定条 */
.page-footer-bar {
  background: #fff;
  border: 1px solid #e5e9f0;
  border-radius: 4px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* 模态弹窗通用样式 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(1px);
}
.modal-backdrop.is-active { display: flex; }
.modal-window {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.modal-title { font-size: 14px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.modal-close {
  border: none;
  background: transparent;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
}
.modal-close:hover { color: #1e293b; }
.modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

/* 营销名录表格 1:1 截图灰色风格规范 */
table.marketing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11.5px;
  white-space: nowrap;
}
table.marketing-table th {
  background: #b5c2d1;
  color: #1e293b;
  font-weight: 600;
  padding: 7px 8px;
  border: 1px solid #94a3b8;
  text-align: center;
}
table.marketing-table td {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  color: #334155;
}
table.marketing-table tr:hover td {
  background-color: #f1f7ff;
  cursor: pointer;
}
table.marketing-table tr.is-selected td {
  background-color: #e6f0ff !important;
  font-weight: 600;
}

/* =========================================================================
 * 子企业深耕工作评价专用样式
 * ========================================================================= */

/* 星级评分组件（支持 0-10 星） */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}
.star-rating .star {
  font-size: 18px;
  color: #d9d9d9;
  cursor: pointer;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}
.star-rating .star:hover,
.star-rating .star.is-hovered {
  color: #fadb14;
  transform: scale(1.1);
}
.star-rating .star.is-selected {
  color: #fadb14;
}
.star-rating .star-score {
  margin-left: 6px;
  font-size: 13px;
  color: #64748b;
  min-width: 18px;
  text-align: center;
}
.star-rating.is-readonly .star {
  cursor: default;
  transform: none;
}

/* 评价弹窗表单：label 左对齐、星级右对齐 */
.evaluation-form .form-group {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.evaluation-form .form-group label {
  width: 130px;
  text-align: right;
  flex-shrink: 0;
  margin-bottom: 0;
}
.evaluation-form .form-group .form-ctrl,
.evaluation-form .form-group .star-rating,
.evaluation-form .form-group .upload-trigger {
  flex: 1;
}
.evaluation-form .form-group textarea.form-ctrl {
  height: 96px;
}
.evaluation-form .form-group.full-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.evaluation-form .form-group.full-row label {
  width: auto;
  text-align: left;
}
.evaluation-form .form-group.full-row .form-ctrl {
  width: 100%;
}

/* 附件上传占位 */
.upload-trigger {
  width: 64px;
  height: 64px;
  border: 1px dashed #d9d9d9;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.upload-trigger:hover {
  border-color: #0076fe;
  color: #0076fe;
  background: #f0f7ff;
}
.upload-input {
  display: none;
}

/* 评价弹窗宽度 */
.modal-window.evaluation-modal {
  max-width: 560px;
  width: 92%;
}

/* 表格中星级只读展示 */
td .star-rating.is-readonly .star {
  font-size: 14px;
}
