:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --border: #2d3a4a;
  --text: #e8eef4;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-dim: #2563c9;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --card-control-width: 7rem;
  --card-control-height: 2.6rem;
  --app-sidebar-width: 280px;
  --app-queue-sidebar-width: 280px;
  --app-sidebar-rail: 2.65rem;
  --app-left-dock: var(--app-sidebar-width);
  --app-right-dock: var(--app-queue-sidebar-width);
  --app-sidebar-offset: 1rem;
  --header-surface: #f1ede4;
  --header-surface-strong: #e7e0d2;
  --header-border: rgba(117, 95, 65, 0.18);
  --header-text: #1f2937;
  --header-muted: #6b7280;
  --header-gradient-start: #f4efe6;
}

/* Avoid exposing the default theme while the persisted preference is being restored.
   登录/注册页不加载 header-theme.js，不能一直隐藏，否则会整页黑屏。 */
html:not([data-page-theme-ready]) body:not(.auth-page) {
  visibility: hidden;
}

/* 整页配色由用户的背景样式选择控制，不依赖操作系统主题。 */
html[data-page-background="dark"] {
  color-scheme: dark;
}

html[data-page-background="light"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --border: #d8dee8;
  --text: #1f2937;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-dim: #1d4ed8;
  --ok: #059669;
  --warn: #b45309;
  --danger: #dc2626;
  --header-surface: #ffffff;
  --header-surface-strong: #f8fafc;
  --header-border: rgba(100, 116, 139, 0.24);
  --header-text: #1f2937;
  --header-muted: #64748b;
  --header-gradient-start: #ffffff;
}

html[data-page-background="beige"] {
  color-scheme: light;
  --bg: #f4ecdc;
  --surface: #fffaf0;
  --border: #dbc9a9;
  --text: #463625;
  --muted: #806b50;
  --accent: #9a642e;
  --accent-dim: #76471f;
  --ok: #46734d;
  --warn: #a55d20;
  --danger: #b42318;
  --header-surface: #fff8e9;
  --header-surface-strong: #f1e2c7;
  --header-border: rgba(117, 82, 39, 0.24);
  --header-text: #463625;
  --header-muted: #806b50;
  --header-gradient-start: #fffdf7;
}

html[data-page-background="green"] {
  color-scheme: light;
  --bg: #e5f1e8;
  --surface: #f8fdf8;
  --border: #b8d6c0;
  --text: #1f3b2a;
  --muted: #597464;
  --accent: #24734a;
  --accent-dim: #185a38;
  --ok: #237448;
  --warn: #a15f18;
  --danger: #b42318;
  --header-surface: #f5fcf6;
  --header-surface-strong: #d7ebda;
  --header-border: rgba(42, 103, 62, 0.22);
  --header-text: #1f3b2a;
  --header-muted: #597464;
  --header-gradient-start: #fbfffb;
}

html[data-page-background="blue"] {
  color-scheme: light;
  --bg: #e6f0fa;
  --surface: #f9fcff;
  --border: #bdd2e8;
  --text: #20374e;
  --muted: #5c748d;
  --accent: #2768aa;
  --accent-dim: #1c5087;
  --ok: #287052;
  --warn: #a66119;
  --danger: #b42318;
  --header-surface: #f4f9ff;
  --header-surface-strong: #d9e8f6;
  --header-border: rgba(43, 98, 152, 0.22);
  --header-text: #20374e;
  --header-muted: #5c748d;
  --header-gradient-start: #fbfdff;
}

html[data-page-background="gray"] {
  color-scheme: light;
  --bg: #eceff2;
  --surface: #fafbfc;
  --border: #cbd2d9;
  --text: #303a45;
  --muted: #697581;
  --accent: #526b84;
  --accent-dim: #40566d;
  --ok: #3e765a;
  --warn: #9a641e;
  --danger: #b42318;
  --header-surface: #f7f8fa;
  --header-surface-strong: #e1e5e9;
  --header-border: rgba(66, 80, 94, 0.2);
  --header-text: #303a45;
  --header-muted: #697581;
  --header-gradient-start: #fdfdfd;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.layout-with-global-sidebar {
  max-width: none;
  margin: 0;
  padding:
    1.5rem
    calc(var(--app-right-dock) + var(--app-sidebar-offset))
    3rem
    calc(var(--app-left-dock) + var(--app-sidebar-offset));
}

.header {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.15rem 1.35rem 1.35rem;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--header-gradient-start) 0%, var(--header-surface) 100%);
  border: 1px solid var(--header-border);
  box-shadow: 0 14px 36px rgba(15, 20, 25, 0.12);
  color: var(--header-text);
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.sub {
  color: var(--header-muted);
  margin: 0;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .span-2 {
    grid-column: span 2;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
}

.card h2 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.field-label-row {
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.req-star {
  color: #ef4444;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1em;
}

.radio-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.field input[type="number"],
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.field input[type="range"] {
  width: 100%;
  margin: 0.25rem 0 0.5rem;
  accent-color: var(--accent);
}

.field-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 520px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.range-row input[type="number"] {
  width: 6rem;
  flex-shrink: 0;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
}

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

@media (min-width: 600px) {
  .alloc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0;
  cursor: pointer;
}

.check input {
  accent-color: var(--accent);
}

.muted {
  opacity: 0.85;
}

.small {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.actions.actions-stack {
  flex-direction: column;
  align-items: stretch;
}

.actions.actions-stack .status {
  margin-top: 0.25rem;
}

button.secondary {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.55);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

button.feishu-login-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(51, 112, 255, 0.55);
  background: linear-gradient(180deg, rgba(51, 112, 255, 0.22) 0%, rgba(51, 112, 255, 0.1) 100%);
  color: #dbeafe;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

button.feishu-login-btn-main:hover:not(:disabled) {
  border-color: #5b8cff;
  color: #fff;
  background: linear-gradient(180deg, rgba(51, 112, 255, 0.35) 0%, rgba(51, 112, 255, 0.18) 100%);
}

button.feishu-login-btn-main:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.feishu-login-btn-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  background: rgba(51, 112, 255, 0.35);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.feishu-login-btn-main:hover:not(:disabled) .feishu-login-btn-mark {
  background: rgba(51, 112, 255, 0.5);
}

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-oauth-divider span {
  white-space: nowrap;
}

.auth-oauth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

button.primary {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

button.primary:hover {
  background: var(--accent-dim);
}

button.primary:disabled,
button.primary:disabled:hover {
  background: #4b5563;
  color: rgba(255, 255, 255, 0.88);
  cursor: not-allowed;
  opacity: 0.92;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
}

.status.err {
  color: #f87171;
}

#delivery_report_chat_status {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result {
  border-color: var(--accent);
}

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

.result dt {
  color: var(--muted);
  margin: 0;
}

.result dd {
  margin: 0;
}

.result .big {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ok);
}

.result table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.85rem;
}

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

.result th {
  color: var(--muted);
  font-weight: 500;
}

.footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-background-switcher {
  display: inline-flex;
  align-items: center;
}

.page-background-switcher__select {
  min-width: 5.75rem;
  min-height: 2.2rem;
  padding: 0.42rem 2rem 0.42rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.55rem;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% - 0.12rem),
    calc(100% - 0.68rem) calc(50% - 0.12rem);
  background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
  background-repeat: no-repeat;
  color: #475569;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.page-background-switcher__select:hover,
.page-background-switcher__select:focus {
  border-color: #6366f1;
}

.page-background-switcher__select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

html[data-page-background="dark"] .page-background-switcher__select {
  border-color: var(--border);
  background-color: var(--surface);
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-mark-image {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(44vw, 280px);
  object-fit: contain;
}

.toolbar-user {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  min-width: 7rem;
}

.toolbar-user strong {
  font-size: 0.95rem;
  color: #111827;
}

.toolbar-user-desc {
  font-size: 0.78rem;
  color: #6b7280;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  flex: 1 1 28rem;
}


.page-switch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.primary-nav-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.primary-nav-menu__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 8.5rem;
  padding: 0.4rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(117, 95, 65, 0.16);
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.14);
}

.primary-nav-menu__panel[hidden] {
  display: none !important;
}

.primary-nav-menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  background: var(--header-muted);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.primary-nav-menu__item:hover {
  background: #5b6470;
}

.primary-nav-menu__item.is-active,
.primary-nav-menu__item.is-active:hover {
  background: #c4a574;
  color: #fff;
}

.app-sidebar .primary-nav-menu {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
}

.app-sidebar .primary-nav-menu__panel {
  position: static;
  top: auto;
  left: auto;
  margin-top: 0.35rem;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.app-sidebar .primary-nav-menu__item {
  justify-content: flex-start;
  background: transparent;
  color: var(--text);
}

.app-sidebar .primary-nav-menu__item:hover,
.app-sidebar .primary-nav-menu__item.is-active {
  background: rgba(255, 255, 255, 0.08);
}


.layout-with-global-sidebar .page-switch-row {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 1rem;
}

.page-switch-row + .grid {
  margin-top: 1rem;
}

.mode-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mode-switch-row .small {
  margin-bottom: 0;
}

.mode-switch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.hours-admin-switch-bar {
  display: grid;
  gap: 0.55rem;
}

.hours-admin-switch-actions,
.risk-form-switch {
  display: flex;
  justify-content: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--header-surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.hours-admin-switch-actions .toolbar-btn,
.risk-form-switch .toolbar-btn {
  min-height: 2.2rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--header-surface);
  color: var(--header-text);
  box-shadow: none;
}

.hours-admin-switch-actions .toolbar-btn:hover,
.risk-form-switch .toolbar-btn:hover {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(70, 54, 37, 0.12);
}

.hours-admin-switch-actions .toolbar-btn.is-active,
.risk-form-switch .toolbar-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(70, 54, 37, 0.2);
}

.hours-admin-switch-actions .toolbar-btn.is-active:hover,
.risk-form-switch .toolbar-btn.is-active:hover {
  background: var(--accent-dim);
}

.hours-admin-switch-desc {
  margin: 0;
  color: #9fb0c8;
}

.risk-admin-list-panel {
  margin-bottom: 1rem;
}

.risk-admin-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.risk-admin-list-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e8eef8;
}

.risk-admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.risk-admin-list-sort-field {
  margin: 0;
}

.risk-admin-list-sort-field label {
  font-size: 0.8rem;
  color: #9fb0c8;
}

.formula-grid {
  display: grid;
  gap: 0.9rem 1rem;
}

@media (min-width: 720px) {
  .formula-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.formula-split-sections {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.formula-subsection {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.28);
}

.formula-module-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 720px) {
  .formula-module-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.formula-module-group {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.22);
  min-width: 0;
}

.formula-module-group-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
}

.formula-module-group > .formula-grid,
.formula-module-group > .formula-split-sections {
  margin-top: -0.15rem;
}

.formula-module-group .formula-split-sections {
  gap: 1rem;
}

.formula-subsection h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
}

.formula-subsection .formula-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .formula-subsection .formula-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.formula-summary {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .formula-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

.formula-summary-item {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.35);
}

.formula-summary-item span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.formula-summary-item strong {
  color: var(--text);
  font-size: 0.95rem;
}

.formula-method-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .formula-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.formula-method-card {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.38);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background-color 0.18s ease;
}

.formula-method-card.is-active {
  border-color: rgba(61, 139, 253, 0.95);
  background: rgba(37, 99, 201, 0.18);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.16);
  transform: translateY(-1px);
}

.formula-method-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.formula-method-main {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.formula-method-note {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.formula-method-card-full {
  grid-column: 1 / -1;
}

.formula-method-equation {
  margin-top: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.48);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
}

.formula-sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  padding: 0.45rem 1rem 0.55rem;
  background: rgba(15, 20, 25, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.formula-sticky-bar[hidden] {
  display: none !important;
}

.formula-sticky-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 0.35rem;
}

.formula-sticky-bar .formula-method-line-root {
  font-size: 0.78rem;
  line-height: 1.55;
  padding: 0.45rem 0.65rem;
}

.formula-method-sections {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.formula-method-section {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.22);
}

.formula-method-line {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.28);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.7;
}

.formula-method-line-root {
  background: rgba(15, 20, 25, 0.42);
  font-weight: 600;
}

.formula-method-children {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-left: 1.2rem;
  border-left: 2px solid rgba(61, 139, 253, 0.18);
}

.formula-method-subline {
  color: var(--muted);
  font-size: 0.84rem;
}

.formula-method-config {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(61, 139, 253, 0.12);
}

.formula-part {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 8px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.formula-part.is-active {
  background: rgba(61, 139, 253, 0.2);
  color: #dbeafe;
  box-shadow: 0 0 0 1px rgba(61, 139, 253, 0.45);
}

.formula-operator {
  color: var(--muted);
  padding: 0 0.12rem;
}

.formula-group {
  white-space: normal;
}

.toolbar-select-wrap {
  position: relative;
  display: inline-flex;
}

.toolbar-select {
  appearance: none;
  min-width: 6.6rem;
  padding: 0.56rem 2.05rem 0.56rem 0.85rem;
  border: 1px solid #d6cec0;
  border-radius: 10px;
  background:
    linear-gradient(45deg, transparent 50%, #7c8598 50%),
    linear-gradient(135deg, #7c8598 50%, transparent 50%),
    var(--header-surface-strong);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size: 6px 6px, 6px 6px, auto;
  background-repeat: no-repeat;
  color: #4b5563;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--header-muted);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

button.toolbar-btn,
button.sidebar-item {
  appearance: none;
  -webkit-appearance: none;
}

.toolbar-btn:hover {
  transform: translateY(-1px);
  background: var(--accent-dim);
  box-shadow: 0 10px 20px rgba(70, 54, 37, 0.18);
}

.toolbar-btn.is-active {
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(70, 54, 37, 0.24);
}

.toolbar-btn.is-active:hover {
  background: var(--accent-dim);
}

.user-popover {
  position: absolute;
  top: calc(100% - 0.55rem);
  right: 1.35rem;
  z-index: 36;
  min-width: 15rem;
  padding: 0.85rem;
  border: 1px solid #ddd3c3;
  border-radius: 14px;
  background: rgba(241, 237, 228, 0.98);
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.1);
}

.user-popover-item + .user-popover-item {
  margin-top: 0.75rem;
}

.user-popover-item span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  color: var(--header-muted);
}

.user-popover-item strong {
  font-size: 0.95rem;
  color: var(--header-text);
}

.header-copy {
  margin-top: 1rem;
}

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

@media (max-width: 1024px) {
  .toolbar-user {
    order: 3;
    margin-left: 0;
    align-items: flex-start;
  }

  .toolbar-actions {
    justify-content: flex-start;
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .layout {
    padding-top: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .brand-mark {
    font-size: 1.5rem;
  }

  .toolbar-select,
  .toolbar-btn {
    width: 100%;
  }

  .page-switch-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mode-switch-row {
    flex-direction: column;
    align-items: stretch;
  }

  .user-popover {
    left: 1rem;
    right: 1rem;
    top: calc(100% - 0.35rem);
  }
}

.page-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(26, 34, 44, 0.9);
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.page-nav-link:hover {
  color: var(--text);
  background: rgba(61, 139, 253, 0.12);
}

.page-nav-link.is-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(61, 139, 253, 0.22);
}

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

.auth-tip {
  margin-top: 0.35rem;
}

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

@media (min-width: 720px) {
  .auth-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: rgba(15, 20, 25, 0.42);
}

.auth-panel h3 {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  font-size: 0.8rem;
  font-weight: 600;
}

.role-badge.user {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.35);
}

.role-badge.admin {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.current-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.42);
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.42);
}

.auth-layout {
  max-width: 760px;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.auth-page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
  padding: 0.7rem 1rem 0.75rem;
  text-align: center;
}

.auth-page-header h1 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.auth-page-header .sub {
  max-width: 34rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-brand-image {
  display: block;
  width: auto;
  max-width: 168px;
  max-height: 72px;
  height: auto;
  object-fit: contain;
}

.auth-grid-single {
  margin-top: 0.75rem;
}

body.auth-page .auth-panel {
  padding: 0.85rem 1rem;
}

body.auth-page .auth-panel h2 {
  margin: 0 0 0.35rem;
}

body.auth-page .auth-tip {
  margin: 0 0 0.45rem;
}

body.auth-page .auth-register-entry {
  margin: 0 0 0.7rem;
}

body.auth-page .field {
  margin-bottom: 0.7rem;
}

@media (max-height: 780px) {
  .auth-page-header {
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    padding: 0.5rem 0.85rem 0.55rem;
  }

  .auth-brand-image {
    max-width: 132px;
    max-height: 56px;
  }

  .auth-page-header h1 {
    font-size: 1.08rem;
  }

  .auth-page-header .sub {
    font-size: 0.75rem;
  }

  .auth-grid-single {
    margin-top: 0.5rem;
  }
}

.auth-grid-single.auth-grid {
  grid-template-columns: minmax(0, 1fr);
}

.auth-register-entry {
  margin: 0 0 1rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.inline-link:hover {
  color: #75aefe;
  text-decoration: underline;
}

body.modal-open {
  overflow: hidden;
}

#prep_delivery_board_view.is-prep-board-suspended {
  display: none !important;
}

body.delivery-fill-dragging {
  cursor: ew-resize;
  user-select: none;
}

body.delivery-cell-selecting {
  cursor: crosshair;
  user-select: none;
}

.modal.hidden {
  display: none;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.72);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  margin: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h2 {
  margin-bottom: 0;
}

.modal-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.field select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.card .field input[type="number"]:not([type="range"]),
.card .field select,
.formula-field input {
  width: min(100%, var(--card-control-width));
  min-height: var(--card-control-height);
}

.field input.fixed-short-input[type="number"],
#customer_cooperation_willingness,
#coordination_level,
#scene_complexity {
  width: min(100%, var(--card-control-width));
}

.field input.fixed-short-input[type="number"]:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.baseline-readonly-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.baseline-readonly-row .field {
  margin-bottom: 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 0;
}

.baseline-readonly-row .field label {
  display: inline-block;
  margin-bottom: 0;
  white-space: nowrap;
}

.baseline-readonly-row .field input.fixed-short-input[type="number"] {
  width: 5.5rem;
  max-width: none;
  flex: 0 0 auto;
}

.baseline-readonly-row .field input.fixed-short-input[type="number"]:disabled {
  border-color: #3a4656;
  background: #202a35;
  color: #94a3b8;
  box-shadow: none;
}

.baseline-readonly-row .field input.fixed-short-input[type="number"]:disabled::-webkit-outer-spin-button,
.baseline-readonly-row .field input.fixed-short-input[type="number"]:disabled::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.baseline-readonly-row .field input.fixed-short-input[type="number"]:disabled {
  -moz-appearance: textfield;
}

.customer-inline-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.customer-inline-field {
  margin-bottom: 0;
  min-width: 0;
}

.customer-inline-check {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.customer-inline-title {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.customer-inline-check .check {
  margin: 0;
  white-space: nowrap;
}

.customer-inline-row .field select {
  width: 100%;
  max-width: none;
  min-height: 2.55rem;
  cursor: pointer;
}

.customer-inline-row .field select.vehicle-type-select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  padding-right: 0.65rem;
  background-image: none;
}

.customer-inline-check-control {
  min-height: var(--card-control-height);
  display: inline-flex;
  align-items: center;
}

.dynamic-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dynamic-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  justify-content: start;
}

@media (min-width: 720px) {
  .dynamic-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.7fr) auto;
  }
}

.vehicle-type-field {
  display: grid;
  gap: 0.55rem;
  width: auto;
  min-width: 0;
  justify-self: start;
}

.vehicle-type-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.vehicle-type-inline .vehicle-type-select {
  width: min(100%, 14rem);
}

.vehicle-metric-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
}

.vehicle-metric-title {
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.vehicle-row {
  width: 100%;
  justify-content: start;
  column-gap: 0.85rem;
}

@media (min-width: 720px) {
  .vehicle-row {
    grid-template-columns: max-content max-content max-content max-content;
    justify-content: start;
    align-items: center;
  }
}

.vehicle-row .vehicle-qty {
  width: 7rem;
  justify-self: start;
}

.vehicle-row .vehicle-point-count {
  width: 7rem;
  justify-self: start;
}

.vehicle-row .vehicle-operation-point-count {
  width: 7rem;
  justify-self: start;
}

.vehicle-row .row-remove {
  justify-self: start;
  align-self: center;
}

.dynamic-row input[type="text"],
.dynamic-row input[type="number"],
.dynamic-row select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.dynamic-row input[type="text"]:focus,
.dynamic-row input[type="number"]:focus,
.dynamic-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.vehicle-type-select,
.vehicle-type-custom {
  min-height: 2.55rem;
}

.vehicle-type-select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  padding-right: 0.65rem;
}

.count-check-grid {
  display: grid;
  row-gap: 0.75rem;
  column-gap: 2.5rem;
}

@media (min-width: 720px) {
  .count-check-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.count-check-row {
  display: grid;
  grid-template-columns: 96px 7rem;
  gap: 40px;
  align-items: center;
  justify-content: start;
}

.count-check-row input[type="number"] {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  justify-self: start;
  text-align: left;
}

.compact {
  margin: 0;
}

.flag-grid {
  display: grid;
  gap: 0.5rem 1rem;
}

@media (min-width: 720px) {
  .flag-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.custom-section {
  display: grid;
  gap: 1rem;
}

.custom-block {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.4);
}

.custom-block-title {
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.custom-count-grid {
  display: grid;
  gap: 0.5rem 1rem;
}

@media (min-width: 720px) {
  .custom-count-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

.chip:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip.subtle {
  color: var(--muted);
}

.hour-summary {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 520px) {
  .hour-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.hour-metric {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hour-metric span {
  font-size: 0.8rem;
  color: var(--muted);
}

.hour-metric strong {
  font-size: 1.25rem;
  color: var(--ok);
  font-weight: 700;
}

.note-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.note-list li {
  margin-bottom: 0.35rem;
}

.submission-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(15, 20, 25, 0.42);
}

.submission-card + .submission-card {
  margin-top: 1rem;
}

.submission-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

button.submission-card-title-btn {
  margin: 0;
  padding: 0;
  border: none;
  border-bottom: 1px solid rgba(141, 108, 255, 0.45);
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.submission-card-title-btn:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

button.submission-card-title-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.submission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.submission-details summary {
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
}

.submission-fields {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (min-width: 720px) {
  .submission-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.submission-field {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

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

.submission-field strong {
  font-size: 0.9rem;
  color: var(--text);
}

.submission-meta-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
}

.result-callout {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.result-callout strong {
  font-size: 0.95rem;
  color: var(--text);
}

.result-callout span {
  font-size: 0.85rem;
  color: var(--muted);
}

.result-callout-warn {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.08);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(15, 20, 25, 0.7);
  backdrop-filter: blur(2px);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-dialog {
  width: min(100%, 760px);
  max-height: calc(100vh - 4rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  padding: 1.25rem 1.35rem;
}

.modal-dialog-large {
  width: min(100%, 980px);
}

.prep-issue-stats-todo-modal-dialog {
  width: min(100%, 1120px);
}
.prep-issue-stats-todo-modal-dialog .modal-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}
.prep-issue-stats-todo-modal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(15rem, 1fr));
  gap: 0.75rem;
  min-height: 18rem;
}
.prep-issue-stats-todo-modal-board .prep-project-todo-card.is-draggable {
  cursor: grab;
  user-select: none;
}
.prep-issue-stats-todo-modal-board .prep-project-todo-card.is-dragging {
  opacity: 0.45;
}
.prep-issue-stats-todo-modal-board .prep-project-todo-column.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -3px;
}
#prep_project_todo_dialog {
  z-index: 1010;
}

.delivery-project-detail-modal-dialog {
  width: min(100%, 820px);
}

.delivery-person-month-modal-dialog {
  width: min(100%, 920px);
}

.modal-header {
  position: sticky;
  top: -1.3rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.25rem -1.35rem 1rem;
  padding: 1rem 1.35rem 0.9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  min-width: 0;
}

.modal-header .toolbar-btn,
.modal-header > button {
  width: auto;
  flex: 0 0 auto;
}

.formula-value-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .formula-value-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.formula-value-block {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.formula-value-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.formula-equation {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 20, 25, 0.42);
  color: var(--text);
  font-size: 0.92rem;
}

.formula-equation + .formula-equation {
  margin-top: 0.75rem;
}

.formula-substitution-result {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.readonly-note {
  border-color: rgba(251, 191, 36, 0.4);
}

.main-with-sidebar {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  gap: 2rem;
  min-height: calc(100vh - 12rem);
}

.layout-with-global-sidebar .main-with-sidebar {
  display: block;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: auto;
}

.layout-with-global-sidebar .header,
.layout-with-global-sidebar .footer {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.45rem 0.55rem;
  height: fit-content;
}

.layout-with-global-sidebar .sidebar {
  position: fixed;
  left: var(--app-sidebar-offset);
  top: 1.5rem;
  width: var(--app-sidebar-width);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  z-index: 20;
}

.layout-with-global-sidebar .admin-queue-sidebar {
  left: auto;
  right: var(--app-sidebar-offset);
  width: var(--app-queue-sidebar-width);
}

.sidebar-dock-toggle {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 25;
  width: 1.7rem;
  min-width: 1.7rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
}
.sidebar-dock-toggle:hover {
  background: transparent;
  color: var(--accent);
}
.sidebar-resize-handle {
  display: none;
  position: absolute;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 0.55rem;
  z-index: 3;
  cursor: col-resize;
  touch-action: none;
}
.sidebar-resize-handle::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 38%, var(--border));
}
body.is-prep-board-page:not(.is-mobile) .sidebar-dock-toggle,
html:not(.is-mobile) body.is-prep-board-page .sidebar-dock-toggle,
body.is-prep-board-page:not(.is-mobile) .sidebar-resize-handle,
html:not(.is-mobile) body.is-prep-board-page .sidebar-resize-handle {
  display: block;
}
body.is-prep-board-page #prep_board_left_sidebar,
body.is-prep-board-page #prep_today_progress_factor_sidebar {
  position: fixed;
}
body.is-prep-board-page #prep_board_left_sidebar .sidebar-dock-toggle,
body.is-prep-board-page #prep_today_progress_factor_sidebar .sidebar-dock-toggle {
  position: fixed;
  display: flex;
  top: 50%;
}
body.is-prep-board-page #prep_board_left_sidebar .sidebar-dock-toggle {
  left: calc(var(--app-sidebar-offset) + var(--app-left-dock) - 0.85rem);
  right: auto;
}
body.is-prep-board-page #prep_today_progress_factor_sidebar .sidebar-dock-toggle {
  left: auto;
  right: calc(var(--app-sidebar-offset) + var(--app-right-dock) - 0.85rem);
}
body.is-prep-board-page #prep_board_left_sidebar .sidebar-resize-handle {
  right: -0.2rem;
}
body.is-prep-board-page #prep_today_progress_factor_sidebar .sidebar-resize-handle {
  left: -0.2rem;
}
html.is-prep-left-sidebar-collapsed {
  --app-left-dock: var(--app-sidebar-rail);
}
html.is-prep-right-sidebar-collapsed {
  --app-right-dock: var(--app-sidebar-rail);
}
html.is-prep-right-sidebar-hidden {
  --app-right-dock: 0px;
}
html.is-prep-left-sidebar-collapsed body.is-prep-board-page #prep_board_left_sidebar,
html.is-prep-right-sidebar-collapsed body.is-prep-board-page #prep_today_progress_factor_sidebar,
html.is-prep-right-sidebar-hidden body.is-prep-board-page .records-registry-sidebar,
html.is-prep-right-sidebar-collapsed body.is-prep-board-page .records-registry-sidebar {
  width: 0;
  min-width: 0;
  max-width: 0;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  pointer-events: none;
}
html.is-prep-left-sidebar-collapsed body.is-prep-board-page #prep_board_left_sidebar > :not(.sidebar-dock-toggle),
html.is-prep-right-sidebar-collapsed body.is-prep-board-page #prep_today_progress_factor_sidebar > :not(.sidebar-dock-toggle),
html.is-prep-right-sidebar-hidden body.is-prep-board-page .records-registry-sidebar > *,
html.is-prep-right-sidebar-collapsed body.is-prep-board-page .records-registry-sidebar > * {
  display: none !important;
}
html.is-prep-left-sidebar-collapsed body.is-prep-board-page #prep_board_left_sidebar .sidebar-dock-toggle,
html.is-prep-right-sidebar-collapsed body.is-prep-board-page #prep_today_progress_factor_sidebar .sidebar-dock-toggle {
  writing-mode: horizontal-tb;
  min-height: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  letter-spacing: 0;
  pointer-events: auto;
}
html.is-mobile,
body.is-mobile {
  --app-left-dock: 0px;
  --app-right-dock: 0px;
}
html.is-mobile .sidebar-dock-toggle,
body.is-mobile .sidebar-dock-toggle,
html.is-mobile .sidebar-resize-handle,
body.is-mobile .sidebar-resize-handle {
  display: none !important;
}

.sidebar-header {
  padding: 0.5rem 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.28rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.sidebar-item.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 139, 253, 0.25);
}

.sidebar-section + .sidebar-section {
  margin-top: 1rem;
}

.sidebar-section .sidebar-header {
  margin-bottom: 0.6rem;
}

.app-sidebar .sidebar-item,
.app-sidebar-risk .sidebar-item {
  justify-content: flex-start;
}

/* 风险评估页：左侧主评估项下的子导航 */
.sidebar-nav-risk-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.sidebar-item.sidebar-item--risk-parent {
  cursor: default;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-item.sidebar-item--risk-parent:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  padding: 0 0 0.05rem 0.5rem;
  margin: 0 0 0.05rem 0;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.sidebar-item.sidebar-subitem {
  padding: 0.26rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
}

.admin-queue-search {
  margin-bottom: 0.75rem;
}

.admin-queue-search input[type="text"] {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.admin-queue-search input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.admin-queue-item {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-queue-item-main {
  display: grid;
  gap: 0.12rem;
}

.admin-queue-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: inherit;
}

.admin-queue-item-name,
.admin-queue-item-meta {
  font-size: 0.78rem;
  color: inherit;
  opacity: 0.9;
}

.admin-queue-item-name {
  word-break: break-word;
}

.records-registry-sidebar .records-registry-section,
#records_registry_sidebar .records-registry-section {
  margin: 0;
}

.records-registry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.records-tab-btn {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.records-tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.records-tab-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.records-registry-sort label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.records-sort-select {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
}

.records-table-scroll {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.records-registry-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.72rem;
}

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

.records-registry-table tbody tr {
  height: auto;
}

.records-registry-table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}

.records-registry-table tbody td.records-empty {
  white-space: normal;
}

.records-registry-table thead th {
  white-space: nowrap;
}

.records-registry-table td.records-td-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

.records-registry-table td.records-td-actions {
  width: 2.75rem;
  max-width: 2.75rem;
  overflow: visible;
  white-space: nowrap;
  text-align: right;
}

.records-registry-table th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.records-registry-table a {
  color: var(--accent);
  white-space: nowrap;
}

.records-registry-table .records-time {
  width: 4.5rem;
  max-width: 4.5rem;
  white-space: nowrap;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.records-empty {
  text-align: center;
  color: var(--muted);
  padding: 0.75rem !important;
}

.records-registry-status {
  margin: 0;
  font-size: 0.75rem;
}

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

.main-content .card {
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .layout-with-global-sidebar {
    padding: 1rem 1rem 3rem;
  }

  .layout-with-global-sidebar .sidebar {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  .layout-with-global-sidebar .admin-queue-sidebar {
    right: auto;
  }

  .layout-with-global-sidebar .main-with-sidebar {
    display: flex;
    margin: 0 auto;
    padding: 0 1rem 3rem;
  }

  .main-with-sidebar {
    flex-direction: column;
    padding: 0 1rem 3rem;
  }

  .sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1rem;
  }

  .sidebar-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .sidebar-item {
    white-space: nowrap;
    width: auto;
  }
}


.main-content .grid {
  margin-top: 0;
}

.main-content .footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
}

.submit-success-card {
  border-color: var(--ok);
}

.submit-success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.submit-success-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.submit-success-content h2 {
  margin: 0 0 0.5rem;
  color: var(--ok);
  font-size: 1.3rem;
}

.submit-success-content .small {
  margin-bottom: 1.5rem;
}

.submit-share-field {
  width: min(100%, 44rem);
  margin: 0 0 1rem;
  text-align: left;
}

.submit-share-field input[type="text"] {
  width: 100%;
}

.share-link-input-wrap {
  position: relative;
}

.share-link-input-wrap input[type="text"] {
  padding-right: 3rem;
}

.share-copy-icon-btn {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 20, 25, 0.88);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.share-copy-icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(15, 20, 25, 0.96);
}

.share-copy-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submit-share-actions {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 1rem;
}

.submit-share-actions-left {
  justify-content: flex-start;
}

.submission-card-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .main-with-sidebar {
    flex-direction: column;
    padding: 0 1rem 3rem;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-height: none;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
  }

  .sidebar-list {
    max-height: 200px;
  }

  .main-content {
    padding: 0;
  }
}

.search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.search-status-below {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0;
  min-height: 1.25rem;
}

.search-row input[type="text"] {
  flex: 1;
  min-width: 12rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

/* 奖金页：项目搜索结果为输入框下拉里展示，不再使用大表格 */
.bonus-project-search-field {
  position: relative;
}

.bonus-project-search-row {
  position: relative;
}

.project-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
}

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

.project-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  position: sticky;
  top: 0;
  background: var(--surface);
}

.project-table tbody tr {
  transition: background-color 0.15s;
}

.project-table tbody tr:hover {
  background: rgba(61, 139, 253, 0.08);
}

.project-table .btn-select {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}

.project-table .btn-select:hover {
  background: var(--accent);
  color: #fff;
}

.selected-project {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.06);
}

.selected-project h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--ok);
}

.selected-project-grid {
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  font-size: 0.85rem;
}

.selected-project-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.selected-project-item span {
  color: var(--muted);
  font-size: 0.75rem;
}

.selected-project-item strong {
  color: var(--text);
  font-size: 0.88rem;
}

.selected-project-date-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 88%, #fff);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.selected-project-date-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}

body.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.75rem 1rem 1rem;
}

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

.formula-actions {
  margin-top: 0;
  justify-content: flex-end;
}

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

@media (min-width: 720px) {
  .formula-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.formula-block {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.42);
}

.formula-block h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.formula-block .small {
  margin-bottom: 0.9rem;
}

.formula-field-grid {
  display: grid;
  gap: 0.8rem;
}

@media (min-width: 520px) {
  .formula-field-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.formula-field {
  display: block;
}

.formula-field span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.formula-field input {
  width: min(100%, var(--card-control-width));
  min-height: var(--card-control-height);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.formula-preview-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .formula-preview-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .formula-header-row {
    flex-direction: column;
  }

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

.risk-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.risk-search-panel {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.risk-customer-info-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.risk-customer-info-card .risk-search-panel {
  margin-top: 0.65rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.risk-customer-meta-sections {
  margin-top: 0.85rem;
}

.risk-customer-meta-sections .risk-form-section {
  margin-top: 0;
}

.risk-customer-meta-sections .risk-form-section-head {
  display: none;
}

.risk-form-shell {
  display: grid;
  gap: 1rem;
}

/* 调研表 rsub 公开分享：单列主内容 */
.risk-public-snapshot-body .main-with-sidebar {
  grid-template-columns: 1fr !important;
}

.risk-public-snapshot-body .main-with-sidebar > aside.sidebar {
  display: none !important;
}

.risk-survey-share-hint {
  margin: 0.5rem 0 0;
  color: #9fb0c8;
}

.risk-form-switch {
  margin-top: 0;
}

.risk-form-switch .toolbar-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.risk-form-mode-desc {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: #9fb0c8;
}

.risk-share-admin-panel {
  margin-top: 0;
}

.risk-share-admin-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.risk-share-admin-intro {
  margin: 0 0 0.5rem;
  color: #9fb0c8;
}

.risk-share-admin-scope-hint {
  margin: 0 0 0.75rem;
  color: #9fb0c8;
}

.risk-share-url-field {
  margin-bottom: 0.65rem;
}

.risk-share-url-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.risk-share-url-field .share-link-input-wrap input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 3rem 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.risk-share-generate-actions {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.risk-share-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.risk-share-admin-toolbar--single-row {
  flex-wrap: nowrap;
}

@media (max-width: 520px) {
  .risk-share-admin-toolbar--single-row {
    flex-wrap: wrap;
  }
}

.risk-share-admin-field {
  flex: 1 1 14rem;
  min-width: 10rem;
  margin: 0;
}

.risk-share-admin-field--grow {
  flex: 1 1 auto;
  min-width: 0;
}

.risk-share-admin-input {
  width: 100%;
  margin-top: 0.35rem;
}

.risk-share-admin-submit {
  flex: 0 0 auto;
  padding-bottom: 0.1rem;
  white-space: nowrap;
}

.risk-share-admin-status {
  margin: 0.75rem 0 0;
}

.risk-drafts-sidebar-list {
  max-height: 28vh;
  overflow-y: auto;
}

.risk-draft-sidebar-row {
  padding: 0.32rem 0.45rem;
  margin-bottom: 0.22rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.risk-draft-sidebar-row__title {
  font-size: 0.82rem;
  line-height: 1.25;
}

.risk-draft-sidebar-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.22rem;
}

.risk-draft-open-link {
  font-size: 0.78rem;
  color: var(--accent, #448aff);
  text-decoration: none;
}

.risk-draft-open-link:hover {
  text-decoration: underline;
}

.risk-draft-delete-btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  min-height: 0;
  line-height: 1.3;
  color: #f2a4a4;
  border-color: rgba(242, 164, 164, 0.45);
}

.risk-draft-delete-btn:hover {
  color: #ffcccc;
  border-color: rgba(255, 204, 204, 0.55);
}

.risk-drafts-empty {
  opacity: 0.85;
  padding: 0.25rem 0;
}

.risk-drafts-submitted-block {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.risk-drafts-subheading {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #9fb0c8);
}

.risk-survey-sidebar-list {
  max-height: 60vh;
  overflow-y: auto;
}

.risk-survey-sidebar-item {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.12rem;
  cursor: default;
}

.risk-survey-sidebar-item strong {
  font-size: 0.92rem;
  color: inherit;
}

.risk-survey-sidebar-item span {
  font-size: 0.78rem;
  color: inherit;
  opacity: 0.86;
  line-height: 1.22;
}

.risk-empty-card {
  margin-top: 1rem;
  padding: 1.1rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.risk-empty-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.risk-search-field {
  margin-bottom: 0;
  position: relative;
}

.risk-search-field input {
  padding-right: 2rem;
}

.risk-search-field::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  top: 2.3rem; /* 约在 label 下方输入框居中位置 */
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--muted);
  pointer-events: none;
}

.risk-search-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (min-width: 720px) {
  .risk-search-panel {
    grid-template-columns: minmax(16rem, 28rem) auto;
    align-items: end;
  }

  .risk-search-actions {
    min-height: 2.6rem;
  }
}

.risk-section-index {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.risk-index-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 8.5rem;
  max-width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.35);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.35;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.risk-index-chip:hover {
  border-color: var(--accent);
  background: rgba(61, 139, 253, 0.08);
}

.risk-index-chip strong {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.key-value-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .key-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.key-value-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.34);
}

.key-value-item span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.key-value-item strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
  word-break: break-word;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.42);
  color: var(--muted);
  font-size: 0.8rem;
}

.risk-summary-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .risk-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.risk-summary-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.38);
}

.risk-summary-card h3 {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
}

.risk-summary-metrics {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .risk-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.risk-summary-metric {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.risk-summary-metric span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.risk-summary-metric strong {
  color: var(--ok);
  font-size: 1.15rem;
}

.data-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  line-height: 1.55;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  min-width: 7rem;
}

.data-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.data-table tbody tr:hover {
  background: rgba(61, 139, 253, 0.06);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(15, 20, 25, 0.42);
  font-size: 0.78rem;
  font-weight: 600;
}

.risk-badge.yes {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
}

.risk-badge.no {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.12);
}

.sheet-row-list {
  display: grid;
  gap: 0.85rem;
}

.sheet-row-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.36);
}

.sheet-row-head {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.sheet-row-cells {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .sheet-row-cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sheet-row-cell {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.sheet-row-cell span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.sheet-row-cell strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
  word-break: break-word;
}

.risk-form-sections {
  display: grid;
  gap: 0.9rem;
}

.risk-form-section + .risk-form-section {
  padding-top: 0.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.risk-form-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.risk-form-section-head .small {
  margin-bottom: 0;
}

.risk-form-card-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.risk-form-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.3);
}

/* 筹备/风险评估：双栏内仅为数据流，不用卡片盒子 */
.risk-page-main .risk-form-card {
  padding: 0;
  margin: 0 0 0.7rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.risk-page-main .risk-form-card-head {
  margin: 0 0 0.3rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.risk-page-main .risk-form-card-head .small {
  margin-top: 0.2rem;
}

.risk-page-main .risk-form-grid,
.risk-page-main .risk-form-grid--compact {
  margin-top: 0.3rem;
}

.risk-form-card-head h3 {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
}

.risk-form-card-head .small {
  margin-bottom: 0;
}

.risk-form-grid {
  display: grid;
  gap: 0.6rem 0.8rem;
  margin-top: 0.7rem;
}

@media (min-width: 640px) {
  .risk-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 风险评估页：更窄屏即双列、更紧凑行距 */
@media (min-width: 560px) {
  .risk-form-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
  }

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

.risk-form-grid--compact .risk-form-field textarea {
  min-height: 2.8rem;
  font-size: 0.88rem;
}

.risk-form-grid--compact .risk-form-field input[type="text"],
.risk-form-grid--compact .risk-form-field select {
  font-size: 0.88rem;
  padding: 0.4rem 0.55rem;
}

.risk-form-grid--compact .risk-form-field span {
  margin-bottom: 0.15rem;
  font-size: 0.74rem;
}

.risk-form-grid--compact .check {
  margin: 0.1rem 0;
  font-size: 0.82rem;
}

.risk-form-grid--compact .risk-option-group {
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 同一卡片内多字段单行（如搬运物料概要三列）：均分整行宽度 */
.risk-form-field-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.risk-form-field-row > .risk-form-field {
  flex: 1 1 0;
  min-width: 0;
}

.risk-form-field-row.risk-form-field-row--count-2,
.risk-form-field-row.risk-form-field-row--count-3,
.risk-form-field-row.risk-form-field-row--count-4 {
  display: grid;
  justify-content: stretch;
  overflow-x: visible;
}

.risk-form-field-row.risk-form-field-row--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.risk-form-field-row.risk-form-field-row--count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.risk-form-field-row.risk-form-field-row--count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
}

.risk-form-field-row.risk-form-field-row--count-2 > .risk-form-field,
.risk-form-field-row.risk-form-field-row--count-3 > .risk-form-field,
.risk-form-field-row.risk-form-field-row--count-4 > .risk-form-field {
  width: 100%;
}

.risk-form-card--related-personnel .risk-form-field-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.35rem;
  justify-content: stretch;
  overflow-x: visible;
}

.risk-form-card--related-personnel .risk-form-field-row > .risk-form-field {
  width: 100%;
}

.risk-form-field-row > .risk-cond-hidden-placeholder,
.risk-form-risk-content-row > .risk-cond-hidden-placeholder {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

.risk-form-field-row > .risk-cond-hidden-placeholder > *,
.risk-form-risk-content-row > .risk-cond-hidden-placeholder > * {
  visibility: hidden !important;
}

.risk-form-field-row > .risk-form-field input[type="text"],
.risk-form-field-row > .risk-form-field textarea,
.risk-form-field-row > .risk-form-field select {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.risk-page-main .risk-form-grid--compact {
  margin-top: 0.2rem;
}

/* 确保筹备评估页面也使用风险评估的紧凑间距标准 */
.prep-page-main .risk-form-grid,
.prep-page-main .risk-form-grid--compact,
.hours-page-main .risk-form-grid,
.hours-page-main .risk-form-grid--compact {
  margin-top: 0.3rem;
}

.risk-page-main .risk-form-grid--compact .risk-form-field textarea {
  min-height: 2.4rem;
}

/* 调研表 field_row 内多行说明（装载方式 / 装载数据等）：大输入框 */
.risk-page-main .risk-form-grid--compact .risk-form-field-row > .risk-form-field textarea {
  min-height: 7.75rem;
}

/* 与 Excel 表头一致：风险成本～备注共七列单行排布，窄屏横向滚动 */
.risk-form-risk-content-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  align-items: flex-start;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  -webkit-overflow-scrolling: touch;
}

.risk-form-risk-content-cell {
  flex: 1 0 7.5rem;
  min-width: 7rem;
  max-width: none;
}

.risk-form-risk-content-cell textarea {
  min-height: 2.2rem !important;
  resize: vertical;
}

.risk-form-field {
  display: block;
}

.risk-form-field-full {
  grid-column: 1 / -1;
}

.risk-form-field-empty-hint {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.risk-form-field span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* 条件表格等：每个分组卡片内风险项序号从 1 递增 */
.risk-form-card .risk-form-grid {
  counter-reset: risk-conditional-item;
}

.risk-conditional-input-field > .risk-form-field-title-label {
  counter-increment: risk-conditional-item;
  display: block;
  margin-bottom: 0.28rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

.risk-conditional-input-field > .risk-form-field-title-label::before {
  content: counter(risk-conditional-item) ". ";
  font-weight: 700;
  margin-right: 0.2em;
  color: var(--text);
}

.risk-form-field-title-tip {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
  opacity: 0.9;
}

.risk-form-field input[type="text"],
.risk-form-field textarea {
  width: 100%;
  padding: 0.58rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.94rem;
}

.risk-conditional-input-detail {
  margin-top: 0.35rem;
}

.risk-conditional-table-wrap {
  width: 100%;
}

.risk-conditional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 0.75rem;
  width: 100%;
}

.risk-conditional-grid-item {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.risk-conditional-grid-label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 720px) {
  .risk-conditional-grid {
    grid-template-columns: 1fr;
  }
}

.risk-conditional-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.82rem;
}

.risk-conditional-table th,
.risk-conditional-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.4rem;
  vertical-align: middle;
  text-align: center;
}

.risk-conditional-table th {
  background: rgba(61, 139, 253, 0.14);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.risk-conditional-table td input[type="text"],
.risk-conditional-table td input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.4rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.risk-conditional-grid-item input[type="text"],
.risk-conditional-grid-item input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.4rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}

.risk-conditional-grid-item input[type="date"]::-webkit-calendar-picker-indicator,
.risk-conditional-table td input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(0.8);
  opacity: 0.9;
}

.risk-conditional-table td input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.risk-conditional-grid-item input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 多选后紧跟窄文本（如脚轮要求 + 其他材质要求） */
.risk-multi-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.risk-multi-inline-text {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.risk-multi-inline-toggle-label {
  margin: 0;
  flex: 0 0 auto;
}

.risk-multi-inline-text-lbl {
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.risk-multi-inline-text-input {
  box-sizing: border-box;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
  max-width: 100%;
}

.risk-multi-inline-text-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.risk-page-main .risk-multi-inline-text-input {
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
}

.risk-dims-lwh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.25rem;
  width: 100%;
}

.risk-dims-lwh-cell {
  flex: 1 1 0;
  min-width: 4.5rem;
  display: block;
}

.risk-dims-lwh-cell-inner {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
}

.risk-dims-lwh-cell-inner input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  box-sizing: border-box;
}

.risk-dims-lwh-suffix {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.risk-dims-lwh-prefix {
  flex: 0 1 auto;
  font-size: 0.8rem;
  color: var(--muted);
  align-self: center;
  max-width: 100%;
}

.risk-dims-lwh-note {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.risk-dims-lwh-times {
  flex: 0 0 auto;
  align-self: center;
  color: var(--muted);
  font-size: 0.95rem;
  user-select: none;
}

.risk-form-field-row > .risk-form-field.risk-dims-lwh .risk-dims-lwh-row {
  min-width: 0;
}

.risk-select-other-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  width: 100%;
}

.risk-select-other-field .risk-select-other-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.risk-select-other-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
}

.risk-select-other-free-input {
  flex: 1 1 8rem;
  min-width: 8em;
  max-width: min(100%, 18rem);
  box-sizing: border-box;
}

.risk-single-other-radios {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
}

.risk-single-other-field .risk-single-other-radio:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.risk-form-field select {
  width: 100%;
  max-width: 24rem; /* 避免下拉框过长 */
  padding: 0.58rem 2.2rem 0.58rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font-size: 0.94rem;
  appearance: none;
  /* 实心向下三角（与 --muted 同色） */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 7'%3E%3Cpath fill='%238b9cb3' d='M0 0h12L6 7z'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%;
  background-size: 10px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* 搬运物料概要：非 field_row 时物料类型下拉略窄；field_row 内占满列宽以利三列均分 */
.risk-select-other-field[data-field-name="risk-survey-material-type"] .risk-select-other-select {
  width: 50%;
  max-width: 12rem;
}

.risk-form-field-row
  > .risk-select-other-field[data-field-name="risk-survey-material-type"]
  .risk-select-other-select {
  width: 100%;
  max-width: none;
}

.risk-form-field textarea {
  resize: vertical;
  min-height: 6.2rem;
  line-height: 1.55;
}

.risk-form-field input[type="text"]:focus,
.risk-form-field select:focus,
.risk-form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.risk-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

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

.risk-table th,
.risk-table td {
  padding: 0.6rem 0.5rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.risk-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.risk-table td {
  background: rgba(15, 20, 25, 0.2);
}

/* 每条风险：条目之间分隔（多 tbody 时） */
.risk-table tbody.risk-table-item:not(:first-of-type) > tr:first-child > td {
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.risk-table-row-desc td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.risk-table-th-band {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: normal;
  text-align: left;
  line-height: 1.45;
}

/* 第一行：标题；其下为序号等元数据；再下一行左对齐「是否存在风险」 */
.risk-row1-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.risk-row1-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
}

.risk-row1-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem 1rem;
}

.risk-row1-subtitle {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  line-height: 1.45;
  opacity: 0.78;
}

/* 「是否存在风险」单独一行，与元数据左对齐 */
.risk-row1-risk-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.75rem;
}

.risk-row1-boolean {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.risk-row1-boolean-label {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.risk-row1-boolean-options {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

/* 第二行：前缀块全宽；七列进入网格，标签与输入顶对齐、列宽整齐 */
.risk-table-followup-cell {
  padding-top: 0.55rem;
  padding-bottom: 0.6rem;
  vertical-align: top;
}

.risk-row2-inline-fields {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.risk-row2-prefix {
  width: 100%;
}

.risk-row2-seven-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
  width: 100%;
  align-items: start;
}

@media (max-width: 720px) {
  .risk-row2-seven-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.risk-inline-item {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.risk-inline-item--block {
  flex: 1 1 100%;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* 网格内：标签与输入同一行、顶部对齐，输入拉满格宽 */
.risk-row2-seven-grid .risk-inline-item:not(.risk-inline-item--block) {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 0.35rem;
  row-gap: 0;
  max-width: none;
}

.risk-row2-seven-grid .risk-inline-lbl {
  padding-top: 0.42rem;
  line-height: 1.2;
}

.risk-inline-lbl {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.risk-inline-textarea,
.risk-inline-input {
  flex: 1 1 7rem;
  min-width: 5rem;
  max-width: 18rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.45;
}

.risk-row2-seven-grid .risk-inline-textarea,
.risk-row2-seven-grid .risk-inline-input {
  max-width: none;
  width: 100%;
  min-width: 0;
}

.risk-inline-textarea {
  min-height: 2.35rem;
  resize: vertical;
  min-width: 6.5rem;
}

.risk-inline-item--block .risk-inline-textarea,
.risk-inline-item--block .risk-inline-input {
  flex: 1 1 100%;
  max-width: none;
  width: 100%;
  min-height: 3rem;
}

.risk-inline-textarea:focus,
.risk-inline-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.risk-table .risk-form-field {
  margin-bottom: 0;
}

.risk-table .risk-form-field span {
  display: none; /* Hide label in table as it's in th */
}

/* 首列：是否存在风险、实际要求等保留字段标签 */
.risk-table-meta-stack {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.risk-table-meta-field .risk-form-field > span:first-of-type {
  display: block !important;
  margin-bottom: 0.2rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.risk-table input[type="text"],
.risk-table textarea {
  width: 100%;
  min-height: 2.4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  min-width: 100px;
}

.risk-table select {
  width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  min-width: 80px;
}

.risk-table .risk-option-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

/* 第一行「是否存在风险」：覆盖表格内纵向规则，单选横向一排 */
.risk-table .risk-option-group.risk-row1-boolean-options {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
}

.risk-table .risk-row1-boolean-options .check {
  margin: 0;
  white-space: nowrap;
}

.risk-table .check {
  margin: 0.15rem 0;
  font-size: 0.8rem;
}

.risk-option-group {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.risk-option-group-wrap {
  flex-wrap: wrap;
  row-gap: 0.65rem;
}

/* 地坪材质：单行、占满卡片整宽，不内嵌滚动条，随内容横向延展 */
.risk-form-field[data-field-name="risk-survey-floor-material"] {
  grid-column: 1 / -1;
}

.risk-form-field[data-field-name="risk-survey-floor-material"] .risk-option-group-wrap {
  flex-wrap: nowrap;
  overflow: visible;
}

.risk-form-field[data-field-name="risk-survey-floor-material"] .risk-option-group-wrap .check {
  flex-shrink: 0;
}

/* 痛点问题：与调研表一致的三列表（竖向合并大类 + 子类 + 横向多选） */
.risk-pain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: fixed;
  border: 1px solid var(--border);
  background: var(--bg);
}

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

.risk-pain-table-dim {
  width: 6.25rem;
  white-space: nowrap;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
}

.risk-pain-table-opts {
  min-width: 0;
}

.risk-pain-table-option-row {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.65rem 1rem;
}

.risk-pain-table-option-row .check {
  margin: 0;
  line-height: 1.4;
}

.risk-pain-table-other-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem 0.65rem;
  width: 100%;
}

.risk-pain-table-other-wrap--inline {
  width: auto;
  flex: 1 1 100%;
  margin-top: 0.2rem;
}

textarea.risk-pain-table-other {
  width: 100%;
  min-height: 3rem;
  box-sizing: border-box;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
}

textarea.risk-pain-table-other:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

textarea.risk-pain-table-other:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

textarea.risk-pain-table-other--inline {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: min(100%, 28rem);
  min-height: 2.5rem;
}

/* 痛点表格 · 网格模式（搬运流程等多列表） */
.risk-pain-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}

.risk-pain-grid-field-label {
  font-weight: 500;
  font-size: 0.9rem;
}

.risk-pain-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: fixed;
  border: 1px solid var(--border);
  background: var(--bg);
}

.risk-pain-grid-caption {
  caption-side: top;
  padding: 0.35rem 0.25rem 0.5rem;
  text-align: center;
  font-weight: 600;
  color: #d93030;
  font-size: 0.92rem;
}

.risk-pain-grid-table th,
.risk-pain-grid-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  text-align: left;
}

.risk-pain-grid-table thead th {
  background: rgba(61, 139, 253, 0.12);
  font-weight: 600;
  white-space: normal;
}

.risk-pain-grid-actions-col {
  width: 4.5rem;
  text-align: center;
  vertical-align: middle;
}

.risk-pain-grid-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
}

.risk-pain-grid-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

/* 与 textarea 列统一为约两行高度（数字列仍为 input，仅对齐视觉） */
.risk-pain-grid-table .risk-pain-grid-input--twoline {
  min-height: 2.75rem;
  line-height: 1.45;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.risk-pain-grid-table tbody td {
  vertical-align: top;
}

.risk-pain-grid-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.45;
  resize: vertical;
  font-family: inherit;
}

.risk-pain-grid-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.risk-pain-grid-toolbar {
  margin-top: 0.15rem;
}

/* 风险评估：斯坦德调研表 — 红色资料提示、琥珀色分组标题条 */
.risk-static-notice {
  margin: 0.15rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.55;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.risk-static-notice--danger {
  color: #ffb4b4;
  background: rgba(220, 60, 60, 0.14);
  border-color: rgba(255, 120, 120, 0.35);
}

/* 调研表：资料类提示改为可编辑多行框时的强调样式（暗底 + 酒红边） */
.risk-form-field textarea.risk-textarea-notice {
  min-height: 5.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(120, 52, 52, 0.9);
  background: linear-gradient(180deg, rgba(55, 32, 32, 0.55) 0%, rgba(20, 17, 19, 0.98) 100%);
  color: #f3ebe4;
  line-height: 1.55;
  resize: vertical;
}

.risk-form-field textarea.risk-textarea-notice::placeholder {
  color: rgba(236, 220, 210, 0.45);
}

.risk-form-field textarea.risk-textarea-notice:focus {
  outline: none;
  border-color: rgba(168, 72, 72, 0.95);
  box-shadow: 0 0 0 3px rgba(200, 70, 70, 0.14);
}

/* 上传区块内合并后的说明框（与 .risk-form-field textarea.risk-textarea-notice 视觉一致） */
textarea.risk-file-desc-textarea.risk-textarea-notice {
  min-height: 6rem;
  border-radius: 6px;
  border: 1px solid rgba(120, 52, 52, 0.9);
  background: linear-gradient(180deg, rgba(55, 32, 32, 0.55) 0%, rgba(20, 17, 19, 0.98) 100%);
  color: #f3ebe4;
}

textarea.risk-file-desc-textarea.risk-textarea-notice::placeholder {
  color: rgba(236, 220, 210, 0.45);
}

textarea.risk-file-desc-textarea.risk-textarea-notice:focus {
  outline: none;
  border-color: rgba(168, 72, 72, 0.95);
  box-shadow: 0 0 0 3px rgba(200, 70, 70, 0.14);
}

.risk-static-notice--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.risk-page-main .risk-form-card--survey-amber .risk-form-card-head {
  padding: 0.35rem 0.5rem 0.45rem;
  margin-bottom: 0.35rem;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 193, 7, 0.16) 0%,
    rgba(255, 193, 7, 0.04) 100%
  );
  border-bottom: 1px solid rgba(255, 193, 7, 0.22);
}

.risk-page-main .risk-form-card--survey-amber .risk-form-card-head h3 {
  color: #ffd666;
}

/* 风险评估：资料附件上传（pdf/dwg/png/zip/rar） */
.risk-file-upload-hint {
  margin: 0.25rem 0 0.5rem;
  color: var(--muted);
}

.risk-file-desc-field {
  display: block;
  margin: 0.35rem 0 0.65rem;
}

.risk-file-desc-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.risk-file-desc-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 7.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.55;
  resize: vertical;
}

.risk-file-desc-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.14);
}

.risk-file-attachments {
  margin-top: 0.15rem;
}

.risk-file-attachments-label {
  display: block;
  margin: 0.35rem 0 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.risk-file-upload-field--with-desc .risk-file-dropzone {
  padding: 0.5rem 0.75rem;
  min-height: 0;
}

.risk-file-dropzone {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.risk-file-upload-field--with-desc .risk-file-attachments .risk-file-dropzone {
  margin-top: 0.25rem;
}

.risk-file-dropzone:hover,
.risk-file-dropzone:focus {
  outline: none;
  border-color: rgba(100, 180, 255, 0.55);
  background: rgba(100, 180, 255, 0.06);
}

.risk-file-dropzone--over {
  border-color: rgba(100, 180, 255, 0.75);
  background: rgba(100, 180, 255, 0.1);
}

.risk-file-dropzone--busy {
  opacity: 0.65;
  pointer-events: none;
}

.risk-file-dropzone-text {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
}

.risk-file-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.risk-file-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.risk-file-item-name {
  flex: 1 1 12rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-file-item-size {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.risk-file-remove {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}

.risk-file-upload-err {
  margin: 0.4rem 0 0;
}

/* 风险评估/筹备评估：主区内表单与辅助文案字号加大一档 */
.risk-page-main .field label {
  font-size: 0.88rem;
}

.risk-page-main .risk-form-section-head h2 {
  font-size: 1.125rem;
}

.risk-page-main #risk_form_sections .small,
.risk-page-main #risk_customer_meta_sections .small {
  font-size: 0.88rem;
}

.risk-page-main .risk-form-card-head h3 {
  font-size: 1rem;
}

.risk-page-main .risk-form-field span {
  font-size: 0.88rem;
}

.risk-page-main .risk-form-grid--compact .risk-form-field span {
  font-size: 0.82rem;
}

.risk-page-main .risk-form-grid--compact .risk-form-field input[type="text"],
.risk-page-main .risk-form-grid--compact .risk-form-field select {
  font-size: 0.95rem;
}

.risk-page-main .risk-form-grid--compact .risk-form-field textarea {
  font-size: 0.95rem;
}

.risk-page-main .risk-form-grid--compact .check {
  font-size: 0.9rem;
}

.risk-page-main .risk-form-field input[type="text"],
.risk-page-main .risk-form-field textarea,
.risk-page-main .risk-form-field select {
  font-size: 1.02rem;
}

.risk-customer-meta-sections .risk-form-field input[type="text"]::placeholder {
  color: #8fa4ba;
  opacity: 1;
}

.risk-page-main .risk-static-notice {
  font-size: 0.92rem;
}

.risk-page-main .risk-file-upload-hint {
  font-size: 0.88rem;
}

.risk-page-main .risk-file-desc-textarea {
  font-size: 1.02rem;
}

.risk-page-main .risk-file-attachments-label {
  font-size: 0.88rem;
}

.risk-page-main .risk-file-dropzone-text {
  font-size: 0.92rem;
}

.risk-page-main .risk-file-item {
  font-size: 0.9rem;
}

.risk-page-main .risk-file-remove {
  font-size: 0.85rem;
}

.risk-page-main .risk-index-chip {
  font-size: 0.92rem;
}

.risk-page-main .risk-index-chip strong {
  font-size: 0.8rem;
}

.risk-page-main .risk-table {
  font-size: 0.92rem;
}

.risk-page-main .risk-table-th-band {
  font-size: 0.85rem;
}

.risk-page-main .risk-row1-title {
  font-size: 1.05rem;
}

.risk-page-main .risk-row1-boolean-label {
  font-size: 0.85rem;
}

.risk-page-main .risk-inline-lbl {
  font-size: 0.85rem;
}

.risk-page-main .risk-inline-textarea,
.risk-page-main .risk-inline-input {
  font-size: 0.92rem;
}

.risk-page-main .risk-table input[type="text"],
.risk-page-main .risk-table textarea {
  font-size: 0.92rem;
}

.risk-page-main .risk-table select {
  font-size: 0.92rem;
}

.risk-page-main .risk-table .check {
  font-size: 0.88rem;
}

.risk-page-main .risk-table-meta-field .risk-form-field > span:first-of-type {
  font-size: 0.82rem;
}

/* ===== Visual Builder ===== */
.risk-builder-wrap {
  margin-bottom: 1.2rem;
  position: relative;
}
.risk-builder-topbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
}
.risk-builder-topbar h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.risk-builder-topbar-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.risk-builder-layout {
  display: flex; min-height: 520px;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 12px 12px; overflow: visible;
}

/* --- Canvas --- */
.risk-builder-canvas {
  flex: 1 1 0; min-width: 0; padding: 1rem;
  overflow: visible;
  background: var(--bg); position: relative; outline: none;
  user-select: none;
}
.risk-builder-canvas:focus { box-shadow: inset 0 0 0 2px rgba(61,139,253,.18); }

/* --- Sidebar --- */
.risk-builder-sidebar {
  flex: 0 0 260px; width: 260px;
  border-left: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column;
  position: sticky; top: 0; align-self: flex-start;
  max-height: 82vh; overflow-y: auto;
}
.risk-builder-toolbox, .risk-builder-props {
  padding: .85rem; border-bottom: 1px solid var(--border);
}
.risk-builder-toolbox h3, .risk-builder-props h3 {
  margin: 0 0 .55rem; font-size: .88rem;
}
.risk-builder-toolbox-list { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.risk-builder-toolbox-item {
  padding: .45rem .5rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: .78rem; color: var(--text); text-align: center;
  cursor: grab; user-select: none; transition: border-color .15s, box-shadow .15s;
}
.risk-builder-toolbox-item:hover {
  border-color: var(--accent); box-shadow: 0 0 0 2px rgba(61,139,253,.15);
}
.risk-builder-toolbox-item.is-dragging { opacity: .5; }
.risk-builder-toolbox-struct { margin-top: .65rem; }
.risk-builder-toolbox-struct h4 { margin: 0 0 .4rem; font-size: .82rem; color: var(--muted); }
.risk-builder-struct-btn { width: 100%; margin-bottom: .35rem; }

/* --- Canvas blocks --- */
.rb-section {
  margin-bottom: .8rem; border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; background: rgba(255,255,255,.025);
}
.rb-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem .75rem; cursor: pointer; gap: .5rem;
  border-radius: 10px 10px 0 0;
  background: rgba(255,255,255,.03);
}
.rb-section-head:hover { background: rgba(255,255,255,.06); }
.rb-section-title { font-size: .88rem; font-weight: 600; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-section-badge { font-size: .72rem; color: var(--muted); flex-shrink: 0; }
.rb-section-body { padding: .45rem .65rem .65rem; }
.rb-section-body[hidden] { display: none; }
.rb-group {
  margin-top: .55rem; padding: .5rem .6rem;
  border: 1px dashed rgba(255,255,255,.08); border-radius: 8px;
  background: rgba(255,255,255,.015);
  min-height: 40px;
}
.rb-group-head {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .4rem; cursor: pointer;
}
.rb-group-title { font-size: .82rem; font-weight: 500; flex: 1; }
.rb-group-badge { font-size: .7rem; color: var(--muted); }
.rb-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem;
  min-height: 32px;
}

/* --- Field blocks --- */
.rb-block {
  position: relative; padding: .4rem .55rem;
  border: 1.5px solid rgba(255,255,255,.1); border-radius: 8px;
  background: rgba(15,20,25,.35); cursor: grab;
  transition: border-color .12s, box-shadow .12s;
  user-select: none; min-height: 38px;
}
.rb-block:hover { border-color: rgba(61,139,253,.4); }
.rb-block.rb-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61,139,253,.25);
}
.rb-block.rb-full { grid-column: 1 / -1; }
.rb-block-label {
  font-size: .78rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rb-block-kind {
  font-size: .66rem; color: var(--muted); margin-top: .12rem;
}
.rb-block.rb-dragging { opacity: .4; }

/* --- Drop zones --- */
.rb-dropzone {
  height: 0; border: none; border-radius: 4px;
  transition: height .12s, border-color .12s, background .12s;
  grid-column: 1 / -1;
  overflow: hidden;
}
.rb-dropzone.rb-drop-active {
  height: 6px;
  border: none;
  background: rgba(61,139,253,.15);
  cursor: copy;
}
.rb-dropzone.rb-drop-hover {
  height: 28px;
  border: 2px dashed var(--accent);
  background: rgba(61,139,253,.18);
}

.rb-group-dropzone {
  height: 0; border: none; border-radius: 6px;
  transition: height .12s, border-color .12s, background .12s;
  overflow: hidden;
}
.rb-group-dropzone.rb-drop-active {
  height: 8px;
  background: rgba(61,139,253,.12);
}
.rb-group-dropzone.rb-drop-hover {
  height: 32px;
  border: 2px dashed var(--accent);
  background: rgba(61,139,253,.15);
}

.rb-group.rb-dragging {
  opacity: .35;
}

/* --- Selection rectangle --- */
.risk-builder-sel-rect {
  position: fixed; border: 1.5px solid var(--accent);
  background: rgba(61,139,253,.1); pointer-events: none; z-index: 9999;
  border-radius: 2px;
}

/* --- Align bar --- */
.risk-builder-align-bar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .5rem .85rem;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 10px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.risk-builder-align-bar .small { margin: 0; }

/* --- Props panel --- */
.risk-builder-props { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.rb-props-group { margin-bottom: .65rem; }
.rb-props-group label {
  display: block; font-size: .74rem; color: var(--muted); margin-bottom: .2rem;
}
.rb-props-group input[type="text"],
.rb-props-group input[type="number"],
.rb-props-group textarea,
.rb-props-group select {
  width: 100%; padding: .4rem .5rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: .82rem;
}
.rb-props-group textarea { min-height: 4.5rem; resize: vertical; }
.rb-props-none { font-size: .8rem; color: var(--muted); }
.rb-prop-hint {
  margin: .25rem 0 0;
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.45;
}

/* 风险评估：列表整行可点入记录；普通用户隐藏「创建人」列 */
.records-registry-table tbody tr.records-row-link {
  cursor: pointer;
}
.records-registry-table tbody tr.records-row-link:hover {
  background: rgba(61, 139, 253, 0.06);
}
.records-registry-table tbody tr.records-row-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.risk-admin-list-panel.risk-list-hide-creator th.risk-list-col-creator,
.risk-admin-list-panel.risk-list-hide-creator td.risk-list-col-creator {
  display: none;
}

/* --- Delivery board --- */
.delivery-sidebar-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.55);
}

.delivery-source-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delivery-source-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.delivery-source-item span {
  font-size: 0.78rem;
  color: var(--muted);
}

.delivery-source-item strong {
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
}

.delivery-source-link {
  display: inline-flex;
  justify-content: center;
}

.delivery-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  /* 标签底色与页面主题同步；浅色主题不能保留深底配深色文字。 */
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text);
  font-size: 0.82rem;
}

.delivery-tag.delivery-tag--project-duration {
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  border-radius: 12px;
  min-height: auto;
  max-width: min(18rem, 100%);
}

.delivery-overdue-threshold-field {
  gap: 0.5rem;
  padding-inline-end: 0.55rem;
}

.delivery-overdue-threshold-field span {
  color: var(--muted);
  white-space: nowrap;
}

.delivery-overdue-threshold-field input {
  width: 5.25rem;
  min-width: 5.25rem;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
}

.delivery-overdue-threshold-field em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.delivery-tag-project-name {
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.delivery-tag-project-meta {
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--text) 76%, var(--surface));
  line-height: 1.3;
  white-space: nowrap;
}

.delivery-board-toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.delivery-board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.delivery-board-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.delivery-board-toolbar-actions,
.delivery-view-switch,
.delivery-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 全屏按钮相对本卡片贴右上角，而非工具条行 */
#prep_secondary_nav_panel {
  position: relative;
  z-index: 30;
  margin-bottom: -0.9rem;
  /* 二级导航与看板工作区保持紧凑：整体高度约为原来的三分之二。 */
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

#prep_secondary_nav_panel .risk-form-switch {
  padding: 0.25rem;
}

#prep_secondary_nav_panel .risk-form-switch .toolbar-btn {
  min-height: 1.9rem;
  padding: 0.35rem 0.85rem;
}

#prep_delivery_panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#prep_delivery_panel > .delivery-board-controls {
  position: relative;
  flex: 0 0 auto;
}

#prep_delivery_panel > .delivery-board-workspace {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

#prep_delivery_panel .delivery-board-workspace > .prep-project-prep-progress {
  flex: 0 0 auto;
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  padding: 0.15rem 0 0;
}

#prep_delivery_panel .delivery-board-workspace > .prep-project-prep-progress[hidden] {
  display: none;
}

.prep-project-prep-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(92, 64, 51, 0.14);
  overflow: hidden;
}

.prep-project-prep-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #5c4033;
  transition: width 0.35s ease;
}

.prep-project-prep-progress-label {
  margin: 0;
  color: var(--muted);
}

.prep-board-deferred-shell {
  padding: 1.2rem 0.35rem 0.4rem;
}

#prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  scrollbar-gutter: stable;
}

#prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > * {
  flex: 0 0 auto;
  min-height: auto;
  min-width: 0;
  width: 100%;
}

#prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-acceptance-board-shell {
  overflow: visible;
}

/* 看板页：主表占满窗口剩余高度；全屏时由 :fullscreen 规则改为占满视口 */
body.is-prep-board-page {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/*
 * 笔记本/桌面：窗口整体上滑，页内操作按钮与筛选吸顶，主表随页面拉高。
 * 全屏与手机仍走各自的内部滚动规则。
 */
@media (min-width: 769px) {
  html:not(.is-mobile) body.is-prep-board-page {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  html:not(.is-mobile) body.is-prep-board-page .layout-with-global-sidebar {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  html:not(.is-mobile) body.is-prep-board-page .layout-with-global-sidebar .main-with-sidebar,
  html:not(.is-mobile) body.is-prep-board-page .main-content.risk-page-main,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel {
    overflow: visible;
    height: auto;
    max-height: none;
    min-height: 0;
    flex: 1 0 auto;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel > .delivery-board-workspace,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
    overflow: visible;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel > .delivery-board-controls {
    position: sticky;
    top: 0;
    z-index: 28;
    margin: 0;
    padding-top: 0.35rem;
    padding-bottom: 0.4rem;
    border-radius: 11px 11px 0 0;
    background: var(--surface);
    background-clip: padding-box;
    box-shadow: 0 10px 18px color-mix(in srgb, var(--bg) 78%, transparent);
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .delivery-table-wrap,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .delivery-project-matrix-wrap,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .prep-resource-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .delivery-table-wrap.delivery-table-wrap--time-clock-person,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .prep-board-hscroll-viewport {
    scrollbar-width: none;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .delivery-table-wrap.delivery-table-wrap--time-clock-person::-webkit-scrollbar,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel .prep-board-hscroll-viewport::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-preparation-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-energy-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
    overflow: visible !important;
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > *,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-preparation-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > *,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > *,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-energy-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > * {
    flex: 0 0 auto !important;
    min-height: auto !important;
    height: auto !important;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-resource-mode .prep-resource-board-shell,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-preparation-mode .project-preparation-board-shell,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .prep-today-progress-shell,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .prep-today-progress-table-card,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-energy-board-mode .prep-energy-board-shell {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto !important;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-resource-mode .prep-resource-table-wrap,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-preparation-mode .prep-resource-table-wrap,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-energy-board-mode .prep-resource-table-wrap {
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-resource-mode .prep-resource-table-wrap::-webkit-scrollbar,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-preparation-mode .prep-resource-table-wrap::-webkit-scrollbar,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap::-webkit-scrollbar,
  html:not(.is-mobile) body.is-prep-board-page #prep_delivery_panel:not(:fullscreen):not(:-webkit-full-screen):not(:-moz-full-screen):not(.is-fullscreen-active).is-project-energy-board-mode .prep-resource-table-wrap::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
  }
}

body.is-prep-board-page .layout-with-global-sidebar {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0.75rem;
  overflow: hidden;
}

body.is-prep-board-page .layout-with-global-sidebar .header,
body.is-prep-board-page .layout-with-global-sidebar .page-switch-row,
body.is-prep-board-page #prep_secondary_nav_panel {
  flex: 0 0 auto;
}

/*
 * 一级导航页统一标题导航块：
 * 以原看板紧凑标题条为基准，垂直尺寸扩大约 1/3（×4/3），各页保持同高。
 */
.layout-with-global-sidebar > .header {
  display: flex;
  align-items: center;
  gap: 0.87rem 1.15rem;
  padding: 0.53rem 1.15rem;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  min-height: 4.4rem;
  box-sizing: border-box;
  /* 标题块向上微调，不改变导航与内容的文档流占位关系 */
  transform: translateY(-0.67rem);
}

/* transform 会把弹层关进标题栏自己的层叠上下文；打开时抬高整条标题栏，避免被二级导航和吸顶筛选条盖住 */
.layout-with-global-sidebar > .header:has(.user-popover:not([hidden])) {
  z-index: 36;
}

.layout-with-global-sidebar > .header .dashboard-topbar {
  display: contents;
}

.layout-with-global-sidebar > .header .brand-mark {
  order: 1;
}

.layout-with-global-sidebar > .header .brand-mark-image {
  height: 43px;
  max-width: min(36vw, 220px);
}

.layout-with-global-sidebar > .header .header-copy {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.layout-with-global-sidebar > .header h1 {
  font-size: 1.49rem;
  line-height: 1.25;
  margin: 0;
}

.layout-with-global-sidebar > .header .header-copy .sub {
  margin-top: 0.11rem;
  font-size: 1.04rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.layout-with-global-sidebar > .header .toolbar-user {
  order: 3;
  margin-left: 0;
}

.layout-with-global-sidebar > .header .toolbar-actions {
  order: 4;
  flex: 0 0 auto;
  gap: 0.53rem;
}

.layout-with-global-sidebar > .header .toolbar-actions .toolbar-btn {
  min-height: 2.2rem;
  padding: 0.42rem 0.9rem;
}

body.is-prep-board-page:not(.is-prep-time-clock-page) .layout-with-global-sidebar .header,
body.is-prep-board-page:not(.is-prep-time-clock-page) .layout-with-global-sidebar .page-switch-row,
body.is-prep-board-page:not(.is-prep-time-clock-page) .layout-with-global-sidebar .main-with-sidebar,
body.is-prep-board-page:not(.is-prep-time-clock-page) .layout-with-global-sidebar .footer {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

body.is-prep-board-page:not(.is-prep-time-clock-page) .layout-with-global-sidebar .page-switch-row {
  margin-bottom: 1rem;
}

body.is-prep-board-page .layout-with-global-sidebar .main-with-sidebar,
body.is-prep-board-page .main-content.risk-page-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
}

body.is-prep-board-page #prep_delivery_panel {
  flex: 1 1 0%;
  min-height: 0;
  padding-right: 0.85rem;
  padding-bottom: 0;
}

body.is-prep-board-page #prep_delivery_panel > .delivery-board-controls {
  padding-right: 2.2rem;
}

body.is-prep-board-page #prep_delivery_panel:has(#prep_delivery_fullscreen_scale_control:not([hidden])) > .delivery-board-controls,
section#prep_delivery_panel:fullscreen > .delivery-board-controls,
section#prep_delivery_panel:-webkit-full-screen > .delivery-board-controls,
section#prep_delivery_panel:-moz-full-screen > .delivery-board-controls,
section#prep_delivery_panel.is-fullscreen-active > .delivery-board-controls {
  padding-right: 19.15rem;
  padding-inline-end: 19.15rem;
}

body.is-prep-board-page .footer {
  display: none;
}

.delivery-board-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.35rem 0.5rem;
  min-height: 2.75rem;
  padding-inline-end: 2.1rem;
  box-sizing: border-box;
}

/* 工时打卡嵌入筹备壳层 */
body.is-prep-time-clock-page .prep-time-clock-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.35rem;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}

body.is-prep-time-clock-page .layout-with-global-sidebar {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.is-prep-time-clock-page .main-with-sidebar,
body.is-prep-time-clock-page .main-content.risk-page-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

body.is-prep-time-clock-page .sidebar > .sidebar-section:has(> .sidebar-list.app-sidebar),
body.is-prep-time-clock-page #prep_delivery_source_sidebar {
  display: none !important;
}

body.is-prep-time-clock-page .delivery-board-hanging-actions {
  display: none !important;
}

.prep-time-clock-frame {
  display: block;
  width: 100%;
  min-height: min(78vh, 920px);
  height: calc(100vh - 12.5rem);
  height: calc(100dvh - 12.5rem);
  border: 0;
  border-radius: 14px;
  background: var(--bg);
}

html.is-time-clock-embedded,
body.is-time-clock-embedded {
  background: var(--bg);
  color: var(--text);
}

body.is-time-clock-embedded .header,
body.is-time-clock-embedded .page-switch-row,
body.is-time-clock-embedded .time-clock-secondary-nav,
body.is-time-clock-embedded .main-with-sidebar > .sidebar,
body.is-time-clock-embedded .main-with-sidebar > .admin-queue-sidebar {
  display: none !important;
}

body.is-time-clock-embedded .layout,
body.is-time-clock-embedded .layout-with-global-sidebar {
  max-width: none;
  margin: 0;
  padding: 0.75rem 0.9rem 1.25rem;
}

body.is-time-clock-embedded .main-with-sidebar,
body.is-time-clock-embedded .main-content,
body.is-time-clock-embedded .time-clock-records-main {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

/*
 * 看板操作：竖排悬浮条。
 * 吸附在中间内容区左缘外侧（侧栏留白内），不侵入主表区域。
 */
.delivery-board-hanging-actions {
  --delivery-hanging-width: 2.35rem;
  --delivery-hanging-gap: 0.45rem;
  position: fixed;
  left: max(
    0.35rem,
    calc(
      var(--app-left-dock) + var(--app-sidebar-offset)
      - var(--delivery-hanging-width)
      - var(--delivery-hanging-gap)
    )
  );
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  width: var(--delivery-hanging-width);
  min-width: var(--delivery-hanging-width);
  margin: 0;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(26, 34, 44, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
  pointer-events: auto;
  transform: translateY(-40%);
}

.delivery-board-hanging-actions .toolbar-btn {
  width: 100%;
  min-height: 5.4rem;
  padding: 0.55rem 0.2rem;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  line-height: 1.1;
}

section#prep_delivery_panel:fullscreen .delivery-board-hanging-actions,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-hanging-actions,
section#prep_delivery_panel:-moz-full-screen .delivery-board-hanging-actions,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-hanging-actions,
body.is-delivery-fullscreen .delivery-board-hanging-actions,
.delivery-board-hanging-actions.is-hidden-in-fullscreen {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.delivery-extend-modal .modal-dialog {
  width: min(100%, 640px);
}

.delivery-extend-modal-body {
  display: grid;
  gap: 0.9rem;
}

.delivery-extend-modal-desc {
  margin: 0;
}

.delivery-extend-modal-toolbar,
.delivery-extend-modal-toolbar-actions,
.delivery-extend-modal-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.delivery-extend-modal-toolbar {
  justify-content: space-between;
}

.delivery-extend-modal-list {
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  background: rgba(15, 23, 42, 0.35);
}

.delivery-extend-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
}

.delivery-extend-modal-item + .delivery-extend-modal-item {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.delivery-extend-modal-item:hover {
  background: rgba(59, 130, 246, 0.08);
}

.delivery-extend-modal-item input[type="checkbox"] {
  margin: 0;
}

.delivery-extend-modal-item-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.delivery-extend-modal-item-title {
  font-weight: 600;
  flex: 0 0 auto;
}

.delivery-extend-modal-item-project {
  color: #93c5fd;
}

.delivery-extend-modal-item-source {
  color: var(--muted);
}

.delivery-extend-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.delivery-add-member-modal-dialog {
  width: min(100%, 480px);
}

.delivery-add-member-form {
  display: grid;
  gap: 0.9rem;
}

.delivery-add-member-desc {
  margin: 0;
  color: var(--muted);
}

.delivery-add-member-form .field {
  margin: 0;
}

.delivery-add-member-form .field > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.delivery-add-member-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.delivery-add-member-form-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

/* 视图切换第一行，月份/搜索第二行，整体左对齐 */
.delivery-board-controls-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem 0.35rem;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  justify-self: start;
}

#prep_delivery_panel.is-project-acceptance-mode .delivery-board-controls-cluster {
  width: 100%;
}

.delivery-board-controls .delivery-view-switch {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-start;
}

.delivery-board-heading-center {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  flex-wrap: nowrap;
  grid-column: 1;
  grid-row: 2;
  text-align: left;
  pointer-events: auto;
}

.delivery-board-heading-center * {
  pointer-events: auto;
}

.delivery-paint-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.2rem;
}

.delivery-paint-toggle.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.delivery-paint-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.delivery-paint-select-wrap::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--prep-delivery-paint-preview, linear-gradient(135deg, rgba(255,255,255,0.9), rgba(226,232,240,0.92)));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16);
  position: absolute;
  left: 0.65rem;
  pointer-events: none;
}

.delivery-paint-select {
  min-width: 7.6rem;
  height: 2.2rem;
  padding: 0.35rem 2rem 0.35rem 1.95rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.24);
  color: var(--text);
}

.delivery-paint-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.delivery-paint-select option {
  color: #111827;
  background: #ffffff;
}


.delivery-board-search-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  min-width: 0;
}

.delivery-board-search-row .delivery-board-search {
  flex: 0 1 320px;
  min-width: 0;
  max-width: min(320px, 100%);
}

.delivery-board-search-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.delivery-board-search-main .delivery-board-search {
  flex: 0 1 320px;
  min-width: 0;
  max-width: min(320px, 100%);
}

.delivery-board-search-main .toolbar-btn {
  flex: 0 0 auto;
}

.delivery-today-status-filters {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 0.3rem 0.55rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.55);
  white-space: nowrap;
}

.delivery-today-status-filters[hidden] {
  display: none !important;
}

.delivery-today-status-filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.delivery-today-status-filters input[type="checkbox"] {
  margin: 0;
  accent-color: #6366f1;
  cursor: pointer;
}

.delivery-board-controls .delivery-board-search {
  min-width: 0;
}

.delivery-fullscreen-scale-control {
  position: absolute;
  top: 0.35rem;
  right: 6.85rem;
  z-index: 4;
  display: inline-grid;
  grid-template-columns: auto minmax(6rem, 7.5rem) 2.6rem;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.22);
}

.delivery-fullscreen-scale-control span,
.delivery-fullscreen-scale-control output {
  font-size: 0.78rem;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
}

.delivery-fullscreen-scale-control input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

@media (max-width: 1440px) {
  .delivery-fullscreen-scale-control {
    right: 6.25rem;
    grid-template-columns: minmax(4.6rem, 5.6rem) 2.35rem;
    gap: 0.28rem;
    padding: 0.22rem 0.42rem;
  }
  .delivery-fullscreen-scale-control > span {
    display: none;
  }
  body.is-prep-board-page #prep_delivery_panel:has(#prep_delivery_fullscreen_scale_control:not([hidden])) > .delivery-board-controls,
  section#prep_delivery_panel:fullscreen > .delivery-board-controls,
  section#prep_delivery_panel:-webkit-full-screen > .delivery-board-controls,
  section#prep_delivery_panel:-moz-full-screen > .delivery-board-controls,
  section#prep_delivery_panel.is-fullscreen-active > .delivery-board-controls {
    padding-right: 15.9rem;
    padding-inline-end: 15.9rem;
  }
}

/* 全屏图标放在筛选条内右上角，与吸顶条同层，避免被不透明底盖住 */
#prep_delivery_panel .delivery-board-controls > .delivery-board-fullscreen-btn,
#prep_delivery_panel .delivery-board-fullscreen-btn,
button.delivery-board-fullscreen-btn {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem !important;
  height: 1.35rem !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  background: none !important;
  background-color: transparent !important;
  color: var(--header-muted);
  box-shadow: none !important;
  transform: none;
  appearance: none;
  -webkit-appearance: none;
}

#prep_delivery_panel .delivery-board-fullscreen-btn:hover,
#prep_delivery_panel .delivery-board-fullscreen-btn:focus-visible,
#prep_delivery_panel .delivery-board-fullscreen-btn.is-active,
#prep_delivery_panel .delivery-board-fullscreen-btn.is-active:hover,
button.delivery-board-fullscreen-btn:hover,
button.delivery-board-fullscreen-btn:focus-visible,
button.delivery-board-fullscreen-btn.is-active,
button.delivery-board-fullscreen-btn.is-active:hover {
  transform: none;
  background: none !important;
  background-color: transparent !important;
  color: var(--text);
  box-shadow: none !important;
}

.delivery-board-fullscreen-btn .delivery-board-fullscreen-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.delivery-board-fullscreen-btn .delivery-board-fullscreen-icon--exit,
.delivery-board-fullscreen-btn.is-active .delivery-board-fullscreen-icon--enter {
  display: none;
}

.delivery-board-fullscreen-btn.is-active .delivery-board-fullscreen-icon--exit {
  display: block;
}

.delivery-board-controls .delivery-board-controls-status {
  grid-column: 1 / -1;
  margin: 0;
  text-align: left;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-month-filter {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 2.2rem;
  height: 2.2rem;
}

.delivery-month-filter span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 2.2rem;
}

.delivery-month-filter select {
  box-sizing: border-box;
  width: 6.375rem;
  min-width: 6.375rem;
  max-width: 6.375rem;
  height: 2.2rem;
  min-height: 2.2rem;
  line-height: normal;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

#prep_accepted_board_year_filter {
  width: max-content;
}

#prep_accepted_board_year_filter select {
  width: auto;
  min-width: 5.5rem;
  max-width: none;
  field-sizing: content;
}

#prep_accepted_board_year_filter[hidden] {
  display: none !important;
}

.delivery-group-filter {
  overflow: visible;
}

.delivery-group-multiselect {
  position: relative;
  width: 8.2rem;
  min-width: 8.2rem;
  max-width: 8.2rem;
}

.delivery-group-multiselect__trigger {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 2.1rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.delivery-group-multiselect__trigger[aria-expanded="true"] {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.delivery-group-multiselect__menu {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  z-index: 40;
  box-sizing: border-box;
  min-width: 14rem;
  max-width: min(20rem, 80vw);
  max-height: 18rem;
  overflow: auto;
  padding: 0.28rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.16);
}

.delivery-group-multiselect__option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  padding: 0.32rem 0.7rem;
  font-size: 0.84rem;
  line-height: 1.35;
  cursor: pointer;
}

.delivery-group-multiselect__option:hover,
.delivery-group-multiselect__option:focus-within {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.delivery-group-multiselect__option input {
  flex: 0 0 auto;
  margin: 0;
}

.delivery-group-multiselect__option span {
  min-width: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-filter-search {
  position: relative;
  width: 6.375rem;
  min-width: 6.375rem;
  max-width: 6.375rem;
}

.delivery-filter-search__input {
  box-sizing: border-box;
  width: 100%;
  height: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.delivery-filter-search__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.delivery-filter-search__dropdown {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 18rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.16);
}

.delivery-filter-search__option {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 0.88rem;
  cursor: pointer;
}

.delivery-filter-search__option:hover,
.delivery-filter-search__option.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.delivery-filter-search__empty {
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.delivery-board-search {
  min-width: 240px;
  flex: 0 1 320px;
}

.delivery-board-controls .toolbar-btn {
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.delivery-board-secondary-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.delivery-board-secondary-nav--sublevel {
  grid-column: 1 / -1;
  justify-self: start;
  width: 100%;
  padding: 0.35rem 0 0;
  margin-top: -0.05rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.delivery-board-secondary-nav__filters,
.delivery-board-secondary-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  overflow: visible;
}

.delivery-board-secondary-nav__actions {
  padding-left: 3.85rem;
}

.delivery-board-secondary-nav__label {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  margin-right: 0.1rem;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  width: 100%;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-secondary-nav--sublevel {
  flex: 1 0 100%;
  width: 100%;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-heading-center {
  display: none;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  padding-left: 0;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  max-width: none;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search {
  flex: 0 0 auto;
  width: 11rem;
  min-width: 9rem;
  max-width: 11rem;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search input {
  min-height: 2.2rem;
}

@media (max-width: 1320px) {
  .delivery-board-controls {
    grid-template-columns: minmax(0, 1fr);
    padding-inline-end: 0;
    gap: 0.55rem;
  }

  .delivery-board-controls-cluster {
    width: 100%;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
    display: flex;
    flex-wrap: wrap;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions,
  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
    width: auto;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search {
    min-width: 8rem;
    width: 10rem;
    max-width: 10rem;
  }
}

.delivery-board-search input,
.delivery-table input,
.delivery-table select {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
}

.delivery-board-view {
  margin-top: 0.35rem;
  min-height: 18rem;
  min-height: min(18rem, 42dvh);
  min-width: 0;
  width: 100%;
}

.prep-acceptance-board-shell {
  display: grid;
  gap: 0.85rem;
}
.project-preparation-board-shell {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.project-preparation-rule-card {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.project-preparation-rule-card .prep-acceptance-filter-head {
  margin-bottom: 0;
}
.project-preparation-rule-card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.92rem;
}
.project-preparation-table {
  min-width: 86rem;
}
.project-preparation-table.prep-resource-table,
.project-preparation-table.prep-resource-table.delivery-table {
  min-width: 86rem;
}
.project-preparation-table.delivery-table td {
  width: auto;
  min-width: 4.5rem;
  max-width: none;
  padding: 0.45rem 0.6rem;
  box-sizing: border-box;
}
.project-preparation-table.is-col-resized,
.project-preparation-table.prep-resource-table.is-col-resized {
  table-layout: fixed;
  min-width: 0;
}
.project-preparation-table.is-col-resized th,
.project-preparation-table.is-col-resized td,
.project-preparation-table.is-col-resized.delivery-table td {
  width: auto;
  min-width: 0;
  max-width: none;
}
.project-preparation-table th.prep-resource-th--project_name,
.project-preparation-table td.prep-resource-td--project_name {
  min-width: 12rem;
  max-width: 20rem;
  white-space: normal;
  vertical-align: middle;
}
.project-preparation-table th.prep-resource-th--project_code,
.project-preparation-table td.prep-resource-td--project_code,
.project-preparation-table th.prep-resource-th--project_manager,
.project-preparation-table td.prep-resource-td--project_manager,
.project-preparation-table th.prep-resource-th--planned_ship_date,
.project-preparation-table td.prep-resource-td--planned_ship_date {
  min-width: 6.5rem;
  vertical-align: middle;
}
.project-preparation-table th.prep-resource-th--preparation_status,
.project-preparation-table td.prep-resource-td--preparation_status {
  min-width: 6rem;
  text-align: center;
  vertical-align: middle;
}
.project-preparation-table th.prep-resource-th--required_qty,
.project-preparation-table td.prep-resource-td--required_qty,
.project-preparation-table th.prep-resource-th--shipped_qty,
.project-preparation-table td.prep-resource-td--shipped_qty,
.project-preparation-table th.prep-resource-th--remaining_qty,
.project-preparation-table td.prep-resource-td--remaining_qty,
.project-preparation-table th.prep-resource-th--warehouse,
.project-preparation-table td.prep-resource-td--warehouse {
  min-width: 4rem;
  text-align: center;
  vertical-align: middle;
}
.project-preparation-table th.prep-resource-th--production,
.project-preparation-table td.prep-resource-td--production,
.project-preparation-table th.prep-resource-th--purchase,
.project-preparation-table td.prep-resource-td--purchase {
  min-width: 6rem;
  text-align: center;
  vertical-align: middle;
}
.project-preparation-table th.prep-resource-th--products,
.project-preparation-table td.prep-resource-td--products {
  min-width: 12rem;
  max-width: 18rem;
  white-space: normal;
  vertical-align: middle;
}
#prep_delivery_panel.is-project-preparation-mode .project-preparation-table .prep-acceptance-project-btn {
  color: var(--link, #1677ff);
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
#prep_delivery_panel.is-project-preparation-mode .project-preparation-table .project-preparation-products-btn {
  color: var(--link, #1677ff);
  font-weight: 600;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.project-preparation-info-modal-dialog {
  width: min(100%, 980px);
}
#prep_project_preparation_info_modal,
#prep_project_signing_info_modal {
  z-index: 1001;
}
.project-preparation-info-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem 0.85rem;
}
.project-preparation-info-section-title {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}
.project-preparation-info-field {
  margin-bottom: 0;
  display: grid;
  gap: 0.3rem;
}
.project-preparation-info-field > span {
  font-size: 0.8rem;
  color: var(--muted);
}
.project-preparation-info-field input[readonly] {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text);
  cursor: default;
}
.project-signing-info-link {
  min-height: 2.1rem;
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text);
  font-size: 0.86rem;
}
.project-signing-info-link a {
  color: var(--accent);
}
.prep-resource-issue-timeline-item[data-prep-resource-timeline-prep="1"],
.prep-resource-issue-timeline-item[data-prep-resource-timeline-sign="1"] {
  cursor: pointer;
}
.prep-resource-issue-timeline-prep-btn {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
.prep-resource-issue-timeline-prep-btn:hover,
.prep-resource-issue-timeline-prep-btn:focus-visible {
  color: var(--link, #1677ff);
}
.project-preparation-product-modal-dialog {
  width: min(100%, 960px);
}
.project-preparation-product-modal-body {
  min-width: 0;
}
.project-preparation-product-modal-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.project-preparation-product-modal-table {
  width: 100%;
  min-width: 48rem;
  table-layout: fixed;
}
.project-preparation-product-modal-table .project-preparation-product-col--name {
  width: 33.34%;
}
.project-preparation-product-modal-table .project-preparation-product-col--material,
.project-preparation-product-modal-table .project-preparation-product-col--machine {
  width: 16.67%;
}
.project-preparation-product-modal-table .project-preparation-product-col--supply,
.project-preparation-product-modal-table .project-preparation-product-col--qty {
  width: 8.33%;
}
.project-preparation-product-modal-table.delivery-table th,
.project-preparation-product-modal-table.delivery-table td,
#prep_delivery_panel .project-preparation-product-modal-table.delivery-table th,
#prep_delivery_panel .project-preparation-product-modal-table.delivery-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  background: var(--surface);
  color: var(--text);
}
.project-preparation-product-modal-table.delivery-table thead th,
#prep_delivery_panel .project-preparation-product-modal-table.delivery-table thead th {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text) !important;
}
.project-preparation-product-modal-table.delivery-table tbody tr:nth-child(even) td,
#prep_delivery_panel .project-preparation-product-modal-table.delivery-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: var(--text);
}
.project-preparation-product-modal-table.delivery-table tbody tr:hover td,
#prep_delivery_panel .project-preparation-product-modal-table.delivery-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}
.project-preparation-product-modal-table th:nth-child(n + 5),
.project-preparation-product-modal-table td:nth-child(n + 5) {
  text-align: center;
  white-space: nowrap;
}
.project-preparation-product-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.45rem;
  min-width: 14rem;
}
.project-preparation-product-list > div {
  display: grid;
  gap: 0.12rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.project-preparation-product-list span {
  color: var(--muted);
  font-size: 0.78rem;
}

#prep_delivery_panel.is-project-preparation-mode .prep-acceptance-summary-grid {
  flex: 0 0 auto;
}
#prep_delivery_panel.is-project-preparation-mode .prep-acceptance-summary-card {
  flex: 1 1 12rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
#prep_delivery_panel.is-project-preparation-mode .prep-acceptance-summary-value {
  font-size: 1.2rem;
}

.prep-acceptance-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.prep-acceptance-summary-card,
.prep-acceptance-filter-shell {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
}

.prep-acceptance-summary-card {
  display: flex;
  align-items: baseline;
  flex: 1 1 15rem;
  gap: 0.45rem 0.7rem;
  min-width: 0;
  padding: 0.75rem 1rem;
}

.prep-acceptance-summary-label,
.prep-acceptance-summary-helper,
.prep-acceptance-filter-head h3,
.prep-acceptance-filter-head p {
  margin: 0;
}

.prep-acceptance-summary-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.prep-acceptance-summary-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}

.prep-acceptance-summary-helper {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.prep-acceptance-filter-shell {
  padding: 0.95rem 1rem;
}

.prep-acceptance-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.prep-acceptance-filter-meta {
  color: var(--muted);
  text-align: right;
}

.prep-acceptance-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 0.75rem;
}

.prep-acceptance-filter-group {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.35);
  padding: 0.65rem 0.75rem;
}

.prep-acceptance-filter-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.prep-acceptance-filter-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.prep-acceptance-filter-actions {
  display: flex;
  gap: 0.45rem;
  margin: 0.7rem 0 0.55rem;
}

.prep-acceptance-filter-actions .toolbar-btn {
  min-height: 1.9rem;
  padding: 0.28rem 0.7rem;
}

.prep-acceptance-filter-collapsed-tip {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.prep-acceptance-filter-options {
  display: grid;
  gap: 0.45rem;
  max-height: 15rem;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}

.prep-acceptance-filter-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.86rem;
}

.prep-acceptance-filter-option input[type="checkbox"] {
  margin-top: 0.18rem;
}

/* 项目经理筛选项横向排列，空间不足时自动换行。 */
[data-prep-acceptance-filter-group="project_manager"] .prep-acceptance-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

[data-prep-acceptance-filter-group="project_manager"] .prep-acceptance-filter-option {
  align-items: center;
  min-width: max-content;
}

[data-prep-acceptance-filter-group="project_manager"] .prep-acceptance-filter-option input[type="checkbox"] {
  margin-top: 0;
}

.prep-acceptance-table-shell {
  min-width: 0;
}

.prep-acceptance-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  margin-top: 0.7rem;
}

.prep-acceptance-pagination-meta {
  margin: 0;
  color: var(--muted);
}

.prep-acceptance-pagination-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.prep-acceptance-pagination-actions .toolbar-btn {
  min-height: 1.9rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.2;
}

.prep-acceptance-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-right: 0.2rem;
}

.prep-acceptance-page-size select {
  min-height: 1.9rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.prep-acceptance-table-wrap {
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
}

.prep-acceptance-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.prep-acceptance-table col.prep-acceptance-col-project {
  width: 11rem;
}

.prep-acceptance-table col.prep-acceptance-col-code {
  width: 7rem;
}

.prep-acceptance-table col.prep-acceptance-col-status {
  width: 6rem;
}

.prep-acceptance-table col.prep-acceptance-col-manager,
.prep-acceptance-table col.prep-acceptance-col-account,
.prep-acceptance-table col.prep-acceptance-col-presales {
  width: 5rem;
}

.prep-acceptance-table col.prep-acceptance-col-count {
  width: 3rem;
}

.prep-acceptance-table col.prep-acceptance-col-hours {
  width: 7rem;
}

.prep-acceptance-table col.prep-acceptance-col-ship-date,
.prep-acceptance-table col.prep-acceptance-col-accept-date {
  width: 8rem;
}

.prep-acceptance-table col.prep-acceptance-col-duration {
  width: 5rem;
}

.prep-acceptance-table col.prep-acceptance-col-note {
  width: 4rem;
}

.prep-acceptance-table th,
.prep-acceptance-table td {
  white-space: nowrap;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prep-acceptance-table td:last-child {
  text-align: center;
}

.prep-acceptance-combined-metric {
  text-align: center;
}

.prep-acceptance-combined-metric strong,
.prep-acceptance-combined-metric span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prep-acceptance-project-btn {
  display: inline-block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #93c5fd;
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prep-acceptance-project-btn:hover {
  text-decoration: underline;
}

.prep-acceptance-empty {
  text-align: center;
  color: var(--muted);
  padding: 1.2rem 0.75rem;
}

/* 时间 / 项目 / 今日视图内层壳：纵向撑满看板剩余高度，内部表格/卡片滚动 */
.delivery-board-time-shell,
.delivery-board-project-shell,
.delivery-board-today-shell,
.delivery-board-card-shell {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-items: stretch;
}

.delivery-board-today-shell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.delivery-today-view-meta {
  margin: 0;
  flex: 0 0 auto;
}

/* 今日视图：colgroup + table-layout:fixed，列宽可拖动表头右侧手柄调整；超出容器可横向滚动 */
.delivery-board-today-shell .delivery-table-wrap.delivery-today-table-wrap {
  overflow-x: auto;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto {
  table-layout: fixed;
  /* 覆盖 .delivery-table 的 min-width:100%，否则改一列时浏览器会向整表均分剩余宽度 */
  width: max-content;
  min-width: 0;
  max-width: none;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto th,
.delivery-board-today-shell .delivery-table.delivery-table--today-auto td {
  width: auto;
  min-width: 0;
  max-width: none;
  overflow: hidden;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto th.delivery-date-th:not(.delivery-corner-cell) {
  white-space: normal;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-person-col {
  overflow: hidden;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-cell,
.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-cell-select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-project-matrix-person-name,
.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-project-matrix-person-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto td.delivery-today-progress-cell {
  overflow: visible;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-today-progress-input,
.delivery-board-today-shell .delivery-table.delivery-table--today-auto .delivery-today-progress-readonly {
  max-width: 100%;
  box-sizing: border-box;
}

.delivery-board-today-shell .delivery-table.delivery-table--today-auto thead th {
  position: relative;
}

.delivery-today-col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  margin-right: -4px;
  height: 100%;
  cursor: col-resize;
  z-index: 12;
  user-select: none;
  touch-action: none;
}

.delivery-today-col-resize-handle:hover {
  background: rgba(147, 197, 253, 0.22);
}


/* 交付看板：整卡全屏时占满视口并放大表格区域（section + id 提高优先级，避免被其它卡片规则覆盖） */
section#prep_delivery_panel:fullscreen,
section#prep_delivery_panel:-webkit-full-screen,
section#prep_delivery_panel:-moz-full-screen,
section#prep_delivery_panel.is-fullscreen-active {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  /* 视口单位作兜底；实际高度由 preparation.js 用 visualViewport/innerHeight 像素锁定 */
  min-height: 100vh;
  height: 100vh;
  min-height: 100svh;
  height: 100svh;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0.45rem 0.65rem 0;
}

section#prep_delivery_panel:fullscreen .delivery-board-controls,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-controls,
section#prep_delivery_panel:-moz-full-screen .delivery-board-controls {
  flex: 0 0 auto;
}

/* 直连子元素，确保主视图区一定参与纵向 flex 分配 */
section#prep_delivery_panel:fullscreen > .delivery-board-workspace,
section#prep_delivery_panel:-webkit-full-screen > .delivery-board-workspace,
section#prep_delivery_panel:-moz-full-screen > .delivery-board-workspace,
section#prep_delivery_panel.is-fullscreen-active > .delivery-board-workspace {
  flex: 1 1 0%;
  height: 100%;
  max-height: none;
  min-height: 0;
  min-width: 0;
  margin-top: 0;
}

section#prep_delivery_panel:fullscreen .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
section#prep_delivery_panel:-moz-full-screen .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  /* 占满全屏空间，避免高度塌陷导致底部留白 */
  flex: 1 1 0%;
  height: auto;
  max-height: none;
  min-height: 0;
  min-width: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  align-items: stretch;
}

section#prep_delivery_panel:fullscreen .delivery-board-time-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-time-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-time-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-time-shell {
  flex: 1 1 0%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-items: stretch;
}

section#prep_delivery_panel:fullscreen .delivery-board-project-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-project-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-project-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-project-shell,
section#prep_delivery_panel:fullscreen .delivery-board-today-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-today-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-today-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-today-shell,
section#prep_delivery_panel:fullscreen .delivery-board-card-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-card-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-card-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-card-shell {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  align-items: stretch;
}

section#prep_delivery_panel:fullscreen .delivery-table-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-table-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-table-wrap,
section#prep_delivery_panel.is-fullscreen-active .delivery-table-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-height: none;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: auto;
}

/* 时间视图：表格滚动区占满 shell，避免主表高度停在内容高度、底部大块留白 */
section#prep_delivery_panel:fullscreen .delivery-board-time-shell > .delivery-table-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-time-shell > .delivery-table-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-board-time-shell > .delivery-table-wrap,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-time-shell > .delivery-table-wrap {
  flex: 1 1 0%;
  height: 100%;
  max-height: none;
  min-height: 0;
}

section#prep_delivery_panel:fullscreen .delivery-board-time-shell .delivery-table,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-time-shell .delivery-table,
section#prep_delivery_panel:-moz-full-screen .delivery-board-time-shell .delivery-table,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-time-shell .delivery-table {
  min-height: 100%;
  height: 100%;
}

/* 今日视图表格可能宽于视口，全屏时仍需横向滚动（覆盖上一段 overflow-x: hidden） */
section#prep_delivery_panel:fullscreen .delivery-table-wrap.delivery-today-table-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-table-wrap.delivery-today-table-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-table-wrap.delivery-today-table-wrap,
section#prep_delivery_panel.is-fullscreen-active .delivery-table-wrap.delivery-today-table-wrap {
  overflow-x: auto;
}

/* 全屏 · 项目视图：统计条固定，矩阵区域占满剩余高度，内部横纵滚动 */
section#prep_delivery_panel:fullscreen .delivery-project-matrix-meta,
section#prep_delivery_panel:-webkit-full-screen .delivery-project-matrix-meta,
section#prep_delivery_panel:-moz-full-screen .delivery-project-matrix-meta {
  flex: 0 0 auto;
}

section#prep_delivery_panel:fullscreen .delivery-project-matrix-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-project-matrix-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-project-matrix-wrap {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-height: none;
  overflow: auto;
}

/* 全屏 · 时间视图：主表区域伸展，底部横向滚动条贴底 */
section#prep_delivery_panel:fullscreen .delivery-table-bottom-scroll,
section#prep_delivery_panel:-webkit-full-screen .delivery-table-bottom-scroll,
section#prep_delivery_panel:-moz-full-screen .delivery-table-bottom-scroll,
section#prep_delivery_panel.is-fullscreen-active .delivery-table-bottom-scroll {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  margin-top: 0.3rem;
  z-index: auto;
}

/* 全屏 · 组别 / 人员卡片视图：在剩余空间内滚动 */
section#prep_delivery_panel:fullscreen .delivery-card-grid,
section#prep_delivery_panel:-webkit-full-screen .delivery-card-grid,
section#prep_delivery_panel:-moz-full-screen .delivery-card-grid {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding-right: 0.15rem;
  scrollbar-gutter: stable both-edges;
}

section#prep_delivery_panel:fullscreen .delivery-person-card-list,
section#prep_delivery_panel:-webkit-full-screen .delivery-person-card-list,
section#prep_delivery_panel:-moz-full-screen .delivery-person-card-list {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  align-content: start;
  scrollbar-gutter: stable both-edges;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  align-content: start;
  padding-right: 0.15rem;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 153, 174, 0.75) rgba(17, 24, 39, 0.24);
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid {
  grid-auto-rows: max-content;
  align-items: start;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list {
  grid-auto-rows: max-content;
  align-items: start;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid .delivery-card,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list .delivery-card--person {
  min-height: fit-content;
  height: auto;
  align-self: start;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid .delivery-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list .delivery-card--person {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid .delivery-card .delivery-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list .delivery-card--person .delivery-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid::-webkit-scrollbar,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list::-webkit-scrollbar {
  width: 10px;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid::-webkit-scrollbar-track,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list::-webkit-scrollbar-track {
  background: rgba(17, 24, 39, 0.24);
  border-radius: 999px;
}

section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid::-webkit-scrollbar-thumb,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list::-webkit-scrollbar-thumb {
  background: rgba(141, 153, 174, 0.72);
  border-radius: 999px;
  border: 2px solid rgba(17, 24, 39, 0.24);
}

/* 滚动条放到看板主视口（屏幕边缘），覆盖全屏里内层自建滚动 */
section#prep_delivery_panel:fullscreen .delivery-board-time-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-time-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-time-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-time-shell,
section#prep_delivery_panel:fullscreen .delivery-board-project-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-project-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-project-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-project-shell,
section#prep_delivery_panel:fullscreen .delivery-board-today-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-today-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-today-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-today-shell,
section#prep_delivery_panel:fullscreen .delivery-board-card-shell,
section#prep_delivery_panel:-webkit-full-screen .delivery-board-card-shell,
section#prep_delivery_panel:-moz-full-screen .delivery-board-card-shell,
section#prep_delivery_panel.is-fullscreen-active .delivery-board-card-shell,
section#prep_delivery_panel:fullscreen .delivery-table-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-table-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-table-wrap,
section#prep_delivery_panel.is-fullscreen-active .delivery-table-wrap,
section#prep_delivery_panel:fullscreen .delivery-project-matrix-wrap,
section#prep_delivery_panel:-webkit-full-screen .delivery-project-matrix-wrap,
section#prep_delivery_panel:-moz-full-screen .delivery-project-matrix-wrap,
section#prep_delivery_panel.is-fullscreen-active .delivery-project-matrix-wrap,
section#prep_delivery_panel:fullscreen .delivery-card-grid,
section#prep_delivery_panel:-webkit-full-screen .delivery-card-grid,
section#prep_delivery_panel:-moz-full-screen .delivery-card-grid,
section#prep_delivery_panel.is-fullscreen-active .delivery-card-grid,
section#prep_delivery_panel:fullscreen .delivery-person-card-list,
section#prep_delivery_panel:-webkit-full-screen .delivery-person-card-list,
section#prep_delivery_panel:-moz-full-screen .delivery-person-card-list,
section#prep_delivery_panel.is-fullscreen-active .delivery-person-card-list {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.delivery-table-wrap {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: min(68vh, 46rem);
  max-height: min(70dvh, 46rem);
  scrollbar-gutter: stable both-edges;
}

#prep_delivery_panel .delivery-table-wrap,
#prep_delivery_panel .delivery-project-matrix-wrap,
#prep_delivery_panel .delivery-card-grid,
#prep_delivery_panel .delivery-person-card-list {
  flex: 0 0 auto;
  min-height: 0;
  min-width: 100%;
  width: max-content;
  height: auto;
  max-height: none;
  overflow: visible;
}

#prep_delivery_panel .delivery-card-grid,
#prep_delivery_panel .delivery-person-card-list {
  width: 100%;
  min-width: 0;
}

#prep_delivery_panel .delivery-board-time-shell,
#prep_delivery_panel .delivery-board-project-shell,
#prep_delivery_panel .delivery-board-today-shell,
#prep_delivery_panel .delivery-board-card-shell {
  overflow: visible;
  height: auto;
  max-height: none;
  flex: 0 0 auto;
}

#prep_delivery_panel .delivery-board-time-shell .delivery-table,
#prep_delivery_panel .delivery-board-today-shell .delivery-table {
  min-height: 0;
}

#prep_delivery_panel .delivery-table-bottom-scroll,
section#prep_delivery_panel:fullscreen .delivery-table-bottom-scroll,
section#prep_delivery_panel:-webkit-full-screen .delivery-table-bottom-scroll,
section#prep_delivery_panel:-moz-full-screen .delivery-table-bottom-scroll,
section#prep_delivery_panel.is-fullscreen-active .delivery-table-bottom-scroll {
  display: none;
}

#prep_delivery_panel .delivery-project-matrix-meta,
#prep_delivery_panel .delivery-today-view-meta {
  flex: 0 0 auto;
}

.delivery-table-bottom-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.4rem;
  padding-bottom: 0.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.55);
}

.delivery-table-bottom-scroll-inner {
  height: 1px;
}

.delivery-table {
  --delivery-action-col-width: 2.4rem;
  --delivery-meta-col-width: 6rem;
  --delivery-date-col-width: 6rem;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.delivery-table th,
.delivery-table td,
.delivery-mini-table th,
.delivery-mini-table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  background: var(--surface);
}

.delivery-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.55rem 0.6rem;
  width: var(--delivery-date-col-width);
  min-width: var(--delivery-date-col-width);
  max-width: var(--delivery-date-col-width);
  text-align: center;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #18212b;
}

.delivery-table th.delivery-date-th {
  white-space: nowrap;
  vertical-align: middle;
}

.delivery-table th.delivery-date-th .delivery-date-label {
  font-weight: 600;
}

.delivery-calendar-badge {
  display: inline;
  margin-left: 0.2rem;
  font-size: 0.62rem;
  font-weight: 600;
  vertical-align: middle;
  line-height: 1;
}

.delivery-calendar-badge--holiday {
  color: #fbbf24;
}

.delivery-calendar-badge--work {
  color: #93c5fd;
}

.delivery-calendar-badge--prev {
  color: #94a3b8;
}

.delivery-table th.delivery-date-th--prev-month,
.delivery-table th.delivery-weekday--prev-month {
  background: rgba(148, 163, 184, 0.16);
}

#prep_delivery_panel .delivery-table th.delivery-date-th--prev-month,
#prep_delivery_panel .delivery-table th.delivery-weekday--prev-month {
  background: color-mix(in srgb, var(--muted) 24%, var(--surface)) !important;
}

#prep_delivery_panel .delivery-calendar-badge--prev {
  color: #9a3412;
}

.delivery-table td.delivery-time-assignment-cell--prev-month {
  box-shadow: inset -2px 0 0 rgba(148, 163, 184, 0.55);
}

.delivery-table td.delivery-time-assignment-cell--carry > .delivery-cell--editable {
  outline: 1px dashed rgba(148, 163, 184, 0.85);
  outline-offset: -3px;
}

.delivery-table th.delivery-date-th--holiday {
  box-shadow: inset 0 -1px 0 rgba(251, 191, 36, 0.35);
}

.delivery-table th.delivery-date-th--work {
  box-shadow: inset 0 -1px 0 rgba(147, 197, 253, 0.4);
}

.delivery-table th.delivery-weekday {
  top: 2.3rem;
  z-index: 3;
  color: var(--muted);
  font-weight: 500;
}

.delivery-table th.delivery-weekday--holiday {
  color: #fbbf24;
}

.delivery-table th.delivery-weekday--work {
  color: #93c5fd;
}

.delivery-table th.delivery-action-corner-cell {
  left: 0;
  top: 0;
  z-index: 9;
  background: #18212b;
}

.delivery-table th.delivery-corner-cell {
  left: var(--delivery-action-col-width);
  top: 0;
  z-index: 8;
  background: #18212b;
  box-shadow: 8px 0 18px rgba(2, 6, 23, 0.32);
}

.delivery-table th.sticky-col--name {
  padding: 0.55rem 0.6rem;
  text-align: left;
}

.delivery-table td {
  width: var(--delivery-date-col-width);
  min-width: var(--delivery-date-col-width);
  max-width: var(--delivery-date-col-width);
}

.delivery-table tbody tr:nth-child(even) td {
  background: rgba(26, 34, 44, 0.96);
}

.delivery-table .sticky-col {
  position: sticky;
  z-index: 2;
  background: #18212b;
}

.delivery-table tbody .sticky-col {
  background: #18212b;
}

.delivery-table .delivery-group-col {
  width: var(--delivery-meta-col-width);
  min-width: var(--delivery-meta-col-width);
  max-width: var(--delivery-meta-col-width);
}

.delivery-table .delivery-status-col {
  width: var(--delivery-date-col-width);
  min-width: var(--delivery-date-col-width);
  max-width: var(--delivery-date-col-width);
}

.delivery-table .delivery-action-col {
  width: var(--delivery-action-col-width);
  min-width: var(--delivery-action-col-width);
  max-width: var(--delivery-action-col-width);
}

.delivery-board-time-shell--action-hidden .delivery-table .delivery-action-col {
  display: none;
}

.delivery-table .sticky-col--action {
  left: 0;
  z-index: 6;
}

.delivery-table .sticky-col--name {
  left: var(--delivery-action-col-width);
  width: var(--delivery-date-col-width);
  min-width: var(--delivery-date-col-width);
  max-width: var(--delivery-date-col-width);
  z-index: 5;
  box-shadow: 8px 0 18px rgba(2, 6, 23, 0.32);
}

.delivery-board-time-shell .delivery-table .delivery-time-name-col {
  position: sticky;
  left: 0;
  z-index: 7;
}

.delivery-board-time-shell .delivery-table tbody .delivery-time-name-col {
  z-index: 6;
}

.delivery-board-time-shell--action-hidden .delivery-table th.delivery-corner-cell,
.delivery-board-time-shell--action-hidden .delivery-table .sticky-col--name {
  left: 0;
}

.delivery-board-today-shell .delivery-table th.delivery-corner-cell,
.delivery-board-today-shell .delivery-table .sticky-col--name {
  left: 0;
}

.delivery-table .delivery-action-cell {
  text-align: center;
  vertical-align: middle;
  padding: 0.25rem 0.2rem;
}

.delivery-table .delivery-person-col {
  position: relative;
  padding: 0.55rem 0.6rem;
  text-align: left;
  vertical-align: middle;
  overflow: visible;
}

.delivery-board-today-shell .delivery-table .delivery-person-col {
  overflow: hidden;
}

/* 今日视图状态列：纯文本展示，无下拉；背景交给行着色，与原先透明 select 一致 */
.delivery-board-today-shell .delivery-realtime-status-today {
  background: transparent !important;
  cursor: default;
}

.delivery-table tbody tr.delivery-time-view-add-row td {
  background: rgba(22, 30, 40, 0.98);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.delivery-table tbody tr.delivery-time-view-add-row .delivery-time-view-add-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  vertical-align: middle;
  padding: 0.35rem 0.5rem;
}

.delivery-time-view-add-employee-btn {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

.delivery-table tbody tr.delivery-time-view-add-row .delivery-time-view-add-row--filler {
  opacity: 0.35;
}

.delivery-board-view--group-collapsed .delivery-table .delivery-group-col {
  display: none;
}

.delivery-table input,
.delivery-table select {
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-table .sticky-col input,
.delivery-table .sticky-col select {
  background: transparent;
}

.delivery-cell,
.delivery-cell-select {
  display: block;
  width: 100%;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-cell {
  color: var(--text);
}

.delivery-cell--project {
  min-height: 3.6rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
}

.delivery-cell--project:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.95);
  outline-offset: 1px;
}

.delivery-project-assignment-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-project-assignment-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

section#prep_delivery_panel.is-fullscreen-active {
  --delivery-fullscreen-scale: var(--delivery-fullscreen-scale, 1);
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-board-time-shell .delivery-table {
  --delivery-action-col-width: calc(2.4rem * var(--delivery-fullscreen-scale));
  --delivery-meta-col-width: calc(6rem * var(--delivery-fullscreen-scale));
  --delivery-date-col-width: calc(6rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-table th {
  padding: calc(0.55rem * var(--delivery-fullscreen-scale)) calc(0.6rem * var(--delivery-fullscreen-scale));
  font-size: calc(0.8rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-table th.delivery-weekday {
  top: calc(2.3rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-table .delivery-person-col {
  padding: calc(0.55rem * var(--delivery-fullscreen-scale)) calc(0.6rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-cell,
section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-cell-select {
  min-height: calc(2.15rem * var(--delivery-fullscreen-scale));
  padding: calc(0.45rem * var(--delivery-fullscreen-scale)) calc(0.65rem * var(--delivery-fullscreen-scale));
  font-size: calc(0.88rem * var(--delivery-fullscreen-scale));
  line-height: calc(1.25rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-cell--project {
  min-height: calc(3.6rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-project-assignment-name {
  font-size: calc(0.92rem * var(--delivery-fullscreen-scale));
}

section#prep_delivery_panel.is-fullscreen-active.delivery-fullscreen-scale-active .delivery-project-assignment-meta {
  font-size: calc(0.76rem * var(--delivery-fullscreen-scale));
  line-height: calc(1.4em * var(--delivery-fullscreen-scale));
}

.delivery-cell--readonly {
  color: var(--text);
}

.delivery-cell--readonly-poc {
  background: #ffffff;
  color: #111827;
}

.delivery-cell--readonly-office {
  background: #2f6fff;
  color: #f8fbff;
}

.delivery-cell--empty {
  color: var(--muted);
}

.delivery-cell--state {
  font-weight: 600;
}

.delivery-cell--normal {
  background: #ffe34d;
  color: #111827;
}

.delivery-cell--busy {
  background: #ef4444;
  color: #fff5f5;
}

.delivery-cell--vacation {
  background: #39d353;
  color: #052e16;
}

.delivery-cell--office {
  background: #2f6fff;
  color: #f8fbff;
}

.delivery-cell--poc {
  background: #b14dff;
  color: #fbf5ff;
}

.delivery-cell-select {
  cursor: pointer;
}

.delivery-cell--editable {
  position: relative;
  padding-inline-end: 1rem;
  cursor: text;
}


.delivery-time-assignment-cell {
  position: relative;
}

.delivery-table tbody tr td.delivery-time-assignment-cell--painted,
.delivery-table tbody tr:nth-child(even) td.delivery-time-assignment-cell--painted {
  background: var(--prep-delivery-cell-paint) !important;
  color: var(--prep-delivery-cell-paint-text, #111827);
}

.delivery-time-assignment-cell--painted > .delivery-cell,
.delivery-time-assignment-cell--painted > .delivery-cell-select {
  color: var(--prep-delivery-cell-paint-text, #111827);
}

.delivery-time-assignment-cell > .delivery-cell--editable {
  position: static;
}

.delivery-time-assignment-cell--selected {
  z-index: 4;
  background: var(--prep-delivery-cell-paint, transparent) !important;
  box-shadow:
    inset 0 0 0 2px rgba(37, 99, 235, 0.98),
    inset 0 0 0 3px rgba(191, 219, 254, 0.96);
}

.delivery-time-assignment-cell--selected > .delivery-cell--editable,
.delivery-time-assignment-cell--selected > .delivery-cell-select,
.delivery-time-assignment-cell--selected > .delivery-cell {
  filter: saturate(1.04);
}

.delivery-cell-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 8.5rem;
  padding: 0.28rem;
  border: 1px solid color-mix(in srgb, var(--border) 82%, #c4b8a4);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, #f4efe6);
  box-shadow:
    0 10px 28px rgba(31, 41, 55, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.delivery-cell-context-menu[hidden] {
  display: none !important;
}

.delivery-cell-context-menu__item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.48rem 0.72rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.delivery-cell-context-menu__item + .delivery-cell-context-menu__item {
  margin-top: 0.08rem;
}

.delivery-cell-context-menu__item:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.delivery-cell-context-menu__item:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}


.delivery-cell-fill-handle {
  position: absolute;
  right: 0.16rem;
  bottom: 0.16rem;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  background: #d1d5db;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.72),
    0 0 6px rgba(209, 213, 219, 0.55);
  cursor: grab;
  opacity: 0.82;
  transform: scale(1);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.delivery-cell-fill-handle::before,
.delivery-cell-fill-handle::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 5px;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  transform-origin: center;
}

.delivery-cell-fill-handle::after {
  transform: rotate(90deg);
}

.delivery-cell-fill-handle:hover,
.delivery-cell--editable:hover .delivery-cell-fill-handle,
.delivery-cell--editable:focus-within .delivery-cell-fill-handle {
  width: 10px;
  height: 10px;
  background: #d1d5db;
  background-color: #d1d5db;
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.86),
    0 0 12px rgba(209, 213, 219, 0.78);
  cursor: grabbing;
  opacity: 1;
  transform: scale(1);
}

.delivery-row--selected .delivery-cell--editable .delivery-cell-fill-handle {
  opacity: 0.96;
}

.delivery-time-assignment-cell--selected .delivery-cell-fill-handle {
  right: 1px !important;
  bottom: 1px !important;
  width: 10px !important;
  height: 10px !important;
  border-width: 2px;
  border-radius: 5px;
  background: #d1d5db !important;
  background-color: #d1d5db !important;
  box-shadow:
    0 0 0 2px rgba(15, 23, 42, 0.9),
    0 0 12px rgba(209, 213, 219, 0.9);
  opacity: 1 !important;
  transform: scale(1) !important;
  z-index: 6;
}

.delivery-time-assignment-cell--selected .delivery-cell-fill-handle::before,
.delivery-time-assignment-cell--selected .delivery-cell-fill-handle::after {
  right: -4px;
  bottom: -4px;
  width: 6px;
  height: 2px;
}

.delivery-cell-input {
  display: block;
  width: 100%;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.25rem;
  color: var(--prep-delivery-cell-paint-text, var(--text));
  background: var(--prep-delivery-cell-paint, var(--surface)) !important;
  outline: 1px solid rgba(61, 139, 253, 0.6);
  outline-offset: -1px;
}

.delivery-cell-input:focus {
  outline-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(61, 139, 253, 0.28);
}

.delivery-project-search-editor {
  position: relative;
  z-index: 12;
}

.delivery-project-search-input {
  position: relative;
  z-index: 2;
}

.delivery-project-detail-body {
  display: grid;
  gap: 1rem;
}

.delivery-project-detail-hint {
  margin: 0;
  color: var(--muted);
}

.delivery-project-detail-summary {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.2);
}

.delivery-project-detail-summary-main {
  display: grid;
  gap: 0.35rem;
}

.delivery-project-detail-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.delivery-project-detail-subtitle {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.delivery-project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.delivery-project-detail-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

.delivery-project-detail-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.delivery-project-detail-field {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.delivery-project-detail-field-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.delivery-project-detail-field-value {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.delivery-project-search-dropdown {
  position: absolute;
  top: calc(100% + 0.2rem);
  left: 0;
  width: max(22rem, 100%);
  min-width: 100%;
  max-width: min(32rem, 70vw);
  z-index: 13;
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--prep-delivery-cell-paint-text, var(--text)) 28%, var(--border));
  border-radius: 0.65rem;
  background: var(--prep-delivery-cell-paint, var(--surface));
  color: var(--prep-delivery-cell-paint-text, var(--text));
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.18);
}

.risk-project-search-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid rgba(61, 139, 253, 0.35);
  border-radius: 0.65rem;
  background: rgba(12, 18, 28, 0.98);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.38);
}

.risk-project-search-empty {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.risk-project-search-empty.err {
  color: var(--danger, #f87171);
}

.risk-project-search-option {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.risk-project-search-option:hover,
.risk-project-search-option.is-active {
  background: rgba(61, 139, 253, 0.12);
}

.risk-project-search-option-code {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.risk-project-search-option-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}

.risk-project-search-more {
  padding: 0.55rem 1rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.delivery-project-search-empty {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--prep-delivery-cell-paint-text, var(--muted));
  opacity: 0.82;
}

.delivery-project-search-option {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--prep-delivery-cell-paint-text, var(--text)) 16%, transparent);
  background: transparent;
  color: var(--prep-delivery-cell-paint-text, var(--text));
  text-align: left;
  cursor: pointer;
}

.delivery-project-search-option:last-child {
  border-bottom: 0;
}

.delivery-project-search-option:hover,
.delivery-project-search-option.is-active {
  background: color-mix(in srgb, var(--prep-delivery-cell-paint-text, var(--accent)) 14%, transparent);
}

.delivery-project-search-option-name {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--prep-delivery-cell-paint-text, var(--text));
  white-space: normal;
  word-break: break-word;
}

.delivery-project-search-option-meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--prep-delivery-cell-paint-text, var(--muted));
  opacity: 0.78;
  white-space: normal;
  word-break: break-word;
}

.delivery-cell-select option {
  background: #ffffff;
  color: #111827;
}

.delivery-table tbody tr.delivery-row--normal td {
  background: rgba(255, 227, 77, 0.22);
}

.delivery-table tbody tr.delivery-row--busy td {
  background: rgba(239, 68, 68, 0.22);
}

.delivery-table tbody tr.delivery-row--vacation td {
  background: rgba(57, 211, 83, 0.2);
}

.delivery-table tbody tr.delivery-row--office td {
  background: rgba(47, 111, 255, 0.22);
}

.delivery-table tbody tr.delivery-row--poc td {
  background: rgba(177, 77, 255, 0.22);
}

.delivery-table tbody tr.delivery-row--normal .sticky-col--name {
  background: #5a5330;
}

.delivery-table tbody tr.delivery-row--normal .sticky-col--action {
  background: #5a5330;
}

.delivery-table tbody tr.delivery-row--busy .sticky-col--name {
  background: #4f2b31;
}

.delivery-table tbody tr.delivery-row--busy .sticky-col--action {
  background: #4f2b31;
}

.delivery-table tbody tr.delivery-row--vacation .sticky-col--name {
  background: #214933;
}

.delivery-table tbody tr.delivery-row--vacation .sticky-col--action {
  background: #214933;
}

.delivery-table tbody tr.delivery-row--office .sticky-col--name {
  background: #203d73;
}

.delivery-table tbody tr.delivery-row--office .sticky-col--action {
  background: #203d73;
}

.delivery-table tbody tr.delivery-row--poc .sticky-col--name {
  background: #463164;
}

.delivery-table tbody tr.delivery-row--poc .sticky-col--action {
  background: #463164;
}

.delivery-table tbody tr[data-prep-delivery-row-id] {
  cursor: pointer;
}

.delivery-time-assignment-cell--fill-preview {
  background: rgba(96, 165, 250, 0.2) !important;
}

.delivery-time-assignment-cell--fill-source {
  box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.95);
}

.delivery-time-assignment-cell--fill-target {
  box-shadow:
    inset 0 0 0 2px rgba(96, 165, 250, 0.95),
    inset -2px 0 0 rgba(191, 219, 254, 0.95);
}

.delivery-table tbody tr.delivery-row--selected td {
  background: rgba(37, 99, 235, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(147, 197, 253, 0.4),
    inset 0 -1px 0 rgba(147, 197, 253, 0.4);
}

.delivery-table tbody tr.delivery-row--selected td:first-child {
  box-shadow:
    inset 2px 0 0 rgba(96, 165, 250, 0.82),
    inset 0 1px 0 rgba(147, 197, 253, 0.4),
    inset 0 -1px 0 rgba(147, 197, 253, 0.4);
}

.delivery-table tbody tr.delivery-row--selected td:last-child {
  box-shadow:
    inset -2px 0 0 rgba(96, 165, 250, 0.82),
    inset 0 1px 0 rgba(147, 197, 253, 0.4),
    inset 0 -1px 0 rgba(147, 197, 253, 0.4);
}

.delivery-table tbody tr.delivery-row--selected .sticky-col--name {
  background: rgba(30, 64, 175, 0.6);
}

.delivery-table tbody tr.delivery-row--selected .sticky-col--action {
  background: rgba(30, 64, 175, 0.6);
}

.delivery-table tbody tr.delivery-row--selected .delivery-time-assignment-cell--selected {
  background: var(--prep-delivery-cell-paint, transparent) !important;
  box-shadow:
    inset 0 0 0 2px rgba(37, 99, 235, 0.98),
    inset 0 0 0 3px rgba(191, 219, 254, 0.96);
}

.delivery-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.delivery-person-card-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(12rem, auto);
}

@media (min-width: 600px) {
  .delivery-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-person-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .delivery-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .delivery-person-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.delivery-project-matrix-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.delivery-project-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: min(68vh, 46rem);
  max-height: min(70dvh, 46rem);
  min-width: 0;
  /* 与时间视图相同，容器底色跟随当前页面主题，不能遗留深色蒙层。 */
  background: var(--surface);
}

.delivery-project-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.delivery-project-matrix th,
.delivery-project-matrix td {
  min-width: 5.25rem;
  padding: 0.7rem 0.6rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  vertical-align: middle;
}

.delivery-project-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
  font-size: 0.8rem;
  white-space: nowrap;
}

.delivery-project-matrix-sticky {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 6rem !important;
  width: 6rem;
  max-width: 6rem;
  text-align: left !important;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: 8px 0 18px rgba(2, 6, 23, 0.24);
  overflow: hidden;
}

.delivery-project-matrix-sticky-right {
  position: sticky;
  right: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  box-shadow: -8px 0 18px rgba(2, 6, 23, 0.24);
}

.delivery-project-matrix tbody tr:nth-child(even) td,
.delivery-project-matrix tbody tr:nth-child(even) th.delivery-project-matrix-person {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.delivery-project-matrix tbody tr:hover td,
.delivery-project-matrix tbody tr:hover th.delivery-project-matrix-person {
  background: rgba(61, 139, 253, 0.08);
}

.delivery-project-matrix-person-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 项目与超期占用矩阵复用时间视图的姓名单元格结构与间距。 */
.delivery-project-matrix-person .delivery-person-summary-time-body {
  gap: 0.15rem;
}

.delivery-project-matrix-person-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 今日视图：窄列内姓名与组别·工号单行展示 */
.delivery-person-summary-inline {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}

.delivery-person-summary-time {
  display: block;
  min-width: 0;
}

.delivery-person-summary-time-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.delivery-person-name-btn {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.delivery-person-name-btn:hover,
.delivery-person-name-btn:focus-visible {
  text-decoration: underline;
  color: #bfdbfe;
}

.delivery-person-name-btn--inline {
  font-size: inherit;
}

.delivery-project-matrix-person-name .delivery-person-name-btn {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-person-month-header-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 auto;
}

.delivery-person-month-header-main h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-person-month-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.delivery-person-month-nav {
  width: 2rem;
  min-width: 2rem;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.delivery-person-month-select-wrap {
  display: block;
  margin: 0;
}

.delivery-person-month-select-wrap select {
  box-sizing: border-box;
  min-width: 7.6rem;
  height: 2.1rem;
  padding: 0 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.delivery-person-month-body {
  display: grid;
  gap: 0.85rem;
}

.delivery-person-month-hint,
.delivery-person-month-summary {
  margin: 0;
}

.delivery-person-month-summary,
.delivery-person-month-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.delivery-person-month-weekdays,
.delivery-person-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.delivery-person-month-weekdays span {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.delivery-person-month-day {
  min-height: 4.2rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.delivery-person-month-day--pad {
  background: transparent;
  border: 0;
  min-height: 0;
}

.delivery-person-month-day--weekend {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}

.delivery-person-month-day-date {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.85;
}

.delivery-person-month-day-value {
  font-size: 0.78rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.delivery-time-view-empty {
  margin: 0 0 0.35rem;
}

.delivery-manual-person-fields {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.delivery-manual-person-editor {
  display: block;
  min-width: 0;
}

.delivery-manual-person-editor-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.delivery-manual-person-editor--time .delivery-manual-person-input {
  padding: 0;
  background: transparent;
}

.delivery-manual-person-editor-meta-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.delivery-manual-person-editor-meta-sep {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}

.delivery-manual-person-input--name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.delivery-manual-person-input--meta {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}

.delivery-manual-person-remove-btn {
  position: absolute;
  left: -0.95rem;
  top: 50%;
  transform: translateY(-50%);
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 7;
  display: none;
}

.delivery-board-time-shell .delivery-table tbody tr[data-prep-delivery-row-id]:hover .delivery-manual-person-remove-btn,
.delivery-board-time-shell .delivery-table tbody tr[data-prep-delivery-row-id]:focus-within .delivery-manual-person-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delivery-time-view-action-placeholder {
  display: inline-block;
  width: 1.8rem;
  height: 1.8rem;
}

.delivery-manual-person-fields--inline {
  gap: 0.2rem;
}

.delivery-manual-person-fields--inline .delivery-manual-person-input {
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem;
}

.delivery-manual-person-fields--card {
  gap: 0.35rem;
  width: 100%;
}

.delivery-manual-person-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.delivery-card-head-total--manual {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.delivery-today-progress-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.15rem;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
  resize: vertical;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
}

.delivery-today-progress-readonly {
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
}

.delivery-table td.delivery-today-progress-cell {
  vertical-align: top;
}

.delivery-days-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 1.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(61, 139, 253, 0.16);
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 700;
}

.delivery-days-badge.is-empty {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 500;
}

.delivery-project-matrix-total {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.delivery-project-matrix tbody .delivery-project-matrix-total.delivery-project-matrix-sticky-right,
.delivery-project-matrix tfoot .delivery-project-matrix-total.delivery-project-matrix-sticky-right {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.delivery-project-matrix tfoot th,
.delivery-project-matrix tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  font-weight: 700;
}

.delivery-project-matrix tfoot .delivery-project-matrix-sticky {
  z-index: 5;
}

.delivery-project-matrix thead .delivery-project-matrix-sticky-right {
  z-index: 5;
}

.delivery-project-matrix tfoot .delivery-project-matrix-sticky-right {
  z-index: 5;
}

.delivery-project-matrix-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.delivery-project-matrix-summary--single {
  justify-content: center;
}

.delivery-project-matrix-summary--label {
  align-items: flex-start;
}

.delivery-project-matrix-summary-main {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.delivery-project-matrix-summary-meta {
  display: block;
  font-size: 0.76rem;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 500;
}

.delivery-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  /* 使用主题表面色，避免浅色主题叠加深色半透明底而降低文字可读性。 */
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}

.delivery-card--person {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  height: 100%;
}

.delivery-card--state {
  border-color: rgba(61, 139, 253, 0.45);
}

/* 人员视图：项目占用天数不足 27 天 → 总计行红色提示 */
.delivery-card--person-project-low .delivery-card-head-total {
  color: var(--danger);
  font-weight: 600;
  opacity: 1;
}

/* 人员视图：当月无请假/休假格 → 月度全勤，左侧绿色标识 */
.delivery-card--person-full-attendance {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.85);
}

.delivery-card--person-full-attendance.delivery-card--person-project-low {
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow:
    inset 3px 0 0 rgba(34, 197, 94, 0.85),
    inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.delivery-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.delivery-card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.delivery-card-head span {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.delivery-card-head--person .delivery-card-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.delivery-card-head-person-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.5rem 0.65rem;
  flex: 1;
  min-width: 0;
}

.delivery-card-head-person-inline h3 {
  flex-shrink: 0;
}

.delivery-card-head-total {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text);
  opacity: 0.92;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-card-body {
  padding: 0.95rem 1rem 1rem;
}

.delivery-card--person .delivery-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

.delivery-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.delivery-mini-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.delivery-mini-table th,
.delivery-mini-table td {
  padding: 0.5rem 0.65rem;
  font-size: 0.84rem;
  text-align: left;
}

.delivery-mini-table th {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  color: var(--muted);
}

.delivery-mini-table .delivery-mini-table-person {
  min-width: 6.5rem;
  max-width: 14rem;
  vertical-align: top;
}

.delivery-overdue-shell {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delivery-overdue-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
}

.delivery-overdue-table {
  min-width: 860px;
}

.delivery-overdue-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.delivery-overdue-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

@media (max-width: 960px) {
  .delivery-board-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    min-height: 0;
    padding-inline-end: 0;
    padding-top: 0;
  }

  .delivery-board-hanging-actions {
    left: 0.35rem;
    top: auto;
    bottom: 1.1rem;
    transform: none;
    width: 2.2rem;
    min-width: 2.2rem;
    padding: 0.28rem;
  }

  .delivery-board-hanging-actions .toolbar-btn {
    min-height: 4.6rem;
    font-size: 0.78rem;
  }

  .delivery-extend-modal-toolbar {
    align-items: flex-start;
  }

  .delivery-board-controls-cluster {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }

  #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-controls-cluster {
    flex-direction: row;
    align-items: center;
  }

  .delivery-board-controls .delivery-view-switch {
    flex: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }

  .delivery-board-heading-center {
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center {
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
  }

  .delivery-board-search-row {
    flex-wrap: wrap;
    width: 100%;
  }

  .delivery-board-search-row .delivery-board-search {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-search-main {
    flex: 1 1 auto;
    width: 100%;
    flex-wrap: nowrap;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .delivery-board-search {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
    display: inline-flex;
    flex-wrap: nowrap;
    width: auto;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search {
    flex: 0 0 auto;
    width: 10rem;
    min-width: 8rem;
    max-width: 10rem;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-secondary-nav--sublevel {
    flex: 1 0 100%;
    width: 100%;
  }

  .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    padding-left: 0;
  }

  .delivery-board-controls .delivery-board-controls-status {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    text-align: left;
  }

  .prep-acceptance-filter-grid {
    grid-template-columns: 1fr;
  }

  .prep-acceptance-pagination {
    align-items: flex-start;
    gap: 0.45rem;
  }

  .prep-acceptance-pagination-meta {
    white-space: nowrap;
  }

  .prep-acceptance-filter-head {
    flex-direction: column;
  }

  .prep-acceptance-filter-meta {
    text-align: left;
  }

  .delivery-month-filter {
    flex-wrap: wrap;
  }

  .delivery-board-search {
    min-width: 0;
    width: 100%;
  }
}

.time-clock-body {
  background: linear-gradient(180deg, #eef4ff 0%, #f7f9fe 35%, #eef2f8 100%);
  color: #1f2937;
}

.time-clock-body .header,
.time-clock-body .main-with-sidebar > .sidebar,
.time-clock-body .main-with-sidebar > .admin-queue-sidebar,
.time-clock-body .time-clock-shell > .footer {
  display: none;
}

/* 独立工时打卡页不展示一级功能切换导航，也不展示二级「打卡统计 / 工时打卡」 */
.time-clock-body > .page-switch-row,
.time-clock-body .page-switch-row,
.time-clock-body .time-clock-secondary-nav {
  display: none !important;
}

.time-clock-secondary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 1rem;
}

.layout-with-global-sidebar .time-clock-secondary-nav {
  width: 100%;
  max-width: 1400px;
}

.time-clock-body .layout-with-global-sidebar {
  padding: 0;
}

.time-clock-body .main-with-sidebar {
  max-width: 980px;
  padding: 1.5rem 1.5rem 3rem;
}

.time-clock-body .main-content {
  width: 100%;
}

.time-clock-body .header {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
  border-color: rgba(99, 102, 241, 0.12);
  box-shadow: 0 18px 42px rgba(59, 79, 134, 0.12);
}

.time-clock-body .header h1,
.time-clock-body .toolbar-user strong {
  color: #1f2937;
}

.time-clock-body .sub,
.time-clock-body .toolbar-user-desc,
.time-clock-body .footer,
.time-clock-body .sidebar-header h2,
.time-clock-body .sidebar-empty {
  color: #6b7280;
}

.time-clock-body .toolbar-btn {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
}

.time-clock-body .toolbar-btn:hover {
  border-color: rgba(59, 130, 246, 0.34);
  color: #2563eb;
  background: #ffffff;
}

.time-clock-body .toolbar-btn.is-active {
  color: #ffffff;
}

/* 一级 / 二级导航保持全局 toolbar-btn 样式，与交付看板等页一致 */
.time-clock-body .page-switch-row .toolbar-btn,
.time-clock-body .time-clock-secondary-nav .toolbar-btn {
  border: none;
  border-color: transparent;
  background: #6b7280;
  color: #fff;
  box-shadow: none;
}

.time-clock-body .page-switch-row .toolbar-btn:hover,
.time-clock-body .time-clock-secondary-nav .toolbar-btn:hover {
  transform: translateY(-1px);
  background: #4b5563;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(75, 85, 99, 0.18);
}

.time-clock-body .page-switch-row .toolbar-btn.is-active,
.time-clock-body .page-switch-row .toolbar-btn.is-active:hover,
.time-clock-body .time-clock-secondary-nav .toolbar-btn.is-active,
.time-clock-body .time-clock-secondary-nav .toolbar-btn.is-active:hover {
  background: #6d42f5;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(109, 66, 245, 0.24);
}

.time-clock-body .page-switch-row .toolbar-btn.is-active:hover,
.time-clock-body .time-clock-secondary-nav .toolbar-btn.is-active:hover {
  background: #5b35d2;
}

.time-clock-body .sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 10px 28px rgba(51, 65, 85, 0.08);
  backdrop-filter: blur(12px);
}

.time-clock-body .sidebar-item:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.time-clock-shell {
  max-width: 860px;
  margin: 0 auto;
}

.time-clock-board {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 28px 52px rgba(75, 85, 99, 0.12);
}

.time-clock-board::before,
.time-clock-board::after {
  content: "";
  position: absolute;
  top: 0;
  width: 170px;
  height: 86px;
  background: linear-gradient(135deg, #5ba3ff 0%, #2d5fe7 100%);
  opacity: 0.96;
}

.time-clock-board::before {
  left: -64px;
  border-bottom-right-radius: 120px;
}

.time-clock-board::after {
  right: -46px;
  border-bottom-left-radius: 120px;
}

.time-clock-board__inner {
  position: relative;
  z-index: 1;
  padding: 2.25rem 2.5rem;
}

.time-clock-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.2;
  text-align: left;
  color: #1e293b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-clock-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.time-clock-language-toggle {
  flex: 0 0 auto;
  min-width: 5.4rem;
  width: auto;
  border-color: rgba(99, 102, 241, 0.28);
  background: #ffffff;
  color: #4f46e5;
}

.time-clock-note-block {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f1f5f9;
  border-left: 4px solid #3b82f6;
  color: #475569;
}

.time-clock-note-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.time-clock-note-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
}

.time-clock-note-toggle .time-clock-note-title {
  margin: 0;
}

.time-clock-note-content {
  margin-top: 0.5rem;
}

.time-clock-note-toggle__icon {
  display: none;
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.2s ease;
}

.time-clock-note-block.is-collapsed .time-clock-note-toggle__icon {
  transform: rotate(-90deg);
}

.time-clock-note-content[hidden] {
  display: none !important;
}

.time-clock-note-line {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

a.time-clock-subsidy-login-hint {
  display: block;
  margin: 0.75rem 1.1rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a.time-clock-subsidy-login-hint:hover,
a.time-clock-subsidy-login-hint:focus-visible {
  color: #7c2d12;
}

.time-clock-form {
  margin-top: 1rem;
}

.time-clock-form-group + .time-clock-form-group {
  margin-top: 1rem;
}

.time-clock-form-group {
  text-align: left;
}

.time-clock-form-group--entry-action {
  margin-top: 1rem;
}

.time-clock-form-group--entry-action + .time-clock-form-group {
  margin-top: 1rem;
}

.time-clock-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  margin: 0 0 0.4rem;
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
  color: #334155;
}

.time-clock-sublabel {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
}

.time-clock-helper {
  margin: -0.1rem 0 0.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #94a3b8;
}

.time-clock-helper--compact {
  font-size: 0.9rem;
  margin-top: 0.35rem;
  color: #64748b;
  line-height: 1.5;
}

.time-clock-input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select.time-clock-input {
  height: 2.9rem;
  padding: 0 0.85rem;
}

.time-clock-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.time-clock-input[readonly] {
  background: #f4f6fb;
  color: #4b5563;
}

.time-clock-input--hidden {
  display: none;
}

.time-clock-attendance-entry {
  margin-bottom: 1rem;
}

.time-clock-attendance-button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  color: #1d4ed8;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.time-clock-attendance-button:hover {
  border-color: #60a5fa;
  background: #dbeafe;
}

.time-clock-attendance-button__title {
  font-size: 1.05rem;
  font-weight: 800;
}

.time-clock-attendance-button__desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.time-clock-local-project-modal[hidden] {
  display: none !important;
}

.time-clock-local-project-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.time-clock-local-project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.time-clock-local-project-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.time-clock-local-project-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.time-clock-local-project-modal__header h3 {
  margin: 0 0 0.2rem;
  color: #0f172a;
}

.time-clock-local-project-modal__header p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.time-clock-local-project-modal__close {
  width: 2rem;
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
}

.time-clock-local-project-modal__form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.1rem 1.1rem;
}

.time-clock-local-project-modal__error {
  min-height: 1.2em;
  margin: 0;
  color: #b91c1c;
  font-size: 0.86rem;
}

.time-clock-local-project-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.time-clock-attendance-modal[hidden] {
  display: none !important;
}

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

.time-clock-attendance-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}

.time-clock-attendance-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.time-clock-attendance-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.time-clock-attendance-modal__header h3 {
  margin: 0 0 0.2rem;
  color: #0f172a;
}

.time-clock-attendance-modal__header p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.time-clock-attendance-modal__close {
  width: 2rem;
  height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 1.25rem;
  cursor: pointer;
}

.time-clock-attendance-modal__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
}

.time-clock-attendance-range {
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

.time-clock-attendance-range.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.time-clock-attendance-status {
  padding: 0.8rem 1.1rem;
  color: #64748b;
}

.time-clock-attendance-list {
  overflow: auto;
  padding: 0 1.1rem 1.1rem;
}

.time-clock-attendance-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
}

.time-clock-attendance-card + .time-clock-attendance-card {
  margin-top: 0.45rem;
}

.time-clock-attendance-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.28rem;
  color: #0f172a;
}

.time-clock-attendance-card__head strong {
  font-size: 0.95rem;
}

.time-clock-attendance-card__status {
  flex-shrink: 0;
  color: #2563eb;
  font-size: 0.82rem;
  font-weight: 700;
}

.time-clock-attendance-card__status--missing {
  color: #dc2626;
}

.time-clock-attendance-card__status--pending {
  color: #d97706;
}

.time-clock-attendance-card__status--leave {
  color: #059669;
}

.time-clock-attendance-card__info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
  margin: 0 0 0.12rem;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.35;
}

.time-clock-attendance-card__info b {
  color: #334155;
  font-weight: 700;
  word-break: break-word;
}

.time-clock-attendance-card__dot {
  color: #cbd5e1;
}

.time-clock-attendance-card__row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-width: 0;
  line-height: 1.35;
}

.time-clock-attendance-card__row em {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-style: normal;
}

.time-clock-attendance-card__row b {
  min-width: 0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  word-break: break-word;
}

.time-clock-attendance-card__times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  margin-top: 0.2rem;
}

.time-clock-attendance-card__makeup {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.time-clock-attendance-card__makeup-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
  writing-mode: horizontal-tb;
  line-height: 1.4;
}

.time-clock-attendance-card__makeup-text span {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.75rem;
}

.time-clock-attendance-card__makeup-text strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.prep-tc-person-cell .prep-tc-rest-makeup {
  display: block;
  margin-top: 0.35rem;
  width: auto;
  min-height: 1.8rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
}

.time-clock-attendance-card__makeup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.time-clock-attendance-card__makeup-btn {
  align-self: flex-end;
  width: auto;
  max-width: 100%;
  min-height: 2rem;
  padding: 0.2rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #1d4ed8;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.time-clock-attendance-card--punch .time-clock-attendance-card__times {
  grid-template-columns: minmax(0, 1fr);
}

html.is-desktop .time-clock-attendance-modal__panel {
  width: min(880px, calc(100% - 2rem));
}

html.is-desktop .time-clock-attendance-card {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.3rem 0.85rem;
  padding: 0.48rem 0.8rem;
}

html.is-desktop .time-clock-attendance-card__head {
  display: contents;
}

html.is-desktop .time-clock-attendance-card__head strong {
  grid-column: 1;
  font-size: 0.9rem;
}

html.is-desktop .time-clock-attendance-card__info {
  grid-column: 2;
  margin: 0;
  min-width: 0;
}

html.is-desktop .time-clock-attendance-card__times {
  grid-column: 3;
  margin: 0;
  display: flex;
  gap: 0.85rem;
}

html.is-desktop .time-clock-attendance-card__status {
  grid-column: 4;
  justify-self: end;
}

html.is-desktop .time-clock-attendance-card__makeup {
  grid-column: 1 / -1;
  margin-top: 0;
}

html.is-mobile .time-clock-attendance-modal {
  align-items: flex-end;
  padding: 0;
}

html.is-mobile .time-clock-attendance-modal__panel {
  width: 100%;
  max-height: 88vh;
  border-radius: 18px 18px 0 0;
}

.time-clock-textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.55;
  padding-right: 3.25rem;
  padding-bottom: 2.6rem;
}

.time-clock-supplement-field {
  position: relative;
}

.time-clock-supplement-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.7rem;
}

.time-clock-supplement-upload__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.96);
  color: #2563eb;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.time-clock-supplement-upload__button:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  transform: translateY(-1px);
}

.time-clock-supplement-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.time-clock-supplement-upload__hint {
  color: #64748b;
  font-size: 0.88rem;
}

.time-clock-supplement-preview {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.time-clock-supplement-preview__item {
  display: grid;
  grid-template-columns: 3.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.time-clock-supplement-preview__item img {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.time-clock-supplement-preview__meta {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.time-clock-supplement-preview__meta strong,
.time-clock-supplement-preview__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-clock-supplement-preview__meta strong {
  color: #334155;
  font-size: 0.92rem;
}

.time-clock-supplement-preview__meta span {
  color: #94a3b8;
  font-size: 0.82rem;
}

.time-clock-supplement-preview__remove {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.time-clock-inline-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.time-clock-inline-input--icon {
  grid-template-columns: minmax(0, 1fr) 3rem;
}

/* 自动定位：仅保留获取定位按钮 */
.time-clock-inline-input--location {
  display: flex;
  align-items: center;
  justify-content: center;
}

#auto_location,
#auto_location_status {
  display: none !important;
}

.time-clock-inline-input--location .time-clock-side-btn,
.time-clock-inline-input--location .time-clock-icon-btn {
  width: auto;
  align-self: center;
  max-width: 100%;
}

.time-clock-side-btn {
  min-height: 3.1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  white-space: nowrap;
}

.time-clock-fetch-locate-btn {
  min-height: 3.8rem;
  min-width: 7.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

/* 主操作：覆盖 .time-clock-body .toolbar-btn 的浅色描边风，与提交等主按钮同级视觉重量 */
.time-clock-body .time-clock-fetch-locate-btn {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #3d6df4, #295de5);
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.12), 0 12px 28px rgba(41, 93, 229, 0.32);
  letter-spacing: 0.03em;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
}

.time-clock-body .time-clock-fetch-locate-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #315fe2, #234fc7);
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.1), 0 14px 32px rgba(35, 79, 199, 0.38);
  transform: translateY(-1px);
}

.time-clock-body .time-clock-fetch-locate-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

.time-clock-body .time-clock-fetch-locate-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 rgba(15, 23, 42, 0.14), 0 8px 20px rgba(41, 93, 229, 0.28);
}

.time-clock-body .time-clock-fetch-locate-btn:disabled,
.time-clock-body .time-clock-fetch-locate-btn:disabled:hover {
  color: rgba(255, 255, 255, 0.88);
  background: #94a3b8;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
  opacity: 0.92;
}

.time-clock-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.time-clock-icon-btn:hover {
  border-color: #5b8ef6;
  color: #2563eb;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.16);
}

.time-clock-icon-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.time-clock-decision-card {
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.time-clock-decision-card[data-state="ok"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.time-clock-decision-card[data-state="error"] {
  border-color: #fecaca;
  background: #fef2f2;
}

.time-clock-decision-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.time-clock-decision-top strong {
  font-size: 1.05rem;
  color: #1e293b;
}

.time-clock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.time-clock-badge--pending {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.time-clock-badge--ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.time-clock-badge--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.time-clock-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.time-clock-submit-row .status {
  color: #6b7280;
}

.time-clock-submit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.time-clock-draft-btn {
  min-width: 10rem;
  min-height: 3.2rem;
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(41, 93, 229, 0.35);
  background: #fff;
  color: #295de5;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.time-clock-draft-btn:hover {
  border-color: #295de5;
  background: rgba(41, 93, 229, 0.06);
  color: #234fc7;
}

.time-clock-submit-btn {
  min-width: 12.5rem;
  min-height: 3.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #3d6df4, #295de5);
  box-shadow: 0 14px 28px rgba(41, 93, 229, 0.24);
}

.time-clock-submit-btn:hover {
  background: linear-gradient(135deg, #315fe2, #234fc7);
}

.time-clock-completion {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.time-clock-completion__hero {
  padding: 1.3rem 1.2rem 1.15rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96)),
    linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.08);
}

.time-clock-completion__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  font-size: 0.82rem;
  font-weight: 700;
}

.time-clock-completion__title {
  margin: 0.8rem 0 0.35rem;
  color: #1e293b;
  font-size: 1.35rem;
}

.time-clock-completion__desc {
  margin: 0;
  color: #475569;
  line-height: 1.75;
}

.time-clock-completion__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0.9rem;
  align-items: start;
}

.time-clock-completion__card {
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.time-clock-completion__card h4 {
  margin: 0 0 0.8rem;
  color: #334155;
  font-size: 1.02rem;
}

.time-clock-completion__summary,
.time-clock-completion__pending {
  display: grid;
  gap: 0.65rem;
}

.time-clock-completion__summary-item {
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.time-clock-completion__summary-label {
  display: block;
  margin-bottom: 0.42rem;
  color: #334155;
  font-size: 0.98rem;
  font-weight: 700;
}

.time-clock-completion__summary-value {
  display: block;
  color: #64748b;
  line-height: 1.65;
  font-size: 0.98rem;
  font-weight: 500;
  word-break: break-word;
}

.time-clock-completion__item {
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.time-clock-completion__item strong,
.time-clock-completion__item span {
  display: block;
}

.time-clock-completion__item-title {
  color: #1e293b;
  font-size: 0.98rem;
  line-height: 1.45;
}

.time-clock-completion__item-meta {
  margin-top: 0.28rem;
  color: #64748b;
  line-height: 1.7;
  font-size: 0.95rem;
}

.time-clock-completion__item span {
  margin-top: 0.24rem;
  color: #64748b;
  line-height: 1.6;
  font-size: 0.92rem;
}

.time-clock-completion__item--ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.time-clock-completion__item--todo {
  background: linear-gradient(180deg, #fffaf3 0%, #fff4e7 100%);
  border-color: #fed7aa;
}

.time-clock-completion__item--review {
  background: #fffbeb;
  border-color: #fde68a;
}

.time-clock-completion__actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.time-clock-completion__item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.time-clock-completion__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  min-height: 2.6rem;
  padding: 0 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid #fdba74;
  color: #9a3412;
  font-weight: 700;
}

.time-clock-completion__records-btn {
  min-width: 7.5rem;
  min-height: 2.7rem;
  padding: 0 1.1rem;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.time-clock-completion__item-actions .time-clock-completion__link {
  width: 100%;
}

.time-clock-records-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.time-clock-records-body .layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.time-clock-records-body .page-switch-row {
  margin-bottom: 0.75rem;
}

.time-clock-records-body .time-clock-secondary-nav {
  width: 100%;
  margin: 0 0 1rem;
}

.time-clock-records-body .header-copy h1 {
  color: var(--text);
}

.time-clock-records-body .header-copy .sub {
  color: var(--muted);
}

.time-clock-records-main {
  display: block;
}

.time-clock-records-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.time-clock-records-body .risk-admin-list-title,
.time-clock-records-body .card h2 {
  color: var(--text);
}

.time-clock-records-body .chip,
.time-clock-records-body .toolbar-btn {
  background: #6b7280;
  color: #fff;
  border-color: transparent;
}

.time-clock-records-body .page-switch-row .toolbar-btn,
.time-clock-records-body .time-clock-secondary-nav .toolbar-btn {
  border: none;
  border-color: transparent;
  background: #6b7280;
  color: #fff;
  box-shadow: none;
}

.time-clock-records-body .page-switch-row .toolbar-btn:hover,
.time-clock-records-body .time-clock-secondary-nav .toolbar-btn:hover {
  transform: translateY(-1px);
  background: #4b5563;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(75, 85, 99, 0.18);
}

.time-clock-records-body .page-switch-row .toolbar-btn.is-active,
.time-clock-records-body .page-switch-row .toolbar-btn.is-active:hover,
.time-clock-records-body .time-clock-secondary-nav .toolbar-btn.is-active,
.time-clock-records-body .time-clock-secondary-nav .toolbar-btn.is-active:hover {
  background: #6d42f5;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(109, 66, 245, 0.24);
}

.time-clock-records-body .page-switch-row .toolbar-btn.is-active:hover,
.time-clock-records-body .time-clock-secondary-nav .toolbar-btn.is-active:hover {
  background: #5b35d2;
}

.time-clock-records-body .time-clock-records-action-btn {
  min-width: 5.25rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.time-clock-records-body .toolbar-btn:hover,
.time-clock-records-body .chip:hover {
  color: #fff;
  border-color: transparent;
  background: #4b5563;
}

.time-clock-records-body .records-table-scroll {
  max-height: min(62vh, 620px);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.55);
}

.time-clock-records-body .records-registry-table {
  font-size: 0.84rem;
  color: var(--text);
}

.time-clock-records-body .records-registry-table th,
.time-clock-records-body .records-registry-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.time-clock-records-body .records-registry-table thead th,
.time-clock-records-body .records-registry-table th {
  top: 0;
  background: rgba(26, 34, 44, 0.96);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.time-clock-records-body .records-registry-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.time-clock-records-body .records-registry-table tbody tr:hover td {
  background: rgba(61, 139, 253, 0.12);
}

.time-clock-record-delete-btn {
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 1.9rem;
  padding: 0.25rem 0.65rem;
}

.time-clock-record-delete-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.6);
}

.time-clock-record-delete-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.time-clock-records-body .records-registry-table td.records-td-ellipsis,
.time-clock-records-body .records-registry-table .records-time {
  color: var(--text);
}

.time-clock-records-body .records-empty {
  color: var(--muted);
}

.time-clock-records-body .status {
  color: var(--muted);
}

.time-clock-records-mobile {
  display: none;
}

.time-clock-records-mobile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.time-clock-records-month-title {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}

.time-clock-records-month-btn {
  width: 2.35rem;
  height: 2.35rem;
  border: none;
  border-radius: 999px;
  background: rgba(61, 139, 253, 0.16);
  color: #8ec5ff;
  font-size: 1.45rem;
  line-height: 1;
}

.time-clock-records-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border-radius: 14px;
  background: rgba(15, 20, 25, 0.55);
  border: 1px solid var(--border);
}

.time-clock-records-stat {
  padding: 0.72rem 0.35rem;
  text-align: center;
}

.time-clock-records-stat strong {
  display: block;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1.1;
}

.time-clock-records-stat span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.time-clock-records-stat--abnormal strong {
  color: #ef4444;
}

.time-clock-records-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.time-clock-records-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.time-clock-records-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
}

.time-clock-records-dot--normal {
  background: #2f80ed;
}

.time-clock-records-dot--abnormal {
  background: #ef4444;
}

.time-clock-records-weekdays,
.time-clock-records-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.time-clock-records-weekdays {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.time-clock-records-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.time-clock-records-day::after {
  content: "";
  position: absolute;
  bottom: 0.28rem;
  left: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  transform: translateX(-50%);
  opacity: 0;
}

.time-clock-records-day.has-normal::after {
  background: #2f80ed;
  opacity: 1;
}

.time-clock-records-day.has-abnormal::after {
  background: #ef4444;
  opacity: 1;
}

.time-clock-records-day.is-muted {
  color: rgba(139, 156, 179, 0.45);
  pointer-events: none;
}

.time-clock-records-day.is-selected {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
}

.time-clock-records-day.is-selected::after {
  background: #ffffff;
}

.time-clock-records-day-detail {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.time-clock-records-day-detail h3 {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.time-clock-records-day-list {
  display: grid;
  gap: 0.55rem;
}

.time-clock-records-day-empty {
  margin: 0;
  padding: 0.95rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.55);
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--border);
}

.time-clock-records-day-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: rgba(26, 34, 44, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.time-clock-records-day-dot {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.42rem;
  border-radius: 999px;
  background: #2f80ed;
}

.time-clock-records-day-item--abnormal .time-clock-records-day-dot {
  background: #ef4444;
}

.time-clock-records-day-item strong,
.time-clock-records-day-item span,
.time-clock-records-day-item em {
  display: block;
}

.time-clock-records-day-item strong {
  color: var(--text);
  font-size: 0.95rem;
}

.time-clock-records-day-item span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.time-clock-records-day-item em {
  margin-top: 0.16rem;
  color: #94a3b8;
  font-size: 0.76rem;
  font-style: normal;
}

@media (max-width: 720px) {
  .time-clock-records-body .layout {
    padding: 0.9rem 0.6rem 1.2rem;
  }

  .time-clock-records-card {
    padding: 0.9rem;
    border-radius: 14px;
  }

  .time-clock-records-body .risk-admin-list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .time-clock-records-body .risk-admin-list-actions {
    width: 100%;
    justify-content: stretch;
  }

  .time-clock-records-body .risk-admin-list-actions > * {
    flex: 1 1 auto;
  }

  .time-clock-records-body .time-clock-records-action-btn {
    min-width: 0;
    width: 100%;
  }

  .time-clock-records-mobile {
    display: block;
  }

  .time-clock-records-body .records-table-scroll {
    display: none;
  }

  .time-clock-records-body .records-registry-table {
    font-size: 0.76rem;
  }

  .time-clock-records-body .records-registry-table th,
  .time-clock-records-body .records-registry-table td {
    padding: 0.5rem 0.45rem;
  }
}

.time-clock-side-panel {
  display: grid;
  gap: 0.75rem;
}

.time-clock-side-item {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
}

.time-clock-side-item span {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
}

.time-clock-side-item strong {
  display: block;
  margin-top: 0.32rem;
  color: #111827;
  font-size: 0.94rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .time-clock-board__inner {
    padding: 1.5rem 1.15rem 2rem;
  }

  .time-clock-title {
    font-size: clamp(1.28rem, 5.1vw, 1.6rem);
  }

  .time-clock-title-row {
    gap: 0.55rem;
  }

  .time-clock-submit-row {
    flex-direction: column;
    align-items: stretch;
  }

  .time-clock-submit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .time-clock-draft-btn,
  .time-clock-submit-btn {
    width: 100%;
    min-width: 0;
  }

  .time-clock-completion__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .time-clock-inline-input,
  .time-clock-inline-input--icon {
    grid-template-columns: 1fr;
  }

  .time-clock-icon-btn,
  .time-clock-side-btn {
    width: 100%;
  }

  .time-clock-completion__hero,
  .time-clock-completion__card {
    border-radius: 18px;
  }

  .time-clock-completion__title {
    font-size: 1.2rem;
    line-height: 1.45;
  }

  .time-clock-completion__desc {
    font-size: 0.94rem;
  }

  .time-clock-completion__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .time-clock-completion__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-clock-completion__summary-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .time-clock-completion__card {
    padding: 0.9rem 0.8rem;
  }

  .time-clock-completion__card h4 {
    font-size: 0.96rem;
  }

  .time-clock-completion__summary-item,
  .time-clock-completion__item {
    padding: 0.78rem 0.75rem;
    border-radius: 14px;
  }

  .time-clock-completion__summary-label,
  .time-clock-completion__item-title {
    font-size: 0.92rem;
  }

  .time-clock-completion__summary-value,
  .time-clock-completion__item-meta,
  .time-clock-completion__item span {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .time-clock-completion__actions {
    position: sticky;
    bottom: 0;
    z-index: 40;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 0.15rem;
    padding: 0.7rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(247, 249, 254, 0.08), #f7f9fe 28%);
  }

  .time-clock-completion__actions .toolbar-btn,
  .time-clock-completion__records-btn,
  .time-clock-completion__link {
    width: 100%;
    min-height: 2.9rem;
  }
}

html.is-mobile .time-clock-completion,
body.is-mobile .time-clock-completion,
.time-clock-completion.is-mobile-layout {
  gap: 0.85rem;
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

html.is-mobile .time-clock-completion__grid,
body.is-mobile .time-clock-completion__grid,
.time-clock-completion.is-mobile-layout .time-clock-completion__grid {
  grid-template-columns: 1fr;
}

html.is-mobile .time-clock-completion__summary,
body.is-mobile .time-clock-completion__summary,
.time-clock-completion.is-mobile-layout .time-clock-completion__summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html.is-mobile .time-clock-completion__summary-item:last-child:nth-child(odd),
body.is-mobile .time-clock-completion__summary-item:last-child:nth-child(odd),
.time-clock-completion.is-mobile-layout .time-clock-completion__summary-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

html.is-mobile .time-clock-completion__actions,
body.is-mobile .time-clock-completion__actions,
.time-clock-completion.is-mobile-layout .time-clock-completion__actions {
  position: sticky;
  bottom: 0;
  z-index: 40;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.6rem;
  margin: 0.15rem -0.2rem 0;
  padding: 0.7rem 0.2rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(247, 249, 254, 0.08), #f7f9fe 28%);
}

html.is-mobile .time-clock-completion__records-btn,
html.is-mobile .time-clock-completion__actions .toolbar-btn,
body.is-mobile .time-clock-completion__records-btn,
body.is-mobile .time-clock-completion__actions .toolbar-btn,
.time-clock-completion.is-mobile-layout .time-clock-completion__records-btn,
.time-clock-completion.is-mobile-layout .time-clock-completion__actions .toolbar-btn {
  width: 100%;
  min-height: 2.9rem;
}

.time-clock-helper--desk-intro {
  margin-bottom: 0.5rem;
}

.time-clock-desk-block {
  margin-top: 0.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(239, 246, 255, 0.65);
}

.time-clock-desk-block .time-clock-form-group:first-of-type {
  margin-top: 0;
}

.time-clock-project-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.time-clock-project-wrap:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-clock-project-wrap .time-clock-input {
  flex: 1;
  border: none;
  border-radius: 8px 0 0 8px;
  box-shadow: none;
  min-height: 2.9rem;
  padding-right: 0.5rem;
}

.time-clock-project-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  padding: 0;
  border: 0;
  border-left: 1px solid #e2e8f0;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s, color 0.2s;
}

.time-clock-project-toggle:hover {
  background: #f1f5f9;
  color: #1d4ed8;
}

.time-clock-project-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.time-clock-project-option {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  color: #1e293b;
  font-size: 0.92rem;
  cursor: pointer;
}

.time-clock-project-wrap .time-clock-input {
  text-overflow: ellipsis;
}

.time-clock-project-option:last-child {
  border-bottom: 0;
}

.time-clock-project-option:hover,
.time-clock-project-option.is-active {
  background: rgba(59, 130, 246, 0.08);
}

.time-clock-project-option.is-disabled,
.time-clock-project-option:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.time-clock-project-option.is-disabled:hover,
.time-clock-project-option:disabled:hover {
  background: #ffffff;
}

.time-clock-project-option-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.time-clock-project-option-subtitle {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #475569;
}

.time-clock-project-option-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #64748b;
}

.time-clock-project-option mark {
  background: transparent;
  color: #3b82f6;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.time-clock-project-empty {
  padding: 0.75rem 0.85rem;
  font-size: 0.86rem;
  color: #64748b;
}

.time-clock-project-option--new {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  color: #0f3f8c;
}

.time-clock-project-option-new-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.time-clock-project-option-new-text {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.time-clock-nearby-picker {
  position: relative;
}

.time-clock-nearby-picker__dropdown {
  top: calc(100% + 4px);
  max-height: 320px;
}

.time-clock-nearby-option {
  display: grid;
  gap: 0.18rem;
}

.time-clock-nearby-option__name {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
}

.time-clock-nearby-option__meta {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
  word-break: break-word;
}

/* 工时跨度缩进在项目下，表示「当前所选项目的工时」 */
.time-clock-form-group--desk-project .time-clock-duration-bind {
  margin-top: 0.65rem;
  margin-left: 0.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid rgba(59, 130, 246, 0.35);
}

.time-clock-form-group--desk-project .time-clock-duration-bind .time-clock-label--fieldset {
  font-size: 0.98rem;
  color: #334155;
}

.time-clock-duration-bind--locked {
  opacity: 0.55;
}

.time-clock-detail-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
  align-items: end;
}

.time-clock-detail-cell {
  min-width: 0;
}

.time-clock-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.time-clock-fieldset .time-clock-label {
  padding: 0;
  margin-bottom: 0.5rem;
}

.time-clock-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.5rem 0;
}

.time-clock-radio-row--compact {
  gap: 0.75rem 1rem;
}

.time-clock-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.time-clock-radio-label input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  cursor: pointer;
  accent-color: #3b82f6;
}

.time-clock-datetime-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.65rem;
}

.time-clock-delivery-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.time-clock-delivery-cell {
  min-width: 0;
  flex: 0 1 auto;
}

.time-clock-delivery-cell--content .time-clock-input {
  width: 8em;
}

.time-clock-delivery-cell--stage .time-clock-input {
  width: 15em;
}

.time-clock-delivery-duration {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  white-space: nowrap;
}

.time-clock-delivery-duration .time-clock-radio-row {
  flex-wrap: nowrap;
  align-items: center;
  min-height: 3.1rem;
}

.time-clock-delivery-duration .time-clock-input {
  width: 6rem;
  margin-top: 0;
  margin-left: 0.5rem;
}

.time-clock-delivery-action {
  display: flex;
  flex-direction: column;
}

.time-clock-delivery-action .time-clock-icon-add-line--compact {
  min-height: 3.1rem;
}

.time-clock-icon-add-line--compact {
  min-width: 2.45rem;
  min-height: 2.9rem;
  padding: 0.42rem;
  justify-content: center;
}

.time-clock-icon-add-line--compact:disabled,
.time-clock-icon-add-line--compact:disabled:hover {
  border-color: rgba(203, 213, 225, 0.85);
  background: #f8fafc;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.time-clock-datetime-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem;
  gap: 0.75rem;
  align-items: center;
}

.time-clock-makeup-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: end;
}

.time-clock-makeup-date,
.time-clock-makeup-hour {
  display: grid;
  gap: 0.4rem;
}

.time-clock-makeup-date .time-clock-input {
  min-height: 2.75rem;
}

.time-clock-subday-times {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto 4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.time-clock-subday-sep {
  font-size: 0.92rem;
  color: #64748b;
  white-space: nowrap;
}

.time-clock-input--time {
  min-width: 0;
}

.time-clock-desk-lines-toolbar {
  margin-top: 0.95rem;
}

.time-clock-icon-add-line {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.95rem;
  border: 1px dashed rgba(59, 130, 246, 0.32);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  color: #1d4ed8;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.time-clock-icon-add-line:hover {
  border-color: rgba(37, 99, 235, 0.48);
  background: rgba(239, 246, 255, 0.9);
  color: #1e40af;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.time-clock-icon-add-line:focus-visible {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.time-clock-icon-add-line__svg {
  width: 1.3rem;
  height: 1.3rem;
  flex: 0 0 auto;
}

.time-clock-icon-add-line__label {
  color: #334155;
}

.time-clock-desk-lines-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.time-clock-delivery-report {
  display: none !important;
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
}

.time-clock-report-chat {
  display: grid;
  gap: 1rem;
}

.time-clock-report-chat--embedded {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 18px;
  background: #ffffff;
}

.time-clock-report-chat__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.time-clock-report-chat__topbar-main {
  min-width: 0;
}

.time-clock-report-chat__topbar-main strong {
  display: block;
  color: #111827;
  font-size: 0.98rem;
}

.time-clock-report-chat__topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}

.time-clock-report-chat__body[hidden] {
  display: none;
}

.time-clock-report-chat__messages {
  display: grid;
  gap: 0.7rem;
  max-height: 420px;
  overflow: auto;
  padding: 0.4rem 0;
  background: #ffffff;
}

.time-clock-report-chat__empty {
  color: #64748b;
  font-size: 0.9rem;
  padding: 0.35rem 0.25rem;
}

.time-clock-report-chat__message {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  max-width: min(100%, 88%);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.time-clock-report-chat__message--user {
  justify-self: end;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.time-clock-report-chat__message--assistant {
  justify-self: start;
  background: #fff;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.time-clock-report-chat__message--assistant .time-clock-report-chat__content {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.time-clock-report-chat__role {
  color: #64748b;
  font-size: 0.78rem;
}

.time-clock-report-chat__content {
  color: #1e293b;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.time-clock-report-chat__meta-row {
  display: grid;
  gap: 0.45rem;
}

.time-clock-report-chat__meta-row--standalone {
  margin: 0 0 1rem;
}

.time-clock-report-chat__composer {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.time-clock-report-chat__audio-meta {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.time-clock-report-chat__audio-preview {
  display: grid;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92);
}

.time-clock-report-chat__audio-preview-title {
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.45;
  word-break: break-word;
}

.time-clock-report-chat__audio-player {
  width: 100%;
  min-width: 0;
}

.time-clock-report-chat__input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.time-clock-report-chat__input-wrap {
  position: relative;
  flex: 1 1 auto;
}

.time-clock-report-chat__input {
  min-height: 74px;
  border-radius: 14px;
  padding-right: 3rem;
}

.time-clock-report-chat__voice-toggle {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.time-clock-report-chat__voice-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.time-clock-report-chat__voice-toggle:hover {
  background: rgba(226, 232, 240, 0.7);
  color: #0f172a;
}

.time-clock-report-chat__voice-toggle.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.is-desktop .time-clock-report-chat__voice-toggle {
  display: none;
}

.time-clock-report-chat__send {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 44px;
}

.time-clock-report-chat__send--hold {
  min-width: 108px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.time-clock-report-chat__send--picker {
  min-width: 108px;
}

.time-clock-report-chat__send--hold.is-recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.time-clock-desk-line-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #ffffff;
}

.time-clock-desk-line-item__main {
  min-width: 0;
}

.time-clock-desk-line-item__main strong {
  display: block;
  color: #1e293b;
  font-size: 0.95rem;
}

.time-clock-desk-line-item__meta {
  display: block;
  margin-top: 0.28rem;
  color: #64748b;
  font-size: 0.84rem;
}

.time-clock-desk-line-remove {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: #ffffff;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.time-clock-desk-line-remove:hover {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(254, 242, 242, 0.9);
  color: #dc2626;
}

.time-clock-desk-line-remove:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.time-clock-desk-span-panel .time-clock-form-group:first-child {
  margin-top: 0;
}

@media (max-width: 640px) {
  .time-clock-detail-row {
    grid-template-columns: 1fr;
  }

  .time-clock-delivery-row {
    flex-direction: column;
    align-items: stretch;
  }

  .time-clock-datetime-fields,
  .time-clock-datetime-row,
  .time-clock-makeup-datetime {
    grid-template-columns: 1fr;
  }

  .time-clock-makeup-datetime {
    grid-template-columns: 1fr;
  }

  .time-clock-subday-times {
    grid-template-columns: 1fr;
  }

  .time-clock-subday-sep {
    display: none;
  }

  .time-clock-icon-add-line {
    width: 100%;
    justify-content: center;
  }

  .time-clock-report-chat__topbar {
    flex-direction: column;
  }

  .time-clock-report-chat__topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .time-clock-report-chat__input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .time-clock-report-chat__send {
    width: 100%;
  }

  .time-clock-delivery-duration,
  .time-clock-delivery-action {
    margin-top: 0.5rem;
  }

  .time-clock-delivery-duration .time-clock-input {
    width: 100%;
  }

  .time-clock-delivery-cell--content .time-clock-input,
  .time-clock-delivery-cell--stage .time-clock-input {
    width: 100%;
  }

  .time-clock-desk-line-item {
    align-items: stretch;
  }
}

/* =========================================================================
 * 手机端整体排版适配
 * 触发条件（双保险，二者命中其一即生效）：
 *   1. 视口宽度 ≤ 768px
 *   2. JS 通过 device.js 在 <body> 上加 .is-mobile（覆盖宽屏的移动 UA 场景）
 * 桌面端保持原样，不受任何下面规则影响。
 * ========================================================================= */

@media (max-width: 768px) {
  :root {
    --app-sidebar-width: 0px;
    --app-sidebar-offset: 0px;
  }

  html,
  body {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
  }

  .layout,
  .layout-with-global-sidebar {
    max-width: 100%;
    padding: 0.75rem 0.75rem 2.5rem;
  }

  /* 工时页下拉在手机端保持更紧凑，避免原生选项面板单项过高。 */
  .time-clock-body select.time-clock-input {
    min-height: 2.35rem;
    height: 2.35rem;
    padding: 0 0.72rem;
    font-size: 15px;
    line-height: 1.15;
  }

  .time-clock-body select.time-clock-input option {
    font-size: 14px;
    line-height: 1.1;
    min-height: 2rem;
    padding-block: 0.2rem;
  }

  .time-clock-body select.time-clock-input.time-clock-input--compact-options {
    font-size: 14px;
  }

  .time-clock-body .time-clock-detail-row--login {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
  }

  .time-clock-body .time-clock-detail-row--login .time-clock-label {
    margin-bottom: 0.28rem;
    font-size: 0.88rem;
  }

  .time-clock-body .time-clock-detail-row--login .time-clock-input {
    min-height: 2.7rem;
  }

  .time-clock-body .time-clock-note-toggle {
    cursor: pointer;
  }

  .time-clock-body .time-clock-note-toggle__icon {
    display: inline-flex;
  }

  .time-clock-body .time-clock-note-block.is-collapsed {
    padding-bottom: 0.85rem;
  }

  /* header 整体压缩，减少手机端首屏占用 */
  .header {
    margin-bottom: 0.6rem;
    padding: 0.55rem 0.75rem 0.65rem;
    border-radius: 12px;
  }

  .header h1 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 0 0 0.25rem;
  }

  .sub {
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .dashboard-topbar {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: center;
  }

  .brand-mark {
    max-width: 100%;
  }

  .brand-mark-image {
    height: 40px;
    max-width: min(58vw, 220px);
  }

  .toolbar-user {
    margin-left: auto;
    align-items: flex-end;
    min-width: 0;
    gap: 0;
  }

  .toolbar-user strong {
    font-size: 0.78rem;
  }

  .toolbar-user-desc {
    font-size: 0.66rem;
  }

  /* 顶栏的「用户信息 / 退出登录」之类按钮：行内 wrap，按内容宽度，不再独占整行 */
  .toolbar-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .toolbar-actions .toolbar-btn,
  .toolbar-actions > .toolbar-btn,
  .toolbar-actions > button {
    width: auto;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0.28rem 0.65rem;
    font-size: 0.76rem;
  }

  /* 全局按钮基础尺寸：小一些；具体场景下面再单独放大 */
  .toolbar-btn,
  button.primary {
    padding: 0.38rem 0.75rem;
    font-size: 0.82rem;
    min-height: 34px;
  }

  .header-copy {
    margin-top: 0.4rem;
  }

  .header-copy h1 + .sub {
    margin-top: 0.15rem;
  }

  /* 一级导航：行内 wrap 成多列小药丸，按内容宽度，不再每个独占一行 */
  .page-switch-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 0.75rem;
    gap: 0.35rem;
    overflow: visible;
  }

  .page-switch-row .toolbar-btn,
  .page-switch-row > .toolbar-btn,
  .page-switch-row > a.toolbar-btn,
  .page-switch-row > button.toolbar-btn {
    width: auto;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0.32rem 0.7rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .layout-with-global-sidebar .page-switch-row {
    max-width: 100%;
  }

  .main-with-sidebar,
  .layout-with-global-sidebar .main-with-sidebar {
    flex-direction: column;
    padding: 0;
    gap: 0.75rem;
    min-height: auto;
  }

  .layout-with-global-sidebar .header,
  .layout-with-global-sidebar .footer {
    max-width: 100%;
  }

  /* 全局侧边栏在手机端从「fixed 固定」改为常规文档流，可滚 */
  .sidebar,
  .layout-with-global-sidebar .sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    margin: 0 0 0.75rem;
    padding: 0.4rem 0.5rem;
    z-index: auto;
  }

  .layout-with-global-sidebar .admin-queue-sidebar,
  .records-registry-sidebar {
    position: static;
    right: auto;
    left: auto;
    width: 100%;
    margin: 0.75rem 0 0;
  }

  /* 侧栏导航：在手机端从纵向列表变成横向 wrap 的小药丸，保留一级/二级层次 */
  .sidebar-list,
  .sidebar-list.app-sidebar,
  .sidebar-list.app-sidebar-risk {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    overflow: visible;
    gap: 0.35rem;
    padding-bottom: 0;
    max-height: none;
  }

  /* 一级 item：按内容宽度排成 pill，多到放不下就换行 */
  .sidebar-item {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.32rem 0.7rem;
    font-size: 0.82rem;
    line-height: 1.2;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
  }

  .sidebar-item.is-active {
    box-shadow: none;
  }

  /* 售前评估页：一级父项 + 其下二级子项，作为一组独占整行，明确层级 */
  .sidebar-nav-risk-wrap {
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
    width: 100%;
    gap: 0.35rem;
    margin: 0 0 0.25rem;
  }

  /* 一级父标题：横向占满、底色加深、加粗，作为分组标头 */
  .sidebar-item.sidebar-item--risk-parent {
    display: flex;
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(109, 66, 245, 0.18);
    color: var(--text);
  }

  /* 二级子项容器：横向 wrap、左侧细线 + 缩进，体现父子关系 */
  .sidebar-subnav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.15rem 0 0.15rem 0.6rem;
    margin: 0;
    border-left: 2px solid rgba(109, 66, 245, 0.35);
  }

  .sidebar-item.sidebar-subitem {
    width: auto;
    flex: 0 0 auto;
    padding: 0.24rem 0.6rem;
    font-size: 0.76rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
  }

  /* 多个 sidebar-section 之间留点空隙 */
  .sidebar-section + .sidebar-section {
    margin-top: 0.6rem;
  }

  /* 页面正文里的「二级 / 三级导航 / tab 切换条」：行内 wrap、按内容宽度，不再每个独占一行 */
  .risk-form-switch,
  .hours-admin-switch-actions,
  .mode-switch-actions,
  .delivery-view-switch,
  .delivery-board-controls,
  .delivery-board-controls-cluster,
  .delivery-board-controls-actions,
  .delivery-board-search-row,
  .delivery-board-toolbar-actions,
  .risk-builder-topbar-actions,
  .risk-builder-align-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.35rem;
    overflow: visible;
  }

  /* 把上面所有这些容器内的按钮（不论嵌几层）一律改成按内容宽度的小药丸 */
  .risk-form-switch .toolbar-btn,
  .hours-admin-switch-actions .toolbar-btn,
  .mode-switch-actions .toolbar-btn,
  .mode-switch-actions button,
  .delivery-view-switch .toolbar-btn,
  .delivery-board-controls .toolbar-btn,
  .delivery-board-controls button:not(.delivery-board-fullscreen-btn),
  .delivery-board-controls-cluster .toolbar-btn,
  .delivery-board-controls-actions .toolbar-btn,
  .delivery-board-controls-actions button,
  .delivery-board-search-row .toolbar-btn,
  .delivery-board-search-row button,
  .delivery-board-toolbar-actions .toolbar-btn,
  .delivery-board-toolbar-actions button,
  .risk-builder-topbar-actions .toolbar-btn,
  .risk-builder-topbar-actions button,
  .risk-builder-align-bar .toolbar-btn {
    width: auto !important;
    flex: 0 0 auto !important;
    min-height: 30px;
    padding: 0.26rem 0.6rem;
    font-size: 0.76rem;
    white-space: nowrap;
    border-radius: 10px;
  }

  /* 看板搜索框：占满本行剩余宽度而不是塞在按钮中间被挤掉 */
  .delivery-board-controls .delivery-board-search,
  .delivery-board-search-row .delivery-board-search {
    flex: 1 1 100%;
    min-width: 0;
  }

  .delivery-board-controls .delivery-board-search input,
  .delivery-board-search-row .delivery-board-search input {
    width: 100%;
    min-height: 36px;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-search-main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    gap: 0.35rem;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .delivery-board-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .toolbar-btn {
    flex: 0 0 auto;
    width: auto;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0.35rem;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter,
  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter,
  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    min-height: 2rem;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter > span,
  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter > span {
    display: none;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter select,
  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-multiselect {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar {
    display: flex;
    flex: 1.15 1 0;
    gap: 0.28rem;
  }

  #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 2rem;
    padding-left: 1.7rem;
  }

  /* 顶部 .page-switch-row 已经有同样的一级导航，左侧侧栏里的纯一级导航重复，隐藏掉 */
  .sidebar-list.app-sidebar {
    display: none !important;
  }

  /* 若该 sidebar-section 只剩这条已隐藏的导航，整个区块也隐掉，避免空白卡片 */
  .sidebar-section:has(> .sidebar-list.app-sidebar:only-child) {
    display: none;
  }

  /* 若整个 .sidebar 因此空了，也一起隐掉 */
  .sidebar:has(> .sidebar-section:only-child > .sidebar-list.app-sidebar:only-child) {
    display: none;
  }

  .main-content {
    width: 100%;
    padding: 0;
    gap: 0.75rem;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
    margin-top: 0.75rem;
  }

  .span-2 {
    grid-column: span 1 !important;
  }

  .card {
    padding: 0.9rem 0.95rem;
    border-radius: 10px;
  }

  .card h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .field {
    margin-bottom: 0.75rem;
  }

  .field-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .field-row > .field {
    width: 100%;
  }

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

  /* 输入框 / 下拉 / 文本域，统一占满父级宽度并加大点击区域 */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  textarea,
  select {
    width: 100%;
    min-height: 40px;
    font-size: 16px; /* 防止 iOS Safari 聚焦自动缩放 */
  }

  input[type="range"] {
    width: 100%;
  }

  textarea {
    min-height: 96px;
  }

  .range-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .range-row .hint {
    width: 100%;
  }

  /* 搜索行：输入框单独一行铺满，按钮们行内 wrap、按内容宽度，不再独占行 */
  .search-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.4rem;
  }

  .search-row > input[type="text"],
  .search-row > input[type="search"],
  .search-row > input[type="number"],
  .search-row > select,
  .search-row > textarea {
    flex: 1 1 100%;
    min-width: 0;
    width: auto;
  }

  .search-row > .toolbar-btn,
  .search-row > button {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.38rem 0.95rem;
    font-size: 0.82rem;
  }

  /* 表单底部 actions：行内 wrap，按内容宽度；主按钮稍微宽一点更显眼 */
  .actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
  }

  .actions > .toolbar-btn,
  .actions > button {
    width: auto;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.38rem 0.95rem;
  }

  .actions > button.primary {
    padding: 0.42rem 1.25rem;
  }

  /* 登录页的 actions-stack 是「登录 + 飞书登录」上下排，明确要纵向时保留 100% 宽度 */
  .actions.actions-stack {
    flex-direction: column;
    align-items: stretch;
  }

  .actions.actions-stack > .toolbar-btn,
  .actions.actions-stack > button {
    width: 100%;
  }

  /* 表格在手机端横向滚动，不撑破布局 */
  .card table,
  .main-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* 风险评估 / 项目筹备 编辑器在手机上不宜编辑，整体降级为可读视图 */
  .risk-builder-layout {
    flex-direction: column;
    gap: 0.75rem;
  }

  .risk-builder-sidebar,
  .risk-builder-toolbox,
  .risk-builder-props {
    width: 100%;
    max-width: 100%;
  }

  .risk-builder-canvas {
    min-width: 0;
  }

  .risk-builder-topbar,
  .risk-builder-topbar-actions,
  .risk-builder-align-bar {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  /* 项目搜索结果下拉，宽度铺满 */
  .risk-project-search-dropdown {
    width: 100%;
    left: 0;
    right: 0;
  }

  /* 模态框：占满屏幕、内部可滚动 */
  .modal-panel {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
    overflow-y: auto;
    margin: 0.75rem auto;
    border-radius: 12px;
  }

  /* 我的记录 / 提交记录区块，纵向铺满 */
  .records-registry-section {
    width: 100%;
  }

  /* 工时打卡：原本三列详情、行内时间字段，全部 1 列堆叠 */
  .time-clock-detail-row,
  .time-clock-datetime-fields,
  .time-clock-datetime-row,
  .time-clock-subday-times {
    grid-template-columns: 1fr !important;
  }

  .time-clock-delivery-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* 登录页：单列、宽度跟随屏幕 */
  .auth-grid,
  .auth-grid-single {
    grid-template-columns: 1fr !important;
    padding: 0;
  }

  .auth-panel {
    width: 100%;
    margin: 0;
  }

  .auth-page-header {
    gap: 0.25rem;
    margin-bottom: 0.4rem;
    padding: 0.5rem 0.75rem 0.55rem;
  }

  .auth-brand-image {
    max-width: 128px;
    max-height: 52px;
  }

  .auth-page-header h1 {
    font-size: 1.05rem;
  }

  .footer {
    margin-top: 1.5rem;
    font-size: 0.78rem;
  }
}

/*
 * JS 强制移动端样式（适用于：宽屏 + 移动 UA / 用户手动切换的场景）
 * 仅复制对「整体布局」最关键的 overrides，确保即使视口 > 768px 也能进入手机布局。
 */
body.is-mobile {
  --app-sidebar-width: 0px;
  --app-sidebar-offset: 0px;
}

body.is-mobile .delivery-board-hanging-actions {
  left: 0.35rem;
  top: auto;
  bottom: 1.1rem;
  transform: none;
  width: 2.2rem;
  min-width: 2.2rem;
}

body.is-mobile .layout,
body.is-mobile .layout-with-global-sidebar {
  max-width: 100%;
  padding: 0.75rem 0.75rem 2.5rem;
}

body.is-mobile .main-with-sidebar,
body.is-mobile .layout-with-global-sidebar .main-with-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0.75rem;
  min-height: auto;
}

body.is-mobile .sidebar,
body.is-mobile .layout-with-global-sidebar .sidebar {
  position: static;
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow: visible;
  margin: 0 0 0.75rem;
  z-index: auto;
}

body.is-mobile .layout-with-global-sidebar .admin-queue-sidebar,
body.is-mobile .records-registry-sidebar {
  position: static;
  right: auto;
  left: auto;
  width: 100%;
  margin: 0.75rem 0 0;
}

body.is-mobile .grid {
  grid-template-columns: 1fr !important;
}

body.is-mobile .span-2 {
  grid-column: span 1 !important;
}

body.is-mobile .field-row {
  flex-direction: column;
  gap: 0.6rem;
}

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

body.is-mobile .dashboard-topbar {
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

body.is-mobile .header {
  padding: 0.55rem 0.75rem 0.65rem;
}

body.is-mobile .header h1 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

body.is-mobile .sub {
  font-size: 0.72rem;
}

body.is-mobile .brand-mark {
  font-size: 1rem;
}

body.is-mobile .toolbar-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.3rem;
}

body.is-mobile .toolbar-actions .toolbar-btn,
body.is-mobile .toolbar-actions > .toolbar-btn,
body.is-mobile .toolbar-actions > button {
  width: auto;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0.28rem 0.65rem;
  font-size: 0.76rem;
}

/* 表单 actions：默认行内 wrap，按内容宽度，不再每个按钮独占整行 */
body.is-mobile .actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

body.is-mobile .actions > .toolbar-btn,
body.is-mobile .actions > button {
  width: auto;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.38rem 0.95rem;
}

body.is-mobile .actions > button.primary {
  padding: 0.42rem 1.25rem;
}

body.is-mobile .actions.actions-stack {
  flex-direction: column;
  align-items: stretch;
}

body.is-mobile .actions.actions-stack > .toolbar-btn,
body.is-mobile .actions.actions-stack > button {
  width: 100%;
}

body.is-mobile .search-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem;
}

body.is-mobile .search-row > input[type="text"],
body.is-mobile .search-row > input[type="search"],
body.is-mobile .search-row > input[type="number"],
body.is-mobile .search-row > select,
body.is-mobile .search-row > textarea {
  flex: 1 1 100%;
  min-width: 0;
  width: auto;
}

body.is-mobile .search-row > .toolbar-btn,
body.is-mobile .search-row > button {
  width: auto;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.38rem 0.95rem;
}

body.is-mobile .risk-form-switch,
body.is-mobile .hours-admin-switch-actions,
body.is-mobile .mode-switch-actions,
body.is-mobile .delivery-view-switch,
body.is-mobile .delivery-board-controls,
body.is-mobile .delivery-board-controls-cluster,
body.is-mobile .delivery-board-controls-actions,
body.is-mobile .delivery-board-search-row,
body.is-mobile .delivery-board-toolbar-actions,
body.is-mobile .risk-builder-topbar-actions,
body.is-mobile .risk-builder-align-bar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  padding: 0.35rem;
  overflow: visible;
}

body.is-mobile .risk-form-switch .toolbar-btn,
body.is-mobile .hours-admin-switch-actions .toolbar-btn,
body.is-mobile .mode-switch-actions .toolbar-btn,
body.is-mobile .mode-switch-actions button,
body.is-mobile .delivery-view-switch .toolbar-btn,
body.is-mobile .delivery-board-controls .toolbar-btn,
body.is-mobile .delivery-board-controls button:not(.delivery-board-fullscreen-btn),
body.is-mobile .delivery-board-controls-cluster .toolbar-btn,
body.is-mobile .delivery-board-controls-actions .toolbar-btn,
body.is-mobile .delivery-board-controls-actions button,
body.is-mobile .delivery-board-search-row .toolbar-btn,
body.is-mobile .delivery-board-search-row button,
body.is-mobile .delivery-board-toolbar-actions .toolbar-btn,
body.is-mobile .delivery-board-toolbar-actions button,
body.is-mobile .risk-builder-topbar-actions .toolbar-btn,
body.is-mobile .risk-builder-topbar-actions button,
body.is-mobile .risk-builder-align-bar .toolbar-btn {
  width: auto !important;
  flex: 0 0 auto !important;
  min-height: 30px;
  padding: 0.26rem 0.6rem;
  font-size: 0.76rem;
  white-space: nowrap;
  border-radius: 10px;
}

body.is-mobile .delivery-board-controls .delivery-board-search,
body.is-mobile .delivery-board-search-row .delivery-board-search {
  flex: 1 1 100%;
  min-width: 0;
}

body.is-mobile .delivery-board-controls .delivery-board-search input,
body.is-mobile .delivery-board-search-row .delivery-board-search input {
  width: 100%;
  min-height: 36px;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  flex: 1 1 auto !important;
  width: 100%;
  min-width: 0;
  gap: 0.35rem;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .delivery-board-search,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .delivery-board-search {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .toolbar-btn,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main .toolbar-btn,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main #btn_search_delivery_board,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main #btn_search_delivery_board,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main #btn_extend_delivery_board_week,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-search-main #btn_extend_delivery_board_week {
  flex: 0 0 auto !important;
  width: auto !important;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  padding: 0.15rem 0.35rem 0.35rem;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  min-height: 2rem;
  gap: 0.28rem;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter > span,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter > span,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter > span,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-filter > span {
  display: none;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter select,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-month-filter select,
html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-multiselect,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-group-multiselect {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toolbar {
  display: flex;
  flex: 1.15 1 0;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toggle,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-toggle {
  min-width: 0;
  padding: 0.26rem 0.45rem;
  font-size: 0.74rem;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-select-wrap,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-select-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

html.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-select,
body.is-mobile #prep_delivery_panel.is-delivery-mode .delivery-board-heading-center .delivery-paint-select {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 2rem;
  padding-left: 1.7rem;
}

body.is-mobile .sidebar-list.app-sidebar {
  display: none !important;
}

body.is-mobile .sidebar-section:has(> .sidebar-list.app-sidebar:only-child) {
  display: none;
}

body.is-mobile .sidebar:has(> .sidebar-section:only-child > .sidebar-list.app-sidebar:only-child) {
  display: none;
}

body.is-mobile .page-switch-row {
  flex-direction: row;
  flex-wrap: wrap;
  overflow: visible;
  gap: 0.35rem;
}

body.is-mobile .page-switch-row .toolbar-btn {
  width: auto;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.32rem 0.7rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

body.is-mobile .sidebar-list,
body.is-mobile .sidebar-list.app-sidebar,
body.is-mobile .sidebar-list.app-sidebar-risk {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: visible;
  gap: 0.35rem;
  max-height: none;
}

body.is-mobile .sidebar-item {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.32rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

body.is-mobile .sidebar-nav-risk-wrap {
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  width: 100%;
  gap: 0.35rem;
  margin: 0 0 0.25rem;
}

body.is-mobile .sidebar-item.sidebar-item--risk-parent {
  display: flex;
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0.3rem 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  background: rgba(109, 66, 245, 0.18);
  color: var(--text);
}

/* 工时打卡工具条：第1行=视图+本月/本周/当日+搜索；第2行=筛选，压缩高度给明细 */
.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem 0.5rem;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  justify-self: stretch;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-view-switch {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  grid-column: auto !important;
  order: 1;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
  align-items: center;
  gap: 0.35rem;
  order: 2;
  grid-column: auto !important;
  grid-row: auto !important;
  padding: 0 !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
  align-items: center;
  gap: 0.35rem;
  order: 3;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search {
  flex: 0 0 auto !important;
  width: 11rem !important;
  min-width: 9rem !important;
  max-width: 11rem !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search input {
  width: 100% !important;
  min-width: 0 !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .toolbar-btn,
.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row button {
  flex: 0 0 auto !important;
  width: auto !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-secondary-nav--sublevel {
  flex: 1 0 100% !important;
  order: 4;
  width: 100% !important;
  max-width: 100% !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

.delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-heading-center {
  display: none !important;
}

body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])),
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-view-switch,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
  flex-wrap: wrap !important;
  width: 100%;
  max-width: 100%;
}

body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search {
  flex: 0 0 auto !important;
  width: 9.5rem !important;
  min-width: 8rem !important;
  max-width: 9.5rem !important;
}

body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-secondary-nav--sublevel {
  flex: 1 0 100% !important;
  width: 100% !important;
}

body.is-mobile .sidebar-subnav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.15rem 0 0.15rem 0.6rem;
  margin: 0;
  border-left: 2px solid rgba(109, 66, 245, 0.35);
}

body.is-mobile .sidebar-item.sidebar-subitem {
  width: auto;
  flex: 0 0 auto;
  padding: 0.24rem 0.6rem;
  font-size: 0.76rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

body.is-mobile .risk-builder-layout {
  flex-direction: column;
}

@media (max-width: 640px) {
  .time-clock-inline-input--location .time-clock-side-btn {
    min-width: 5.4rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .time-clock-fetch-locate-btn {
    min-height: 4rem;
    min-width: 7.8rem;
    font-size: 1rem;
  }

  .time-clock-form-group--nearby-entity #nearby_entity {
    font-size: 0.9rem;
  }

  .time-clock-form-group--nearby-entity .time-clock-helper,
  .time-clock-form-group--nearby-entity .status {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .time-clock-form-group--nearby-entity #nearby_entity_search {
    font-size: 0.88rem;
  }

  .time-clock-form-group--nearby-entity .time-clock-nearby-option__name {
    font-size: 0.9rem;
  }

  .time-clock-form-group--nearby-entity .time-clock-nearby-option__meta {
    font-size: 0.76rem;
  }

  .time-clock-delivery-row {
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 0.45rem;
    align-items: end;
  }

  .time-clock-delivery-action {
    grid-column: 1;
    margin-top: 0;
  }

  .time-clock-delivery-cell--content {
    grid-column: 2;
  }

  .time-clock-delivery-cell--stage {
    grid-column: 3;
  }

  .time-clock-delivery-cell .time-clock-sublabel,
  .time-clock-delivery-duration .time-clock-sublabel {
    margin-bottom: 0.28rem;
    font-size: 0.82rem;
  }

  .time-clock-delivery-cell--content .time-clock-input,
  .time-clock-delivery-cell--stage .time-clock-input {
    width: 100%;
    font-size: 0.9rem;
  }

  .time-clock-form-group--entry-action .time-clock-radio-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.35rem 0.7rem;
  }

  .time-clock-form-group--entry-action .time-clock-radio-label {
    gap: 0.28rem;
    font-size: 0.86rem;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
  }

  .time-clock-form-group--entry-action .time-clock-radio-label input[type="radio"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
  }

  .time-clock-delivery-duration {
    grid-column: 1 / -1;
    margin-top: 0.35rem;
  }

  .time-clock-delivery-duration .time-clock-radio-row {
    flex-wrap: wrap;
    min-height: 0;
    gap: 0.55rem 0.8rem;
  }

  .time-clock-delivery-duration .time-clock-radio-label {
    font-size: 0.9rem;
  }

  .time-clock-delivery-duration .time-clock-input {
    width: 5.6rem;
    margin-left: 0;
  }

  .time-clock-icon-add-line--compact {
    width: 2.65rem;
    min-width: 2.65rem;
  }
}

body.is-mobile .time-clock-inline-input--location .time-clock-side-btn {
  min-width: 5.4rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

/* 需高于上一段对 .time-clock-side-btn 的 min-width，否则“获取定位”在移动端会被压回 5.4rem */
body.is-mobile .time-clock-inline-input--location .time-clock-fetch-locate-btn {
  min-height: 4rem;
  min-width: 7.8rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

body.is-mobile .time-clock-form-group--nearby-entity #nearby_entity {
  font-size: 0.9rem;
}

body.is-mobile .time-clock-form-group--nearby-entity .time-clock-helper,
body.is-mobile .time-clock-form-group--nearby-entity .status {
  font-size: 0.84rem;
  line-height: 1.45;
}

body.is-mobile .time-clock-form-group--nearby-entity #nearby_entity_search {
  font-size: 0.88rem;
}

body.is-mobile .time-clock-form-group--nearby-entity .time-clock-nearby-option__name {
  font-size: 0.9rem;
}

body.is-mobile .time-clock-form-group--nearby-entity .time-clock-nearby-option__meta {
  font-size: 0.76rem;
}

body.is-mobile.time-clock-body select.time-clock-input {
  min-height: 2.35rem;
  height: 2.35rem;
  padding: 0 0.72rem;
  font-size: 15px;
  line-height: 1.15;
}

body.is-mobile.time-clock-body select.time-clock-input option {
  font-size: 14px;
  line-height: 1.1;
  min-height: 2rem;
  padding-block: 0.2rem;
}

body.is-mobile.time-clock-body select.time-clock-input.time-clock-input--compact-options {
  font-size: 14px;
}

body.is-mobile .time-clock-detail-row--login {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 0.65rem;
  align-items: start;
}

body.is-mobile .time-clock-detail-row--login .time-clock-label {
  margin-bottom: 0.28rem;
  font-size: 0.88rem;
}

body.is-mobile .time-clock-detail-row--login .time-clock-input {
  min-height: 2.7rem;
}

body.is-mobile .time-clock-note-toggle {
  cursor: pointer;
}

body.is-mobile .time-clock-note-toggle__icon {
  display: inline-flex;
}

body.is-mobile .time-clock-note-block.is-collapsed {
  padding-bottom: 0.85rem;
}

body.is-mobile .time-clock-delivery-row {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0.45rem;
  align-items: end;
}

body.is-mobile .time-clock-delivery-action {
  grid-column: 1;
  margin-top: 0;
}

body.is-mobile .time-clock-delivery-cell--content {
  grid-column: 2;
}

body.is-mobile .time-clock-delivery-cell--stage {
  grid-column: 3;
}

body.is-mobile .time-clock-delivery-cell .time-clock-sublabel,
body.is-mobile .time-clock-delivery-duration .time-clock-sublabel {
  margin-bottom: 0.28rem;
  font-size: 0.82rem;
}

body.is-mobile .time-clock-delivery-cell--content .time-clock-input,
body.is-mobile .time-clock-delivery-cell--stage .time-clock-input {
  width: 100%;
  font-size: 0.9rem;
}

body.is-mobile .time-clock-form-group--entry-action .time-clock-radio-row {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.35rem 0.7rem;
}

.prep-tc-makeup-decision {
  min-height: 1.7rem;
  padding: 0.12rem 0.55rem;
  margin-left: 0.28rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

body.is-mobile .time-clock-form-group--entry-action .time-clock-radio-label {
  gap: 0.28rem;
  font-size: 0.86rem;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

body.is-mobile .time-clock-form-group--entry-action .time-clock-radio-label input[type="radio"] {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

body.is-mobile .time-clock-delivery-duration {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
}

body.is-mobile .time-clock-delivery-duration .time-clock-radio-row {
  flex-wrap: wrap;
  min-height: 0;
  gap: 0.55rem 0.8rem;
}

body.is-mobile .time-clock-delivery-duration .time-clock-radio-label {
  font-size: 0.9rem;
}

body.is-mobile .time-clock-delivery-duration .time-clock-input {
  width: 5.6rem;
  margin-left: 0;
}

body.is-mobile .time-clock-icon-add-line--compact {
  width: 2.65rem;
  min-width: 2.65rem;
}

@media (max-width: 768px) {
  .time-clock-delivery-row {
    position: relative;
    grid-template-columns: 2.65rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.8rem;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  }

  .time-clock-delivery-action {
    align-self: end;
  }

  .time-clock-delivery-action .time-clock-sublabel {
    display: none;
  }

  .time-clock-delivery-action .time-clock-icon-add-line--compact {
    min-height: 2.35rem;
    border-color: rgba(59, 130, 246, 0.34);
    background: #ffffff;
  }

  .time-clock-delivery-duration {
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(59, 130, 246, 0.26);
  }

  .time-clock-delivery-duration .time-clock-sublabel {
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
  }

  .time-clock-delivery-duration .time-clock-sublabel::before {
    content: "这条明细按";
  }
}

body.is-mobile .time-clock-delivery-row {
  position: relative;
  grid-template-columns: 2.65rem minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

body.is-mobile .time-clock-delivery-action {
  align-self: end;
}

body.is-mobile .time-clock-delivery-action .time-clock-sublabel {
  display: none;
}

body.is-mobile .time-clock-delivery-action .time-clock-icon-add-line--compact {
  min-height: 2.35rem;
  border-color: rgba(59, 130, 246, 0.34);
  background: #ffffff;
}

body.is-mobile .time-clock-delivery-duration {
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(59, 130, 246, 0.26);
}

body.is-mobile .time-clock-delivery-duration .time-clock-sublabel {
  display: block;
  margin-bottom: 0.35rem;
  color: #64748b;
}

body.is-mobile .time-clock-delivery-duration .time-clock-sublabel::before {
  content: "这条明细按";
}

.time-clock-outsource-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.time-clock-outsource-login__card {
  width: min(100%, 430px);
  display: grid;
  gap: 1rem;
  padding: 2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(59, 79, 134, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.time-clock-outsource-login__card h2,
.time-clock-outsource-login__card p {
  margin: 0;
}

.time-clock-outsource-login__card label {
  display: grid;
  gap: 0.45rem;
  color: #334155;
  font-weight: 700;
}

.time-clock-outsource-login__badge {
  justify-self: start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 800;
  font-size: 0.82rem;
}

.time-clock-outsource-login__hint {
  color: #64748b;
  font-size: 0.9rem;
}

.time-clock-identity-checks {
  display: grid;
  gap: 0.7rem;
}

.time-clock-outsource-login__card .time-clock-identity-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: #1e293b;
}

.time-clock-outsource-login__card .time-clock-identity-check input {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

.time-clock-identity-panel {
  display: grid;
  gap: 0.85rem;
}

.time-clock-identity-panel[hidden] {
  display: none;
}

.time-clock-identity-panel .toolbar-btn {
  justify-self: start;
}

body.is-time-clock-partner .app-sidebar,
body.is-time-clock-partner .page-switch-row {
  display: none;
}


@media (max-width: 640px) {
  .time-clock-local-project-modal {
    align-items: flex-end;
    padding: 0;
  }

  .time-clock-local-project-modal__panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
  }

  .time-clock-attendance-modal {
    align-items: flex-end;
    padding: 0;
  }

  .time-clock-attendance-modal__panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 18px 18px 0 0;
  }
}

.time-clock-records-row--missing td {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #fecaca;
}

.time-clock-records-row--missing:hover td {
  background: rgba(239, 68, 68, 0.22) !important;
}

.time-clock-records-missing-badge,
.time-clock-records-ok-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.time-clock-records-missing-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.time-clock-records-ok-badge {
  background: rgba(61, 139, 253, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.time-clock-records-makeup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  margin-right: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.time-clock-records-makeup-link:hover {
  background: #b91c1c;
  color: #ffffff;
}

.time-clock-records-day-item--missing {
  background: #fff1f2;
  border: 1px solid #fecaca;
}

.time-clock-records-day-item--missing .time-clock-records-day-dot {
  background: #dc2626;
}


/* 验收看板分组视图与手机端展示 */
.prep-acceptance-group-list { display: grid; gap: .85rem; }
.prep-acceptance-group-card { border: 1px solid rgba(148, 163, 184, .16); border-radius: 14px; overflow: hidden; background: rgba(15,23,42,.35); }
.prep-acceptance-group-card > header { display:flex; justify-content:space-between; align-items:center; gap:.75rem; padding:.75rem 1rem; background:rgba(15,23,42,.55); }
.prep-acceptance-group-card h3 { margin:0; font-size:1rem; }
.prep-acceptance-group-card > header span { color:var(--muted); font-size:.82rem; white-space:nowrap; }
.prep-acceptance-table--compact { min-width: 44rem; }
@media (max-width: 640px) {
  .prep-acceptance-board-shell { gap: .65rem; }
  .prep-acceptance-summary-card, .prep-acceptance-filter-shell { padding: .75rem; }
  .prep-acceptance-group-card > header { align-items:flex-start; padding:.7rem .75rem; }
  .prep-acceptance-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .prep-acceptance-table--compact { min-width: 36rem; }
}

.prep-acceptance-scope-controls {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0;
  padding: .35rem .6rem;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 8px;
}
.prep-acceptance-scope-controls legend { padding: 0 .25rem; color: var(--muted); font-size: .78rem; }
.prep-acceptance-scope-controls label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; white-space: nowrap; }
.prep-acceptance-scope-controls__manager { margin-left: .25rem; padding-left: .65rem; border-left: 1px solid rgba(148, 163, 184, .24); }

/* 验收看板：项目经理多选下拉与项目信息气泡列表 */
#prep_delivery_panel.is-project-acceptance-mode .delivery-board-search-row { display: none; }

/* 项目资源看板：同步飞书验收会视图后的宽表与颜色标签 */
#prep_delivery_panel.is-project-resource-mode .delivery-view-switch,
#prep_delivery_panel.is-project-resource-mode #prep_delivery_month_filter,
#prep_delivery_panel.is-project-resource-mode .delivery-paint-toolbar,
#prep_delivery_panel.is-project-resource-mode .delivery-board-heading-center {
  display: none;
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-controls-cluster {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
#prep_delivery_panel.is-project-resource-mode > .delivery-board-controls {
  position: relative;
  z-index: 6;
  overflow: visible;
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-search-row {
  grid-column: 1 / -1;
  grid-row: auto;
  justify-self: stretch;
  justify-content: flex-start;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
}
.prep-resource-filter-toolbar {
  display: contents;
}
.prep-resource-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}
.prep-resource-filters[hidden] {
  display: none !important;
}
.prep-resource-table-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  height: 2.2rem;
  margin-left: auto;
  padding: 0 0.15rem;
  color: var(--text);
  font-size: 0.88rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.prep-resource-table-mode-toggle input[type="checkbox"] {
  margin: 0;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  accent-color: var(--header-muted, #5c4632);
  cursor: pointer;
}
.prep-resource-table-mode-toggle[hidden] {
  display: none !important;
}
.prep-resource-filter-group {
  position: relative;
  flex: 0 0 auto;
}
.prep-resource-filter-group[data-prep-resource-filter-group="top_product_line"] > summary {
  max-width: 13rem;
}
.prep-resource-filter-group > summary {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: max-content;
  min-width: 0;
  max-width: 10.5rem;
  min-height: 2.2rem;
  height: 2.2rem;
  padding: 0 0.7rem 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 2.2rem;
  cursor: pointer;
  white-space: nowrap;
}
.prep-resource-filter-summary-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep-resource-filter-group[open] > summary {
  border-color: var(--accent);
}
.prep-resource-filter-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: max(12rem, 100%);
  max-width: 18rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 10px 24px rgba(15, 20, 25, 0.16);
}
.prep-resource-filter-actions {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.prep-resource-filter-actions .toolbar-btn {
  min-height: 1.7rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
}
.prep-resource-filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  max-height: 16rem;
  overflow-y: auto;
}
.prep-resource-filter-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.7rem;
  padding: 0.1rem 0.2rem;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--text);
}
.prep-resource-filter-option input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}
.prep-resource-filter-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.prep-resource-filter-color-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  flex: 0 0 auto;
  background: var(--surface-muted, #f4f4f5);
}
.prep-resource-filter-color-swatch.is-red {
  background: #f76964;
}
.prep-resource-filter-color-swatch.is-yellow {
  background: #ffc60a;
}
.prep-resource-filter-color-swatch.is-green {
  background: #52c41a;
}
.prep-resource-filter-option-count {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prep-resource-sidebar-stats {
  gap: 0.95rem;
}
#prep_resource_stats_sidebar.delivery-sidebar-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.15rem 0.15rem 0.35rem;
}
#prep_resource_stats_sidebar .sidebar-header {
  padding: 0.35rem 0.2rem 0.55rem;
}
#prep_resource_stats_sidebar .sidebar-header h2 {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 650;
}
.prep-resource-sidebar-stat {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.prep-resource-sidebar-stat__label,
.prep-resource-sidebar-stat__helper {
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-resource-sidebar-stat strong {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
#prep_resource_stats_sidebar.is-compact-rows .prep-resource-sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
#prep_resource_stats_sidebar.is-compact-rows .prep-resource-sidebar-stat {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.6rem;
}
#prep_resource_stats_sidebar.is-compact-rows .prep-resource-sidebar-stat strong {
  font-size: 1rem;
}
#prep_resource_stats_sidebar.is-compact-rows .prep-resource-sidebar-stat__helper {
  display: none;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table tbody tr.delivery-row--selected td,
#prep_delivery_panel.is-project-resource-mode .prep-resource-table tbody tr.delivery-row--selected:nth-child(even) td,
#prep_delivery_panel.is-project-resource-mode .prep-resource-table tbody tr.delivery-row--selected:hover td {
  background: color-mix(in srgb, #1677ff 18%, var(--surface)) !important;
  box-shadow:
    inset 0 1px 0 rgba(22, 119, 255, 0.28),
    inset 0 -1px 0 rgba(22, 119, 255, 0.28);
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table tbody tr.delivery-row--selected td:first-child {
  box-shadow:
    inset 3px 0 0 #1677ff,
    inset 0 1px 0 rgba(22, 119, 255, 0.28),
    inset 0 -1px 0 rgba(22, 119, 255, 0.28);
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
#prep_delivery_panel.is-project-preparation-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  overflow: hidden;
  min-height: 0;
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > * {
  flex: 1 1 0%;
  min-height: 0;
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-resource-board-shell,
#prep_delivery_panel.is-project-preparation-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .project-preparation-board-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.prep-resource-board-shell {
  min-height: 0;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table,
#prep_delivery_panel.is-project-resource-mode .prep-resource-table.prep-acceptance-table,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table.prep-acceptance-table {
  width: 100%;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-resource-mode:fullscreen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-resource-mode:-webkit-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-resource-mode:-moz-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-resource-mode.is-fullscreen-active .prep-resource-table-wrap,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-preparation-mode:fullscreen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-preparation-mode:-webkit-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-preparation-mode:-moz-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-preparation-mode.is-fullscreen-active .prep-resource-table-wrap {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 0;
  max-height: none;
  overflow-x: scroll !important;
  overflow-y: scroll !important;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  border: 1px solid var(--border);
  border-radius: 12px;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table-wrap.is-panning,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table-wrap.is-panning {
  cursor: grabbing;
  user-select: none;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table-wrap::-webkit-scrollbar,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table-wrap::-webkit-scrollbar-thumb,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 38%, transparent);
}
#prep_delivery_panel.is-project-resource-mode .prep-resource-table-wrap::-webkit-scrollbar-track,
#prep_delivery_panel.is-project-preparation-mode .prep-resource-table-wrap::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.prep-resource-region {
  display: grid;
  gap: 0.75rem;
}
.prep-resource-region__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.prep-resource-region__head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.prep-resource-region__head span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.prep-resource-table-wrap {
  overflow: scroll;
}
.prep-resource-group-row td,
.prep-resource-table td.prep-resource-group-cell,
.prep-acceptance-table tr.prep-resource-group-row td:last-child {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  text-align: left;
  vertical-align: middle;
  overflow: visible;
}
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--region td,
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--region:nth-child(even) td,
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--region:hover td {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--text);
}
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--manager td,
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--manager:nth-child(even) td,
#prep_delivery_panel .prep-resource-table tbody tr.prep-resource-group-row--manager:hover td {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text);
}
.prep-resource-group-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  position: sticky;
  left: 0;
  width: max-content;
  max-width: none;
  min-height: 2rem;
  margin: 0;
  padding: 0.4rem 0.75rem 0.4rem 0.55rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.prep-resource-group-row--manager .prep-resource-group-toggle {
  padding-left: 0.55rem;
}
.prep-resource-group-chevron {
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.prep-resource-group-row.is-collapsed .prep-resource-group-chevron {
  transform: rotate(-45deg);
}
.prep-resource-group-kind {
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-resource-group-toggle strong {
  font-size: 0.92rem;
}
.prep-resource-group-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.prep-resource-mobile-shell {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.prep-resource-mobile-home {
  display: grid;
  gap: 0.65rem;
  padding-bottom: 1.25rem;
}
.prep-resource-mobile-group {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.prep-resource-mobile-group--manager {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
.prep-resource-mobile-group.is-collapsed .prep-resource-group-chevron {
  transform: rotate(-45deg);
}
.prep-resource-mobile-group .prep-resource-group-toggle {
  position: static;
  width: 100%;
  max-width: none;
  padding: 0.55rem 0.75rem;
}
.prep-resource-mobile-project-wrap {
  min-width: 0;
}
.prep-resource-mobile-project {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0.35rem 0.9rem color-mix(in srgb, var(--text) 6%, transparent);
}
.prep-resource-mobile-project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.prep-resource-mobile-project.is-red {
  border-color: color-mix(in srgb, #f76964 42%, var(--border));
}
.prep-resource-mobile-project.is-yellow {
  border-color: color-mix(in srgb, #ffc60a 48%, var(--border));
}
.prep-resource-mobile-project.is-green {
  border-color: color-mix(in srgb, #52c41a 42%, var(--border));
}
.prep-resource-mobile-project__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}
.prep-resource-mobile-project__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}
.prep-resource-mobile-project__head .prep-resource-color-fill {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  min-height: 1.15rem;
  border-radius: 999px;
}
.prep-resource-mobile-bubbles {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.32rem;
  max-height: calc((1.65rem * 3) + (0.32rem * 2));
  overflow: hidden;
}
.prep-resource-mobile-bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  min-height: 1.65rem;
  max-height: 1.65rem;
  padding: 0 0.55rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
  font-size: 0.75rem;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
}
.prep-resource-mobile-bubble b {
  color: var(--muted);
  font-weight: 600;
}
.prep-resource-mobile-bubble em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
}
.prep-resource-mobile-bubble.is-empty {
  color: var(--muted);
}
.prep-resource-mobile-bubble.is-red {
  border-color: color-mix(in srgb, #f76964 45%, var(--border));
  background: color-mix(in srgb, #f76964 16%, var(--surface));
}
.prep-resource-mobile-bubble.is-yellow {
  border-color: color-mix(in srgb, #ffc60a 50%, var(--border));
  background: color-mix(in srgb, #ffc60a 18%, var(--surface));
}
.prep-resource-mobile-bubble.is-green {
  border-color: color-mix(in srgb, #52c41a 45%, var(--border));
  background: color-mix(in srgb, #52c41a 16%, var(--surface));
}

.delivery-time-mobile-shell {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  padding-bottom: 1.2rem;
}
.delivery-time-mobile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}
.delivery-time-mobile-bubble {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  min-height: 3.15rem;
  margin: 0;
  padding: 0.28rem 0.5rem 0.28rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 94%, var(--accent) 6%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.delivery-time-mobile-bubble__index {
  flex: 0 0 1.6rem;
  width: 1.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}
.delivery-time-mobile-bubble__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
}
.delivery-time-mobile-bubble:focus-visible,
.delivery-time-mobile-bubble.is-selected {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.delivery-time-mobile-bubble.is-normal {
  background: color-mix(in srgb, #ffe34d 22%, var(--surface));
}
.delivery-time-mobile-bubble.is-busy {
  background: color-mix(in srgb, #ef4444 18%, var(--surface));
}
.delivery-time-mobile-bubble.is-vacation {
  background: color-mix(in srgb, #39d353 16%, var(--surface));
}
.delivery-time-mobile-bubble.is-office {
  background: color-mix(in srgb, #2f6fff 16%, var(--surface));
}
.delivery-time-mobile-bubble__line1,
.delivery-time-mobile-bubble__line2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-time-mobile-bubble__line1 {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}
.delivery-time-mobile-bubble__line2 {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}
.delivery-time-mobile-add-employee {
  width: 100%;
}
.delivery-time-mobile-card {
  display: grid;
  gap: 0.7rem;
}
.delivery-time-mobile-card__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.1rem 0.55rem;
  background: var(--surface);
}
.delivery-time-mobile-status-select.delivery-cell,
.delivery-time-mobile-status-select.delivery-cell-select {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 4.6rem;
  max-width: 6.2rem;
  min-height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.2;
}
.delivery-time-mobile-status-select.delivery-cell--normal {
  background: color-mix(in srgb, #ffe34d 22%, var(--surface));
  color: var(--text);
}
.delivery-time-mobile-status-select.delivery-cell--busy {
  background: color-mix(in srgb, #ef4444 16%, var(--surface));
  color: var(--text);
}
.delivery-time-mobile-status-select.delivery-cell--vacation {
  background: color-mix(in srgb, #39d353 16%, var(--surface));
  color: var(--text);
}
.delivery-time-mobile-status-select.delivery-cell--office {
  background: color-mix(in srgb, #2f6fff 16%, var(--surface));
  color: var(--text);
}
.delivery-time-mobile-status-select.delivery-cell--empty {
  color: var(--muted);
}
.delivery-time-mobile-card__titles {
  min-width: 0;
  flex: 1 1 auto;
}
.delivery-time-mobile-card__titles h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}
.delivery-time-mobile-card__titles .small {
  margin: 0.15rem 0 0;
}
.delivery-time-mobile-month-picker,
.delivery-time-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.delivery-time-mobile-month-picker {
  justify-content: flex-start;
}
.delivery-time-mobile-month-picker select {
  min-width: 8rem;
  min-height: 2.1rem;
}
.delivery-time-mobile-selected {
  margin: 0;
}
.delivery-time-mobile-weekdays,
.delivery-time-mobile-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.22rem;
}
.delivery-time-mobile-weekdays span {
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}
.delivery-time-mobile-day {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-height: 3.6rem;
  margin: 0;
  padding: 0.28rem 0.22rem;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
}
.delivery-time-mobile-day--pad {
  border: 0;
  background: transparent;
  min-height: 0;
  pointer-events: none;
}
.delivery-time-mobile-day.is-weekend {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.28);
}
.delivery-time-mobile-day.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.delivery-time-mobile-day__date {
  font-size: 0.7rem;
  font-weight: 700;
}
.delivery-time-mobile-day__value {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.68rem;
  line-height: 1.25;
}
.delivery-time-mobile-actions {
  flex-wrap: wrap;
}
.delivery-time-mobile-actions .toolbar-btn {
  flex: 1 1 6.5rem;
}
.delivery-time-mobile-form {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}
.delivery-time-mobile-form.is-hidden {
  display: none;
}
.delivery-time-mobile-field {
  display: grid;
  gap: 0.28rem;
  margin: 0;
}
.delivery-time-mobile-field input,
.delivery-time-mobile-field select {
  min-height: 2.3rem;
  width: 100%;
}
.delivery-time-mobile-search-dropdown {
  display: grid;
  gap: 0.2rem;
  max-height: 12rem;
  overflow: auto;
}
.delivery-time-mobile-search-empty,
.delivery-time-mobile-search-option {
  padding: 0.45rem 0.5rem;
  text-align: left;
}
.delivery-time-mobile-search-option {
  display: grid;
  gap: 0.12rem;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
  color: inherit;
}
.delivery-time-mobile-search-option em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}
.prep-resource-mobile-detail {
  display: grid;
  gap: 0.7rem;
  padding: 0 0 1.25rem;
}
.prep-resource-mobile-detail__bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.45rem 0.15rem 0.55rem;
  background: var(--surface);
}
.prep-resource-mobile-back,
.prep-resource-mobile-detail__bar .prep-resource-mobile-back.toolbar-btn {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 4.8rem;
  min-height: 2.1rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
}
.prep-resource-mobile-detail__titles {
  min-width: 0;
  flex: 1 1 auto;
}
.prep-resource-mobile-detail__titles h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-resource-mobile-detail__titles .small {
  margin: 0.1rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-resource-mobile-detail__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  padding: 0 0.15rem 0.15rem;
}
.prep-resource-mobile-detail__list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0.1rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 6%);
  box-shadow: 0 0.18rem 0.55rem color-mix(in srgb, var(--accent) 10%, transparent);
}
.prep-resource-mobile-detail__row {
  display: grid !important;
  grid-template-columns: 7.1rem minmax(0, 1fr) !important;
  gap: 0.25rem 0.55rem;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--border);
}
.prep-resource-mobile-detail__row:last-child {
  border-bottom: 0;
}
.prep-resource-mobile-detail__row dt {
  margin: 0;
  color: color-mix(in srgb, var(--text) 78%, var(--accent));
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
}
.prep-resource-mobile-detail__row dd {
  display: flex;
  align-items: center;
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.prep-resource-mobile-detail__row .prep-resource-date-input,
.prep-resource-mobile-detail__row .prep-resource-issue-date-input,
.prep-resource-mobile-detail__row .prep-resource-text-input {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: 1.85rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0 0.35rem;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.prep-resource-mobile-detail__row .prep-resource-phase-select,
.prep-resource-mobile-detail__row .prep-resource-fae-select {
  display: inline-block;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: 1.85rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  appearance: auto;
  -webkit-appearance: menulist;
}
.prep-resource-mobile-detail__row .prep-color-status-picker,
.prep-resource-mobile-detail__row .prep-color-status-picker-trigger,
.prep-resource-mobile-detail__row .prep-color-status-swatch,
.prep-resource-mobile-detail__row .prep-resource-color-fill {
  width: 3.1rem;
  min-width: 3.1rem;
  max-width: 3.1rem;
  min-height: 1.35rem;
  height: 1.35rem;
  border-radius: 5px;
}
.prep-resource-mobile-detail__row .prep-resource-progress-view-btn {
  width: auto;
  min-height: 1.75rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
}
.prep-resource-mobile-detail__row .prep-resource-tag-list,
.prep-resource-mobile-detail__row .prep-resource-option-tag {
  max-width: 100%;
}
#prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-resource-board-shell.prep-resource-mobile-shell {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.prep-resource-table {
  width: max-content;
  min-width: 96rem;
  table-layout: auto;
}
.prep-resource-table.prep-acceptance-table {
  width: max-content;
  min-width: 96rem;
  table-layout: auto;
}
.prep-resource-table.delivery-table > thead > tr > th:first-child,
.prep-resource-table.delivery-table > tbody > tr > td:first-child {
  border-left: 1px solid var(--border);
}
.prep-resource-table.delivery-table thead th,
.prep-resource-table.delivery-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  padding: 0.55rem 0.6rem;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep-resource-table thead th {
  position: sticky;
  top: 0;
}
.prep-resource-th-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.prep-resource-col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  margin-right: -4px;
  height: 100%;
  cursor: col-resize;
  z-index: 12;
  user-select: none;
  touch-action: none;
}
.prep-resource-col-resize-handle:hover {
  background: rgba(147, 197, 253, 0.22);
}
.prep-resource-table.is-col-resized,
.prep-resource-table.prep-acceptance-table.is-col-resized {
  table-layout: fixed;
  min-width: 0;
}
.prep-resource-table.is-col-resized th,
.prep-resource-table.is-col-resized td {
  width: auto;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  overflow: hidden;
}
.prep-resource-table.is-col-resized.delivery-table th {
  width: auto;
  min-width: 0;
  max-width: none;
}
.prep-resource-table.is-col-resized td.prep-resource-td--project_name,
.prep-resource-table.is-col-resized td.prep-resource-td--product_model,
.prep-resource-table.is-col-resized td.prep-resource-td--product_line,
.prep-resource-table.is-col-resized td.prep-resource-td--top_product_line {
  white-space: normal;
  text-overflow: unset;
}
.prep-resource-table.is-col-resized td.prep-resource-td--acceptance_blocker {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  text-overflow: unset;
}
.prep-resource-table.is-col-resized .prep-resource-date-input,
.prep-resource-table.is-col-resized .prep-resource-phase-select {
  max-width: 100%;
}
.prep-resource-table.is-col-resized .prep-resource-tag-list,
.prep-resource-table.is-col-resized .prep-resource-tag {
  max-width: 100%;
}
.prep-resource-table th,
.prep-resource-table td {
  white-space: nowrap;
  vertical-align: top;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep-resource-td--project_name {
  white-space: normal;
  min-width: 10rem;
  max-width: 18rem;
  overflow: visible;
  text-overflow: unset;
}
.prep-resource-table td.prep-resource-td--project_name {
  vertical-align: middle;
}
.prep-resource-table th.prep-resource-th--product_model,
.prep-resource-table td.prep-resource-td--product_model {
  white-space: normal;
  width: 17.6rem;
  min-width: 17.6rem;
  max-width: 22.4rem;
  overflow: hidden;
  vertical-align: middle;
}
.prep-resource-td--product_model .prep-resource-cell--wrap {
  overflow-wrap: break-word;
  word-break: break-word;
}
.prep-resource-table th.prep-resource-th--color_acceptance_status,
.prep-resource-table td.prep-resource-td--color_acceptance_status {
  width: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
  text-align: center;
  vertical-align: middle;
}
.prep-resource-table td.prep-resource-td--color_acceptance_status {
  padding: 0.3rem 0.28rem;
  overflow: visible;
  background: var(--surface);
}
.prep-resource-color-fill {
  display: block;
  width: 100%;
  min-height: 1.5rem;
  border-radius: 6px;
}
.prep-resource-color-fill.is-red {
  background: #f76964;
}
.prep-resource-color-fill.is-yellow {
  background: #ffc60a;
}
.prep-resource-color-fill.is-green {
  background: #52c41a;
}
.prep-color-status-picker { position: relative; width: 100%; min-width: 3rem; }
.prep-color-status-picker-trigger { display: block; width: 100%; min-height: 1.7rem; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.prep-color-status-swatch { display: block; width: 100%; min-height: 1.7rem; border-radius: 6px; background: var(--surface-muted, #f4f4f5); }
.prep-color-status-swatch.is-red, .prep-color-status-picker-option.is-red { background: #f76964; }
.prep-color-status-swatch.is-green, .prep-color-status-picker-option.is-green { background: #52c41a; }
.prep-color-status-swatch.is-yellow, .prep-color-status-picker-option.is-yellow { background: #ffc60a; }
.prep-color-status-picker-trigger:focus-visible { outline: 2px solid var(--primary, #1677ff); outline-offset: 1px; }
.prep-color-status-picker-menu { position: absolute; z-index: 30; top: calc(100% + .25rem); left: 0; display: grid; grid-template-columns: repeat(3, 2rem); gap: .3rem; padding: .35rem; border: 1px solid rgba(0, 0, 0, .14); border-radius: 8px; background: var(--surface, #fff); box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .18); }
.prep-color-status-picker-option { width: 2rem; height: 1.55rem; padding: 0; border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.prep-color-status-picker-option.is-selected { border-color: #1677ff; box-shadow: 0 0 0 1px #1677ff; }
.prep-color-status-picker.is-saving { opacity: .55; pointer-events: none; }

.prep-resource-table th.prep-resource-th--acceptance_blocker,
.prep-resource-table td.prep-resource-td--acceptance_blocker {
  width: 11rem;
  min-width: 11rem;
  max-width: 11rem;
  overflow: hidden;
  vertical-align: middle;
}
.prep-resource-table th.prep-resource-th--acceptance_blocker {
  white-space: nowrap;
}
.prep-resource-table td.prep-resource-td--acceptance_blocker {
  padding: 0.28rem 0.35rem;
  white-space: normal;
}
.prep-resource-table th.prep-resource-th--main_factor,
.prep-resource-table td.prep-resource-td--main_factor {
  width: 8.5rem;
  min-width: 8.5rem;
  max-width: 9.5rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: visible;
}
.prep-resource-table td.prep-resource-td--main_factor {
  padding: 0.28rem 0.28rem;
  position: relative;
  z-index: 2;
}
.prep-resource-table td.prep-resource-td--main_factor:focus-within {
  z-index: 24;
}
.prep-resource-table.is-col-resized th.prep-resource-th--main_factor,
.prep-resource-table.is-col-resized td.prep-resource-td--main_factor {
  width: auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
}
.prep-resource-select-menu {
  position: fixed;
  z-index: 1100;
  max-height: min(18rem, calc(100vh - 16px));
  overflow: auto;
  box-sizing: border-box;
  padding: 0.18rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0.35rem 0.9rem color-mix(in srgb, var(--accent) 18%, transparent);
}
.prep-resource-select-menu-panel {
  min-width: 0;
}
.prep-resource-select-menu-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.prep-resource-select-menu-option:hover,
.prep-resource-select-menu-option:focus {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
  outline: none;
}
.prep-resource-select-menu-option.is-selected {
  font-weight: 600;
  color: var(--accent);
}
html.is-mobile .prep-resource-select-menu.is-sheet,
body.is-mobile .prep-resource-select-menu.is-sheet {
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: none;
  overflow: hidden;
  padding: 1.15rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
html.is-mobile .prep-resource-select-menu-backdrop,
body.is-mobile .prep-resource-select-menu-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: color-mix(in srgb, #1a140c 42%, transparent);
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-panel,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-panel {
  position: relative;
  z-index: 1;
  width: min(22rem, 100%);
  max-height: min(36rem, calc(100dvh - 2.3rem));
  overflow: auto;
  padding: 0.35rem 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0.7rem 1.8rem color-mix(in srgb, var(--accent) 24%, transparent);
  -webkit-overflow-scrolling: touch;
}
html.is-mobile .prep-resource-select-menu-title,
body.is-mobile .prep-resource-select-menu-title {
  margin: 0;
  padding: 0.7rem 1rem 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option {
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  font-size: 0.92rem;
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option:last-child,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option:last-child {
  border-bottom: 0;
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option::after,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option::after {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--surface);
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option.is-selected,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option.is-selected {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
html.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option.is-selected::after,
body.is-mobile .prep-resource-select-menu.is-sheet .prep-resource-select-menu-option.is-selected::after {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 0.32rem, var(--surface) 0.36rem);
}
.prep-today-progress-shell {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.prep-today-progress-table-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, #f6efe4);
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.prep-today-progress-pie-head,
.prep-today-progress-table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.7rem;
  flex: 0 0 auto;
}
.prep-today-progress-table-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}
.prep-today-progress-pie-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.prep-today-progress-pie {
  width: 10.5rem;
  height: 10.5rem;
  flex: 0 0 auto;
}
.prep-today-progress-pie-hole {
  fill: color-mix(in srgb, var(--surface) 92%, #fff);
}
.prep-today-progress-pie-total {
  fill: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}
.prep-today-progress-pie-total-label {
  fill: var(--muted);
  font-size: 0.72rem;
}
.prep-today-progress-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 0.6rem;
  width: 100%;
}
.prep-today-progress-pie-legend li {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.22rem 0.4rem;
}
.prep-today-progress-pie-legend li:hover,
.prep-today-progress-pie-legend li.is-selected {
  background: color-mix(in srgb, var(--accent, #3370ff) 14%, transparent);
}
.prep-today-progress-pie [data-prep-today-progress-pie-label] {
  cursor: pointer;
}
.prep-today-progress-pie.is-slice-filtered .prep-today-progress-pie-slice:not(.is-selected) {
  opacity: 0.42;
}
.prep-today-progress-pie-hole,
.prep-today-progress-pie-total,
.prep-today-progress-pie-total-label {
  pointer-events: none;
}
.prep-today-progress-pie-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
}
.prep-today-progress-pie-legend strong {
  font-weight: 600;
}
.prep-today-progress-pie-legend span:last-child {
  color: var(--muted);
  white-space: nowrap;
}
#prep_today_progress_factor_sidebar.admin-queue-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
}
html.is-prep-right-sidebar-collapsed body.is-prep-board-page #prep_today_progress_factor_sidebar.admin-queue-sidebar {
  display: block;
  max-height: none;
  overflow: visible;
}
#prep_today_progress_factor_sidebar[hidden] {
  display: none !important;
}
#prep_subnav_data_dashboard {
  display: none !important;
}
html.is-mobile #prep_subnav_data_dashboard:not([hidden]),
body.is-mobile #prep_subnav_data_dashboard:not([hidden]) {
  display: inline-flex !important;
}
html.is-mobile #prep_today_progress_factor_sidebar,
body.is-mobile #prep_today_progress_factor_sidebar {
  display: none !important;
}
html.is-mobile body.is-mobile-data-dashboard #prep_today_progress_factor_sidebar:not([hidden]),
body.is-mobile.is-mobile-data-dashboard #prep_today_progress_factor_sidebar:not([hidden]) {
  display: flex !important;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0.35rem 0 0;
  padding: 0.7rem 0.8rem 1rem;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
html.is-mobile #prep_delivery_panel.is-project-data-dashboard-mode .delivery-board-workspace,
body.is-mobile #prep_delivery_panel.is-project-data-dashboard-mode .delivery-board-workspace {
  display: none !important;
}
html.is-mobile body.is-mobile-data-dashboard .prep-today-progress-pie,
body.is-mobile.is-mobile-data-dashboard .prep-today-progress-pie {
  width: 12.5rem;
  height: 12.5rem;
}
#prep_today_progress_factor_sidebar .sidebar-header {
  padding: 0.35rem 0.2rem 0.45rem;
  margin-bottom: 0.35rem;
}
#prep_today_progress_factor_sidebar .sidebar-header h2 {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 650;
}
.prep-today-progress-factor-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 0.15rem 0.35rem;
}
#prep_today_progress_log_sidebar.delivery-sidebar-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.15rem 0.15rem 0.35rem;
}
#prep_today_progress_log_sidebar .sidebar-header {
  padding: 0.35rem 0.2rem 0.55rem;
}
#prep_today_progress_log_sidebar .sidebar-header h2 {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
  font-weight: 650;
}
.prep-today-progress-log-host {
  min-height: 0;
  overflow: visible;
  margin: 0;
  padding: 0 0.15rem 0.35rem;
}
.prep-today-progress-log h3 {
  margin: 0 0 0.3rem;
  font-size: 0.88rem;
  font-weight: 650;
}
.prep-today-progress-log > .small {
  margin: 0 0 0.55rem;
  color: var(--muted);
}
.prep-today-progress-log ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.prep-today-progress-log li {
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 78%, #efe6d8);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.prep-today-progress-log li.is-current-date {
  border-color: color-mix(in srgb, var(--accent, #3370ff) 45%, rgba(148, 163, 184, 0.16));
  background: color-mix(in srgb, var(--accent, #3370ff) 10%, var(--surface));
}
.prep-today-progress-log li strong {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}
.prep-today-progress-log li p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prep-today-progress-pie-dimension {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.75rem;
  margin: 0 0 0.7rem;
  padding: 0 0.15rem 0.55rem;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.prep-today-progress-pie-dimension legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.prep-today-progress-pie-dimension label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
}
.prep-today-progress-pie-dimension input[type="radio"] {
  margin: 0;
  flex: 0 0 auto;
}
.prep-today-progress-factor-meta {
  margin: 0 0 0.7rem;
  color: var(--muted);
}
.prep-today-progress-table.prep-resource-table,
.prep-today-progress-table.prep-resource-table.prep-acceptance-table {
  width: 100%;
  min-width: 78rem;
}
.prep-today-progress-table.prep-resource-table th,
.prep-today-progress-table.prep-resource-table td {
  text-align: center;
  vertical-align: middle;
}
.prep-today-progress-table .prep-resource-th-label,
.prep-today-progress-table .prep-resource-cell-text,
.prep-today-progress-table .prep-resource-cell--wrap,
.prep-today-progress-table .prep-acceptance-project-btn {
  text-align: center;
}
.prep-today-progress-table td.prep-resource-td--project_name,
.prep-today-progress-table td.prep-resource-td--today_progress {
  text-align: left;
  vertical-align: middle;
}
.prep-today-progress-table td.prep-resource-td--color_acceptance_status {
  text-align: center;
  vertical-align: middle;
  overflow: visible;
}
.prep-today-progress-table td.prep-resource-td--color_acceptance_status .prep-color-status-picker {
  margin: 0 auto;
}
.prep-today-progress-table td.prep-resource-td--project_name .prep-acceptance-project-btn,
.prep-today-progress-table td.prep-resource-td--today_progress .prep-resource-cell-text,
.prep-today-progress-table td.prep-resource-td--today_progress .prep-resource-cell--wrap {
  text-align: left;
}
.prep-today-progress-table td.prep-resource-td--today_progress .prep-resource-cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.prep-today-progress-table .prep-resource-phase-select {
  text-align: center;
  text-align-last: center;
}
.prep-today-progress-table .prep-resource-td--today_progress {
  white-space: normal;
  min-width: 14rem;
  max-width: 28rem;
}
.prep-today-progress-table td.prep-resource-td--today_progress {
  padding: 0.4rem 0.55rem;
  vertical-align: middle;
}
.prep-today-progress-table.is-col-resized td.prep-resource-td--today_progress,
.prep-today-progress-table.is-col-resized th.prep-resource-th--today_progress {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}
.prep-today-progress-table.is-col-resized td.prep-resource-td--today_progress .prep-resource-cell-text {
  white-space: normal;
  overflow-wrap: anywhere;
}
.prep-today-progress-table .prep-today-progress-empty {
  color: var(--muted);
  font-weight: 600;
}
#prep_delivery_panel.is-project-today-progress-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  overflow: hidden;
  min-height: 0;
  scrollbar-gutter: auto;
}
#prep_delivery_panel.is-project-today-progress-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > * {
  flex: 1 1 0%;
  min-height: 0;
}
#prep_delivery_panel.is-project-today-progress-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-today-progress-shell,
section#prep_delivery_panel.is-project-today-progress-mode:fullscreen .prep-today-progress-shell,
section#prep_delivery_panel.is-project-today-progress-mode:-webkit-full-screen .prep-today-progress-shell,
section#prep_delivery_panel.is-project-today-progress-mode:-moz-full-screen .prep-today-progress-shell,
section#prep_delivery_panel.is-project-today-progress-mode.is-fullscreen-active .prep-today-progress-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
#prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-today-progress-mode:fullscreen .prep-today-progress-table-card > .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-today-progress-mode:-webkit-full-screen .prep-today-progress-table-card > .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-today-progress-mode:-moz-full-screen .prep-today-progress-table-card > .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-today-progress-mode.is-fullscreen-active .prep-today-progress-table-card > .prep-resource-table-wrap {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 0;
  max-height: none;
  overflow: auto !important;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  border: 1px solid var(--border);
  border-radius: 8px;
  scrollbar-gutter: auto;
  scrollbar-width: auto;
}
#prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap.is-panning {
  cursor: grabbing;
  user-select: none;
}
#prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
#prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 38%, transparent);
}
#prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-table-card > .prep-resource-table-wrap::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
#prep_delivery_panel.is-project-today-progress-mode .delivery-view-switch,
#prep_delivery_panel.is-project-today-progress-mode #prep_delivery_month_filter,
#prep_delivery_panel.is-project-today-progress-mode .delivery-paint-toolbar,
#prep_delivery_panel.is-project-today-progress-mode .delivery-board-heading-center {
  display: none;
}
.prep-today-progress-date-filter {
  flex: 0 0 auto;
}
.prep-today-progress-date-filter[hidden] {
  display: none !important;
}
.prep-today-progress-month-enable {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
}
.prep-today-progress-month-enable input[type="checkbox"] {
  margin: 0;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  accent-color: var(--header-muted, #5c4632);
  cursor: pointer;
}
.prep-today-progress-date-filter input[type="month"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.prep-today-progress-date-filter input[type="month"] {
  box-sizing: border-box;
  width: auto;
  min-width: 7.8rem;
  max-width: none;
  height: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.88rem;
  field-sizing: content;
}
.prep-today-progress-date-filter input[type="month"]::-webkit-datetime-edit,
.prep-today-progress-date-filter input[type="month"]::-webkit-datetime-edit-fields-wrapper {
  min-width: 0;
  padding: 0;
}
.prep-resource-table th.prep-resource-th--target_acceptance_date,
.prep-resource-table td.prep-resource-td--target_acceptance_date {
  width: 10.8rem;
  min-width: 10.8rem;
  max-width: 11.6rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.prep-resource-table td.prep-resource-td--target_acceptance_date {
  padding: 0.28rem 0.28rem;
  overflow: visible;
}
.prep-resource-acceptance-date.is-delayed {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  max-width: 100%;
}
.prep-resource-acceptance-date.is-delayed .prep-resource-cell-text,
.prep-resource-acceptance-date.is-delayed .prep-resource-date-input {
  color: #b42318;
  font-weight: 700;
}
.prep-resource-acceptance-date.is-delayed .prep-resource-date-input {
  border-color: #e7a29a;
}
.prep-resource-acceptance-date.is-delayed .prep-resource-tag {
  padding: 0 0.28rem;
  font-size: 0.68rem;
  line-height: 1.35;
}
#prep_delivery_panel .prep-resource-table tbody tr.is-acceptance-delayed td,
#prep_delivery_panel .prep-resource-table tbody tr.is-acceptance-delayed:nth-child(even) td,
#prep_delivery_panel .prep-resource-table tbody tr.is-acceptance-delayed:hover td {
  background: #fde8e6;
  color: #9f1d1d;
}
#prep_delivery_panel .prep-resource-table tbody tr.is-acceptance-delayed td:first-child {
  box-shadow: inset 3px 0 0 #d92d20;
}
#prep_delivery_panel .prep-resource-table tbody tr.is-acceptance-delayed .prep-acceptance-project-btn {
  color: #9f1d1d;
  font-weight: 700;
}
.prep-resource-mobile-project.is-acceptance-delayed {
  background: #fde8e6;
  box-shadow: inset 3px 0 0 #d92d20;
}
.prep-resource-mobile-project.is-acceptance-delayed .prep-resource-mobile-project__name {
  color: #9f1d1d;
  font-weight: 700;
}
.prep-resource-date-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 10.4rem;
  height: 1.7rem;
  margin: 0 auto;
  padding: 0 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  text-align: center;
}
.prep-resource-date-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
.prep-resource-date-input:disabled {
  opacity: 0.7;
}
.prep-resource-text-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 10.4rem;
  height: 1.7rem;
  margin: 0 auto;
  padding: 0 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
}
.prep-resource-text-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
.prep-resource-text-input:disabled {
  opacity: 0.7;
}
.prep-resource-table th.prep-resource-th--project_code,
.prep-resource-table td.prep-resource-td--project_code,
.prep-resource-table th.prep-resource-th--realtime_progress,
.prep-resource-table td.prep-resource-td--realtime_progress {
  text-align: center;
  vertical-align: middle;
}
.prep-resource-td--realtime_progress {
  white-space: nowrap;
  min-width: 4.5rem;
  max-width: 5.5rem;
  overflow: hidden;
  vertical-align: middle;
}
.prep-resource-progress-view-btn {
  min-width: 3.5rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.25;
}
.prep-resource-progress-view-btn:hover,
.prep-resource-progress-view-btn:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}
.prep-resource-progress-view-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.prep-resource-table th.prep-resource-th--account_manager,
.prep-resource-table td.prep-resource-td--account_manager,
.prep-resource-table th.prep-resource-th--product_count,
.prep-resource-table td.prep-resource-td--product_count,
.prep-resource-table th.prep-resource-th--project_status,
.prep-resource-table td.prep-resource-td--project_status {
  width: 5.2rem;
  min-width: 5.2rem;
  max-width: 5.2rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.prep-resource-table td.prep-resource-td--product_count,
.prep-resource-table td.prep-resource-td--product_model {
  padding: 0.28rem 0.28rem;
  overflow: visible;
}
.prep-resource-td--product_count .prep-resource-text-input,
.prep-resource-td--product_model .prep-resource-text-input {
  max-width: 100%;
}
.prep-resource-table th.prep-resource-th--deploy_status,
.prep-resource-table td.prep-resource-td--deploy_status,
.prep-resource-table th.prep-resource-th--shipping_status,
.prep-resource-table td.prep-resource-td--shipping_status,
.prep-resource-table th.prep-resource-th--deployment_status,
.prep-resource-table td.prep-resource-td--deployment_status {
  width: 7.2rem;
  min-width: 4.5rem;
  max-width: 7.2rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
}
.prep-resource-table td.prep-resource-td--deploy_status,
.prep-resource-table td.prep-resource-td--shipping_status,
.prep-resource-table td.prep-resource-td--deployment_status {
  padding: 0.28rem 0.28rem;
  overflow: hidden;
}
.prep-resource-table .prep-resource-phase-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  /* 覆盖 `.delivery-table select` 的 0.45rem 上下内边距；原 1.7rem 高度下内容区不足，原生下拉框会裁掉文字下半部。 */
  height: 2rem;
  min-height: 2rem;
  margin: 0 auto;
  padding: 0 0.3rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
}
/* 列宽由表头拖拽配置后，不能再被下拉字段的默认固定宽度锁住。 */
.prep-resource-table.is-col-resized th.prep-resource-th--deploy_status,
.prep-resource-table.is-col-resized td.prep-resource-td--deploy_status,
.prep-resource-table.is-col-resized th.prep-resource-th--shipping_status,
.prep-resource-table.is-col-resized td.prep-resource-td--shipping_status,
.prep-resource-table.is-col-resized th.prep-resource-th--deployment_status,
.prep-resource-table.is-col-resized td.prep-resource-td--deployment_status {
  width: auto;
  min-width: 0;
  max-width: none;
}
.prep-resource-table.is-col-resized .prep-resource-phase-select {
  min-width: 0;
  max-width: 100%;
}
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="sand"] { color: #7a5a16; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="blue"] { color: #1d4f8a; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="orange"] { color: #9a4b12; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="cyan"] { color: #0f766e; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="pink"] { color: #9d174d; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="red"] { color: #b91c1c; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="purple"] { color: #5b21b6; }
.prep-resource-table .prep-resource-phase-select[data-prep-resource-phase-tone="green"] { color: #166534; }
.prep-resource-table .prep-resource-phase-select option.is-tone-sand { color: #7a5a16; }
.prep-resource-table .prep-resource-phase-select option.is-tone-blue { color: #1d4f8a; }
.prep-resource-table .prep-resource-phase-select option.is-tone-orange { color: #9a4b12; }
.prep-resource-table .prep-resource-phase-select option.is-tone-cyan { color: #0f766e; }
.prep-resource-table .prep-resource-phase-select option.is-tone-pink { color: #9d174d; }
.prep-resource-table .prep-resource-phase-select option.is-tone-red { color: #b91c1c; }
.prep-resource-table .prep-resource-phase-select option.is-tone-purple { color: #5b21b6; }
.prep-resource-table .prep-resource-phase-select option.is-tone-green { color: #166534; }
.prep-resource-phase-select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
.prep-resource-phase-select:disabled {
  opacity: 0.7;
}
.prep-resource-table td.prep-resource-td--account_manager,
.prep-resource-table td.prep-resource-td--product_count,
.prep-resource-table td.prep-resource-td--project_status {
  padding: 0.35rem 0.2rem;
}
.prep-resource-table td.prep-resource-td--project_status .prep-resource-tag,
.prep-resource-table td.prep-resource-td--deploy_status .prep-resource-tag,
.prep-resource-table td.prep-resource-td--deploy_status .prep-resource-tag-list,
.prep-resource-table td.prep-resource-td--shipping_status .prep-resource-tag-list,
.prep-resource-table td.prep-resource-td--deployment_status .prep-resource-tag-list,
.prep-resource-table td.prep-resource-td--product_line .prep-resource-tag-list,
.prep-resource-table td.prep-resource-td--top_product_line .prep-resource-tag-list {
  justify-content: center;
}
.prep-resource-table th.prep-resource-th--product_line,
.prep-resource-table td.prep-resource-td--product_line,
.prep-resource-table th.prep-resource-th--top_product_line,
.prep-resource-table td.prep-resource-td--top_product_line {
  width: 9.5rem;
  min-width: 9.5rem;
  max-width: 12.5rem;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.prep-resource-table td.prep-resource-td--product_line,
.prep-resource-table td.prep-resource-td--top_product_line {
  padding: 0.35rem 0.28rem;
}
.prep-resource-table.is-col-resized th[data-prep-resource-col],
.prep-resource-table.is-col-resized td.prep-resource-td {
  width: auto;
  min-width: 0;
  max-width: none;
}
.prep-resource-table.is-col-resized.delivery-table th[data-prep-resource-col] {
  width: auto;
  min-width: 0;
  max-width: none;
}
.prep-resource-table.is-col-resized td.prep-resource-td--project_name,
.prep-resource-table.is-col-resized td.prep-resource-td--product_model,
.prep-resource-table.is-col-resized td.prep-resource-td--product_line,
.prep-resource-table.is-col-resized td.prep-resource-td--top_product_line {
  white-space: normal;
  text-overflow: unset;
}
.prep-resource-table.is-col-resized td.prep-resource-td--acceptance_blocker {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  text-overflow: unset;
}
.prep-resource-table.is-col-resized .prep-resource-date-input,
.prep-resource-table.is-col-resized .prep-resource-phase-select {
  max-width: 100%;
}
.prep-resource-progress-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.12rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.45);
  color: var(--accent, #93c5fd);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.prep-resource-cell--wrap {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.prep-resource-cell--twoline {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}
.prep-resource-cell--ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-resource-progress-modal-dialog {
  width: min(100%, 640px);
}
html.is-mobile .prep-resource-progress-modal,
body.is-mobile .prep-resource-progress-modal {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0.55rem 0.65rem;
  inset: 0;
}
html.is-mobile .prep-resource-progress-modal-dialog,
body.is-mobile .prep-resource-progress-modal-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  min-height: 0;
}
html.is-mobile .prep-resource-progress-modal-dialog .modal-header,
body.is-mobile .prep-resource-progress-modal-dialog .modal-header {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
}
html.is-mobile .prep-resource-progress-body,
body.is-mobile .prep-resource-progress-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.is-mobile .prep-resource-progress-list,
body.is-mobile .prep-resource-progress-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
html.is-mobile .prep-resource-progress-form,
body.is-mobile .prep-resource-progress-form {
  flex: 0 0 auto;
}
html.is-mobile-keyboard-open .prep-resource-progress-form textarea,
body.is-mobile-keyboard-open .prep-resource-progress-form textarea,
html.is-mobile .prep-resource-progress-modal.is-keyboard-open .prep-resource-progress-form textarea,
body.is-mobile .prep-resource-progress-modal.is-keyboard-open .prep-resource-progress-form textarea {
  min-height: 4.2rem;
}
.prep-resource-progress-body {
  display: grid;
  gap: 1rem;
}
.prep-resource-progress-subtitle {
  margin: 0;
}
.prep-resource-progress-list {
  display: grid;
  gap: 0.75rem;
  max-height: min(42vh, 22rem);
  overflow: auto;
}
.prep-resource-progress-item {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.prep-resource-progress-item time {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.prep-resource-progress-item p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.prep-resource-progress-form {
  display: grid;
  gap: 0.45rem;
}
.prep-resource-progress-form label {
  font-size: 0.86rem;
  font-weight: 600;
}
.prep-resource-progress-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 6rem;
}
.prep-resource-progress-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.prep-resource-progress-form-actions .small {
  margin: 0;
}
.prep-progress-attachment-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.prep-progress-attachment-btn {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.15rem 0.65rem;
  cursor: pointer;
  font-size: 0.78rem;
}
.prep-progress-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.prep-progress-attachment-draft {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  font-size: 0.76rem;
}
.prep-progress-attachment-draft > span {
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-progress-attachment-draft-preview {
  max-width: 15rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--accent-dim);
  cursor: pointer;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-progress-attachment-draft button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.prep-progress-attachment-draft-image {
  width: 2rem;
  height: 1.7rem;
  object-fit: cover;
  border-radius: 3px;
}
.prep-progress-attachment-card {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
  vertical-align: middle;
}
button.prep-progress-attachment-card {
  cursor: pointer;
}
.prep-progress-attachment-card.is-image {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}
.prep-progress-attachment-card.is-image img {
  display: block;
  max-width: min(100%, 22rem);
  max-height: 14rem;
  border-radius: 5px;
  object-fit: contain;
}
.prep-progress-attachment-card figcaption {
  max-width: 20rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-progress-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.45rem;
  border-radius: 4px;
  background: #217346;
  color: #fff;
  font-size: 0.63rem;
  font-weight: 800;
}
.prep-progress-attachment-card small {
  color: var(--muted);
}
.prep-progress-spreadsheet-preview-modal {
  z-index: 1300;
}
.prep-progress-spreadsheet-preview-dialog {
  width: min(96vw, 1100px);
  max-width: none;
}
.prep-progress-spreadsheet-preview-body {
  display: grid;
  gap: 0.8rem;
  max-height: min(76vh, 700px);
  overflow: auto;
}
.prep-progress-spreadsheet-sheet h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}
.prep-progress-spreadsheet-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.prep-progress-spreadsheet-scroll table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.prep-progress-spreadsheet-scroll td {
  min-width: 5rem;
  padding: 0.28rem 0.42rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: pre-wrap;
  vertical-align: top;
}
.prep-progress-spreadsheet-scroll th {
  position: sticky;
  top: 0;
  min-width: 2.5rem;
  padding: 0.28rem 0.42rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  text-align: center;
}
.prep-project-todo-progress-compose .prep-progress-attachment-tools .toolbar-btn {
  justify-self: start;
  min-height: 1.8rem;
  padding: 0.15rem 0.65rem;
}
.prep-resource-issue-modal-dialog {
  width: min(100%, 1360px);
}
.prep-resource-issue-modal-dialog .modal-header h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.prep-resource-issue-subtitle-row {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.prep-resource-issue-subtitle-row .prep-resource-issue-subtitle {
  margin: 0;
}
.prep-resource-history-link {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link, var(--accent));
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.prep-resource-history-link:hover,
.prep-resource-history-link:focus-visible {
  color: var(--text);
}
.prep-acceptance-strategy-modal {
  z-index: 1011;
}
.prep-acceptance-strategy-dialog {
  width: min(100%, 1280px);
}
.prep-acceptance-strategy-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding-bottom: 0.4rem;
}
.prep-acceptance-strategy-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.prep-acceptance-survey {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.prep-acceptance-survey h3 {
  margin: 0;
  padding: 0.55rem 0.75rem 0;
  font-size: 0.95rem;
}
.prep-acceptance-survey-form-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem 0;
}
.prep-acceptance-survey-form-head h3 {
  padding: 0;
}
.prep-acceptance-survey-form-head > .toolbar-btn,
.prep-acceptance-survey.is-form .prep-acceptance-survey-file > .toolbar-btn {
  width: auto;
  min-height: 1.7rem;
  padding: 0.1rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
}
.prep-acceptance-survey-answer {
  font-size: 0.88rem;
  font-weight: 650;
}
.prep-acceptance-survey-form-tasks,
.prep-acceptance-survey-form-empty {
  flex: 1 1 100%;
}
.prep-acceptance-survey-form-tasks > span,
.prep-acceptance-survey-form-empty {
  color: var(--muted);
  font-size: 0.82rem;
}
.prep-acceptance-survey-form-task {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.15rem 0 0;
  font-size: 0.84rem;
}
.prep-acceptance-survey-form-task.is-done {
  color: var(--muted);
  text-decoration: line-through;
}
.prep-acceptance-survey-lead,
.prep-acceptance-survey-file {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.prep-acceptance-survey-lead {
  padding: 0.15rem 0.75rem 0.45rem;
}
.prep-acceptance-survey-risk {
  display: grid;
  gap: 0.15rem;
  margin: 0 0.75rem 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}
.prep-acceptance-survey-risk strong {
  font-size: 0.92rem;
}
.prep-acceptance-survey-risk span,
.prep-acceptance-survey-risk li {
  font-size: 0.82rem;
}
.prep-acceptance-survey-risk ol {
  margin: 0.1rem 0 0;
  padding-left: 1.15rem;
}
.prep-acceptance-survey-risk.is-groups {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.prep-acceptance-survey-risk.is-pending {
  background: rgba(154, 100, 46, 0.14);
  color: #76471f;
}
.prep-acceptance-survey-risk-group + .prep-acceptance-survey-risk-group {
  margin-top: 0.35rem;
}
.prep-acceptance-survey-risk-group.is-primary strong {
  color: #991b1b;
}
.prep-acceptance-survey-risk-group.is-secondary strong {
  color: #9a3412;
}
.prep-acceptance-survey-risk-group.is-fallback strong {
  color: #166534;
}
.prep-acceptance-survey-strategy {
  display: grid;
  gap: 0.28rem;
  margin: 0 0.75rem 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.prep-acceptance-survey-strategy strong {
  font-size: 0.92rem;
}
.prep-acceptance-survey-strategy ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prep-acceptance-survey-strategy li {
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  font-size: 0.82rem;
  line-height: 1.4;
}
.prep-acceptance-survey-q.is-primary {
  background: rgba(185, 28, 28, 0.08);
}
.prep-acceptance-survey-q.is-secondary {
  background: rgba(217, 119, 6, 0.1);
}
.prep-acceptance-survey-risk-tag {
  margin-left: 0.4rem;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
}
.prep-acceptance-survey-q.is-secondary .prep-acceptance-survey-risk-tag {
  color: #b45309;
}
.prep-acceptance-survey-q.is-fallback {
  background: rgba(22, 163, 74, 0.08);
}
.prep-acceptance-survey-q.is-fallback .prep-acceptance-survey-risk-tag {
  color: #166534;
}
.prep-acceptance-survey-q {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 0.28rem 0.75rem;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-top: 1px solid var(--border);
}
.prep-acceptance-survey-q > p,
.prep-acceptance-survey-sub > span {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 650;
}
.prep-acceptance-survey-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
}
.prep-acceptance-survey-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.6rem;
  font-size: 0.88rem;
}
.prep-acceptance-survey-follow,
.prep-acceptance-survey-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
}
.prep-acceptance-survey-follow {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 2px solid var(--border);
}
.prep-acceptance-survey-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1rem;
}
.prep-acceptance-survey-field {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.prep-acceptance-survey-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.prep-acceptance-survey-field.is-block {
  display: grid;
  width: min(100%, 36rem);
  gap: 0.25rem;
}
.prep-acceptance-survey-field textarea,
.prep-acceptance-survey-field input[type="text"] {
  width: 7.4rem;
  min-height: 1.7rem;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.prep-acceptance-survey-field.is-block textarea {
  width: 100%;
  min-height: 3.2rem;
  resize: vertical;
}
.prep-acceptance-survey-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.prep-acceptance-survey-tasks-block {
  flex: 1 1 100%;
  display: grid;
  gap: 0.35rem;
}
.prep-acceptance-survey-tasks-block > span {
  color: var(--muted);
  font-size: 0.82rem;
}
.prep-acceptance-survey-tasks {
  display: grid;
  gap: 0.35rem;
  width: 50%;
  min-width: min(100%, 24rem);
  justify-items: stretch;
}
.prep-acceptance-survey-submit {
  display: flex;
  justify-content: flex-start;
  padding: 0.45rem 0.75rem 0.65rem;
}
.prep-acceptance-survey-submit > .toolbar-btn {
  width: auto;
  min-height: 1.7rem;
  padding: 0.1rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
}
.prep-acceptance-line-main.is-open .prep-acceptance-title-input,
.prep-acceptance-line-main.is-open .prep-acceptance-gantt-task {
  color: #b91c1c;
}
.prep-acceptance-line-plan.is-task:not(.is-done):not(.is-overdue) .prep-acceptance-gantt-bar {
  background: #16a34a;
  color: #fff;
}
.prep-acceptance-line-plan.is-open .prep-acceptance-gantt-bar,
.prep-acceptance-line-plan.is-overdue .prep-acceptance-gantt-bar {
  background: #ef4444;
  color: #fff;
}
.prep-acceptance-line-main.is-overdue .prep-acceptance-gantt-task,
.prep-acceptance-line-main.is-overdue .prep-acceptance-gantt-date.is-end,
.prep-acceptance-line-main.is-overdue .prep-acceptance-gantt-duration {
  color: #b91c1c;
  font-weight: 700;
}
.prep-acceptance-survey-tasks > .toolbar-btn {
  width: auto;
  justify-self: start;
  min-height: 1.7rem;
  padding: 0.1rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 650;
}
.prep-acceptance-survey-task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.prep-acceptance-survey-task-title {
  width: min(16rem, 100%);
  flex: 1 1 12rem;
  min-height: 1.7rem;
  margin: 0;
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.prep-acceptance-survey-task.is-done .prep-acceptance-survey-task-title {
  color: var(--muted);
  text-decoration: line-through;
}
.prep-acceptance-survey-task .prep-acceptance-survey-finish {
  flex: 0 0 auto;
}
.prep-acceptance-survey-task .prep-acceptance-survey-finish .prep-acceptance-date-input {
  width: 7.2rem;
  flex: 0 0 7.2rem;
}
.prep-acceptance-survey-task .prep-acceptance-owners {
  width: auto;
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
}
.prep-acceptance-survey-task .prep-acceptance-owners .prep-plan-owner-input {
  box-sizing: content-box;
  flex: 0 0 auto;
  width: 4em;
  min-width: 4em;
  max-width: 4em;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  text-align: center;
}
.prep-acceptance-survey-task .prep-plan-owner-input[hidden],
.prep-acceptance-owner-add[hidden] {
  display: none;
}
.prep-acceptance-owner-add {
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  padding: 0;
  border: 1px dashed color-mix(in srgb, var(--text) 35%, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.prep-acceptance-owner-add:hover,
.prep-acceptance-owner-add:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dim);
  outline: none;
}
.prep-acceptance-survey-task-role {
  min-height: 1.7rem;
  margin: 0;
  padding: 0.12rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
@media (max-width: 720px) {
  .prep-acceptance-survey-q {
    grid-template-columns: 1fr;
  }
  .prep-acceptance-survey-tasks {
    width: 100%;
    min-width: 0;
  }
}
.prep-acceptance-gantt {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.prep-acceptance-gantt-head,
.prep-acceptance-gantt-row {
  display: grid;
  grid-template-columns: 3.4rem minmax(11rem, 1.15fr) 3rem minmax(18rem, 2.4fr);
  gap: 0.65rem;
  align-items: center;
}
.prep-acceptance-gantt-head {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}
.prep-acceptance-gantt-task {
  margin: 0;
  line-height: 1.4;
}
.prep-acceptance-gantt-duration {
  color: var(--text);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prep-acceptance-gantt-axis,
.prep-acceptance-gantt-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--gantt-days, 22), minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 1.7rem;
  border-radius: 8px;
  background:
    linear-gradient(to right, transparent calc(var(--deadline-left, -20%) - 0.5px), #463625 calc(var(--deadline-left, -20%)), transparent calc(var(--deadline-left, -20%) + 0.5px));
}
.prep-acceptance-board.is-gantt-extended .prep-acceptance-gantt-axis,
.prep-acceptance-board.is-gantt-extended .prep-acceptance-gantt-track {
  grid-template-columns: repeat(var(--gantt-days, 22), var(--gantt-day-width, 2px));
  width: calc(var(--gantt-days, 22) * var(--gantt-day-width, 2px));
  min-width: calc(var(--gantt-days, 22) * var(--gantt-day-width, 2px));
  max-width: none;
}
.prep-acceptance-gantt-tick,
.prep-acceptance-gantt-day {
  box-sizing: border-box;
  min-width: 0;
  border-right: 1px solid transparent;
}
.prep-acceptance-gantt-tick.is-line,
.prep-acceptance-gantt-day.is-line {
  border-right-color: rgba(120, 96, 70, 0.16);
}
.prep-acceptance-gantt-day {
  pointer-events: none;
}
.prep-acceptance-gantt-tick {
  overflow: visible;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.7rem;
  text-align: center;
  white-space: nowrap;
}
.prep-acceptance-gantt-axis.is-acceptance-marked::after,
.prep-acceptance-gantt-track.is-acceptance-marked::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--anchor-left);
  width: 3px;
  margin-left: -1.5px;
  background: #d92d20;
  box-shadow: 0 0 0 1px rgba(217, 45, 32, 0.35);
  pointer-events: none;
}
.prep-acceptance-gantt-axis.is-today-marked::before,
.prep-acceptance-gantt-track.is-today-marked::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: var(--today-left);
  width: 0;
  border-left: 1.5px dashed #f08aa0;
  pointer-events: none;
  transform: translateX(-0.75px);
}
.prep-acceptance-gantt-today-label {
  position: absolute;
  z-index: 4;
  top: -0.08rem;
  left: var(--today-left);
  padding: 0 0.24rem;
  border-radius: 4px;
  background: #fb7185;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.25rem;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}
.prep-acceptance-gantt-tick.is-anchor {
  position: relative;
  z-index: 4;
  color: #d92d20;
  font-size: 0.78rem;
  font-weight: 800;
}
.prep-acceptance-gantt-tick.is-anchor.is-edge-start {
  text-align: left;
}
.prep-acceptance-gantt-tick.is-anchor.is-edge-end {
  text-align: right;
}
.prep-acceptance-gantt-tick.is-deadline {
  color: #463625;
  font-weight: 700;
}
.prep-acceptance-gantt-track {
  overflow: hidden;
}
.prep-acceptance-strategy-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
}
.prep-acceptance-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-size: 0.82rem;
  white-space: nowrap;
}
.prep-acceptance-deadline .prep-acceptance-date-input {
  width: 6.8rem;
}
.prep-acceptance-gantt-bar {
  position: absolute;
  z-index: 1;
  top: 0.22rem;
  display: flex;
  align-items: center;
  height: 1.28rem;
  padding: 0 0.45rem;
  overflow: hidden;
  border-radius: 7px;
  color: #1c2836;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.prep-acceptance-gantt-bar.is-project {
  background: #e7c9a4;
}
.prep-acceptance-gantt-bar.is-rd {
  background: #b9d4f5;
}
.prep-acceptance-gantt-bar.is-biz {
  background: #b7e4cf;
}
.prep-acceptance-gantt-bar.is-presales {
  background: #d7c4f2;
}
.prep-acceptance-gantt-bar.is-product {
  background: #f0d48a;
}
.prep-acceptance-strategy-role.is-presales {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.12);
}
.prep-acceptance-board {
  display: grid;
  grid-template-columns: minmax(34rem, 1.05fr) minmax(18rem, 1fr);
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.prep-acceptance-line-main,
.prep-acceptance-line-plan {
  display: grid;
  align-items: center;
  min-height: 2.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}
.prep-acceptance-line-main {
  position: sticky;
  left: 0;
  z-index: 2;
  grid-template-columns: 2.4rem minmax(7.5rem, 1.7fr) 3.6rem 6.6rem 6.6rem 2.5rem 1.4rem;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  background: var(--surface);
}
.prep-acceptance-line-main.is-head,
.prep-acceptance-line-plan.is-head {
  position: sticky;
  top: 0;
  z-index: 3;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  background: var(--surface);
}
.prep-acceptance-line-main.is-head {
  z-index: 4;
}
.prep-acceptance-line-main.is-subtask {
  padding-left: 1.15rem;
}
.prep-acceptance-line-main.is-role.is-project,
.prep-acceptance-line-plan.is-role.is-project {
  background: #f3e6d4;
}
.prep-acceptance-line-main.is-role.is-rd,
.prep-acceptance-line-plan.is-role.is-rd {
  background: #e7f0fb;
}
.prep-acceptance-line-main.is-role.is-product,
.prep-acceptance-line-plan.is-role.is-product {
  background: #fbf6e4;
}
.prep-acceptance-line-main.is-role.is-presales,
.prep-acceptance-line-plan.is-role.is-presales {
  background: #f3eafc;
}
.prep-acceptance-line-main.is-role.is-biz,
.prep-acceptance-line-plan.is-role.is-biz {
  background: #e5f6ee;
}
.prep-acceptance-line-main.is-role .prep-acceptance-strategy-role {
  grid-column: 1 / 3;
  justify-self: start;
}
.prep-acceptance-role-action {
  grid-column: 3 / -1;
  justify-self: end;
  width: max-content;
  min-height: 1.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 7px;
  font-size: 0.74rem;
}
.prep-acceptance-done {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  justify-self: center;
}
.prep-acceptance-task-delete {
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8a4b3a;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  justify-self: center;
}
.prep-acceptance-task-delete:hover,
.prep-acceptance-task-delete:focus-visible {
  background: rgba(185, 28, 28, 0.12);
  color: #9f1239;
  outline: none;
}
.prep-acceptance-line-main.is-done .prep-acceptance-title-input,
.prep-acceptance-line-main.is-done .prep-acceptance-gantt-task {
  color: var(--muted);
  text-decoration: line-through;
}
.prep-acceptance-line-plan.is-done .prep-acceptance-gantt-bar {
  background: #9ca3af;
  color: #fff;
  opacity: 1;
}
.prep-acceptance-owners {
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.prep-acceptance-owners .prep-plan-owner-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.prep-acceptance-owners .prep-plan-owner-chip {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.prep-acceptance-line-main .prep-acceptance-subtask-empty {
  grid-column: 1 / -1;
}
.prep-acceptance-line-plan {
  min-width: 0;
  padding: 0.15rem 1.15rem 0.15rem 0.4rem;
  border-left: 1px solid var(--border);
}
.prep-acceptance-line-plan .prep-acceptance-gantt-axis,
.prep-acceptance-line-plan .prep-acceptance-gantt-track {
  width: 100%;
  min-width: 0;
}
.prep-acceptance-owner {
  color: var(--text);
  font-size: 0.82rem;
}
.prep-acceptance-title-input,
.prep-acceptance-owner-input,
.prep-acceptance-date-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}
.prep-acceptance-title-input {
  height: auto;
  min-height: 1.9rem;
  padding: 0.28rem 0.4rem;
  resize: none;
  overflow: hidden;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prep-acceptance-date-input {
  padding: 0 0.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.prep-acceptance-subtask-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
@media (max-width: 860px) {
  .prep-acceptance-board {
    grid-template-columns: minmax(28rem, 1.2fr) minmax(16rem, 0.9fr);
  }
  .prep-acceptance-line-main {
    grid-template-columns: 2.2rem minmax(6.5rem, 1.4fr) 3.4rem 6.2rem 6.2rem 2.3rem 1.4rem;
  }
}
.prep-acceptance-gantt-row.is-saved .prep-acceptance-gantt-bar {
  box-shadow: inset 0 0 0 1px rgba(28, 40, 54, 0.28);
}
.prep-acceptance-strategy-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.prep-acceptance-strategy-role.is-project {
  color: #9a642e;
  background: rgba(154, 100, 46, 0.12);
}
.prep-acceptance-strategy-role.is-rd {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}
.prep-acceptance-strategy-role.is-biz {
  color: #047857;
  background: rgba(4, 120, 87, 0.12);
}
.prep-acceptance-strategy-role.is-product {
  color: #a16207;
  background: rgba(161, 98, 7, 0.14);
}
@media (max-width: 720px) {
  .prep-acceptance-gantt-head,
  .prep-acceptance-gantt-row {
    grid-template-columns: 3.4rem minmax(0, 1fr) 3rem;
  }
  .prep-acceptance-gantt-axis,
  .prep-acceptance-gantt-track {
    grid-column: 1 / -1;
  }
}
.prep-resource-history-modal {
  z-index: 1010;
}
.prep-resource-history-modal-dialog {
  width: min(100%, 1180px);
}
.prep-resource-history-field-filters {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}
.prep-resource-history-field-select {
  position: relative;
  flex: 0 0 auto;
}
.prep-resource-history-field-select-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  list-style: none;
  user-select: none;
}
.prep-resource-history-field-select-summary::-webkit-details-marker {
  display: none;
}
.prep-resource-history-field-select-summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 0.7;
  transition: transform 0.15s ease;
}
.prep-resource-history-field-select[open] .prep-resource-history-field-select-summary::after {
  transform: rotate(180deg);
}
.prep-resource-history-field-select-summary:hover,
.prep-resource-history-field-select-summary:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.prep-resource-history-field-select-count {
  color: var(--muted);
}
.prep-resource-history-field-filter-options {
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.35rem);
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(10rem, 1fr));
  width: min(38rem, calc(100vw - 3rem));
  max-height: min(20rem, 50vh);
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  gap: 0.35rem 0.75rem;
}
.prep-resource-history-field-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  white-space: nowrap;
}
.prep-resource-history-field-filter-option input {
  margin: 0;
}
.prep-resource-issue-history-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.prep-resource-issue-body {
  display: grid;
  gap: 0.85rem;
}
.prep-resource-issue-subtitle {
  margin: 0;
}
.prep-resource-issue-project-info {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.prep-resource-progress-board-section {
  min-width: 0;
  padding: 0.8rem 0.9rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.prep-resource-progress-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.prep-resource-progress-board-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}
.prep-resource-progress-board-head p {
  margin: 0.22rem 0 0;
}
.prep-resource-progress-board-head .toolbar-btn {
  flex: 0 0 auto;
}
.prep-resource-progress-board-body {
  min-width: 0;
}
.prep-resource-progress-board-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
}
.prep-resource-progress-gantt-state {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.prep-resource-progress-gantt-state.is-doing {
  background: rgba(37, 99, 235, 0.11);
  color: #1d4ed8;
}
.prep-resource-progress-gantt-state.is-overdue {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}
.prep-resource-progress-gantt-state.is-upcoming {
  background: rgba(161, 98, 7, 0.1);
  color: #92600a;
}
.prep-resource-progress-gantt-state.is-module {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
}
.prep-resource-progress-gantt-state.is-done {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
.prep-resource-progress-gantt-state.is-paused {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}
.prep-resource-progress-gantt-board .prep-resource-plan-status-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 1.65rem;
  margin: 0;
  padding: 0.08rem 0.18rem;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
}
.prep-resource-plan-status-select option {
  background: var(--surface);
  color: var(--text);
}
.prep-resource-plan-status-select:disabled {
  cursor: wait;
  opacity: 0.65;
}
@media (max-width: 720px) {
  .prep-resource-progress-board-head {
    align-items: stretch;
    flex-direction: column;
  }
}
.prep-resource-issue-info-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 1.15fr) minmax(15rem, 0.95fr) minmax(15rem, 0.95fr);
  gap: 0.85rem 1.05rem;
  align-items: stretch;
}
.prep-resource-issue-basic-pane,
.prep-resource-issue-progress-pane,
.prep-resource-issue-ones-pane {
  min-width: 0;
}
.prep-resource-issue-basic-pane {
  /* 保持项目字段的自然高度，供 ONES 栏在运行时精确同步。 */
  align-self: start;
}
.prep-resource-issue-progress-pane,
.prep-resource-issue-ones-pane {
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
}
.prep-resource-issue-progress-pane,
.prep-resource-issue-ones-pane {
  display: flex;
  flex-direction: column;
  /* 两栏均与项目信息栏同步高度，超出内容在各自内容区滚动。 */
  contain: size;
  height: var(--prep-resource-issue-basic-height, 0px);
  min-height: 0;
  overflow: hidden;
}
.prep-resource-issue-basic-pane h3,
.prep-resource-issue-progress-pane h3,
.prep-resource-issue-ones-pane h3 {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}
.prep-resource-issue-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.85rem;
  margin: 0;
}
.prep-resource-issue-info-item {
  min-width: 0;
}
.prep-resource-issue-info-item.is-wide {
  grid-column: span 2;
}
.prep-resource-issue-info-item dt {
  margin: 0 0 0.22rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}
.prep-resource-issue-info-item dd {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.prep-resource-issue-info-text {
  white-space: pre-wrap;
}
.prep-resource-ship-date {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.prep-resource-fae-hint {
  margin: 0;
}
.prep-resource-issue-info-item .prep-resource-fae-select,
.prep-resource-issue-info-item .prep-resource-phase-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 2rem;
  min-height: 2rem;
  margin: 0;
  padding: 0 0.3rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, #fff);
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
}
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="sand"] { color: #7a5a16; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="blue"] { color: #1d4f8a; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="orange"] { color: #9a4b12; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="cyan"] { color: #0f766e; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="pink"] { color: #9d174d; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="red"] { color: #b91c1c; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="purple"] { color: #5b21b6; }
.prep-resource-issue-info-item .prep-resource-phase-select[data-prep-resource-phase-tone="green"] { color: #166534; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-sand { color: #7a5a16; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-blue { color: #1d4f8a; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-orange { color: #9a4b12; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-cyan { color: #0f766e; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-pink { color: #9d174d; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-red { color: #b91c1c; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-purple { color: #5b21b6; }
.prep-resource-issue-info-item .prep-resource-phase-select option.is-tone-green { color: #166534; }
.prep-resource-issue-info-item .prep-resource-issue-date-input,
.prep-resource-issue-info-item .prep-resource-text-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 2rem;
  min-height: 2rem;
  margin: 0;
  text-align: left;
}
.prep-progress-pane-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  margin: 0 0 0.45rem;
}
.prep-progress-pane-switch button {
  margin: 0;
  padding: 0.12rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
.prep-progress-pane-switch button.is-active {
  border-color: var(--border);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}
.prep-progress-original {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  max-height: 11rem;
  margin: 0 0 0.85rem;
  overflow-y: auto;
  /* 子栏滚动到边界后继续滚动项目看板，避免滚轮停留在进度栏时失效。 */
  overscroll-behavior-y: auto;
}
.prep-progress-original-empty {
  margin: 0;
}
.prep-progress-original-item {
  display: grid;
  gap: 0.12rem;
}
.prep-progress-original-item time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.prep-progress-original-item p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}
.prep-resource-issue-progress-form {
  margin: 0 0 0.85rem;
}
.prep-resource-issue-progress-form textarea {
  min-height: 5.2rem;
  font-size: 0.86rem;
}
.prep-resource-issue-progress-empty {
  margin: 0;
}
#prep_resource_issue_progress_list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.prep-resource-issue-progress-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  /* 与 ONES 列表保持相同的独立纵向滚动区域，避免长进度撑开详情栏。 */
  overflow-y: auto;
  overscroll-behavior-y: auto;
  padding-right: 0.45rem;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: color-mix(in srgb, var(--text) 38%, transparent) color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.prep-resource-issue-progress-scroll::-webkit-scrollbar,
.prep-resource-issue-ones-list::-webkit-scrollbar {
  width: 12px;
}
.prep-resource-issue-progress-scroll::-webkit-scrollbar-thumb,
.prep-resource-issue-ones-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 38%, transparent);
}
.prep-resource-issue-progress-scroll::-webkit-scrollbar-track,
.prep-resource-issue-ones-list::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.prep-resource-issue-progress-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}
.prep-resource-issue-ones-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
}
.prep-resource-issue-ones-head h3 {
  margin: 0;
}
.prep-resource-issue-ones-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.35rem;
}
.prep-resource-issue-ones-actions .toolbar-btn {
  flex: 0 0 auto;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
}
.prep-resource-issue-ones-meta {
  margin: 0 0 0.45rem;
}
#prep_resource_issue_ones_list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.prep-resource-issue-strategy-mount {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#prep_acceptance_strategy_panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.prep-resource-issue-strategy-mount #prep_acceptance_strategy_panel {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.prep-resource-issue-strategy-pane .prep-resource-issue-ones-head {
  justify-content: flex-start;
}
.prep-acceptance-strategy-switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.prep-acceptance-strategy-switch button {
  margin: 0;
  padding: 0.12rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}
.prep-acceptance-strategy-switch button.is-active {
  border-color: var(--border);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}
.prep-acceptance-strategy-switch button[hidden] { display: none; }
.prep-acceptance-package {
  display: grid;
  gap: 0.2rem;
}
.prep-acceptance-package-list {
  display: grid;
  gap: 0.35rem;
  margin: 0 0.75rem 0.75rem;
}
.prep-acceptance-package-option {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.4;
  cursor: pointer;
}
.prep-acceptance-package-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.prep-acceptance-package-option input {
  margin: 0.2rem 0 0;
}
.prep-acceptance-package-add {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.75rem 0.75rem;
}
.prep-acceptance-package-add input {
  flex: 1 1 auto;
  min-width: 0;
  height: 2rem;
  padding: 0 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.prep-acceptance-package-add button {
  flex: 0 0 auto;
  height: 2rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.prep-resource-issue-strategy-mount .prep-acceptance-strategy-body {
  flex: 1 1 0;
  height: 0;
  max-height: none;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: color-mix(in srgb, var(--text) 38%, transparent) color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.prep-resource-issue-strategy-mount .prep-acceptance-survey {
  align-self: start;
  overflow: visible;
}
.prep-resource-issue-strategy-mount .prep-acceptance-strategy-body::-webkit-scrollbar {
  width: 12px;
}
.prep-resource-issue-strategy-mount .prep-acceptance-strategy-body::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 38%, transparent);
  background-clip: padding-box;
}
.prep-resource-issue-strategy-mount .prep-acceptance-strategy-body::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.prep-resource-issue-strategy-mount .prep-acceptance-survey,
.prep-resource-issue-strategy-mount .prep-acceptance-survey-q,
.prep-resource-issue-strategy-mount .prep-acceptance-survey-follow,
.prep-resource-issue-strategy-mount .prep-acceptance-survey-field.is-block {
  max-width: 100%;
  min-width: 0;
}
.prep-resource-issue-strategy-mount .prep-acceptance-survey-q {
  grid-template-columns: minmax(0, 1fr);
}
.prep-resource-issue-strategy-mount .prep-acceptance-survey-q > p,
.prep-resource-issue-strategy-mount .prep-acceptance-survey-follow,
.prep-resource-issue-strategy-mount .prep-acceptance-strategy-lead {
  overflow-wrap: anywhere;
}
.prep-acceptance-board.is-pane-fit {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.prep-acceptance-board.is-pane-fit .prep-acceptance-line-main {
  position: static;
  z-index: auto;
  grid-template-columns: 1.5rem minmax(0, 1fr);
}
.prep-acceptance-board.is-pane-fit .prep-acceptance-line-main > :nth-child(n + 3) {
  display: none;
}
.prep-acceptance-board.is-pane-fit .prep-acceptance-line-plan {
  border-left: 0;
  padding-right: 0.35rem;
}
.prep-acceptance-board.is-pane-fit .prep-acceptance-gantt-task {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-acceptance-board.is-pane-fit .prep-acceptance-gantt-axis.is-compact {
  display: block;
  overflow: visible;
  min-height: 2.15rem;
  background: none;
}
.prep-acceptance-gantt-axis-line {
  position: absolute;
  right: 0;
  bottom: 0.08rem;
  left: 0;
  height: 0.42rem;
  border-bottom: 1.5px solid #6d5640;
  pointer-events: none;
}
.prep-acceptance-gantt-axis-line > span {
  position: absolute;
  bottom: 0;
  width: 1.5px;
  height: 0.42rem;
  background: #6d5640;
}
.prep-acceptance-gantt-axis-line > span:first-child { left: 0; }
.prep-acceptance-gantt-axis-line > span.is-mid { left: 50%; }
.prep-acceptance-gantt-axis-line > span.is-end { right: 0; }
.prep-acceptance-gantt-axis.is-compact.is-acceptance-marked::after {
  display: none;
}
.prep-acceptance-gantt-compact-label {
  position: absolute;
  top: 0;
  max-width: 46%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35rem;
  white-space: nowrap;
}
.prep-acceptance-gantt-compact-label.is-start { left: 0; text-align: left; }
.prep-acceptance-gantt-compact-label.is-mid { left: 50%; max-width: 34%; transform: translateX(-50%); text-align: center; }
.prep-acceptance-gantt-compact-label.is-end { right: 0; color: #d92d20; font-weight: 750; text-align: right; }
.prep-resource-issue-ones-list {
  display: grid;
  flex: 1 1 auto;
  gap: 0.5rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: color-mix(in srgb, var(--text) 38%, transparent) color-mix(in srgb, var(--accent) 6%, var(--surface));
  list-style: none;
}
.prep-resource-issue-history-pane {
  min-width: 0;
}
.prep-resource-issue-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
}
.prep-resource-issue-history-head h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}
.prep-resource-issue-history-meta {
  margin: 0 0 0.5rem;
}
.prep-resource-issue-history-scroll {
  max-height: min(68vh, 42rem);
  overflow: auto;
  min-width: 0;
  scrollbar-gutter: stable;
}
.prep-resource-issue-history-table-head,
.prep-resource-issue-history-item {
  display: grid;
  grid-template-columns: 8.2rem 5.4rem minmax(6.5rem, 0.9fr) minmax(8rem, 1.2fr) 1.2rem minmax(8rem, 1.2fr);
  gap: 0.45rem 0.7rem;
  align-items: start;
}
.prep-resource-issue-history-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.2rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface);
}
.prep-resource-issue-history-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prep-resource-issue-history-item {
  padding: 0.45rem 0 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.prep-resource-issue-history-item time,
.prep-resource-issue-history-operator,
.prep-resource-issue-history-field {
  font-size: 0.8rem;
  line-height: 1.4;
}
.prep-resource-issue-history-field {
  font-weight: 600;
}
.prep-resource-issue-history-value {
  min-width: 0;
  max-height: 6.4rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}
.prep-resource-issue-history-value.is-before {
  color: var(--muted);
}
.prep-resource-issue-history-arrow {
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.prep-resource-issue-history-empty {
  margin: 0;
}
@media (max-width: 860px) {
  .prep-resource-issue-history-table-head,
  .prep-resource-issue-history-item {
    grid-template-columns: 6.6rem minmax(0, 1fr);
  }
  .prep-resource-issue-history-table-head span:nth-child(n + 3),
  .prep-resource-issue-history-arrow {
    display: none;
  }
  .prep-resource-issue-history-field,
  .prep-resource-issue-history-value {
    grid-column: 1 / -1;
  }
}
.prep-resource-issue-ones-item {
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
}
.prep-resource-issue-ones-item a {
  display: block;
  color: inherit;
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.prep-resource-issue-ones-item a:hover {
  text-decoration: underline;
}
.prep-resource-issue-ones-item .small {
  margin: 0.22rem 0 0;
}
.prep-resource-issue-ones-empty {
  margin: 0;
}
.prep-resource-issue-color {
  display: inline-block;
  width: 3.2rem;
  vertical-align: middle;
}
.prep-resource-issue-color .prep-resource-color-fill {
  width: 100%;
  min-height: 1.15rem;
}
.prep-resource-issue-info-item .prep-color-status-picker {
  width: 50%;
  max-width: 50%;
}
.prep-resource-issue-info-item .prep-color-status-picker-trigger,
.prep-resource-issue-info-item .prep-color-status-swatch {
  min-height: 1.7rem;
}
.prep-resource-issue-info-item .prep-resource-color-fill {
  display: block;
  width: 50%;
  min-height: 1.7rem;
  border-radius: 6px;
}
@media (max-width: 1100px) {
  .prep-resource-issue-info-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .prep-resource-issue-ones-pane {
    grid-column: 1 / -1;
  }
  .prep-resource-issue-progress-pane,
  .prep-resource-issue-ones-pane {
    contain: none;
    height: auto;
    padding-left: 0;
    padding-top: 0.7rem;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .prep-resource-issue-strategy-mount,
  .prep-resource-issue-strategy-mount #prep_acceptance_strategy_panel {
    flex-basis: auto;
  }
  .prep-resource-issue-strategy-mount .prep-acceptance-strategy-body {
    flex-basis: auto;
    height: auto;
    max-height: min(70vh, 40rem);
  }
}
@media (max-width: 860px) {
  .prep-resource-issue-info-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .prep-resource-issue-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prep-resource-issue-progress-pane,
  .prep-resource-issue-ones-pane {
    padding-left: 0;
    padding-top: 0.7rem;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}
@media (max-width: 720px) {
  .prep-resource-issue-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .prep-resource-issue-info-item.is-wide {
    grid-column: auto;
  }
}
.prep-resource-issue-timeline-wrap {
  min-width: 0;
}
.prep-resource-issue-timeline-wrap[hidden] {
  display: none !important;
}
.prep-resource-issue-timeline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 0;
  padding: 0.85rem 0.55rem 0.55rem;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  overflow-x: auto;
}
.prep-resource-issue-timeline-item {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 0.2rem;
  text-align: center;
}
.prep-resource-issue-timeline-item:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0.34rem;
  right: 50%;
  left: -50%;
  height: 2px;
  background: color-mix(in srgb, var(--border) 88%, transparent);
}
.prep-resource-issue-timeline-item.is-done:not(:first-child)::before,
.prep-resource-issue-timeline-item.is-current:not(:first-child)::before {
  background: var(--accent);
}
.prep-resource-issue-timeline-item.is-special-start {
  margin-left: 0.55rem;
}
.prep-resource-issue-timeline-item.is-special-start::before {
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--border) 88%, transparent) 0 0.28rem,
    transparent 0.28rem 0.5rem
  );
}
.prep-resource-issue-timeline-dot {
  position: relative;
  z-index: 1;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid color-mix(in srgb, var(--border) 90%, var(--text));
  border-radius: 50%;
  background: var(--surface);
  box-sizing: border-box;
}
.prep-resource-issue-timeline-item.is-done .prep-resource-issue-timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
}
.prep-resource-issue-timeline-item.is-current .prep-resource-issue-timeline-dot {
  width: 0.92rem;
  height: 0.92rem;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.prep-resource-issue-timeline-item.is-special .prep-resource-issue-timeline-dot {
  border-radius: 3px;
}
.prep-resource-issue-timeline-item.is-status .prep-resource-issue-timeline-dot {
  border-radius: 2px;
  transform: rotate(45deg);
}
.prep-resource-issue-timeline-item.is-status .prep-resource-issue-timeline-label {
  font-size: 0.7rem;
}
.prep-resource-issue-timeline-item.is-status {
  flex-basis: 4.35rem;
  flex-grow: 0;
}
.prep-resource-issue-timeline-label {
  display: block;
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.prep-resource-issue-timeline-item.is-done .prep-resource-issue-timeline-label,
.prep-resource-issue-timeline-item.is-current .prep-resource-issue-timeline-label {
  color: var(--text);
  font-weight: 600;
}
.prep-resource-issue-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
}
.prep-resource-issue-kind-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  white-space: nowrap;
}
.prep-resource-issue-kind-wrap label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.86rem;
}
.prep-resource-issue-kind-wrap input {
  accent-color: var(--accent);
}
.prep-resource-issue-kind-wrap label:has(input:checked) span {
  color: var(--accent);
  font-weight: 700;
}
.prep-resource-issue-form input[type="text"] {
  flex: 1 1 18rem;
  min-width: 12rem;
  height: 2.1rem;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
}
.prep-resource-issue-form input[type="text"]:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
#prep_resource_issue_status {
  margin: 0;
  min-height: 1.2rem;
  flex: 1 0 100%;
}
.prep-resource-issue-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(15rem, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
}
.prep-resource-issue-column {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.prep-resource-issue-column h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
}
.prep-resource-issue-column h3 span {
  min-width: 1.4rem;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.prep-resource-issue-column-list {
  display: grid;
  gap: 0.55rem;
  flex: 1;
  align-content: start;
  max-height: min(48vh, 28rem);
  overflow: auto;
}
.prep-resource-issue-empty {
  margin: 0.35rem 0 0;
  color: var(--muted);
}
.prep-resource-issue-column.is-drop-target {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}
.prep-resource-issue-card {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.prep-resource-issue-card[data-prep-project-todo-card="1"] {
  cursor: pointer;
}
.prep-resource-issue-card.is-draggable {
  cursor: grab;
}
.prep-resource-issue-card.is-dragging {
  opacity: 0.45;
}
.prep-resource-issue-card-actions,
.prep-resource-issue-card-actions .toolbar-btn {
  cursor: pointer;
}
.prep-resource-issue-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.prep-resource-issue-kind {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
}
.prep-resource-issue-kind.is-kind-issue {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}
.prep-resource-issue-kind.is-kind-todo {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
html[data-page-background="dark"] .prep-resource-issue-kind.is-kind-issue {
  color: #fecaca;
}
html[data-page-background="dark"] .prep-resource-issue-kind.is-kind-todo {
  color: #93c5fd;
}
.prep-resource-issue-card-title {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 0.9rem;
}
.prep-resource-issue-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.prep-resource-issue-card-actions .toolbar-btn {
  min-height: 1.55rem;
  padding: 0 0.45rem;
  font-size: 0.72rem;
}
.prep-resource-fault-editor-dialog {
  width: min(44rem, calc(100vw - 2rem));
}
.prep-resource-fault-editor-form {
  display: grid;
  gap: 0.7rem;
  padding: 0 0.2rem 0.4rem;
}
.prep-resource-fault-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.8rem;
}
.prep-resource-fault-editor-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}
.prep-resource-fault-editor-form input,
.prep-resource-fault-editor-form select,
.prep-resource-fault-editor-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 2rem;
  font: inherit;
}
.prep-resource-fault-editor-form textarea {
  min-height: 4.2rem;
  resize: vertical;
}
.prep-resource-fault-rich-field {
  display: grid;
  gap: 0.3rem;
}
.prep-resource-fault-rich-field > span {
  font-size: 0.82rem;
}
.prep-resource-fault-editor-form .prep-resource-issue-rich-input {
  min-height: 7rem;
}
@media (max-width: 640px) {
  .prep-resource-fault-editor-grid { grid-template-columns: 1fr; }
}
.prep-resource-tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  max-width: 100%;
}
.prep-resource-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.prep-resource-tag.is-red {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}
.prep-resource-tag.is-yellow {
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(113, 63, 18, 0.38);
  color: #fde68a;
}
.prep-resource-tag.is-green {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(20, 83, 45, 0.38);
  color: #bbf7d0;
}
.prep-resource-tag.is-tone-sand {
  background: #f6e7c3;
  border-color: #e4c57a;
  color: #7a5a16;
}
.prep-resource-tag.is-tone-blue {
  background: #cfe4ff;
  border-color: #9cc7f5;
  color: #1d4f8a;
}
.prep-resource-tag.is-tone-orange {
  background: #ffd8b5;
  border-color: #f0b07a;
  color: #9a4b12;
}
.prep-resource-tag.is-tone-cyan {
  background: #c5f3ef;
  border-color: #8edbd4;
  color: #0f766e;
}
.prep-resource-tag.is-tone-pink {
  background: #f8d0e0;
  border-color: #e8a4bf;
  color: #9d174d;
}
.prep-resource-tag.is-tone-red {
  background: #ffd0d0;
  border-color: #f0a3a3;
  color: #b91c1c;
}
.prep-resource-tag.is-tone-purple {
  background: #e4d6ff;
  border-color: #c4b0ef;
  color: #5b21b6;
}
.prep-resource-tag.is-tone-green {
  background: #d3f5dc;
  border-color: #9edeb0;
  color: #166534;
}
.prep-resource-tag.is-tone-teal {
  background: #c7efe8;
  border-color: #8ed4c8;
  color: #0f766e;
}
.prep-resource-tag.is-tone-gold {
  background: #ffe7a3;
  border-color: #e6c56a;
  color: #854d0e;
}

.prep-acceptance-filter-grid { grid-template-columns: minmax(14rem, 22rem); }
.prep-acceptance-manager-select { position: relative; padding: 0; overflow: visible; }
.prep-acceptance-manager-select > summary { min-height: 2.5rem; padding: .6rem .75rem; }
.prep-acceptance-manager-select__label { flex: 0 0 auto; }
.prep-acceptance-manager-select__value { margin-left: auto; color: var(--muted); font-size: .84rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-acceptance-manager-select > :not(summary) { margin-left: .75rem; margin-right: .75rem; }
.prep-acceptance-manager-select[open] { box-shadow: 0 12px 30px rgba(2, 6, 23, .28); }
[data-prep-acceptance-filter-group="project_manager"] .prep-acceptance-filter-options { display: grid; max-height: 16rem; overflow-y: auto; padding-right: .15rem; }
[data-prep-acceptance-filter-group="project_manager"] .prep-acceptance-filter-option { align-items: center; min-width: 0; }
.prep-acceptance-project-list { display: grid; gap: .75rem; min-width: 0; }
.prep-acceptance-project-card { padding: .8rem .9rem; border: 1px solid rgba(148, 163, 184, .16); border-radius: 14px; background: rgba(15, 23, 42, .35); }
.prep-acceptance-project-card__header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.prep-acceptance-project-card__header .prep-acceptance-project-btn { width: auto; max-width: 100%; color: #93c5fd; font-weight: 700; }
.prep-acceptance-info-bubbles { display: flex; flex-wrap: wrap; gap: .45rem; }
.prep-acceptance-info-bubble { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; min-height: 1.85rem; padding: .24rem .65rem; border: 1px solid rgba(148, 163, 184, .2); border-radius: 999px; background: rgba(30, 41, 59, .58); color: var(--text); font-size: .82rem; overflow-wrap: anywhere; }
.prep-acceptance-info-bubble b { color: var(--muted); font-weight: 600; white-space: nowrap; }
.prep-acceptance-info-bubble.is-duration { border-color: rgba(96, 165, 250, .4); background: rgba(30, 64, 175, .22); }
.prep-acceptance-info-bubble.is-warning { border-color: rgba(251, 191, 36, .38); background: rgba(120, 53, 15, .22); }
@media (max-width: 640px) { .prep-acceptance-filter-grid { grid-template-columns: 1fr; } .prep-acceptance-project-card { padding: .75rem; } .prep-acceptance-project-card__header { align-items: flex-start; flex-direction: column; gap: .45rem; } }

/* 交付看板各视图统一采用组别视图的主题表面与前景色，避免浅色背景下残留深色固定底。 */
#prep_delivery_panel .delivery-table-wrap,
#prep_delivery_panel .delivery-table-bottom-scroll,
#prep_delivery_panel .delivery-project-matrix-wrap,
#prep_delivery_panel .delivery-overdue-table-wrap {
  background: var(--surface);
  color: var(--text);
}

#prep_delivery_panel .delivery-table th,
#prep_delivery_panel .delivery-table .sticky-col,
#prep_delivery_panel .delivery-table tbody .sticky-col,
#prep_delivery_panel .delivery-project-matrix thead th,
#prep_delivery_panel .delivery-project-matrix .delivery-project-matrix-sticky,
#prep_delivery_panel .delivery-project-matrix .delivery-project-matrix-sticky-right,
#prep_delivery_panel .delivery-project-matrix tfoot th,
#prep_delivery_panel .delivery-project-matrix tfoot td {
  /* 覆盖矩阵旧版深色固定列，项目/超期视图与时间视图共用主题表头色。 */
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text);
}

#prep_delivery_panel .delivery-table tbody tr:nth-child(even) td,
#prep_delivery_panel .delivery-project-matrix tbody tr:nth-child(even) td,
#prep_delivery_panel .delivery-project-matrix tbody tr:nth-child(even) th.delivery-project-matrix-person {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  color: var(--text);
}

#prep_delivery_panel .delivery-table tbody tr:hover td,
#prep_delivery_panel .delivery-project-matrix tbody tr:hover td,
#prep_delivery_panel .delivery-project-matrix tbody tr:hover th.delivery-project-matrix-person {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}

#prep_delivery_panel .delivery-table tbody tr.delivery-row--normal .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--normal .sticky-col--action,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--busy .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--busy .sticky-col--action,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--vacation .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--vacation .sticky-col--action,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--office .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--office .sticky-col--action,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--poc .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--poc .sticky-col--action {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
}

#prep_delivery_panel .delivery-table tbody tr.delivery-row--selected td,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--selected .sticky-col--name,
#prep_delivery_panel .delivery-table tbody tr.delivery-row--selected .sticky-col--action {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  color: var(--text);
}

#prep_delivery_panel .delivery-days-badge {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
}

#prep_delivery_panel .delivery-days-badge.is-empty {
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
  color: var(--muted);
}

#prep_delivery_panel .delivery-project-matrix-total,
#prep_delivery_panel .delivery-project-matrix tbody .delivery-project-matrix-total.delivery-project-matrix-sticky-right,
#prep_delivery_panel .delivery-project-matrix tfoot .delivery-project-matrix-total.delivery-project-matrix-sticky-right {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)) !important;
  color: var(--text);
}

/* 项目/超期矩阵的冻结姓名与合计列旧版自带深色 !important；以完整层级覆盖全部行状态。 */
#prep_delivery_panel .delivery-project-matrix tbody th.delivery-project-matrix-person.delivery-project-matrix-sticky,
#prep_delivery_panel .delivery-project-matrix tbody td.delivery-project-matrix-total.delivery-project-matrix-sticky-right {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text) !important;
}

#prep_delivery_panel .delivery-project-matrix tbody tr:nth-child(even) th.delivery-project-matrix-person.delivery-project-matrix-sticky,
#prep_delivery_panel .delivery-project-matrix tbody tr:nth-child(even) td.delivery-project-matrix-total.delivery-project-matrix-sticky-right {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface)) !important;
}

#prep_delivery_panel .delivery-project-matrix tbody tr:hover th.delivery-project-matrix-person.delivery-project-matrix-sticky,
#prep_delivery_panel .delivery-project-matrix tbody tr:hover td.delivery-project-matrix-total.delivery-project-matrix-sticky-right {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)) !important;
}

#prep_delivery_panel .delivery-tag,
#prep_delivery_panel .delivery-overdue-status-chip {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  color: var(--text);
}

#prep_delivery_panel .delivery-person-name-btn {
  color: var(--accent-dim);
}

#prep_delivery_panel .delivery-person-name-btn:hover,
#prep_delivery_panel .delivery-person-name-btn:focus-visible {
  color: var(--accent);
}

/* 打卡统计：视图切换 + 本月/本周/当日 + 搜索强制同一行，腾出纵向空间给明细 */
#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-controls-cluster,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-controls-cluster,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.4rem 0.5rem !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: none !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-view-switch,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-view-switch,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-view-switch {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  grid-column: auto !important;
  order: 1;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-time-clock-actions,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-time-clock-actions,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-time-clock-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 0.35rem !important;
  order: 2;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  padding: 0 !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  flex: 0 1 auto !important;
  align-items: center !important;
  gap: 0.35rem !important;
  order: 3;
  grid-column: auto !important;
  grid-row: auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .delivery-board-search,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .delivery-board-search,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search,
#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-controls .delivery-board-search {
  flex: 0 0 auto !important;
  width: 11rem !important;
  min-width: 9rem !important;
  max-width: 11rem !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .delivery-board-search input,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .delivery-board-search input,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-search-row .delivery-board-search input {
  width: 100% !important;
  min-width: 0 !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .toolbar-btn,
#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row button,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row .toolbar-btn,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row button {
  flex: 0 0 auto !important;
  width: auto !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row #btn_extend_delivery_board_week,
#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-search-row #prep_delivery_today_status_filters {
  display: none !important;
}

#prep_delivery_panel.is-time-clock-stats-mode #prep_time_clock_range_nav,
body.is-mobile #prep_delivery_panel.is-time-clock-stats-mode #prep_time_clock_range_nav,
body.is-mobile .delivery-board-controls-cluster:has(#prep_time_clock_range_nav:not([hidden])) .delivery-board-secondary-nav--sublevel {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  flex: 1 0 100% !important;
  order: 4;
  width: 100% !important;
  max-width: 100% !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

#prep_delivery_panel.is-time-clock-stats-mode #prep_time_clock_range_nav .delivery-board-secondary-nav__filters {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  width: 100%;
  max-width: 100%;
  gap: 0.45rem 0.85rem;
}

#prep_delivery_panel.is-time-clock-stats-mode #prep_time_clock_range_nav .delivery-month-filter {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-heading-center {
  display: none !important;
}

#prep_delivery_panel.is-time-clock-stats-mode .delivery-board-fullscreen-btn {
  align-self: flex-start;
}

/* 打卡统计再压缩工具条高度，明细区域尽量占满 */
body.is-prep-time-clock-page #prep_delivery_panel > .delivery-board-controls {
  width: 100%;
  align-self: stretch;
  min-height: 0;
  padding-inline-end: 4.5rem;
  gap: 0.25rem;
}

body.is-prep-time-clock-page #prep_delivery_panel .delivery-board-secondary-nav--sublevel {
  padding-top: 0.2rem;
  margin-top: 0;
}

body.is-prep-time-clock-page #prep_delivery_panel .delivery-board-controls-status {
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

/* 工时打卡按人员：其它列保持收紧；仅加宽当前异常 / 最近打卡 / 最近地点 */
.delivery-table td.prep-tc-project-cell,
.delivery-table td.prep-tc-ellipsis-cell {
  max-width: 7.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.delivery-table--time-clock-person {
  /* 勿拉满 100%，否则剩余宽度会被均分到所有列 */
  table-layout: auto !important;
  width: max-content !important;
  min-width: 0 !important;
}

#prep_delivery_panel .delivery-table-wrap.delivery-table-wrap--time-clock-person,
.delivery-table-wrap.delivery-table-wrap--time-clock-person {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.delivery-table-wrap--time-clock-person::-webkit-scrollbar {
  display: none;
  height: 0;
}

.prep-board-hscroll,
.prep-tc-person-hscroll {
  position: fixed;
  z-index: 80;
  height: 14px;
  margin: 0;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 18%, var(--surface));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--bg) 55%, transparent);
  cursor: grab;
  touch-action: none;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.prep-board-hscroll.is-needed.is-visible,
.prep-board-hscroll.is-needed.is-dragging,
.prep-tc-person-hscroll.is-needed.is-visible,
.prep-tc-person-hscroll.is-needed.is-dragging {
  opacity: 1;
  pointer-events: auto;
  background: color-mix(in srgb, var(--text) 22%, var(--surface));
}

.prep-board-hscroll.is-dragging,
.prep-tc-person-hscroll.is-dragging {
  cursor: grabbing;
}

.prep-board-hscroll-track {
  position: relative;
  height: 100%;
  border-radius: inherit;
}

.prep-board-hscroll-thumb {
  position: absolute;
  top: 2px;
  left: 0;
  height: 10px;
  min-width: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 55%, transparent);
}

.prep-board-hscroll-thumb:hover,
.prep-board-hscroll.is-dragging .prep-board-hscroll-thumb {
  background: color-mix(in srgb, var(--text) 72%, transparent);
}

html.is-mobile .prep-board-hscroll,
body.is-mobile .prep-board-hscroll,
html.is-mobile .prep-tc-person-hscroll,
body.is-mobile .prep-tc-person-hscroll {
  display: none;
}

@media (min-width: 769px) {
  /* 根元素或 body 单独设 overflow 都会被提升到视口，缩高度盖不住横条。html 先裁切，body 再滚动。 */
  html.is-board-hscroll-inset:not(.is-mobile) {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  html.is-board-hscroll-inset:not(.is-mobile) body.is-prep-board-page {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    min-height: 0;
    overflow: auto;
  }

  html.is-board-hscroll-inset:not(.is-mobile) body.is-prep-board-page.modal-open {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

.delivery-table--time-clock-person th,
.delivery-table--time-clock-person td {
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-table--time-clock-person th.prep-tc-anomaly-col,
.delivery-table--time-clock-person td.prep-tc-anomaly-cell {
  width: 12rem;
  min-width: 12rem;
  max-width: 16rem;
  padding-inline: 0.45rem;
  padding-block: 0.35rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  vertical-align: top;
  line-height: 1.35;
}

.delivery-table--time-clock-person .prep-tc-anomaly-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prep-tc-anomaly-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dim);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.prep-tc-anomaly-link:hover,
.prep-tc-anomaly-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.prep-tc-anomaly-line.is-made-up,
.prep-tc-anomaly-link.is-made-up {
  color: color-mix(in srgb, #166534 78%, var(--text));
}

.prep-tc-anomaly-link.is-made-up:hover,
.prep-tc-anomaly-link.is-made-up:focus-visible {
  color: color-mix(in srgb, #166534 92%, var(--accent));
}

.prep-tc-detail-modal-dialog {
  width: min(96vw, 1280px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.prep-tc-detail-modal-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.prep-tc-detail-modal-fields {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 打卡详情弹层不在 #prep_delivery_panel 内，需单独覆盖交付表的深色斑马纹。 */
#prep_time_clock_detail_modal .delivery-table-wrap,
#prep_time_clock_detail_modal .delivery-table,
.delivery-table--time-clock-detail {
  background: var(--surface);
  color: var(--text);
}
.delivery-table--time-clock-detail {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
}
#prep_time_clock_detail_modal .delivery-table th,
#prep_time_clock_detail_modal .delivery-table td,
.delivery-table--time-clock-detail th,
.delivery-table--time-clock-detail td {
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 0.45rem 0.6rem;
  background: var(--surface);
  color: var(--text);
  white-space: nowrap;
}
#prep_time_clock_detail_modal .delivery-table th,
.delivery-table--time-clock-detail th {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text);
}
#prep_time_clock_detail_modal .delivery-table tbody tr:nth-child(even) td,
.delivery-table--time-clock-detail tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  color: var(--text);
}
#prep_time_clock_detail_modal .delivery-table tbody tr:hover td,
.delivery-table--time-clock-detail tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}

#prep_time_clock_detail_modal .delivery-table-wrap {
  flex: 1 1 auto;
  min-height: 12rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
  touch-action: pan-x pan-y;
}

#prep_time_clock_detail_modal .prep-tc-detail-op {
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: -8px 0 10px rgba(15, 23, 42, 0.06);
}

#prep_time_clock_detail_modal .delivery-table th.prep-tc-detail-op {
  top: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
}

#prep_time_clock_detail_modal .delivery-table tbody tr:nth-child(even) td.prep-tc-detail-op {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

#prep_time_clock_detail_modal .delivery-table tbody tr:hover td.prep-tc-detail-op {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.delivery-table--time-clock-person th.prep-tc-person-col,
.delivery-table--time-clock-person td.prep-tc-person-cell {
  width: 1%;
  min-width: 8.5rem;
  max-width: 10rem;
  padding-inline: 0.45rem;
}
.delivery-table--time-clock-person .prep-tc-person-link {
  width: 100%;
  color: var(--accent-dim);
  font-weight: 650;
}
.delivery-table--time-clock-person .prep-tc-person-link:hover,
.delivery-table--time-clock-person .prep-tc-person-link:focus-visible {
  color: var(--accent);
}
.prep-tc-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.prep-tc-detail-head .delivery-today-view-meta {
  margin: 0.15rem 0 0;
}

.delivery-table--time-clock-person th.prep-tc-count-col,
.delivery-table--time-clock-person td.prep-tc-count-cell {
  width: 1%;
  min-width: 3.2rem;
  max-width: 4rem;
  text-align: center;
  padding-inline: 0.25rem;
}

.delivery-table--time-clock-person th.prep-tc-inout-col,
.delivery-table--time-clock-person td.prep-tc-inout-cell {
  width: 1%;
  min-width: 4.8rem;
  max-width: 5.4rem;
  text-align: center;
  padding-inline: 0.3rem;
}

.delivery-table--time-clock-person th.prep-tc-manager-col,
.delivery-table--time-clock-person td.prep-tc-manager-cell {
  width: 1%;
  min-width: 3.6rem;
  max-width: 4.6rem;
  padding-inline: 0.3rem;
}

.delivery-table--time-clock-person th.prep-tc-project-col,
.delivery-table--time-clock-person td.prep-tc-project-cell {
  width: 1%;
  min-width: 8.5rem;
  max-width: 11rem;
  padding-inline: 0.35rem;
}

.delivery-table--time-clock-person th.prep-tc-approval-col,
.delivery-table--time-clock-person td.prep-tc-approval-cell {
  width: 1%;
  min-width: 4.2rem;
  max-width: 5rem;
  padding-inline: 0.3rem;
}

/* 仅这三列加宽，不把整表拉满后均分 */
.delivery-table--time-clock-person th.prep-tc-punch-col,
.delivery-table--time-clock-person td.prep-tc-punch-cell {
  width: 14.5rem;
  min-width: 14.5rem;
  max-width: 16.5rem;
  padding-inline: 0.4rem;
}

.delivery-table--time-clock-subsidy {
  table-layout: auto !important;
  width: max-content !important;
  min-width: max-content !important;
}

.delivery-table--time-clock-subsidy th,
.delivery-table--time-clock-subsidy td {
  width: auto !important;
  min-width: 0;
  max-width: none !important;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.42rem 0.5rem;
}

.delivery-table--time-clock-subsidy thead th {
  position: relative;
  overflow: visible;
}

.delivery-table--time-clock-subsidy .prep-tc-person-link,
.delivery-table--time-clock-subsidy .prep-tc-subsidy-person-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dim);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.delivery-table--time-clock-subsidy .prep-tc-subsidy-person-link:hover,
.delivery-table--time-clock-subsidy .prep-tc-subsidy-person-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.delivery-table--time-clock-subsidy th.prep-tc-person-col,
.delivery-table--time-clock-subsidy td.prep-tc-person-cell {
  min-width: 9rem;
  padding-inline: 0.6rem;
  text-align: left;
}

.delivery-table--time-clock-subsidy th.prep-tc-money-col,
.delivery-table--time-clock-subsidy td.prep-tc-money-cell {
  min-width: 6.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.delivery-table--time-clock-subsidy th.prep-tc-ot-col,
.delivery-table--time-clock-subsidy td.prep-tc-ot-cell {
  min-width: 8rem;
}

.delivery-table--time-clock-subsidy th.prep-tc-count-col,
.delivery-table--time-clock-subsidy td.prep-tc-count-cell {
  min-width: 5.4rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.delivery-table--time-clock-subsidy tfoot td {
  font-weight: 600;
}

.delivery-table--time-clock-subsidy td.prep-tc-reason-cell {
  white-space: nowrap;
  min-width: 0;
  max-width: none !important;
  color: var(--muted);
}

.delivery-table--time-clock-subsidy tr.is-skipped td {
  color: var(--muted);
}

.prep-tc-subsidy-person-detail {
  margin-top: 1.25rem;
}

.prep-tc-subsidy-person-detail__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 650;
}

.delivery-table--time-clock-subsidy-detail {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

.delivery-table--time-clock-subsidy-detail.is-col-resized {
  width: max-content !important;
  min-width: 0 !important;
}

.delivery-table--time-clock-subsidy-detail th,
.delivery-table--time-clock-subsidy-detail td {
  min-width: 0 !important;
  padding: 0.38rem 0.4rem;
}

.delivery-table--time-clock-subsidy-detail th.prep-tc-money-col,
.delivery-table--time-clock-subsidy-detail td.prep-tc-money-cell,
.delivery-table--time-clock-subsidy-detail th.prep-tc-count-col,
.delivery-table--time-clock-subsidy-detail td.prep-tc-count-cell {
  min-width: 0 !important;
}

.delivery-table--time-clock-subsidy-detail td.prep-tc-money-cell--edit {
  overflow: visible;
  white-space: nowrap;
}

.delivery-table--time-clock-subsidy-detail td.prep-tc-reason-cell {
  white-space: normal;
  line-height: 1.35;
}

.delivery-table--time-clock-detail td.prep-tc-location-cell--wrap,
.delivery-table--time-clock-subsidy-detail td.prep-tc-location-cell--wrap {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
}

.prep-tc-subsidy-amount-input {
  width: 4.2rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.15rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: right;
  font: inherit;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--text);
  appearance: textfield;
}

.prep-tc-subsidy-amount-input::-webkit-outer-spin-button,
.prep-tc-subsidy-amount-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.prep-tc-subsidy-amount-input.is-overridden {
  border-color: #c2410c;
  background: #fff7ed;
}

.prep-tc-subsidy-manual-mark {
  display: inline-block;
  margin-left: 0.28rem;
  padding: 0 0.28rem;
  border-radius: 4px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.75em;
  font-weight: 650;
  line-height: 1.45;
  vertical-align: middle;
  white-space: nowrap;
}

.delivery-table--time-clock-subsidy tr.is-skipped .prep-tc-subsidy-amount-input {
  color: var(--text);
}

.prep-tc-subsidy-restore {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dim);
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}

.prep-tc-subsidy-restore:hover,
.prep-tc-subsidy-restore:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.prep-tc-subsidy-col-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  margin-right: -4px;
  height: 100%;
  cursor: col-resize;
  z-index: 12;
  user-select: none;
  touch-action: none;
}

.prep-tc-subsidy-col-resize-handle:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.delivery-table-wrap--time-clock-subsidy,
#prep_delivery_panel .delivery-table-wrap.delivery-table-wrap--time-clock-subsidy,
#prep_time_clock_subsidy_modal .delivery-table-wrap {
  overflow-x: auto;
  min-width: 0;
  width: 100%;
}

.prep-tc-subsidy-modal-dialog {
  width: min(98vw, 1280px);
}

.prep-tc-subsidy-export-modal-dialog {
  width: min(96vw, 1040px);
  display: flex;
  flex-direction: column;
  height: min(920px, calc(100vh - 4rem));
  max-height: calc(100vh - 4rem);
  overflow: hidden;
}

.prep-tc-subsidy-export-modal-dialog .modal-header {
  margin-bottom: 0.55rem;
  padding-top: 0.7rem;
  padding-bottom: 0.55rem;
}

.prep-tc-subsidy-export-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  flex: 1 1 auto;
}

.prep-tc-subsidy-export-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: nowrap;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.prep-tc-subsidy-export-toolbar-actions,
.prep-tc-subsidy-export-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.prep-tc-subsidy-export-toolbar-actions {
  flex-wrap: nowrap;
}

.prep-tc-subsidy-export-groups {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.prep-tc-subsidy-export-columns {
  display: grid;
  grid-template-columns: minmax(13.5rem, 18rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0.85rem;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.prep-tc-subsidy-export-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
  overflow: hidden;
}

.prep-tc-subsidy-export-column__title {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.prep-tc-subsidy-export-column__body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  padding: 0.45rem;
}

.prep-tc-subsidy-export-group-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.55rem;
  border-radius: 0.45rem;
  cursor: pointer;
}

.prep-tc-subsidy-export-group-item.is-active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.prep-tc-subsidy-export-group-item .small {
  margin-left: auto;
  white-space: nowrap;
}

.prep-tc-subsidy-export-people-group + .prep-tc-subsidy-export-people-group {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.prep-tc-subsidy-export-people-group__title {
  margin: 0.15rem 0.2rem 0.55rem;
  font-size: 0.92rem;
}

.prep-tc-subsidy-export-people-empty {
  margin: 0.45rem 0.35rem;
}

.prep-tc-subsidy-export-group__people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.45rem 0.85rem;
}

@media (max-width: 760px) {
  .prep-tc-subsidy-export-columns {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: visible;
  }

  .prep-tc-subsidy-export-groups {
    overflow: auto;
  }

  .prep-tc-subsidy-export-column__body {
    flex: none;
    max-height: 14rem;
  }
}

.prep-tc-subsidy-export-person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  cursor: pointer;
}

.prep-tc-subsidy-export-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prep-tc-subsidy-export-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 0.25rem;
  background: var(--surface);
}

#prep_time_clock_subsidy_modal .delivery-table-wrap,
#prep_time_clock_subsidy_modal .delivery-table,
#prep_time_clock_subsidy_modal .delivery-table--time-clock-subsidy {
  background: var(--surface);
  color: var(--text);
}

#prep_time_clock_subsidy_modal .delivery-table th {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text);
}

#prep_time_clock_subsidy_modal .delivery-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  color: var(--text);
}

#prep_time_clock_subsidy_modal .delivery-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}

.delivery-table--time-clock-person th.prep-tc-location-col,
.delivery-table--time-clock-person td.prep-tc-location-cell {
  width: 14rem;
  min-width: 14rem;
  max-width: 18rem;
  padding-inline: 0.45rem;
}

.prep-tc-makeup-window {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.7rem;
  margin: 0 0 0.75rem;
}

.prep-tc-makeup-window-label {
  font-weight: 600;
}

.prep-tc-makeup-window input[type="date"] {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
}

.delivery-table--time-clock-makeup {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 0 !important;
}

.delivery-table-wrap--time-clock-makeup,
#prep_delivery_panel .delivery-table-wrap.delivery-table-wrap--time-clock-makeup {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.delivery-table--time-clock-makeup th,
.delivery-table--time-clock-makeup td {
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delivery-table--time-clock-makeup thead th {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
}

.delivery-table--time-clock-makeup tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.delivery-table--time-clock-makeup tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.delivery-table--time-clock-makeup th.prep-tc-person-col,
.delivery-table--time-clock-makeup td.prep-tc-person-cell,
.delivery-table--time-clock-makeup th.prep-tc-group-col,
.delivery-table--time-clock-makeup td.prep-tc-group-cell {
  min-width: 7.5rem;
}

.delivery-table--time-clock-makeup .prep-tc-person-link {
  color: inherit;
}

.delivery-table--time-clock-makeup .prep-tc-person-link:hover,
.delivery-table--time-clock-makeup .prep-tc-person-link:focus-visible {
  color: var(--accent);
}

.delivery-table--time-clock-makeup th.prep-tc-date-col,
.delivery-table--time-clock-makeup td.prep-tc-date-cell,
.delivery-table--time-clock-makeup th.prep-tc-need-col,
.delivery-table--time-clock-makeup td.prep-tc-need-cell,
.delivery-table--time-clock-makeup th.prep-tc-makeup-status-col,
.delivery-table--time-clock-makeup td.prep-tc-makeup-status-cell {
  min-width: 6.5rem;
}

.delivery-table--time-clock-makeup td.prep-tc-date-cell .prep-tc-anomaly-link {
  display: inline;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.delivery-table--time-clock-makeup td.prep-tc-date-cell .prep-tc-anomaly-link:hover,
.delivery-table--time-clock-makeup td.prep-tc-date-cell .prep-tc-anomaly-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.prep-tc-makeup-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.2;
}

.prep-tc-makeup-status.is-pending {
  color: color-mix(in srgb, #9a3412 88%, var(--text));
  background: color-mix(in srgb, #f97316 18%, var(--surface));
}

.prep-tc-makeup-status.is-done {
  color: color-mix(in srgb, #166534 88%, var(--text));
  background: color-mix(in srgb, #22c55e 18%, var(--surface));
}

.delivery-table--time-clock-makeup tr.is-makeup-pending td.prep-tc-makeup-status-cell {
  font-weight: 600;
}

/* 审批列要放下「审批人 · 状态」和通过/拒绝，不能沿用交付表 6rem 列宽 */
.delivery-table--time-clock-makeup th.prep-tc-approval-col,
.delivery-table--time-clock-makeup td.prep-tc-approval-cell {
  width: auto;
  min-width: 18rem;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  padding-inline: 0.45rem;
}



/* 项目资源看板：跨项目代办聚合 */
.prep-project-todo-board {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
}
.prep-project-todo-board > .prep-resource-issue-board {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}
.prep-project-todo-heading h2 { margin: 0; font-size: 1.1rem; }
.prep-project-todo-heading p { margin: 0.3rem 0 0.85rem; }
.prep-project-todo-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin: 0 0 0.65rem;
}
.prep-project-todo-kind-switch {
  display: flex;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin: 0;
}
.prep-project-todo-kind-count {
  min-width: 1.2rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3rem;
  text-align: center;
}
.prep-project-todo-filters {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.prep-project-todo-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.prep-project-todo-filter-combo { position: relative; }
.prep-project-todo-filter-combo::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  top: 0.7rem;
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  pointer-events: none;
}
.prep-project-todo-filter-combo:has(input[aria-expanded="true"])::after {
  top: 0.85rem;
  transform: rotate(225deg);
}
.prep-project-todo-filter-combo input[type="search"] {
  width: 11rem;
  max-width: 100%;
  min-height: 2rem;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 0.84rem;
  padding: 0.2rem 1.35rem 0.2rem 0.45rem;
}
.prep-project-todo-filter-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 0.2rem);
  left: 0;
  min-width: 100%;
  max-height: 16rem;
  overflow: auto;
  display: grid;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(70, 52, 28, 0.12);
}
.prep-project-todo-filter-menu[hidden],
.prep-project-todo-filter-option[hidden],
.prep-project-todo-filter-empty[hidden] { display: none; }
.prep-project-todo-filter-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: nowrap;
}
.prep-project-todo-filter-option:hover { background: rgba(61, 139, 253, 0.12); }
.prep-project-todo-filter-option input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  flex: 0 0 auto;
}
.prep-project-todo-filter-empty {
  margin: 0;
  padding: 0.35rem 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.prep-project-todo-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.prep-project-todo-column > h3 {
  flex: 0 0 auto;
}
.prep-project-todo-column-list {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  flex: 1 1 0%;
  min-height: 0;
  overflow: auto;
}
.prep-project-todo-group {
  display: grid;
  gap: 0.35rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface));
}
.prep-project-todo-group-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
  font-size: 0.82rem;
}
.prep-project-todo-group-name {
  min-width: 0;
  font-weight: 750;
}
.prep-project-todo-group-code {
  flex: 0 0 auto;
  color: #9a642e;
  font-weight: 700;
}
.prep-project-todo-group-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 650;
}
.prep-project-todo-group-manager {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}
.prep-project-todo-group-list {
  display: grid;
  gap: 0.4rem;
}
.prep-project-todo-card { position: relative; display: grid; gap: 0.18rem; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.prep-project-todo-card.is-draggable { cursor: grab; }
.prep-project-todo-card.is-mark-red,
.prep-resource-issue-card.is-mark-red,
.prep-project-todo-dialog.is-mark-red,
.prep-project-todo-dialog.is-mark-red .modal-header {
  background: #f99c95;
  border-color: #f76964;
  color: #463625;
}
.prep-project-todo-card.is-mark-orange,
.prep-resource-issue-card.is-mark-orange,
.prep-project-todo-dialog.is-mark-orange,
.prep-project-todo-dialog.is-mark-orange .modal-header {
  background: #ffb067;
  border-color: #f07a12;
  color: #463625;
}
.prep-project-todo-card.is-mark-yellow,
.prep-resource-issue-card.is-mark-yellow,
.prep-project-todo-dialog.is-mark-yellow,
.prep-project-todo-dialog.is-mark-yellow .modal-header {
  background: #ffd85b;
  border-color: #e3ae00;
  color: #463625;
}
.prep-project-todo-card.is-mark-green,
.prep-resource-issue-card.is-mark-green,
.prep-project-todo-dialog.is-mark-green,
.prep-project-todo-dialog.is-mark-green .modal-header {
  background: #8ed765;
  border-color: #52c41a;
  color: #463625;
}
.prep-project-todo-card.is-mark-cyan,
.prep-resource-issue-card.is-mark-cyan,
.prep-project-todo-dialog.is-mark-cyan,
.prep-project-todo-dialog.is-mark-cyan .modal-header {
  background: #6fd8e4;
  border-color: #12a8b8;
  color: #463625;
}
.prep-project-todo-card.is-mark-blue,
.prep-resource-issue-card.is-mark-blue,
.prep-project-todo-dialog.is-mark-blue,
.prep-project-todo-dialog.is-mark-blue .modal-header {
  background: #8eb6f7;
  border-color: #3b78e8;
  color: #463625;
}
.prep-project-todo-card.is-mark-purple,
.prep-resource-issue-card.is-mark-purple,
.prep-project-todo-dialog.is-mark-purple,
.prep-project-todo-dialog.is-mark-purple .modal-header {
  background: #d2a6f5;
  border-color: #a44ee0;
  color: #463625;
}
.prep-project-todo-card[class*="is-mark-"] .prep-project-todo-card-meta,
.prep-project-todo-card[class*="is-mark-"] .prep-project-todo-progressbar em,
.prep-project-todo-card[class*="is-mark-"] .prep-project-todo-code-inline,
.prep-project-todo-card[class*="is-mark-"] .prep-acceptance-project-btn,
.prep-project-todo-dialog[class*="is-mark-"] .prep-project-todo-dialog-meta,
.prep-project-todo-dialog[class*="is-mark-"] .prep-project-todo-field,
.prep-project-todo-dialog[class*="is-mark-"] .prep-project-todo-subtasks-head,
.prep-project-todo-dialog[class*="is-mark-"] .prep-project-todo-dialog-color-label {
  color: #6d5640;
}
.prep-project-todo-color-wrap { position: absolute; top: 0.22rem; right: 2.75rem; z-index: 2; }
.prep-project-todo-dialog-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}
#prep_project_todo_dialog_color {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-height: 1.45rem;
}
#prep_project_todo_dialog_color .prep-project-todo-color-wrap { position: static; }
.prep-project-todo-dialog-color-label {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}
.prep-project-todo-color {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.prep-project-todo-color.is-readonly { cursor: default; }
.prep-project-todo-color > span,
.prep-project-todo-color-option > span {
  width: 0.72rem;
  height: 0.72rem;
  border: 1.5px solid rgba(120, 96, 70, 0.45);
  border-radius: 999px;
  background: transparent;
}
.prep-project-todo-color.is-red > span,
.prep-project-todo-color-option.is-red > span { background: #f76964; border-color: #f76964; }
.prep-project-todo-color.is-orange > span,
.prep-project-todo-color-option.is-orange > span { background: #f07a12; border-color: #f07a12; }
.prep-project-todo-color.is-yellow > span,
.prep-project-todo-color-option.is-yellow > span { background: #ffc60a; border-color: #ffc60a; }
.prep-project-todo-color.is-green > span,
.prep-project-todo-color-option.is-green > span { background: #52c41a; border-color: #52c41a; }
.prep-project-todo-color.is-cyan > span,
.prep-project-todo-color-option.is-cyan > span { background: #12b5c8; border-color: #12b5c8; }
.prep-project-todo-color.is-blue > span,
.prep-project-todo-color-option.is-blue > span { background: #3b78e8; border-color: #3b78e8; }
.prep-project-todo-color.is-purple > span,
.prep-project-todo-color-option.is-purple > span { background: #a44ee0; border-color: #a44ee0; }
.prep-project-todo-color-menu {
  z-index: 40;
  display: grid;
  gap: 0.12rem;
  min-width: 6.4rem;
  padding: 0.28rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(40, 28, 16, 0.16);
}
.prep-project-todo-color-menu[hidden] { display: none; }
.prep-project-todo-color-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.4rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}
.prep-project-todo-color-option:hover,
.prep-project-todo-color-option.is-selected { background: rgba(120, 96, 70, 0.1); }
.prep-project-todo-card-delete {
  position: absolute;
  top: 0.22rem;
  right: 0.22rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.prep-project-todo-card-delete:hover { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.prep-project-todo-card-project { padding-right: 4.5rem; }
.prep-project-todo-progressbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.prep-project-todo-progressbar-track {
  flex: 1 1 auto;
  height: 0.42rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(124, 133, 152, 0.28);
}
.prep-project-todo-progressbar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3d8bfd;
}
.prep-project-todo-progressbar em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
}
.prep-project-todo-dialog {
  position: fixed;
  width: min(100vw - 1rem, 44rem);
  margin: 0;
  min-height: 0;
  max-height: calc(100vh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: visible;
}
#prep_project_todo_dialog.modal-overlay {
  z-index: 1100;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
}
.prep-project-todo-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 1rem 1rem;
  overflow: auto;
}
.prep-project-todo-dialog-project,
.prep-project-todo-dialog-meta { margin: 0; }
.prep-project-todo-dialog-project { font-weight: 700; }
.prep-project-todo-status-field { max-width: 12rem; }
.prep-project-todo-progress-field { max-width: none; margin-top: auto; flex: 1 1 auto; min-height: 0; }
.prep-project-todo-card.is-dragging { opacity: 0.55; }
.prep-project-todo-card-line {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
  font-size: 0.84rem;
}
.prep-project-todo-card-meta {
  display: flex;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-project-todo-card-meta > span {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-project-todo-doing {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1 1 auto;
  margin: 0;
  padding: 0.15rem 0 0;
}
.prep-project-todo-doing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}
.prep-project-todo-doing-row .prep-project-todo-status-field {
  max-width: none;
}
.prep-project-todo-field {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-project-todo-field input,
.prep-project-todo-field select,
.prep-project-todo-field textarea,
.prep-project-todo-task-add input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
}
.prep-project-todo-field input,
.prep-project-todo-field select {
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  padding: 0.2rem 0.45rem;
}
.prep-project-todo-progress-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-content: stretch;
}
.prep-project-todo-progress-log {
  margin: 0;
  max-height: 8rem;
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}
.prep-project-todo-progress-compose {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
}
.prep-project-todo-progress-compose textarea {
  height: calc(1.45em * 3 + 0.9rem);
  min-height: calc(1.45em * 3 + 0.9rem);
  max-height: calc(1.45em * 3 + 0.9rem);
  flex: 0 0 auto;
  resize: none;
  overflow: auto;
  padding: 0.45rem 0.55rem;
  line-height: 1.45;
}
.prep-project-todo-progress-compose .toolbar-btn {
  align-self: flex-end;
}
@media (max-width: 560px) {
  .prep-project-todo-doing-row {
    grid-template-columns: 1fr;
  }
}
.prep-project-todo-subtasks {
  display: grid;
  gap: 0.4rem;
}
.prep-project-todo-subtasks-head {
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-project-todo-subtask {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.8rem;
  color: inherit;
  font-size: 0.9rem;
}
.prep-project-todo-subtask label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}
.prep-project-todo-subtask span { min-width: 0; overflow-wrap: anywhere; }
.prep-project-todo-subtask-delete {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.prep-project-todo-subtask-delete:hover { color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.prep-project-todo-subtask input { margin: 0; }
.prep-project-todo-subtask.is-done span {
  color: var(--muted);
  text-decoration: line-through;
}
.prep-project-todo-subtask-empty,
.prep-project-todo-progress-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.prep-project-todo-task-add {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
}
.prep-project-todo-task-add input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.25rem 0.55rem;
}
.prep-project-todo-task-add button,
.prep-project-todo-delete {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.prep-project-todo-task-add button {
  min-height: 2.2rem;
  padding: 0 0.9rem;
}
.prep-project-todo-delete {
  justify-self: start;
  padding: 0.35rem 0.7rem;
}
.prep-project-todo-code { margin: -0.2rem 0 0 3.9rem; color: var(--muted); font-size: 0.75rem; }
.prep-project-todo-project-btn {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  line-height: 1.35;
}
.prep-project-todo-code-inline {
  display: inline;
  margin-left: 0.35rem;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}

/* 代办看板：全屏钮叠在右上角，不单独占一行，待办/问题紧贴顶部 */
#prep_delivery_panel.is-project-todo-board-mode {
  padding-top: 0.55rem;
}
body.is-prep-board-page #prep_delivery_panel.is-project-todo-board-mode > .delivery-board-controls {
  display: block;
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: visible;
  border: 0;
}
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-controls-cluster,
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-search-row,
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-controls-status,
#prep_delivery_panel.is-project-todo-board-mode .delivery-fullscreen-scale-control {
  display: none !important;
}
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-fullscreen-btn {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  z-index: 4;
  margin: 0;
  transform: none;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
#prep_delivery_panel.is-project-todo-board-mode > .delivery-board-workspace {
  margin-top: 0;
}
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  margin-top: 0;
}
#prep_delivery_panel.is-project-todo-board-mode .prep-project-todo-toolbar {
  margin: 0 4.6rem 0.55rem 0;
}
#prep_delivery_panel.is-project-todo-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-project-todo-board {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
}
#prep_delivery_panel.is-project-todo-board-mode .prep-project-todo-board > .prep-resource-issue-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(15rem, 1fr));
  gap: 0.75rem;
  align-items: stretch;
  overflow: hidden;
}
#prep_delivery_panel.is-project-todo-board-mode .prep-project-todo-board > .prep-resource-issue-board.is-stats {
  display: block;
  overflow: auto;
}
#prep_delivery_panel.is-project-todo-board-mode .prep-project-todo-column.prep-resource-issue-column {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.prep-resource-issue-history-link {
  align-self: flex-start;
}
.prep-resource-history-modal-dialog {
  width: min(100%, 1180px);
}
.prep-resource-history-modal-dialog .prep-resource-issue-history-head {
  margin-bottom: 0.7rem;
}

/* Project detail history: display the existing project issue board alongside change records. */
.prep-resource-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(24rem, 1fr);
  gap: 1rem;
  min-height: 0;
}
.prep-resource-history-records-pane,
.prep-resource-history-issues-pane {
  min-width: 0;
}
.prep-resource-history-issues-pane {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.prep-resource-history-issues-pane > h3 {
  margin: 0;
  font-size: 1rem;
}
.prep-resource-issue-form-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.prep-resource-issue-form-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
@media (max-width: 1050px) {
  .prep-resource-history-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .prep-resource-history-issues-pane {
    padding-top: 1rem;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

/* 问题看板：列宽全部用 rem/em，禁止百分比，避免 table-layout:fixed 被压窄后右侧重合。 */
.prep-resource-issue-form-modal-dialog {
  width: min(calc(100vw - 2rem), 2200px);
  max-width: none;
}
.prep-project-manifest-modal-dialog {
  width: min(calc(100vw - 2rem), 1800px);
  max-width: 100%;
  overflow: hidden;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-form-body {
  min-width: 0;
  max-width: 100%;
}
.prep-resource-issue-table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
}
.prep-resource-issue-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) {
  width: max-content;
  min-width: calc((20em + 1.3rem) * 4 + 65.5rem);
  table-layout: fixed;
}
.prep-resource-issue-table th,
.prep-resource-issue-table td {
  padding: 0.7rem 0.65rem;
  text-align: center;
  vertical-align: middle;
  border: 1px solid var(--border);
}
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(1),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(1) {
  width: 5rem;
  min-width: 5rem;
  overflow: hidden;
  white-space: nowrap;
}
/* 描述/问题、原因、措施、进度更新的列宽为二十个汉字；额外空间仅用于单元格左右内边距。 */
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(2),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) { width: calc(20em + 1.3rem); }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(3),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(3) { width: calc(20em + 1.3rem); }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(4),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(4) { width: calc(20em + 1.3rem); }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(5),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(5) { width: calc(20em + 1.3rem); }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(6),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(6) { width: 8rem; }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(7),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(7) { width: 7.5rem; }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(8),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(8) { width: 13rem; }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(9),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(9) { width: 7.5rem; }
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(10),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(10) {
  width: 8rem;
  overflow: hidden;
  white-space: nowrap;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(11),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(11) {
  width: 11rem;
  padding-right: 1rem;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) th:nth-child(12),
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(12) {
  width: 5.5rem;
  padding-left: 0.9rem;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) {
  text-align: left;
  vertical-align: middle;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(3) {
  text-align: center;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(4) {
  text-align: center;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(5) {
  text-align: center;
}
.prep-resource-issue-table:not(.prep-resource-fault-table).is-col-resized {
  table-layout: fixed;
  min-width: 0;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th,
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td {
  width: auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(1),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(1) { width: auto; }
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(2),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(2) { width: 8.5rem; }
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(3),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(3) { width: 5.6rem; }
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(4),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(4) { width: 6.2rem; }
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(5),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(5),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(6),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(6),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table th:nth-child(7),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-project-manifest-table td:nth-child(7) {
  width: 3.6rem;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-category { width: 6.5rem; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-material { width: 12rem; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-name { width: auto; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-sku { width: 4.6rem; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-qty { width: 4.2rem; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-issue { width: 6.6rem; }
.prep-project-manifest-modal-dialog .prep-outsource-manifest-table col.prep-outsource-col-issue-list { width: 6.8rem; }
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th,
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td {
  width: auto;
  min-width: 0;
  padding: 0.55rem 0.55rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th {
  white-space: nowrap;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(1),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(1) {
  width: 6.5rem;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(2),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(2) {
  width: 12rem;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(4),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(4) {
  width: 4.6rem;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(5),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(5),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(6),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(6),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(7),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(7),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(8),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(8) {
  width: 6.6rem;
  overflow: visible;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(9),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(9) {
  width: 6.8rem;
  overflow: visible;
  white-space: nowrap;
  text-align: center;
}
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table th:nth-child(3),
.prep-project-manifest-modal-dialog .prep-resource-issue-table.prep-outsource-manifest-table td:nth-child(3) {
  width: auto;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
}
.prep-outsource-issue-open {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.45;
  text-align: inherit;
  cursor: pointer;
}
.prep-outsource-issue-open.is-yes {
  color: #c45c4a;
  font-weight: 650;
}
.prep-outsource-issue-open.is-no {
  color: var(--muted);
}
.prep-outsource-issue-select,
.prep-outsource-issue-progress,
.prep-outsource-issue-planned,
.prep-outsource-issue-form select,
.prep-outsource-issue-form input[type="date"],
.prep-outsource-issue-select option,
.prep-outsource-issue-progress option,
.prep-outsource-issue-form select option {
  background-color: var(--bg);
  color: var(--text);
  color-scheme: light;
}
html[data-page-background="dark"] .prep-outsource-issue-select,
html[data-page-background="dark"] .prep-outsource-issue-progress,
html[data-page-background="dark"] .prep-outsource-issue-planned,
html[data-page-background="dark"] .prep-outsource-issue-form select,
html[data-page-background="dark"] .prep-outsource-issue-form input[type="date"] {
  color-scheme: dark;
}
.prep-outsource-issue-select {
  width: 100%;
  max-width: 5.8rem;
  height: 2rem;
  margin: 0;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.prep-outsource-issue-list {
  display: inline;
  white-space: nowrap;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.prep-outsource-issue-dialog {
  width: min(100%, 36rem);
}
.prep-outsource-issue-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1.15rem 1.15rem;
}
.prep-outsource-issue-pane,
.prep-outsource-issue-form {
  min-width: 0;
}
.prep-outsource-issue-pane h3,
.prep-outsource-issue-form h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}
.prep-outsource-issue-current {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  max-height: min(34vh, 16rem);
  overflow: auto;
  padding-right: 0.15rem;
}
.prep-outsource-issue-empty {
  margin: 0;
}
.prep-outsource-issue-card {
  position: relative;
  display: grid;
  gap: 0.28rem;
  padding: 0.65rem 2rem 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.prep-outsource-issue-delete {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.prep-outsource-issue-delete:hover {
  color: var(--text);
  background: var(--surface);
}
.prep-outsource-issue-count {
  margin-left: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.prep-outsource-issue-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.45rem 0.75rem;
}
.prep-outsource-issue-card-index {
  min-width: 1.25rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
.prep-outsource-issue-card-title {
  margin: 0;
  font-weight: 650;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  max-height: calc(1.45em * 3);
  white-space: pre-wrap;
}
.prep-outsource-issue-card-category {
  white-space: nowrap;
  line-height: 1.45;
}
.prep-outsource-issue-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
}
.prep-outsource-issue-card .prep-outsource-issue-plan {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}
.prep-outsource-issue-card .prep-outsource-issue-planned {
  width: 10.5rem;
  min-height: 2rem;
  padding: 0.15rem 0.4rem;
}
.prep-outsource-issue-progress {
  height: 2rem;
  padding: 0 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.prep-outsource-issue-form {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.prep-outsource-issue-form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.prep-outsource-issue-form label,
.prep-outsource-issue-plan {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}
.prep-outsource-issue-form select,
.prep-outsource-issue-form textarea,
.prep-outsource-issue-form input[type="date"],
.prep-outsource-issue-planned {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.prep-outsource-issue-plan {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
}
.prep-outsource-issue-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
@media (max-width: 760px) {
  .prep-outsource-issue-form-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
#prep_outsource_issue_modal {
  z-index: 1100;
}
.prep-resource-issue-table:not(.prep-resource-fault-table).is-col-resized th:nth-child(n),
.prep-resource-issue-table:not(.prep-resource-fault-table).is-col-resized td:nth-child(n) {
  width: auto;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
.prep-resource-issue-table:not(.prep-resource-fault-table).is-col-resized td:nth-child(n) {
  overflow: hidden;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) .prep-resource-issue-rich-view {
  justify-items: start;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) .prep-resource-issue-rich-view button {
  justify-self: stretch;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) strong,
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(2) .small {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.prep-resource-issue-table-text-wrap {
  display: grid;
  gap: 0.35rem;
  justify-items: stretch;
  min-width: 0;
}
.prep-resource-issue-table-text {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3.4rem;
  max-height: 8rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: left;
  resize: vertical;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}
.prep-resource-issue-table-text:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
}
.prep-resource-issue-table-text:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.prep-resource-issue-table-text:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.prep-resource-issue-table-text::placeholder {
  color: var(--muted, #888);
}
.prep-resource-issue-table-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 2.2rem;
  padding: 0.4rem 1.7rem 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
  text-align-last: center;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.prep-resource-issue-table-select:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, var(--accent));
}
.prep-resource-issue-table-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.prep-resource-issue-table-select:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
.prep-resource-issue-table-select option {
  background: var(--surface);
  color: var(--text);
}
.prep-resource-issue-assignee-search {
  box-sizing: border-box;
  width: 100%;
  min-width: 7.5rem;
  height: 2.2rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}
.prep-resource-issue-assignee-search:hover { border-color: color-mix(in srgb, var(--accent) 52%, var(--border)); }
.prep-resource-issue-assignee-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.prep-resource-issue-assignee-search:disabled { cursor: not-allowed; opacity: 0.65; }
.prep-resource-issue-table .prep-resource-issue-assignee-search {
  min-width: 0;
}
.prep-resource-issue-assignee-picker { position: relative; min-width: 0; }
.prep-resource-issue-assignee-picker-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max(100%, 12rem);
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px color-mix(in srgb, #000 16%, transparent);
}
.prep-resource-issue-assignee-picker-option,
.prep-resource-issue-assignee-picker-empty {
  padding: 0.4rem 0.7rem;
  font-weight: 400;
}
.prep-resource-issue-assignee-picker-option { cursor: pointer; }
.prep-resource-issue-assignee-picker-option:hover,
.prep-resource-issue-assignee-picker-option.is-active {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}
.prep-resource-issue-assignee-picker-empty { color: var(--muted, #666); }
.prep-resource-issue-table-date-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 2.2rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  text-align: center;
}
.prep-resource-issue-table-date-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.prep-resource-issue-table-date-input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}
@media (max-width: 760px) {
  .prep-resource-issue-form-modal-dialog { width: calc(100vw - 1rem); }
  .prep-resource-issue-table.prep-resource-fault-table { min-width: 1040px; }
}
.prep-resource-issue-table-link {
  overflow-wrap: anywhere;
}
.prep-resource-issue-table:not(.prep-resource-fault-table) td:nth-child(10) .prep-resource-issue-table-link {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}
.prep-resource-issue-table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.prep-resource-issue-table-actions .toolbar-btn {
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.prep-resource-issue-rich-editor-dialog { width: min(calc(100vw - 2rem), 960px); }
.prep-resource-issue-rich-editor-body { display: grid; gap: .7rem; }
.prep-resource-issue-rich-editor-body label { display: grid; gap: .35rem; font-weight: 600; }
.prep-resource-issue-detail-meta { padding: .8rem; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--surface, #fff) 92%, var(--primary, #2563eb)); }
.prep-resource-issue-detail-meta h3 { margin: 0 0 .6rem; font-size: 1rem; }
.prep-resource-issue-detail-meta-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .55rem .9rem; margin: 0; }
.prep-resource-issue-detail-meta-list > div { min-width: 0; }
.prep-resource-issue-detail-meta-list dt { color: var(--muted, #666); font-size: .8rem; }
.prep-resource-issue-detail-meta-list dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.prep-resource-issue-detail-settings { padding: .8rem; overflow: visible; border: 1px solid var(--border); border-radius: 6px; background: color-mix(in srgb, var(--surface, #fff) 92%, var(--primary, #2563eb)); }
.prep-resource-issue-detail-settings h3 { margin: 0 0 .6rem; font-size: 1rem; }
.prep-resource-issue-detail-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.prep-resource-issue-detail-settings-grid label { display: grid; gap: .35rem; font-weight: 600; }
.prep-resource-issue-rich-input { min-height: 8rem; box-sizing: border-box; padding: .65rem; overflow: auto; white-space: pre-wrap; border: 1px solid var(--border); border-radius: 6px; background: var(--surface, #fff); }
.prep-resource-issue-rich-input:empty::before { content: attr(data-placeholder); color: var(--muted, #777); pointer-events: none; }
.prep-resource-issue-rich-input:focus { outline: 2px solid color-mix(in srgb, var(--primary, #2563eb) 35%, transparent); outline-offset: 1px; }
.prep-resource-issue-rich-editor-image { display: block; max-width: 100%; max-height: 20rem; margin: .5rem 0; object-fit: contain; }
.prep-resource-issue-rich-hint { margin: -.35rem 0 .2rem; }
.prep-resource-issue-rich-view-images { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.prep-resource-issue-rich-view-images img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--border); border-radius: 6px; }
.prep-resource-issue-rich-view { display: grid; justify-items: center; gap: .35rem; overflow-wrap: anywhere; }
.prep-resource-issue-rich-view button { justify-self: center; }
/* 问题看板：措施最多显示十八个汉字加两个省略号；描述用两行截断，悬停时由 title 显示全文。 */
.prep-resource-issue-rich-view .prep-resource-issue-rich-text {
  display: block;
  width: 20em;
  max-width: 20em;
  overflow: hidden;
  white-space: nowrap;
}
.prep-resource-issue-rich-view .prep-resource-issue-description-link.prep-resource-issue-rich-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: left;
}
@media (max-width: 640px) { .prep-resource-issue-detail-settings-grid { grid-template-columns: 1fr; } }

/* 问题看板：描述是进入同一问题详情的链接。 */
.prep-resource-issue-description-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.prep-resource-issue-description-link:hover,
.prep-resource-issue-description-link:focus-visible {
  color: color-mix(in srgb, var(--accent) 76%, #fff);
}

/* 问题看板标题工具栏与字段筛选。 */
.prep-resource-issue-form-modal-dialog > .modal-header {
  align-items: center;
  gap: 0.85rem 1rem;
}
.prep-resource-issue-form-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}
.prep-resource-issue-form-filters label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  font-weight: 500;
  font-size: 0.86rem;
  white-space: nowrap;
  cursor: pointer;
}
.prep-resource-issue-created-filter select {
  margin-left: 0.3rem;
  height: 2.1rem;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
}
.prep-resource-issue-form-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
#prep_resource_issue_form_modal .prep-resource-issue-form-toolbar { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; }
.prep-resource-issue-form-actions { display: inline-flex; align-items: center; flex: 0 0 auto; flex-wrap: nowrap; gap: .45rem; }
.prep-resource-issue-form-actions .toolbar-btn { flex: 0 0 auto; }
#prep_resource_issue_form_modal .prep-resource-issue-search { flex: 1 1 8rem; min-width: 6.5rem; }
.prep-resource-issue-search input { width: 14rem; max-width: 30vw; height: 2.25rem; padding: 0 .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
#prep_resource_issue_form_modal .prep-resource-issue-search input { width: 100%; min-width: 0; max-width: 14rem; }
.prep-resource-issue-table th { position: relative; }
.prep-resource-issue-filter { position: relative; }
.prep-resource-issue-filter summary { display: inline-flex; justify-content: center; align-items: center; gap: .35rem; cursor: pointer; list-style: none; white-space: nowrap; }
.prep-resource-issue-filter summary::-webkit-details-marker,
.prep-resource-issue-filter summary::marker { display: none; content: ""; }
.prep-resource-issue-sort-mark {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  line-height: 0;
}
.prep-resource-issue-sort-arrow {
  display: block;
  width: 0.72em;
  height: 0.72em;
}
.prep-resource-issue-filter-sort .prep-resource-issue-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
}
.prep-resource-issue-filter-sort .prep-resource-issue-sort-btn.is-active {
  border-color: var(--accent);
  color: var(--accent);
}
.prep-resource-issue-filter-menu { position: absolute; z-index: 5; top: calc(100% + .4rem); left: 0; width: max-content; min-width: 11rem; max-width: 18rem; max-height: 20rem; overflow: auto; padding: .55rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 24px rgba(15,23,42,.25); text-align: left; }
.prep-resource-issue-filter-sort, .prep-resource-issue-filter-range { display: flex; flex-wrap: wrap; gap: .35rem; padding-bottom: .45rem; border-bottom: 1px solid var(--border); }
.prep-resource-issue-filter-range { padding-top: .45rem; }
.prep-resource-issue-filter-menu button { padding: .25rem .45rem; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; font-size: .78rem; }
.prep-resource-issue-filter-options { display: grid; gap: .35rem; padding-top: .5rem; }
.prep-resource-issue-filter-options label { display: flex; gap: .35rem; align-items: center; font-weight: normal; font-size: .8rem; }
@media (max-width: 760px) { .prep-resource-issue-form-toolbar { justify-content: flex-start; } .prep-resource-issue-search input { max-width: 100%; width: 12rem; } .prep-resource-issue-table.prep-resource-fault-table { min-width: 1700px; } }

.prep-resource-issue-import-modal { z-index: 1002; }
.prep-resource-issue-export-modal { z-index: 1003; }
.prep-resource-issue-export-dialog {
  width: min(calc(100vw - 2rem), 28rem);
  max-width: none;
}
.prep-resource-issue-export-body {
  display: grid;
  gap: 0.7rem;
}
.prep-resource-issue-export-subtitle,
.prep-resource-issue-export-filters {
  margin: 0.2rem 0 0;
}
.prep-resource-issue-export-summary {
  margin: 0;
  font-weight: 650;
}
.prep-resource-issue-import-dialog {
  width: min(calc(100vw - 2rem), 720px);
  max-width: none;
}
.prep-resource-issue-import-body {
  display: grid;
  gap: 0.9rem;
}
.prep-resource-issue-import-subtitle { margin: 0.2rem 0 0; }
.prep-resource-issue-import-source,
.prep-resource-issue-import-targets {
  display: grid;
  gap: 0.5rem;
}
.prep-resource-issue-import-source h3,
.prep-resource-issue-import-targets h3 {
  margin: 0;
  font-size: 0.92rem;
}
.prep-resource-issue-import-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 3.2rem;
  padding: 0.65rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 82%, var(--surface));
}
.prep-resource-issue-import-chip-list.is-drop-target,
.prep-resource-issue-import-drop.is-drop-target {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.prep-resource-issue-import-empty { margin: 0; }
.prep-resource-issue-import-target-list {
  display: grid;
  gap: 0.55rem;
}
.prep-resource-issue-import-target {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}
.prep-resource-issue-import-target-label {
  font-weight: 600;
  font-size: 0.88rem;
}
.prep-resource-issue-import-required {
  margin-left: 0.2rem;
  color: #c2410c;
}
.prep-resource-issue-import-drop {
  display: flex;
  align-items: center;
  min-height: 2.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.prep-resource-issue-import-placeholder {
  color: color-mix(in srgb, var(--text) 55%, transparent);
  font-size: 0.82rem;
}
.prep-resource-issue-import-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent));
  color: var(--text);
  cursor: grab;
  user-select: none;
  font-size: 0.82rem;
}
.prep-resource-issue-import-chip.is-mapped {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}
.prep-resource-issue-import-chip.is-dragging { opacity: 0.55; }
.prep-resource-issue-import-auto {
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: 0.7rem;
}
.prep-resource-issue-import-unmap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.prep-resource-issue-import-unmap:hover,
.prep-resource-issue-import-unmap:focus-visible {
  background: color-mix(in srgb, var(--text) 12%, transparent);
}
@media (max-width: 640px) {
  .prep-resource-issue-import-target { grid-template-columns: 1fr; gap: 0.3rem; }
}

/*
 * 新手机模式（覆盖旧手机适配）
 * 旧规则把看板页锁成 100vh + overflow:hidden，头栏 display:contents 把标题挤成竖排，
 * 左侧悬挂条与重复导航挡住内容，表格容器 height:0 导致数据不可见。
 */
@media (max-width: 768px) {
  html.is-mobile body.is-prep-board-page,
  body.is-mobile.is-prep-board-page,
  body.is-prep-board-page {
    overflow: auto !important;
    height: auto !important;
    min-height: 100dvh;
  }

  html.is-mobile body.is-prep-board-page .layout-with-global-sidebar,
  body.is-mobile.is-prep-board-page .layout-with-global-sidebar,
  body.is-prep-board-page .layout-with-global-sidebar {
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  .layout-with-global-sidebar > .header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.2rem !important;
    min-height: 0 !important;
    transform: none !important;
    padding: 0.4rem 0.7rem 0.45rem !important;
  }

  .layout-with-global-sidebar > .header .dashboard-topbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 0.3rem;
  }

  .layout-with-global-sidebar > .header .brand-mark-image {
    height: 28px !important;
    max-width: 5.6rem !important;
  }

  .layout-with-global-sidebar > .header .toolbar-user {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.25rem !important;
  }

  .layout-with-global-sidebar > .header .toolbar-user strong {
    font-size: 0.74rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout-with-global-sidebar > .header .toolbar-user-desc {
    display: none !important;
  }

  .layout-with-global-sidebar > .header .toolbar-actions {
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    gap: 0.22rem !important;
  }

  .layout-with-global-sidebar > .header .toolbar-actions .toolbar-btn,
  .layout-with-global-sidebar > .header .toolbar-actions > button {
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 0.42rem !important;
    font-size: 0.7rem !important;
  }

  .layout-with-global-sidebar > .header .page-background-switcher {
    flex: 0 0 auto;
  }

  .layout-with-global-sidebar > .header .page-background-switcher__select {
    min-width: 3.8rem !important;
    width: 3.8rem !important;
    min-height: 28px !important;
    height: 28px !important;
    padding: 0 1.15rem 0 0.35rem !important;
    font-size: 0.7rem !important;
    background-position:
      calc(100% - 0.55rem) calc(50% - 0.1rem),
      calc(100% - 0.32rem) calc(50% - 0.1rem);
    background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
  }

  .layout-with-global-sidebar > .header .header-copy {
    order: 20 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 0 !important;
  }

  .layout-with-global-sidebar > .header h1 {
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .layout-with-global-sidebar > .header .header-copy .sub {
    display: none !important;
  }
}

html.is-mobile .layout-with-global-sidebar > .header,
body.is-mobile .layout-with-global-sidebar > .header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.2rem !important;
  min-height: 0 !important;
  transform: none !important;
  padding: 0.4rem 0.7rem 0.45rem !important;
}

html.is-mobile .layout-with-global-sidebar > .header .dashboard-topbar,
body.is-mobile .layout-with-global-sidebar > .header .dashboard-topbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.3rem;
}

html.is-mobile .layout-with-global-sidebar > .header .brand-mark-image,
body.is-mobile .layout-with-global-sidebar > .header .brand-mark-image {
  height: 28px !important;
  max-width: 5.6rem !important;
}

html.is-mobile .layout-with-global-sidebar > .header .toolbar-user,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-user {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

html.is-mobile .layout-with-global-sidebar > .header .toolbar-user strong,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-user strong {
  font-size: 0.74rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.is-mobile .layout-with-global-sidebar > .header .toolbar-user-desc,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-user-desc {
  display: none !important;
}

html.is-mobile .layout-with-global-sidebar > .header .toolbar-actions,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-actions {
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  gap: 0.22rem !important;
}

html.is-mobile .layout-with-global-sidebar > .header .toolbar-actions .toolbar-btn,
html.is-mobile .layout-with-global-sidebar > .header .toolbar-actions > button,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-actions .toolbar-btn,
body.is-mobile .layout-with-global-sidebar > .header .toolbar-actions > button {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 0.42rem !important;
  font-size: 0.7rem !important;
}

html.is-mobile .layout-with-global-sidebar > .header .page-background-switcher,
body.is-mobile .layout-with-global-sidebar > .header .page-background-switcher {
  flex: 0 0 auto;
}

html.is-mobile .layout-with-global-sidebar > .header .page-background-switcher__select,
body.is-mobile .layout-with-global-sidebar > .header .page-background-switcher__select {
  min-width: 3.8rem !important;
  width: 3.8rem !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 1.15rem 0 0.35rem !important;
  font-size: 0.7rem !important;
  background-position:
    calc(100% - 0.55rem) calc(50% - 0.1rem),
    calc(100% - 0.32rem) calc(50% - 0.1rem);
  background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
}

html.is-mobile .layout-with-global-sidebar > .header .header-copy,
body.is-mobile .layout-with-global-sidebar > .header .header-copy {
  order: 20 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 0 !important;
}

html.is-mobile .layout-with-global-sidebar > .header h1,
body.is-mobile .layout-with-global-sidebar > .header h1 {
  font-size: 0.95rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.is-mobile .layout-with-global-sidebar > .header .header-copy .sub,
body.is-mobile .layout-with-global-sidebar > .header .header-copy .sub {
  display: none !important;
}

html.is-mobile .delivery-board-hanging-actions,
body.is-mobile .delivery-board-hanging-actions {
  display: none !important;
}

html.is-mobile .sidebar-list.app-sidebar,
body.is-mobile .sidebar-list.app-sidebar {
  display: none !important;
}

html.is-mobile .sidebar-section:has(> .sidebar-list.app-sidebar:only-child),
body.is-mobile .sidebar-section:has(> .sidebar-list.app-sidebar:only-child) {
  display: none !important;
}

html.is-mobile .main-with-sidebar,
body.is-mobile .main-with-sidebar {
  display: flex !important;
  flex-direction: column !important;
}

html.is-mobile .main-with-sidebar > .main-content,
html.is-mobile .main-with-sidebar > .risk-page-main,
body.is-mobile .main-with-sidebar > .main-content,
body.is-mobile .main-with-sidebar > .risk-page-main {
  order: 1;
}

html.is-mobile .main-with-sidebar > .sidebar,
body.is-mobile .main-with-sidebar > .sidebar {
  order: 2;
}

html.is-mobile body.is-prep-board-page #prep_delivery_panel,
body.is-mobile.is-prep-board-page #prep_delivery_panel,
html.is-mobile #prep_delivery_panel,
body.is-mobile #prep_delivery_panel {
  overflow: visible !important;
  height: auto !important;
  flex: none !important;
  min-height: 0 !important;
}

html.is-mobile #prep_delivery_panel > .delivery-board-workspace,
body.is-mobile #prep_delivery_panel > .delivery-board-workspace,
html.is-mobile #prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
body.is-mobile #prep_delivery_panel .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view,
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-resource-board-shell,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-resource-board-shell,
html.is-mobile #prep_delivery_panel .prep-resource-table-wrap,
body.is-mobile #prep_delivery_panel .prep-resource-table-wrap,
html.is-mobile #prep_delivery_panel .delivery-table-wrap,
body.is-mobile #prep_delivery_panel .delivery-table-wrap {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  flex: none !important;
  overflow: visible !important;
}

html.is-mobile #prep_delivery_panel .prep-resource-table-wrap,
body.is-mobile #prep_delivery_panel .prep-resource-table-wrap,
html.is-mobile #prep_delivery_panel .delivery-table-wrap,
body.is-mobile #prep_delivery_panel .delivery-table-wrap {
  overflow: auto !important;
  min-height: 12rem;
}

html.is-mobile .prep-resource-mobile-shell,
body.is-mobile .prep-resource-mobile-shell,
html.is-mobile .delivery-time-mobile-shell,
body.is-mobile .delivery-time-mobile-shell {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}

html.is-mobile .prep-resource-mobile-shell.is-mobile-detail,
body.is-mobile .prep-resource-mobile-shell.is-mobile-detail {
  display: block !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  touch-action: pan-y;
}

html.is-mobile body.is-prep-board-page .layout-with-global-sidebar .main-with-sidebar,
html.is-mobile body.is-prep-board-page .main-content.risk-page-main,
body.is-mobile.is-prep-board-page .layout-with-global-sidebar .main-with-sidebar,
body.is-mobile.is-prep-board-page .main-content.risk-page-main {
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

html.is-mobile #prep_today_progress_log_sidebar,
body.is-mobile #prep_today_progress_log_sidebar,
html.is-mobile #prep_delivery_source_sidebar,
body.is-mobile #prep_delivery_source_sidebar {
  display: none !important;
}

html.is-mobile [hidden],
body.is-mobile [hidden],
html.is-mobile [hidden].delivery-view-switch,
body.is-mobile [hidden].delivery-view-switch,
html.is-mobile [hidden].risk-form-switch,
body.is-mobile [hidden].risk-form-switch,
html.is-mobile [hidden].delivery-board-hanging-actions,
body.is-mobile [hidden].delivery-board-hanging-actions {
  display: none !important;
}

html.is-mobile .delivery-board-fullscreen-btn,
body.is-mobile .delivery-board-fullscreen-btn,
html.is-mobile #prep_delivery_fullscreen_scale_control,
body.is-mobile #prep_delivery_fullscreen_scale_control {
  display: none !important;
}

html.is-mobile #prep_delivery_panel.is-project-resource-mode > .delivery-board-controls,
body.is-mobile #prep_delivery_panel.is-project-resource-mode > .delivery-board-controls,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode > .delivery-board-controls,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode > .delivery-board-controls,
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-controls-cluster,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-controls-cluster,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-controls-cluster,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-controls-cluster {
  overflow: visible;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row {
  gap: 0.3rem;
  padding: 0.12rem 0;
  align-items: center;
  overflow: visible;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row .delivery-board-search,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row .delivery-board-search,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row .delivery-board-search,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row .delivery-board-search {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row .delivery-board-search input,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row .delivery-board-search input,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row .delivery-board-search input,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row .delivery-board-search input {
  min-height: 32px;
  height: 32px;
  font-size: 16px;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row #btn_search_delivery_board,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .delivery-board-search-row #btn_search_delivery_board,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row #btn_search_delivery_board,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .delivery-board-search-row #btn_search_delivery_board {
  flex: 0 0 auto;
  min-height: 32px;
  height: 32px;
  padding: 0 0.72rem;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-toolbar,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-toolbar,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-toolbar,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-toolbar {
  display: contents;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex: 0 0 auto;
  min-width: 0;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-month-enable,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-month-enable,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-month-enable,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-month-enable {
  font-size: 0.78rem;
  gap: 0.18rem;
  white-space: nowrap;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter input[type="month"]:disabled,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter input[type="month"]:disabled,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter input[type="month"]:disabled,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter input[type="month"]:disabled {
  display: none;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter input[type="month"],
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-today-progress-date-filter input[type="month"],
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter input[type="month"],
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-today-progress-date-filter input[type="month"] {
  width: 6.4rem;
  min-width: 6.4rem;
  max-width: 6.4rem;
  height: 32px;
  min-height: 32px;
  padding: 0 0.3rem;
  font-size: 0.78rem;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filters,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filters,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filters,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filters {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.3rem;
  min-width: 0;
  overflow: visible;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group {
  flex: 1 1 0;
  min-width: 0;
  overflow: visible;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-table-mode-toggle,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-table-mode-toggle {
  flex: 0 0 auto;
  height: 32px;
  margin-left: 0;
  font-size: 0.78rem;
  gap: 0.18rem;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group > summary,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group > summary,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group > summary,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group > summary {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 32px;
  height: 32px;
  padding: 0 0.4rem;
  font-size: 0.78rem;
  line-height: 32px;
  justify-content: center;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-menu,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-menu,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-menu,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-menu {
  left: 0;
  right: auto;
  min-width: 12rem;
  max-width: min(18rem, calc(100vw - 1.25rem));
  max-height: min(14rem, 50vh);
  overflow: auto;
  z-index: 80;
}
html.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group:last-of-type .prep-resource-filter-menu,
body.is-mobile #prep_delivery_panel.is-project-resource-mode .prep-resource-filter-group:last-of-type .prep-resource-filter-menu,
html.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group:last-of-type .prep-resource-filter-menu,
body.is-mobile #prep_delivery_panel.is-project-today-progress-mode .prep-resource-filter-group:last-of-type .prep-resource-filter-menu {
  left: auto;
  right: 0;
}

html.is-mobile #prep_delivery_panel > .delivery-board-controls,
body.is-mobile #prep_delivery_panel > .delivery-board-controls {
  padding-inline-end: 0 !important;
  gap: 0.4rem;
}

html.is-mobile #prep_secondary_nav_panel,
body.is-mobile #prep_secondary_nav_panel {
  margin-bottom: 0.35rem;
  padding: 0.45rem 0.55rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html.is-mobile #prep_secondary_nav_panel .risk-form-switch,
body.is-mobile #prep_secondary_nav_panel .risk-form-switch {
  flex-wrap: nowrap;
  overflow-x: auto;
}

html.is-mobile.is-mobile-resource-detail,
html.is-mobile.is-mobile-resource-detail body,
html.is-mobile body.is-mobile-resource-detail,
body.is-mobile.is-mobile-resource-detail {
  overflow: auto !important;
  height: auto !important;
  min-height: 100dvh !important;
  overscroll-behavior: auto;
  touch-action: pan-y;
}

html.is-mobile.is-mobile-resource-detail .layout-with-global-sidebar,
html.is-mobile body.is-mobile-resource-detail .layout-with-global-sidebar,
body.is-mobile.is-mobile-resource-detail .layout-with-global-sidebar,
html.is-mobile.is-mobile-resource-detail .main-with-sidebar,
html.is-mobile body.is-mobile-resource-detail .main-with-sidebar,
html.is-mobile.is-mobile-resource-detail .main-content,
html.is-mobile body.is-mobile-resource-detail .main-content {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
}

html.is-mobile.is-mobile-resource-detail .header,
html.is-mobile body.is-mobile-resource-detail .header,
body.is-mobile.is-mobile-resource-detail .header,
html.is-mobile.is-mobile-resource-detail .page-switch-row,
html.is-mobile body.is-mobile-resource-detail .page-switch-row,
body.is-mobile.is-mobile-resource-detail .page-switch-row,
html.is-mobile.is-mobile-resource-detail .footer,
html.is-mobile body.is-mobile-resource-detail .footer,
body.is-mobile.is-mobile-resource-detail .footer,
html.is-mobile body.is-mobile-resource-detail .header-copy,
body.is-mobile.is-mobile-resource-detail .header-copy,
html.is-mobile body.is-mobile-resource-detail #prep_secondary_nav_panel,
body.is-mobile.is-mobile-resource-detail #prep_secondary_nav_panel,
html.is-mobile body.is-mobile-resource-detail #prep_resource_stats_sidebar,
body.is-mobile.is-mobile-resource-detail #prep_resource_stats_sidebar,
html.is-mobile #prep_delivery_panel.is-mobile-resource-detail > .delivery-board-controls,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail > .delivery-board-controls {
  display: none !important;
}

html.is-mobile #prep_delivery_panel.is-mobile-resource-detail,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail,
html.is-mobile #prep_delivery_panel.is-mobile-resource-detail > .delivery-board-workspace,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail > .delivery-board-workspace,
html.is-mobile #prep_delivery_panel.is-mobile-resource-detail #prep_delivery_board_view,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail #prep_delivery_board_view {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  flex: none !important;
  overflow: visible !important;
}

html.is-mobile #prep_delivery_panel.is-mobile-resource-detail .delivery-time-mobile-shell.is-mobile-detail,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail .delivery-time-mobile-shell.is-mobile-detail,
html.is-mobile #prep_delivery_panel.is-mobile-resource-detail .prep-resource-mobile-shell.is-mobile-detail,
body.is-mobile #prep_delivery_panel.is-mobile-resource-detail .prep-resource-mobile-shell.is-mobile-detail {
  position: static !important;
  inset: auto;
  z-index: auto;
  width: 100%;
  max-width: none;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.55rem 0.7rem 1.6rem !important;
  background: var(--bg);
  overflow: visible !important;
  touch-action: pan-y;
}

html.is-mobile .prep-resource-mobile-detail__bar,
body.is-mobile .prep-resource-mobile-detail__bar {
  position: sticky;
  top: 0;
}

html.is-mobile .page-switch-row,
body.is-mobile .page-switch-row {
  margin-bottom: 0.45rem;
}

#prep_delivery_panel.is-project-energy-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  overflow: hidden;
  min-height: 0;
  scrollbar-gutter: auto;
}
#prep_delivery_panel.is-project-energy-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > * {
  flex: 1 1 0%;
  min-height: 0;
}
#prep_delivery_panel.is-project-energy-board-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-energy-board-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
#prep_delivery_panel.is-project-energy-board-mode .prep-energy-manager-table,
#prep_delivery_panel.is-project-energy-board-mode .prep-energy-manager-table.prep-resource-table,
#prep_delivery_panel.is-project-energy-board-mode .prep-energy-manager-table.prep-resource-table.prep-acceptance-table {
  width: 63rem;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}
#prep_delivery_panel.is-project-energy-board-mode .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-energy-board-mode:fullscreen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-energy-board-mode:-webkit-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-energy-board-mode:-moz-full-screen .prep-resource-table-wrap,
section#prep_delivery_panel.is-project-energy-board-mode.is-fullscreen-active .prep-resource-table-wrap {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.prep-energy-manager-table th,
.prep-energy-manager-table td {
  text-align: center;
  vertical-align: middle;
}
.prep-energy-manager-table th:first-child,
.prep-energy-manager-table td:first-child {
  width: 8.5rem;
  text-align: left;
}
.prep-energy-manager-table th:nth-child(-n+6):not(:first-child),
.prep-energy-manager-table td:nth-child(-n+6):not(:first-child) {
  width: 3.6rem;
}
.prep-energy-manager-table th:nth-child(7),
.prep-energy-manager-table td:nth-child(7) {
  width: 5.2rem;
}
.prep-energy-manager-table th:nth-child(n+8),
.prep-energy-manager-table td:nth-child(n+8) {
  width: 5.5rem;
}
.prep-energy-manager-table tfoot th,
.prep-energy-manager-table tfoot td {
  font-weight: 650;
}
.prep-energy-manager-link {
  width: auto;
  max-width: 100%;
  color: var(--accent-dim);
  font-weight: 650;
}
#prep_energy_manager_modal .prep-energy-pm-dash {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: var(--text);
}
#prep_energy_manager_modal .prep-energy-pm-list .prep-resource-table-wrap {
  flex: 0 0 auto;
  height: auto;
  max-height: min(46vh, 30rem);
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
}
#prep_energy_manager_modal .delivery-table th,
#prep_energy_manager_modal .delivery-table .sticky-col,
#prep_energy_manager_modal .delivery-table tbody .sticky-col {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)) !important;
  color: var(--text);
}
#prep_energy_manager_modal .delivery-table td {
  width: auto;
  min-width: 0;
  max-width: none;
  background: var(--surface);
  color: var(--text);
}
#prep_energy_manager_modal .delivery-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  color: var(--text);
}
#prep_energy_manager_modal .delivery-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
}
#prep_energy_manager_modal .prep-acceptance-project-btn,
#prep_energy_manager_modal .prep-energy-pm-table td:nth-child(2) {
  color: var(--accent-dim);
}
#prep_energy_manager_modal .prep-acceptance-project-btn:hover,
#prep_energy_manager_modal .prep-acceptance-project-btn:focus-visible {
  color: var(--accent);
}
#prep_energy_manager_modal .prep-energy-pm-filter-hint {
  margin: 0;
  color: var(--muted);
}
.prep-energy-manager-link:hover,
.prep-energy-manager-link:focus-visible {
  color: var(--accent);
}
#prep_delivery_panel.is-project-energy-board-mode.is-energy-pm-dash .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-energy-board-shell.prep-energy-pm-dash {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow: auto;
  height: auto;
  min-height: 100%;
}
#prep_delivery_panel.is-project-energy-board-mode.is-energy-pm-dash .prep-energy-pm-dash .prep-resource-table-wrap {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
}
.prep-energy-pm-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.prep-energy-pm-head-copy {
  min-width: 0;
}
.prep-energy-pm-head-copy h3 {
  margin: 0;
  font-size: 1.15rem;
}
.prep-energy-pm-head-copy p {
  margin: 0.2rem 0 0;
}
.prep-energy-pm-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.prep-energy-pm-group-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
}
.prep-energy-pm-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.prep-energy-pm-card {
  appearance: none;
  min-width: 6.8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.prep-energy-pm-card:hover,
.prep-energy-pm-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.prep-energy-pm-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.prep-energy-pm-card-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.prep-energy-pm-card-label {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-energy-pm-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.prep-energy-pm-table {
  width: max-content;
  min-width: 100%;
}
.prep-energy-pm-table th,
.prep-energy-pm-table td {
  white-space: nowrap;
}
.prep-energy-pm-table th:first-child,
.prep-energy-pm-table td:first-child {
  min-width: 10rem;
  white-space: normal;
}
@media (max-width: 768px) {
  .prep-energy-pm-card {
    min-width: calc(50% - 0.25rem);
  }
}

#prep_delivery_panel.is-project-acceptance-stats-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  overflow: hidden;
  min-height: 0;
}
#prep_delivery_panel.is-project-acceptance-stats-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-acceptance-stats-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  gap: 0.85rem;
  overflow: auto;
}
.prep-acceptance-stats-toolbar,
.prep-acceptance-stats-group {
  display: grid;
  gap: 0.45rem;
}
.prep-acceptance-stats-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.prep-acceptance-stats-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(7.5rem, 1fr));
  gap: 0.55rem;
}
.prep-acceptance-stats-kpi {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.prep-acceptance-stats-kpi span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-acceptance-stats-kpi strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.25rem;
}
.prep-acceptance-stats-group h3 {
  margin: 0;
  font-size: 0.95rem;
}
.prep-acceptance-stats-module {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.prep-acceptance-stats-module-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.prep-acceptance-stats-module-head p {
  margin: 0.25rem 0 0;
}
.prep-acceptance-stats-charts {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(18rem, 1.15fr);
  gap: 0.85rem;
  align-items: start;
}
.prep-acceptance-stats-chart-card {
  min-width: 0;
  max-height: 28rem;
  overflow: auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--bg, #f6f4ef));
}
.prep-acceptance-stats-chart-card h4 {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.prep-acceptance-stats-pie-body {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
}
.prep-acceptance-stats-pie-body .prep-today-progress-pie {
  width: 9.5rem;
  height: 9.5rem;
}
.prep-acceptance-stats-pie-slice,
.prep-acceptance-stats-bar {
  cursor: pointer;
}
.prep-today-progress-pie.is-slice-filtered .prep-acceptance-stats-pie-slice:not(.is-selected) {
  opacity: 0.42;
}
.prep-acceptance-stats-bar-chart {
  display: block;
  width: 100%;
  height: auto;
}
.prep-acceptance-stats-bar-label {
  fill: var(--text);
  font-size: 11px;
}
.prep-acceptance-stats-bar-value {
  fill: var(--muted);
  font-size: 11px;
}
.prep-acceptance-stats-bar-chart:has(.is-selected) .prep-acceptance-stats-bar:not(.is-selected) {
  opacity: 0.42;
}
.prep-acceptance-stats-month-card {
  max-height: none;
}
.prep-acceptance-stats-month-chart {
  display: grid;
  gap: 0.45rem;
}
.prep-acceptance-stats-month-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.prep-acceptance-stats-month-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.prep-acceptance-stats-month-legend-item i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}
.prep-acceptance-stats-stack-seg {
  cursor: pointer;
}
.prep-acceptance-stats-bar-chart.is-stacked-month:has(.is-selected) .prep-acceptance-stats-stack-seg:not(.is-selected) {
  opacity: 0.42;
}
.prep-acceptance-stats-month-table {
  min-width: 36rem;
  margin-top: 0.65rem;
}
.prep-acceptance-stats-month-table th,
.prep-acceptance-stats-month-table td {
  text-align: center;
  vertical-align: middle;
}
.prep-acceptance-stats-month-table th:first-child,
.prep-acceptance-stats-month-table td:first-child,
.prep-acceptance-stats-month-table tfoot td:first-child {
  text-align: left;
}
.prep-acceptance-stats-month-empty {
  color: var(--muted);
}
.prep-acceptance-stats-month-table tr.is-selected td {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.prep-acceptance-stats-table,
.prep-acceptance-stats-detail-table {
  width: 100%;
  min-width: 52rem;
}
@media (max-width: 900px) {
  .prep-acceptance-stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prep-acceptance-stats-charts {
    grid-template-columns: minmax(0, 1fr);
  }
  .prep-acceptance-stats-pie-body {
    flex-direction: column;
  }
}

body.is-prep-ops-clock-projects-page #prep_ops_clock_projects_panel {
  margin-top: 0.35rem;
  padding: 1.15rem 1.2rem 1.35rem;
}

body.is-prep-ops-clock-projects-page #prep_ops_clock_projects_panel .ops-clock-projects-form {
  margin-bottom: 1.25rem;
}

body.is-prep-ops-clock-projects-page #prep_ops_clock_projects_panel .ops-clock-projects-form__fields .field {
  margin: 0;
}

body.is-prep-ops-clock-projects-page #prep_ops_clock_projects_panel .ops-clock-projects-form__fields .field label {
  font-weight: 700;
}

body.is-prep-ops-clock-projects-page #prep_ops_clock_projects_panel .ops-clock-projects-toolbar h2 {
  font-size: 1.05rem;
}

.ops-clock-projects-body .main-with-sidebar {
  max-width: 1100px;
  padding: 1.25rem 1.25rem 2.5rem;
}

.ops-clock-projects-card {
  margin-bottom: 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
}

.ops-clock-projects-form__fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 0.85rem;
}

.ops-clock-projects-form__fields label {
  display: grid;
  gap: 0.4rem;
  color: #334155;
  font-weight: 700;
}

.ops-clock-projects-form__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.ops-clock-projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ops-clock-projects-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
}

#prep_project_sites_panel .ops-clock-projects-toolbar {
  justify-content: flex-start;
}

.ops-clock-projects-empty {
  padding: 1rem 0.2rem;
  color: #64748b;
}

.project-site-location-filter {
  box-sizing: border-box;
  width: auto;
  min-width: 9.5rem;
  max-width: 12.5rem;
  height: 2.2rem;
  min-height: 2.2rem;
  padding: 0 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: normal;
}

.project-site-distance-note {
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
}

.project-site-list {
  overflow-x: auto;
}

.project-site-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.project-site-table th,
.project-site-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.project-site-table th {
  color: var(--text-muted, #64748b);
  font-weight: 650;
  white-space: nowrap;
}

.project-site-table th:nth-child(1) { width: 18%; }
.project-site-table th:nth-child(2) { width: 11%; }
.project-site-table th:nth-child(3) { width: 9%; }
.project-site-table th:nth-child(4) { width: 30%; }
.project-site-table th:nth-child(5) { width: 32%; }

.project-site-table td:nth-child(1),
.project-site-table td:nth-child(2),
.project-site-table td:nth-child(4) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-site-address-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #9a3412;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: middle;
}

.project-site-address-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.project-site-address-mark,
.project-site-address-more {
  flex: 0 0 auto;
  color: var(--text-muted, #64748b);
  font-size: 0.82rem;
  text-decoration: none;
}

.project-site-address-mark {
  margin-right: 0.35rem;
}

.project-site-address-more {
  margin-left: 0.35rem;
}

.project-site-distance-cell {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.project-site-distance-cell .toolbar-btn {
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
}

.project-site-distance-cell input {
  width: 4.6rem;
}

.project-site-frequency-dialog {
  width: min(100%, 880px);
}

.project-site-frequency-table td:first-child {
  width: 5rem;
  white-space: nowrap;
}

.time-clock-helper.is-far {
  color: #c2410c;
  font-weight: 650;
}

.prep-tc-distance-actions {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.45rem;
  vertical-align: middle;
}

.prep-tc-site-distance.is-far {
  color: #c2410c;
  font-weight: 650;
}

.ops-clock-projects-table-wrap {
  overflow-x: auto;
}

.ops-clock-projects-table {
  width: 100%;
  border-collapse: collapse;
}

.ops-clock-projects-table th,
.ops-clock-projects-table td {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.ops-clock-projects-table th {
  color: #64748b;
  font-size: 0.86rem;
}

.ops-clock-projects-state {
  display: inline-flex;
  min-height: 1.6rem;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.ops-clock-projects-state.is-on {
  background: #ecfdf5;
  color: #15803d;
}

.ops-clock-projects-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ops-clock-projects-delete {
  color: #b91c1c;
}

@media (max-width: 768px) {
  .ops-clock-projects-form__fields,
  html.is-mobile .ops-clock-projects-form__fields,
  body.is-mobile .ops-clock-projects-form__fields {
    grid-template-columns: 1fr;
  }

  .ops-clock-projects-form__actions,
  html.is-mobile .ops-clock-projects-form__actions,
  body.is-mobile .ops-clock-projects-form__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.prep-resource-plan-modal-dialog {
  width: min(calc(100vw - 2rem), 2200px);
  max-width: none;
  overflow-x: hidden;
}
.prep-resource-plan-import-modal { z-index: 1004; }
.prep-resource-plan-import-dialog {
  width: min(calc(100vw - 2rem), 32rem);
  max-width: none;
}
.prep-resource-plan-import-body {
  display: grid;
  gap: 0.75rem;
}
.prep-resource-plan-import-fields {
  display: grid;
  gap: 0.55rem;
}
.prep-resource-plan-import-field {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}
.prep-resource-plan-import-field span {
  font-weight: 600;
  font-size: 0.88rem;
}
.prep-resource-plan-import-field select {
  width: 100%;
  height: 2rem;
  font: inherit;
}
.prep-resource-plan-import-preview {
  margin: 0;
  font-weight: 650;
}
.prep-resource-plan-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.7rem;
  min-width: 0;
}
.prep-resource-plan-title-row h2 {
  margin: 0;
}
#prep_resource_plan_status {
  margin: 0;
  color: var(--muted);
}
.prep-resource-plan-body {
  display: grid;
  gap: 0.55rem;
}
.prep-resource-plan-board {
  width: 100%;
  min-width: 0;
  min-height: 12rem;
  --plan-day-width: 26px;
  --plan-head-month: 1.55rem;
  --plan-head-day: 2.05rem;
  --plan-row-height: 2.45rem;
  --plan-meta-wbs: 3rem;
  --plan-meta-title: 8.4rem;
  --plan-meta-owner: 7.6rem;
  --plan-meta-date: 5rem;
  --plan-meta-duration: 5rem;
  --plan-meta-actions: max-content;
}
.prep-resource-plan-split {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-height: min(68vh, 760px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(40, 70, 90, 0.06);
}
.prep-resource-plan-split.is-scroll-together {
  overflow: auto;
  scrollbar-width: thin;
}
.prep-resource-plan-meta-pane,
.prep-resource-plan-axis-pane {
  min-width: 0;
}
.prep-resource-plan-split.is-frozen .prep-resource-plan-meta-pane {
  flex: 0 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid var(--border);
}
.prep-resource-plan-split.is-frozen .prep-resource-plan-meta-pane::-webkit-scrollbar {
  display: none;
}
.prep-resource-plan-split.is-frozen .prep-resource-plan-axis-pane {
  flex: 1 1 0%;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.prep-resource-plan-split.is-scroll-together .prep-resource-plan-meta-pane,
.prep-resource-plan-split.is-scroll-together .prep-resource-plan-axis-pane {
  flex: 0 0 auto;
  overflow: visible;
}
.prep-resource-plan-split.is-meta-hidden .prep-resource-plan-meta-pane {
  display: none;
}
.prep-resource-plan-split.is-meta-hidden .prep-resource-plan-axis-pane {
  flex: 1 1 0%;
  min-width: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.prep-resource-plan-meta-table {
  display: grid;
  grid-template-columns:
    var(--plan-meta-wbs)
    var(--plan-meta-title)
    var(--plan-meta-owner)
    var(--plan-meta-date)
    var(--plan-meta-date)
    var(--plan-meta-duration)
    var(--plan-meta-actions);
  width: max-content;
}
.prep-resource-plan-axis-table {
  position: relative;
  display: grid;
  grid-template-columns: calc(var(--plan-day-count, 21) * var(--plan-day-width, 26px));
  width: calc(var(--plan-day-count, 21) * var(--plan-day-width, 26px));
  min-width: calc(var(--plan-day-count, 21) * var(--plan-day-width, 26px));
  max-width: calc(var(--plan-day-count, 21) * var(--plan-day-width, 26px));
}
.prep-resource-plan-meta-table > *,
.prep-resource-plan-axis-table > * {
  box-sizing: border-box;
  border-right: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
}
.prep-resource-plan-meta-table > .prep-resource-plan-head.is-span {
  grid-row: auto;
  position: sticky;
  top: 0;
  z-index: 4;
  height: calc(var(--plan-head-month) + var(--plan-head-day));
  min-height: calc(var(--plan-head-month) + var(--plan-head-day));
  max-height: calc(var(--plan-head-month) + var(--plan-head-day));
}
.prep-resource-plan-meta-table > .prep-resource-plan-cell,
.prep-resource-plan-track {
  height: var(--plan-row-height);
  min-height: var(--plan-row-height);
  max-height: var(--plan-row-height);
}
.prep-resource-plan-axis-table > .prep-resource-plan-month-head {
  position: sticky;
  top: 0;
  z-index: 4;
  height: var(--plan-head-month);
  min-height: var(--plan-head-month);
  max-height: var(--plan-head-month);
}
.prep-resource-plan-axis-table > .prep-resource-plan-day-head {
  position: sticky;
  top: var(--plan-head-month);
  z-index: 4;
  height: var(--plan-head-day);
  min-height: var(--plan-head-day);
  max-height: var(--plan-head-day);
  overflow: hidden;
}
.prep-resource-plan-axis-table .prep-resource-plan-month {
  min-height: 0;
  height: 100%;
}
#btn_prep_resource_plan_freeze[aria-pressed="true"],
#btn_prep_resource_plan_hide_meta[aria-pressed="true"] {
  background: #efe4cf;
  box-shadow: inset 0 0 0 1px #c4b496;
}
.prep-resource-plan-color {
  position: absolute;
  top: 0.32rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.prep-resource-plan-color::before {
  content: "";
  width: 0.92rem;
  height: 0.92rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--plan-swatch, #7dce86);
  box-shadow: 0 0 0 1px rgba(70, 52, 24, 0.35);
}
.prep-resource-plan-color:hover::before,
.prep-resource-plan-color:focus-visible::before {
  transform: scale(1.12);
}
.prep-plan-color-list {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 0.15rem;
  min-width: 13.5rem;
  margin: 0;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(70, 52, 24, 0.16);
}
.prep-plan-color-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.32rem 0.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}
.prep-plan-color-swatch {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--plan-swatch);
  box-shadow: inset 0 0 0 1px rgba(70, 52, 24, 0.2);
}
.prep-plan-color-copy {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.prep-plan-color-copy strong {
  font-weight: 650;
}
.prep-plan-color-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}
.prep-plan-color-option:hover,
.prep-plan-color-option.is-current {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
.prep-resource-plan-empty {
  margin: 0;
  padding: 1.2rem 0.2rem;
  color: var(--muted);
}
.prep-resource-plan-scroll {
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 35%, transparent) transparent;
}
.prep-resource-plan-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.prep-resource-plan-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 32%, transparent);
}
.prep-resource-plan-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.prep-resource-plan-tool {
  box-sizing: border-box;
  width: 9.5rem;
  height: 1.85rem;
  min-height: 1.85rem;
  margin: 0;
  padding: 0 0.5rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, #c4b496);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
}
.prep-resource-plan-tool.is-grow {
  width: auto;
  flex: 1 1 12rem;
  min-width: 8rem;
}
.prep-resource-plan-tools .toolbar-btn {
  flex: 0 0 auto;
  min-height: 1.85rem;
  padding: 0 0.7rem;
}
#prep_resource_plan_filter_count {
  flex: 0 0 auto;
  color: var(--muted);
  white-space: nowrap;
}
.prep-resource-plan-table {
  --plan-meta-wbs: 2.5rem;
  --plan-meta-title: 8.4rem;
  --plan-meta-owner: 5.2rem;
  --plan-meta-date: 5rem;
  --plan-meta-actions: 8.4rem;
  --plan-day-width: 22px;
  display: grid;
  grid-template-columns:
    var(--plan-meta-wbs)
    var(--plan-meta-title)
    var(--plan-meta-owner)
    var(--plan-meta-date)
    var(--plan-meta-date)
    var(--plan-meta-actions)
    minmax(calc(var(--plan-day-count, 21) * var(--plan-day-width)), 1fr);
  min-width: max-content;
  padding-bottom: 14px;
}
.prep-resource-plan-table > * {
  box-sizing: border-box;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 2.15rem;
}
.prep-resource-plan-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
  font-size: 0.74rem;
  font-weight: 650;
  text-align: center;
  color: var(--muted);
}
.prep-resource-plan-head.is-span {
  grid-row: span 2;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.55rem;
}
.prep-resource-plan-table > .prep-resource-plan-month-head,
.prep-resource-plan-axis-table > .prep-resource-plan-month-head {
  top: 0;
  min-height: 1.55rem;
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
}
.prep-resource-plan-table > .prep-resource-plan-day-head,
.prep-resource-plan-axis-table > .prep-resource-plan-day-head {
  top: var(--plan-head-month, 1.55rem);
  background: var(--surface);
}
.prep-resource-plan-month {
  min-height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}
.prep-resource-plan-days {
  display: grid;
  grid-template-columns: repeat(var(--plan-day-count, 21), var(--plan-day-width, 26px));
  width: 100%;
  min-height: 0;
}
.prep-resource-plan-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.05;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
}
.prep-resource-plan-day small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 500;
}
.prep-resource-plan-today-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.08rem;
  padding: 0 0.28rem;
  border-radius: 6px;
  background: #fb7185;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}
.prep-resource-plan-axis-table.has-today::after {
  content: "";
  position: absolute;
  top: calc(var(--plan-head-month) + var(--plan-head-day));
  bottom: 0;
  left: var(--plan-today-left);
  z-index: 3;
  width: 0;
  border-left: 1.5px dashed #f08aa0;
  pointer-events: none;
  transform: translateX(-0.75px);
}
.prep-resource-plan-day.is-weekend,
.prep-resource-plan-track-grid > .is-weekend {
  background: color-mix(in srgb, #94a3b8 10%, transparent);
}
.prep-resource-plan-day.is-today,
.prep-resource-plan-track-grid > .is-today {
  background: color-mix(in srgb, #fb7185 9%, transparent);
}
.prep-resource-plan-sticky {
  position: sticky;
  z-index: 3;
  background: var(--surface);
}
.prep-resource-plan-head.prep-resource-plan-sticky {
  z-index: 6;
  background: color-mix(in srgb, var(--surface) 86%, var(--bg));
}
.prep-resource-plan-sticky.is-wbs { left: 0; }
.prep-resource-plan-sticky.is-title { left: var(--plan-meta-wbs); }
.prep-resource-plan-sticky.is-owner { left: calc(var(--plan-meta-wbs) + var(--plan-meta-title)); }
.prep-resource-plan-sticky.is-start { left: calc(var(--plan-meta-wbs) + var(--plan-meta-title) + var(--plan-meta-owner)); }
.prep-resource-plan-sticky.is-end { left: calc(var(--plan-meta-wbs) + var(--plan-meta-title) + var(--plan-meta-owner) + var(--plan-meta-date)); }
.prep-resource-plan-sticky.is-actions {
  left: calc(var(--plan-meta-wbs) + var(--plan-meta-title) + var(--plan-meta-owner) + (var(--plan-meta-date) * 2));
  box-shadow: 8px 0 12px -10px rgba(70, 52, 24, 0.55);
}
.prep-resource-plan-cell {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
}
.prep-resource-plan-cell.is-wbs {
  position: relative;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.prep-resource-plan-cell.is-wbs.is-draggable {
  cursor: grab;
}
body.is-plan-row-dragging,
body.is-plan-row-dragging .prep-resource-plan-cell.is-wbs.is-draggable {
  cursor: grabbing;
  user-select: none;
}
.prep-resource-plan-cell.is-plan-dragging,
.prep-resource-plan-track.is-plan-dragging {
  opacity: 0.55;
}
.prep-resource-plan-cell.is-plan-drop-before::after,
.prep-resource-plan-track.is-plan-drop-before::after,
.prep-resource-plan-cell.is-plan-drop-after::after,
.prep-resource-plan-track.is-plan-drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #8a5a2a;
  z-index: 6;
  pointer-events: none;
}
.prep-resource-plan-cell.is-plan-drop-before::after,
.prep-resource-plan-track.is-plan-drop-before::after {
  top: 0;
}
.prep-resource-plan-cell.is-plan-drop-after::after,
.prep-resource-plan-track.is-plan-drop-after::after {
  bottom: 0;
}
.prep-resource-plan-cell.is-plan-drop-before,
.prep-resource-plan-cell.is-plan-drop-after {
  position: relative;
}
.prep-resource-plan-cell.is-owner {
  align-items: stretch;
}
.prep-resource-plan-cell .prep-plan-owners {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.prep-resource-plan-cell .prep-plan-owner-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
  height: 100%;
  min-height: 0;
  padding-right: 1.05rem;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.prep-resource-plan-cell .prep-plan-owner-chip {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 1.15rem;
  flex: 0 0 auto;
  justify-content: space-between;
  box-sizing: border-box;
}
.prep-resource-plan-cell .prep-plan-owner-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-resource-plan-cell .prep-plan-owner-add {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dim, #6b4b2a);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.prep-resource-plan-cell .prep-plan-owner-add:hover,
.prep-resource-plan-cell .prep-plan-owner-add:focus-visible {
  color: var(--accent);
  outline: none;
}
.prep-resource-plan-cell .prep-plan-owners.is-adding .prep-plan-owner-add {
  visibility: hidden;
}
.prep-resource-plan-cell .prep-plan-owner-input[hidden] {
  display: none;
}
.prep-resource-plan-cell .prep-plan-owners.is-adding .prep-plan-owner-input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--surface, #fff);
}
.prep-plan-wbs-no {
  display: inline-block;
  line-height: 1;
}
.prep-plan-wbs-delete {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  cursor: pointer;
  width: 0.9rem;
  height: 0.9rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4a4742;
  font-size: 0.78rem;
  line-height: 0.9rem;
  cursor: pointer;
}
.prep-plan-wbs-delete:hover,
.prep-plan-wbs-delete:focus-visible {
  background: rgba(58, 54, 48, 0.12);
  color: #2a2724;
  outline: none;
}
.prep-resource-plan-cell.is-title {
  gap: 0.35rem;
}
.prep-resource-plan-title-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.prep-resource-plan-title-btn:hover,
.prep-resource-plan-title-btn:focus-visible {
  color: var(--accent);
}
.prep-resource-plan-cell.is-group,
.prep-resource-plan-track.is-group,
.prep-resource-plan-sticky.is-group {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.prep-resource-plan-cell.is-group .prep-resource-plan-title-btn {
  font-weight: 700;
}
.prep-plan-owners {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  overflow-x: auto;
}
.prep-plan-owner-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: 6.5rem;
  height: 1.35rem;
  padding: 0 0.1rem 0 0.4rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: var(--accent-dim);
  font-size: 0.76rem;
  line-height: 1;
}
.prep-plan-owner-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.2rem;
  font: inherit;
  line-height: 1;
}
.prep-plan-owner-chip button:hover,
.prep-plan-owner-chip button:focus-visible {
  color: var(--accent-dim);
}
.prep-plan-owners .prep-plan-owner-input {
  flex: 1 0 2.8rem;
  width: auto;
  min-width: 2.8rem;
}
.prep-plan-owner-field .prep-plan-owners {
  flex-wrap: wrap;
  align-items: center;
  overflow: visible;
  gap: 0.28rem;
  min-height: 2.15rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.prep-plan-owner-field .prep-plan-owners:focus-within {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
.prep-resource-plan-editor-form .prep-plan-owner-field .prep-plan-owner-input {
  flex: 1 1 7rem;
  width: auto;
  min-width: 6rem;
  height: 1.45rem;
  min-height: 1.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.prep-resource-plan-editor-form .prep-plan-owner-field .prep-plan-owner-input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}
.prep-resource-plan-editor-form .prep-plan-owner-field .prep-plan-owner-input::placeholder {
  color: var(--muted);
}
.prep-plan-share-list {
  display: grid;
  gap: 0.25rem;
  max-height: 16rem;
  margin: 0.6rem 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.prep-plan-share-chat {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}
.prep-plan-share-chat.is-active,
.prep-plan-share-chat:hover {
  border-color: var(--border);
  background: color-mix(in srgb, var(--border) 35%, #fff);
}
.prep-resource-plan-cell input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 1.55rem;
  min-height: 1.55rem;
  margin: 0;
  padding: 0 0.25rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.74rem;
}
.prep-resource-plan-cell input:hover,
.prep-resource-plan-cell input:focus {
  border-color: color-mix(in srgb, var(--border) 85%, #c4b496);
  background: #fff;
  outline: none;
}
.prep-resource-plan-title-input {
  font-weight: inherit;
}
.prep-resource-plan-cell.is-group .prep-resource-plan-title-input {
  font-weight: 700;
}
.prep-plan-picker-list {
  position: fixed;
  z-index: 1200;
  max-height: 14rem;
  overflow: auto;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(70, 52, 24, 0.16);
}
.prep-plan-picker-option,
.prep-plan-picker-empty {
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
}
.prep-plan-picker-option { cursor: pointer; }
.prep-plan-picker-option:hover,
.prep-plan-picker-option.is-active {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
.prep-plan-picker-option.is-add {
  color: #8a5a2b;
  font-weight: 650;
}
.prep-plan-picker-empty { color: var(--muted); }
.prep-resource-plan-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
}
.prep-resource-plan-actions .toolbar-btn,
.prep-resource-plan-actions .toolbar-btn.primary {
  min-height: 1.4rem;
  padding: 0 0.32rem;
  border-radius: 6px;
  background: #fff;
  color: #6b4e2e;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #c4b496 70%, var(--border));
  font-size: 0.7rem;
  font-weight: 650;
}
.prep-resource-plan-actions .toolbar-btn:hover,
.prep-resource-plan-actions .toolbar-btn.primary:hover {
  transform: none;
  background: #fffaf2;
}
.prep-resource-plan-track {
  position: relative;
  min-height: 2.15rem;
  overflow: hidden;
}
.prep-resource-plan-track-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--plan-day-count, 21), var(--plan-day-width, 26px));
  width: 100%;
}
.prep-resource-plan-board.is-plan-day-compact .prep-resource-plan-day small {
  display: none;
}
.prep-resource-plan-board.is-plan-day-compact .prep-resource-plan-today-pill {
  min-width: 0;
  padding: 0 0.15rem;
  font-size: 0.58rem;
}
.prep-resource-plan-track-grid > span {
  border-right: 1px solid color-mix(in srgb, var(--border) 42%, transparent);
}
.prep-resource-plan-bar {
  position: absolute;
  top: 0.5rem;
  display: flex;
  align-items: center;
  height: 1.4rem;
  padding: 0 0.4rem 0 1.7rem;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #7dce86;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(30, 50, 70, 0.08);
  color: #1c2836;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.prep-resource-plan-bar-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prep-resource-plan-bar.is-group {
  top: 0.92rem;
  height: 0.58rem;
  padding: 0;
  border-radius: 999px;
}
.prep-resource-plan-bar.is-group .prep-resource-plan-bar-label {
  display: none;
}
.prep-resource-plan-bar:hover,
.prep-resource-plan-bar:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, #fff);
  outline-offset: 1px;
}
.prep-resource-progress-gantt-board {
  --plan-meta-wbs: 2.6rem;
  --plan-meta-title: 10rem;
  --plan-meta-owner: 5.5rem;
  --plan-meta-date: 4.5rem;
  --plan-meta-duration: 4rem;
  --plan-meta-actions: 7.2rem;
}
.prep-resource-progress-gantt-board .prep-resource-plan-split {
  max-height: min(32rem, 52vh);
  border-radius: 9px;
  box-shadow: none;
}
.prep-resource-progress-gantt-board .prep-resource-plan-meta-pane,
.prep-resource-progress-gantt-board .prep-resource-plan-axis-pane {
  overscroll-behavior-y: auto;
}
.prep-resource-progress-gantt-board .prep-resource-plan-cell {
  overflow: hidden;
  white-space: nowrap;
}
.prep-resource-progress-gantt-board .prep-resource-plan-cell.is-owner {
  align-items: center;
}
.prep-resource-progress-gantt-board .prep-resource-plan-day.is-today {
  position: relative;
}
.prep-resource-progress-gantt-board .prep-resource-plan-day .prep-resource-plan-today-pill {
  position: absolute;
  z-index: 1;
  min-width: 1.85rem;
}
.prep-resource-progress-gantt-board .prep-resource-plan-title-btn {
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.prep-resource-progress-gantt-board .prep-resource-plan-bar.is-readonly {
  box-sizing: border-box;
  padding-left: 0.4rem;
  cursor: default;
}
@media (max-width: 800px) {
  .prep-resource-progress-gantt-board .prep-resource-plan-split {
    overflow-x: auto;
  }
  .prep-resource-progress-gantt-board .prep-resource-plan-split.is-frozen .prep-resource-plan-axis-pane {
    flex: 0 0 28rem;
  }
}
.prep-resource-plan-editor-dialog {
  width: min(36rem, calc(100vw - 2rem));
}
.prep-resource-plan-editor-form {
  display: grid;
  gap: 0.7rem;
  padding: 0 0.2rem 0.4rem;
}
.prep-resource-plan-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.8rem;
}
.prep-resource-plan-editor-dates {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.8rem;
}
.prep-resource-plan-editor-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}
.prep-resource-plan-editor-form input,
.prep-resource-plan-editor-form select {
  box-sizing: border-box;
  width: 100%;
  min-height: 2rem;
  font: inherit;
}
#prep_resource_plan_editor_modal {
  z-index: 1012;
}
@media (max-width: 760px) {
  .prep-resource-plan-editor-grid,
  .prep-resource-plan-editor-dates { grid-template-columns: 1fr; }
  .prep-resource-plan-board,
  .prep-resource-plan-table {
    --plan-meta-title: 12rem;
    --plan-meta-owner: 6.4rem;
    --plan-meta-date: 7.4rem;
    --plan-meta-actions: max-content;
  }
}

#prep_delivery_panel.is-project-outsource-stats-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view {
  overflow: auto;
}
.prep-issue-stats-group-select {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: max-content;
  color: var(--muted);
  font-size: 0.84rem;
}
.prep-issue-stats-group-select select {
  width: 9rem;
  min-height: 2.2rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.prep-issue-stats {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}
.prep-issue-stats-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.prep-issue-stats-metric {
  display: grid;
  gap: 0.1rem;
  min-width: 6.2rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.prep-issue-stats-metric strong {
  font-size: 1.05rem;
  line-height: 1.2;
}
.prep-issue-stats-metric span {
  color: var(--muted);
  font-size: 0.75rem;
}
.prep-issue-stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.prep-issue-stats-table th,
.prep-issue-stats-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 0.84rem;
  white-space: nowrap;
}
.prep-issue-stats-table th {
  background: color-mix(in srgb, var(--surface) 82%, var(--bg));
  color: var(--muted);
  font-weight: 650;
}
.prep-issue-stats-table td:first-child {
  white-space: normal;
  min-width: 10rem;
}
.prep-project-todo-filter.is-project .prep-project-todo-filter-combo input[type="search"] {
  width: 16rem;
}
.prep-project-todo-filter.is-project .prep-project-todo-filter-menu {
  width: max-content;
  min-width: 16rem;
  max-width: 24rem;
}
#prep_delivery_panel.is-project-outsource-stats-mode .delivery-board-workspace > #prep_delivery_board_view.delivery-board-view > .prep-outsource-stats {
  flex: 0 0 auto;
  height: auto;
  min-height: auto;
  overflow: visible;
}
.prep-outsource-stats {
  display: grid;
  gap: 0.85rem;
}
.prep-outsource-stats-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.prep-outsource-stats-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.prep-outsource-stats-metric {
  display: grid;
  gap: 0.1rem;
  min-width: 4.6rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
}
button.prep-outsource-stats-metric {
  cursor: pointer;
}
.prep-outsource-stats-metric strong {
  font-size: 1.15rem;
  line-height: 1.2;
}
.prep-outsource-stats-metric span {
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font-size: 0.78rem;
}
.prep-outsource-stats-metric.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.prep-outsource-stats-table,
.prep-outsource-stats-issues {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  color: var(--text);
}
.prep-outsource-stats-table th,
.prep-outsource-stats-table td,
.prep-outsource-stats-issues th,
.prep-outsource-stats-issues td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}
.prep-outsource-stats-table th,
.prep-outsource-stats-issues th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}
.prep-outsource-stats-project-name {
  display: grid;
  gap: 0.1rem;
}
.prep-outsource-stats-project-name span,
.prep-outsource-stats-empty {
  color: color-mix(in srgb, var(--text) 68%, transparent);
}
.prep-outsource-stats-detail td {
  background: var(--bg);
}
.prep-outsource-stats-list {
  display: grid;
  gap: 0.75rem;
}
.prep-outsource-stats-block {
  display: grid;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.prep-outsource-stats-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 1rem;
}
.prep-outsource-stats-block-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prep-outsource-stats-block-counts li {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font-size: 0.8rem;
}
.prep-outsource-stats-block-counts strong {
  color: var(--text);
  font-size: 0.92rem;
}
.prep-outsource-stats-bubbles {
  display: grid;
  gap: 0.5rem;
}
.prep-outsource-stats-bubble {
  position: relative;
  display: grid;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 2rem 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.prep-outsource-stats-bubble-main {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: start;
}
.prep-outsource-stats-bubble-index {
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
.prep-outsource-stats-bubble-text {
  width: 100%;
  min-width: 0;
  min-height: calc(1.45em * 2);
  margin: 0;
  padding: 0;
  border: 0;
  resize: vertical;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  line-height: 1.45;
}
.prep-outsource-stats-bubble-meta {
  margin: 0;
  padding-left: 1.8rem;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font-size: 0.8rem;
}
.prep-outsource-stats-bubble-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.9rem;
  padding-left: 1.8rem;
}
.prep-outsource-stats-bubble-controls label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}
.prep-outsource-stats-bubble-controls select,
.prep-outsource-stats-bubble-controls input[type="date"] {
  min-height: 2rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.prep-outsource-stats-bubble-delete {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.prep-outsource-stats-bubble-delete:hover {
  color: var(--text);
  background: var(--surface);
}
.prep-outsource-stats-notice {
  color: var(--muted);
}
.prep-outsource-stats-issues {
  min-width: 46rem;
}

/* 飞书智能体入会 · 自动填表助手弹窗 */
.vc-meeting-assistant-dialog {
  width: min(94vw, 1280px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}
.vc-meeting-assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.vc-meeting-assistant-badge {
  margin: 0.2rem 0 0;
}
.vc-meeting-assistant-badge.is-connected {
  color: #16a34a;
  font-weight: 600;
}
.vc-meeting-assistant-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vc-meeting-auto-poll-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.vc-meeting-assistant-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.vc-meeting-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vc-meeting-control-group--project {
  flex: 1 1 320px;
  justify-content: flex-end;
}
.vc-meeting-input {
  min-height: 2.1rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 12.5rem;
}
.vc-meeting-input--pwd {
  width: 8.5rem;
}
.vc-meeting-project-select {
  min-height: 2.1rem;
  max-width: 24rem;
  padding: 0.2rem 0.5rem;
}
.vc-meeting-status {
  margin: 0;
  min-height: 1.2rem;
}
.vc-meeting-assistant-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1rem;
  min-height: 26rem;
  max-height: 62vh;
  overflow: hidden;
}
.vc-meeting-stream-pane,
.vc-meeting-suggestions-pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.vc-meeting-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.vc-meeting-pane-head h3 {
  margin: 0;
  font-size: 0.98rem;
}
.vc-meeting-stream-list,
.vc-meeting-suggestion-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.vc-meeting-stream-item {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.vc-meeting-stream-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
}
.vc-meeting-stream-tag {
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary, #2563eb) 14%, transparent);
  font-size: 0.75rem;
}
.vc-meeting-stream-pick-btn {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
}
.vc-meeting-stream-text {
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}
.vc-meeting-simulate-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.vc-meeting-simulate-form input {
  flex: 1;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.vc-meeting-sug-card {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.vc-meeting-sug-card.is-applied {
  opacity: 0.72;
}
.vc-meeting-sug-head {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vc-meeting-card-project-select {
  flex: 1 1 200px;
  min-height: 1.95rem;
}
.vc-meeting-card-field-select {
  flex: 0 0 180px;
  min-height: 1.95rem;
}
.vc-meeting-sug-diff {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.vc-meeting-sug-current {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-meeting-sug-new {
  flex: 1 1 220px;
}
.vc-meeting-card-value-input,
.vc-meeting-card-value-select {
  width: 100%;
  min-height: 1.95rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.vc-meeting-sug-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.vc-meeting-sug-source {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-meeting-sug-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.vc-meeting-applied-tag {
  font-size: 0.8rem;
  color: #16a34a;
  font-weight: 600;
}
@media (max-width: 960px) {
  .vc-meeting-assistant-grid {
    grid-template-columns: 1fr;
    max-height: 70vh;
  }
}

.vc-meeting-floating-dock {
  position: fixed;
  left: 0.75rem;
  top: 5.2rem;
  bottom: 1.25rem;
  width: min(21rem, 88vw);
  z-index: 12000;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  pointer-events: auto;
}
.vc-meeting-floating-dock[hidden] {
  display: none !important;
}
.vc-meeting-floating-dock.is-collapsed {
  bottom: auto;
  height: auto;
}
.vc-meeting-floating-dock.is-collapsed .vc-meeting-dock-body {
  display: none;
}
.vc-meeting-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent, #8b5e34) 10%, var(--surface));
}
.vc-meeting-dock-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}
.vc-meeting-dock-title-wrap strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#vc_meeting_dock_count {
  flex-shrink: 0;
  white-space: nowrap;
  margin: 0;
}
.vc-meeting-dock-live-dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: #94a3b8;
  flex-shrink: 0;
}
.vc-meeting-dock-live-dot.is-live {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}
.vc-meeting-dock-write-state {
  color: #15803d;
  white-space: nowrap;
}
.vc-meeting-dock-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.vc-meeting-dock-btn {
  padding: 0.15rem 0.45rem;
  font-size: 0.76rem;
  min-height: 1.65rem;
}
.vc-meeting-dock-icon-btn {
  width: 1.7rem;
  padding: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vc-meeting-dock-icon-btn .vc-meeting-write-icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
  display: block;
}
.vc-meeting-dock-icon-btn .vc-meeting-write-icon-resume {
  display: none;
}
.vc-meeting-dock-icon-btn.is-paused {
  color: #15803d;
}
.vc-meeting-dock-icon-btn.is-paused .vc-meeting-write-icon-pause {
  display: none;
}
.vc-meeting-dock-icon-btn.is-paused .vc-meeting-write-icon-resume {
  display: block;
}
.vc-meeting-dock-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vc-meeting-dock-fill-bar {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.vc-meeting-dock-write-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.vc-meeting-dock-write-actions .vc-meeting-dock-btn.is-current {
  box-shadow: inset 0 0 0 1px #15803d;
}
.vc-meeting-dock-autofill-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.vc-meeting-dock-armed-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
}
.vc-meeting-dock-armed-hint.is-active {
  color: var(--primary, #16a34a);
  font-weight: 600;
}
.vc-meeting-dock-quick-connect {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}
.vc-meeting-dock-no-input {
  flex: 1;
  min-width: 7rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
.vc-meeting-dock-btn.is-mic-active {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.28);
}
.vc-meeting-dock-item.is-interim {
  border-style: dashed;
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
}
.vc-meeting-dock-stream-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.vc-meeting-dock-item {
  padding: 0.48rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.vc-meeting-dock-item:hover {
  border-color: var(--primary, #8b5e34);
}
.vc-meeting-dock-item.is-selected {
  border-color: var(--primary, #8b5e34);
  background: color-mix(in srgb, var(--primary, #8b5e34) 10%, var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary, #8b5e34) 35%, transparent);
}
.vc-meeting-dock-item-meta {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}
.vc-meeting-dock-speaker {
  font-weight: 600;
}
.vc-meeting-dock-pick-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.vc-meeting-dock-pick-tag {
  font-size: 0.72rem;
  color: var(--muted);
}
.vc-meeting-dock-item.is-selected .vc-meeting-dock-pick-tag {
  color: var(--primary, #8b5e34);
  font-weight: 600;
}
.vc-meeting-dock-unpick {
  border: 0;
  background: transparent;
  padding: 0;
  color: #9a3412;
  font-size: 0.72rem;
  line-height: 1.2;
  cursor: pointer;
}
.vc-meeting-dock-unpick:hover {
  text-decoration: underline;
}
.vc-meeting-dock-item-text {
  font-size: 0.85rem;
  line-height: 1.42;
  word-break: break-word;
}
.vc-meeting-timing {
  margin-top: 0.35rem;
  padding-top: 0.28rem;
  border-top: 1px dashed rgba(139, 94, 52, 0.28);
  font-size: 0.72rem;
  line-height: 1.45;
}
.vc-meeting-timing-title {
  font-weight: 600;
  margin-bottom: 0.12rem;
}
.vc-meeting-timing-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted, #7c6a58);
}
.vc-meeting-timing-row.is-slow {
  color: #9a3412;
  font-weight: 700;
}
.vc-meeting-timing-verdict {
  margin-top: 0.18rem;
}
.vc-meeting-inline-confirm-btn {
  margin-left: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.76rem;
  min-height: 1.7rem;
  vertical-align: middle;
}
@keyframes vcMeetingInputFlash {
  0% {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}
.vc-meeting-input-filled-flash {
  animation: vcMeetingInputFlash 0.9s ease-out;
}
.vc-meeting-streaming-target {
  outline: 2px solid #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18) !important;
}

.prep-fae-entry-modal {
  z-index: 1012;
}
.prep-fae-entry-dialog {
  width: min(calc(100vw - 2rem), 1180px);
  max-width: none;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.prep-fae-entry-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}
.prep-fae-entry-body {
  display: grid;
  gap: 0.9rem;
  max-height: calc(100vh - 18rem);
  overflow: auto;
  padding-right: 0.2rem;
}
.prep-fae-entry-intro,
.prep-fae-entry-rule {
  margin: 0;
}
.prep-fae-entry-rule {
  grid-column: 1 / -1;
}
.prep-fae-entry-meta,
.prep-fae-entry-sign {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.65rem 0.75rem;
}
.prep-fae-entry-field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 650;
}
.prep-fae-entry-field.is-wide {
  grid-column: 1 / -1;
}
.prep-fae-entry-field input,
.prep-fae-entry-field textarea,
.prep-fae-entry-evidence input {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-weight: 450;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.32rem 0.45rem;
}
.prep-fae-entry-field textarea {
  resize: vertical;
  min-height: 4.5rem;
}
.prep-fae-entry-risk-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.32rem 0.45rem;
}
.prep-fae-entry-risk-box textarea {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  min-height: 3.2rem;
  resize: vertical;
}
.prep-fae-entry-risk-box textarea:focus {
  outline: none;
}
.prep-fae-entry-risk-box:focus-within {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 1px;
}
.prep-fae-entry-choice-row {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.4fr);
  gap: 0.75rem;
}
.prep-fae-entry-choices {
  margin: 0;
  padding: 0.45rem 0.75rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.prep-fae-entry-choices legend {
  padding: 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.prep-fae-entry-traits,
.prep-fae-entry-trait,
.prep-fae-entry-choice,
.prep-fae-entry-option {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: flex-start;
}
.prep-fae-entry-trait + .prep-fae-entry-trait {
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}
.prep-fae-entry-choice,
.prep-fae-entry-option {
  font-size: 0.82rem;
  font-weight: 450;
  line-height: 1.35;
}
.prep-fae-entry-choice input,
.prep-fae-entry-option input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.prep-fae-entry-option {
  flex-wrap: nowrap;
  min-width: 0;
}
.prep-fae-entry-option span {
  min-width: 0;
}
.prep-fae-entry-section h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}
.prep-fae-entry-section .small {
  margin: 0 0 0.45rem;
}
.prep-fae-entry-table {
  min-width: 52rem;
}
.prep-fae-entry-section {
  overflow-x: auto;
}
.prep-fae-entry-row {
  display: grid;
  grid-template-columns: 3.4rem 9.2em minmax(22rem, 1fr) minmax(10rem, 13rem);
  gap: 0.45rem 0.7rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.prep-fae-entry-row.is-head {
  padding-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.prep-fae-entry-row.is-deny {
  background: rgba(248, 113, 113, 0.1);
}
.prep-fae-entry-row.is-conditional {
  background: rgba(251, 191, 36, 0.1);
}
.prep-fae-entry-title {
  font-weight: 650;
  white-space: nowrap;
}
.prep-fae-entry-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.85rem;
}
.prep-fae-entry-reference {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.75rem 0.75rem;
}
.prep-fae-entry-reference h3 {
  margin: 0;
  font-size: 0.95rem;
}
.prep-fae-entry-reference-groups {
  display: grid;
  gap: 0.85rem;
  margin: 0.7rem 0;
}
.prep-fae-entry-reference-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}
.prep-fae-entry-reference-clause {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.28rem 0;
  font-weight: 450;
  line-height: 1.45;
}
.prep-fae-entry-reference-clause input {
  margin-top: 0.22rem;
  flex: 0 0 auto;
}
.prep-fae-entry-yesno {
  display: inline-flex;
  flex: 0 0 5.6rem;
  gap: 0.55rem;
  align-items: center;
}
.prep-fae-entry-yesno label {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
}
.prep-fae-entry-yesno input {
  margin-top: 0;
}
.prep-fae-entry-risk-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
}
.prep-fae-entry-risk-images:empty {
  display: none;
}
.prep-fae-entry-risk-image {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  justify-items: start;
}
.prep-fae-entry-risk-thumb {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface, #fff) 88%, var(--border));
  cursor: zoom-in;
  overflow: hidden;
}
.prep-fae-entry-risk-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}
.prep-fae-entry-risk-image [data-fae-risk-image-remove] {
  border: 0;
  background: transparent;
  color: var(--danger, #c0392b);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}
.prep-fae-entry-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 2.5rem 1.5rem;
  background: rgba(28, 24, 18, 0.72);
}
.prep-fae-entry-image-viewer[hidden] {
  display: none;
}
.prep-fae-entry-image-viewer img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.prep-fae-entry-image-viewer-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #2a2724;
  font-size: 1.2rem;
  line-height: 2rem;
  cursor: pointer;
}
.prep-fae-entry-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  align-items: center;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}
.prep-fae-entry-conclusion {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  min-width: 0;
  font-size: 0.88rem;
}
.prep-fae-entry-conclusion-label.is-allow { color: var(--ok); }
.prep-fae-entry-conclusion-label.is-conditional { color: var(--warn); }
.prep-fae-entry-conclusion-label.is-deny { color: var(--danger); }
.prep-fae-entry-conclusion-label.is-pending { color: var(--muted); }
.prep-fae-entry-promise {
  color: var(--warn);
}
.prep-fae-entry-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.prep-fae-entry-footer-actions .small {
  margin: 0;
}
.prep-fae-entry-share {
  grid-column: 1 / -1;
  margin: 0;
  word-break: break-all;
}
body.prep-fae-public .layout {
  display: none;
}
body.prep-fae-public #prep_fae_entry_modal {
  background: var(--header-surface, #f6f1e7);
}
body.prep-fae-public [data-fae-entry-submit],
body.prep-fae-public #btn_close_prep_fae_entry {
  display: none;
}
#prep_fae_entry_modal.is-fae-result [data-fae-entry-submit],
#prep_fae_entry_modal.is-fae-result #btn_save_prep_fae_entry,
#prep_fae_entry_modal.is-fae-result [data-fae-risk-image-remove] {
  display: none;
}
#prep_fae_entry_modal:not(.is-fae-result) [data-fae-entry-edit] {
  display: none;
}
#prep_fae_entry_modal.is-fae-result input:disabled,
#prep_fae_entry_modal.is-fae-result textarea:disabled,
#prep_fae_entry_modal.is-fae-result select:disabled {
  opacity: 1;
  color: inherit;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-sign {
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-sign .prep-fae-entry-field:not(.is-wide) {
  grid-template-columns: 9.5rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-sign .prep-fae-entry-field input {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0.1rem 0;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-sign input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-box,
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-box:focus-within {
  border: 0;
  background: transparent;
  padding: 0.15rem 0 0;
  outline: none;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-box textarea {
  min-height: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-images {
  gap: 0.75rem;
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-thumb {
  width: auto;
  height: auto;
  max-width: min(100%, 36rem);
}
#prep_fae_entry_modal.is-fae-result .prep-fae-entry-risk-thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 24rem;
  object-fit: contain;
}
.prep-fae-entry-copy-dialog {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 32, 22, 0.35);
}
.prep-fae-entry-copy-dialog[hidden] {
  display: none;
}
.prep-fae-entry-copy-card {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  background: #fff;
  border-radius: 0.6rem;
  box-shadow: 0 12px 40px rgba(40, 32, 22, 0.2);
}
.prep-fae-entry-copy-card p {
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.prep-fae-entry-copy-card input {
  width: 100%;
  box-sizing: border-box;
}
.prep-fae-entry-copy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
@media (max-width: 860px) {
  .prep-fae-entry-choice-row,
  .prep-fae-entry-footer {
    grid-template-columns: 1fr;
  }
  .prep-fae-entry-trait + .prep-fae-entry-trait {
    padding-left: 0;
    border-left: 0;
  }
  .prep-fae-entry-row,
  .prep-fae-entry-row.is-head {
    grid-template-columns: 3.2rem minmax(0, 1fr);
  }
  .prep-fae-entry-options,
  .prep-fae-entry-evidence,
  .prep-fae-entry-row.is-head span:nth-child(n + 3) {
    grid-column: 1 / -1;
  }
  .prep-fae-entry-table {
    min-width: 0;
  }
}
