/* 桢律 全局样式（5元人民币紫色调） */
:root {
  --primary: #6B3FA0;          /* 5元人民币主紫 */
  --primary-dark: #4A2876;    /* 深紫 - 标题/侧栏 */
  --primary-light: #8B5FBF;   /* 浅紫 - hover */
  --primary-pale: #F3ECF9;    /* 极淡紫 - 背景 */
  --accent: #D4A847;          /* 金黄 - 5元光变油墨 */
  --accent-light: #E6C373;
  --bg: #F8F5FC;              /* 极淡紫背景 */
  --border: #E4D9EF;          /* 紫边框 */
  --text: #2D1A47;            /* 深紫黑文字 */
  --text-regular: #2D1A47;
  --text-secondary: #7C6B96;
  /* 兼容旧变量 */
  --primary-50: #F3ECF9;
  --primary-100: #E1D2F0;
  --success: #67C23A;
  --warning: #E6A23C;
  --danger: #F56C6C;
}

* { box-sizing: border-box; }

html, body, #app {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-regular);
  background: var(--bg);
}

/* 顶部导航 - 深紫渐变（5元人民币紫色主调） */
.app-header {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #4A2876 0%, #6B3FA0 50%, #8B5FBF 100%);
  color: #fff;
  height: 56px;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(107, 63, 160, 0.25);
}
.app-logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}
.app-logo .logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #D4A847 0%, #B8902F 100%);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-weight: 700;
  color: #4A2876;
}
.app-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 侧边栏 */
.app-sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
}
.el-menu--vertical .menu-group-title {
  padding: 14px 20px 4px;
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

/* Element Plus 主题色覆盖 - 桢紫 */
.el-menu-item.is-active { color: var(--primary); background: var(--primary-pale) !important; }
.el-menu-item:hover { background: var(--primary-pale) !important; color: var(--primary-dark); }
.el-button--primary { background-color: var(--primary); border-color: var(--primary); }
.el-button--primary:hover { background-color: var(--primary-light); border-color: var(--primary-light); }
.el-button--primary:active { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.el-button--primary.is-link { background: transparent; color: var(--primary); }
.el-link--primary { color: var(--primary); }
.el-tag { background-color: var(--primary-pale); border-color: var(--border); color: var(--primary-dark); }
.el-pagination.is-background .el-pager li.is-active { background-color: var(--primary); }
.el-tabs__item.is-active { color: var(--primary); }
.el-tabs__active-bar { background-color: var(--primary); }
.el-tabs__item:hover { color: var(--primary-light); }
.el-radio__input.is-checked .el-radio__inner { background-color: var(--primary); border-color: var(--primary); }
.el-radio__input.is-checked + .el-radio__label { color: var(--primary); }
.el-checkbox__input.is-checked .el-checkbox__inner { background-color: var(--primary); border-color: var(--primary); }
.el-switch.is-checked .el-switch__core { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.el-step__head.is-process { color: var(--primary); border-color: var(--primary); }
.el-step__head.is-finish { color: var(--primary); border-color: var(--primary); }
.el-step__title.is-process { color: var(--primary); }
.el-step__title.is-finish { color: var(--primary); }
.el-progress-bar__inner { background-color: var(--primary); }
.el-loading-spinner .circular { stroke: var(--primary); }
.el-date-table td.in-range .el-date-table-cell { background: var(--primary-pale); }
.el-date-table td.today .el-date-table-cell__text { color: var(--primary); font-weight: 700; }
.el-tree-node__content:hover { background: var(--primary-pale); }
a { color: var(--primary); }

/* 工作台 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-regular);
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* 卡片 */
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 600;
  color: var(--primary);
}
.stat-card .stat-delta {
  font-size: 12px;
  color: var(--accent);
}

/* 登录页 */
.login-page {
  height: 100vh;
  background: linear-gradient(135deg, #4A2876 0%, #6B3FA0 50%, #D4A847 120%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 400px;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}
.login-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* 数据表 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.toolbar .search {
  width: 240px;
}
.toolbar .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* 通用 */
.card-block {
  background: #fff;
  border-radius: 8px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-regular);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tag-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* 案件详情 tab */
.case-tabs .el-tabs__nav {
  padding-left: 0;
}

/* AI 助手 */
.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A2876, #D4A847);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(107, 63, 160, 0.45);
  z-index: 1000;
}
.ai-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}
.ai-panel .ai-header {
  background: linear-gradient(90deg, #4A2876, #6B3FA0);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-panel .ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #fafbfc;
}
.ai-panel .ai-input {
  border-top: 1px solid var(--border);
  padding: 8px;
}
.ai-msg-user, .ai-msg-bot {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 85%;
  word-break: break-all;
}
.ai-msg-user {
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}
.ai-msg-bot {
  background: #fff;
  border: 1px solid var(--border);
}

/* 颜色辅助 */
.text-primary { color: var(--primary); }
.text-success { color: #67c23a; }
.text-warning { color: #e6a23c; }
.text-danger { color: #f56c6c; }
.text-secondary { color: var(--text-secondary); }

/* 保全期限状态颜色 */
.day-ok { color: #67c23a; font-weight: 600; }
.day-warning { color: #e6a23c; font-weight: 600; }
.day-danger { color: #f56c6c; font-weight: 700; }
.day-overdue { color: #909399; font-weight: 700; text-decoration: line-through; }
.row-danger { background: #fef0f0 !important; }
.row-expired { background: #f4f4f5 !important; color: #909399; }
.row-warning { background: #fdf6ec !important; }

/* 智能文书 Tab 卡片 */
.doc-action-card { cursor: pointer; transition: all .2s; text-align: center; padding: 12px; }
.doc-action-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(107, 63, 160, .15); transform: translateY(-2px); }
.doc-action-icon { font-size: 36px; margin: 6px 0; }
.doc-action-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.doc-action-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* 文书类型选择卡片 */
.doc-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.doc-type-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; cursor: pointer; transition: all .2s; }
.doc-type-card.active { border-color: var(--primary); background: rgba(107, 63, 160, .06); }
.doc-type-card:hover { border-color: var(--primary); }
.doc-type-icon { font-size: 28px; }
.doc-type-name { font-size: 14px; font-weight: 600; margin: 6px 0; }
.doc-type-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* 内容容器 */
.page-content {
  padding: 20px 24px;
}

/* 详情页布局 */
.detail-row {
  display: flex;
  gap: 20px;
}
.detail-row .main {
  flex: 1;
  min-width: 0;
}
.detail-row .side {
  width: 320px;
}

@media (max-width: 1200px) {
  .detail-row { flex-direction: column; }
  .detail-row .side { width: 100%; }
}

/* 保全期限仪表盘 */
.dash-card {
  text-align: center;
  border-radius: 10px;
  transition: transform 0.2s;
}
.dash-card:hover { transform: translateY(-2px); }
.dash-num {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.dash-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.dash-warn .dash-num { color: #e6a23c; }
.dash-danger .dash-num { color: #f56c6c; }

/* 团队协作 */
.ann-unread { border-left: 3px solid var(--primary); }
.disc-case-list { max-height: 480px; overflow: auto; }
.disc-case-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.disc-case-item:hover { background: var(--primary-pale); }
.disc-case-item.active {
  background: var(--primary-pale);
  border-color: var(--primary);
}
.disc-thread { max-height: 420px; overflow: auto; padding-right: 4px; }
.disc-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.disc-msg.mine { flex-direction: row-reverse; }
.disc-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.disc-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 78%;
}
.disc-msg.mine .disc-bubble { background: var(--primary-pale); }
.disc-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.disc-content { font-size: 13px; line-height: 1.7; word-break: break-all; }
.report-box {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  font-family: Consolas, 'Microsoft YaHei', monospace;
}

/* 审批中心 - 菜单待办徽标 */
.menu-badge {
  display: inline-block;
  background: #f56c6c;
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  margin-left: 8px;
}

/* ==================== 律师函 / 合同工坊 ==================== */
.letter-layout { display: flex; gap: 16px; height: 100%; }
.letter-form { flex: 0 0 42%; overflow-y: auto; padding-right: 6px; }
.letter-preview-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.letter-toolbar { margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.letter-paper, .contract-paper {
  background: #fff;
  border: 1px solid var(--border, #e4e0ec);
  border-radius: 6px;
  padding: 28px 30px;
  box-shadow: 0 2px 10px rgba(107, 63, 160, 0.06);
}
.letter-paper { flex: 1; overflow-y: auto; }
.letter-paper pre, .contract-paper pre {
  font-family: "仿宋", "FangSong", "宋体", SimSun, serif;
  font-size: 15px;
  line-height: 2;
  color: #1f1a26;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  tab-size: 4;
}
.contract-paper { max-height: 640px; overflow-y: auto; }
.contract-paper pre { font-size: 14px; line-height: 1.9; }
.form-hint { font-size: 12px; color: var(--text-secondary, #909399); margin-top: 4px; }

.studio-tabs { padding: 0 4px; }
.review-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary, #909399);
  font-size: 13px;
  line-height: 2;
}
.review-empty .el-icon { margin-bottom: 12px; }
.score-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f7f4fb, #fff);
  border: 1px solid var(--border, #e4e0ec);
  border-radius: 8px;
  margin-bottom: 14px;
}
.score-meta { flex: 1; }
.score-title { font-size: 16px; font-weight: 600; color: var(--primary, #6B3FA0); }
.score-desc { font-size: 13px; color: var(--text-secondary, #606266); margin: 6px 0 8px; }
.score-counts { display: flex; align-items: center; }
.finding-body { padding: 4px 8px 8px 4px; font-size: 13px; line-height: 1.8; }
.finding-snippet {
  background: #fdf6ec;
  border-left: 3px solid #e6a23c;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  color: #5c4417;
  margin-bottom: 8px;
  word-break: break-all;
}
.finding-advice { color: #303133; }
.text-warning { color: #e6a23c; font-weight: 600; }

/* 合同审查：立场/角度/分组 */
.review-opt-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.review-opt-label { width: 64px; flex: 0 0 64px; font-size: 13px; font-weight: 600; color: #303133; line-height: 28px; }
.review-opt-tip { font-size: 12px; color: #909399; line-height: 28px; }
.review-angles { display: flex; flex-wrap: wrap; gap: 0 4px; flex: 1; min-width: 300px; }
.review-angles .el-checkbox { margin-right: 8px; margin-bottom: 2px; }

/* ==================== 日程安排 ==================== */
.hc-cn-hearing { color: #2563eb; }
.hc-cn-renewal { color: #ea580c; }
.hc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.hc-stat { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(15,23,42,.05); border: 1px solid #f1f5f9; transition: transform .18s ease, box-shadow .18s ease; position: relative; overflow: hidden; }
.hc-stat::after { content: ''; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; opacity: .08; }
.hc-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.1); }
.hc-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex: 0 0 46px; }
.hc-stat-blue::after { background: #2563eb; }
.hc-stat-blue .hc-stat-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 10px rgba(37,99,235,.3); }
.hc-stat-cyan::after { background: #0891b2; }
.hc-stat-cyan .hc-stat-icon { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 10px rgba(8,145,178,.3); }
.hc-stat-red::after { background: #dc2626; }
.hc-stat-red .hc-stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 4px 10px rgba(220,38,38,.3); }
.hc-stat-orange::after { background: #ea580c; }
.hc-stat-orange .hc-stat-icon { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 4px 10px rgba(234,88,12,.3); }
.hc-stat-num { font-size: 26px; font-weight: 700; color: #0f172a; line-height: 1.15; }
.hc-stat-label { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.hc-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.hc-legend { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 4px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 6px 12px; flex-wrap: wrap; }
.hc-legend-title { font-weight: 600; color: #94a3b8; margin-right: 6px; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin: 0 4px 0 10px; }
.hc-dot-hearing { background: #2563eb; }
.hc-dot-renewal { background: #ea580c; }
.hc-dot-task { background: #16a34a; }

.hc-cal-header { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; }
.hc-cal-ym { font-weight: 600; font-size: 15px; color: #303133; min-width: 130px; text-align: center; }
.hc-cal-titlebar { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 12px; padding: 10px 14px; background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 60%); border: 1px solid #e0ecff; border-radius: 10px; }
.hc-cal-titlebar > span:first-child { font-size: 15px; font-weight: 700; color: #1e3a8a; }
.hc-cal-nav { display: inline-flex; gap: 6px; }
.hc-calendar-wrap .el-calendar__header { display: none; }
.hc-side-card { margin-bottom: 14px; }
.hc-side-card .section-title { padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
.hc-side-card .section-title > span:first-child { position: relative; padding-left: 10px; }
.hc-side-card .section-title > span:first-child::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 3px; border-radius: 2px; background: #2563eb; }
.hc-side-date { font-size: 13px; color: #2563eb; font-weight: 600; }
.hc-side-tip { font-size: 12px; color: #94a3b8; font-weight: 400; }

/* 月历单元格 */
.el-calendar-table thead th { font-weight: 600; color: #64748b; background: #f8fafc; }
.hc-cell { height: 100%; padding: 4px 5px; cursor: pointer; border-radius: 6px; transition: background .12s ease; }
.hc-cell:hover { background: #f1f5f9; }
.hc-cell.is-rest:hover { background: #fef2f2; }
.hc-cell.is-makeup:hover { background: #f0fdf4; }
.hc-cell.is-other { opacity: .35; }
.hc-cell.is-selected { background: #eff6ff; box-shadow: inset 0 0 0 1.5px #60a5fa; }
.hc-cell-date { font-size: 12px; color: #475569; font-weight: 500; }
.hc-cell.is-today .hc-cell-date { display: inline-block; background: #2563eb; color: #fff; border-radius: 50%; width: 20px; height: 20px; line-height: 20px; text-align: center; font-weight: 600; }
.hc-cell-events { margin-top: 2px; }
.hc-cell-bar { font-size: 10px; line-height: 16px; border-radius: 4px; padding: 0 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; display: flex; gap: 4px; }
.hc-bar-hearing { background: #dbeafe; color: #1d4ed8; }
.hc-bar-renewal { background: #ffedd5; color: #c2410c; }
.hc-bar-task { background: #dcfce7; color: #15803d; }
.hc-bar-time { font-weight: 700; flex: 0 0 auto; }
.hc-bar-name { overflow: hidden; text-overflow: ellipsis; }
.hc-cell-more { font-size: 10px; color: #94a3b8; margin-top: 1px; padding-left: 2px; }
.el-calendar-table .el-calendar-day { height: 112px; padding: 0; }
.el-calendar-table .el-calendar-day:hover { background: transparent; }
.el-calendar__body { padding: 8px 12px 12px; }

/* 当日事件卡 */
.hc-event-list { display: flex; flex-direction: column; gap: 10px; }
.hc-event-card { border-radius: 10px; padding: 10px 12px; cursor: pointer; border: 1px solid transparent; transition: box-shadow .15s, transform .15s; }
.hc-event-card:hover { box-shadow: 0 4px 14px rgba(15,23,42,.1); transform: translateY(-1px); }
.hc-ev-hearing { border-left: 4px solid #2563eb; background: #f5f9ff; border-color: #dbeafe; }
.hc-ev-renewal { border-left: 4px solid #ea580c; background: #fffaf3; border-color: #ffedd5; }
.hc-ev-task { border-left: 4px solid #16a34a; background: #f0fdf4; border-color: #dcfce7; }
.hc-ev-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; }
.hc-ev-time { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: #334155; }
.hc-ev-title { font-size: 14px; font-weight: 600; color: #1e293b; margin: 6px 0 4px; }
.hc-ev-place { display: flex; align-items: flex-start; gap: 4px; font-size: 12px; color: #b45309; margin-bottom: 4px; }
.hc-ev-place .el-icon { margin-top: 2px; flex: 0 0 auto; }
.hc-ev-sub { font-size: 12px; color: #94a3b8; display: flex; gap: 8px; }
.hc-ev-subject { font-size: 12px; color: #9a3412; margin-top: 3px; line-height: 1.5; }
.hc-pill { font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: auto; }
.hc-pill-danger { background: #fee2e2; color: #dc2626; font-weight: 600; }

/* 即将到来列表 */
.hc-up-list { display: flex; flex-direction: column; }
.hc-up-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px dashed #ebeef5; cursor: pointer; border-radius: 8px; transition: background .12s ease; }
.hc-up-item:hover { background: #f8fafc; }
.hc-up-item:last-child { border-bottom: none; }
.hc-up-date { width: 46px; flex: 0 0 46px; text-align: center; border-radius: 8px; padding: 4px 0; color: #fff; }
.hc-dt-hearing { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.hc-dt-renewal { background: linear-gradient(135deg, #f97316, #ea580c); }
.hc-dt-task { background: linear-gradient(135deg, #22c55e, #16a34a); }
.hc-up-d { font-size: 18px; font-weight: 700; line-height: 1.1; }
.hc-up-ym { font-size: 10px; opacity: .9; }
.hc-up-body { flex: 1; min-width: 0; }
.hc-up-title { font-size: 13px; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-up-kind { font-size: 11px; border-radius: 3px; padding: 0 5px; margin-right: 5px; color: #fff; }
.hc-kd-hearing { background: #2563eb; }
.hc-kd-renewal { background: #ea580c; }
.hc-kd-task { background: #16a34a; }
.hc-up-meta { font-size: 12px; color: #94a3b8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-up-badge { flex: 0 0 auto; font-size: 12px; border-radius: 12px; padding: 2px 10px; font-weight: 600; }
.hc-badge-normal { background: #f1f5f9; color: #64748b; }
.hc-badge-urgent { background: #fef3c7; color: #b45309; }
.hc-badge-today { background: #fee2e2; color: #dc2626; }
.hc-badge-over { background: #f4f4f5; color: #a8abb2; }

/* 审批中心 */
.ap-item-text { font-size: 12px; color: #606266; margin-top: 3px; line-height: 1.4; }
.ap-detail .ap-sub { font-size: 12px; color: #909399; margin-top:2px; }
.ap-sub { font-size: 12px; color: #909399; margin-top:2px; }
/* 审批流程节点 / 工作流程说明 */
.ap-flow-box { border: 1px solid #e5e7eb; border-radius: 10px; background: #fafbfc; padding: 16px 18px 8px; }
.ap-flow-title { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: #1f2937; }
.ap-flow-tpl { border: 1px solid #eef2f7; border-radius: 10px; padding: 14px 18px 18px; margin-bottom: 14px; background: #fff; }
.ap-flow-tpl-head { display: flex; align-items: center; }
.ap-cs-label { color: #606266; font-size: 12px; }

/* 立案登记：证件号码 / 合同打印预览纸 */
.idno-ok .el-input__wrapper { background: #f0fdf4; }

/* 新建任务页 */
.task-new-card { border-radius: 10px; border: 1px solid #e5e7eb; }
.task-new-card .el-card__body { padding: 26px 30px; }
.task-new-tip { display: flex; align-items: center; gap: 6px; background: #eff6ff; border: 1px solid #dbeafe; color: #1d4ed8; font-size: 13px; line-height: 1.6; padding: 10px 14px; border-radius: 8px; margin-bottom: 20px; }
.task-new-tip .el-icon { font-size: 16px; flex: none; }
.lp-sheet { max-height: 62vh; overflow: auto; background: #f3f4f6; padding: 20px; border-radius: 8px; }
.lp-pre { background: #fff; width: 100%; min-height: 100%; margin: 0 auto; padding: 34px 40px; box-shadow: 0 2px 12px rgba(15,23,42,.12); border-radius: 4px;
  font-family: "SimSun", "宋体", serif; font-size: 13px; line-height: 1.9; color: #111; white-space: pre-wrap; word-break: break-all; box-sizing: border-box; }
@media (min-width: 720px) { .lp-pre { width: 72%; min-width: 480px; } }

/* 节假日 / 周末 / 调休 */
.tc-rest > div:first-child > span { color: #dc2626 !important; }
.tc-makeup > div:first-child > span { color: #16a34a !important; }
.hc-tag { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 3px; border-radius: 3px; font-size: 10px; font-weight: 700; text-align: center; box-sizing: border-box; }
.hc-tag-holiday { background: #dc2626; color: #fff; }
.hc-tag-weekend { background: #fff; color: #dc2626; border: 1px solid #fca5a5; }
.hc-tag-makeup { background: #16a34a; color: #fff; }
.hc-legend .hc-tag { margin-left: 10px; }
.hc-cell-top { display: flex; align-items: center; justify-content: space-between; gap: 2px; }
.hc-cell.is-rest .hc-cell-date { color: #dc2626; }
.hc-cell.is-makeup .hc-cell-date { color: #16a34a; }
.hc-cell.is-today.is-rest .hc-cell-date { color: #fff; }
.hc-cell-holiday { font-size: 10px; color: #dc2626; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.el-calendar-table thead th:first-child, .el-calendar-table thead th:last-child { color: #dc2626; }

.finding-group { margin-bottom: 14px; border: 1px solid #ebeef5; border-radius: 8px; overflow: hidden; }
.finding-group-title {
  background: linear-gradient(90deg, #f4eefb, #faf7ff);
  padding: 8px 12px; font-size: 13px; font-weight: 600; color: #6B3FA0;
  display: flex; align-items: center; gap: 8px;
}
.finding-group-count {
  background: #6B3FA0; color: #fff; font-size: 11px; border-radius: 10px;
  min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px;
}
.finding-group .el-collapse { border: none; }
.finding-group .el-collapse-item__header { padding-left: 12px; }
.finding-group .el-collapse-item__wrap { border-bottom: none; }

/* 案件文书中心 */
.doc-type-list { display: flex; flex-direction: column; gap: 8px; }
.doc-type-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #ebeef5; border-radius: 8px; padding: 10px 12px; cursor: pointer;
  transition: all .15s; background: #fff;
}
.doc-type-item:hover { border-color: #b994e0; background: #faf7ff; }
.doc-type-item.active { border-color: #6B3FA0; background: #f4eefb; box-shadow: 0 0 0 1px #6B3FA0 inset; }
.doc-type-icon {
  width: 34px; height: 34px; border-radius: 8px; background: #6B3FA0; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex: 0 0 34px;
}
.doc-type-name { font-size: 13.5px; font-weight: 600; color: #303133; }
.doc-type-desc { font-size: 12px; color: #909399; margin-top: 2px; }
.doc-preview {
  background: #fafafa; border: 1px solid #ebeef5; border-radius: 6px;
  padding: 18px 22px; font-size: 13.5px; line-height: 1.9; white-space: pre-wrap;
  font-family: "仿宋", "FangSong", "宋体", SimSun, serif; color: #1f1f1f;
  max-height: 560px; overflow: auto; margin: 0;
}

/* 卷宗文档列表 */
.archive-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.archive-item {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid #ebeef5; border-radius: 6px; padding: 8px 10px; transition: all .15s; background: #fff;
}
.archive-item:hover { border-color: #b994e0; background: #faf7ff; }
.archive-item.active { border-color: #6B3FA0; background: #f4eefb; box-shadow: 0 0 0 1px #6B3FA0 inset; }
.archive-main { flex: 1; cursor: pointer; min-width: 0; }
.archive-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #303133; }
.archive-name .el-icon { color: #6B3FA0; font-size: 15px; }
.archive-meta { font-size: 11px; color: #909399; margin-top: 2px; }
.archive-ops { display: flex; gap: 2px; flex-shrink: 0; }

/* 已付律师费进度单元格 */
.fee-cell { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.fee-ratio { font-size: 11px; font-weight: 600; }
.text-muted { color: #909399; }

/* Case correction keeps editable fields legible on phones. */
.case-correction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.case-record-heading{flex-wrap:wrap}.property-specific>.el-button{display:block;margin-top:6px}@media(max-width:600px){.case-correction-grid{grid-template-columns:minmax(0,1fr)}.preservation-edit-grid{grid-template-columns:minmax(0,1fr)!important}}
