:root {
  --bg: #f5f7fb;
  --sidebar: #16243d;
  --sidebar-soft: #223654;
  --text: #1f2937;
  --muted: #667085;
  --line: #d9e0ea;
  --panel: #ffffff;
  --blue: #2266d1;
  --cyan: #15aabf;
  --green: #2e9d68;
  --amber: #d9822b;
  --red: #c94141;
  --violet: #7757c2;
  --shadow: 0 18px 45px rgba(28, 39, 62, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(9, 39, 73, 0.9), rgba(24, 93, 159, 0.82)),
    #0f2d4c;
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(4, 18, 37, 0.28);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  font-size: 28px;
  line-height: 1.2;
}

.login-card p {
  color: var(--muted);
  line-height: 1.7;
}

.login-eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: #43536a;
  font-size: 13px;
  font-weight: 700;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  color: #eef5ff;
  background:
    linear-gradient(180deg, rgba(21, 170, 191, 0.13), transparent 34%),
    var(--sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 26px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e7f0ff;
  color: var(--blue);
  font-weight: 800;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 3px;
  color: #9fb4d3;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #c7d6ed;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--sidebar-soft);
  color: #ffffff;
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #b9c9e4;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #28c76f;
}

.main {
  min-width: 0;
  padding: 24px 30px 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-bottom: 22px;
}

.topbar #page-title,
.topbar #page-desc,
.topbar > :not(.topbar-actions):not(.auth-area) {
  display: none !important;
}

.section-title-row h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.section-title-row p,
.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.data-source-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.data-source-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #d8e4f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #496178;
  font-size: 13px;
}

.topbar-actions,
.filter-actions,
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(33, 47, 76, 0.05);
}

.auth-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.auth-area select {
  width: 170px;
  min-height: 30px;
  border: 0;
  background: #f7fbff;
  font-weight: 700;
}

.auth-badge {
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1f5ea8;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  border-radius: 7px;
  border: 1px solid transparent;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.primary-button {
  min-height: 38px;
  padding: 0 15px;
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  min-height: 38px;
  padding: 0 15px;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
  border-color: #c9d6e8;
  background: #f7fbff;
  color: #1758b5;
}

.text-button.approve {
  border-color: #b8dec8;
  background: #eef9f2;
  color: #24734e;
}

.text-button.danger {
  border-color: #efc4c4;
  background: #fff4f4;
  color: #ad3434;
}

.text-button.restricted,
.primary-button.restricted,
.secondary-button.restricted {
  border-color: #d8dfe9;
  background: #f4f6f9;
  color: #78869a;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  font-size: 18px;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 112px;
  min-width: 0;
  padding: 17px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(27, 39, 67, 0.06);
}

.metric-card:nth-child(2) {
  border-left-color: var(--amber);
}

.metric-card:nth-child(3) {
  border-left-color: var(--cyan);
}

.metric-card:nth-child(4) {
  border-left-color: var(--green);
}

.metric-card:nth-child(5) {
  border-left-color: var(--cyan);
}

.metric-card:nth-child(6) {
  border-left-color: var(--red);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 1.65vw, 31px);
  line-height: 1.12;
}

.metric-card small {
  display: block;
  margin-top: 10px;
  color: #7c8aa0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(320px, 0.9fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel,
.table-panel,
.filter-bar,
.compact-stat,
.progress-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(33, 47, 76, 0.06);
}

.panel {
  padding: 20px;
}

.panel-head,
.section-title-row,
.subsection-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-head h3,
.subsection h3 {
  margin: 0;
  font-size: 18px;
}

.panel-badge,
.result-count,
.current-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1f5ea8;
  font-size: 13px;
  white-space: nowrap;
}

.panel-badge.danger {
  background: #fff2f2;
  color: var(--red);
}

.chart-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 20px;
}

.legend {
  display: grid;
  gap: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e6ecf5;
  border-radius: 8px;
  background: #fbfcff;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.warning-panel {
  min-height: 376px;
}

.warning-placeholder {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed #e0b5b5;
  border-radius: 8px;
  background: #fff8f8;
}

.warning-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
}

.warning-placeholder strong,
.warning-placeholder span {
  display: block;
}

.warning-placeholder span {
  margin-top: 5px;
  color: var(--muted);
}

.warning-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.warning-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--amber);
  border-radius: 7px;
  background: #fffaf2;
  color: #5f4120;
}

.type-distribution {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.type-bar-item {
  display: grid;
  gap: 8px;
}

.type-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #415067;
  font-size: 13px;
}

.type-bar-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-bar-head strong {
  flex: 0 0 auto;
  color: var(--text);
}

.type-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3fb;
}

.type-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e9d68, #15aabf);
}

.unit-stage-panel {
  margin-bottom: 18px;
}

.unit-stage-matrix {
  overflow: auto;
  margin-top: 18px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
}

.unit-stage-head,
.unit-stage-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) repeat(5, minmax(86px, 0.75fr));
  min-width: 680px;
  align-items: center;
}

.unit-stage-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3fb;
  color: #516073;
  font-size: 13px;
  font-weight: 700;
}

.unit-stage-head span,
.unit-stage-row strong,
.unit-stage-row span,
.unit-stage-row em {
  padding: 12px 13px;
  border-bottom: 1px solid #e7edf5;
}

.unit-stage-row {
  background: #ffffff;
}

.unit-stage-row:nth-child(even) {
  background: #fbfcff;
}

.unit-stage-row strong {
  min-width: 0;
  overflow: hidden;
  color: #24324a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-stage-row span,
.unit-stage-row em {
  color: #2f4058;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.unit-stage-row em {
  color: var(--blue);
  background: #f7fbff;
}

.section-title-row {
  margin-bottom: 16px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(142px, 1fr)) minmax(220px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #4c596b;
  font-size: 13px;
}

select,
input {
  width: 100%;
  height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
}

select {
  padding: 0 10px;
}

input {
  padding: 0 12px;
}

.table-panel {
  overflow: auto;
}

.completion-table-panel {
  overflow-x: auto;
  overflow-y: hidden;
}

.todo-table-panel {
  overflow-x: auto;
  overflow-y: hidden;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: fixed;
}

.completion-table {
  min-width: 1560px;
}

.todo-table {
  min-width: 1500px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 126px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 188px;
}

th:nth-child(3),
td:nth-child(3) {
  width: 112px;
}

th:nth-child(4),
td:nth-child(4) {
  width: 132px;
}

th:nth-child(5),
td:nth-child(5) {
  width: 150px;
}

th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7) {
  width: 116px;
}

th:nth-child(8),
td:nth-child(8) {
  width: 150px;
}

th:nth-child(9),
td:nth-child(9) {
  width: 156px;
}

.completion-table th:nth-child(1),
.completion-table td:nth-child(1) {
  width: 150px;
}

.completion-table th:nth-child(2),
.completion-table td:nth-child(2) {
  width: 210px;
}

.completion-table th:nth-child(3),
.completion-table td:nth-child(3) {
  width: 130px;
}

.completion-table th:nth-child(4),
.completion-table td:nth-child(4) {
  width: 140px;
}

.completion-table th:nth-child(5),
.completion-table td:nth-child(5),
.completion-table th:nth-child(6),
.completion-table td:nth-child(6),
.completion-table th:nth-child(7),
.completion-table td:nth-child(7) {
  width: 150px;
}

.completion-table th:nth-child(8),
.completion-table td:nth-child(8),
.completion-table th:nth-child(9),
.completion-table td:nth-child(9) {
  width: 120px;
}

.completion-table th:nth-child(10),
.completion-table td:nth-child(10) {
  width: 150px;
}

.completion-table th:nth-child(11),
.completion-table td:nth-child(11) {
  width: 110px;
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -10px 0 18px rgba(33, 47, 76, 0.06);
  text-align: center;
}

.completion-table th:nth-child(11) {
  z-index: 2;
  background: #edf3fb;
}

.todo-table th:nth-child(1),
.todo-table td:nth-child(1) {
  width: 145px;
}

.todo-table th:nth-child(2),
.todo-table td:nth-child(2) {
  width: 220px;
}

.todo-table th:nth-child(3),
.todo-table td:nth-child(3) {
  width: 130px;
}

.todo-table th:nth-child(4),
.todo-table td:nth-child(4) {
  width: 150px;
}

.todo-table th:nth-child(5),
.todo-table td:nth-child(5) {
  width: 165px;
}

.todo-table th:nth-child(6),
.todo-table td:nth-child(6),
.todo-table th:nth-child(7),
.todo-table td:nth-child(7) {
  width: 120px;
}

.todo-table th:nth-child(8),
.todo-table td:nth-child(8) {
  width: 150px;
}

.todo-table th:nth-child(9),
.todo-table td:nth-child(9) {
  width: 300px;
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -10px 0 18px rgba(33, 47, 76, 0.06);
  text-align: center;
}

.todo-table th:nth-child(9) {
  z-index: 2;
  background: #edf3fb;
}

thead {
  background: #edf3fb;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #e7edf5;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #516073;
  font-size: 13px;
  font-weight: 700;
}

td {
  font-size: 14px;
}

tbody tr:hover {
  background: #f8fbff;
}

.name-cell {
  font-weight: 700;
}

.number-cell {
  color: #47617f;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  white-space: nowrap;
}

.money-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.tag.yes {
  background: #eaf7f0;
  color: #24734e;
}

.tag.no {
  background: #f1f4f8;
  color: #69778c;
}

.stage-tag {
  background: #eef5ff;
  color: #1f5ea8;
}

.stage-tag.warning {
  background: #fff4e6;
  color: #92550f;
}

.stage-tag.active {
  background: #e9f7fb;
  color: #0f7180;
}

.stage-tag.success {
  background: #eaf7f0;
  color: #24734e;
}

.stage-tag.done {
  background: #f2effc;
  color: #6042a6;
}

.action-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.completion-table .action-group {
  justify-content: center;
}

.todo-table .action-group {
  justify-content: center;
}

.empty-row td {
  padding: 40px 12px;
  color: var(--muted);
  text-align: center;
}

.compact-stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 14px;
  margin-bottom: 18px;
}

.compact-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px;
}

.compact-stat span {
  color: var(--muted);
}

.compact-stat strong {
  color: var(--blue);
  font-size: 28px;
}

.compact-stat small {
  color: var(--muted);
}

.subsection {
  margin-top: 22px;
}

.subsection-head {
  margin-bottom: 10px;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(260px, 1fr) minmax(150px, 0.5fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(33, 47, 76, 0.06);
}

.history-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.history-title-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta,
.history-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.history-meta span {
  color: var(--muted);
  font-size: 13px;
}

.history-flags {
  margin-top: 0;
}

.history-operator {
  display: grid;
  gap: 4px;
}

.history-operator span,
.history-operator small {
  color: var(--muted);
  font-size: 12px;
}

.history-operator strong {
  font-size: 14px;
}

.history-actions {
  justify-content: flex-end;
}

.current-pill {
  background: #eaf7f0;
  color: #24734e;
}

.completion-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.completion-kpi {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(27, 39, 67, 0.05);
}

.completion-kpi span,
.completion-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.completion-kpi strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.2;
}

.completion-board {
  margin-bottom: 16px;
}

.quarter-bars {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.quarter-year-row {
  display: grid;
  gap: 10px;
}

.quarter-year-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #43536a;
  font-size: 13px;
}

.quarter-year-head strong {
  color: var(--text);
  font-size: 14px;
}

.quarter-year-head span {
  color: var(--muted);
}

.quarter-year-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quarter-bar-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #fbfcff;
}

.quarter-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.quarter-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.quarter-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quarter-bar-meta strong {
  font-size: 13px;
}

.quarter-bar-meta span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.progress-strip {
  display: none;
}

.major-submit-layout,
.major-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.major-side,
.meeting-rail {
  display: grid;
  gap: 18px;
}

.topic-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.inline-actions {
  padding: 0;
  border: 0;
}

.linked-project-card {
  display: grid;
  gap: 6px;
}

.linked-project-card strong {
  font-size: 16px;
}

.linked-project-card span,
.linked-project-card small,
.linked-project-meta {
  color: var(--muted);
}

.linked-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}

.topic-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.topic-card,
.topic-record-card,
.topic-management-item,
.meeting-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(27, 39, 67, 0.05);
}

.topic-card {
  display: grid;
  gap: 12px;
  min-height: 184px;
  padding: 15px;
}

.topic-card-head,
.topic-card-body,
.topic-card-foot {
  display: grid;
  gap: 8px;
}

.topic-card-head strong {
  min-height: 42px;
  line-height: 1.35;
}

.topic-card-body span,
.topic-card-foot small {
  color: var(--muted);
  font-size: 12px;
}

.topic-card-foot {
  align-self: end;
}

.topic-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.topic-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.topic-status.warning {
  background: #fff4e6;
  color: #92550f;
}

.topic-status.active {
  background: #eef5ff;
  color: #1f5ea8;
}

.topic-status.success {
  background: #eaf7f0;
  color: #24734e;
}

.topic-status.danger {
  background: #fff2f2;
  color: var(--red);
}

.topic-record-list,
.topic-management-list,
.meeting-list,
.topic-log-list {
  display: grid;
  gap: 10px;
}

.topic-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
}

.topic-record-card strong,
.topic-record-card span {
  display: block;
}

.topic-record-card span,
.topic-record-progress small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.topic-record-progress {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.topic-management-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.topic-management-item input {
  width: 16px;
  height: 16px;
}

.topic-management-item strong,
.topic-management-item span {
  display: block;
}

.topic-management-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.meeting-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.meeting-card-head,
.meeting-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meeting-card-head span,
.meeting-topic-row span {
  color: var(--muted);
  font-size: 12px;
}

.meeting-topic-row {
  padding: 9px 0;
  border-top: 1px solid #edf2f8;
}

.detail-text {
  margin: 0;
  color: #4c596b;
  line-height: 1.7;
}

.topic-log-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f8;
}

.topic-log-row span,
.topic-log-row small {
  color: var(--muted);
  font-size: 12px;
}

.progress-item {
  padding: 15px;
}

.progress-item strong {
  display: block;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.process-panel {
  margin-top: 18px;
}

.process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.process-image-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f8fbff;
}

.process-image-wrap img {
  display: block;
  width: 100%;
  min-width: 860px;
  height: auto;
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.stage-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 3px;
  padding: 10px;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #fbfcff;
}

.stage-item span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: #1f5ea8;
  font-size: 12px;
  font-weight: 800;
  grid-row: span 2;
}

.stage-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-item small {
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.34);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  display: flex;
  flex-direction: column;
  width: 760px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 0.2s ease;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-head span {
  color: var(--muted);
  font-size: 13px;
}

.drawer-head h2 {
  margin: 6px 0 0;
  font-size: 21px;
}

.drawer-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 20px 22px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
}

.detail-row span {
  color: var(--muted);
}

.detail-section {
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  background: #fbfcff;
  padding: 15px;
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-section-head h3 {
  margin: 0;
}

.detail-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}

.stage-progress-card {
  padding: 12px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #f7fbff;
}

.stage-current-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #dfe7f2;
}

.stage-current-summary span {
  color: var(--muted);
  font-size: 13px;
}

.stage-current-summary strong {
  color: var(--blue);
  font-size: 16px;
}

.stage-current-summary small {
  color: #24734e;
  background: #eaf7f0;
  border-radius: 999px;
  padding: 4px 9px;
}

.stage-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 7px;
}

.stage-step {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 3px;
  align-items: start;
  min-height: 56px;
  padding: 8px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
  color: #7b8798;
  text-align: left;
}

.stage-step span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #dfe7f2;
  color: #596779;
  font-size: 12px;
  font-weight: 800;
  grid-row: span 2;
}

.stage-step strong {
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.stage-step small {
  color: var(--muted);
  font-size: 11px;
}

.stage-step em {
  grid-column: 2;
  color: #52657d;
  font-size: 11px;
  font-style: normal;
}

.stage-step.done {
  border-color: #cbead8;
  background: #f4fbf7;
}

.stage-step.done span {
  background: var(--green);
  color: #ffffff;
}

.stage-step.current {
  border-color: #9dc0f4;
  background: #eef5ff;
}

.stage-step.current span {
  background: var(--blue);
  color: #fff;
}

.stage-step.current strong {
  color: var(--blue);
}

.major-flow-summary {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dce6f2;
}

.major-flow-summary .detail-section-head {
  margin-bottom: 10px;
}

.major-flow-summary .detail-section-head h3 {
  font-size: 14px;
}

.major-flow-name {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.major-flow-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.major-flow-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 9px;
  row-gap: 3px;
  align-items: start;
  min-height: 62px;
  padding: 9px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
  color: #687386;
}

.major-flow-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #dfe7f2;
  color: #596779;
  font-size: 12px;
  font-weight: 800;
  grid-row: span 2;
}

.major-flow-step strong {
  min-width: 0;
  color: #25324a;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.major-flow-step small {
  color: var(--muted);
  font-size: 11px;
}

.major-flow-step em {
  grid-column: 2;
  color: #52657d;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.major-flow-step.done {
  border-color: #bee7ce;
  background: #f3fbf6;
}

.major-flow-step.done span {
  background: var(--green);
  color: #ffffff;
}

.major-flow-step.active {
  border-color: #add0f8;
  background: #f0f7ff;
}

.major-flow-step.active span {
  background: var(--blue);
  color: #ffffff;
}

.major-flow-step.failed {
  border-color: #f5c3bd;
  background: #fff6f4;
}

.major-flow-step.failed span {
  background: #d84f3a;
  color: #ffffff;
}

.empty-state.compact {
  min-height: auto;
  padding: 12px;
}

.timeline-section {
  background: #ffffff;
}

.timeline-list {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -2px;
  left: 7px;
  width: 1px;
  background: #d9e3f0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 10px;
  border: 3px solid #d8e4f4;
  border-radius: 999px;
  background: #ffffff;
}

.timeline-item.latest .timeline-dot {
  border-color: var(--blue);
  background: var(--blue);
}

.timeline-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e2e9f3;
  border-radius: 8px;
  background: #f8fbff;
}

.timeline-item.latest .timeline-card {
  border-color: #b9d0f4;
  background: #eef5ff;
}

.timeline-top,
.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-top span {
  flex: 0 0 auto;
  color: #1f5ea8;
  font-size: 13px;
}

.timeline-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.investment-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.investment-record-item {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #e2e9f3;
  border-radius: 8px;
  background: #ffffff;
}

.investment-record-item strong {
  color: var(--text);
  font-size: 14px;
}

.investment-record-item span {
  color: #24734e;
  font-weight: 700;
}

.investment-record-item small {
  color: var(--muted);
}

.drawer-actions {
  justify-content: flex-end;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 28px;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(980px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.compact-modal-card {
  width: min(620px, 94vw);
}

.notice-modal-card {
  width: min(760px, 94vw);
}

#notice-modal {
  z-index: 32;
  background: rgba(15, 23, 42, 0.38);
}

.notice-warning .modal-head {
  background: #fff8ed;
}

.notice-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 20px 22px;
}

.notice-body p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

.notice-list {
  display: grid;
  gap: 10px;
  max-height: 42vh;
  overflow: auto;
}

.notice-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 5px 12px;
  padding: 12px 14px;
  border: 1px solid #f0d6ab;
  border-radius: 8px;
  background: #fffaf2;
}

.notice-item strong {
  color: #27364f;
  font-size: 14px;
}

.notice-item span {
  justify-self: end;
  color: #9a5a11;
  font-size: 13px;
  font-weight: 700;
}

.notice-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head span {
  color: var(--muted);
  font-size: 13px;
}

.modal-head h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.project-form {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 20px 22px;
}

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

.compact-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.investment-form {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 20px 22px;
}

.investment-form-hint {
  padding: 12px 14px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 13px;
  line-height: 1.6;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  padding: 10px 12px;
  border: 1px solid #cfd8e6;
  border-radius: 7px;
  color: var(--text);
  font: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 20px;
  border: 1px dashed #d9e0ea;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcff;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  min-width: 220px;
  padding: 12px 15px;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1280px) {
  body {
    min-width: 1040px;
  }

  .metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .process-layout {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .history-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .history-actions {
    justify-content: flex-start;
  }
}
