﻿:root {
  --primary: #1c64f2;
  --line: #d9dee8;
  --soft: #f5f7fb;
  --text: #1c2230;
  --muted: #657083;
  --done: #16a34a;
  --doing: #1677ff;
  --todo: #98a2b3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #eef2f9;
  line-height: 1.5;
}

.page {
  height: 100vh;
  display: grid;
  grid-template-rows: 64px 1fr;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #20b5b8, #2f76e5);
  color: #fff;
  font-weight: 700;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  color: #1f4d9f;
}

.logo-text span {
  color: #3b5c8f;
  font-size: 13px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dce2ef;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-menu {
  position: relative;
}

.menu-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 136px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 30;
}

.menu-item {
  display: block;
  height: 36px;
  line-height: 20px;
  padding: 8px 10px;
  color: #344054;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.menu-item:hover {
  background: #f2f6ff;
  color: #1d4ed8;
}

.panel-page {
  min-height: 100vh;
  background: #f3f4f6;
}

.panel-page.login-page {
  background-image: url("壁纸04.webp");
  background-repeat: repeat;
  background-size: auto;
  background-position: center;
}

.panel-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 36px;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.login-layout {
  width: 100%;
  max-width: 420px;
  margin: 0;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  /* 毛玻璃层：稍微加一点底色，让效果更明显 */
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.login-hero {
  position: relative;
  background-image: url("壁纸04.webp");
  background-repeat: repeat;
  background-size: auto;
  background-position: center;
}

.login-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
}

@media (max-width: 768px) {
  .login-page {
    padding: 16px 12px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .login-hero {
    display: none;
  }
}

.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  padding: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* 登录页标题居中 */
.login-card .panel-title {
  text-align: center;
}

/* 登录页：让输入框和登录按钮也融入透明玻璃层 */
.login-card .text-input {
  background: transparent; /* 去掉内侧白色底，完全透出背景 */
  border-color: rgba(255, 255, 255, 0.6);
  color: #f9fafb;
}

/* 登录页：让输入框和登录按钮也融入透明玻璃层 */
.login-card .text-input {
  background: transparent; /* 去掉内侧白色底，完全透出背景 */
  border-color: rgba(255, 255, 255, 0.6);
  color: #f9fafb;
}

.login-card .text-input::placeholder {
  color: rgba(249, 250, 251, 0.7);
}

.login-card label,
.login-card .panel-title,
.login-card .login-tip {
  color: #f9fafb;
}

.login-card .form-error {
  color: #fecaca;
}

.login-card .btn.primary.login-btn {
  background: rgba(59, 130, 246, 0.9);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.55);
}

.login-card .btn.primary.login-btn:hover {
  background: rgba(37, 99, 235, 0.98);
}

.login-logo {
  justify-content: center;
  margin-bottom: 12px;
}

.login-form-row {
  grid-template-columns: 74px 1fr;
}

.login-btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

/* 登录页：记住密码一行 */
.login-extra-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 4px 0 6px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e5e7eb;
  cursor: pointer;
}

.remember-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(248, 250, 252, 0.7);
  background: rgba(15, 23, 42, 0.3);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.remember-checkbox:checked {
  background: linear-gradient(135deg, #4f46e5, #22c55e);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(248, 250, 252, 0.8);
}

.remember-checkbox::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 2px solid #f9fafb;
  border-top: none;
  border-left: none;
  transform: translateY(-1px) rotate(45deg);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.remember-checkbox:checked::after {
  opacity: 1;
}

/* 登录页整体细节：简洁版 */
.login-card .login-extra-row {
  justify-content: flex-start;
  margin-top: 2px;
}

.login-card .remember-label {
  gap: 6px;
  font-size: 13px;
  color: rgba(249, 250, 251, 0.9);
}

.login-card .remember-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.login-card .remember-checkbox:hover {
  box-shadow: none;
}

.login-card .remember-checkbox:checked {
  background: #3b82f6;
  border-color: #bfdbfe;
}

.login-card .remember-checkbox::after {
  width: 9px;
  height: 9px;
}

/* 登录标题简洁居中 */
.login-card .panel-title {
  text-align: center;
  letter-spacing: 0.06em;
  text-shadow: none;
}

/* 登录按钮简洁渐变 */
.login-card .btn.primary.login-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.6);
}

.login-card .btn.primary.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.8);
}

.login-card .btn.primary.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.8);
}
}
.form-error {
  margin: 4px 0 12px;
  color: #b42318;
  font-size: 13px;
}

.form-ok {
  margin: 4px 0 12px;
  color: #046c4e;
  font-size: 13px;
}

.tip-text {
  color: #667085;
  font-size: 13px;
  align-self: center;
}

.preview-box {
  margin: 0;
  max-height: 62vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  background: #f8fafc;
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
}

.preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.preview-modal[hidden] {
  display: none !important;
}

.preview-dialog {
  width: min(1000px, 96vw);
  max-height: 88vh;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d6e2f5;
  box-shadow: 0 20px 50px rgba(2, 28, 84, 0.2);
  display: grid;
  grid-template-rows: auto 1fr;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5edf8;
}

.preview-body {
  padding: 12px 14px 14px;
  overflow: auto;
  min-height: 140px;
}

.preview-frame {
  width: 100%;
  height: 62vh;
  border: 1px solid #d6e2f5;
  border-radius: 8px;
  background: #fff;
}

.admin-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 220px 1fr;
}

.admin-sidebar {
  border-right: 1px solid #d6e1f3;
  background: #f3f6fc;
  padding: 14px 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-nav-btn {
  display: block;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #4b5563;
  font-size: 14px;
  text-align: left;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.admin-nav-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.admin-nav-btn.active {
  background: #e0edff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 600;
}

.admin-sidebar {
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 14px 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 220px 1fr;
}

.admin-content {
  background: #f3f4f6;
  padding: 12px;
}

.admin-frame {
  width: 100%;
  height: calc(100vh - 80px);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.login-tip {
  margin: 12px 0 0;
  color: #475467;
  font-size: 13px;
}

.panel-card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid #d8e3f8;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(18, 54, 120, 0.08);
}

/* 登录页覆盖 panel-card 的默认白色背景，保持完全透明玻璃效果 */
.panel-card.login-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 22px;
  letter-spacing: 0.4px;
  color: #111827;
  font-weight: 600;
}

.panel-subtitle {
  margin: 26px 0 12px;
  font-size: 16px;
  color: #334155;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.form-row label {
  color: #304566;
  font-weight: 600;
}

.text-input {
  height: 38px;
  border: 1px solid #c8d6ef;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #21314d;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
  outline: none;
  border-color: #79a7ff;
  box-shadow: 0 0 0 3px rgba(28, 100, 242, 0.14);
}

.text-area {
  width: 100%;
  border: 1px solid #c8d6ef;
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: #21314d;
  resize: vertical;
  line-height: 1.55;
  font-family: inherit;
}

.text-area:focus {
  outline: none;
  border-color: #79a7ff;
  box-shadow: 0 0 0 3px rgba(28, 100, 242, 0.14);
}

input[type="file"].text-input {
  height: 40px;
  padding: 6px 10px;
  cursor: pointer;
  color: #21314d;
}

/* 美化文件选择按钮 */
input[type="file"].text-input::file-selector-button {
  padding: 0 14px;
  height: 28px;
  margin-right: 10px;
  border-radius: 6px;
  border: 1px solid #c8d6ef;
  background: linear-gradient(135deg, #1c64f2, #2458c8);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.12s ease;
}

input[type="file"].text-input::file-selector-button:hover {
  border-color: #9ab8f4;
  box-shadow: 0 6px 16px rgba(28, 100, 242, 0.18);
  transform: translateY(-1px);
}

/* 兼容旧版 WebKit */
input[type="file"].text-input::-webkit-file-upload-button {
  padding: 0 14px;
  height: 28px;
  margin-right: 10px;
  border-radius: 6px;
  border: 1px solid #c8d6ef;
  background: linear-gradient(135deg, #1c64f2, #2458c8);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    transform 0.12s ease;
}

input[type="file"].text-input::-webkit-file-upload-button:hover {
  border-color: #9ab8f4;
  box-shadow: 0 6px 16px rgba(28, 100, 242, 0.18);
  transform: translateY(-1px);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  height: 36px;
  border: 1px solid #c8d6ef;
  border-radius: 999px;
  background: #fff;
  color: #2b3d5e;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  border-color: #9ab8f4;
  box-shadow: 0 6px 16px rgba(28, 100, 242, 0.12);
  transform: translateY(-1px);
}

.btn.primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn.danger {
  border-color: #f8c6c3;
  color: #b42318;
  background: #fff7f7;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.methods-table-wrap {
  overflow-x: visible;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid #e6edf8;
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

/* 全局隐藏列表中的ID列（约定为第1列） */
.table th:first-child,
.table td:first-child {
  display: none;
}

/* 部门管理需要显示首列（部门名称+树形展开） */
.departments-table th:first-child,
.departments-table td:first-child {
  display: table-cell;
}

/* Mobile Adaptation */
@media (max-width: 768px) {
  .topbar {
    padding: 0 10px;
    height: 56px;
  }

  .logo-img {
    height: 34px;
  }

  .account {
    font-size: 13px;
    gap: 6px;
  }

  .avatar {
    width: 28px;
    height: 28px;
  }

  .menu-panel {
    width: 150px;
  }

  .page {
    grid-template-rows: 56px 1fr;
  }

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 8px;
    overflow-x: auto;
  }

  .module-list {
    display: flex;
    gap: 8px;
    min-width: max-content;
  }

  .module {
    min-width: 88px;
    padding: 8px 6px;
  }

  .workspace {
    padding: 8px;
    gap: 8px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .flow-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .left-panel {
    grid-template-rows: auto auto;
  }

  .panel-main {
    padding: 10px;
  }

  .panel-card {
    padding: 12px;
    border-radius: 10px;
  }

  .panel-title {
    font-size: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .btn-row {
    gap: 6px;
  }

  .btn {
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 760px;
    font-size: 13px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 56px);
  }

  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid #d6e1f3;
    padding: 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    align-items: center;
  }

  .admin-nav-btn {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .admin-content {
    padding: 8px;
  }

  .admin-frame {
    height: calc(100vh - 130px);
    border-radius: 8px;
  }

  .preview-modal {
    padding: 10px;
  }

  .preview-dialog {
    width: 100%;
    max-height: 92vh;
  }

  .preview-header,
  .preview-body {
    padding: 10px;
  }

  .preview-frame {
    height: 58vh;
  }

  .tree-name-wrap {
    gap: 2px;
  }

  .tree-prefix {
    min-width: 20px;
    font-size: 12px;
  }
}

.table th {
  background: #f9fafb;
  color: #4b5563;
  font-weight: 600;
}

.table tbody tr:nth-child(even) {
  background: #fafcff;
}

.table tbody tr:hover {
  background: #eef5ff;
}

.methods-table {
  font-size: 13px;
}

.methods-table th,
.methods-table td {
  padding: 8px 6px;
}

.methods-table td {
  vertical-align: top;
}

.methods-table th:nth-child(1),
.methods-table td:nth-child(1) {
  width: 22px;
  max-width: 22px;
  text-align: center;
  white-space: nowrap;
}

.methods-table th:nth-child(2),
.methods-table td:nth-child(2) {
  min-width: 120px;
}

.methods-table th:nth-child(3),
.methods-table td:nth-child(3) {
  min-width: 140px;
}

.methods-table th:nth-child(4),
.methods-table td:nth-child(4) {
  min-width: 220px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 180px;
}

.methods-table th:nth-child(6),
.methods-table td:nth-child(6) {
  min-width: 90px;
}

.methods-table th:nth-child(7),
.methods-table td:nth-child(7) {
  min-width: 70px;
}

.methods-table th:nth-child(8),
.methods-table td:nth-child(8) {
  min-width: 130px;
  text-align: center;
}

.methods-table .btn-row {
  justify-content: center;
}

.methods-table .text-area {
  width: 100%;
}

.methods-table input.text-input,
.methods-table select.text-input {
  width: 100%;
}

.methods-table .btn {
  min-width: 64px;
}

.methods-table .btn.danger {
  margin-left: 4px;
}

.methods-table-wrap {
  overflow-x: visible;
}

.methods-table td {
  vertical-align: top;
}

.methods-table th:nth-child(4),
.methods-table td:nth-child(4) {
  min-width: 210px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table td {
  vertical-align: top;
}

.methods-table th:nth-child(4),
.methods-table td:nth-child(4) {
  min-width: 210px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table td {
  vertical-align: top;
}

.methods-table th:nth-child(4),
.methods-table td:nth-child(4) {
  min-width: 210px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.methods-table th:nth-child(5),
.methods-table td:nth-child(5) {
  min-width: 170px;
}

.avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dce2ef;
  background-size: cover;
  background-position: center;
}

.inline-form {
  display: inline;
}

.admin-subcard {
  margin: 0;
  padding: 12px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.admin-create-row {
  margin-bottom: 12px;
}

.admin-inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.tree-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tree-prefix {
  min-width: 28px;
  color: #6b7280;
  font-family: "Consolas", "Courier New", monospace;
  white-space: pre;
  user-select: none;
}

.tree-toggle-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #d4dff2;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  line-height: 1;
}

.tree-toggle-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.dept-level-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #d6e2f5;
  background: #f5f8ff;
  color: #475467;
  font-size: 12px;
}

.admin-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.admin-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-workflow-selector {
  width: 420px;
  max-width: 100%;
  margin-bottom: 12px;
}

.body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 0;
  gap: 0;
}

.sidebar {
  border-right: 1px solid #e0e7ff;
  background: #f3f6ff;
  padding: 16px 10px;
  overflow-y: auto;
  box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.02);
}

.module-list {
  display: grid;
  gap: 8px;
}

.module {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 6px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.module::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 0.18s ease;
}

.module:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.module.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.module.active::before {
  background: #2563eb;
}

/* 模块点击轻微缩放动效 */
.module-click {
  transform: scale(0.97);
}

.workspace {
  padding: 16px 18px 16px 14px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.toolbar {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
}

.role-box,
.flow-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 58px;
}

.role-box {
  padding: 10px 10px;
}

#roleSelect {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  font-size: 13px;
  color: #111827;
  background-color: #f9fafb;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  appearance: none;
}

#roleSelect:focus {
  outline: none;
  border-color: #79a7ff;
  box-shadow: 0 0 0 3px rgba(28, 100, 242, 0.14);
  background-color: #ffffff;
}

.flow-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  overflow: hidden;
}

.flow-title {
  white-space: nowrap;
  font-weight: 600;
}

.flow-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.flow-node {
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.flow-node:hover {
  background: #e5e7eb;
  color: #111827;
}

.flow-node.active {
  background: #e0edff;
  color: #1d4ed8;
  font-weight: 600;
}

.flow-node.active.completed {
  background: #ecfdf3;
  color: #15803d;
}

/* 当前流程切换轻微闪动 */
.flow-node-pulse {
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* 当前工作方法切换高亮 */
.method-item-highlight {
  background: #f3f4ff;
}

.sep {
  color: #bcc3d1;
}

.content-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.left-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 230px 1fr;
  gap: 10px;
}

.methods,
.keypoints {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  padding: 14px 18px;
  font-size: 13px;
  overflow-y: auto;
}

.keypoints {
  display: flex;
  flex-direction: column;
}

.methods h2,
.keypoints h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.method-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.method-item {
  padding: 4px 0;
}

.method-btn {
  border: none;
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  width: 100%;
}

.method-item.done .method-btn {
  color: var(--done);
}

.method-item.doing .method-btn {
  color: var(--doing);
  font-weight: 600;
}

.method-item.todo .method-btn {
  color: var(--todo);
}

.method-item.active .method-btn {
  background: #e0edff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
}

#keypointDesc {
  line-height: 1.85;
  font-size: 13px;
  margin: 0;
}

.output-title {
  margin-top: 20px;
  font-weight: 700;
  font-size: 13px;
}

.keypoint-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
}

.action-btn {
  min-width: 58px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #344054;
  cursor: pointer;
}

.action-btn.start {
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.action-btn.complete {
  color: #046c4e;
  border-color: #a7f3d0;
}

.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.chat-panel {
  min-height: 0;
  display: block;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.dify-host {
  min-height: 0;
  height: 100%;
  padding: 0;
  background: var(--soft);
  position: relative;
  overflow: hidden;
}

.dify-tip {
  font-size: 13px;
  color: var(--muted);
}

#dify-chatbot-bubble-button {
  display: none !important;
}

#dify-chatbot-bubble-window {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

@media (max-width: 1200px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .left-panel {
    grid-template-rows: auto auto;
  }
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.profile-main {
  display: flex;
  justify-content: center;
}

.profile-card {
  width: 100%;
  max-width: 520px;
  margin: 24px auto 0;
}

.profile-card .panel-title {
  text-align: center;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dce2ef;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.profile-username {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.profile-email {
  font-size: 13px;
  color: #6b7280;
}

.profile-form {
  max-width: 420px;
  margin: 0 auto;
}

.profile-form .btn-row {
  justify-content: center;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .panel-main {
    padding: 14px;
  }

  .panel-card {
    padding: 14px;
    border-radius: 10px;
  }

  .panel-title {
    font-size: 18px;
  }

  .panel-subtitle {
    font-size: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* 顶部导航文字按钮化 */
.top-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  color: #344054;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.top-link + .top-link {
  margin-left: 8px;
}

.top-link:hover {
  background: #eef4ff;
  color: #1d4ed8;
  border-color: #c7d7fe;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

/* 侧边栏模块 hover 与选中效果加强 */
.module {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  padding: 10px 4px;
  font-size: 13px;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.module:hover {
  border-color: #b4c5f7;
  background: #f5f7ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.module.active {
  border-color: #2563eb;
  background: #e0ebff;
  color: #163f9d;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

/* 聊天面板背景轻微渐变 */
.chat-panel {
  min-height: 0;
  display: block;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

/* 卡片边框和阴影稍微加强 */
.panel-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* 去掉高光条，保持纯扁平卡片 */

/* 登录卡片视觉加强 */
.login-card {
  padding-top: 26px;
  padding-bottom: 24px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
}

/* 登录页轻微动效：初次进入轻轻上浮 */
.login-page .login-card {
  transform: translateY(8px);
  opacity: 0;
  animation: login-fade-up 0.4s ease-out forwards;
}

@keyframes login-fade-up {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 自定义文件上传按钮，仅保留中文按钮 */
.file-input-wrapper {
  display: inline-flex;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-input-button {
  /* 复用通用按钮风格，可按需微调 */
}

/* Mobile action menu for table operation column */
.mobile-action-toggle {
  display: none;
}

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

@media (max-width: 768px) {
  .table td.btn-row {
    position: relative;
  }

  .mobile-action-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #c8d6ef;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 12px;
    cursor: pointer;
  }

  .mobile-action-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    min-width: 130px;
    padding: 6px;
    border: 1px solid #d5e1f4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .mobile-action-menu.open {
    display: flex;
  }

  .mobile-action-menu .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-action-menu .inline-form {
    display: block;
  }

  .mobile-action-menu .inline-form .btn {
    width: 100%;
  }
}

/* Home page mobile layout override (append at end to win cascade) */
@media (max-width: 768px) {
  .page {
    min-height: 100dvh;
  }

  .topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .logo-img {
    height: 42px;
    width: auto;
  }

  .top-actions {
    margin-left: auto;
  }

  .page > .body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    min-height: 0;
  }

  .page > .body > .sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid #dbe3f4;
    padding: 8px 4px 10px;
    overflow-x: auto;
  }

  .page > .body > .sidebar .module-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 2px;
  }

  .page > .body > .sidebar .module {
    flex: 0 0 auto;
    min-width: 96px;
    white-space: nowrap;
    padding: 8px 10px;
  }

  .page > .body > .workspace {
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .page > .body > .workspace .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page > .body > .workspace .role-box {
    width: 100%;
  }

  .page > .body > .workspace #roleSelect {
    width: 100%;
    min-width: 0;
  }

  .page > .body > .workspace .flow-box {
    width: 100%;
    padding: 8px;
    overflow: hidden;
  }

  .page > .body > .workspace .flow-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .page > .body > .workspace .content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
  }

  .page > .body > .workspace .left-panel {
    order: 2;
  }

  .page > .body > .workspace .chat-panel {
    order: 1;
    min-height: 58vh;
  }

  .page > .body > .workspace .dify-host {
    min-height: 56vh;
  }

  #dify-chatbot-bubble-window {
    position: static !important;
    width: 100% !important;
    height: 56vh !important;
    max-height: none !important;
    border-radius: 10px !important;
  }

  .methods,
  .keypoints {
    padding: 10px;
  }

  .keypoint-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .keypoint-actions .action-btn {
    width: 100%;
  }
}
