:root {
  --bg: #e8edf5;
  --shell-sidebar-bg: linear-gradient(180deg, #dceafa 0%, #d4e8fc 48%, #cfe4fc 100%);
  --shell-main-bg: #eef6fd;
  --shell-card-radius: 16px;
  --surface: #ffffff;
  --surface2: #f1f4fa;
  --text: #1a2332;
  --muted: #5c6b7a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #c8d4e6;
  --success: #16a34a;
  --shadow-sm: 0 4px 20px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.1);
  --top-header-bg: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 100%);
  --top-header-border: #bfdbfe;
  --btn-sky-bg: #dbeafe;
  --btn-sky-border: #93c5fd;
  --btn-sky-text: #1e3a8a;
  --btn-sky-hover: #bfdbfe;
  --wc-delete-bg: #dc2626;
  --wc-delete-border: #b91c1c;
  --wc-delete-hover: #b91c1c;
  --radius: 12px;
  --font: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(165deg, #e8f2fc 0%, #eef6fd 45%, #f4f8fd 100%);
  color: var(--text);
  line-height: 1.5;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.admin-workspace #app {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.admin-workspace {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  --app-sidebar-width: max(240px, min(280px, 28vw));
  --app-sidebar-rail: 10px;
}

body.admin-workspace.app-sidebar-rail-collapsed {
  --app-sidebar-width: var(--app-sidebar-rail);
}

body.admin-workspace .app-admin-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background: var(--top-header-bg);
  border-bottom: 1px solid var(--top-header-border);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}

.app-brand {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.app-session-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.app-session-actions.hidden {
  display: none !important;
}

.session-display-user {
  font-size: 0.88rem;
  color: var(--text);
}

.btn-session-logout {
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
}

.view {
  display: none;
  min-height: 100vh;
  padding-bottom: 2rem;
}

.view.active {
  display: block;
}

/* 仅当前激活页用 flex；勿对 .app-view-page 单独写 display，否则会覆盖上方 .view 的 display:none，导致所有板块同时露出 */
.view.app-view-page.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-bottom: 0.5rem;
}

.view.app-view-page.active > .container,
.view.app-view-page.active > .container-page-wide {
  flex: 1;
  min-width: 0;
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr minmax(5rem, auto);
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.top-bar--home {
  grid-template-columns: 1fr;
  justify-items: center;
}

.top-bar--home .top-bar-title {
  grid-column: 1;
}

.top-bar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  justify-self: center;
  grid-column: 2;
}

.top-bar-back {
  grid-column: 1;
  justify-self: start;
}

.top-bar-end {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.container.narrow {
  max-width: 480px;
}

.container.entry-container {
  max-width: 560px;
}

/* 管理 / 查看：全宽内容，窄屏可横向拖动 */
.container-page-wide {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1rem clamp(0.5rem, 1.25vw, 1.25rem);
  box-sizing: border-box;
}

.page-content-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.pagination-bar {
  margin-top: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.pagination-bar.hidden {
  display: none !important;
}

.pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.pagination-meta {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.pagination-bar .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-panel {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.filter-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.filter-panel-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.filter-panel--compact {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
}

.filter-panel--compact .filter-panel-title {
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}

.filter-panel--compact .filter-panel-hint {
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.filter-panel--compact .filter-form {
  gap: 0.38rem 0.55rem;
}

.filter-panel--compact .filter-form-actions {
  padding-top: 0.15rem;
}

/* 完成量管理筛选：含顶部导出条与可折叠条件区 */
.filter-panel--manage {
  padding: 0.65rem 0.85rem;
}

.filter-panel-manage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.filter-panel--manage .filter-panel-title {
  margin-bottom: 0;
}

.filter-panel-details {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.75rem;
}

.filter-panel-details-summary {
  cursor: pointer;
  color: var(--primary, #2563eb);
  user-select: none;
  list-style: none;
}

.filter-panel-details-summary::-webkit-details-marker {
  display: none;
}

.filter-panel-details .filter-panel-hint {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.5rem;
  background: var(--surface2, #f1f5f9);
  border-radius: 6px;
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
}

.filter-form--manage {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.4rem 0.55rem;
}

@media (min-width: 900px) {
  .filter-form--manage {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* 完成量管理：导出条始终在筛选折叠区域外 */
.manage-filter-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.manage-filter-export-bar.hidden {
  display: none !important;
}

.btn-manage-export {
  min-width: clamp(8.5rem, 26vw, 11rem);
  padding: 0.42rem 1rem;
  font-size: 0.82rem;
  line-height: 1.3;
  justify-content: center;
  box-sizing: border-box;
}

.manage-filter-details {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.manage-filter-details-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0.75rem;
  margin: 0;
  user-select: none;
}

.manage-filter-details-summary::-webkit-details-marker {
  display: none;
}

.manage-filter-details-summary__leading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.manage-filter-chevron {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #3b82f6;
  border-bottom: 2px solid #3b82f6;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.manage-filter-details[open] .manage-filter-chevron {
  transform: rotate(45deg);
  margin-top: -0.1rem;
}

.manage-filter-details-summary__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e3a5f;
}

.manage-filter-details-summary__hint {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
}

.manage-filter-details-body {
  padding: 0.6rem 0.75rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.manage-filter-manage-subhead {
  margin-bottom: 0.5rem;
}

.manage-filter-manage-subhead .filter-panel-details {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
}

/* 完成量管理表单：栅格对齐，标签区等高、输入底对齐 */
#view-manage .filter-form--manage {
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
}

@media (min-width: 900px) {
  #view-manage .filter-form--manage {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

#view-manage .filter-form--manage > label {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  margin: 0;
}

#view-manage .filter-form--manage > label > span {
  min-height: 2.35em;
  display: flex;
  align-items: flex-end;
  line-height: 1.28;
}

#view-manage .filter-form--manage .manage-filter-date-strip {
  margin-bottom: 0;
}

#view-manage .filter-form-last-row--manage {
  display: grid;
  grid-template-columns: 1fr minmax(12rem, 20%);
  gap: 0.65rem 0.85rem;
  align-items: end;
}

#view-manage .filter-form-query-slot--manage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  align-items: stretch;
  justify-items: stretch;
}

#view-manage .btn-manage-filter-action {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
  line-height: 1.25;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .manage-filter-export-bar {
    justify-content: stretch;
  }

  .manage-filter-export-bar .btn-manage-export {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 0;
  }

  #view-manage .filter-form-last-row--manage {
    grid-template-columns: 1fr;
  }

  #view-manage .filter-form-query-slot--manage {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
  }
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.55rem 0.75rem;
  align-items: end;
}

.filter-form label span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.filter-form label input {
  width: 100%;
}

.filter-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.filter-form label .filter-input-wrap input,
.filter-last-row-workload .filter-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 1.7rem;
}

.filter-input-clear {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.filter-input-wrap--has-value .filter-input-clear {
  display: flex;
}

.filter-input-clear:hover {
  background: rgba(180, 40, 40, 0.14);
  color: #b91c1c;
}

.filter-input-clear:focus-visible {
  outline: 2px solid var(--focus-ring, #3b82f6);
  outline-offset: 1px;
}

.filter-span-2 {
  grid-column: span 2;
}

@media (max-width: 520px) {
  .filter-span-2 {
    grid-column: span 1;
  }
}

/* 筛选末行：作业内容占宽 + 右侧 1/16 宽「查询」 */
.filter-form-last-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr minmax(5.5rem, 26%);
  gap: 0.55rem 0.75rem;
  align-items: end;
}

.filter-last-row-workload {
  min-width: 0;
  display: block;
}

.filter-last-row-workload span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.filter-last-row-workload input {
  width: 100%;
  box-sizing: border-box;
}

.filter-form-query-slot {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.filter-form-query-slot .btn {
  flex-shrink: 0;
}

.btn-filter-action--narrow {
  flex: 0 0 auto;
  padding: 0.28rem 0.4rem;
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.btn-filter-query--narrow {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.28rem 0.12rem;
  font-size: 0.68rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.filter-form-actions--export-only {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

@media (max-width: 520px) {
  .filter-form-last-row {
    grid-template-columns: 1fr minmax(5rem, 40%);
  }
}

.filter-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
}


.btn-export-sheet,
.btn-filter-query {
  flex: 0 0 auto;
  min-width: unset;
  max-width: none;
  padding: 0.36rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.25;
  box-sizing: border-box;
  white-space: nowrap;
}

.btn.primary.btn-export-sheet,
.btn.primary.btn-filter-query {
  background: var(--btn-sky-bg);
  border-color: var(--btn-sky-border);
  color: var(--btn-sky-text);
}

.btn.primary.btn-export-sheet:hover,
.btn.primary.btn-filter-query:hover {
  background: var(--btn-sky-hover);
  border-color: #60a5fa;
  color: #172554;
}

.filter-form-actions--with-export {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

/* 查看信息：导出单独一行时仍用天蓝色主按钮样式 */
.filter-form-actions--export-only .btn-export-sheet,
.filter-form-actions--export-only .btn-export-docx {
  flex: 0 0 auto;
  padding: 0.36rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: nowrap;
}

.btn.primary.btn-export-docx {
  background: var(--btn-sky-bg);
  border-color: var(--btn-sky-border);
  color: var(--btn-sky-text);
}

.btn.primary.btn-export-docx:hover {
  background: var(--btn-sky-hover);
  border-color: #60a5fa;
  color: #172554;
}

.data-table .cell-list-select {
  width: 2.5rem;
  min-width: 2.5rem;
  text-align: center;
  vertical-align: middle;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.data-table .cell-list-select .list-row-check,
.data-table .list-select-all {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  vertical-align: middle;
}

.analytics-intro {
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
}

.analytics-intro .filter-panel-hint {
  margin: 0;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 1rem;
  align-items: start;
}

.analytics-view-panel.hidden {
  display: none !important;
}

.analytics-cumulative-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1rem;
  align-items: start;
}

.analytics-cumulative-aside {
  padding: 1rem 1.1rem;
  position: sticky;
  top: 0.75rem;
}

.analytics-cumulative-body.card {
  padding: 0.85rem 1rem;
  min-width: 0;
}

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

.analytics-cumulative-table th,
.analytics-cumulative-table td {
  white-space: nowrap;
}

.analytics-cumulative-table td:nth-child(1),
.analytics-cumulative-table td:nth-child(2) {
  white-space: normal;
  max-width: 10rem;
}

.analytics-dm-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  min-height: 2rem;
}

.analytics-dm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.35rem 0.2rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.3;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.analytics-dm-chip-remove {
  margin: 0;
  padding: 0 0.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.65;
}

.analytics-dm-chip-remove:hover {
  opacity: 1;
}

.analytics-seg-run-btn {
  width: 100%;
}

.analytics-seg-workshop {
  margin-bottom: 1.25rem;
}

.analytics-seg-workshop-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.analytics-seg-line-block {
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.analytics-seg-line-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.analytics-seg-extra-hint {
  margin: 0.65rem 0 0.35rem;
}

@media (max-width: 768px) {
  .analytics-layout {
    grid-template-columns: 1fr;
  }

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

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 70%);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 768px) {
  .feedback-layout {
    grid-template-columns: 1fr;
  }
}

.feedback-sidebar {
  padding: 1rem 1.1rem;
  position: sticky;
  top: 0.75rem;
}

.feedback-sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.feedback-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feedback-nav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
}

.feedback-nav-btn:hover {
  background: var(--surface);
}

.feedback-nav-btn.active {
  border-color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

.feedback-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.feedback-panel.hidden {
  display: none !important;
}

.feedback-entry-tabs {
  margin-bottom: 0.75rem;
}

.feedback-type-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.feedback-type-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.feedback-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1.25rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.feedback-desc-label span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.feedback-desc-label textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
}

.feedback-attachments-block {
  margin: 1rem 0;
}

.feedback-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.feedback-att-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
}

.feedback-att-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.feedback-att-video {
  width: 160px;
  max-height: 90px;
  border-radius: 6px;
}

.feedback-att-name {
  font-size: 0.82rem;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.feedback-search-label {
  display: block;
  margin-bottom: 0.85rem;
}

.feedback-search-label span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.feedback-search-input {
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feedback-thread-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-thread-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: var(--surface);
}

.feedback-thread-card--draft {
  border-style: dashed;
  opacity: 0.95;
}

.feedback-draft-badge {
  margin-right: 0.35rem;
  vertical-align: middle;
}

.feedback-thread-head {
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.feedback-serial {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  vertical-align: middle;
}

.feedback-user-supplements {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}

.feedback-user-supplement-block {
  margin-bottom: 0.65rem;
}

.feedback-user-supplement-block:last-child {
  margin-bottom: 0;
}

.feedback-user-supplement-head {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.feedback-mine-supplement-box {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.feedback-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.feedback-admin-add-att {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}

.feedback-admin-add-att .file-hint {
  margin-bottom: 0.4rem;
}

.feedback-thread-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: normal;
}

.feedback-thread-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
}

.feedback-thread-atts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.feedback-thread-att-img {
  max-width: 200px;
  max-height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feedback-thread-att-video {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
}

.feedback-replies {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.feedback-reply-line {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.feedback-reply-time {
  color: var(--muted);
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

.feedback-reply-body {
  margin-top: 0.2rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.feedback-thread-actions {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.feedback-reply-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feedback-thread-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.analytics-sidebar {
  padding: 1rem 1.1rem;
  position: sticky;
  top: 0.75rem;
}

.analytics-sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.analytics-sidebar-field {
  display: block;
  margin-bottom: 0.85rem;
}

.analytics-sidebar-field span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.analytics-filter-select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.875rem;
}

.analytics-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-body--main {
  min-width: 0;
}

.analytics-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.analytics-block h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.analytics-kpi {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.analytics-table th,
.analytics-table td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.analytics-table th {
  color: var(--muted);
  font-weight: 600;
}

.system-admin-card .filter-panel-hint {
  margin-top: 0;
}

.system-section-title {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.system-section-title:first-of-type {
  margin-top: 0.5rem;
}

.system-users-search-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 0.75rem;
  max-width: 20rem;
}

.system-users-search-row span {
  font-size: 0.75rem;
  color: var(--muted);
}

.system-users-search-row input {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9rem;
}

.system-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.system-add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 10rem;
}

.system-add-form label span {
  font-size: 0.75rem;
  color: var(--muted);
}

.system-add-form .btn.primary {
  width: auto;
  margin-top: 1.15rem;
  align-self: flex-end;
}

.system-users-table {
  min-width: 420px;
}

.system-users-table .cell-actions-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.system-users-table .cell-actions-btns .btn {
  width: auto;
  margin: 0;
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
}

.entry-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.entry-tab {
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.entry-tab:hover {
  color: var(--text);
  background: var(--surface2);
}

.entry-tab.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--border);
}

.entry-panel-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.draft-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry-has-labor-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0;
}
.entry-has-labor-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.entry-radio-inline {
  margin-right: 1rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.entry-radio-inline input {
  margin-right: 0.35rem;
  vertical-align: middle;
}

.draft-row-badge {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  vertical-align: middle;
}
.draft-row-badge--rejected {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.draft-reject-view-body {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0 0;
  line-height: 1.5;
}

.wc-factors-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}
.wc-formula-preview {
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1 1 12rem;
  min-width: 0;
}
.wc-factors-advanced {
  display: none;
  margin-bottom: 0.5rem;
}
.wc-factors-advanced.wc-factors-advanced--open {
  display: block;
}
.wc-item-equipment-row {
  margin: 0.5rem 0 0.75rem;
  padding: 0.5rem 0 0;
  border-top: 1px dashed var(--border);
}
.wc-item-equipment-row .wc-item-field--equip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  max-width: 22rem;
}
.wc-equipment-hint {
  margin: 0 0 0.25rem;
}

.draft-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

.draft-row-meta {
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
}

.draft-row-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.draft-row-meta strong {
  color: var(--text);
  font-weight: 600;
}

.draft-row-meta .draft-row-sub {
  color: var(--muted);
  display: block;
  margin-top: 0.25rem;
}

/* 勿用 .draft-row-meta span 通配：会误伤「被驳回」徽章，覆盖颜色与版式 */

.entry-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 0.5rem;
  position: relative;
  z-index: 40;
}

.entry-form-actions .btn,
.entry-form-actions .entry-form-actions__btn {
  width: auto;
  margin-top: 0;
  min-width: 6.75rem;
  min-height: 2.6rem;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.entry-form-actions .btn.primary {
  width: auto;
}

.btn.secondary {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
}

.btn.secondary:hover {
  background: rgba(37, 99, 235, 0.12);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.login-card {
  max-width: 420px;
  margin: 10vh auto;
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  text-align: center;
}

.login-card h1.login-page-brand-title {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.login-card h1.login-page-brand-title:active {
  opacity: 1;
  color: inherit;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.hint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.login-username-label > span {
  display: block;
  margin-bottom: 0.35rem;
}

.login-username-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  background: var(--surface);
}

.login-username-row:focus-within {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 1px;
}

.login-username-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.login-username-input:focus {
  border: none !important;
  box-shadow: none !important;
}

.login-username-chevron {
  flex-shrink: 0;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 1px solid var(--border);
  background: var(--surface2, rgba(0, 0, 0, 0.04));
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.login-username-chevron:hover {
  background: var(--surface);
  color: var(--text);
}

.login-username-chevron-icon {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  margin-top: 2px;
}

.login-username-suggest li.login-username-suggest-empty {
  cursor: default;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-username-suggest li.login-username-suggest-empty:hover {
  background: transparent;
}

.sync-server-card {
  margin-top: 1.5rem;
}

.sync-api-base-label input {
  width: 100%;
  max-width: 32rem;
}

.sync-server-options {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sync-server-option-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
  cursor: pointer;
}

.sync-server-option-row input {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.sync-server-option-row span {
  display: inline;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.sync-server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.sync-status-msg {
  text-align: left;
  margin-top: 0.75rem;
}

label {
  display: block;
  margin-bottom: 1rem;
}

label span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 4.5rem;
  resize: vertical;
}

input[readonly] {
  opacity: 0.95;
  cursor: default;
  background: var(--surface2);
  color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.file-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  background: #e2e8f4;
}

.btn.primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.ghost {
  background: transparent;
}

/* 删除本条 / 录入内删除该地点·该内容等：红色底色 */
.btn.btn-remove-danger {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

.btn.btn-remove-danger:hover {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}

.machinery-usage-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.85rem;
  margin: 0.35rem 0 0.45rem;
}

.machinery-time-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.88rem;
}

.machinery-time-split {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem 0.55rem;
}

.btn.back {
  border: none;
  background: transparent;
  color: var(--accent);
  padding-left: 0;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--surface2);
  color: var(--muted);
}

.badge.admin {
  background: rgba(37, 99, 235, 0.14);
  color: var(--accent);
}

.menu-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
}

.action-grid {
  display: grid;
  gap: 1rem;
}

.action-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.tile {
  text-align: left;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tile-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.tile-title {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.tile-desc {
  font-size: 0.8rem;
  color: var(--muted);
}

.img-preview {
  margin: 0.75rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 200px;
}

.img-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  background: var(--surface2);
}

.hidden {
  display: none !important;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.record-list--compact {
  gap: 0.5rem;
}

.record-item {
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(280px, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: min(100%, 720px);
}

.record-list--compact .record-item {
  padding: 0.45rem 0.55rem;
  gap: 0.45rem;
  align-items: center;
}

.record-list--compact .thumb-strip img {
  width: 88px !important;
  height: 66px !important;
}

.record-list--compact .record-item .meta {
  font-size: 0.78rem;
  line-height: 1.35;
}

.record-list--compact .record-item .meta dt {
  font-size: 0.65rem;
  margin-top: 0.15rem;
}

.record-list--compact .record-item .meta dt:first-child {
  margin-top: 0;
}

.record-list--compact .record-item-actions {
  gap: 0.3rem;
}

.record-list--compact .record-item-actions .btn {
  padding: 0.28rem 0.45rem;
  font-size: 0.78rem;
}

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

.record-item .thumb {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface2);
}

.record-item .meta {
  font-size: 0.9rem;
}

.record-item .meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.record-item .meta dt:first-child {
  margin-top: 0;
}

.record-item .meta dd {
  margin: 0;
}

.record-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table {
  width: max(100%, 1240px);
  min-width: 1240px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table--manage {
  min-width: 1480px;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.data-table--compact th,
.data-table--compact td {
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
  line-height: 1.35;
}

.data-table--compact .cell-thumb img {
  width: 52px;
  height: 40px;
}

.data-table th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
}

.data-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

.data-table .cell-thumb {
  width: 72px;
}

.data-table .cell-thumb img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
}

.data-table .cell-actions {
  white-space: nowrap;
}

.data-table .cell-actions .btn-table-action {
  padding: 0.22rem 0.4rem;
  font-size: 0.72rem;
  margin: 0 0.15rem 0 0;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.data-table .cell-actions .btn-table-action:last-child {
  margin-right: 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-panel h3 {
  margin: 0 0 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.modal-actions .btn.primary {
  width: auto;
  margin-top: 0;
}

.modal-panel-wide {
  max-width: 520px;
}

.modal-record-detail-panel {
  max-width: min(92vw, 720px);
  width: 100%;
}

/* 录入：存草稿 / 提交上传进度（不可点击遮罩关闭） */
.modal-entry-sync-progress {
  z-index: 105;
}

.sync-progress-panel {
  max-width: 380px;
}

.sync-progress-msg {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.sync-progress-stats {
  margin: -0.5rem 0 0.85rem;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.4;
}

.sync-progress-track {
  height: 6px;
  border-radius: 4px;
  background: var(--surface2);
  overflow: hidden;
}

.sync-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(37, 99, 235, 0.55));
}

.sync-progress-bar--determinate {
  width: 0%;
  min-width: 0;
  transition: width 0.22s ease;
  animation: none !important;
  transform: none !important;
}

.sync-progress-bar--indeterminate {
  width: 38%;
  animation: sync-progress-indeterminate 1.15s ease-in-out infinite;
}

@keyframes sync-progress-indeterminate {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(280%);
  }
}

.record-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.record-detail-header h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
}

.record-detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.record-detail-header-actions .btn {
  margin: 0;
  width: auto;
}

.record-detail-body {
  max-height: min(72vh, 640px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.record-detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.record-detail-dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.record-detail-dl dd {
  margin: 0;
  word-break: break-word;
}

.record-detail-dl dd.record-detail-dd--preline {
  white-space: pre-line;
}

.record-detail-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.record-detail-work-section {
  margin-bottom: 1.25rem;
}

.record-detail-work-block {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.record-detail-work-block-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.record-detail-work-sub-block {
  margin: 0.55rem 0 0;
  padding: 0.5rem 0.55rem;
  border-left: 3px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
  border-radius: 0 6px 6px 0;
}

.record-detail-work-sub-block--c0 {
  background: #ffffff;
  border-left-color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-left-width: 3px;
}

.record-detail-work-sub-block--c1 {
  background: #f8fafc;
  border-left-color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.28);
  border-left-width: 3px;
}

.record-detail-work-sub-block--c2 {
  background: #fffbeb;
  border-left-color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-left-width: 3px;
}

.record-detail-work-sub-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.record-detail-work-line {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.record-detail-item-photos-label {
  margin: 0.65rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.record-detail-photo-grid--nested {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.45rem;
}

.record-detail-photo-grid--nested .record-detail-photo-thumb {
  aspect-ratio: 1;
  min-height: 72px;
}

.record-detail-photos-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.record-detail-subdl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.85rem;
  margin: 0;
  font-size: 0.8rem;
}

.record-detail-subdl dt {
  margin: 0;
  color: var(--muted);
}

.record-detail-subdl dd {
  margin: 0;
  word-break: break-word;
}

.record-detail-empty-photos {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.record-detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}

.record-detail-photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: var(--surface2);
}

.record-detail-roll-call-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.record-detail-remark-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.record-detail-process-flow-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.record-detail-process-flow-empty {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.record-detail-process-flow-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  list-style: decimal;
}

.record-detail-process-flow-item {
  margin: 0.35rem 0;
  line-height: 1.45;
  word-break: break-word;
}

.record-detail-video {
  display: block;
  width: 100%;
  max-height: 280px;
  margin: 0 0 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
}

.thumb-strip--single {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.thumb-more-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 1;
  padding: 0.1rem 0.28rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 4px;
  pointer-events: none;
}

.data-table tbody tr.record-row-dblopen {
  cursor: pointer;
}

/* 单击展开后：主行浅绿高亮；折叠后无此类名，恢复默认 */
.data-table tbody tr.record-row-main.record-row-main--expanded {
  background: rgba(34, 197, 94, 0.16);
}

.data-table tbody tr.record-row-main.record-row-main--expanded:hover {
  background: rgba(34, 197, 94, 0.22);
}

/* 完成量管理：主表与展开表文本格最多三行；更长时第三行末省略号 */
#manage-tbody .table-cell-text-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
  max-height: calc(1.35em * 3);
}

/* 项目名称、作业内容：折叠主行与展开行同列宽、同单行省略，与未展开主行对齐 */
#manage-tbody tr.record-row-main td.manage-td-project,
#manage-tbody tr.record-row-main td.manage-td-workload,
#manage-tbody tr.record-expand-row td.manage-td-project,
#manage-tbody tr.record-expand-row td.manage-td-workload {
  max-width: 10rem;
}

#manage-tbody tr.record-row-main td.manage-td-project .table-cell-text-clamp,
#manage-tbody tr.record-row-main td.manage-td-workload .table-cell-text-clamp,
#manage-tbody tr.record-expand-row td.manage-td-project .table-cell-text-clamp,
#manage-tbody tr.record-expand-row td.manage-td-workload .table-cell-text-clamp {
  -webkit-line-clamp: 1;
  line-clamp: 1;
  max-height: 1.35em;
}

.data-table tbody tr.record-expand-row td {
  /* 含 rowspan 的合并格会在整段展开高度内垂直居中 */
  vertical-align: middle;
  /* 比主表纯白行略深、比整页 --bg 浅，展开区更易辨认 */
  background: #f4f6fb;
  font-size: 0.8rem;
  line-height: 1.35;
}

.data-table tbody tr.record-expand-row:hover td {
  background: #eef1f7;
}

/* 管理员顶部三栏导航（左上角） */
.admin-main-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-main-nav.hidden {
  display: none !important;
}

.admin-main-tab {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  max-width: 100%;
}

.admin-main-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.admin-main-tab.active {
  background: rgba(37, 99, 235, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

/* 基础信息配置：悬停展开子菜单 */
.admin-nav-dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  vertical-align: top;
  max-width: 100%;
  min-width: 0;
}

.admin-main-tab--dropdown {
  width: 100%;
}

.admin-nav-submenu {
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  z-index: 60;
  min-width: 100%;
  width: max-content;
  padding-top: 4px;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
}

/* 仅悬停展开：移开光标即收起（避免 :focus-within 在点击子项后仍保持展开） */
.admin-nav-dropdown:hover .admin-nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.admin-nav-submenu-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.admin-nav-submenu-panel .admin-submenu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 1rem;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.admin-nav-submenu-panel .admin-submenu-item:last-child {
  border-bottom: none;
}

.admin-nav-submenu-panel .admin-submenu-item:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.admin-nav-dropdown:hover .admin-main-tab--dropdown {
  color: var(--text);
  border-color: var(--accent);
}

/* 与超级管理员一致：已登录时通过顶部主导航切换，隐藏各子页「返回」 */
body.admin-workspace .top-bar:not(.top-bar--home) .top-bar-back {
  display: none !important;
}

/* 完成量录入 / 编辑弹窗：与带 combo 的 .line-field 同宽；date 在部分手机浏览器有默认最小宽度，须限制以免宽于其它栏 */
#form-entry label.line-field,
#form-edit label.line-field {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#form-entry label.line-field input[type="date"],
#form-edit label.line-field input[type="date"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* 完成量录入：必填项标签前红色星号 */
#form-entry .field-required-mark {
  color: #dc2626;
  font-weight: 700;
  margin-right: 0.12em;
}

/* 线别模糊筛选 */
.combo-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.combo-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 15;
  box-shadow: var(--shadow-md);
}

.combo-suggest li {
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.combo-suggest li:hover {
  background: var(--surface2);
}

.work-items-section {
  margin: 0.85rem 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.work-items-section-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.entry-work-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.65rem 0;
}

.entry-work-items-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-top: 0.35rem;
}

.work-item-content-picker {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.9rem;
}

.work-item-content-picker::placeholder {
  color: var(--muted);
}

.machinery-usage-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin-top: 0.35rem;
}

.entry-machinery-usage-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

#form-entry .entry-time-stats-section,
#form-edit .entry-time-stats-section {
  padding: 0.55rem 0.65rem 0.7rem;
  margin-left: -0.1rem;
  margin-right: -0.1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.14);
}

.entry-time-stats-grid {
  display: grid;
  /* min(14.5rem,100%) 避免轨道最小宽度大于容器导致整格横向撑破（尤其两列 + 日期/时间并排） */
  grid-template-columns: repeat(auto-fill, minmax(min(14.5rem, 100%), 1fr));
  gap: 0.65rem 0.85rem;
  margin: 0.4rem 0 0.25rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* 完成录入 / 编辑：时间点统计 — 略分组、日期时间并排仍易点（须高于 label.line-field input 的 width:100%） */
#form-entry .entry-time-stat-field,
#form-edit .entry-time-stat-field {
  margin: 0;
  padding: 0.6rem 0.7rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

#form-entry .entry-time-stat-field > span:first-child,
#form-edit .entry-time-stat-field > span:first-child {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.entry-time-split {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem 0.55rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#form-entry label.entry-time-stat-field .entry-time-split input[type="date"],
#form-entry label.entry-time-stat-field .entry-time-split input[type="time"],
#form-edit label.entry-time-stat-field .entry-time-split input[type="date"],
#form-edit label.entry-time-stat-field .entry-time-split input[type="time"],
#form-entry .machinery-time-split input[type="date"],
#form-entry .machinery-time-split input[type="time"],
#form-edit .machinery-time-split input[type="date"],
#form-edit .machinery-time-split input[type="time"] {
  width: auto;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0.5rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}

#form-entry label.entry-time-stat-field .entry-time-split input[type="date"],
#form-edit label.entry-time-stat-field .entry-time-split input[type="date"],
#form-entry .machinery-time-split input[type="date"],
#form-edit .machinery-time-split input[type="date"] {
  flex: 1 1 8rem;
  min-width: 0;
  max-width: 100%;
}

#form-entry label.entry-time-stat-field .entry-time-split input[type="time"],
#form-edit label.entry-time-stat-field .entry-time-split input[type="time"],
#form-entry .machinery-time-split input[type="time"],
#form-edit .machinery-time-split input[type="time"] {
  flex: 1 1 5rem;
  min-width: 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

#form-entry label.entry-time-stat-field .entry-time-split input[type="date"]:focus,
#form-entry label.entry-time-stat-field .entry-time-split input[type="time"]:focus,
#form-edit label.entry-time-stat-field .entry-time-split input[type="date"]:focus,
#form-edit label.entry-time-stat-field .entry-time-split input[type="time"]:focus,
#form-entry .machinery-time-split input[type="date"]:focus,
#form-entry .machinery-time-split input[type="time"]:focus,
#form-edit .machinery-time-split input[type="date"]:focus,
#form-edit .machinery-time-split input[type="time"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  outline: none;
}

/* 手机 / 小平板（含横屏）：时间点统计不超出屏宽 — 单列网格 minmax(0,1fr)、日期时间上下排、clip + 高特异性压过全局 input 与 line-field date 的 width:100% */
@media (max-width: 960px) {
  .container.entry-container {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .container.entry-container > .card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #form-entry,
  #form-edit {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
  }

  #form-entry .entry-time-stats-section,
  #form-edit .entry-time-stats-section {
    padding: 0.25rem 0.32rem 0.34rem;
    margin-left: 0;
    margin-right: 0;
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
  }

  #form-entry .entry-time-stats-section .entry-time-stats-grid,
  #form-edit .entry-time-stats-section .entry-time-stats-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.28rem 0.38rem;
    margin: 0.2rem 0 0.12rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #form-entry .entry-time-stat-field,
  #form-edit .entry-time-stat-field,
  #form-entry label.line-field.entry-time-stat-field,
  #form-edit label.line-field.entry-time-stat-field {
    padding: 0.3rem 0.34rem 0.34rem;
    border-radius: 6px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #form-entry .entry-time-stat-field > span:first-child,
  #form-edit .entry-time-stat-field > span:first-child {
    font-size: 0.74rem;
    margin-bottom: 0.16rem;
  }

  #form-entry label.entry-time-stat-field .entry-time-split,
  #form-edit label.entry-time-stat-field .entry-time-split,
  #form-entry label.line-field.entry-time-stat-field .entry-time-split,
  #form-edit label.line-field.entry-time-stat-field .entry-time-split,
  #form-entry .machinery-time-split,
  #form-edit .machinery-time-split {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    gap: 0.22rem 0.3rem;
    overflow-x: hidden;
  }

  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="date"],
  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="time"],
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="date"],
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="time"],
  #form-entry label.entry-time-stat-field .entry-time-split input[type="date"],
  #form-entry label.entry-time-stat-field .entry-time-split input[type="time"],
  #form-edit label.entry-time-stat-field .entry-time-split input[type="date"],
  #form-edit label.entry-time-stat-field .entry-time-split input[type="time"],
  #form-entry .machinery-time-split input[type="date"],
  #form-entry .machinery-time-split input[type="time"],
  #form-edit .machinery-time-split input[type="date"],
  #form-edit .machinery-time-split input[type="time"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 28px;
    height: auto;
    padding: 0.1rem 0.32rem;
    font-size: 1rem;
    line-height: 1.12;
    border-radius: 5px;
    box-sizing: border-box;
  }

  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="date"]:focus,
  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="time"]:focus,
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="date"]:focus,
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="time"]:focus,
  #form-entry label.entry-time-stat-field .entry-time-split input[type="date"]:focus,
  #form-entry label.entry-time-stat-field .entry-time-split input[type="time"]:focus,
  #form-edit label.entry-time-stat-field .entry-time-split input[type="date"]:focus,
  #form-edit label.entry-time-stat-field .entry-time-split input[type="time"]:focus,
  #form-entry .machinery-time-split input[type="date"]:focus,
  #form-entry .machinery-time-split input[type="time"]:focus,
  #form-edit .machinery-time-split input[type="date"]:focus,
  #form-edit .machinery-time-split input[type="time"]:focus {
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.32);
  }
}

@media (max-width: 520px) {
  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="date"],
  #form-entry label.line-field.entry-time-stat-field .entry-time-split input[type="time"],
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="date"],
  #form-edit label.line-field.entry-time-stat-field .entry-time-split input[type="time"],
  #form-entry label.entry-time-stat-field .entry-time-split input[type="date"],
  #form-entry label.entry-time-stat-field .entry-time-split input[type="time"],
  #form-edit label.entry-time-stat-field .entry-time-split input[type="date"],
  #form-edit label.entry-time-stat-field .entry-time-split input[type="time"],
  #form-entry .machinery-time-split input[type="date"],
  #form-entry .machinery-time-split input[type="time"],
  #form-edit .machinery-time-split input[type="date"],
  #form-edit .machinery-time-split input[type="time"] {
    min-height: 26px;
    padding: 0.06rem 0.3rem;
    line-height: 1.1;
  }
}

.entry-onsite-staff-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.5rem 0;
}

.entry-onsite-staff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.entry-onsite-staff-role-wrap {
  flex: 1 1 12rem;
  min-width: 10rem;
}

.entry-onsite-staff-name-inp {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.entry-daily-plan-num-input {
  flex: 1 1 12rem;
  min-width: 8rem;
}

.machinery-usage-row {
  padding: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* 不同机具条目：与作业地点块相同的轮换底色与左边线 */
.machinery-usage-row--loc0 {
  background: #eef6ff;
  border-color: #93c5fd;
  border-left: 4px solid #2563eb;
}
.machinery-usage-row--loc1 {
  background: #ecfdf5;
  border-color: #6ee7b7;
  border-left: 4px solid #059669;
}
.machinery-usage-row--loc2 {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left: 4px solid #d97706;
}
.machinery-usage-row--loc3 {
  background: #f5f3ff;
  border-color: #c4b5fd;
  border-left: 4px solid #7c3aed;
}

.machinery-usage-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.machinery-usage-row-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.machinery-usage-text-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.machinery-usage-text-label span {
  font-size: 0.82rem;
  color: var(--muted);
}

.machinery-usage-thumb-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  margin: 0 0.5rem 0.5rem 0;
  vertical-align: top;
}

.machinery-usage-thumb-tile img {
  max-height: 100px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.record-detail-machinery-section {
  margin-top: 1rem;
}

.record-detail-machinery-block {
  margin: 0.5rem 0 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.record-detail-machinery-block:last-child {
  border-bottom: none;
}

.work-item-block {
  padding: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
}

/* 不同作业地点：轮换底色与左边线，便于区分多块 */
.work-item-block--loc0 {
  background: #eef6ff;
  border-color: #93c5fd;
  border-left: 4px solid #2563eb;
}
.work-item-block--loc1 {
  background: #ecfdf5;
  border-color: #6ee7b7;
  border-left: 4px solid #059669;
}
.work-item-block--loc2 {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left: 4px solid #d97706;
}
.work-item-block--loc3 {
  background: #f5f3ff;
  border-color: #c4b5fd;
  border-left: 4px solid #7c3aed;
}

.work-item-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  min-height: 1.75rem;
}

.work-item-index-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.work-item-block .combo-wrap {
  position: relative;
}

/* 删除该地点 / 删除该内容：同尺寸 */
.work-item-block .work-item-remove.work-item-delete-action,
.work-item-sub-block .work-item-sub-remove.work-item-delete-action {
  flex-shrink: 0;
  padding: 0.32rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.25;
  min-width: 6.25rem;
  text-align: center;
  box-sizing: border-box;
}

.work-item-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.work-item-loc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.55rem 0.75rem;
  padding-bottom: 0.45rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.work-item-loc-fields .wi-field-line,
.work-item-loc-fields .wi-field-equip {
  grid-column: 1 / -1;
}

.work-item-subs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.work-item-sub-block {
  padding: 0.55rem 0.6rem;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  overflow: visible;
  position: relative;
  z-index: 0;
}

.work-item-sub-block:focus-within {
  z-index: 5;
}

.work-item-sub-block .combo-suggest {
  z-index: 40;
}

.work-item-sub-block .work-item-content-wrap {
  min-width: 0;
  width: 100%;
}

/* 同一地点下不同作业内容：轮换浅色底与左边线 */
.work-item-sub-block--c0 {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
  border-left: 3px solid #2563eb;
}
.work-item-sub-block--c1 {
  background: #f8fafc;
  border-color: rgba(5, 150, 105, 0.35);
  border-left: 3px solid #059669;
}
.work-item-sub-block--c2 {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.4);
  border-left: 3px solid #d97706;
}

.work-item-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.work-item-sub-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.work-item-photo-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-item-photo-group {
  padding: 0.45rem 0.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(15, 23, 42, 0.14);
  border-radius: 8px;
}

.work-item-photo-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.work-item-photo-group-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.wi-photo-group-caption-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.wi-photo-group-caption-label input.wi-photo-group-caption {
  max-width: 100%;
}

.work-item-add-photo-group {
  margin-top: 0.45rem;
}

.entry-tabs-below-hint {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.entry-tabs-below-hint--prominent {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.12), rgba(5, 150, 105, 0.03));
  border: 1px solid rgba(5, 150, 105, 0.4);
  border-left: 4px solid #059669;
  border-radius: 8px;
}

.work-item-filter-intro {
  margin: 0 0 0.4rem;
  line-height: 1.45;
}

.work-item-filter-intro--prominent {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.6rem 0.55rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-left: 4px solid var(--accent, #2563eb);
  border-radius: 8px;
}

.work-item-sub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
}

.work-item-sub-toolbar .btn {
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
}

.modal-work-content-pick-panel {
  /* 网页版：弹窗再略加大；窄屏由下方 @media 覆盖 */
  max-width: min(96vw, 540px);
  width: 100%;
  padding: 0.85rem 1rem 1rem;
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  /* 纵向只在 .work-content-pick-table-scroll 内滚动，避免与内层抢手势 */
  overflow-y: hidden;
  box-sizing: border-box;
  /* 由 flex 居中定位，translate 在整页范围内拖动 */
  touch-action: manipulation;
  will-change: transform;
}

/* 高于底部主导航 z-index:150，避免弹窗打开时底层导航条错位或露白条；高于「更多」抽屉 160 时仍可盖住全屏 */
#modal-work-content-pick.modal {
  overflow-x: hidden;
  z-index: 200;
}

.work-content-pick-header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2rem;
  margin-bottom: 0.65rem;
  padding-left: 2.35rem;
  padding-right: 0;
}

.work-content-pick-close-x {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-content-pick-close-x:hover {
  color: var(--text);
  background: var(--surface2);
}

.work-content-pick-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.work-content-pick-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.work-content-pick-search {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.work-content-pick-search:read-only {
  cursor: pointer;
  background: var(--surface2);
  color: var(--muted);
}

/* 表格窗口外框：顶中为拖动条 */
.work-content-pick-table-frame {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.work-content-pick-drag-handle {
  flex-shrink: 0;
  align-self: center;
  width: 3.5rem;
  height: 15px;
  margin: 0.38rem auto 0.32rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
  position: relative;
}

.work-content-pick-drag-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.35rem;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    var(--muted) 0,
    var(--muted) 3px,
    transparent 3px,
    transparent 6px
  );
  opacity: 0.48;
}

.work-content-pick-drag-handle:active,
.work-content-pick-drag-handle.work-content-pick-drag-handle--dragging {
  cursor: grabbing;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.14) 0%, var(--surface) 100%);
  border-color: rgba(59, 130, 246, 0.4);
}

.work-content-pick-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  /* 略增高，便于列表上下滑动查看后续行 */
  max-height: min(68vh, 580px);
  min-height: 7.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* 覆盖全局 .data-table 的 width/max(100%,1240px) 与 min-width:1240px（flex 子项默认 min-width:auto 仍会按内容撑开视口） */
#modal-work-content-pick .work-content-pick-table-scroll table.work-content-pick-table.data-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#modal-work-content-pick .work-content-pick-table tbody tr:nth-child(odd) td {
  background-color: var(--surface);
}

#modal-work-content-pick .work-content-pick-table tbody tr:nth-child(even) td {
  background-color: var(--surface2);
}

#modal-work-content-pick .work-content-pick-table tbody tr:hover td {
  background-color: rgba(59, 130, 246, 0.08);
}

#modal-work-content-pick .work-content-pick-table tbody tr.work-content-pick-row--frequent td {
  background-color: rgba(59, 130, 246, 0.06);
}

.work-content-pick-table {
  width: 100%;
  margin: 0;
  font-size: 0.875rem;
  border-collapse: collapse;
  table-layout: fixed;
}

#modal-work-content-pick .work-content-pick-table th,
#modal-work-content-pick .work-content-pick-table td {
  padding: 0.24rem 0.28rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 表头随表格区域上下滚动时置顶，方便对照列名 */
#modal-work-content-pick .work-content-pick-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface2);
  box-shadow: 0 1px 0 var(--border);
}

.work-content-pick-table th:nth-child(1),
.work-content-pick-table td:nth-child(1) {
  width: 2.15rem;
  text-align: center;
  white-space: nowrap;
}

/* 名称列占剩余宽度，允许换行，避免撑出横向滚动条 */
.work-content-pick-table th:nth-child(2),
.work-content-pick-table td:nth-child(2) {
  width: auto;
  padding-left: 0.25rem;
  padding-right: 0.1rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.work-content-pick-table th:nth-child(3),
.work-content-pick-table td:nth-child(3) {
  width: 3.25rem;
  white-space: normal;
  word-break: break-word;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
  line-height: 1.35;
}

.work-content-pick-table th:nth-child(4),
.work-content-pick-table td:nth-child(4) {
  width: 2.5rem;
  text-align: center;
  padding-left: 0.08rem;
  padding-right: 0.18rem;
}

.work-content-pick-table input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

@media (max-width: 600px) {
  #modal-work-content-pick.modal {
    padding: 0.3rem;
  }

  /* 手机：占满外层 modal-panel 宽度，避免表格按 1240px 撑出整页横向滚动；列宽用百分比在视口内换行展示 */
  .modal-work-content-pick-panel {
    max-width: 100%;
    width: 100%;
    padding: 0.45rem 0.5rem 0.55rem;
  }

  .work-content-pick-header {
    padding-left: 1.85rem;
    margin-bottom: 0.4rem;
    min-height: 1.65rem;
  }

  .work-content-pick-close-x {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.2rem;
  }

  .work-content-pick-title {
    font-size: 0.92rem;
  }

  .work-content-pick-drag-handle {
    width: 3rem;
    height: 13px;
    margin: 0.3rem auto 0.28rem;
  }

  .work-content-pick-search-row {
    gap: 0.32rem 0.4rem;
    margin-bottom: 0.42rem;
  }

  .work-content-pick-search {
    font-size: 0.8125rem;
    padding: 0.34rem 0.4rem;
  }

  /* 放大页面后可在该区域内整体平移表格（双轴滚动 + 触摸交给本层） */
  .work-content-pick-table-scroll {
    max-height: min(58vh, 440px);
    min-height: 11rem;
    overflow: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .work-content-pick-table {
    font-size: 0.78rem;
  }

  #modal-work-content-pick .work-content-pick-table th,
  #modal-work-content-pick .work-content-pick-table td {
    padding: 0.14rem 0.12rem;
  }

  #modal-work-content-pick .work-content-pick-table th {
    white-space: normal;
    line-height: 1.25;
  }

  .work-content-pick-table th:nth-child(1),
  .work-content-pick-table td:nth-child(1) {
    width: 11%;
  }

  .work-content-pick-table th:nth-child(2),
  .work-content-pick-table td:nth-child(2) {
    width: 54%;
  }

  .work-content-pick-table th:nth-child(3),
  .work-content-pick-table td:nth-child(3) {
    width: 25%;
  }

  .work-content-pick-table th:nth-child(4),
  .work-content-pick-table td:nth-child(4) {
    width: 10%;
    padding-left: 0;
    padding-right: 0;
  }

  #modal-work-content-pick .work-content-pick-table td:nth-child(4) {
    text-align: center;
  }

  .work-content-pick-table input[type="checkbox"] {
    transform: scale(0.92);
    transform-origin: center;
    margin: 0 auto;
    display: block;
  }
}

.modal-project-contract-panel {
  max-width: min(92vw, 720px);
  width: 100%;
  padding: 1rem 1rem 1.1rem;
}

.project-contract-modal-title {
  margin: 0 0 0.65rem;
  padding: 0 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.project-contract-table-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 2.15rem 0.65rem 0.65rem;
  background: var(--surface);
}

.project-contract-corner-close {
  position: absolute;
  top: 0.35rem;
  left: 0.4rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-contract-corner-close:hover {
  color: var(--text);
  background: var(--surface2);
}

.project-contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.project-contract-table th,
.project-contract-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.project-contract-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text);
}

.project-contract-table-empty {
  text-align: center;
  color: var(--muted);
  padding: 1.25rem 0.75rem;
}

.work-item-add-sub {
  margin-top: 0.15rem;
  width: fit-content;
}

.work-item-fields label span {
  font-size: 0.75rem;
  color: var(--muted);
}

.work-item-volume[readonly] {
  opacity: 0.95;
  background: rgba(15, 23, 42, 0.06);
}

.btn-add-work-item {
  width: auto;
  margin-top: 0.25rem;
}

.work-config-single-panel.hidden {
  display: none !important;
}

.work-config-card .work-config-project {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.work-config-project h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.work-config-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.work-config-table th,
.work-config-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.work-config-table input[type="text"],
.work-config-table input[type="number"] {
  width: 100%;
  max-width: 12rem;
}

.work-config-save-row {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* 项目内容配置：侧栏宽度随视口平滑变化，避免 高分辨率+200% 缩放下 侧栏过宽或主栏过窄 */
.work-config-split {
  display: grid;
  grid-template-columns: minmax(14rem, min(27vw, 21.5rem)) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.2vw, 1.25rem);
  align-items: start;
  margin-top: 0.75rem;
  min-width: 0;
}

@media (max-width: 720px) {
  .work-config-split {
    grid-template-columns: 1fr;
  }
}

.work-config-aside {
  position: sticky;
  top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.wpt-aside {
  gap: 0.85rem;
}

.wpt-aside-block-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.wpt-split .work-config-project-nav {
  max-height: min(40vh, 14rem);
  overflow: auto;
}

.work-config-project-search {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.875rem;
}

.work-config-project-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(52vh, 26rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
}

.work-config-project-nav-item {
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.work-config-project-nav-item:last-child {
  border-bottom: none;
}

.work-config-project-nav-item:hover {
  background: var(--surface);
}

.work-config-project-nav-item.active {
  background: rgba(37, 99, 235, 0.12);
  font-weight: 600;
}

.work-config-project-nav-empty {
  padding: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.work-config-main {
  min-width: 0;
  padding: 0.15rem 0 0;
}

.work-config-editor-placeholder {
  margin: 0;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.work-config-editor-project-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.wc-project-assign-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

.work-config-stat-toolbar {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.work-config-stat-toolbar.hidden {
  display: none !important;
}

.wc-stat-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  max-height: min(60vh, 28rem);
  overflow-y: auto;
  padding: 0.35rem 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.wc-stat-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.work-config-assign-panel.hidden {
  display: none !important;
}

.wc-assign-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.42;
  color: var(--muted);
}

.work-config-assign-panel .work-config-editor-project-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  letter-spacing: 0.01em;
}

/* 单列顺排：每行一条，避免多列格子大小不一 */
.wc-assign-editor-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.25rem 0 0.6rem;
  min-height: 0;
  align-items: stretch;
}

.wc-assign-editor-body:empty::before {
  content: "当前项目尚未添加作业内容，点击下方按钮添加。";
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
  padding: 0.2rem 0 0.05rem;
}

.wc-assign-add-row {
  margin-top: 0.15rem;
  align-self: flex-start;
}

/* 设备名称配置：与劳务公司名称配置同宽分栏，复用 labor-company-names-split */
.device-names-category-select {
  max-width: 100%;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}

.labor-company-names-admin-list .device-name-admin-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.device-names-admin-list .device-name-admin-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.95rem;
}

.device-names-admin-list .device-name-admin-del {
  flex-shrink: 0;
}

/* 项目内容配置：分类 + 设备名与后续栏同一行 */
.wc-assign-equip-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  flex: 0 0 auto;
  min-width: 0;
}

.wc-assign-inline-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 设备分类略缩窄，为「作业内容」留出宽度 */
.wc-assign-equip-strip .wc-assign-equip-cat-wrap {
  width: auto;
  min-width: clamp(4rem, 7vw, 5.75rem);
  max-width: min(7rem, 18vw);
  flex: 0 1 auto;
  flex-shrink: 1;
}

.wc-assign-equip-strip .wc-assign-equip-name-wrap {
  width: auto;
  min-width: clamp(5.25rem, 9vw, 8.5rem);
  max-width: min(9.5rem, 26vw);
  flex: 0 1 auto;
  flex-shrink: 1;
}

.wc-assign-equip-cat-input,
.wc-assign-equip-name-input {
  width: 100%;
  box-sizing: border-box;
  height: var(--wc-assign-ctrl-h);
  padding: 0 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
}

.wc-assign-result-unit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.wc-assign-result-unit-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.wc-assign-result-unit-display {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  min-width: 1.75rem;
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 勿对整行设 overflow:auto：会裁剪行内 .combo-suggest 下拉（分类/设备名点选）。横向溢出由 min-width:0 与各块 flex 收缩处理。 */
.wc-stat-assign-row {
  --wc-assign-ctrl-h: clamp(2rem, 0.4rem + 1.75vw, 2.375rem);
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: clamp(0.3rem, 0.8vw, 0.5rem);
  row-gap: 0;
  padding: clamp(0.3rem, 0.6vw, 0.45rem) clamp(0.4rem, 0.9vw, 0.55rem);
  min-height: var(--wc-assign-ctrl-h);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-sizing: border-box;
  overflow: visible;
}

/* 下拉叠在同行其它控件之上（作业内容建议列表 z-index:20） */
.wc-stat-assign-row .combo-suggest {
  z-index: 30;
}

.wc-stat-assign-row.wc-assign-dragging {
  opacity: 0.72;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.wc-stat-assign-row.wc-assign-drag-over {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 1px;
}

.wc-assign-drag-handle {
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: center;
  min-width: 2.25rem;
  padding: 0 0.35rem;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.05em;
  cursor: grab;
  color: var(--muted);
  user-select: none;
  -webkit-user-select: none;
}

.wc-assign-drag-handle:active {
  cursor: grabbing;
}

@media (max-width: 640px) {
  .wc-stat-assign-row .wc-assign-remove,
  .wc-stat-assign-row .wc-assign-drag-handle {
    align-self: center;
  }
}

.wc-assign-estimated-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 0;
}

@media (max-width: 640px) {
  .wc-assign-estimated-wrap {
    justify-content: flex-start;
  }
}

.wc-assign-estimated-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
}

.wc-assign-estimated-label span {
  flex: 0 0 auto;
}

.wc-assign-estimated-total {
  /* 至少完整显示 8 位数字（ch ≈ 「0」字宽；tabular-nums 使数字等宽） */
  width: 9.5ch;
  min-width: 8.5ch;
  max-width: 14ch;
  height: var(--wc-assign-ctrl-h);
  box-sizing: border-box;
  padding: 0 0.28rem;
  font-size: 0.75rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
}

/* 作业内容区占中间可变区域；弹性占位条不再抢光宽度，避免高缩放下列表被挤成 0 */
.wc-stat-assign-row .wc-assign-work-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  flex: 4.5 1 14rem;
  min-width: min(14rem, 52%);
}

@media (min-width: 900px) {
  .wc-stat-assign-row .wc-assign-work-strip {
    flex: 5.25 1 18rem;
    min-width: min(17rem, 56%);
  }
}

.wc-stat-assign-row .wc-assign-field-flex-spacer {
  flex: 0 1 0.5rem;
  min-width: 0;
  max-width: 1rem;
  align-self: stretch;
  pointer-events: none;
}

.wc-stat-assign-row .wc-assign-work-strip .wc-assign-field {
  position: relative;
  flex: 1 1 0;
  min-width: min(9rem, 100%);
  min-height: var(--wc-assign-ctrl-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wc-stat-assign-row .wc-assign-search {
  width: 100%;
  height: var(--wc-assign-ctrl-h);
  box-sizing: border-box;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.2;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-stat-assign-row .wc-assign-search::placeholder {
  color: var(--muted);
  opacity: 0.88;
}

.wc-stat-assign-row .wc-assign-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--wc-assign-ctrl-h);
  padding: 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.2;
  align-self: center;
  border-radius: 6px;
  white-space: nowrap;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.wc-assign-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0.2rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
  z-index: 20;
  border: 1px solid #b8c5db;
  border-radius: 8px;
  background: #d8e0ed;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.wc-assign-suggest li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.65rem;
  border: none;
  background: #cad4e5;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.wc-assign-suggest li button:hover,
.wc-assign-suggest li button:focus-visible {
  background: #b9c5d9;
  outline: none;
}

.wc-assign-suggest--empty {
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: var(--muted, #666);
  list-style: none;
  background: #cad4e5;
}

.wc-stat-pick-row:hover {
  background: rgba(37, 99, 235, 0.06);
}

.wc-stat-pick-row.hidden {
  display: none !important;
}

.wc-stat-pick-row input.wc-stat-pick {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.wc-stat-pick-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

.wc-project-ref-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.wc-project-ref-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.wc-project-ref-row .combo-wrap.wc-project-template-wrap {
  flex: 1;
  min-width: 12rem;
  max-width: 100%;
  position: relative;
}

.wc-project-ref-row .wc-project-template-input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.875rem;
}

.wc-project-ref-row .wc-project-template-input:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.standard-stats-split {
  display: grid;
  grid-template-columns: minmax(15rem, min(30vw, 24rem)) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.2vw, 1.35rem);
  align-items: start;
  margin-top: 0.5rem;
  min-width: 0;
}

/* 作业内容配置：左侧筛选列与搜索框收窄 */
#work-config-panel-standard .standard-stats-split {
  grid-template-columns: minmax(10.5rem, min(18vw, 15rem)) minmax(0, 1fr);
}

#work-config-panel-standard .standard-stats-name-search,
#work-config-panel-standard .standard-stats-equip-cat-search,
#work-config-panel-standard .standard-stats-equip-name-search {
  max-width: 12.5rem;
}

.standard-stats-main-col {
  min-width: 0;
}

.standard-stats-section {
  min-width: 0;
  max-width: 100%;
}

#view-work-config .container-page-wide,
#view-work-config .work-config-card {
  min-width: 0;
  max-width: 100%;
}

.standard-stats-aside {
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.standard-stats-search-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.standard-stats-search-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.standard-stats-template-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.standard-stats-template-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.standard-stats-template-hint {
  margin: 0 0 0.5rem !important;
  font-size: 0.78rem !important;
  line-height: 1.45;
}

.standard-stats-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.standard-stats-aside .standard-stats-search-label + .standard-stats-search-label {
  margin-top: 0.55rem;
}

.standard-stats-name-search,
.standard-stats-equip-cat-search,
.standard-stats-equip-name-search {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.standard-stats-search-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.standard-stats-pagination {
  margin-top: 0.35rem;
}

.standard-stats-pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  justify-content: flex-start;
}

.ss-page-info {
  font-size: 0.875rem;
  color: var(--muted, #64748b);
}

@media (max-width: 768px) {
  .standard-stats-split {
    grid-template-columns: 1fr;
  }
}

.standard-stats-editor-body {
  margin-top: 0;
}

/* 作业内容配置：卡片间距加大，奇偶行深浅底对比 */
#standard-stats-editor-body .wc-item-list {
  gap: 1.35rem;
  margin: 0.65rem 0 1rem;
  min-width: 0;
  max-width: 100%;
}

#standard-stats-editor-body .wc-item-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  /* 极窄视口下乘数表略宽时仅在卡片内横向滚动，不顶出页面 */
  overflow-x: auto;
}

#standard-stats-editor-body .wc-item-list > .wc-item-card:nth-child(odd) {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

#standard-stats-editor-body .wc-item-list > .wc-item-card:nth-child(even) {
  background: var(--surface2);
  border-color: var(--border);
}

/* 作业内容卡片：名称/结果单位/删除 一行在浏览器缩放下可折行、可收缩，避免撑出页面 */
#standard-stats-editor-body .wc-item-head {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#standard-stats-editor-body .wc-item-head > .wc-item-field {
  flex: 1 1 min(12rem, 100%);
  min-width: 0;
  max-width: 100%;
}

#standard-stats-editor-body .wc-item-head > .wc-item-field:first-of-type {
  flex: 2 1 min(14rem, 100%);
}

#standard-stats-editor-body .wc-item-head > .wc-item-field:nth-of-type(2) {
  flex: 1 1 min(8rem, 100%);
}

#standard-stats-editor-body .wc-item-head .wc-remove-content {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-end;
  box-sizing: border-box;
  /* 与「结果单位」输入框同高（含上下内边距与字号，不含上方标签） */
  min-height: calc(0.9rem * 1.25 + 0.8rem + 2px);
  height: calc(0.9rem * 1.25 + 0.8rem + 2px);
  padding: 0 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1.25;
}

#standard-stats-editor-body .wc-item-head .wc-name,
#standard-stats-editor-body .wc-item-head .wc-result-unit {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#standard-stats-editor-body .wc-item-equipment-row {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#standard-stats-editor-body .wc-item-equipment-row > .wc-item-field {
  flex: 1 1 min(12rem, 100%);
  min-width: 0;
  max-width: 100%;
}

/* 乘数表：表头可换行 + 固定布局，避免「类型/数值/单位/标签」整行撑破卡片 */
#standard-stats-editor-body .wc-factors-table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}

#standard-stats-editor-body .wc-factors-table th,
#standard-stats-editor-body .wc-factors-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
  min-width: 0;
}

#standard-stats-editor-body .wc-factors-table th {
  white-space: normal;
  font-size: 0.76rem;
  line-height: 1.25;
  padding: 0.3rem 0.28rem;
}

#standard-stats-editor-body .wc-factors-table td:last-child,
#standard-stats-editor-body .wc-factors-table th:last-child {
  width: 3.25rem;
  white-space: nowrap;
}

#standard-stats-editor-body .wc-factors-table input[type="text"],
#standard-stats-editor-body .wc-factors-table select {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* 乘数表：类型列宽不变；数值、单位、标签列为原先宽度的一半（原 18% / 16% / 26% → 9% / 8% / 13%） */
#standard-stats-editor-body .wc-factors-table th:nth-child(1),
#standard-stats-editor-body .wc-factors-table td:nth-child(1) {
  width: 20%;
}

#standard-stats-editor-body .wc-factors-table th:nth-child(2),
#standard-stats-editor-body .wc-factors-table td:nth-child(2) {
  width: 9%;
}

#standard-stats-editor-body .wc-factors-table th:nth-child(3),
#standard-stats-editor-body .wc-factors-table td:nth-child(3) {
  width: 8%;
}

#standard-stats-editor-body .wc-factors-table th:nth-child(4),
#standard-stats-editor-body .wc-factors-table td:nth-child(4) {
  width: 13%;
}

#standard-stats-editor-body .wc-factors-table .wc-factor-role,
#standard-stats-editor-body .wc-factors-table .wc-factor-val,
#standard-stats-editor-body .wc-factors-table .wc-factor-unit,
#standard-stats-editor-body .wc-factors-table .wc-factor-label {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#standard-stats-editor-body .wc-factors-table select.wc-factor-role {
  font-size: 0.78rem;
  /* 列分配余量时仍保持与原先约 20% 列宽相近的框体长度，避免被拉得过宽 */
  width: 100%;
  max-width: min(100%, 12rem);
}

#standard-stats-editor-body .wc-remove-content {
  background: var(--wc-delete-bg);
  border: 1px solid var(--wc-delete-border);
  color: #fff;
}

#standard-stats-editor-body .wc-remove-content:hover {
  background: var(--wc-delete-hover);
  border-color: #991b1b;
  color: #fff;
}

.wc-item-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0 0.75rem;
}

.wc-item-card {
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.wc-item-equipment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
  align-items: flex-end;
}

.wc-item-field--equip-cat .wc-equip-cat-wrap {
  width: 100%;
  min-width: min(10rem, 100%);
  max-width: min(20rem, 100%);
}

.wc-item-field--equip-name .wc-equip-name-wrap {
  width: 100%;
  min-width: min(10rem, 100%);
  max-width: min(20rem, 100%);
}

#standard-stats-editor-body .wc-item-equipment-row .wc-equipment-category,
#standard-stats-editor-body .wc-item-equipment-row .wc-equipment-name {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.9rem;
}

.work-item-equipment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
}

@media (max-width: 520px) {
  .work-item-equipment-row {
    grid-template-columns: 1fr;
  }
}

.work-item-equip-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.work-item-equip-field > span {
  font-size: 0.78rem;
  color: var(--muted);
}

.work-item-equip-field .combo-wrap,
.work-item-equip-field .work-item-equip-name-input {
  width: 100%;
}

.wc-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin-bottom: 0.65rem;
}

.wc-item-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8rem;
  flex: 1;
}

.wc-field-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.wc-item-head .wc-name,
.wc-item-head .wc-result-unit {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.9rem;
}

.wc-add-content {
  margin-bottom: 0.35rem;
}

.wc-factors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.45rem;
}

.wc-factors-table th,
.wc-factors-table td {
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.wc-factors-table input[type="text"],
.wc-factors-table select {
  width: 100%;
  max-width: 10rem;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: inherit;
  font-size: 0.85rem;
}

.wc-add-factor {
  margin-top: 0.15rem;
}

.work-item-dynamic-area {
  margin: 0.5rem 0;
  padding: 0.55rem 0.65rem;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.wi-factor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.wi-factor-row--readonly .wi-factor-num {
  font-weight: 600;
  color: var(--accent);
}

.wi-factor-row--input .wi-factor-input {
  width: 6rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

.wi-factor-label {
  min-width: 3.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.wi-factor-unit {
  color: var(--muted);
  font-size: 0.8rem;
}

.wi-result-row {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
}

.wi-result-label {
  color: var(--muted);
}

.wi-result-value {
  color: var(--accent);
  font-size: 1.05rem;
}

.wi-result-unit {
  color: var(--muted);
}

.project-names-admin-section {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.project-names-admin-split {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

.project-names-admin-main {
  min-width: 0;
}

.project-names-admin-aside {
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.project-names-admin-search-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.project-names-admin-search-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.project-names-admin-search {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.project-names-admin-search-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .project-names-admin-split {
    grid-template-columns: 1fr;
  }
}

.project-names-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.project-name-admin-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

.project-name-admin-row-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.project-construction-units-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 0.25rem;
  border-left: 3px solid var(--border);
  margin-left: 0.15rem;
}

.project-construction-units-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.project-construction-units-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.project-construction-unit-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.project-construction-unit-input {
  flex: 1;
  min-width: 8rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}

.project-name-admin-input {
  flex: 1;
  min-width: 10rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.95rem;
}

.project-names-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.project-config-master-split {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 30%) minmax(0, 40%);
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

.project-config-col {
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}

.project-config-col-title {
  margin: 0 0 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  letter-spacing: 0.02em;
}

/* 新增项目：加宽栏内强调 */
.project-config-add-aside {
  padding: 1.05rem 1.15rem;
}

.project-config-add-aside .project-config-col-title {
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.project-config-add-aside .project-config-left-add-toolbar {
  gap: 0.65rem;
}

.project-config-add-aside .project-config-new-name-input {
  font-size: 1.05rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
}

.project-config-add-aside .project-config-left-add-toolbar .btn {
  font-size: 1rem;
  padding: 0.55rem 1rem;
  min-height: 2.65rem;
}

.project-config-left-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.65rem 0 0;
  max-height: min(60vh, 28rem);
  overflow: auto;
}

.project-config-projects-pagination {
  margin: 0.5rem 0 0;
}

.project-config-projects-pagination .pagination-inner {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.project-config-projects-pagination .pagination-meta {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-config-projects-pagination.hidden {
  display: none !important;
}

.project-config-project-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.project-config-project-name-label {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.project-config-project-item--selected {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.project-config-project-item--selected .project-config-project-name-label {
  font-weight: 600;
}

.project-config-right-main {
  min-width: 0;
}

.project-config-right-main .work-config-editor-placeholder {
  font-size: 0.85rem;
  padding: 0.65rem 0.5rem;
}

/* 当前项目（右侧编辑区）：整体收紧 */
.project-config-right-panel .project-config-selected-head {
  margin-bottom: 0.25rem;
  gap: 0.35rem 0.5rem;
}

.project-config-right-panel .project-config-right-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  min-width: 0;
}

.project-config-right-panel .project-config-delete-project {
  font-size: 0.75rem;
  padding: 0.28rem 0.5rem;
  min-height: auto;
}

.project-config-right-panel .project-config-labor-hint {
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.project-config-right-panel .project-config-labor-chips {
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.project-config-right-panel .project-config-labor-chips-empty {
  font-size: 0.78rem;
}

.project-config-right-panel .project-config-labor-chip-row {
  padding: 0.28rem 0.45rem;
  gap: 0.35rem;
}

.project-config-right-panel .project-config-labor-chip-label {
  font-size: 0.78rem;
}

.project-config-right-panel .project-config-labor-chip-remove {
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  min-height: auto;
}

.project-config-right-panel .project-config-labor-pick-row {
  margin-top: 0.05rem;
  gap: 0.35rem;
}

.project-config-right-panel .project-config-labor-select {
  font-size: 0.8rem;
  padding: 0.32rem 0.45rem;
  min-width: 0;
}

.project-config-right-panel .project-config-labor-pick-row .btn {
  font-size: 0.8rem;
  padding: 0.32rem 0.55rem;
  min-height: auto;
}

.project-config-right-main .project-config-save-row {
  margin-top: 0.5rem;
}

.project-config-right-main .project-config-save-row .btn {
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
}

.project-config-left-add-toolbar {
  align-items: stretch;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0;
}

.project-config-left-add-toolbar .project-config-new-name-input {
  max-width: none;
  width: 100%;
}

.project-config-center-aside .project-config-left-search-block {
  margin-bottom: 0.35rem;
}

.project-config-center-aside .project-config-col-title {
  margin-bottom: 0.45rem;
}

.project-config-new-name-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 22rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}

.project-config-selected-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.project-config-selected-head .project-config-right-title {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}

.project-config-delete-project {
  flex-shrink: 0;
  background: #dc2626 !important;
  color: #fff !important;
  border: 1px solid #b91c1c !important;
}

.project-config-delete-project:hover:not(:disabled) {
  background: #b91c1c !important;
  color: #fff !important;
}

.project-config-delete-project:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.project-config-labor-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.project-config-labor-chips {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  min-height: 0;
}

.project-config-labor-chips-empty {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.project-config-labor-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.project-config-labor-chip-label {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  word-break: break-word;
}

.project-config-labor-chip-label--warn {
  color: #b45309;
}

.project-config-labor-pick-row {
  align-items: center;
  margin-top: 0.15rem;
}

.project-config-labor-pick-row .project-config-labor-select {
  flex: 1;
  min-width: 12rem;
}

.project-config-labor-select {
  flex: 1;
  min-width: 12rem;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}

.labor-company-names-split {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 70%);
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

/* 劳务公司配置：左侧约 2/3，右侧现场劳务岗位 */
.labor-company-names-split--wide-left {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.labor-company-names-aside {
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.labor-company-names-aside--main-col {
  min-width: 0;
}

.labor-company-names-right-col {
  min-width: 0;
}

.labor-company-names-main {
  min-width: 0;
}

.labor-company-names-admin-list .labor-company-name-admin-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.labor-company-names-admin-list .labor-company-name-admin-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.95rem;
}

.labor-company-names-admin-list .labor-company-name-admin-del {
  flex-shrink: 0;
}

.labor-company-names-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.5rem 0 0.35rem;
}

.labor-company-names-page-label {
  font-size: 0.875rem;
  color: var(--muted);
}

.labor-company-names-sort-row {
  margin: 0.65rem 0 0.35rem;
}

.labor-company-names-sort-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.labor-company-names-sort-title {
  font-weight: 600;
  color: var(--muted);
}

.labor-company-names-sort-select {
  max-width: 22rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.9rem;
}

.labor-company-names-aside .labor-company-names-sort-select {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 768px) {
  .project-config-master-split,
  .labor-company-names-split,
  .labor-company-names-split--wide-left {
    grid-template-columns: 1fr;
  }
}

.labor-site-role-lead-delete-placeholder,
.labor-site-role-safety-delete-placeholder {
  flex: 0 0 auto;
  width: 3.75rem;
  min-height: 2.25rem;
}

.workshop-name-admin-input.labor-site-role-name-admin-input[readonly] {
  background: var(--surface2);
  color: var(--muted);
  cursor: default;
}

.workshop-lead-admin-section {
  margin-bottom: 0;
}

.workshop-lead-admin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

.workshop-lead-admin-col {
  padding: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
}

.workshop-lead-col-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.workshop-lead-search-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
}

.workshop-lead-search-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.workshop-name-admin-row,
.lead-name-admin-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.workshop-name-admin-input,
.lead-name-admin-input {
  flex: 1;
  min-width: 10rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  font-size: 0.95rem;
}

/* 现场岗位首行「作业负责人」：与车间列同宽同排布，右侧用占位对齐删除按钮列 */
.workshop-name-admin-input.onsite-role-name-admin-input[readonly] {
  background: var(--surface2);
  color: var(--muted);
  cursor: default;
}

.onsite-role-lead-delete-placeholder {
  flex: 0 0 auto;
  width: 3.75rem;
  min-height: 2.25rem;
}

@media (max-width: 768px) {
  .workshop-lead-admin-split {
    grid-template-columns: 1fr;
  }
}

.work-config-work-block .work-config-work-title {
  margin-top: 0;
}

.workload-field {
  line-height: 1.5;
  min-height: calc(1.5em * 3 + 14px);
  max-height: calc(1.5em * 3 + 14px);
  overflow-y: auto;
  resize: none;
}

.entry-images-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  min-height: 0;
}

.img-thumb-item {
  position: relative;
  width: 88px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.img-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}

.img-thumb-item .img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.img-thumb-item .img-remove:hover {
  background: rgba(180, 40, 40, 0.9);
}

.roll-call-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.roll-call-section--after-work {
  margin-top: 1.25rem;
}

.roll-call-section > h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.roll-call-block {
  margin-bottom: 1rem;
}

.roll-call-block:last-child {
  margin-bottom: 0;
}

.roll-call-hint--required {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.roll-call-videos-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  min-height: 0;
}

.roll-call-video-thumb {
  position: relative;
  width: min(100%, 220px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.roll-call-video-preview {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  background: #000;
}

.roll-call-video-thumb .img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.roll-call-video-thumb .img-remove:hover {
  background: rgba(180, 40, 40, 0.9);
}

.draft-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.draft-row-actions .btn {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.thumb-strip img,
.thumb-clickable {
  cursor: zoom-in;
}

.cell-thumb .thumb-strip img {
  width: 48px;
  height: 36px;
}

/* 大图预览 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 3.25rem 0.75rem 0.75rem;
}

.lightbox.hidden {
  display: none !important;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 201;
}

.lightbox-close:hover {
  background: rgba(80, 80, 80, 0.8);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 201;
  width: 48px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(80, 80, 80, 0.85);
}

.lightbox-nav:disabled,
.lightbox-nav.lightbox-nav--hidden {
  opacity: 0.2;
  pointer-events: none;
}

.lightbox-prev {
  left: 0.75rem;
}

.lightbox-next {
  right: 0.75rem;
}

.lightbox-inner {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

.lightbox-inner img {
  max-width: min(96vw, 100%);
  max-height: min(88vh, 100%);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transform-origin: center center;
  transition: transform 0.06s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-inner img.lightbox-pannable {
  cursor: grab;
}

.lightbox-inner img.lightbox-dragging {
  cursor: grabbing;
  transition: none;
}

/* 底部主导航（仅窄屏；宽屏由顶部栏主导航） */
.admin-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  justify-content: space-around;
  align-items: stretch;
  gap: 0;
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.admin-bottom-nav.hidden {
  display: none !important;
}

.admin-bottom-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.25rem 0.2rem;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.62rem;
  line-height: 1.2;
  cursor: pointer;
  min-height: 48px;
  box-sizing: border-box;
}

.admin-bottom-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.92;
}

.admin-bottom-tab-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.admin-bottom-tab.active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

/* 桌面端：主工作区外固定右下角，一键回顶（与底栏同级 DOM，避免主区 overflow 下 fixed 错位） */
.app-scroll-to-top-fab {
  position: fixed;
  right: max(2.5rem, calc(1.25rem + env(safe-area-inset-right, 0px)));
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  z-index: 99;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent, #2563eb);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.app-scroll-to-top-fab:hover {
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.app-scroll-to-top-fab:active {
  transform: translateY(0);
}

.app-scroll-to-top-fab__glyph {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 640px) {
  .app-scroll-to-top-fab {
    display: none !important;
  }
}

.admin-mobile-more-menu {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.admin-mobile-more-menu.hidden {
  display: none !important;
  pointer-events: none;
}

.admin-mobile-more-menu:not(.hidden) {
  pointer-events: auto;
}

.admin-mobile-more-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
}

.admin-mobile-more-menu__panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, 420px);
  margin: 0;
  padding: 0 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.admin-mobile-more-menu__head {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.admin-mobile-more-menu__list {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0;
}

.admin-mobile-more-item {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  min-height: 48px;
}

.admin-mobile-more-item:last-child {
  border-bottom: none;
}

.admin-mobile-more-item:hover,
.admin-mobile-more-item:active {
  background: var(--surface2);
}

.admin-mobile-more-item.hidden {
  display: none !important;
}

@media (min-width: 641px) {
  .admin-bottom-nav,
  .admin-mobile-more-menu {
    display: none !important;
  }
}

/* 窄屏下基础信息配置子页分段切换（完成量管理使用独立分段样式 .manage-segment-nav） */
#work-config-mobile-nav.work-config-mobile-nav {
  display: none;
}

@media (max-width: 640px) {
  body.admin-workspace #work-config-mobile-nav.work-config-mobile-nav {
    display: block;
    margin: 0 max(0.4rem, env(safe-area-inset-right, 0px)) 0.5rem max(0.4rem, env(safe-area-inset-left, 0px));
    padding: 0.25rem 0 0.35rem;
    border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.12));
    background: var(--shell-main-bg, #f0f6fc);
  }

  #work-config-mobile-nav .work-config-mobile-nav__scroll {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

  #work-config-mobile-nav .work-config-mobile-nav__block-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted, #64748b);
    letter-spacing: 0.02em;
    padding: 0.1rem 0.15rem 0;
  }

  #work-config-mobile-nav .work-config-mobile-nav__block-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.15rem;
  }

  #work-config-mobile-nav .work-config-mobile-nav__btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border, rgba(15, 23, 42, 0.15));
    border-radius: 999px;
    background: var(--surface, #fff);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.25;
    cursor: pointer;
    white-space: nowrap;
    min-height: 40px;
  }

  #work-config-mobile-nav .work-config-mobile-nav__btn:hover,
  #work-config-mobile-nav .work-config-mobile-nav__btn:active {
    background: var(--surface2, #eef2f7);
  }

  #work-config-mobile-nav .work-config-mobile-nav__btn.active {
    border-color: var(--accent, #3b82f6);
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent, #1d4ed8);
    font-weight: 600;
  }

  #work-config-mobile-nav .work-config-mobile-nav__btn.hidden {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   手机浏览器：安全区、底部导航、表单与表格可触控滚动
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  body.admin-workspace #app {
    padding-bottom: calc(3.35rem + env(safe-area-inset-bottom, 0px));
  }

  .app-top-header {
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
  }

  body.admin-workspace .app-sidebar {
    display: none;
  }

  body.admin-workspace .app-sidebar-rail-toggle {
    display: none !important;
  }

  body.admin-workspace .app-sidebar-expand-fab {
    display: none !important;
  }

  body.admin-workspace .admin-main-stage {
    margin-left: 0 !important;
  }

  body.admin-workspace .shell-page-header__tools--session {
    display: none !important;
  }

  body.admin-workspace .admin-bottom-nav:not(.hidden) {
    display: flex;
  }

  .container,
  .container.narrow,
  .container.entry-container {
    padding: 1rem max(0.65rem, env(safe-area-inset-left, 0px)) 1.25rem max(0.65rem, env(safe-area-inset-right, 0px));
  }

  .container-page-wide {
    padding: 0.65rem max(0.4rem, env(safe-area-inset-left, 0px)) 1rem max(0.4rem, env(safe-area-inset-right, 0px));
  }

  .top-bar {
    padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.35rem, env(safe-area-inset-right, 0px));
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .top-bar-title {
    font-size: 0.95rem;
    min-width: 0;
  }

  .card {
    padding: 0.85rem 0.7rem;
  }

  /* 作业内容多选弹窗：避免 .card 覆盖为过大内边距；禁止外层 modal-panel 纵向滚动，仅表格区滚动（与 .modal-panel overflow-y:auto 区分） */
  #modal-work-content-pick .modal-panel.card.modal-work-content-pick-panel {
    padding: 0.45rem 0.5rem 0.55rem;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    max-height: min(92vh, calc(100dvh - 1.5rem));
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

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

  .filter-form-last-row {
    grid-template-columns: 1fr;
  }

  .page-content-scroll,
  .table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .modal-panel {
    max-width: calc(100vw - 1.25rem);
    max-height: min(92vh, calc(100dvh - 1.5rem));
    margin: 0.5rem auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .entry-form-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .entry-form-actions .btn,
  .entry-form-actions .entry-form-actions__btn,
  .modal-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  #form-entry label.line-field,
  #form-edit label.line-field {
    max-width: 100%;
  }

  #form-entry label.line-field input[type="date"],
  #form-edit label.line-field input[type="date"] {
    max-width: 100%;
    min-width: 0;
  }

  .btn,
  .admin-submenu-item {
    min-height: 40px;
  }
}

/* --------------------------------------------------------------------------
   登录后：侧栏 + 主内容区（完成量管理及全站统一软蓝风格）
   -------------------------------------------------------------------------- */
.app-admin-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  align-items: stretch;
}

.app-admin-layout.hidden {
  display: none !important;
}

#view-login.active {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.app-sidebar {
  width: min(280px, 28vw);
  min-width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  background: var(--shell-sidebar-bg);
  border-right: 1px solid rgba(147, 197, 253, 0.45);
  box-shadow: 4px 0 24px rgba(30, 64, 175, 0.04);
}

.app-sidebar-inner {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 与 shell-back-btn 同尺寸，贴在侧栏右缘、与品牌区上沿对齐 */
.app-sidebar-rail-toggle {
  flex-shrink: 0;
  align-self: flex-start;
  box-sizing: border-box;
  width: 2.35rem;
  height: 2.35rem;
  min-width: 2.35rem;
  margin: 0.85rem 0.35rem 0 0;
  padding: 0;
  border: 1px solid rgba(147, 197, 253, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent, #2563eb);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.app-sidebar-rail-toggle:hover {
  background: #fff;
  border-color: var(--accent, #2563eb);
}

.app-sidebar-rail-toggle__glyph {
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  transform: scaleX(1.35);
  display: block;
}

body.admin-workspace.app-sidebar-rail-collapsed .app-sidebar {
  border-right-color: rgba(147, 197, 253, 0.65);
  box-shadow: none;
}

body.admin-workspace.app-sidebar-rail-collapsed .app-sidebar-inner {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.admin-workspace.app-sidebar-rail-collapsed .app-sidebar-rail-toggle {
  display: none;
}

.app-sidebar-expand-fab {
  position: fixed;
  top: 50%;
  left: var(--app-sidebar-rail, 10px);
  z-index: 65;
  transform: translateY(-50%);
  width: 1.65rem;
  min-height: 3.25rem;
  padding: 0;
  margin: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.55);
  border-left: none;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.94);
  color: #334155;
  cursor: pointer;
  box-shadow: 2px 0 12px rgba(30, 64, 175, 0.1);
  font-family: inherit;
}

.app-sidebar-expand-fab:hover {
  background: #fff;
  color: var(--accent, #2563eb);
}

.app-sidebar-expand-fab__glyph {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

body.admin-workspace.app-sidebar-rail-collapsed .app-sidebar-expand-fab:not(.hidden) {
  display: flex;
}

body.admin-workspace .app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--app-sidebar-width, max(240px, min(280px, 28vw)));
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  z-index: 60;
}

.app-sidebar-brand {
  flex-shrink: 0;
  padding: 1.25rem 1.1rem 1rem;
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
}

.app-sidebar-brand-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: 0.02em;
}

.app-sidebar-brand-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

body.admin-workspace .admin-main-stage {
  margin-left: var(--app-sidebar-width, max(240px, min(280px, 28vw)));
}

.app-sidebar .admin-main-nav {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  padding: 0.75rem 0.65rem 0.85rem;
  background: transparent;
  border: none;
  box-shadow: none;
  position: static;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
}

.app-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.45);
  color: var(--text);
}

.app-sidebar .admin-main-tab.active {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.08);
  color: #1d4ed8;
}

.app-sidebar-icon {
  width: 1.35rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.92;
}

.app-sidebar-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.app-sidebar .admin-nav-dropdown {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
}

/* 侧栏下拉：默认收起，点击大项后展开；悬停不强行展开 */
.app-sidebar .admin-nav-dropdown:not(.app-sidebar-dropdown--open) .admin-nav-submenu {
  max-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

.app-sidebar .app-sidebar-dropdown--open .admin-nav-submenu {
  position: static;
  max-height: min(70vh, 28rem) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none;
  padding: 0.35rem 0 0.15rem 0.25rem;
  margin: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  transition: max-height 0.22s ease, opacity 0.18s ease;
}

.app-sidebar .admin-nav-submenu-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.app-sidebar .admin-main-tab--dropdown {
  position: relative;
  padding-right: 2rem;
}

.app-sidebar .admin-main-tab--dropdown::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  margin-top: -0.2rem;
  border-right: 2px solid rgba(51, 65, 85, 0.45);
  border-bottom: 2px solid rgba(51, 65, 85, 0.45);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.app-sidebar .app-sidebar-dropdown--open > .admin-main-tab--dropdown::after {
  transform: rotate(225deg);
  margin-top: 0.05rem;
}

.app-sidebar .admin-submenu-group {
  margin-bottom: 0.25rem;
}

.app-sidebar .admin-submenu-group-label {
  padding: 0.35rem 0.65rem 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: none;
  line-height: 1.3;
  pointer-events: none;
}

.app-sidebar .admin-submenu-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem 0.5rem 1.85rem;
  margin: 0.15rem 0;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  color: #475569;
  text-align: left;
  line-height: 1.4;
}

.app-sidebar .admin-submenu-item:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
}

.app-sidebar .admin-submenu-item.admin-submenu-item--active {
  background: rgba(255, 255, 255, 0.92);
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(59, 130, 246, 0.2);
}

.app-sidebar .admin-submenu-item.admin-submenu-item--active:hover {
  background: #fff;
  color: #1d4ed8;
}

.app-sidebar-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.85rem 0.75rem 1rem;
  border-top: 1px solid rgba(147, 197, 253, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
}

.app-sidebar-footer .app-session-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.app-sidebar-footer .session-display-user {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e3a5f;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.app-sidebar-footer .session-display-role {
  align-self: flex-start;
  margin: 0;
  max-width: 100%;
}

.app-sidebar-footer .btn-session-logout {
  width: 100%;
  justify-content: center;
  border-radius: 10px;
  margin-top: 0.15rem;
  padding: 0.4rem 0.65rem;
  min-height: 2.25rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.55);
}

.admin-main-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--shell-main-bg);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  /* 刘海 / Dynamic Island / 状态栏：避免主区首行（手机账户条等）顶到系统 UI 下缘点不到 */
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
}

/* 顶栏右侧账户区：由 JS 挂入 .shell-page-header__tools--session，与原 shell 图标按钮同行对齐 */
.shell-page-header__tools--session {
  align-items: center;
  align-self: center;
}

.workspace-session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.55rem;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-sizing: border-box;
}

.workspace-session-bar.hidden {
  display: none !important;
}

.workspace-session-user {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e3a5f;
  max-width: min(12rem, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-session-role {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.28);
  line-height: 1.25;
}

.workspace-session-logout {
  padding: 0.22rem 0.5rem !important;
  min-height: 2.35rem !important;
  font-size: 0.76rem !important;
  border-radius: 10px;
}

.shell-page-header--home .shell-page-header__tools--session {
  position: absolute;
  top: calc(1.25rem + env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  align-self: auto;
}

@media (max-width: 640px) {
  .workspace-session-bar {
    display: none !important;
  }
}

.app-mobile-session-strip {
  display: none;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  /* 顶栏安全区由 .admin-main-stage 的 padding-top 承接；左右由 body（≤640px）的 safe-area 已外推整页，此处仅常规内边距 */
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
  box-sizing: border-box;
}

.app-mobile-session-strip .session-display-user {
  flex: 1 1 8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-mobile-session-strip .btn-session-logout {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 3.25rem;
  padding: 0.35rem 0.85rem;
  align-self: center;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640px) {
  body.admin-workspace .app-mobile-session-strip:not(.hidden) {
    display: flex;
  }
}

.shell-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.5rem 0.85rem;
  background: transparent;
  border-bottom: none;
  row-gap: 0.75rem;
}

.shell-page-header--home {
  position: relative;
  justify-content: center;
  padding-top: 1.5rem;
}

.shell-page-header__left {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 14rem;
}

.shell-page-header__titles {
  min-width: 0;
  flex: 1;
  padding-top: 0.12rem;
}

.shell-page-header__titles--center {
  text-align: center;
  width: 100%;
}

.shell-page-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: 0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shell-page-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.shell-back-btn {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.55);
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

.shell-back-btn:hover {
  background: #fff;
  border-color: var(--accent);
}

.shell-page-header__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
  margin-left: auto;
  max-width: 100%;
}

@media (max-width: 720px) {
  .shell-page-header__tools {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    padding-left: calc(2.35rem + 0.65rem);
    box-sizing: border-box;
  }
}

.shell-icon-btn {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: rgba(255, 255, 255, 0.75);
  color: #3b82f6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shell-icon-btn:hover {
  background: #fff;
  border-color: var(--accent);
}

.shell-icon-btn--static {
  cursor: default;
  opacity: 0.55;
}

.shell-icon-btn__glyph {
  font-size: 1.05rem;
  line-height: 1;
}

.manage-data-toolbar {
  padding: 0 1.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.manage-segment-nav {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.manage-segment-nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.3rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.4);
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.05);
  max-width: 100%;
  box-sizing: border-box;
}

.manage-segment-btn {
  margin: 0;
  padding: 0.45rem 1.15rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.manage-segment-btn:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.manage-segment-btn.active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.manage-filter-date-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.55);
  box-sizing: border-box;
  min-width: 0;
}

@media (max-width: 768px) {
  .manage-filter-date-strip {
    border-radius: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .manage-filter-date-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .manage-filter-date-inputs label {
    width: 100%;
  }

  .manage-filter-date-inputs label input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

.manage-filter-date-strip-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding-left: 0.15rem;
}

.manage-filter-date-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: end;
  flex: 1;
  min-width: 0;
}

.manage-filter-date-inputs label span {
  font-size: 0.7rem;
}

/* 表格区随主区域宽度限制，列多时在容器内横向滚动（勿用 overflow:hidden，否则会裁切右侧） */
#view-manage .container-page-wide {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#view-manage .page-content-scroll {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  overflow-y: visible;
}

#view-manage .table-wrap {
  border-radius: var(--shell-card-radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 4px 28px rgba(30, 64, 175, 0.06);
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

#view-manage .table-wrap .data-table--manage {
  width: max(100%, 1480px);
  min-width: 1480px;
  max-width: none;
}

#view-manage .data-table th {
  background: linear-gradient(180deg, #e8f0fb 0%, #e2ebf8 100%);
  color: #475569;
  text-align: center;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

#view-manage .data-table--compact th,
#view-manage .data-table--compact td {
  text-align: center;
}

#view-manage .data-table--manage tbody tr:not(.record-expand-row):nth-child(odd) {
  background: rgba(255, 255, 255, 0.98);
}

#view-manage .data-table--manage tbody tr:not(.record-expand-row):nth-child(even) {
  background: rgba(241, 247, 255, 0.88);
}

/* 单击选中：高于斑马纹优先级；展开未选中仍用浅绿 */
#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--selected {
  background: rgba(59, 130, 246, 0.14);
  box-shadow: inset 3px 0 0 #2563eb;
}

#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--selected:hover {
  background: rgba(59, 130, 246, 0.2);
}

#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--expanded:not(.record-row-main--selected) {
  background: rgba(34, 197, 94, 0.16);
}

#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--expanded:not(.record-row-main--selected):hover {
  background: rgba(34, 197, 94, 0.22);
}

#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--expanded.record-row-main--selected {
  background: rgba(59, 130, 246, 0.16);
  box-shadow: inset 3px 0 0 #1d4ed8;
}

#view-manage table.data-table--manage > tbody > tr.record-row-main.record-row-main--expanded.record-row-main--selected:hover {
  background: rgba(59, 130, 246, 0.22);
}

#view-manage table.data-table--manage > tbody > tr.record-expand-row.record-row-expand--selected td {
  background: rgba(59, 130, 246, 0.1) !important;
}

#view-manage table.data-table--manage > tbody > tr.record-expand-row.record-row-expand--selected:hover td {
  background: rgba(59, 130, 246, 0.14) !important;
}

body.admin-workspace .card {
  border-radius: var(--shell-card-radius);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 4px 24px rgba(30, 64, 175, 0.05);
}

body.admin-workspace .filter-panel--manage {
  background: rgba(255, 255, 255, 0.92);
}

body.admin-workspace .analytics-sidebar,
body.admin-workspace .feedback-sidebar {
  border-radius: var(--shell-card-radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.05);
}

body.admin-workspace .feedback-nav-btn.active,
body.admin-workspace .analytics-filter-select {
  border-radius: 10px;
}

body.admin-workspace .entry-tab.active,
body.admin-workspace .feedback-entry-tabs .entry-tab.active {
  border-radius: 999px;
}

@media (max-width: 640px) {
  .manage-data-toolbar {
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }

  .shell-page-header {
    padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  }

  .shell-page-title {
    font-size: 1.15rem;
  }

  .manage-segment-nav__inner {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   基础信息配置 #view-work-config：统一字号与同级面板尺寸
   -------------------------------------------------------------------------- */
#view-work-config {
  --wc-fs-base: 0.875rem;
  --wc-fs-hint: 0.8125rem;
  --wc-fs-h3: 1.0625rem;
  --wc-fs-h4: 0.9375rem;
  --wc-box-pad: 0.85rem 1rem;
  --wc-box-radius: 12px;
  --wc-inp-pad: 0.45rem 0.6rem;
  --wc-inp-radius: 10px;
}

#view-work-config .work-config-card {
  padding: 1rem 1.1rem;
}

#view-work-config .project-config-master-split,
#view-work-config .standard-stats-split,
#view-work-config .labor-company-names-split,
#view-work-config .labor-company-names-split--wide-left,
#view-work-config .workshop-lead-admin-split,
#view-work-config .work-config-split {
  align-items: stretch;
}

#view-work-config .project-config-col,
#view-work-config .standard-stats-aside,
#view-work-config .standard-stats-main-col,
#view-work-config .project-config-right-main,
#view-work-config .labor-company-names-aside,
#view-work-config .labor-company-names-main,
#view-work-config .workshop-lead-admin-col,
#view-work-config .work-config-aside,
#view-work-config .work-config-main,
#view-work-config .wpt-aside-block {
  padding: var(--wc-box-pad);
  border-radius: var(--wc-box-radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  box-sizing: border-box;
}

#view-work-config .wpt-aside-block .wpt-aside-block-title {
  color: inherit;
}

.wpt-totals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.wpt-totals-table th,
.wpt-totals-table td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.wpt-totals-table th {
  background: var(--surface);
  font-weight: 600;
}

.wpt-totals-table input[type="text"] {
  width: 100%;
  max-width: 14rem;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
}

#view-work-config .project-config-add-aside {
  padding: var(--wc-box-pad);
}

#view-work-config .work-config-aside {
  position: relative;
  top: auto;
}

#view-work-config .work-config-main {
  min-width: 0;
}

#view-work-config .standard-stats-main-col {
  min-width: 0;
}

#view-work-config .system-section-title {
  margin: 0 0 0.6rem;
  font-size: var(--wc-fs-h3);
  font-weight: 600;
  line-height: 1.35;
}

#view-work-config .system-section-title:first-of-type {
  margin-top: 0;
}

#view-work-config .work-config-work-title {
  font-size: var(--wc-fs-h3);
}

#view-work-config .filter-panel-hint {
  font-size: var(--wc-fs-hint);
  line-height: 1.45;
}

#view-work-config .standard-stats-template-hint {
  font-size: var(--wc-fs-hint) !important;
}

#view-work-config .project-names-admin-search-hint,
#view-work-config .standard-stats-search-hint,
#view-work-config .workshop-lead-search-hint {
  font-size: var(--wc-fs-hint);
}

#view-work-config .project-config-col-title,
#view-work-config .project-config-add-aside .project-config-col-title,
#view-work-config .workshop-lead-col-title,
#view-work-config .standard-stats-search-title,
#view-work-config .standard-stats-template-title,
#view-work-config .project-names-admin-search-title,
#view-work-config .work-config-editor-project-title,
#view-work-config .work-config-assign-panel .work-config-editor-project-title {
  font-size: var(--wc-fs-h4);
  font-weight: 600;
  line-height: 1.35;
}

#view-work-config .project-config-add-aside .project-config-col-title {
  margin-bottom: 0.55rem;
  letter-spacing: 0.02em;
}

#view-work-config .labor-company-names-sort-label,
#view-work-config .workshop-lead-search-label {
  font-size: var(--wc-fs-base);
}

#view-work-config .labor-company-names-sort-title {
  font-size: var(--wc-fs-base);
}

#view-work-config .project-config-add-aside .project-config-new-name-input {
  font-size: var(--wc-fs-base);
  padding: var(--wc-inp-pad);
  border-radius: var(--wc-inp-radius);
}

#view-work-config .project-config-add-aside .project-config-left-add-toolbar .btn {
  font-size: var(--wc-fs-base);
  padding: 0.45rem 0.85rem;
  min-height: unset;
}

#view-work-config .project-names-admin-search,
#view-work-config .standard-stats-name-search,
#view-work-config .standard-stats-equip-cat-search,
#view-work-config .standard-stats-equip-name-search,
#view-work-config .work-config-project-search,
#view-work-config .device-names-category-select,
#view-work-config .labor-company-names-sort-select,
#view-work-config .project-config-new-name-input,
#view-work-config .project-config-labor-select {
  font-size: var(--wc-fs-base);
  padding: var(--wc-inp-pad);
  border-radius: var(--wc-inp-radius);
}

#view-work-config .labor-company-names-admin-list .labor-company-name-admin-input,
#view-work-config .device-names-admin-list .device-name-admin-input,
#view-work-config .workshop-name-admin-input,
#view-work-config .lead-name-admin-input {
  font-size: var(--wc-fs-base);
  padding: var(--wc-inp-pad);
  border-radius: var(--wc-inp-radius);
}

#view-work-config .project-config-right-main .work-config-editor-placeholder {
  font-size: var(--wc-fs-base);
  padding: 0.65rem 0.4rem;
}

#view-work-config .project-config-right-panel .project-config-right-title {
  font-size: var(--wc-fs-h4);
}

#view-work-config .project-config-right-panel .project-config-labor-hint,
#view-work-config .project-config-right-panel .project-config-labor-chips-empty {
  font-size: var(--wc-fs-hint);
}

#view-work-config .project-config-right-panel .project-config-labor-chip-label {
  font-size: var(--wc-fs-base);
}

#view-work-config .project-config-right-panel .project-config-labor-chip-remove,
#view-work-config .project-config-right-panel .project-config-delete-project {
  font-size: var(--wc-fs-base);
  padding: 0.35rem 0.55rem;
  min-height: auto;
}

#view-work-config .project-config-right-panel .project-config-labor-select {
  font-size: var(--wc-fs-base);
  padding: var(--wc-inp-pad);
}

#view-work-config .project-config-right-panel .project-config-labor-pick-row .btn {
  font-size: var(--wc-fs-base);
  padding: 0.4rem 0.65rem;
  min-height: auto;
}

#view-work-config .project-config-right-main .project-config-save-row .btn {
  font-size: var(--wc-fs-base);
}

#view-work-config .project-config-project-name-label {
  font-size: var(--wc-fs-base);
}

#view-work-config .project-config-project-item {
  border-radius: var(--wc-inp-radius);
}

#view-work-config .work-config-project-nav {
  border-radius: var(--wc-inp-radius);
}

#view-work-config .work-config-project-nav-item {
  font-size: var(--wc-fs-base);
}

#view-work-config .work-config-project-nav-empty {
  font-size: var(--wc-fs-hint);
}

#view-work-config .work-config-editor-placeholder {
  font-size: var(--wc-fs-base);
}

#view-work-config .wc-assign-hint {
  font-size: var(--wc-fs-hint);
}

#view-work-config #standard-stats-editor-body .wc-field-label {
  font-size: var(--wc-fs-hint);
}

#view-work-config #standard-stats-editor-body .wc-item-head .wc-name,
#view-work-config #standard-stats-editor-body .wc-item-head .wc-result-unit,
#view-work-config #standard-stats-editor-body .wc-item-equipment-row .wc-equipment-category,
#view-work-config #standard-stats-editor-body .wc-item-equipment-row .wc-equipment-name {
  font-size: var(--wc-fs-base);
  border-radius: var(--wc-inp-radius);
  padding: var(--wc-inp-pad);
}

/* 与上方「结果单位」输入框（本页 var(--wc-inp-pad)）视觉同高 */
#view-work-config #standard-stats-editor-body .wc-item-head .wc-remove-content {
  min-height: calc(var(--wc-fs-base) * 1.25 + 0.45rem + 0.45rem + 2px);
  height: calc(var(--wc-fs-base) * 1.25 + 0.45rem + 0.45rem + 2px);
  padding: 0 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--wc-fs-base);
  line-height: 1.25;
  align-self: flex-end;
  box-sizing: border-box;
}

#view-work-config #standard-stats-editor-body .wc-factors-table {
  font-size: var(--wc-fs-base);
}

#view-work-config #standard-stats-editor-body .wc-factors-table th {
  font-size: var(--wc-fs-hint);
  padding: 0.35rem 0.32rem;
}

#view-work-config #standard-stats-editor-body .wc-factors-table input[type="text"],
#view-work-config #standard-stats-editor-body .wc-factors-table select {
  font-size: var(--wc-fs-base);
}

#view-work-config #standard-stats-editor-body .wc-item-card {
  border-radius: var(--wc-box-radius);
  padding: 0.9rem 1rem;
}

#view-work-config .wc-assign-inline-lbl {
  font-size: var(--wc-fs-hint);
}

#view-work-config .wc-assign-equip-cat-input,
#view-work-config .wc-assign-equip-name-input {
  font-size: var(--wc-fs-base);
}

#view-work-config .wc-stat-assign-row .wc-assign-search {
  font-size: var(--wc-fs-base);
}

#view-work-config .wc-stat-assign-row {
  border-radius: var(--wc-inp-radius);
}

#view-work-config .wc-assign-editor-body:empty::before {
  font-size: var(--wc-fs-hint);
}

#view-work-config .ss-page-info,
#view-work-config .labor-company-names-page-label {
  font-size: var(--wc-fs-base);
}

#view-work-config .work-config-card .btn {
  font-size: var(--wc-fs-base);
}

@media (max-width: 640px) {
  body.admin-workspace #view-work-config #work-config-mobile-nav .work-config-mobile-nav__btn {
    font-size: var(--wc-fs-base);
  }
}

/* 侧栏 / 底栏 / 录入 Tab 带圈数字提示 */
.admin-main-tab.app-sidebar-link,
.admin-main-tab.admin-main-tab--dropdown {
  position: relative;
}

.nav-circle-badge,
.nav-submenu-circle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.35);
  vertical-align: middle;
}

.nav-submenu-circle-badge {
  margin-left: 0.35rem;
}

.entry-tab .nav-circle-badge.entry-tab-badge {
  margin-left: 0.35rem;
}

.admin-bottom-tab {
  position: relative;
}

.admin-bottom-tab-badge.nav-circle-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  margin-left: 0;
  min-width: 1rem;
  height: 1rem;
  font-size: 0.6rem;
}

.manage-segment-btn .manage-segment-badge.nav-circle-badge {
  margin-left: 0.3rem;
}

.modal-panel-entry-incomplete,
.modal-panel-pick-approver {
  max-width: min(92vw, 420px);
}

.modal-entry-incomplete-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.modal-entry-incomplete-head h3 {
  margin: 0;
  flex: 1;
}

.modal-corner-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin: -0.35rem -0.35rem 0 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-corner-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.modal-entry-incomplete-lead {
  margin: 0.5rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-entry-incomplete-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
  font-size: 0.9rem;
}

.modal-entry-incomplete-list li {
  margin: 0.25rem 0;
}

.modal-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.modal-actions--stack .btn {
  width: 100%;
  justify-content: center;
}

.modal-pick-approver-search-label {
  display: block;
  margin: 0.75rem 0;
}

.entry-pick-approver-list {
  max-height: min(40vh, 280px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  background: var(--surface2);
}

.entry-approver-option {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding: 0.45rem 0.35rem;
  border-radius: 8px;
  cursor: pointer;
}

.entry-approver-option:hover {
  background: rgba(59, 130, 246, 0.08);
}

.entry-approver-option input {
  margin: 0;
}

.entry-approver-option__name {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}
