.research-project-module {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  background: #ededed;
  color: #1f2937;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.research-project-module.is-workbench-embedded {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.research-project-module[hidden],
.research-modal[hidden],
.research-todo-layer[hidden] {
  display: none !important;
}

.research-todo-layer {
  position: fixed;
  inset: 0;
  z-index: 3880;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .48);
  color: #1f2937;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.research-todo-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid #dce2e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.research-todo-dialog > header,
.research-todo-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.research-todo-dialog > header h2 {
  margin: 0;
  font-size: 18px;
}

.research-todo-dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
}

.research-todo-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.research-todo-project {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #eef8f3;
}

.research-todo-project span,
.research-todo-status {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}

.research-todo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.research-todo-fields label {
  display: grid;
  gap: 6px;
  color: #5f6875;
  font-size: 13px;
}

.research-todo-fields label.wide {
  grid-column: 1 / -1;
}

.research-todo-fields input,
.research-todo-fields select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}

.research-todo-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 24px;
}

@media (max-width: 560px) {
  .research-todo-layer {
    padding: 10px;
  }

  .research-todo-dialog {
    max-height: calc(100dvh - 20px);
  }

  .research-todo-fields {
    grid-template-columns: 1fr;
  }

  .research-todo-fields label.wide {
    grid-column: auto;
  }
}

.research-project-header {
  min-height: 68px;
  padding: 10px 22px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .05);
}

.research-project-header h1 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 650;
}

.research-project-header span {
  color: #8a8f98;
  font-size: 12px;
}

.research-header-actions,
.research-form-actions,
.research-card-title-row,
.research-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.research-project-body {
  flex: 1;
  overflow: auto;
  padding: 18px;
}

.research-icon-button,
.research-plain-button,
.research-primary-button,
.research-danger-button,
.research-filter-group button,
.research-detail-tabs button {
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  cursor: pointer;
  font: inherit;
}

.research-icon-button {
  min-width: 36px;
  padding: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
}

.research-plain-button {
  background: #eef2f7;
  color: #334155;
}

.research-primary-button {
  background: #07c160;
  color: #fff;
}

.research-danger-button {
  background: #fff1f0;
  color: #cf1322;
}

.research-plain-button:disabled,
.research-primary-button:disabled,
.research-danger-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.research-toolbar {
  justify-content: space-between;
  margin: 0 auto 16px;
  max-width: 1280px;
}

.research-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-filter-group button {
  background: #fff;
  color: #64748b;
}

.research-filter-group button.active {
  background: #07c160;
  color: #fff;
}

.research-search {
  width: min(340px, 42vw);
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d9dde4;
  border-radius: 8px;
  background: #fff;
}

.research-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
}

.research-project-card,
.research-form-card,
.research-detail-card,
.research-form-note,
.research-upload-card,
.research-detail-hero {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

.research-project-card {
  padding: 18px;
  border: 1px solid transparent;
}

.research-project-card:hover {
  border-color: #a7e8c5;
}

.research-project-card h3 {
  margin: 10px 0 9px;
  font-size: 17px;
  line-height: 1.45;
}

.research-project-card p,
.research-project-card small {
  display: block;
  margin: 5px 0;
  color: #6b7280;
}

.research-project-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.research-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #078542;
  font-size: 12px;
}

.research-badge.pending { background: #fff4df; color: #b86b00; }
.research-badge.rejected { background: #fff0f0; color: #c23434; }
.research-badge.draft { background: #eef2f7; color: #64748b; }
.research-badge.completed { background: #e8f1ff; color: #3565b5; }

.research-application-view,
.research-detail-view {
  max-width: 1180px;
  margin: 0 auto;
}

.research-form-note,
.research-upload-card {
  padding: 14px 18px;
  margin-bottom: 14px;
}

.research-form-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-left: 4px solid #07c160;
}

.research-form-note span,
.research-upload-card span,
.research-muted {
  color: #7c8491;
  font-size: 13px;
}

.research-form-card,
.research-detail-card {
  padding: 18px;
  margin-bottom: 14px;
}

.research-form-card h2,
.research-detail-card h2,
.research-modal-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.research-card-title-row {
  justify-content: space-between;
}

.research-card-title-row h2 { margin-bottom: 0; }

.research-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.research-form-grid .wide { grid-column: 1 / -1; }

.research-form-stack {
  display: grid;
  gap: 13px;
}

.research-form-grid label,
.research-form-stack label,
.research-stage-row label,
.research-risk-row label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
}

.research-project-module input,
.research-project-module select,
.research-project-module textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  background: #fff;
  color: #1f2937;
  font: inherit;
  resize: vertical;
}

.research-project-module input:focus,
.research-project-module select:focus,
.research-project-module textarea:focus {
  outline: 2px solid rgba(7, 193, 96, .14);
  border-color: #07c160;
}

.research-stage-row,
.research-risk-row {
  display: grid;
  grid-template-columns: 1.1fr .8fr .8fr 1.7fr 1fr .7fr auto;
  align-items: end;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}

.research-risk-row {
  grid-template-columns: 1fr .8fr 1.4fr 1.4fr 1fr auto;
}

.research-stage-row:last-child,
.research-risk-row:last-child { border-bottom: 0; }

.research-upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.research-upload-card div:first-child { display: grid; gap: 5px; }

.research-form-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  padding: 12px;
  background: rgba(237, 237, 237, .94);
  backdrop-filter: blur(8px);
}

.research-status { margin-right: auto; color: #667085; font-size: 13px; }
.research-status.error { color: #c2413b; }
.research-status.success { color: #078542; }

.research-detail-hero {
  padding: 20px;
  margin-bottom: 12px;
}

.research-detail-hero h2 { margin: 8px 0; font-size: 22px; }
.research-detail-hero p { margin: 6px 0; color: #667085; }

.research-detail-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 7px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff;
}

.research-detail-tabs button {
  flex: 0 0 auto;
  background: transparent;
  color: #667085;
}

.research-detail-tabs button.active {
  background: #e8f8ef;
  color: #078542;
}

.research-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.research-info-item {
  padding: 11px;
  border-radius: 7px;
  background: #f7f8fa;
}

.research-info-item span { display: block; color: #8a8f98; font-size: 12px; margin-bottom: 4px; }

.research-doc-list,
.research-entry-list,
.research-timeline {
  display: grid;
  gap: 9px;
}

.research-doc-item,
.research-entry-item,
.research-phase-item,
.research-record-item,
.research-risk-item {
  padding: 13px;
  border: 1px solid #e6e9ee;
  border-radius: 8px;
  background: #fff;
}

.research-doc-item,
.research-entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.research-entry-item img,
.research-entry-item video {
  max-width: min(360px, 100%);
  max-height: 260px;
  border-radius: 8px;
}

.research-phase-controls {
  display: grid;
  grid-template-columns: 150px 110px 1fr 1.4fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.research-inline-form {
  display: grid;
  gap: 9px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #f7f8fa;
}

.research-work-order {
  margin-bottom: 14px;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
}

.research-work-order h3,
.research-record-item h3,
.research-risk-item h3 { margin: 0 0 8px; }

.research-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .38);
}

.research-project-module.is-workbench-embedded .research-modal {
  z-index: 4000;
  padding-left: calc(18px + var(--linxi-workbench-modal-left, 0px));
  padding-right: calc(18px + var(--linxi-workbench-modal-right, 0px));
}

.research-modal-card {
  width: min(620px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
}

.wechat-list-icon.research { background: #e8f8ef; color: #07a953; }

@media (min-width: 1024px) {
  .research-project-module.is-workbench-embedded .research-project-header,
  .research-project-module.is-workbench-embedded .research-project-body {
    padding-right: var(--linxi-desktop-content-gutter, 28px);
    padding-left: var(--linxi-desktop-content-gutter, 28px);
  }
}

@media (max-width: 800px) {
  .research-project-header { padding: 8px 10px; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .research-project-header h1 { font-size: 17px; }
  .research-project-header #researchProjectSubtitle { display: none; }
  .research-header-actions { gap: 5px; }
  .research-header-actions button { min-height: 32px; padding: 0 9px; font-size: 12px; }
  .research-project-body { padding: 10px; }
  .research-toolbar { align-items: stretch; flex-direction: column; }
  .research-search { width: 100%; }
  .research-project-grid { grid-template-columns: 1fr; }
  .research-form-grid { grid-template-columns: 1fr; }
  .research-form-grid .wide { grid-column: auto; }
  .research-stage-row,
  .research-risk-row { grid-template-columns: 1fr 1fr; }
  .research-stage-row label:nth-child(4),
  .research-risk-row label:nth-child(3),
  .research-risk-row label:nth-child(4) { grid-column: 1 / -1; }
  .research-upload-card { align-items: stretch; flex-direction: column; }
  .research-info-grid { grid-template-columns: 1fr 1fr; }
  .research-phase-controls { grid-template-columns: 1fr 1fr; }
  .research-phase-controls label:nth-child(3),
  .research-phase-controls label:nth-child(4) { grid-column: 1 / -1; }
  .research-form-actions { flex-wrap: wrap; }
}

/* 研发部工作台首层：沿用项目建设会议管理的“左目录 + 右页签”信息结构。 */
.research-workspace-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #eef4f1;
}

.research-workspace-rail {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 22px 18px 18px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, .12), transparent 36%),
    linear-gradient(180deg, #126f57 0%, #0b4f3f 54%, #073f34 100%);
  color: #fff;
  box-shadow: inset -1px 0 0 rgba(1, 43, 34, .18);
}

.research-workspace-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 54px;
}

.research-workspace-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 20px rgba(0, 42, 32, .2);
}

.research-workspace-brand h1 {
  margin: 0 0 3px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-workspace-brand span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.research-workspace-back,
.research-workspace-create,
.research-workspace-settings,
.research-workspace-project,
.research-workspace-tabs button {
  border: 0;
  font: inherit;
}

.research-workspace-back {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 18px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.research-workspace-back:hover,
.research-workspace-back:focus-visible {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .13);
  outline: none;
}

.research-workspace-rail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.research-workspace-create,
.research-workspace-settings {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.research-workspace-create {
  flex: 1 1 auto;
  background: rgba(255, 255, 255, .95);
  color: #0d6b50;
  box-shadow: 0 7px 18px rgba(2, 52, 40, .18);
}

.research-workspace-settings {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.research-workspace-create:hover,
.research-workspace-create:focus-visible {
  background: #fff;
  outline: 2px solid rgba(255, 255, 255, .36);
  outline-offset: 2px;
}

.research-workspace-settings:hover,
.research-workspace-settings:focus-visible {
  background: rgba(255, 255, 255, .15);
  outline: 2px solid rgba(255, 255, 255, .28);
  outline-offset: 2px;
}

.research-workspace-rail-heading {
  margin: 18px 0 9px;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.research-workspace-projects {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(255, 255, 255, .24) transparent;
  scrollbar-width: thin;
}

.research-workspace-project {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(0, 48, 38, .2);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.research-workspace-project strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-workspace-project span {
  color: rgba(255, 255, 255, .64);
  font-size: 11px;
  line-height: 1.4;
}

.research-workspace-project:hover,
.research-workspace-project:focus-visible {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  outline: none;
}

.research-workspace-project.active {
  border-color: rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .17);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.research-workspace-project.active span {
  color: rgba(255, 255, 255, .8);
}

.research-workspace-rail-empty {
  padding: 13px 12px;
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: 11px;
  color: rgba(255, 255, 255, .64);
  font-size: 12px;
  line-height: 1.65;
}

.research-workspace-stage {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(45, 139, 105, .08), transparent 34%),
    #eef4f1;
}

.research-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 5px;
  margin: 18px 22px 0;
  padding: 5px;
  border: 1px solid #d4e0db;
  border-radius: 11px;
  background: rgba(218, 232, 226, .78);
}

.research-workspace-tabs[hidden] {
  display: none;
}

.research-workspace-tabs button {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: #52625c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.research-workspace-tabs button:hover,
.research-workspace-tabs button:focus-visible {
  background: rgba(255, 255, 255, .55);
  color: #176d53;
  outline: none;
}

.research-workspace-tabs button.active {
  background: rgba(255, 255, 255, .96);
  color: #0d7a59;
  box-shadow: 0 3px 10px rgba(26, 78, 60, .1);
}

.research-project-module .research-project-body {
  min-width: 0;
  min-height: 0;
  padding: 18px 22px 24px;
  background: transparent;
}

.research-workspace-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto 15px;
}

.research-workspace-panel-head h2 {
  margin: 0;
  color: #16211d;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
}

.research-workspace-panel-head p {
  margin: 4px 0 0;
  color: #77837e;
  font-size: 12px;
  line-height: 1.55;
}

.research-workspace-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 330px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 32px 20px;
  border: 1px solid #dfe7e3;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 26px rgba(26, 67, 53, .05);
  text-align: center;
}

.research-workspace-empty-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #e7f5ef;
  color: #14835f;
  font-size: 19px;
  font-weight: 850;
}

.research-workspace-empty h3 {
  margin: 6px 0 0;
  color: #1d2b26;
  font-size: 17px;
}

.research-workspace-empty p {
  max-width: 480px;
  margin: 0;
  color: #7a8681;
  font-size: 13px;
  line-height: 1.7;
}

.research-workspace-feature-placeholder {
  min-height: 390px;
}

@media (min-width: 1024px) {
  .research-project-module.is-workbench-embedded .research-project-body {
    padding-right: 22px;
    padding-left: 22px;
  }
}

@media (max-width: 800px) {
  .research-workspace-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .research-workspace-rail {
    max-height: 43dvh;
    padding: 12px 12px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 54, 42, .16);
  }

  .research-workspace-brand {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 42px;
  }

  .research-workspace-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .research-workspace-brand h1 {
    font-size: 16px;
  }

  .research-workspace-back {
    min-height: 38px;
    margin-top: 10px;
  }

  .research-workspace-rail-actions {
    margin-top: 8px;
  }

  .research-workspace-create,
  .research-workspace-settings {
    min-height: 38px;
  }

  .research-workspace-rail-heading {
    margin: 11px 0 7px;
  }

  .research-workspace-projects {
    grid-auto-columns: minmax(190px, 72vw);
    grid-auto-flow: column;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
  }

  .research-workspace-project {
    min-height: 58px;
  }

  .research-workspace-rail-empty {
    min-width: min(100%, 320px);
  }

  .research-workspace-tabs {
    margin: 10px 10px 0;
  }

  .research-project-module .research-project-body {
    padding: 12px 10px 18px;
  }

  .research-workspace-panel-head {
    margin-bottom: 11px;
  }

  .research-workspace-panel-head h2 {
    font-size: 18px;
  }

  .research-workspace-empty,
  .research-workspace-feature-placeholder {
    min-height: 240px;
  }
}

@media (max-width: 420px) {
  .research-workspace-tabs {
    gap: 3px;
    padding: 4px;
  }

  .research-workspace-tabs button {
    min-height: 38px;
    padding: 0 5px;
    font-size: 12px;
  }
}
