/* === 主题变量 === */
:root {
  --primary-color: #8B5CF6;
  --primary-hover: #7C3AED;
  --primary-light: #F5F3FF;
  --secondary-color: #94A3B8;
  --success-color: #10B981;
  --danger-color: #F43F5E;
  --warning-color: #F59E0B;
  --background-color: #FDF8F6;
  --card-background: #FFFFFF;
  --sidebar-background: #FAF5F3;
  --sidebar-hover: #F5EBE6;
  --sidebar-active: #FBCFE8;
  --text-primary: #332D29;
  --text-secondary: #78716C;
  --text-muted: #A8A29E;
  --border-color: rgba(28, 25, 23, 0.09);
  --border-light: rgba(28, 25, 23, 0.05);
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.03);
  --shadow-md: 0 6px 24px rgba(28, 25, 23, 0.05);
  --shadow-lg: 0 16px 40px rgba(28, 25, 23, 0.07);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 56px;
  --content-gutter: 48px;
  --content-gutter-right: 68px;
  --content-v-gutter: 56px;
  --content-v-gutter-bottom: 68px;
  --content-max: 1200px;
  --card-padding: 32px;
  --section-gap: 28px;
  
  /* 柔和糖果色 */
  --accent-pink: #FBCFE8;
  --accent-orange: #FED7AA;
  --accent-purple: #C4B5FD;
  --accent-green: #BBF7D0;
  --accent-blue: #BFDBFE;
  --accent-yellow: #FEF3C7;

  /* 全局字阶（基于 18px 根字号） */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --text-xs: 0.9375rem;
  --text-sm: 1rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
}

/* === 基础样式 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  background-color: #CFEFE3;
  color: var(--text-primary);
  line-height: 1.72;
  min-height: 100vh;
  padding: 40px 48px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  max-width: 1480px;
  width: 100%;
  height: calc(100vh - 96px);
  background-color: #F9F7F2;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(28, 25, 23, 0.06);
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  min-height: 0;
  min-width: 0;
}

#vueShellRoot {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.eln-app-shell {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.eln-app-shell > .sidebar-overlay {
  position: absolute;
  inset: 0;
  z-index: 190;
}

/* === 侧边栏 === */
.sidebar {
  width: 160px;
  padding: 36px 22px 40px 26px;
  background-color: var(--sidebar-background);
  color: var(--text-secondary);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border-radius: 32px 0 0 32px;
  box-shadow: none;
  box-sizing: border-box;
}

.sidebar-brand {
  padding: 4px 8px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #FBCFE8, #FED7AA);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand-icon i {
  font-size: 20px;
  color: var(--text-primary);
}

.brand-text h1 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  text-align: center;
}

.brand-subtitle {
  display: none;
}

.sidebar-nav {
  flex: 1;
  padding: 6px 8px 12px 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 25, 23, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(28, 25, 23, 0.12);
  border-radius: 999px;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-group:last-child {
  margin-bottom: 0;
}

.nav-group-label {
  display: none;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  margin-bottom: 12px;
}

.nav-links li:last-child {
  margin-bottom: 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: var(--text-xs);
  font-weight: 500;
  position: relative;
  white-space: nowrap;
  min-height: 72px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.35;
}

.nav-link i {
  font-size: 1.25rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: var(--sidebar-active);
  color: var(--primary-color);
}

.nav-link.active i {
  transform: scale(1.1);
}

.nav-link span {
  display: block;
  text-align: center;
  word-break: keep-all;
  white-space: normal;
  line-height: 1.3;
  max-width: 100%;
  padding: 0 2px;
}

/* === 主内容区 === */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #F9F7F2;
}

/* === Topbar === */
.topbar {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  padding: 28px var(--content-gutter-right) 24px var(--content-gutter);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-primary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.topbar-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.topbar-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-left h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.topbar-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin: 4px 0 0 0;
  line-height: 1.45;
}

.topbar-aside {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 2px;
}

.topbar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.topbar-search-wrap {
  position: relative;
  flex: 0 1 360px;
  min-width: 180px;
  max-width: 360px;
}

.eln-live-clock {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid var(--border-light);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.3;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-box input[type="text"] {
  width: 100%;
  padding-left: 42px !important;
  padding-right: 16px !important;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  background-color: var(--background-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* === 全局搜索面板 === */
.search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: min(420px, 100vw - 48px);
  max-height: 500px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 1000;
  display: none;
}

.search-panel.active {
  display: block;
}

#searchResultsContainer {
  max-height: 440px;
  overflow-y: auto;
}

.search-panel-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #FCE4EC 0%, #E8F4F8 100%);
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-panel-header h4 {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-primary);
  font-weight: 600;
}

.search-panel-group {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.search-panel-group:last-child {
  border-bottom: none;
}

.search-panel-group-title {
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.search-result-item:hover {
  background-color: var(--sidebar-hover);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-result-icon.experiment {
  background: linear-gradient(135deg, #FBCFE8, #FED7AA);
  color: #332D29;
}

.search-result-icon.sample {
  background: linear-gradient(135deg, #BBF7D0, #86EFAC);
  color: #166534;
}

.search-result-icon.protocol {
  background: linear-gradient(135deg, #C4B5FD, #A78BFA);
  color: #5B21B6;
}

.search-result-icon.literature {
  background: linear-gradient(135deg, #BFDBFE, #93C5FD);
  color: #1D4ED8;
}

.search-result-icon.calculator {
  background: linear-gradient(135deg, #FDE68A, #FCD34D);
  color: #92400E;
}

.search-result-icon.calendar {
  background: linear-gradient(135deg, #A7F3D0, #6EE7B7);
  color: #047857;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.0625rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-result-type {
  padding: 2px 8px;
  background: #F1F5F9;
  border-radius: 8px;
  color: #64748B;
}

.search-result-date {
  color: #94A3B8;
}

.search-result-date::before {
  content: '·';
  margin-right: 6px;
  color: #CBD5E1;
}

.search-highlight {
  background: #FBCFE8;
  color: #332D29;
  padding: 0 2px;
  border-radius: 2px;
}

.search-panel-empty-hint {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.search-panel-empty {
  padding: 40px 20px;
  text-align: center;
}

.search-panel-empty i {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.search-panel-footer {
  padding: 10px 12px;
  border-top: 1px solid #F1F5F9;
}

.search-panel-footer-btn {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #F0EBF3;
  color: #5E5168;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.search-panel-footer-btn:hover {
  background: #E8E0ED;
}

.search-panel-empty p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

#headerActions,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

#headerActions .btn,
.header-actions .btn {
  min-width: unset;
  padding: 10px 16px;
  white-space: nowrap;
}

/* === 页面容器 === */
.page-container {
  padding: var(--content-v-gutter) var(--content-gutter-right) var(--content-v-gutter-bottom) var(--content-gutter);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

/* 主内容区宽度与居中 */
.page-container > .card,
.page-container > .settings-page-wrap {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.page-container > .workbench,
.page-container > .enhanced-dashboard,
.page-container > .exp-record-layout,
.page-container > .dashboard {
  max-width: none;
  width: 100%;
  margin: 0;
}

.page-container > .literature-container,
.page-container > .dict-page,
.page-container > .calendar-page {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

/* === 卡片样式 === */
.card {
  background-color: var(--card-background);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 24px 32px;
  border-bottom: none;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-orange) 100%);
}

.card-header h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-header .card-actions {
  display: flex;
  gap: 8px;
}

.card-body {
  padding: var(--card-padding) calc(var(--card-padding) + 4px);
}

.card-body.no-padding {
  padding: 0;
}

/* === 按钮样式 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  min-width: 100px;
}

.btn-primary {
  background: linear-gradient(135deg, #FBCFE8, #FED7AA);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: white;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--sidebar-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: linear-gradient(135deg, #FBCFE8, #F43F5E);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
}

.btn-ghost:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
}

.btn-sm {
  padding: 8px 14px;
  font-size: var(--text-sm);
  min-width: 72px;
}

.btn-xs {
  padding: 5px 10px;
  font-size: var(--text-xs);
  min-width: auto;
}

/* === 输入框样式 === */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  padding: 13px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--text-base);
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.35);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(245, 243, 255, 0.9);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* === 表格样式 === */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

th, td {
  padding: 16px 22px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  background-color: #FAFBFC;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

tbody tr:hover {
  background-color: #FAFBFC;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* === Badge 样式 === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 500;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.badge-success {
  background-color: #D1FAE5;
  color: var(--success-color);
}

.badge-danger {
  background-color: #FEE2E2;
  color: var(--danger-color);
}

.badge-warning {
  background-color: #FEF3C7;
  color: var(--warning-color);
}

.badge-secondary {
  background-color: #E2E8F0;
  color: var(--text-secondary);
}

/* === Toast 提示 === */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--card-background);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-success {
  border-left: 4px solid var(--success-color);
}

.toast-error {
  border-left: 4px solid var(--danger-color);
}

.toast-warning {
  border-left: 4px solid var(--warning-color);
}

.toast-info {
  border-left: 4px solid var(--primary-color);
}

.toast i {
  font-size: 1rem;
}

.toast-success i { color: var(--success-color); }
.toast-error i { color: var(--danger-color); }
.toast-warning i { color: var(--warning-color); }
.toast-info i { color: var(--primary-color); }

.toast-message {
  flex: 1;
  font-size: 1rem;
  color: var(--text-primary);
}

/* === 模态框 === */
.modal-overlay,
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(2px);
}

.modal-overlay.show,
.modal-overlay.active,
.confirm-overlay.show,
.confirm-overlay.active {
  display: flex;
}

.modal {
  background-color: var(--card-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
  pointer-events: auto;
}

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

/* === 抽屉样式 === */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(51, 45, 41, 0.3);
  display: none;
  z-index: 200;
  backdrop-filter: blur(8px);
}

.drawer-overlay.show {
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: 100%;
  max-width: 650px;
  background-color: var(--card-background);
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-header {
  padding: 24px;
  border-bottom: none;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-orange) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s;
}

.drawer-close:hover {
  background-color: var(--border-light);
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background-color: #FAFBFC;
}

/* 表单区块样式 */
.form-section {
  margin-bottom: 24px;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-help {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-control {
  width: 100%;
}

/* 标签输入样式 */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 42px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tags-input:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: var(--text-primary);
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.tag-item button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-size: 1rem;
}

.tag-input-field {
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  min-width: 80px;
}

/* 表单控件样式 */
.form-control {
  padding: 14px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background-color: var(--background-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background-color: #FFFFFF;
}

.form-control:read-only {
  background-color: var(--sidebar-background);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* 下拉选择框样式 */
.form-control select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* 文本域样式 */
.form-control textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
  font-family: inherit;
}

/* === 确认弹窗 === */
.confirm-dialog {
  background-color: var(--card-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.confirm-icon {
  width: 48px;
  height: 48px;
  background-color: #FEF3C7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.confirm-icon i {
  font-size: 1.5rem;
  color: var(--warning-color);
}

.confirm-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.confirm-message {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* === Dashboard 样式 === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.stat-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: #332D29;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 1.0625rem;
  color: #57534E;
  font-weight: 500;
}

.dashboard-section {
  background-color: var(--card-background);
  border-radius: var(--radius-xl);
  padding: 0;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section-header {
  padding: var(--card-padding) var(--card-padding) 20px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.section-content {
  padding: 24px var(--card-padding) var(--card-padding);
  flex: 1;
}

.empty-state {
  padding: 56px 32px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 1rem;
}

/* === 今日科研工作台（马卡龙） === */
.workbench {
  background: linear-gradient(180deg, #FFF8F5 0%, #F5F0FF 50%, #F0FDF8 100%);
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.workbench-intro {
  margin-bottom: 24px;
}

.workbench-intro-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #FBCFE8 0%, #FED7AA 45%, #C4B5FD 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-sm);
}

.workbench-intro-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workbench-intro-icon i {
  font-size: 1.75rem;
  color: #BE185D;
}

.workbench-date {
  margin: 0 0 6px;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.workbench-summary {
  margin: 0;
  font-size: var(--text-base);
  color: rgba(51, 45, 41, 0.78);
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.workbench-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.workbench-card--todo {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, #F0FDF6 40%, #D1FAE5 100%);
}

.workbench-card--experiments {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, #FFF5F8 40%, #FBCFE8 100%);
}

.workbench-card--samples {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, #FFF8F0 40%, #FED7AA 100%);
}

.workbench-card--quick {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, #FAF5FF 40%, #E9D5FF 100%);
}

.workbench-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.28);
}

.workbench-card-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.workbench-card--todo .workbench-card-header h3 i { color: #059669; }
.workbench-card--experiments .workbench-card-header h3 i { color: #DB2777; }
.workbench-card--samples .workbench-card-header h3 i { color: #D97706; }
.workbench-card--quick .workbench-card-header h3 i { color: #7C3AED; }

.workbench-card-header h3 i {
  font-size: 1rem;
}

.workbench-link-btn {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  color: #57534E;
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.15s ease, color 0.15s ease;
}

.workbench-link-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
}

.workbench-card-body {
  flex: 1;
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
}

.workbench-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workbench-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.workbench-list-item--clickable {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.workbench-list-item--clickable:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.06);
}

.workbench-time {
  flex-shrink: 0;
  min-width: 52px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(187, 247, 208, 0.6);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #047857;
  text-align: center;
}

.workbench-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(251, 207, 232, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #DB2777;
}

.workbench-item-icon--sample {
  color: #D97706;
  border-color: rgba(254, 215, 170, 0.65);
}

.workbench-item-main {
  flex: 1;
  min-width: 0;
}

.workbench-item-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-item-meta {
  margin-top: 2px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-item-time {
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.workbench-item-arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #CBD5E1;
}

.workbench-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.workbench-badge--pending { background: #FEF3C7; color: #B45309; }
.workbench-badge--in_progress { background: #CCFBF1; color: #0F766E; }
.workbench-badge--completed { background: #D1FAE5; color: #047857; }
.workbench-badge--cancelled { background: #F3F4F6; color: #6B7280; }

.workbench-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  text-align: center;
  color: var(--text-muted);
}

.workbench-empty i {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.35;
}

.workbench-empty p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.workbench-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  align-content: start;
}

.workbench-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  color: #332D29;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.workbench-create-btn--pink {
  background: linear-gradient(145deg, #FFF0F5 0%, #FBCFE8 100%);
}
.workbench-create-btn--mint {
  background: linear-gradient(145deg, #F0FDF6 0%, #BBF7D0 100%);
}
.workbench-create-btn--lavender {
  background: linear-gradient(145deg, #F5F3FF 0%, #DDD6FE 100%);
}
.workbench-create-btn--peach {
  background: linear-gradient(145deg, #FFF8F0 0%, #FED7AA 100%);
}

.workbench-create-btn:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
}

.workbench-create-btn--sm {
  width: auto;
  min-height: 40px;
  padding: 10px 16px;
  font-size: var(--text-sm);
}

.page-container > .workbench {
  max-width: none;
  width: 100%;
  margin: 0;
}

@media (max-width: 1024px) {
  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .workbench {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .workbench-quick-grid {
    grid-template-columns: 1fr;
  }

  .workbench-intro-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}

/* === 增强版工作台（旧版兼容） === */
.enhanced-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.dashboard-welcome-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 40px;
  background: linear-gradient(135deg, #FBCFE8 0%, #FED7AA 50%, #C4B5FD 100%);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.dashboard-welcome-card h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.dashboard-welcome-card p {
  margin: 0;
  opacity: 0.9;
}

.welcome-subtitle {
  margin-top: 8px !important;
  font-size: 1.0625rem;
  opacity: 0.85 !important;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-icon i {
  font-size: 2.2rem;
  color: #BE185D;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.dashboard-stats-grid .stat-card {
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-stats-grid .stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dashboard-stats-grid .stat-card .stat-icon {
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}

.stat-experiments {
  background: linear-gradient(145deg, #FFF5F8 0%, #FBCFE8 55%, #F9A8D4 100%);
}
.stat-experiments .stat-icon i { color: #BE185D; }

.stat-samples {
  background: linear-gradient(145deg, #F0FDF6 0%, #BBF7D0 55%, #86EFAC 100%);
}
.stat-samples .stat-icon i { color: #15803D; }

.stat-freezer {
  background: linear-gradient(145deg, #F0F9FF 0%, #BFDBFE 55%, #93C5FD 100%);
}
.stat-freezer .stat-icon i { color: #1D4ED8; }

.stat-today {
  background: linear-gradient(145deg, #FAF5FF 0%, #E9D5FF 55%, #C4B5FD 100%);
}
.stat-today .stat-icon i { color: #7C3AED; }

.dashboard-content-grid,
.dashboard-content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--section-gap);
  align-items: stretch;
}

.dashboard-quick-access,
.dashboard-section-wide {
  grid-column: span 2;
}

.enhanced-dashboard .dashboard-section {
  min-height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-sm);
}

.enhanced-dashboard .dashboard-today-plan {
  background: linear-gradient(160deg, #F0FDF6 0%, #D1FAE5 48%, #BBF7D0 100%);
}

.enhanced-dashboard .dashboard-recent-experiments {
  background: linear-gradient(160deg, #FFF8FA 0%, #FCE7F3 48%, #FBCFE8 100%);
}

.enhanced-dashboard .dashboard-quick-access {
  background: linear-gradient(160deg, #FAF5FF 0%, #EDE9FE 48%, #DDD6FE 100%);
}

.enhanced-dashboard .dashboard-section .section-header {
  border-bottom-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
}

.enhanced-dashboard .section-header h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.enhanced-dashboard .section-header .btn-ghost {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.enhanced-dashboard .today-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.enhanced-dashboard .today-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.enhanced-dashboard .today-event-item:hover {
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.05);
}

.event-time-badge {
  flex-shrink: 0;
  min-width: 52px;
  padding: 6px 10px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-type {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.event-status-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.event-status-badge.status-pending { background: #FEF3C7; color: #D97706; }
.event-status-badge.status-in_progress { background: #DBEAFE; color: #2563EB; }
.event-status-badge.status-completed { background: #D1FAE5; color: #059669; }
.event-status-badge.status-cancelled { background: #F3F4F6; color: #6B7280; }

.empty-state-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 40px 24px 48px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-small i {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

.empty-state-small p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: var(--text-base);
}

.recent-experiments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-exp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.recent-exp-item:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.05);
}

.enhanced-dashboard .recent-exp-item {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.enhanced-dashboard .recent-exp-item:hover {
  background: rgba(255, 255, 255, 0.88);
}

.exp-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exp-icon i {
  color: #DB2777;
}

.enhanced-dashboard .recent-exp-item .exp-icon i {
  color: #BE185D;
}

.exp-info {
  flex: 1;
  min-width: 0;
}

.exp-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-meta {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.quick-access-card {
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-access-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 25, 23, 0.06);
}

.enhanced-dashboard .quick-access-card:has(.qa-samples) {
  background: linear-gradient(145deg, #F0FDF6 0%, #D1FAE5 100%);
  border-color: rgba(134, 239, 172, 0.45);
}
.enhanced-dashboard .quick-access-card:has(.qa-samples):hover {
  background: linear-gradient(145deg, #ECFDF5 0%, #BBF7D0 100%);
}

.enhanced-dashboard .quick-access-card:has(.qa-freezer) {
  background: linear-gradient(145deg, #F0F9FF 0%, #DBEAFE 100%);
  border-color: rgba(147, 197, 253, 0.45);
}
.enhanced-dashboard .quick-access-card:has(.qa-freezer):hover {
  background: linear-gradient(145deg, #EFF6FF 0%, #BFDBFE 100%);
}

.enhanced-dashboard .quick-access-card:has(.qa-protocol) {
  background: linear-gradient(145deg, #FAF5FF 0%, #EDE9FE 100%);
  border-color: rgba(196, 181, 253, 0.45);
}
.enhanced-dashboard .quick-access-card:has(.qa-protocol):hover {
  background: linear-gradient(145deg, #F5F3FF 0%, #DDD6FE 100%);
}

.enhanced-dashboard .quick-access-card:has(.qa-dictionary) {
  background: linear-gradient(145deg, #FFF5F8 0%, #FCE7F3 100%);
  border-color: rgba(249, 168, 212, 0.45);
}
.enhanced-dashboard .quick-access-card:has(.qa-dictionary):hover {
  background: linear-gradient(145deg, #FFF0F5 0%, #FBCFE8 100%);
}

.qa-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}

.qa-samples { color: #059669; }
.qa-freezer { color: #2563EB; }
.qa-protocol { color: #7C3AED; }
.qa-dictionary { color: #DB2777; }

.qa-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.qa-count {
  font-size: 1rem;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  :root {
    --content-gutter: 28px;
    --content-gutter-right: 36px;
    --content-v-gutter: 40px;
    --content-v-gutter-bottom: 48px;
    --card-padding: 24px;
  --section-gap: 20px;
  }

  .page-container {
    padding: var(--content-v-gutter) var(--content-gutter-right) var(--content-v-gutter-bottom) var(--content-gutter);
  }

  .topbar {
    padding: 24px var(--content-gutter-right) 20px var(--content-gutter);
    gap: 14px;
  }

  #headerActions .btn {
    padding: 8px 12px;
    font-size: 0.875rem;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dashboard-quick-access,
  .dashboard-section-wide {
    grid-column: span 1;
  }

  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-welcome-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

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

  .quick-access-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* === 列表项样式 === */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.15s;
}

.section-content .list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background-color: #FAFBFC;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  background-color: var(--border-light);
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.list-item-badge {
  margin-left: auto;
}

/* === 表单样式 === */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-help {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* === Protocol 方法库样式 === */
/* === Protocol 文档编辑器样式 === */
:root {
  --doc-cream: #FDF8F3;
  --doc-purple: #9B7EBD;
  --doc-purple-light: #EDE5F2;
  --doc-purple-dark: #7A5FA0;
  --doc-border: #E8E4DF;
  --doc-text-secondary: #6B6560;
  --doc-text-muted: #9A9590;
}

.doc-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 180px);
  background: var(--doc-cream);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.doc-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--doc-border);
  display: flex;
  flex-direction: column;
  background: #FAF8F6;
}

.doc-sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--doc-border);
}

.doc-sidebar-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #332D29;
  margin: 0;
}

.doc-count {
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
  margin-left: 8px;
}

.doc-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sop-card {
  position: relative;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  background: white;
  border: 1px solid transparent;
}

.sop-card:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.sop-card.active {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
  box-shadow: 0 2px 8px rgba(155, 126, 189, 0.15);
}

.sop-card-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #332D29;
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sop-card-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #F0EBE6;
  color: var(--doc-text-secondary);
  font-size: 1rem;
  border-radius: 12px;
}

.sop-shared-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
}

.sop-shared-badge i {
  font-size: 0.6875rem;
}

.sop-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  border: none;
  background: transparent;
  color: #CC5A5A;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}

.sop-card:hover .sop-card-delete {
  opacity: 1;
}

.sop-card-delete:hover {
  background: rgba(204, 90, 90, 0.1);
}

.sop-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--doc-text-muted);
}

.sop-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.sop-empty-state p {
  margin: 4px 0;
  font-size: 1rem;
}

.sop-empty-state .hint {
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
}

/* === 侧边栏搜索 === */
.doc-sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--doc-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--doc-text-muted);
  font-size: 1.0625rem;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  font-size: 1rem;
  background: white;
  outline: none;
}

.search-box input:focus {
  border-color: var(--doc-purple);
}

.doc-sidebar-search select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  font-size: 1rem;
  background: white;
  outline: none;
  cursor: pointer;
}

/* === Sop卡片增强 === */
.sop-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sop-card-version {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(155, 126, 189, 0.1);
  color: var(--doc-purple);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
}

.sop-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sop-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #F0EBE6;
  color: var(--doc-text-secondary);
  font-size: 0.875rem;
  border-radius: 4px;
}

.sop-tag i {
  font-size: 0.55rem;
  cursor: pointer;
  opacity: 0.6;
}

.sop-tag:hover i {
  opacity: 1;
}

/* === 操作按钮栏 === */
.doc-actions-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  background: white;
  color: var(--doc-text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.action-btn.primary {
  background: var(--doc-purple);
  border-color: var(--doc-purple);
  color: white;
}

.action-btn.primary:hover {
  background: #7C5CBC;
}

.action-btn i {
  font-size: 1.0625rem;
}

/* === 标题与版本 === */
.title-with-version {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.doc-version {
  padding: 4px 12px;
  background: rgba(155, 126, 189, 0.15);
  color: var(--doc-purple);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
}

/* === 分类选择器 === */
.category-select {
  padding: 8px 12px;
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  outline: none;
  cursor: pointer;
  min-width: 120px;
}

/* === 标签栏 === */
.sop-tags-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px dashed var(--doc-border);
  border-radius: 8px;
  background: transparent;
  color: var(--doc-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.2;
}

.tag-add-btn:hover {
  border-color: var(--doc-purple);
  color: var(--doc-purple);
}

/* === 简化版实验方法编辑器 === */
.protocol-editor {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 32px;
  max-width: 900px;
}

.protocol-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.protocol-save-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 1rem;
  color: var(--doc-text-muted);
}

.protocol-save-hint .save-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
}

.protocol-save-hint.saved .save-dot {
  background: #10B981;
}

.protocol-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--doc-border);
}

.protocol-title {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  font-weight: 600;
  color: #332D29;
  outline: none;
  padding: 4px 0;
}

.protocol-title::placeholder {
  color: var(--doc-text-muted);
}

.protocol-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.protocol-category {
  padding: 8px 12px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  font-size: 1rem;
  background: white;
  outline: none;
  cursor: pointer;
}

.protocol-delete-btn {
  margin-left: auto;
  color: #CC5A5A;
}

/* 实验方法 · 大纲 / 思维导图切换 */
.protocol-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: #F1F5F9;
  border-radius: 12px;
  width: fit-content;
}

.protocol-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748B;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.protocol-view-tab:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.6);
}

.protocol-view-tab.active {
  background: #fff;
  color: #1E40AF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.protocol-view-panel.is-hidden {
  display: none;
}

.protocol-mindmap-panel {
  background: #fff;
  border: 1px solid var(--doc-border);
  border-radius: 16px;
  min-height: 520px;
  overflow: hidden;
}

#sopMindmapContainer {
  min-height: 520px;
}

.mindmap-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--doc-border);
}

.mindmap-toolbar-hint {
  margin-left: auto;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.mindmap-viewport {
  height: 480px;
  overflow: hidden;
  cursor: grab;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  position: relative;
}

.mindmap-transform {
  transform-origin: 0 0;
  position: relative;
}

.mindmap-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.mindmap-nodes-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.mindmap-node {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  word-break: break-word;
}

.mindmap-node.is-root {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.mindmap-node.is-section {
  font-weight: 600;
  border-width: 2px;
}

.mindmap-node.depth-1 {
  background: #DBEAFE;
  color: #1E3A8A;
  border-color: #93C5FD;
}

.mindmap-node.depth-2 {
  background: #D1FAE5;
  color: #065F46;
  border-color: #6EE7B7;
}

.mindmap-node.depth-3 {
  background: #EDE9FE;
  color: #5B21B6;
  border-color: #C4B5FD;
}

.mindmap-node.depth-4 {
  background: #FFEDD5;
  color: #9A3412;
  border-color: #FDBA74;
}

.mindmap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: #94A3B8;
  gap: 8px;
}

.mindmap-empty i {
  font-size: 2.5rem;
  opacity: 0.5;
}

.mindmap-empty .hint {
  font-size: 0.875rem;
}

.protocol-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.protocol-section {
  background: white;
  border: 1px solid var(--doc-border);
  border-radius: 16px;
  padding: 20px 22px;
}

.protocol-section-optional {
  background: #FAFAF9;
}

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

.protocol-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #332D29;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.protocol-section-title i {
  color: var(--doc-purple);
  font-size: 1.0625rem;
}

.protocol-section-hint {
  font-size: 1rem;
  color: var(--doc-text-muted);
  margin: 0 0 12px;
}

.protocol-section-head .protocol-section-hint {
  margin-bottom: 0;
}

.protocol-optional-tag {
  font-size: 1rem;
  font-weight: 500;
  color: var(--doc-text-muted);
  background: #F0EBE6;
  padding: 2px 8px;
  border-radius: 6px;
}

.protocol-textarea {
  width: 100%;
  border: 1px solid var(--doc-border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #332D29;
  background: #FDFCFB;
  resize: vertical;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.protocol-textarea:focus {
  border-color: var(--doc-purple);
  box-shadow: 0 0 0 3px rgba(155, 126, 189, 0.12);
  background: white;
}

.protocol-section .steps-list,
.protocol-section .protocol-lines-wrap,
.protocol-section .protocol-outline-wrap {
  margin-top: 4px;
}

/* 实验方法 · 幕布式大纲 */
.protocol-outline-wrap {
  background: #FAFBFC;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  padding: 10px 12px 12px;
}

.protocol-outline-add {
  margin-top: 8px;
}

.outline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.outline-node {
  position: relative;
}

.outline-node > .outline-list {
  margin-left: 22px;
  padding-left: 10px;
  border-left: 2px solid #E2E8F0;
}

.outline-node.collapsed > .outline-list {
  display: none;
}

.outline-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.12s ease;
}

.outline-row:hover {
  background: #fff;
}

.outline-toggle {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #94A3B8;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.outline-toggle:hover {
  background: #EDF2F7;
  color: #64748B;
}

.outline-toggle.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.outline-node.collapsed > .outline-row .outline-toggle i {
  transform: rotate(-90deg);
}

.outline-toggle i {
  transition: transform 0.15s ease;
  font-size: 0.75rem;
}

.outline-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94A3B8;
  margin-top: 9px;
  flex-shrink: 0;
}

.outline-input {
  flex: 1;
  min-width: 0;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.55;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--doc-text-primary);
  word-break: break-word;
}

.outline-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px #CBD5E1;
}

.outline-input:empty::before {
  content: attr(data-placeholder);
  color: var(--doc-text-muted);
  pointer-events: none;
}

/* 实验方法 · 逐行填写 */
.protocol-lines-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.protocol-line-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #FAFBFC;
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.protocol-line-item:hover {
  background: #fff;
  border-color: #CBD5E1;
}

.protocol-line-item:hover .protocol-line-actions {
  opacity: 1;
}

.protocol-line-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E2E8F0;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
}

.protocol-line-bullet {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  margin-right: 2px;
  border-radius: 50%;
  background: #94A3B8;
}

.protocol-line-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--doc-text-primary);
  outline: none;
}

.protocol-line-input:focus {
  background: #fff;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #CBD5E1;
}

.protocol-line-input::placeholder {
  color: var(--doc-text-muted);
}

.protocol-line-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.protocol-line-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.protocol-line-btn:hover {
  background: #E2E8F0;
  color: #334155;
}

.protocol-line-btn-delete:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.protocol-lines-add {
  margin-top: 2px;
}

.protocol-section-title i {
  display: none;
}

@media (max-width: 768px) {
  .protocol-editor {
    padding: 16px;
  }

  .protocol-toolbar {
    gap: 6px;
  }

  .protocol-save-hint {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* === 关键参数 === */
.parameters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.param-card {
  background: var(--doc-cream);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  border: 1px solid var(--doc-border);
}

.param-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.param-name {
  font-weight: 500;
  color: var(--doc-text-primary);
  font-size: 1.0625rem;
}

.param-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
}

.param-card:hover .param-delete {
  opacity: 1;
}

.param-delete:hover {
  background: rgba(204, 90, 90, 0.1);
}

.param-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--doc-text-primary);
  margin-bottom: 4px;
}

.param-unit {
  font-size: 1rem;
  font-weight: 400;
  color: var(--doc-text-secondary);
}

.param-desc {
  font-size: 1rem;
  color: var(--doc-text-muted);
  margin-top: 4px;
}

.empty-params {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px;
  color: var(--doc-text-muted);
}

.empty-params i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}

/* === 关联实验记录 === */
.related-experiments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-exp-item {
  background: var(--doc-cream);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.related-exp-item:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.exp-title {
  font-weight: 500;
  color: var(--doc-text-primary);
  margin-bottom: 6px;
}

.exp-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--doc-text-secondary);
}

.exp-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 1rem;
}

.exp-status.已完成 {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.exp-status.进行中 {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.exp-status.草稿 {
  background: rgba(156, 163, 175, 0.15);
  color: #9CA3AF;
}

.exp-status.待复盘 {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.exp-summary {
  font-size: 1rem;
  color: var(--doc-text-secondary);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === 版本历史 === */
.version-history {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--doc-border);
  padding-left: 24px;
  padding-right: 24px;
}

.version-history h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--doc-text-primary);
  margin: 0 0 16px 0;
}

.version-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.version-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--doc-cream);
  border-radius: 10px;
}

.version-badge {
  font-weight: 600;
  color: var(--doc-purple);
  font-size: 1rem;
  min-width: 45px;
}

.version-date {
  color: var(--doc-text-secondary);
  font-size: 1rem;
}

.version-note {
  flex: 1;
  color: var(--doc-text-muted);
  font-size: 1rem;
}

/* === 区块计数 === */
.block-count {
  padding: 2px 8px;
  background: rgba(155, 126, 189, 0.15);
  color: var(--doc-purple);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 10px;
  margin-left: auto;
}

.doc-editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: white;
}

.doc-empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--doc-text-muted);
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: var(--doc-purple-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon i {
  font-size: 2.5rem;
  color: var(--doc-purple);
}

.doc-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #332D29;
  margin: 0;
}

.doc-empty-state p {
  margin: 0;
  font-size: 1rem;
}

.doc-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--doc-border);
  background: var(--doc-cream);
}

.doc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.doc-title {
  flex: 1;
  font-size: 1.8rem;
  font-weight: 600;
  border: none;
  outline: none;
  color: #332D29;
  background: transparent;
  font-family: inherit;
}

.doc-title::placeholder {
  color: var(--doc-text-muted);
}

.doc-delete-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: #CC5A5A;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  opacity: 0;
}

.doc-header:hover .doc-delete-btn {
  opacity: 1;
}

.doc-delete-btn:hover {
  background: rgba(204, 90, 90, 0.1);
}

.doc-meta {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--doc-purple-light);
  color: var(--doc-purple-dark);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 16px;
}

.doc-segmented-control {
  display: inline-flex;
  background: #F0EBE6;
  border-radius: 10px;
  padding: 3px;
}

.segmented-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  color: var(--doc-text-secondary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.segmented-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.segmented-btn.active {
  background: white;
  color: var(--doc-purple-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.doc-save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
  margin-left: auto;
}

.save-dot {
  width: 8px;
  height: 8px;
  background: #9A9590;
  border-radius: 50%;
  transition: background 0.3s;
}

.doc-save-status.saved .save-dot {
  background: #5BA87D;
}

.doc-save-status.saved {
  color: #5BA87D;
}

.doc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.doc-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  min-height: 0;
}

.doc-panel.is-hidden {
  display: none;
}

.outline-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  background: #FAF8F6;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--doc-border);
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 48px;
}

.outline-toolbar * {
  flex-shrink: 0;
}

.outline-toolbar .toolbar-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 10px 16px !important;
  border: none !important;
  background: white !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #332D29 !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: all 0.15s !important;
  min-width: auto !important;
  min-height: 32px !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
}

.outline-toolbar .toolbar-btn:hover {
  background: var(--doc-purple-light) !important;
}

.outline-toolbar .toolbar-btn.danger {
  color: #CC5A5A !important;
}

.outline-toolbar .toolbar-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.outline-toolbar .toolbar-divider {
  width: 1px !important;
  height: 24px !important;
  background: var(--doc-border) !important;
  margin: 0 6px !important;
}

.outline-toolbar:not(.has-selection) {
  display: none !important;
}

.content-blocks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-block {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--doc-border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.content-block:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.content-block.collapsed .block-content {
  display: none;
}

.content-block.collapsed .block-toggle {
  transform: rotate(-90deg);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  background: #FAF8F6;
}

.block-header:hover {
  background: #F5F2EE;
}

.block-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1rem;
}

#block-objective .block-icon {
  background: #E8F4F8;
  color: #4A90A4;
}

#block-materials .block-icon {
  background: #F3E8F8;
  color: #9B7EBD;
}

#block-reagents .block-icon {
  background: #E8F8ED;
  color: #5BA87D;
}

#block-steps .block-icon {
  background: #FAF0E8;
  color: #C4956A;
}

#block-notes .block-icon {
  background: #F8E8E8;
  color: #CC5A5A;
}

#block-faq .block-icon {
  background: #F0E8F8;
  color: #9B7EBD;
}

.block-title {
  flex: 1;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #332D29;
  margin: 0;
}

.block-toggle {
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
  transition: transform 0.2s;
}

.block-content {
  padding: 20px;
}

.block-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  border: 1px solid var(--doc-border);
  border-radius: 12px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #332D29;
  background: white;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.block-textarea:focus {
  outline: none;
  border-color: var(--doc-purple);
  box-shadow: 0 0 0 3px rgba(155, 126, 189, 0.1);
}

.block-textarea::placeholder {
  color: var(--doc-text-muted);
}

/* === 步骤列表样式 === */
.block-count {
  margin-left: auto;
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
  background: var(--doc-cream);
  padding: 4px 10px;
  border-radius: 10px;
}

.steps-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.steps-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 1rem;
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  background: white;
  color: var(--doc-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.steps-btn:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.steps-hint {
  font-size: 1rem;
  color: var(--doc-text-muted);
  margin: 0 0 16px 0;
  padding-left: 40px;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--doc-border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.step-item:hover {
  background: var(--doc-cream);
  border-color: var(--doc-purple-light);
}

.step-item:hover .step-actions {
  opacity: 1;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--doc-purple) 0%, var(--doc-purple-dark) 100%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 1.0625rem;
  line-height: 1.5;
  border: none;
  background: transparent;
  color: var(--doc-text-primary);
  font-family: inherit;
}

.step-input:focus {
  outline: none;
  background: white;
  border-radius: 6px;
}

.step-input::placeholder {
  color: var(--doc-text-muted);
}

.step-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.step-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--doc-text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.step-action-btn:hover {
  background: var(--doc-border);
  color: var(--doc-text-primary);
}

.step-action-delete:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* 空状态 */
.steps-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--doc-cream);
  border-radius: 16px;
  border: 2px dashed var(--doc-border);
}

.steps-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--doc-purple-light) 0%, var(--doc-purple) 100%);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
}

.steps-empty-state p {
  margin: 0 0 20px 0;
  color: var(--doc-text-muted);
  font-size: 1.0625rem;
}

.steps-empty-btn {
  padding: 10px 24px;
  font-size: 1.0625rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--doc-purple) 0%, var(--doc-purple-dark) 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.steps-empty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(155, 126, 189, 0.3);
}

/* 常用步骤弹窗 */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.common-steps-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.common-steps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--doc-border);
}

.common-steps-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--doc-text-primary);
}

.common-steps-header button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--doc-text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.common-steps-header button:hover {
  background: var(--doc-border);
  color: var(--doc-text-primary);
}

.common-steps-list {
  padding: 16px;
  overflow-y: auto;
  max-height: 400px;
}

.common-step-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  background: white;
  color: var(--doc-text-primary);
  font-size: 1.0625rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.common-step-item:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.template-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px;
  margin-bottom: 8px;
  border: 1px solid var(--doc-border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-item:hover {
  background: var(--doc-purple-light);
  border-color: var(--doc-purple);
}

.template-name {
  font-weight: 600;
  color: var(--doc-text-primary);
}

.template-count {
  font-size: 1rem;
  color: var(--doc-text-muted);
  background: var(--doc-cream);
  padding: 4px 10px;
  border-radius: 12px;
}

.outline-hint {
  font-size: 0.9375rem;
  color: var(--doc-text-muted);
  margin: 0 0 12px 0;
  padding: 8px 12px;
  background: #FAF8F6;
  border-radius: 8px;
}

/* ========== 样品信息模块样式 ========== */

/* 样品首页 / 分类工作台 */
.samples-home,
.samples-hub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.samples-hub--landing {
  padding-top: 12px;
}

.samples-hub-intro {
  margin-bottom: 28px;
  text-align: center;
}

.samples-hub-title {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 700;
  color: #1E293B;
}

.samples-hub-desc {
  margin: 0;
  font-size: 1rem;
  color: #64748B;
}

.samples-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.samples-hub-card {
  flex: 1 1 200px;
  max-width: 240px;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 22px;
}

.samples-hub-card .samples-tab-icon {
  width: 32px;
  height: 32px;
  font-size: 1.0625rem;
}

.samples-hub-card .samples-tab-badge {
  width: 34px;
  height: 34px;
  font-size: 0.9375rem;
}

.samples-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  border: 1px solid #ECEEF2;
  border-radius: 999px;
  background: #FFFFFF;
  color: #57534E;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.samples-back-btn:hover {
  background: #FFF8FA;
  border-color: #FFD3E0;
}

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

.samples-detail-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1E293B;
}

.samples-search--compact {
  flex: 1;
  min-width: 220px;
  max-width: 360px;
  margin-bottom: 0 !important;
}

.samples-category-tabs--compact {
  margin-bottom: 16px;
}

.samples-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.samples-tab {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border: 1px solid #ECEEF2;
  border-radius: 20px;
  background: #FFFFFF;
  color: #4B5563;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.samples-tab-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  font-size: 0.9375rem;
}

.samples-tab-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.samples-tab-badge {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  background: #EEF0F3;
  color: #6B7280;
}

.samples-tab:hover {
  transform: translateY(-1px);
  border-color: #FFD3E0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.samples-tab.active {
  background: #FFD3E0;
  border-color: #FFD3E0;
  color: #3F3F46;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.samples-tab.active .samples-tab-icon {
  color: #57534E;
}

.samples-tab.active .samples-tab-badge {
  background: #F4B4C4;
  color: #4A3A40;
}

.samples-tab--primers .samples-tab-icon { color: #7C3AED; }
.samples-tab--strains .samples-tab-icon { color: #059669; }
.samples-tab--plasmids .samples-tab-icon { color: #2563EB; }
.samples-tab--proteins .samples-tab-icon { color: #D97706; }
.samples-tab--freezer-boxes .samples-tab-icon { color: #0891B2; }

.samples-tab.active.samples-tab--primers .samples-tab-icon { color: #6D28D9; }
.samples-tab.active.samples-tab--strains .samples-tab-icon { color: #047857; }
.samples-tab.active.samples-tab--plasmids .samples-tab-icon { color: #1D4ED8; }
.samples-tab.active.samples-tab--proteins .samples-tab-icon { color: #B45309; }
.samples-tab.active.samples-tab--freezer-boxes .samples-tab-icon { color: #0E7490; }

@media (max-width: 1100px) {
  .samples-category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .samples-tab {
    flex: 0 0 auto;
    min-width: 148px;
    max-width: none;
  }
}

.samples-category-panel {
  background: #FFFFFF;
  border: 1px solid #E8EAED;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sample-type-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sample-type-page-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1E293B;
}

.sample-type-count {
  font-size: 0.9375rem;
  color: #64748B;
}

/* 冻存盒图形化 */
.freezer-graphic-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.freezer-box-sidebar {
  background: #FFF8FA;
  border: 1px solid #F0E6EA;
  border-radius: 10px;
  padding: 14px;
}

.freezer-sidebar-title {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #57534E;
}

.freezer-box-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.freezer-box-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E8EAED;
  border-radius: 8px;
  background: #FFFFFF;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.freezer-box-chip strong {
  font-size: 0.9375rem;
  color: #1E293B;
}

.freezer-box-chip small {
  font-size: 0.8125rem;
  color: #94A3B8;
  line-height: 1.4;
}

.freezer-box-chip .chip-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7C3AED;
  background: #EDE9FE;
  padding: 2px 8px;
  border-radius: 999px;
}

.freezer-box-chip.active {
  border-color: #FFB6C1;
  background: #FFF0F5;
}

.freezer-box-visual {
  background: #FAFAFA;
  border: 1px solid #E8EAED;
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
}

.freezer-visual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.freezer-visual-header h3 {
  margin: 0 0 4px;
  font-size: 1.125rem;
  color: #1E293B;
}

.freezer-visual-header p {
  margin: 0;
  font-size: 0.9375rem;
  color: #64748B;
}

.box-grid-container-page {
  margin-bottom: 16px;
}

.box-grid-page {
  min-width: 320px;
}

.box-grid-page .grid-slot {
  min-height: 52px;
}

/* 孔位详情抽屉 */
.sample-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1200;
}

.sample-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sample-well-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100%;
  background: #FFFFFF;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1201;
  overflow-y: auto;
}

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

.well-drawer-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.well-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #F0F1F3;
  background: linear-gradient(180deg, #FFD3E0 0%, #FFFFFF 100%);
}

.well-drawer-position {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #7C3AED;
  letter-spacing: 0.04em;
}

.well-drawer-header h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  color: #1E293B;
}

.well-drawer-sub {
  margin: 0;
  font-size: 0.9375rem;
  color: #64748B;
}

.well-drawer-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  color: #64748B;
}

.well-drawer-body {
  flex: 1;
  padding: 20px 24px;
}

.well-drawer-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.9375rem;
}

.well-drawer-row span {
  color: #94A3B8;
  flex-shrink: 0;
}

.well-drawer-row strong {
  color: #334155;
  text-align: right;
  font-weight: 600;
}

.well-drawer-empty-body {
  text-align: center;
  color: #94A3B8;
  padding: 48px 24px;
}

.well-drawer-empty-body i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #CBD5E1;
}

.well-drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid #F0F1F3;
}

@media (max-width: 900px) {
  .freezer-graphic-layout {
    grid-template-columns: 1fr;
  }

  .freezer-box-list {
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .freezer-box-chip {
    width: calc(50% - 4px);
  }
}

.samples-search {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.samples-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 1.0625rem;
}

.samples-search-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.samples-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.samples-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.sample-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.sample-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: #CBD5E1;
}

.sample-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.primers-icon {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
}

.boxes-icon {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.tubes-icon {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.sample-card-content {
  flex: 1;
}

.sample-card-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  color: #1E293B;
}

.sample-card-content p {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #64748B;
}

.sample-card-count {
  display: inline-block;
  padding: 4px 10px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* 搜索结果 */
.search-results {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #E2E8F0;
}

.search-results h4 {
  margin: 0 0 16px 0;
  font-size: 1.0625rem;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.search-result-item i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border-radius: 10px;
  color: #6366F1;
}

.search-result-title {
  display: block;
  font-weight: 500;
  color: #1E293B;
}

.search-result-type {
  display: block;
  font-size: 0.9375rem;
  color: #94A3B8;
}

/* 新增菜单 */
.sample-add-menu {
  position: absolute;
  top: 60px;
  right: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  min-width: 180px;
}

.sample-add-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 1.0625rem;
  color: #334155;
}

.sample-add-item:hover {
  background: #F1F5F9;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.data-table thead {
  background: #F8FAFC;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
}

.data-table th {
  font-weight: 600;
  color: #64748B;
  font-size: 1rem;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: #FAFAFA;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 徽章样式 */
.direction-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.direction-badge.forward {
  background: #DBEAFE;
  color: #1D4ED8;
}

.direction-badge.reverse {
  background: #FCE7F3;
  color: #BE185D;
}

.type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  background: #E0E7FF;
  color: #6366F1;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.status-normal {
  background: #D1FAE5;
  color: #059669;
}

.status-pending {
  background: #FEF3C7;
  color: #D97706;
}

.status-discarded {
  background: #FECACA;
  color: #DC2626;
}

/* 序列单元格 */
.seq-cell {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-size: 1rem;
  color: #374151;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 操作按钮 */
.action-btn-sm {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 4px;
}

.action-btn-sm:hover {
  background: #E2E8F0;
  color: #334155;
}

.action-btn-sm.delete:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.action-btn-sm.edit:hover {
  background: #DBEAFE;
  color: #1D4ED8;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #94A3B8;
}

/* 表单样式 */
.form-container {
  padding: 20px;
}

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

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 1rem;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 1.0625rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  pointer-events: auto;
  cursor: text;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6366F1;
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

/* 冻存盒页面 */
.freezer-boxes-page {
  padding: 20px;
}

.boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.box-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s ease;
}

.box-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.box-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.box-code {
  font-size: 1rem;
  font-weight: 600;
  color: #6366F1;
  background: #EEF2FF;
  padding: 4px 10px;
  border-radius: 8px;
}

.box-name {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: #1E293B;
}

.box-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.box-spec,
.box-location,
.box-shelf {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #64748B;
}

.box-spec i,
.box-location i,
.box-shelf i {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F1F5F9;
  border-radius: 6px;
  font-size: 0.9375rem;
}

.box-usage {
  margin-bottom: 12px;
}

.usage-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 1rem;
  color: #64748B;
}

.usage-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.box-note {
  margin: 0 0 16px 0;
  font-size: 1rem;
  color: #64748B;
  padding: 10px 12px;
  background: #FAFAFA;
  border-radius: 8px;
}

.box-actions {
  display: flex;
  gap: 10px;
}

/* 冻存盒表单 */
.box-form {
  max-height: 80vh;
  overflow-y: auto;
}

.spec-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-btn {
  padding: 8px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.spec-btn:hover {
  border-color: #6366F1;
  background: #EEF2FF;
}

.spec-btn.active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  border-color: transparent;
}

.box-preview-section {
  margin-top: 20px;
  padding: 16px;
  background: #FAFAFA;
  border-radius: 12px;
}

.box-preview-section h4 {
  margin: 0 0 12px 0;
  font-size: 1.0625rem;
}

.preview-grid {
  display: grid;
  gap: 4px;
}

.preview-cell {
  padding: 6px;
  text-align: center;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #64748B;
}

/* 冻存盒详情 */
.box-detail {
  max-width: 600px;
}

.box-detail-info {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.box-detail-info div {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  color: #334155;
}

.box-grid-container {
  margin-bottom: 20px;
}

.box-grid {
  display: grid;
  gap: 6px;
  background: #FAFAFA;
  padding: 12px;
  border-radius: 12px;
}

.grid-header {
  padding: 8px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #94A3B8;
}

.grid-slot {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.slot-normal {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
}

.slot-pending {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

.slot-discarded {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

.slot-empty {
  background: #E2E8F0;
  color: #94A3B8;
}

.slot-empty:hover {
  background: #CBD5E1;
}

.slot-content {
  text-align: center;
}

.slot-position {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.slot-name {
  display: block;
  font-size: 0.875rem;
  opacity: 0.9;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-empty-content {
  text-align: center;
}

.box-detail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.box-detail-legend div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: #64748B;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-dot.normal {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.legend-dot.empty {
  background: #E2E8F0;
}

.legend-dot.pending {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.legend-dot.discarded {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

/* 冻存管表单 */
.tube-form {
  max-height: 80vh;
  overflow-y: auto;
}

.tube-position-section {
  margin-top: 16px;
}

.position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.position-header label {
  font-weight: 500;
  font-size: 1rem;
}

.position-header span {
  font-weight: 600;
  color: #6366F1;
}

.position-grid {
  display: grid;
  gap: 6px;
}

.position-cell {
  padding: 8px;
  text-align: center;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.position-available {
  background: white;
  color: #334155;
}

.position-available:hover {
  background: #EEF2FF;
  border-color: #6366F1;
}

.position-used {
  background: #F1F5F9;
  color: #94A3B8;
  cursor: not-allowed;
}

/* 冻存管详情 */
.tube-detail {
  min-width: 300px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}

.detail-label {
  font-weight: 500;
  color: #64748B;
  font-size: 1rem;
}

.detail-value {
  font-size: 1rem;
  color: #1E293B;
}

.detail-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
}

/* 响应式 */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .samples-cards {
    grid-template-columns: 1fr;
  }
  
  .boxes-grid {
    grid-template-columns: 1fr;
  }
  
  .sample-card {
    flex-direction: column;
  }
}

/* 大纲视图样式 */
.outline-panel {
  line-height: 1.6;
}

.sop-outline-hint {
  display: none;
}

/* 编辑器样式 */
#editor {
  min-height: 400px;
  padding: 20px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  outline: none;
  font-size: 1.0625rem;
  line-height: 1.6;
}

#editor h1 { font-size: 1.75rem; margin: 24px 0 12px 0; font-weight: 600; }
#editor h2 { font-size: 1.5rem; margin: 20px 0 12px 0; font-weight: 600; }
#editor h3 { font-size: 1.25rem; margin: 18px 0 12px 0; font-weight: 600; }
#editor p { font-size: 1rem; margin: 0 0 14px 0; line-height: 1.8; }
#editor ul, #editor ol { margin-left: 20px; margin-bottom: 12px; }
#editor img { max-width: 100%; margin: 10px 0; }

/* 工具栏按钮 */
.toolbar-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  background-color: var(--card-background);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.toolbar-btn:hover {
  background-color: var(--border-light);
}

.toolbar-select {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
  margin: 0 5px;
}

/* 历史卡片 */
.history-card {
  padding: 12px;
  background-color: #FAFBFC;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid var(--border-light);
}

.history-card:hover {
  background-color: #F1F5F9;
  border-color: var(--border-color);
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.history-card-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
}

.history-card-date {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.history-card-preview {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 实验记录样式 */
.experiment-form {
  max-width: 800px;
}

.experiment-title-input {
  font-size: 1.5rem;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid var(--border-color);
  outline: none;
  width: 100%;
  padding: 8px 0;
  margin-bottom: 20px;
  background: transparent;
}

.experiment-title-input:focus {
  border-bottom-color: var(--primary-color);
}

/* ===== 统一计算器样式（暖色文档风，对齐 ELN 主界面） ===== */

.calc-page {
  --calc-bg: #FDF8F3;
  --calc-surface: #FFFCF9;
  --calc-accent: #7A6B8A;
  --calc-accent-dark: #5E5168;
  --calc-accent-soft: #F0EBF3;
  --calc-border: #E8E4DF;
  --calc-text: #3D3835;
  --calc-muted: #6B6560;
  --calc-result-bg: #F8F5F1;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 24px 32px;
}

.calc-page--tool {
  max-width: 720px;
}

.calc-tool-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--calc-border);
}

.calc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--calc-border);
  border-radius: 10px;
  background: var(--calc-surface);
  color: var(--calc-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.calc-back-btn:hover {
  background: var(--calc-accent-soft);
  color: var(--calc-accent-dark);
  border-color: var(--calc-border);
}

.calc-tool-header__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--calc-text);
  letter-spacing: -0.02em;
}

.calc-tool-content .calc-tool-panel {
  max-width: 100%;
}

.calc-tool-panel {
  max-width: 520px;
  margin: 0 auto;
}

/* 功能选项卡 */
.calc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.calc-tab-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #FFFFFF;
  color: #64748B;
  border: 1px solid #E2E8F0;
  white-space: nowrap;
}

.calc-tab-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.calc-tab-btn.active {
  background: var(--calc-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

/* 公式提示条 */
.calc-formula-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #FBF9FD 0%, #F6F2FA 55%, #F3F8FC 100%);
  border: 1px solid var(--calc-border);
  border-left: 3px solid var(--calc-accent);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(94, 81, 104, 0.05);
}

.calc-formula-bar__badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(122, 107, 138, 0.12);
  color: var(--calc-accent-dark);
  font-size: 0.9rem;
}

.calc-formula-bar__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-formula-bar__text {
  margin: 0;
  font-family: 'Source Serif 4', 'Noto Serif SC', 'Songti SC', Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--calc-text);
  line-height: 1.7;
  letter-spacing: 0.02em;
  font-variant-numeric: lining-nums proportional-nums;
  word-break: break-word;
}

.calc-formula-bar__text + .calc-formula-bar__text {
  padding-top: 6px;
  border-top: 1px dashed rgba(122, 107, 138, 0.18);
}

.calc-formula-bar .formula-variable {
  color: var(--calc-accent-dark);
  font-weight: 600;
  font-style: normal;
  padding: 0 2px;
}

.calc-formula-bar .formula-unit {
  color: var(--calc-muted);
  font-weight: 400;
  font-size: 0.8125rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  margin-left: 1px;
}

.calc-formula-bar .formula-op,
.calc-formula-bar .formula-operator {
  color: var(--calc-accent);
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  margin: 0 0.2em;
  padding: 0 0.1em;
}

.calc-formula-bar .formula-eq {
  color: var(--calc-accent-dark);
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  margin: 0 0.35em;
}

.calc-formula-bar .formula-sub {
  font-size: 0.78em;
  color: var(--calc-accent-dark);
  letter-spacing: 0;
  vertical-align: baseline;
}

/* 表单容器 — 单卡片内多行 */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--calc-surface);
  border: 1px solid var(--calc-border);
  border-radius: 14px;
  padding: 4px 18px 18px;
  margin-bottom: 16px;
}

.calc-form-group {
  background: transparent;
  border: none;
  border-bottom: 1px solid #F0EBE6;
  border-radius: 0;
  padding: 14px 0;
  box-shadow: none;
}

.calc-form-group:last-child {
  border-bottom: none;
}

.calc-form-group label {
  display: block;
  font-weight: 600;
  color: var(--calc-text);
  margin-bottom: 8px;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.calc-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  font-size: 0.9375rem;
  background: #fff;
  color: var(--calc-text);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.calc-input:focus {
  outline: none;
  border-color: var(--calc-accent);
  box-shadow: 0 0 0 3px rgba(122, 107, 138, 0.12);
}

.calc-input::placeholder {
  color: #94A3B8;
}

/* 输入框带单位 */
.calc-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.calc-input-group .calc-input {
  flex: 1;
}

/* 单位选择器 */
.calc-unit-select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  font-size: 0.875rem;
  background: #fff;
  color: var(--calc-muted);
  cursor: pointer;
  min-width: 72px;
  transition: border-color 0.15s;
}

.calc-unit-select:focus {
  outline: none;
  border-color: var(--calc-accent);
}

/* Segmented Control */
.calc-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  background: var(--calc-bg);
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 4px;
}

.calc-segmented label {
  margin-bottom: 0 !important;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--calc-muted);
  transition: background 0.15s, color 0.15s;
}

.calc-segmented input[type="radio"] {
  display: none;
}

.calc-segmented input[type="radio"]:checked + label {
  background: var(--calc-surface);
  color: var(--calc-accent-dark);
  box-shadow: 0 1px 3px rgba(61, 56, 53, 0.08);
}

.calc-btn {
  height: 42px;
  padding: 0 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.calc-btn-primary {
  background: var(--calc-accent-dark);
  color: #fff;
  box-shadow: none;
}

.calc-btn-primary:hover:not(:disabled) {
  background: #4A3F52;
}

.calc-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.calc-btn-secondary {
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.calc-btn-secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

/* 按钮组 */
.calc-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 0;
}

.calc-btn-group .calc-btn {
  flex: 1;
}

/* 结果区 — 中性暖灰，不用绿色 */
.calc-result-card {
  background: var(--calc-result-bg);
  border: 1px solid var(--calc-border);
  border-left: 3px solid var(--calc-accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 14px;
}

.calc-result-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--calc-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calc-result-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.calc-result-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--calc-text);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.calc-result-unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--calc-muted);
}

/* 单位换算：源 → 目标 一行流 */
.calc-unit-flow {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-unit-flow__block {
  flex: 1;
  min-width: 120px;
}

.calc-unit-flow__arrow {
  color: var(--calc-muted);
  font-size: 1.125rem;
  padding-bottom: 10px;
  flex-shrink: 0;
}

/* 可折叠说明 */
.calc-collapsible {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  margin-top: 20px;
  overflow: hidden;
}

.calc-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: #FAFAFA;
}

.calc-collapsible-header:hover {
  background: #F1F5F9;
}

.calc-collapsible-title {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
}

.calc-collapsible-icon {
  font-size: 16px;
  color: #64748B;
  transition: transform 0.2s ease;
}

.calc-collapsible-icon.expanded {
  transform: rotate(180deg);
}

.calc-collapsible-content {
  padding: 20px;
  border-top: 1px solid #E2E8F0;
}

.calc-collapsible-content p {
  margin: 0 0 12px;
  font-size: 16px;
  color: #475569;
}

.calc-collapsible-content ul {
  margin: 0;
  padding-left: 20px;
}

.calc-collapsible-content li {
  margin-bottom: 8px;
  font-size: 16px;
  color: #64748B;
}

/* 普通计算器样式 */
.calc-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 380px;
  margin: 0 auto;
}

.calc-display-area {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: right;
}

.calc-display {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Fira Code', 'Fira Mono', 'Lucida Console', 'Courier New', monospace;
  font-size: 2.5rem;
  font-weight: 600;
  color: #1E293B;
  word-wrap: break-word;
  min-height: 48px;
}

.calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.calc-key {
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #F8FAFC;
  color: #334155;
}

.calc-key:hover {
  background: #E2E8F0;
  transform: translateY(-2px);
}

.calc-key:active {
  transform: translateY(0);
}

.calc-key-secondary {
  background: #F1F5F9;
  color: #64748B;
}

.calc-key-secondary:hover {
  background: #E2E8F0;
}

.calc-key-operator {
  background: var(--calc-accent-soft, #F0EBF3);
  color: var(--calc-accent-dark, #5E5168);
}

.calc-key-operator:hover {
  background: #E8E0ED;
}

.calc-key-equals {
  background: var(--calc-accent-dark, #5E5168);
  color: white;
  box-shadow: none;
}

.calc-key-equals:hover {
  background: #4A3F52;
}

/* 计数器样式 */
.calc-counter-display {
  text-align: center;
  margin-bottom: 24px;
}

.calc-counter-value {
  font-size: 5rem;
  font-weight: 700;
  color: #1E293B;
  line-height: 1;
  margin-bottom: 16px;
}

.calc-counter-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.calc-counter-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calc-counter-btn.plus {
  background: var(--calc-accent-dark, #5E5168);
  color: white;
  box-shadow: 0 2px 10px rgba(61, 56, 53, 0.15);
}

.calc-counter-btn.minus {
  background: #FFFFFF;
  color: #64748B;
  border: 2px solid #E2E8F0;
}

.calc-counter-btn:hover {
  transform: scale(1.05);
}

.calc-counter-btn:active {
  transform: scale(0.95);
}

/* 倒计时样式 */
.calc-timer-display {
  text-align: center;
  margin-bottom: 24px;
}

.calc-timer-value {
  font-size: 4rem;
  font-weight: 700;
  color: #1E293B;
  font-family: 'Courier New', monospace;
}

.calc-timer-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.calc-timer-input {
  width: 80px;
  height: 52px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FAFAFA;
}

.calc-timer-input:focus {
  outline: none;
  border-color: var(--calc-accent, #7A6B8A);
}

.calc-timer-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* 科研计算 — 马卡龙工具箱 */
.calc-toolbox {
  max-width: 1120px;
  margin: 0 auto;
}

.calc-toolbox-header {
  text-align: center;
  margin-bottom: 32px;
}

.calc-toolbox-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #F5E6FF 0%, #E8F4FF 100%);
  color: #7A6B8A;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.calc-toolbox-header__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.02em;
}

.calc-toolbox-header__sub {
  margin: 0;
  color: #94A3B8;
  font-size: 0.9375rem;
}

.calc-toolbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

@media (min-width: 900px) {
  .calc-toolbox-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .calc-toolbox-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.calc-toolbox-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px 20px;
  border-radius: 20px;
  background: var(--macaron, #F8FAFC);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 20px rgba(61, 56, 53, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calc-toolbox-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(61, 56, 53, 0.1);
}

.calc-toolbox-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent, var(--calc-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calc-toolbox-card__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.3;
}

.calc-toolbox-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.8125rem;
  color: #64748B;
  line-height: 1.55;
  min-height: 2.8em;
}

.calc-toolbox-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent, var(--calc-accent-dark));
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calc-toolbox-card__btn:hover {
  background: var(--accent, var(--calc-accent));
  color: #fff;
  transform: translateX(2px);
}

.calc-toolbox-card__btn i {
  font-size: 0.75rem;
  transition: transform 0.15s;
}

.calc-toolbox-card__btn:hover i {
  transform: translateX(3px);
}

.calc-toolbox-extras {
  padding: 20px 0;
  border-top: 1px dashed #E2E8F0;
  margin-bottom: 20px;
}

.calc-toolbox-extras__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 12px;
}

.calc-toolbox-extras__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-toolbox-extra {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  background: var(--macaron, #F8FAFC);
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calc-toolbox-extra:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #334155;
}

.calc-toolbox-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #FAFBFC 0%, #F5F0FA 100%);
  border-radius: 16px;
  font-size: 0.75rem;
  color: #64748B;
}

.calc-toolbox-footer i {
  color: #A8B4C4;
  margin-right: 4px;
}

.calc-drawer-content {
  padding-top: 4px;
  padding-bottom: 8px;
}

.calc-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted, #94A3B8);
  line-height: 1.4;
}

.calc-drawer-content .calc-btn-group {
  position: sticky;
  bottom: 0;
  padding: 12px 0 4px;
  background: linear-gradient(to top, var(--card-background, #fff) 70%, transparent);
  z-index: 1;
}

.calc-drawer-content .calc-tool-panel {
  padding: 0;
}

.calc-drawer-subtabs {
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: var(--drawer-bg, #fff);
  z-index: 2;
  padding-bottom: 4px;
}

.drawer-body .calc-sub-tabs {
  margin-bottom: 12px;
}

/* 兼容旧 Hub 类名 */
.calc-hub-header {
  text-align: center;
  margin-bottom: 28px;
}

.calc-hub-header h3 {
  margin: 0 0 8px;
  font-size: 1.375rem;
  color: #1E293B;
}

.calc-hub-header p,
.calc-hub-desc {
  margin: 0;
  color: #64748B;
  font-size: 0.9375rem;
}

.calc-hub-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 16px;
  background: #F8FAFC;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #64748B;
}

.calc-hub-tips i {
  color: var(--calc-accent);
  margin-right: 4px;
}

.calc-tool-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.calc-back-btn {
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: white;
  color: #64748B;
  font-size: 0.8125rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calc-back-btn:hover {
  background: #F1F5F9;
  color: #334155;
}

.calc-tool-nav-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1E293B;
}

.calc-sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E2E8F0;
}

.calc-sub-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: white;
  color: #64748B;
  font-size: 0.8125rem;
  cursor: pointer;
}

.calc-sub-tab.active {
  background: var(--calc-accent-soft);
  border-color: var(--calc-border);
  color: var(--calc-accent-dark);
  font-weight: 500;
}

.calc-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.calc-btn-sm {
  padding: 8px 12px !important;
  font-size: 0.8125rem !important;
}

.calc-insert-hint {
  margin: 0 0 14px;
  color: #64748B;
  font-size: 0.875rem;
  line-height: 1.5;
}

.calc-insert-preview {
  padding: 12px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 16px;
}

.calc-insert-preview-label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.calc-insert-preview-text {
  display: block;
  color: #64748B;
  font-size: 0.8125rem;
  word-break: break-word;
}

.calc-insert-section-select {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E2E8F0;
}

.calc-insert-section-label {
  font-weight: 600;
  color: #475569;
  font-size: 0.875rem;
}

.calc-insert-section-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #334155;
  cursor: pointer;
}

.calc-insert-exp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.calc-insert-exp-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.calc-insert-exp-item:hover {
  border-color: #7A6B8A;
  background: #FAF8FC;
}

.calc-insert-exp-title {
  font-weight: 600;
  color: #1E293B;
  font-size: 0.9375rem;
}

.calc-insert-exp-meta {
  font-size: 0.8125rem;
  color: #94A3B8;
}

.calc-insert-empty {
  text-align: center;
  padding: 20px 12px;
  color: #64748B;
}

.calc-insert-empty i {
  font-size: 2.5rem;
  color: #CBD5E1;
  margin-bottom: 12px;
}

.calc-insert-empty p {
  margin: 0 0 8px;
}

.calc-insert-empty-sub {
  font-size: 0.875rem;
  color: #94A3B8;
}

/* 实验方法分享页 */
.eln-share-mode .sidebar {
  display: none !important;
}

.eln-share-mode .main-content {
  margin-left: 0 !important;
  width: 100% !important;
}

.share-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 32px 20px;
}

.share-unavailable-card {
  max-width: 420px;
  text-align: center;
  padding: 36px 28px;
  background: linear-gradient(160deg, #fff9fb 0%, #f8fafc 100%);
  border: 1px solid #f1e4e8;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.share-unavailable-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fce7f3;
  color: #be185d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.share-unavailable-card h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  color: #1f2937;
}

.share-unavailable-message {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.6;
}

.share-unavailable-hint {
  margin: 0 0 20px;
  font-size: 0.8125rem;
  color: #9ca3af;
  line-height: 1.5;
}

.share-unavailable-btn {
  margin-top: 4px;
}

.share-loading,
.share-not-found {
  text-align: center;
  padding: 60px 24px;
  color: #64748B;
}

.share-loading i,
.share-not-found i {
  font-size: 2.5rem;
  color: #CBD5E1;
  margin-bottom: 16px;
}

.share-not-found h2 {
  margin: 0 0 8px;
  color: #334155;
}

.share-protocol-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.share-protocol-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 10px;
  color: #0369A1;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.share-protocol-header {
  margin-bottom: 28px;
}

.share-protocol-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  color: #1E293B;
  line-height: 1.3;
}

.share-protocol-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.share-meta-badge {
  padding: 4px 12px;
  background: #F1F5F9;
  border-radius: 12px;
  font-size: 0.8125rem;
  color: #475569;
}

.share-meta-version,
.share-meta-date {
  font-size: 0.8125rem;
  color: #94A3B8;
}

.share-protocol-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.share-tag {
  padding: 3px 10px;
  background: #EEF2FF;
  color: #4F46E5;
  border-radius: 10px;
  font-size: 0.75rem;
}

.share-section {
  margin-bottom: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--section-macaron, #F8FAFC) 0%, #fff 60%);
  border-radius: 14px;
  border: 1px solid #EEF2F6;
}

.share-section-title {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  color: #334155;
}

.share-section-title i {
  margin-right: 8px;
  color: #8A72B8;
  font-size: 0.95em;
}

.share-outline-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #475569;
  line-height: 1.7;
}

.share-outline-list li {
  margin-bottom: 6px;
}

.share-section-empty {
  margin: 0;
  color: #94A3B8;
  font-size: 0.875rem;
}

.share-protocol-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
  text-align: center;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.share-link-box {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.share-link-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #F8FAFC;
  color: #334155;
}

.share-link-status {
  margin: 0;
  font-size: 0.875rem;
  color: #16A34A;
}

.share-link-status i {
  margin-right: 4px;
}

.share-meta-author,
.share-meta-updated {
  font-size: 0.8125rem;
  color: #64748B;
}

.share-meta-author i,
.share-meta-updated i {
  margin-right: 4px;
  color: #94A3B8;
}

/* 分享弹窗 · 马卡龙 */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 41, 59, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.share-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.share-modal-macaron {
  width: min(480px, 100%);
  background: linear-gradient(160deg, #FFF8FC 0%, #F0F9FF 50%, #F5FFF8 100%);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(138, 114, 184, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
}

.share-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  color: #334155;
}

.share-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #64748B;
  cursor: pointer;
}

.share-modal-body {
  padding: 4px 20px 12px;
  color: #475569;
  font-size: 0.9rem;
}

.share-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.share-modal-intro {
  margin: 0 0 12px;
}

.share-settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  border: 1px solid #E8EDF4;
}

.share-settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.share-settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
}

.share-settings-label {
  font-size: 0.8125rem;
  color: #64748B;
}

.share-optional {
  color: #94A3B8;
  font-weight: normal;
}

.share-settings-input,
.share-settings-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #fff;
}

.share-copy-btn {
  white-space: nowrap;
}

.share-password-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 24px;
}

.share-password-card {
  width: min(380px, 100%);
  text-align: center;
  padding: 32px 28px;
  background: linear-gradient(160deg, #FCE4EC, #E8F4F8);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(184, 122, 168, 0.15);
}

.share-password-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #B87AA8;
}

.share-password-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #334155;
}

.share-password-card p {
  margin: 0 0 16px;
  color: #64748B;
  font-size: 0.875rem;
}

.share-password-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.share-password-error {
  color: #DC2626;
  font-size: 0.8125rem;
  margin: 0 0 12px;
}

/* 分享按钮 · 右上角固定 */
.protocol-share-fab {
  position: fixed;
  top: 78px;
  right: 28px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, #E4D9F5, #D6EFFF);
  color: #5A72B8;
  box-shadow: 0 4px 16px rgba(138, 114, 184, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.protocol-share-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(138, 114, 184, 0.45);
}

.protocol-share-fab.is-active {
  background: linear-gradient(135deg, #D9F5E4, #D4F0E8);
  color: #5A9E72;
}

.protocol-editor {
  position: relative;
}

/* 快捷标签筛选 */
.sop-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.sop-quick-tag {
  padding: 4px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #fff;
  font-size: 0.75rem;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s;
}

.sop-quick-tag:hover {
  border-color: #C4B5FD;
  color: #6D28D9;
}

.sop-quick-tag.active {
  background: linear-gradient(135deg, #E4D9F5, #D6EFFF);
  border-color: #C4B5FD;
  color: #5B21B6;
  font-weight: 500;
}

/* 实验方法 · 八大区域卡片 */
.method-sections-wrap {
  padding: 4px 0 24px;
}

.method-sections-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.method-card {
  border-radius: 16px;
  border: 1px solid #E8EDF4;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s;
}

.method-card:hover {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.method-card--standard {
  border-color: #D6EFFF;
  background: linear-gradient(180deg, #F8FCFF 0%, #fff 120px);
}

.method-card--warn {
  border-color: #F5D9A8;
  background: linear-gradient(180deg, #FFFBEB 0%, #FFF8F0 80px, #fff 160px);
}

.method-card--info {
  border-color: #BAE6FD;
  background: linear-gradient(180deg, #F0F9FF 0%, #fff 120px);
}

.method-card--success {
  border-color: #A7D8C8;
  background: linear-gradient(180deg, #F0FFF8 0%, #fff 120px);
}

.method-card--danger {
  border-color: #FECACA;
  background: linear-gradient(180deg, #FFF5F5 0%, #fff 120px);
}

.method-card--neutral {
  border-color: #E2E8F0;
  background: linear-gradient(180deg, #F8FAFC 0%, #fff 100px);
}

.method-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}

.method-card-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.method-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.method-card--standard .method-card-icon { background: #D6EFFF; color: #5A8FC9; }
.method-card--warn .method-card-icon { background: #FDE68A; color: #B45309; }
.method-card--info .method-card-icon { background: #BAE6FD; color: #0369A1; }
.method-card--success .method-card-icon { background: #BBF7D0; color: #047857; }
.method-card--danger .method-card-icon { background: #FECACA; color: #B91C1C; }
.method-card--neutral .method-card-icon { background: #E2E8F0; color: #475569; }

.method-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

.method-card-subtitle-inline {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: #94A3B8;
}

.method-card-toggle {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #64748B;
  cursor: pointer;
  transition: transform 0.2s;
}

.method-card.is-collapsed .method-card-toggle {
  transform: rotate(-90deg);
}

.method-card-body {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.method-card.is-collapsed .method-card-body {
  display: none;
}

.method-card-desc {
  margin: 12px 0 8px;
  font-size: 0.8125rem;
  color: #78716C;
  line-height: 1.5;
}

.method-steps-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.method-steps-block {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid #EEF2F6;
}

.method-steps-subtitle {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: #475569;
}

.method-steps-subtitle i {
  margin-right: 6px;
  color: #94A3B8;
}

.method-version-current {
  margin: 12px 0;
  padding: 10px 14px;
  background: #F1F5F9;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #475569;
}

.method-version-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.method-version-item {
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.method-version-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #E2E8F0;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 8px;
}

.method-version-date {
  font-size: 0.75rem;
  color: #94A3B8;
}

.method-version-note {
  font-size: 0.8125rem;
  color: #64748B;
}

.method-steps-inner--compact .method-steps-fold {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  border: 1px solid #EEF2F6;
}

.method-steps-inner--compact .method-steps-fold summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 8px;
}

.method-steps-block--main {
  margin-top: 4px;
}

.method-subsection {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.method-subsection:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.method-subsection-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #78716C;
}

.method-subsection--success .method-subsection-title { color: #047857; }
.method-subsection--danger .method-subsection-title { color: #B91C1C; }

.method-card--warn .method-subsection-title { color: #B45309; }

.method-version-empty {
  padding: 12px 0;
  color: #94A3B8;
  font-size: 0.8125rem;
}

.method-share-card--warn {
  border: 1px dashed #F5D9A8;
  background: linear-gradient(135deg, #FFFBEB 0%, #fff 70%) !important;
}

.method-share-card--info {
  background: linear-gradient(135deg, #F0F9FF 0%, #fff 70%) !important;
}

.method-share-card--success {
  background: linear-gradient(135deg, #F0FFF8 0%, #fff 70%) !important;
}

.method-share-card--danger {
  background: linear-gradient(135deg, #FFF5F5 0%, #fff 70%) !important;
}

.method-share-desc {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: #78716C;
}

/* 隐性知识 · 避坑指南（旧版兼容） */
.protocol-tribal-section {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFFBF5 50%, #fff 100%);
  border: 1px solid #F5E6D3;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.protocol-tribal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.protocol-tribal-head .protocol-section-title i {
  color: #C97A3A;
  margin-right: 8px;
}

.protocol-tribal-desc {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: #78716C;
  max-width: 520px;
  line-height: 1.5;
}

.tribal-knowledge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tribal-knowledge-empty {
  text-align: center;
  padding: 28px 16px;
  color: #94A3B8;
}

.tribal-knowledge-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #CBD5E1;
}

.tribal-empty-hint {
  font-size: 0.8125rem;
  margin-top: 6px;
}

.tribal-knowledge-card {
  background: var(--tk-macaron, #FFF8F0);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
}

.tribal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tribal-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--tk-macaron, #FCE4EC);
  color: var(--tk-accent, #BE5A6B);
  font-size: 0.75rem;
  font-weight: 600;
}

.tribal-card-actions {
  display: flex;
  gap: 4px;
}

.tribal-card-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #64748B;
  cursor: pointer;
}

.tribal-card-btn:hover {
  background: #fff;
  color: #334155;
}

.tribal-card-btn--danger:hover {
  color: #DC2626;
}

.tribal-card-title {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: #334155;
}

.tribal-card-content {
  margin: 0 0 8px;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tribal-card-context {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: #78716C;
}

.tribal-card-context i {
  margin-right: 4px;
  color: #94A3B8;
}

.tribal-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tribal-tag {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  font-size: 0.7rem;
  color: #64748B;
}

.tribal-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: #94A3B8;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tribal-card-footer i {
  margin-right: 3px;
}

.tribal-card-source {
  color: #8A72B8;
}

.sop-tribal-badge {
  padding: 2px 8px;
  background: #FFF3E0;
  color: #C97A3A;
  border-radius: 8px;
  font-size: 0.7rem;
}

/* 隐性知识弹窗 */
.tribal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(30, 41, 59, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.tribal-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.tribal-modal-macaron {
  width: min(500px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(160deg, #FFF8F0 0%, #FCE4EC 40%, #F0F9FF 100%);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(201, 122, 58, 0.15);
}

.tribal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
}

.tribal-modal-header h3 {
  margin: 0;
  font-size: 1.0625rem;
  color: #334155;
}

.tribal-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  color: #64748B;
}

.tribal-modal-body {
  padding: 8px 20px 12px;
}

.tribal-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.tribal-form-intro {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #64748B;
}

.tribal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tribal-form-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  color: #64748B;
}

.tribal-required {
  color: #DC2626;
}

.tribal-optional {
  color: #94A3B8;
  font-weight: normal;
}

.tribal-form-input,
.tribal-form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.875rem;
  background: #fff;
}

.tribal-form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* 实验页沉淀按钮 */
.exp-btn-tribal {
  background: linear-gradient(135deg, #FFF3E0, #FCE4EC);
  border: 1px solid #F5D0A8;
  color: #9A4A1F;
}

.exp-btn-tribal:hover {
  background: linear-gradient(135deg, #FFE8CC, #FBCFE8);
}

/* 分享页隐性知识 */
.share-tribal-section {
  border: 1px dashed #F5D0A8;
}

.share-tribal-intro {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  color: #78716C;
}

.share-tribal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-tribal-card {
  padding: 14px 16px;
  background: var(--tk-macaron, #FFF8F0);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.share-tribal-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: #C97A3A;
  margin-bottom: 6px;
}

.share-tribal-card h4 {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: #334155;
}

.share-tribal-card p {
  margin: 0 0 6px;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

.share-tribal-context {
  font-size: 0.8125rem;
  color: #78716C;
}

.share-tribal-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: #94A3B8;
  margin-top: 8px;
}

.pdf-tribal-item {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E2E8F0;
}

.pdf-tribal-meta {
  font-size: 0.8125rem;
  color: #94A3B8;
}

/* 模板关联计算器 */
.protocol-template-calc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #FCE4EC 0%, #E8F4F8 100%);
  border-radius: 12px;
  border: 1px solid #F0E6F0;
}

.protocol-calc-bar-label {
  font-size: 0.8125rem;
  color: #64748B;
  white-space: nowrap;
}

.protocol-calc-bar-label i {
  margin-right: 4px;
  color: #B87AA8;
}

.protocol-calc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.protocol-calc-chip {
  padding: 4px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s;
}

.protocol-calc-chip:hover {
  border-color: #A7D8C8;
}

.protocol-calc-chip.active {
  background: #D4F0E8;
  border-color: #5A9E86;
  color: #2D6A4F;
  font-weight: 500;
}

/* 模板导入弹窗 */
.template-pick-modal,
.template-calc-modal {
  width: min(440px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: linear-gradient(160deg, #FFF8FC, #F0F9FF);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.template-pick-header,
.template-calc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.template-pick-header h3,
.template-calc-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #334155;
}

.template-pick-header button,
.template-calc-modal-header button {
  border: none;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  font-size: 1rem;
}

.template-pick-hint {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: #64748B;
}

.template-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.template-pick-item {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: border-color 0.15s;
}

.template-pick-item:hover {
  border-color: #C4B5FD;
  background: #fff;
}

.template-pick-title {
  font-weight: 500;
  color: #334155;
  margin-bottom: 4px;
}

.template-pick-meta {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #94A3B8;
}

/* 实验方法 · 文档导入 */
.protocol-import-modal {
  width: min(640px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.protocol-import-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #E2E8F0;
}

.protocol-import-header h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: #1E293B;
}

.protocol-import-header h3 i {
  color: #7C3AED;
  margin-right: 6px;
}

.protocol-import-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748B;
}

.protocol-import-close {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.protocol-import-meta {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  padding: 12px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.protocol-import-meta label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: #64748B;
}

.protocol-import-meta input,
.protocol-import-meta select {
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #334155;
  background: #fff;
}

.protocol-import-fields {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.protocol-import-field {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}

.protocol-import-field summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  background: #FAFAFA;
  list-style: none;
}

.protocol-import-field summary::-webkit-details-marker {
  display: none;
}

.protocol-import-field summary i {
  color: #7C3AED;
  width: 16px;
  text-align: center;
}

.protocol-import-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 400;
  color: #94A3B8;
}

.protocol-import-field textarea {
  width: 100%;
  border: none;
  border-top: 1px solid #E2E8F0;
  padding: 10px 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  color: #334155;
  box-sizing: border-box;
}

.protocol-import-field textarea:focus {
  outline: none;
  background: #FEFCE8;
}

.protocol-import-raw {
  margin: 0 20px 8px;
  font-size: 0.8125rem;
}

.protocol-import-raw summary {
  cursor: pointer;
  color: #64748B;
  padding: 4px 0;
}

.protocol-import-raw pre {
  max-height: 120px;
  overflow: auto;
  background: #F1F5F9;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #475569;
}

.protocol-import-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #E2E8F0;
  background: #FAFAFA;
}

.protocol-import-hint {
  margin: 0 0 10px;
  font-size: 0.75rem;
  color: #94A3B8;
}

.protocol-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.protocol-import-progress {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
}

.protocol-import-progress-inner {
  background: #fff;
  padding: 20px 28px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  font-size: 0.9375rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.protocol-import-progress-inner i {
  color: #7C3AED;
}

@media (max-width: 520px) {
  .protocol-import-meta {
    grid-template-columns: 1fr;
  }

  .protocol-import-actions {
    flex-direction: column;
  }

  .protocol-import-actions .btn {
    width: 100%;
  }
}

.template-calc-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.template-calc-link-btn {
  padding: 8px 14px;
  border: 1px solid #BAE6FD;
  border-radius: 12px;
  background: #F0F9FF;
  color: #0369A1;
  font-size: 0.8125rem;
  cursor: pointer;
}

.template-calc-link-btn:hover {
  background: #E0F2FE;
}

.calc-anomaly-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.calc-anomaly {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.calc-anomaly i {
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.calc-anomaly--warn {
  background: #FFF4ED;
  border: 1px solid #FFD4B8;
  color: #9A4A1F;
}

.calc-anomaly--warn i {
  color: #E07B39;
}

.calc-anomaly--error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.calc-anomaly--error i {
  color: #DC2626;
}

/* legacy alias */
.calc-warn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.calc-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.calc-template-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
}

.calc-template-card:hover {
  border-color: #A5B4FC;
  background: #FAFAFF;
}

.calc-template-card strong {
  color: #1E293B;
  font-size: 0.9375rem;
}

.calc-template-card span {
  color: #94A3B8;
  font-size: 0.75rem;
}

.calc-history-section {
  margin-bottom: 24px;
}

.calc-history-section h4 {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-history-item {
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  background: white;
}

.calc-history-item span {
  display: block;
  font-size: 0.875rem;
  color: #1E293B;
}

.calc-history-item small {
  color: #94A3B8;
  font-size: 0.75rem;
}

.calc-history-empty {
  color: #94A3B8;
  font-size: 0.875rem;
  margin: 0;
}

/* 旧计算器样式保留 */
.calculator-container {
  max-width: 400px;
  margin: 0 auto;
}

.calculator-display {
  background-color: #1E293B;
  color: white;
  padding: 20px;
  text-align: right;
  font-size: 2rem;
  font-weight: 600;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.calculator-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background-color: var(--border-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.calculator-btn {
  padding: 20px;
  font-size: 1.1rem;
  border: none;
  background-color: var(--card-background);
  cursor: pointer;
  transition: background-color 0.15s;
}

.calculator-btn:hover {
  background-color: var(--border-light);
}

.calculator-btn.operator {
  background-color: #F1F5F9;
  color: var(--primary-color);
}

.calculator-btn.equal {
  background-color: var(--primary-color);
  color: white;
  grid-column: span 2;
}

/* 项目管理样式 */
.project-tree {
  list-style: none;
}

.project-tree li {
  margin-bottom: 4px;
}

.project-tree a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: background-color 0.15s;
}

.project-tree a:hover {
  background-color: var(--border-light);
}

.project-tree a.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.project-tree .nested {
  padding-left: 24px;
}

/* 设置页面样式 */
.settings-page-wrap {
  width: 100%;
}

.settings-page-wrap .card {
  margin-bottom: 0;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.settings-page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.settings-page-wrap .card {
  margin-bottom: 0;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #FBCFE8 0%, #FED7AA 55%, #C4B5FD 100%);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
}

.settings-profile-avatar {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-profile-avatar i {
  font-size: 1.75rem;
}

.settings-profile-info {
  flex: 1;
  min-width: 0;
}

.settings-profile-email {
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: 4px;
}

.settings-profile-status {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.settings-profile .btn {
  margin-left: auto;
  flex-shrink: 0;
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.settings-section-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-sync-hint {
  margin: -4px 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.5;
}

.settings-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.settings-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 32px;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: white;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.settings-action-card i.action-icon {
  font-size: 1.75rem;
  display: block;
}

.settings-action-card .action-title {
  font-weight: 700;
  font-size: var(--text-base);
}

.settings-action-card .action-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.settings-action-card.btn-primary {
  background: linear-gradient(135deg, #FFF5F9 0%, #FFF8F0 100%);
  border-color: rgba(251, 207, 232, 0.5);
  color: var(--text-primary);
}

.settings-action-card.btn-primary:hover {
  background: linear-gradient(135deg, #FBCFE8 0%, #FED7AA 100%);
  transform: none;
}

.settings-action-card.btn-secondary,
.settings-action-card.btn-success {
  background: white;
}

.settings-action-card:hover {
  border-color: var(--border-color);
}

.settings-danger-btn {
  align-self: flex-start;
  padding: 14px 24px;
}

.settings-about {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.settings-about p {
  margin: 0 0 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.settings-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: #FAFBFC;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.settings-option-label {
  font-size: 1rem;
  color: var(--text-primary);
}

.settings-option-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  :root {
    --content-gutter: 28px;
    --content-gutter-right: 36px;
    --space-lg: 28px;
    --space-xl: 40px;
  }

  .settings-action-grid {
    grid-template-columns: 1fr;
  }

  .settings-profile {
    flex-wrap: wrap;
  }

  .settings-profile .btn {
    margin-left: 0;
    width: 100%;
  }
}

/* === 日历样式 === */
.calendar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.calendar-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.month-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.weekday {
  text-align: center;
  padding: 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--border-light);
  border-radius: var(--radius-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 20px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background-color: var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.calendar-day:hover {
  background-color: #E0F2FE;
  transform: translateY(-2px);
}

.calendar-day.empty {
  background-color: transparent;
  cursor: default;
}

.calendar-day.today {
  background-color: #FBCFE8;
  border-color: var(--primary-color);
}

.calendar-day.has-events {
  background-color: #E0F2FE;
}

.day-number {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.day-events {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.calendar-events-list {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.events-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.events-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  background-color: var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.event-item:hover {
  background-color: #F5F3FF;
  transform: translateX(4px);
}

.event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.event-type {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: white;
}

.event-status {
  font-size: 0.9375rem;
  font-weight: 500;
}

.event-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.event-time {
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-time i {
  margin-right: 4px;
}

.event-reminder {
  font-size: 1rem;
  color: var(--warning-color);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.event-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.event-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px;
  border: none;
  background-color: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-delete:hover {
  background-color: var(--danger-color);
  color: white;
}

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

.empty-events i {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

/* === 实验记录页面（简洁记事风格） === */
.exp-record-layout {
  --exp-macaron-default: #FAFBFC;
  --exp-macaron-completed: #FAFBFC;
  --exp-macaron-progress: #FAFBFC;
  --exp-macaron-pending: #FAFBFC;
  --exp-btn-primary: #3B82F6;
  --exp-btn-secondary: #F1F5F9;
  --exp-btn-danger: #FEF2F2;
  --exp-card-radius: 6px;
  --exp-card-shadow: none;
  --exp-accent: #3B82F6;
  --exp-accent-hover: #2563EB;
  --exp-accent-soft: #EFF6FF;
  --exp-accent-muted: #DBEAFE;
  --exp-surface: #FFFFFF;
  --exp-cream: #F8FAFC;
  --exp-mint-bg: transparent;
  --exp-border: #E2E8F0;
  --exp-border-light: #E8EAED;
  --exp-text: #1E293B;
  --exp-text-secondary: #475569;
  --exp-text-muted: #94A3B8;
  --exp-radius-xl: 8px;
  --exp-radius-lg: 8px;
  --exp-radius-md: 6px;
  --exp-shadow: none;
  --exp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);

  font-family: var(--font-family);
  display: flex;
  gap: var(--section-gap);
  min-height: calc(100vh - 220px);
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border: none;
  box-shadow: none;
}

.exp-record-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: white;
  border-radius: var(--exp-radius-xl);
  box-shadow: var(--exp-shadow-sm);
  border: 1px solid var(--exp-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.exp-record-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--exp-border-light);
}

.exp-sidebar-search {
  width: 100%;
}

.exp-sidebar-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.exp-sidebar-search-box i {
  position: absolute;
  left: 11px;
  color: #94A3B8;
  font-size: 0.8125rem;
  pointer-events: none;
}

.exp-sidebar-search-box input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--exp-border);
  border-radius: 8px;
  font-size: 0.8125rem;
  background: #FAFAF9;
  outline: none;
  color: var(--exp-text);
}

.exp-sidebar-search-box input:focus {
  border-color: #A78BFA;
  background: white;
}

.exp-search-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 12px;
  font-size: 0.8125rem;
  color: var(--exp-text-secondary);
}

.exp-search-clear-link {
  background: none;
  border: none;
  color: #7C3AED;
  cursor: pointer;
  font-size: 0.8125rem;
  padding: 0;
}

.exp-search-clear-link:hover {
  text-decoration: underline;
}

.exp-record-sidebar-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--exp-text);
}

.exp-record-sidebar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.exp-record-sidebar-actions .btn-ghost {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--exp-border);
  background: white;
  color: var(--exp-text);
  font-size: 1rem;
}

.exp-record-sidebar-actions .btn-primary {
  flex: 1;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.exp-document-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 32px;
}

.exp-doc-root-section {
  margin-top: 12px;
  padding-top: 20px;
  border-top: none;
}

.exp-doc-root-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--exp-text-secondary);
}

.exp-doc-root-title i {
  color: var(--exp-text-muted);
  font-size: 0.875rem;
}

.exp-doc-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: var(--exp-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  background: var(--exp-cream);
  border-radius: var(--exp-radius-md);
  border: 1px dashed var(--exp-border);
}

.exp-folder-container {
  margin-bottom: 12px;
}

.exp-folder-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--exp-radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.exp-folder-header:hover {
  background: var(--exp-cream);
}

.exp-folder-header i.fa-folder {
  color: var(--exp-text-muted);
  width: 16px;
  flex-shrink: 0;
}

.exp-folder-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--exp-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-folder-meta {
  color: var(--exp-text-muted);
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.exp-folder-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.exp-folder-content {
  margin-top: 6px;
  padding-left: 8px;
}

.exp-doc-item {
  margin-bottom: 10px;
}

.exp-doc-item-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--exp-radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.exp-doc-item-inner:hover {
  background: var(--exp-cream);
}

.exp-doc-item.active .exp-doc-item-inner {
  background: var(--exp-accent-soft);
  box-shadow: none;
}

.exp-doc-item-inner > i.fa-file-alt {
  color: var(--exp-text-muted);
  width: 16px;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.exp-doc-item.active .exp-doc-item-inner > i.fa-file-alt {
  color: var(--exp-accent);
}

.exp-doc-item-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--exp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exp-doc-item.active .exp-doc-item-title {
  color: var(--exp-accent-hover);
}

.exp-doc-item-date {
  color: var(--exp-text-muted);
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.exp-doc-item.active .exp-doc-item-date {
  color: var(--exp-text-muted);
}

.exp-doc-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.exp-doc-item-inner:hover .exp-doc-item-actions,
.exp-doc-item.active .exp-doc-item-actions {
  opacity: 1;
}

.exp-doc-item.active .exp-doc-icon-btn.move {
  background: var(--exp-accent-muted);
  color: var(--exp-accent-hover);
}

.exp-doc-item.active .exp-doc-icon-btn.delete {
  background: #FEE2E2;
  color: #DC2626;
}

.exp-doc-icon-btn {
  border: none;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1rem;
  transition: opacity 0.15s ease;
}

.exp-doc-icon-btn.move {
  background: #EDE9FE;
  color: #9B7EBD;
}

.exp-doc-icon-btn.delete {
  background: #FEE2E2;
  color: #DC2626;
}

.exp-doc-icon-btn:hover {
  opacity: 0.85;
}

.exp-record-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

.exp-editor-card {
  background: white;
  border-radius: var(--exp-radius-xl);
  box-shadow: var(--exp-shadow-sm);
  border: 1px solid var(--exp-border-light);
  overflow: hidden;
  min-height: 100%;
}

.exp-page-header {
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--exp-border-light);
}

.exp-page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.exp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.exp-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--exp-border-light);
  background: var(--exp-cream);
  color: var(--exp-text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none;
}

.exp-pill-btn:hover {
  background: white;
  border-color: var(--exp-border);
}

.exp-pill-btn.exp-pill-dark {
  background: #1C1917;
  color: white;
  border-color: #1C1917;
}

.exp-pill-btn.exp-pill-dark:hover {
  background: #292524;
}

.exp-title-main {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--exp-text);
  outline: none;
  margin: 0;
  padding: 0;
}

.exp-title-main::placeholder {
  color: var(--exp-text-muted);
}

.exp-meta-card {
  margin: 20px 32px 0;
  padding: 16px 20px 20px;
  background: var(--exp-surface);
  border-radius: var(--exp-card-radius);
  border: 1px solid var(--exp-border);
}

/* 基础信息 · 紧凑布局 */
.exp-record-layout .exp-meta-card.exp-module--basic {
  margin: 10px 32px 0;
  padding: 8px 14px 10px;
}

.exp-meta-card.exp-module--basic .exp-module-header {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom-color: var(--exp-border-light);
}

.exp-meta-card.exp-module--basic .exp-module-header h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--exp-text-secondary);
}

.exp-meta-card.exp-module--basic .exp-info-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 10px;
}

.exp-meta-card.exp-module--basic .exp-info-group label {
  font-size: 0.6875rem;
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--exp-text-muted);
}

.exp-meta-card.exp-module--basic .exp-input {
  padding: 5px 8px;
  font-size: 0.8125rem;
  border-radius: 6px;
  min-height: 0;
}

.exp-record-layout .btn-primary {
  background: var(--exp-btn-primary);
  color: #fff;
  border: none;
}

.exp-record-layout .btn-primary:hover {
  background: var(--exp-accent-hover);
}

.exp-record-layout .btn-secondary,
.exp-record-layout .btn-outline {
  background: var(--exp-btn-secondary);
  border: 1px solid var(--exp-border);
  color: var(--exp-text-secondary);
}

.exp-record-layout .btn-outline:hover {
  background: #E2E8F0;
  color: var(--exp-text);
}

.exp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--exp-card-radius);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.exp-btn-primary {
  background: var(--exp-btn-primary);
  color: #fff;
}

.exp-btn-primary:hover {
  background: var(--exp-accent-hover);
}

.exp-btn-secondary {
  background: var(--exp-btn-secondary);
  color: var(--exp-text-secondary);
  border-color: var(--exp-border);
}

.exp-btn-secondary:hover {
  background: #E2E8F0;
}

.exp-btn-danger {
  background: var(--exp-btn-danger);
  color: #DC2626;
  border-color: #FECACA;
}

.exp-btn-danger:hover {
  background: #FEE2E2;
}

.exp-btn-xs {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.exp-btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-card-radius);
  background: #fff;
  color: var(--exp-text-muted);
  cursor: pointer;
}

.exp-btn-icon.exp-btn-danger {
  background: var(--exp-btn-danger);
  color: #DC2626;
  border-color: #FECACA;
}

.exp-save-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--exp-text-secondary);
  padding: 0;
}

.last-save-time {
  font-size: 1rem;
  color: var(--exp-text-muted);
}

.save-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
}

.save-indicator.saved {
  background: #10B981;
}

.save-indicator.saving {
  background: #F59E0B;
  animation: pulse 1s infinite;
}

.save-indicator.error {
  background: #EF4444;
}

@media (max-width: 1024px) {
  .exp-record-layout {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .exp-record-sidebar {
    width: 100%;
    max-height: 260px;
  }

  .exp-page-header,
  .exp-blocks-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .exp-meta-card {
    margin-left: 24px;
    margin-right: 24px;
    padding: 20px;
  }

  .exp-record-layout .exp-meta-card.exp-module--basic {
    margin-left: 24px;
    margin-right: 24px;
    padding: 8px 12px 10px;
  }
}

/* === 实验记录编辑器样式 === */
.exp-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 28px;
}

.exp-info-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.exp-info-row:last-child {
  margin-bottom: 0;
}

.exp-info-group {
  flex: 1;
  min-width: 0;
}

.exp-info-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--exp-text-secondary);
  margin-bottom: 6px;
}

.exp-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  background: white;
  color: var(--exp-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.exp-input:focus {
  outline: none;
  border-color: var(--exp-border);
  box-shadow: 0 0 0 4px rgba(28, 25, 23, 0.04);
}

/* 工具栏 */
.exp-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid #EBE5DF;
  position: relative;
}

.exp-toolbar .toolbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #57534E;
  font-size: 1.0625rem;
  transition: all 0.2s ease;
}

.exp-toolbar .toolbar-btn:hover {
  background: #F5F5F4;
  color: #292524;
}

.exp-toolbar .toolbar-divider {
  width: 1px;
  height: 20px;
  background: #E7E5E4;
  margin: 0 6px;
}

/* 格式菜单 */
.format-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1px solid #EBE5DF;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 100;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 400px;
}

.format-menu.visible {
  display: flex;
}

.exp-blocks-section {
  padding: 14px 32px 32px;
}

.exp-blocks-header {
  margin-bottom: 32px;
}

.exp-blocks-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--exp-text);
}

.exp-blocks-hint {
  margin: 0;
  font-size: 1rem;
  color: var(--exp-text-muted);
  line-height: 1.5;
}

.exp-record-layout #blocksContainer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 模板模块卡片 */
.exp-record-layout .exp-module,
.exp-record-layout .exp-module--basic,
.exp-record-layout .exp-module--purpose,
.exp-record-layout .exp-module--materials,
.exp-record-layout .exp-module--timeline,
.exp-record-layout .exp-module--results,
.exp-record-layout .exp-module--conclusion,
.exp-record-layout .exp-module--rawdata,
.exp-record-layout .exp-module--reagents {
  background: var(--exp-surface);
  border-radius: var(--exp-card-radius);
  border: 1px solid var(--exp-border);
  padding: 16px 20px 20px;
}

.exp-reagents-hint {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--exp-text-muted);
  line-height: 1.5;
}

.exp-reagents-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--exp-text-muted);
  background: var(--exp-cream);
  border: 1px dashed var(--exp-border-light);
  border-radius: var(--exp-card-radius);
}

.exp-reagents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-reagent-card {
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-card-radius);
  background: #fff;
  overflow: hidden;
}

.exp-reagent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fff5f8 0%, #f0f7ff 100%);
  border-bottom: 1px solid var(--exp-border-light);
}

.exp-reagent-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--exp-text-secondary);
}

.exp-reagent-card-label i {
  margin-right: 6px;
  color: #e891a8;
}

.exp-reagent-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 14px;
}

.exp-reagent-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-reagent-field--full {
  grid-column: 1 / -1;
}

.exp-reagent-field span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--exp-text-muted);
}

.exp-reagent-field input,
.exp-reagent-field textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.875rem;
  border: 1px solid var(--exp-border);
  border-radius: 6px;
  background: var(--exp-cream);
  color: var(--exp-text-primary);
  font-family: inherit;
  resize: vertical;
}

.exp-reagent-field input:focus,
.exp-reagent-field textarea:focus {
  outline: none;
  border-color: var(--exp-accent);
  background: #fff;
}

@media (max-width: 640px) {
  .exp-reagent-fields {
    grid-template-columns: 1fr;
  }
}

.exp-rawdata-hint {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--exp-text-muted);
  line-height: 1.5;
}

.exp-rawdata-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  margin-bottom: 14px;
  border: 1px dashed var(--exp-border);
  border-radius: var(--exp-card-radius);
  background: var(--exp-cream);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.exp-rawdata-dropzone:hover,
.exp-rawdata-dropzone.dragover {
  border-color: var(--exp-accent);
  background: var(--exp-accent-soft);
}

.exp-rawdata-dropzone i {
  font-size: 1.5rem;
  color: var(--exp-text-muted);
}

.exp-rawdata-dropzone span {
  font-size: 0.875rem;
  color: var(--exp-text-secondary);
}

.exp-rawdata-formats {
  font-size: 0.75rem !important;
  color: var(--exp-text-muted) !important;
}

.exp-rawdata-dropzone input {
  display: none;
}

.exp-rawdata-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--exp-text-muted);
  background: var(--exp-cream);
  border: 1px dashed var(--exp-border-light);
  border-radius: var(--exp-card-radius);
}

.exp-rawdata-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-rawdata-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-card-radius);
  background: #fff;
}

.exp-rawdata-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--exp-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #059669;
}

.exp-rawdata-item-icon .fa-chart-line {
  color: #7C3AED;
}

.exp-rawdata-item-icon .fa-file-pdf {
  color: #DC2626;
}

.exp-rawdata-item-body {
  flex: 1;
  min-width: 0;
}

.exp-rawdata-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--exp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 4px;
}

.exp-rawdata-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--exp-text-muted);
  margin-bottom: 8px;
}

.exp-rawdata-note {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--exp-border);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--exp-text);
  background: #fff;
}

.exp-rawdata-note:focus {
  outline: none;
  border-color: var(--exp-accent);
}

.exp-rawdata-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.exp-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--exp-border-light);
}

.exp-module-header h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--exp-text);
}

.exp-module-header h3 i {
  display: none;
}

.exp-module-hint {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.exp-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: #F1F5F9;
  border-radius: 12px;
  width: fit-content;
}

.exp-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #64748B;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exp-view-tab:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.6);
}

.exp-view-tab.active {
  background: #fff;
  color: #2563EB;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.exp-legacy-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94A3B8;
  margin-left: 8px;
}

.exp-record-layout .protocol-outline-wrap {
  margin-top: 0;
}

.exp-record-layout #expMindmapPanel {
  margin-top: 0;
}

.exp-module-textarea,
.exp-step-textarea {
  width: 100%;
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-card-radius);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--exp-text);
  background: #fff;
  resize: vertical;
  outline: none;
}

.exp-module-textarea:focus,
.exp-step-textarea:focus {
  border-color: var(--exp-accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

/* 时间轴 */
.exp-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exp-timeline-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: stretch;
}

.exp-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}

.exp-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--exp-text);
  box-shadow: var(--exp-card-shadow);
  flex-shrink: 0;
}

.exp-timeline-line {
  flex: 1;
  width: 2px;
  margin-top: 6px;
  background: rgba(51, 45, 41, 0.12);
  min-height: 24px;
}

.exp-timeline-step:last-child .exp-timeline-line {
  display: none;
}

.exp-timeline-card {
  border-radius: var(--exp-card-radius);
  border: 1px solid var(--exp-border);
  border-left-width: 3px;
  padding: 14px 16px;
  background: #fff;
}

.exp-timeline-step--pending .exp-timeline-card {
  border-left-color: #94A3B8;
}

.exp-timeline-step--in_progress .exp-timeline-card {
  border-left-color: #F59E0B;
}

.exp-timeline-step--completed .exp-timeline-card {
  border-left-color: #22C55E;
}

.exp-timeline-step--pending .exp-timeline-dot { background: #94A3B8; }
.exp-timeline-step--in_progress .exp-timeline-dot { background: #F59E0B; }
.exp-timeline-step--completed .exp-timeline-dot { background: #22C55E; }

.exp-timeline-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.exp-timeline-step-no {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--exp-text-secondary);
}

.exp-step-status,
.exp-step-time {
  border: 1px solid var(--exp-border);
  border-radius: var(--exp-card-radius);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.8125rem;
  background: #fff;
  color: var(--exp-text);
}

.exp-step-time {
  min-width: 108px;
}

.exp-step-delete {
  margin-left: auto;
}

.exp-timeline-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.exp-timeline-field span {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--exp-text-secondary);
  margin-bottom: 6px;
}

.exp-step-attachments {
  display: grid;
  gap: 12px;
}

.exp-step-attachment-block {
  background: var(--exp-cream);
  border: 1px solid var(--exp-border-light);
  border-radius: var(--exp-card-radius);
  padding: 12px;
}

.exp-step-attachment-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--exp-text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exp-step-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.exp-step-image-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: var(--exp-card-radius);
  overflow: hidden;
  box-shadow: var(--exp-card-shadow);
}

.exp-step-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exp-step-image-item .exp-btn-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.exp-step-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--exp-card-radius);
  background: var(--exp-btn-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--exp-card-shadow);
}

.exp-step-table-wrap {
  overflow-x: auto;
}

.exp-step-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--exp-card-radius);
  overflow: hidden;
  box-shadow: var(--exp-card-shadow);
}

.exp-step-table th,
.exp-step-table td {
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0;
}

.exp-step-table th {
  white-space: nowrap;
}

.exp-step-table-head,
.exp-step-table-cell {
  width: 100%;
  border: none;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.875rem;
  background: transparent;
  outline: none;
}

.exp-step-table-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.exp-step-file-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.exp-step-file-name,
.exp-step-file-path {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--exp-card-radius);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--exp-card-shadow);
  outline: none;
}

@media (max-width: 1024px) {
  .exp-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .exp-meta-card.exp-module--basic .exp-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 10px;
  }

  .exp-step-file-row {
    grid-template-columns: 1fr;
  }

  .exp-step-time {
    margin-left: 0;
  }
}

.block-editor {
  min-height: 80px;
  padding: 12px 16px;
  background: #FAFAF9;
  border-radius: 12px;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #292524;
  outline: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.block-editor:focus {
  border-color: #A78BFA;
  background: white;
}

.block-editor:empty:before {
  content: attr(placeholder);
  color: #9CA3AF;
  pointer-events: none;
}

/* 添加区块按钮 */
.add-block-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  margin-top: 8px;
  border: 2px dashed #D6D3D1;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  color: #9CA3AF;
  font-size: 1.0625rem;
  transition: all 0.2s ease;
}

.add-block-btn:hover {
  border-color: #A78BFA;
  color: #A78BFA;
  background: rgba(167, 139, 250, 0.05);
}

/* 添加区块菜单 */
.add-block-menu {
  position: absolute;
  top: 0;
  background: white;
  border: 1px solid #EBE5DF;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.add-block-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #57534E;
  font-size: 1.0625rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.add-block-menu button:hover {
  background: #F5F5F4;
}

/* 底部操作栏 */
.exp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: #FBF8F4;
  border-top: 1px solid #EBE5DF;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.0625rem;
  color: #57534E;
}

.save-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.save-indicator.saving {
  background: #F59E0B;
  animation: pulse 1s infinite;
}

.save-indicator.saved {
  background: #10B981;
}

.save-indicator.error {
  background: #EF4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.footer-actions {
  display: flex;
  gap: 12px;
}

.btn-outline {
  padding: 10px 20px;
  border: 1px solid #D6D3D1;
  border-radius: 12px;
  background: white;
  color: #57534E;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  border-color: #A78BFA;
  color: #7C3AED;
}

/* === 日期日程选择弹窗样式 === */
.date-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: #FAFAF9;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-event-item:hover {
  background-color: #F5F3FF;
  transform: translateX(4px);
}

.date-event-time {
  font-size: 1rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.date-event-title {
  flex: 1;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
}

.date-event-type {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: white;
}

/* === Dashboard 今日日程卡片 === */
.today-events-card {
  background: linear-gradient(160deg, #FFF8F0 0%, #FED7AA 50%, #FBCFE8 100%);
  border-color: rgba(254, 215, 170, 0.5);
}

.dashboard .dashboard-content-row > .dashboard-section:first-child {
  background: linear-gradient(160deg, #FFF8FA 0%, #FCE7F3 48%, #FBCFE8 100%);
  border-color: rgba(251, 207, 232, 0.5);
}

.dashboard .dashboard-section-wide {
  background: linear-gradient(160deg, #F0F9FF 0%, #DBEAFE 48%, #BFDBFE 100%);
  border-color: rgba(147, 197, 253, 0.5);
}

.dashboard .dashboard-quick-access {
  background: linear-gradient(160deg, #FAF5FF 0%, #EDE9FE 48%, #DDD6FE 100%);
  border-color: rgba(196, 181, 253, 0.5);
}

.dashboard .dashboard-section .section-header {
  background: rgba(255, 255, 255, 0.22);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.today-events-count {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.today-events-label {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.today-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.today-event-item {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 12px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.today-event-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-event-time {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-left: 12px;
}

/* 移动端导航 */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-overlay {
  display: none;
  background: rgba(15, 23, 42, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 20px;
  }
  
  #app {
    height: calc(100vh - 40px);
    border-radius: 24px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.mobile-nav-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    width: min(280px, 86vw);
    padding: 24px 16px 32px;
    border-radius: 0 20px 20px 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }
  
  .page-container {
    padding: 32px 28px 40px 20px;
  }
  
  .topbar {
    padding: 20px 20px 16px;
    gap: 12px;
  }

  .topbar-primary {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-aside {
    width: 100%;
    justify-content: flex-end;
    padding-top: 0;
  }

  .topbar-toolbar {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 10px;
  }

  .topbar-search-wrap {
    flex: 1 1 100%;
    max-width: none;
  }

  #headerActions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .doc-layout {
    flex-direction: column;
  }
  
  .doc-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--doc-border);
  }
  
  .doc-title {
    font-size: 1.4rem;
  }
}

/* === 登录页面通用样式 === */
.login-container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  margin: 20px;
}

.login-brand {
  text-align: center;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-brand-icon i {
  font-size: 32px;
  color: white;
}

.login-brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.login-brand-subtitle {
  font-size: 1.0625rem;
  color: #6b7280;
  margin: 4px 0 0;
}

.login-form-group {
  margin-bottom: 20px;
}

.login-form-label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.login-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.login-form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.login-form-input::placeholder {
  color: #9ca3af;
}

.login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.login-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.login-btn-primary:active {
  transform: translateY(0);
}

.login-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.login-btn-secondary:hover {
  background: #e5e7eb;
}

.login-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
  display: none;
}

.login-error.show {
  display: block;
}

.login-success {
  background: #dcfce7;
  color: #16a34a;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
  display: none;
}

.login-success.show {
  display: block;
}

.login-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff33;
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-link {
  display: block;
  text-align: center;
  color: #667eea;
  text-decoration: none;
  font-size: 1rem;
  margin-top: 16px;
  transition: color 0.2s ease;
}

.login-link:hover {
  color: #764ba2;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.login-divider-text {
  font-size: 1rem;
  color: #6b7280;
}

/* === 云端同步状态指示 === */
.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f3f4f6;
}

.sync-status.syncing {
  color: #3b82f6;
}

.sync-status.synced {
  color: #10b981;
}

.sync-status.error {
  color: #ef4444;
}

/* === 用户头像/信息样式 === */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 20px;
  background: #f3f4f6;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-info:hover {
  background: #e5e7eb;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.user-email {
  font-size: 1rem;
  color: #374151;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 甘特图样式 ========== */

/* 甘特图页面容器 */
.gantt-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 统计卡片区域 */
.gantt-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.2;
}

.stat-label {
  font-size: 1rem;
  color: #6B7280;
  margin-top: 2px;
}

/* 工具栏 */
.gantt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.view-controls {
  display: flex;
  gap: 8px;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: white;
  color: #6B7280;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.view-btn.active {
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-color: #6366F1;
  color: white;
}

.project-filter select {
  padding: 10px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: white;
  color: #374151;
  font-size: 1rem;
  cursor: pointer;
  min-width: 160px;
}

.project-filter select:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* 甘特图容器 */
.gantt-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* 空状态 */
.gantt-empty {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(135deg, #E0E7FF, #F3E8FF);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #6366F1;
  font-size: 2.5rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.empty-desc {
  color: #6B7280;
  margin-bottom: 24px;
}

/* 甘特图图表 */
.gantt-chart {
  overflow-x: auto;
}

.gantt-header {
  display: flex;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-bottom: 1px solid #E5E7EB;
}

.gantt-header-left {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid #E5E7EB;
}

.gantt-header-right {
  flex: 1;
  display: flex;
  min-width: 600px;
}

.gantt-date-cell {
  flex: 1;
  text-align: center;
  padding: 12px 4px;
  border-right: 1px solid #F3F4F6;
  position: relative;
}

.gantt-date-cell:last-child {
  border-right: none;
}

.date-label {
  font-size: 1rem;
  color: #6B7280;
  font-weight: 500;
}

.date-label.today {
  color: #6366F1;
  font-weight: 600;
}

.today-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-radius: 2px;
}

/* 甘特图主体 */
.gantt-body {
  max-height: calc(100vh - 450px);
  overflow-y: auto;
}

.gantt-task-row {
  display: flex;
  border-bottom: 1px solid #F3F4F6;
  transition: background 0.2s ease;
}

.gantt-task-row:hover {
  background: #FAFAFA;
}

.gantt-task-info {
  width: 280px;
  flex-shrink: 0;
  padding: 16px;
  border-right: 1px solid #E5E7EB;
}

.task-name {
  font-weight: 600;
  color: #1F2937;
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-item {
  font-size: 0.9375rem;
  color: #6B7280;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid;
}

/* 任务时间轴 */
.gantt-task-timeline {
  flex: 1;
  position: relative;
  padding: 12px 0;
  min-width: 600px;
}

.gantt-task-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.gantt-task-bar:hover {
  transform: translateY(-50%) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-bar-label {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* 任务详情提示框 */
.gantt-tooltip {
  position: fixed;
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 360px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.gantt-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-header {
  padding: 14px 16px;
  border-bottom: 1px solid;
}

.tooltip-title {
  font-weight: 600;
  color: #1F2937;
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

.tooltip-status {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid;
}

.tooltip-body {
  padding: 14px 16px;
}

.tooltip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 1rem;
  color: #4B5563;
  border-bottom: 1px solid #F3F4F6;
}

.tooltip-item:last-child {
  border-bottom: none;
}

.tooltip-item i {
  width: 16px;
  color: #9CA3AF;
}

/* 甘特图表单 */
.gantt-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gantt-form .form-row {
  display: flex;
  gap: 16px;
}

.gantt-form .form-group {
  flex: 1;
}

.gantt-form label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.gantt-form .form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-size: 1.0625rem;
  background: white;
  transition: all 0.2s ease;
}

.gantt-form .form-input:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.gantt-form .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-size: 1.0625rem;
  background: white;
  min-height: 100px;
  resize: vertical;
  transition: all 0.2s ease;
}

.gantt-form .form-textarea:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* 响应式适配 */
@media (max-width: 1024px) {
  .gantt-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gantt-stats {
    grid-template-columns: 1fr;
  }
  
  .gantt-toolbar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .view-controls {
    justify-content: center;
  }
  
  .project-filter select {
    width: 100%;
  }
  
  .gantt-task-info {
    width: 200px;
  }
}

/* ====== 结构化实验记录页面样式 ====== */

.structured-experiment-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: auto;
  background: #F8FAFC;
}

/* 顶部工具栏 */
.exp-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #E2E8F0;
  gap: 20px;
}

.exp-top-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exp-title-input {
  font-size: 1.5rem;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 0;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.exp-title-input:focus {
  border-bottom-color: var(--primary-color);
}

.exp-meta-inline {
  display: flex;
  gap: 20px;
  align-items: center;
}

.exp-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exp-meta-item label {
  font-size: 1rem;
  color: #64748B;
  font-weight: 500;
}

.exp-date-input,
.exp-person-input {
  padding: 6px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.exp-date-input:focus,
.exp-person-input:focus {
  border-color: var(--primary-color);
}

.exp-status-select {
  padding: 6px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.exp-status-select:focus {
  border-color: var(--primary-color);
}

.exp-top-right {
  display: flex;
  gap: 12px;
}

/* 主内容区 */
.exp-main-content {
  display: flex;
  flex: 1;
  overflow: auto;
}

.exp-left-content {
  flex: 1;
  overflow-y: visible;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

/* 卡片样式 */
.exp-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: visible;
  min-height: auto;
}

.exp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(to right, #F8FAFC, #FFFFFF);
  border-bottom: 1px solid #E2E8F0;
}

.exp-card-header i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.exp-card-header h3 {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.exp-card-body {
  padding: 20px;
  min-height: auto;
  overflow: visible;
}

/* 表单网格 */
.exp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.exp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-form-group.full-width {
  grid-column: 1 / -1;
}

.exp-form-group label {
  font-size: 1rem;
  font-weight: 500;
  color: #475569;
}

.exp-form-group input,
.exp-form-group select,
.exp-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  background: white;
}

.exp-form-group input:focus,
.exp-form-group select:focus,
.exp-form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.exp-form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* 表格样式 */
.table-responsive {
  overflow-x: auto;
}

.exp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.exp-table thead {
  background: #F8FAFC;
}

.exp-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #E2E8F0;
  white-space: nowrap;
}

.exp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F1F5F9;
}

.exp-table tbody tr:hover {
  background: #F8FAFC;
}

.exp-table input,
.exp-table select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.exp-table input:focus,
.exp-table select:focus {
  border-color: var(--primary-color);
}

/* 荧光标签 */
.fluor-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-left: 6px;
}

.fluor-tag-green {
  background: #D1FAE5;
  color: #065F46;
}

.fluor-tag-red {
  background: #FEE2E2;
  color: #991B1B;
}

/* 结果文件卡片 */
.result-files-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.result-file-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.result-file-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.file-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border-bottom: 1px solid #E2E8F0;
}

.file-card-header i {
  color: var(--primary-color);
}

.file-name {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: #1E293B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-body {
  padding: 12px;
}

.file-size {
  font-size: 0.9375rem;
  color: #64748B;
  margin-bottom: 8px;
}

.file-preview {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

/* 待办事项列表 */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
}

.todo-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.todo-text {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  padding: 4px;
}

.todo-text:focus {
  background: white;
  border-radius: 4px;
  padding: 4px 8px;
}

/* 右侧边栏 */
.exp-sidebar {
  width: 300px;
  min-width: 280px;
  background: white;
  border-left: 1px solid #E2E8F0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.sidebar-card {
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.sidebar-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #E2E8F0;
}

.sidebar-card-header i {
  color: var(--primary-color);
  font-size: 1rem;
}

.sidebar-card-header h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.sidebar-card-body {
  padding: 16px;
}

.sidebar-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.sidebar-info-item:last-child {
  margin-bottom: 0;
}

.sidebar-info-item label {
  font-size: 0.9375rem;
  color: #64748B;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-info-item span {
  font-size: 1rem;
  color: #1E293B;
  font-weight: 500;
}

/* 标签输入 */
.tag-input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag-input-container input {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
}

.tag-input-container input:focus {
  border-color: var(--primary-color);
}

.tag-input-container .btn {
  white-space: nowrap;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 16px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.exp-tag button {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.exp-tag button:hover {
  opacity: 1;
}

/* 按钮样式 */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.9375rem;
}

.btn-outline {
  background: white;
  border: 1px solid #E2E8F0;
  color: #475569;
}

.btn-outline:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.btn-icon {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .exp-main-content {
    flex-direction: column;
  }
  
  .exp-sidebar {
    width: 100%;
    border-left: none;
    border-top: 1px solid #E2E8F0;
    max-height: 300px;
  }
  
  .exp-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .exp-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .exp-top-right {
    justify-content: flex-end;
  }
  
  .exp-meta-inline {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .exp-left-content {
    padding: 16px;
  }
  
  .result-files-container {
    grid-template-columns: 1fr;
  }
}

/* ========== AI 科研助手 ========== */
.eln-ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.eln-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.45);
}

.eln-ai-fab.active {
  opacity: 0;
  pointer-events: none;
}

.eln-ai-fab--pending {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
}

.eln-ai-fab--inactive {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  box-shadow: 0 8px 24px rgba(100, 116, 139, 0.25);
}

.eln-ai-context-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.eln-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.4;
}

.eln-ai-badge--ok {
  background: #ecfdf5;
  color: #047857;
}

.eln-ai-badge--warn {
  background: #fffbeb;
  color: #b45309;
}

.eln-ai-badge--muted {
  background: #f3f4f6;
  color: #6b7280;
}

.eln-ai-badge--mock {
  background: #eef2ff;
  color: #4338ca;
}

.eln-ai-scenario {
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.eln-ai-scenario-label {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.eln-ai-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.eln-ai-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  background: #fff;
  color: #312e81;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.eln-ai-action-btn i {
  width: 18px;
  color: #6366f1;
}

.eln-ai-action-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.eln-ai-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.eln-ai-action-btn--busy {
  pointer-events: none;
}

.eln-ai-empty--left {
  text-align: left;
  padding: 12px 0;
}

.eln-ai-setup-card {
  padding: 12px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.5;
}

.eln-ai-setup-card p {
  margin: 0 0 10px;
}

.eln-ai-local {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.eln-ai-local-label {
  font-size: 0.75rem;
  color: #6b7280;
  width: 100%;
}

.eln-ai-chip--local {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.eln-ai-context-preview {
  margin: 0 14px;
  font-size: 0.75rem;
  color: #6b7280;
}

.eln-ai-context-preview pre {
  margin: 8px 0 0;
  padding: 10px;
  max-height: 120px;
  overflow: auto;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.eln-ai-input-hint {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: #9ca3af;
}

.eln-ai-msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.eln-ai-insert {
  border: none;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.pdf-export-host {
  position: fixed;
  left: -9999px;
  top: 0;
}

.pdf-export-doc {
  width: 190mm;
  padding: 16mm 14mm;
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  color: #111;
  background: #fff;
}

.pdf-export-header h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.pdf-meta-line,
.pdf-category {
  margin: 4px 0;
  font-size: 13px;
  color: #555;
}

.pdf-export-body h2 {
  margin: 18px 0 8px;
  font-size: 15px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
}

.pdf-export-body ul {
  margin: 0;
  padding-left: 18px;
}

.pdf-export-body li {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}

.pdf-reagent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}

.pdf-reagent-table th,
.pdf-reagent-table td {
  border: 1px solid #ddd;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.pdf-export-footer {
  margin-top: 24px;
  font-size: 11px;
  color: #888;
}

.eln-ai-panel {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.eln-ai-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.eln-ai-panel-inner {
  width: 100%;
  max-width: 420px;
  max-height: min(80vh, 640px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.eln-ai-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
}

.eln-ai-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #312e81;
}

.eln-ai-header h3 i {
  margin-right: 6px;
}

.eln-ai-subtitle {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}

.eln-ai-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.eln-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}

.eln-ai-chip {
  border: 1px solid #ddd6fe;
  background: #faf5ff;
  color: #5b21b6;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

.eln-ai-chip:hover {
  background: #ede9fe;
}

.eln-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}

.eln-ai-empty {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.6;
  text-align: center;
  padding: 24px 12px;
}

.eln-ai-empty a {
  color: #4f46e5;
}

.eln-ai-msg {
  border-radius: 10px;
  padding: 10px 12px;
}

.eln-ai-msg--user {
  background: #eef2ff;
  align-self: flex-end;
  max-width: 92%;
}

.eln-ai-msg--assistant {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  align-self: flex-start;
  max-width: 96%;
}

.eln-ai-msg-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 4px;
}

.eln-ai-msg-body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}

.eln-ai-copy {
  margin-top: 8px;
  border: none;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.eln-ai-input-wrap {
  border-top: 1px solid #e5e7eb;
  padding: 12px 14px;
}

.eln-ai-input-wrap textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.eln-ai-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}

.eln-ai-context-toggle {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exp-btn-ai {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  border: none;
}

.exp-btn-ai:hover {
  filter: brightness(1.05);
}

.settings-ai-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-ai-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-ai-field span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary, #4b5563);
}

.settings-ai-field input,
.settings-ai-field select {
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .eln-ai-panel {
    padding: 0;
    align-items: stretch;
  }

  .eln-ai-panel-inner {
    max-width: none;
    max-height: 100vh;
    border-radius: 16px 16px 0 0;
  }
}