/* civil-compliance.css — 合规草稿（ComplianceAdvisor）桌面 1:1 网页版
   颜色参考桌面 XAML: 主色 #1F5EFF, 危险色 #B42318, 边框 #AFC0D4, 背景白
   三栏布局对应桌面 Grid ColumnDefinitions: 370px / * / 340px */
.civil-compliance-host { display: block; }

.cc-workbench {
  min-height: 540px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  color: #17324d;
  font-size: 13px;
}

/* ---- 三栏布局：370 / flex / 340（对齐桌面 ColumnDefinitions） ---- */
.cc-layout {
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr) minmax(280px, 340px);
  gap: 10px;
  align-items: stretch;
}

/* ---- 通用面板边框（桌面 PanelBorder） ---- */
.cc-form-panel,
.cc-list-panel,
.cc-preview-panel {
  min-width: 0;
  border: 1px solid #AFC0D4;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(41, 72, 107, .06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cc-form-panel h3,
.cc-list-panel h3,
.cc-preview-panel h3 {
  margin: 0;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #183b5b;
  background: #fafcfe;
  border-bottom: 1px solid #e5ebf1;
}

/* ---- 左栏：表单（可滚动） ---- */
.cc-form-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.cc-status-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #8a6d1a;
  background: #fff3cd;
  border-bottom: 1px solid #f0d878;
}
.cc-form-panel > label {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #526b83;
  border-bottom: 1px solid #f1f5f9;
}
.cc-form-panel > label:last-of-type { border-bottom: none; }
.cc-form-panel input,
.cc-form-panel select,
.cc-form-panel textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b9c9db;
  border-radius: 5px;
  padding: 6px 8px;
  font: inherit;
  font-weight: 400;
  color: #17324d;
  background: #fff;
}
.cc-form-panel textarea {
  resize: vertical;
  min-height: 56px;   /* 桌面 Height=70 */
  line-height: 1.5;
}
.cc-form-panel input:focus,
.cc-form-panel select:focus,
.cc-form-panel textarea:focus {
  outline: none;
  border-color: #1F5EFF;
  box-shadow: 0 0 0 2px rgba(31, 94, 255, .12);
}

/* ---- 表单底部操作按钮（桌面 PrimaryButton） ---- */
.cc-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-top: 1px solid #e5ebf1;
  background: #fafcfe;
}
.cc-actions button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #AFC0D4;
  border-radius: 5px;
  background: #fff;
  color: #17324d;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.cc-actions button:hover:not(:disabled) { background: #f4f8fb; }
.cc-actions button:disabled { opacity: .5; cursor: not-allowed; }
.cc-actions .cc-primary { background: #1F5EFF; border-color: #1F5EFF; color: #fff; }
.cc-actions .cc-primary:hover:not(:disabled) { background: #1a52e0; }
.cc-actions .cc-danger { background: #B42318; border-color: #B42318; color: #fff; }
.cc-actions .cc-danger:hover:not(:disabled) { background: #991d14; }

/* ---- 中栏：列表表格（桌面 DataGrid 六列） ---- */
.cc-list-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.cc-table-scroll { min-height: 0; overflow: auto; }
.cc-list-panel table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.cc-list-panel th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 9px;
  text-align: left;
  color: #38556f;
  background: #edf3f8;
  border-bottom: 1px solid #ccd9e6;
  white-space: nowrap;
}
.cc-list-panel td {
  padding: 7px 9px;
  border-bottom: 1px solid #e5ebf1;
  vertical-align: top;
}
.cc-list-panel tbody tr { cursor: pointer; }
.cc-list-panel tbody tr:hover,
.cc-list-panel tbody tr.selected { background: #eaf2ff; }
.cc-title-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-empty { text-align: center; color: #778a9d; padding: 28px !important; }

/* ---- 风险等级徽标 ---- */
.cc-risk {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.cc-risk-low { background: #e6f4ea; color: #1e7e34; border-color: #b7dfbf; }
.cc-risk-medium { background: #fff3cd; color: #8a6d1a; border-color: #f0d878; }
.cc-risk-high { background: #fdecea; color: #b91c1c; border-color: #f0b9b9; }

/* ---- 右栏：预览（桌面 CivilComplianceDraftTextBox，只读 + 人工复核免责声明） ---- */
.cc-preview-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.cc-preview-text {
  margin: 0;
  padding: 10px 12px;
  border: none;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 320px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #17324d;
  background: #fafcfe;
}
.cc-preview-text:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(31, 94, 255, .1); }
.cc-preview-disclaimer {
  margin: 0;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #8a6d1a;
  background: #fff3cd;
  border-top: 1px solid #f0d878;
}

/* ---- 底部状态条 ---- */
.cc-status {
  padding: 8px 12px;
  border: 1px solid #c8d8e8;
  border-radius: 6px;
  background: #f4f8fb;
  font-size: 12.5px;
  color: #52616f;
}

/* ---- 响应式：窄屏堆叠 ---- */
@media (max-width: 1100px) {
  .cc-layout { grid-template-columns: 1fr; min-height: auto; }
  .cc-form-panel,
  .cc-list-panel,
  .cc-preview-panel { min-height: 320px; }
}
