:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #eff6ff;
  --color-success: #15803d;
  --color-success-soft: #f0fdf4;
  --color-warning: #d97706;
  --color-warning-soft: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-soft: #fef2f2;
  --color-purple: #7c3aed;
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-text: #1f2937;
  --color-text-secondary: #6b7280;
  --color-text-weak: #9ca3af;
  --color-border: #e5e7eb;
  --color-divider: #eef0f3;
  --radius-sm: 6px;
  --radius-md: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--color-bg); }
body { margin: 0; color: var(--color-text); background: var(--color-bg); font: 14px/1.55 Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif; letter-spacing: 0; }
/* Keep page fixed while modal dialogs are open; dialogs themselves still scroll. */
html.dialog-open {
  overflow: hidden;
  overscroll-behavior: none;
  padding-right: var(--dialog-scrollbar-compensation, 0px);
}
html.dialog-open body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  padding-right: var(--dialog-scrollbar-compensation, 0px);
}
dialog {
  overscroll-behavior: contain;
}
dialog[open] {
  overscroll-behavior: contain;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-text); color: white; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 整站：左侧导航壳 */
:root {
  --sidebar-width: 208px;
  --sidebar-collapsed-width: 72px;
  --sidebar-motion: 320ms cubic-bezier(.22, 1, .36, 1);
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns var(--sidebar-motion);
}
html.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}
.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 16px;
  border-right: 1px solid #e8ecf2;
  background:
    linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 48%, #f4f7fb 100%);
  box-shadow: 1px 0 0 rgba(15, 23, 42, .02);
  transition: width var(--sidebar-motion), padding var(--sidebar-motion);
  overflow: hidden;
}
html.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-width);
  padding-left: 10px;
  padding-right: 10px;
}
.sidebar-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 2px 2px 8px;
  transition: min-height var(--sidebar-motion), padding var(--sidebar-motion);
}
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  padding: 4px 6px 4px 4px;
  border-radius: 12px;
  color: var(--color-text);
  text-decoration: none;
  overflow: hidden;
  transition: opacity var(--sidebar-motion), max-width var(--sidebar-motion), padding var(--sidebar-motion);
}
.sidebar-brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
  opacity: 1;
  max-width: 180px;
  transition: opacity 220ms ease, max-width var(--sidebar-motion);
}
.sidebar-brand-text strong {
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
}
.sidebar-brand-text small {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar-toggle {
  position: absolute;
  top: 6px;
  right: 2px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform var(--sidebar-motion),
    margin var(--sidebar-motion);
}
.sidebar-toggle:hover {
  color: var(--color-primary);
  border-color: #bfdbfe;
  background: var(--color-primary-soft);
}
.sidebar-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--sidebar-motion);
}
html.sidebar-collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}
html.sidebar-collapsed .sidebar-toggle {
  position: static;
  margin: 0 auto;
}
html.sidebar-collapsed .sidebar-head {
  justify-content: center;
  padding-bottom: 4px;
}
html.sidebar-collapsed .sidebar-brand {
  max-width: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
}
html.sidebar-collapsed .sidebar-brand-text {
  opacity: 0;
  max-width: 0;
}
.sidebar-nav {
  display: grid;
  gap: 4px;
  align-content: start;
  flex: 1 1 auto;
  overflow: auto;
  padding: 4px 2px 8px;
}
.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  color: #5b6575;
  font-weight: 650;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    width var(--sidebar-motion),
    padding var(--sidebar-motion),
    margin var(--sidebar-motion),
    gap var(--sidebar-motion),
    justify-content var(--sidebar-motion);
}
.sidebar-nav a .nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  color: #7b8798;
  transition: color 180ms ease;
}
.sidebar-nav a .nav-icon svg {
  width: 18px;
  height: 18px;
}
.sidebar-nav a .nav-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  max-width: 160px;
  transition: opacity 200ms ease, max-width var(--sidebar-motion);
}
.sidebar-nav a:hover {
  color: var(--color-primary);
  background: rgba(37, 99, 235, .08);
}
.sidebar-nav a:hover .nav-icon {
  color: var(--color-primary);
}
.sidebar-nav a.active {
  color: var(--color-primary);
  background: linear-gradient(90deg, rgba(37, 99, 235, .14), rgba(37, 99, 235, .06));
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.sidebar-nav a.active .nav-icon {
  color: var(--color-primary);
}
html.sidebar-collapsed .sidebar-nav a {
  justify-content: center;
  gap: 0;
  padding: 0;
  width: 48px;
  margin: 0 auto;
}
html.sidebar-collapsed .sidebar-nav a .nav-label {
  opacity: 0;
  max-width: 0;
}
html.sidebar-collapsed .sidebar-nav a.active {
  box-shadow: none;
  background: rgba(37, 99, 235, .12);
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e8ecf2;
}
.sidebar-user-menu {
  width: 100%;
  margin-left: 0;
}
.sidebar-user-menu .user-menu-trigger {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  transition: padding var(--sidebar-motion), justify-content var(--sidebar-motion);
}
.sidebar-account-icon {
  display: none;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #64748b;
}
.sidebar-account-icon svg {
  width: 20px;
  height: 20px;
}
.sidebar-user-menu .user-copy {
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
  opacity: 1;
  max-width: 180px;
  transition: opacity 200ms ease, max-width var(--sidebar-motion);
}
.sidebar-user-menu .user-copy strong,
.sidebar-user-menu .user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-menu .user-menu-caret {
  transition: opacity 180ms ease;
}
.sidebar-user-menu .user-menu-dropdown {
  left: 0;
  right: auto;
  top: auto;
  bottom: calc(100% + 8px);
  min-width: 200px;
}
html.sidebar-collapsed .sidebar-user-menu .user-menu-trigger {
  justify-content: center;
  padding: 10px 0;
}
html.sidebar-collapsed .sidebar-user-menu .user-copy,
html.sidebar-collapsed .sidebar-user-menu .user-menu-caret {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
}
html.sidebar-collapsed .sidebar-account-icon {
  display: inline-grid;
  place-items: center;
}
html.sidebar-collapsed .sidebar-user-menu .user-menu-dropdown {
  left: calc(100% + 10px);
  bottom: 0;
}
.app-content {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  transition: none;
}
.mobile-topbar {
  display: none;
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 140px; font-size: 16px; font-weight: 700; }
.brand-mark, .mobile-brand-mark { display: none; }
.topbar, .desktop-nav { display: none; }
.user-menu { position: relative; margin-left: auto; display: flex; align-items: center; }
.user-menu-trigger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.user-menu-trigger:hover,
.user-menu.is-open .user-menu-trigger {
  border-color: var(--color-border);
  background: #f8fafc;
}
.user-copy { display: grid; text-align: right; line-height: 1.35; }
.user-copy strong { font-size: 14px; color: var(--color-text); }
.user-copy span { max-width: 240px; color: var(--color-text-secondary); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-caret {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 150ms ease;
}
.user-menu.is-open .user-menu-caret {
  transform: rotate(225deg) translateY(-1px);
}
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}
.user-menu-panel-head {
  display: grid;
  gap: 2px;
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 6px;
}
.user-menu-panel-head strong { font-size: 14px; }
.user-menu-panel-head span { color: var(--color-text-secondary); font-size: 12px; }
.user-menu-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.user-menu-item:hover { background: #f8fafc; }
.user-menu-logout { color: var(--color-danger); }
.user-menu-logout:hover { background: var(--color-danger-soft); }
.avatar { display: none; }

.page-shell { width: min(1600px, 100%); margin: 0 auto; padding: 28px 32px 48px; flex: 1 1 auto; }
.login-page .page-shell,
body:not(.app-shell) .page-shell { width: min(1600px, 100%); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 24px; }
.page-heading h1 { margin: 2px 0 4px; font-size: 24px; line-height: 1.3; }
.page-heading p { margin: 0; color: var(--color-text-secondary); }
.page-heading-actions { align-items: center; }
.eyebrow, .section-kicker { margin: 0; color: var(--color-primary); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--color-text-secondary); font-size: 13px; }
.breadcrumb a:hover { color: var(--color-primary); }

.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font-weight: 650; cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 150ms ease; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .58; cursor: wait; }
.button-primary { color: white; background: var(--color-primary); border-color: var(--color-primary); }
.button-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.button-secondary { color: var(--color-text); background: white; border-color: var(--color-border); }
.button-secondary:hover { border-color: #cbd5e1; background: #f8fafc; }
.button-danger { color: white; background: var(--color-danger); }
.button-danger-quiet { color: var(--color-danger); }
.button-danger-quiet:hover { background: var(--color-danger-soft); }
.button-quiet { color: var(--color-text-secondary); padding-left: 10px; padding-right: 10px; }
.button-quiet:hover { color: var(--color-primary); background: var(--color-primary-soft); }
.button-small { min-height: 34px; padding: 0 10px; font-size: 13px; }
.button-block { width: 100%; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 22px; cursor: pointer; }
.icon-button:hover { background: var(--color-bg); }

.dashboard-heading { align-items: center; }
.date-chip, .count-badge { padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-secondary); background: var(--color-surface); font-size: 12px; font-weight: 650; }
.dashboard-grid { display: grid; grid-template-columns: minmax(220px, 24fr) minmax(380px, 52fr) minmax(220px, 24fr); gap: 20px; align-items: stretch; }
.panel { min-width: 0; min-height: 480px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.tracking-panel { min-height: 540px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--color-divider); }
.panel-header h2 { margin: 2px 0 0; font-size: 18px; }
.metric-list { margin-top: 4px; }
.metric-list button { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; border: 0; border-bottom: 1px solid var(--color-divider); background: transparent; cursor: pointer; }
.metric-list button:hover span { color: var(--color-primary); }
.metric-list strong, .warning-metrics strong { min-width: 34px; text-align: right; font-size: 24px; }
.metric-purple { color: var(--color-purple); }
.metric-danger { color: var(--color-danger); }
.metric-warning { color: var(--color-warning); }
.panel-note { margin-top: auto; padding-top: 18px; color: var(--color-text-secondary); font-size: 13px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--color-text-weak); }
.status-success { background: var(--color-success); }.status-primary { background: var(--color-primary); }.status-neutral { background: var(--color-text-weak); }
.empty-state { flex: 1; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px; text-align: center; }
.empty-state h3 { margin: 18px 0 6px; font-size: 16px; }
.empty-state p { max-width: 360px; margin: 0; color: var(--color-text-secondary); font-size: 13px; }
.empty-state.compact { min-height: 300px; }
.empty-symbol { width: 62px; height: 52px; display: flex; align-items: flex-end; justify-content: center; gap: 5px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fafbfc; }
.empty-symbol span { width: 8px; border-radius: 2px 2px 0 0; background: #cbd5e1; }
.empty-symbol span:nth-child(1) { height: 14px; }.empty-symbol span:nth-child(2) { height: 27px; background: #93c5fd; }.empty-symbol span:nth-child(3) { height: 20px; }
.tracking-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; padding-top: 16px; border-top: 1px solid var(--color-divider); color: var(--color-text-secondary); font-size: 12px; }
.warning-metrics { padding: 8px 0; }
.warning-metrics button { width: 100%; min-height: 72px; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--color-divider); background: transparent; cursor: pointer; }
.warning-metrics button span { display: flex; align-items: center; }
.status-line { width: 3px; height: 24px; display: inline-block; margin-right: 10px; border-radius: 3px; }.status-line.warning { background: var(--color-warning); }.status-line.danger { background: var(--color-danger); }
.notice-group { padding: 18px 2px; border-bottom: 1px solid var(--color-divider); }
.notice-heading { display: flex; justify-content: space-between; align-items: center; }.notice-heading h3 { margin: 0; font-size: 14px; }.notice-heading span { color: var(--color-text-weak); }
.notice-group p { margin: 8px 0 0; color: var(--color-text-secondary); font-size: 13px; }
.mobile-user-summary { display: none; }

.admin-nav { display: flex; gap: 4px; margin: -8px 0 26px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); overflow-x: auto; }
.admin-nav a { flex: 0 0 auto; padding: 9px 14px; border-radius: var(--radius-sm); color: var(--color-text-secondary); font-weight: 600; }
.admin-nav a:hover, .admin-nav a.active { color: var(--color-primary); background: var(--color-primary-soft); }
.filter-bar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; }
.filter-bar .field { min-width: 150px; }.filter-bar .field-grow { flex: 1; min-width: 240px; }.filter-submit, .filter-reset { flex: 0 0 auto; }.filter-bar-wide { flex-wrap: wrap; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: #374151; font-size: 13px; font-weight: 650; }
.field label span { color: var(--color-danger); }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d7dce2; border-radius: var(--radius-sm); color: var(--color-text); background: white; transition: border-color 180ms ease, box-shadow 180ms ease; }
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #b8c0cc; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .11); }
input:disabled { color: var(--color-text-secondary); background: #f3f4f6; cursor: not-allowed; }
/* Make the whole date field open the picker, not only the trailing calendar icon. */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
  position: relative;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
}
.password-field { position: relative; }.password-field input { padding-right: 64px; }.password-toggle { position: absolute; right: 5px; top: 5px; min-width: 50px; height: 32px; border: 0; border-radius: var(--radius-sm); color: var(--color-primary); background: transparent; font-size: 13px; cursor: pointer; }.password-toggle:hover { background: var(--color-primary-soft); }
.stack-form { display: grid; gap: 18px; }
.alert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid; border-radius: var(--radius-sm); }
.alert-error { color: #991b1b; border-color: #fecaca; background: var(--color-danger-soft); }
.alert-info { color: #1e3a8a; border-color: #bfdbfe; background: var(--color-primary-soft); }

.table-panel, .form-panel { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-soft); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 46px; padding: 0 16px; color: var(--color-text-secondary); background: #fafbfc; text-align: left; font-size: 12px; font-weight: 650; white-space: nowrap; }
td { min-height: 60px; padding: 14px 16px; border-top: 1px solid var(--color-divider); vertical-align: middle; }
tbody tr { transition: background-color 160ms ease; } tbody tr:hover { background: #fafcff; }
td strong { display: block; }.cell-secondary { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: 12px; }
.long-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions-column { text-align: right; }.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 2px; white-space: nowrap; }.row-actions form { display: inline-flex; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; color: #4b5563; background: #f3f4f6; font-size: 12px; }.tag-primary { color: #1d4ed8; background: #eff6ff; }
.status-tag { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }.status-tag i { width: 7px; height: 7px; border-radius: 50%; }.status-tag-success { color: #166534; background: var(--color-success-soft); }.status-tag-success i { background: var(--color-success); }.status-tag-neutral { color: #4b5563; background: #f3f4f6; }.status-tag-neutral i { background: var(--color-text-weak); }
code { padding: 2px 5px; border-radius: 4px; color: #334155; background: #f1f5f9; font: 12px/1.5 Consolas, "SFMono-Regular", monospace; }
.pagination { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--color-divider); color: var(--color-text-secondary); font-size: 13px; }.pagination div { display: flex; gap: 8px; }

.form-panel { max-width: 1040px; }.form-panel-narrow { max-width: 620px; }
.form-section { padding: 24px; border-bottom: 1px solid var(--color-divider); }.form-section > header { margin-bottom: 20px; }.form-section > header h2 { margin: 0 0 4px; font-size: 16px; }.form-section > header p { margin: 0; color: var(--color-text-secondary); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }.form-grid-wide { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; }
.role-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; padding: 0; border: 0; }
.role-option { position: relative; min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease; }.role-option:hover { border-color: #bfdbfe; background: #fafcff; }.role-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }.role-option input { flex: 0 0 auto; width: 18px; min-height: 18px; accent-color: var(--color-primary); }.role-option span { min-width: 0; display: grid; }.role-option small { color: var(--color-text-secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }.role-option-admin:has(input:checked) { border-color: var(--color-purple); background: #f5f3ff; }
.switch-row { max-width: 420px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }.switch-row span { display: grid; }.switch-row small { color: var(--color-text-secondary); font-size: 12px; }.switch-row input { position: absolute; opacity: 0; pointer-events: none; }.switch-row i { position: relative; flex: 0 0 auto; width: 44px; height: 24px; border-radius: 999px; background: #cbd5e1; transition: background 180ms ease; }.switch-row i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform 180ms ease; }.switch-row input:checked + i { background: var(--color-primary); }.switch-row input:checked + i::after { transform: translateX(20px); }.switch-row input:focus-visible + i { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }
.permission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; }.permission-row { min-height: 80px; display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--color-divider); cursor: pointer; }.permission-row:nth-child(odd) { border-right: 1px solid var(--color-divider); }.permission-row:hover { background: #fafcff; }.permission-row input { flex: 0 0 auto; width: 18px; min-height: 18px; accent-color: var(--color-primary); }.permission-row span { display: grid; align-content: start; gap: 3px; }.permission-row code { width: fit-content; }.permission-row small { color: var(--color-text-secondary); font-size: 12px; }
.inline-edit input { min-width: 180px; }

.toast-region { position: fixed; top: 82px; right: 22px; z-index: 100; width: min(360px, calc(100vw - 32px)); display: grid; gap: 8px; }
.toast { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px 11px 14px; border: 1px solid var(--color-border); border-left: 3px solid var(--color-primary); border-radius: var(--radius-sm); background: white; box-shadow: 0 10px 24px rgba(15, 23, 42, .12); animation: toast-in 200ms ease-out; }.toast-success { border-left-color: var(--color-success); }.toast-error { border-left-color: var(--color-danger); }.toast-warning { border-left-color: var(--color-warning); }.toast button { width: 30px; height: 30px; border: 0; border-radius: var(--radius-sm); color: var(--color-text-secondary); background: transparent; cursor: pointer; font-size: 18px; }.toast button:hover { background: var(--color-bg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-md); color: var(--color-text); box-shadow: 0 24px 70px rgba(15, 23, 42, .25); }.confirm-dialog::backdrop { background: rgba(15, 23, 42, .42); }.confirm-dialog form { padding: 20px; }.dialog-heading { display: flex; justify-content: space-between; align-items: center; }.dialog-heading h2 { margin: 0; font-size: 18px; }.confirm-dialog p { margin: 14px 0 22px; color: var(--color-text-secondary); }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

.error-page { min-height: calc(100vh - 170px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }.error-code { color: #cbd5e1; font-size: 72px; line-height: 1; font-weight: 800; }.error-page h1 { margin: 18px 0 8px; font-size: 24px; }.error-page p { max-width: 460px; margin: 0 0 24px; color: var(--color-text-secondary); }

.login-page { min-height: 100vh; background: white; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 42%) 1fr; }
.login-brand { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 112px); color: white; background: #172033; }
.login-brand-mark { width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 42px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-md); font-size: 18px; font-weight: 800; }
.login-brand p { margin: 0 0 8px; color: #aebbd0; font-size: 13px; }.login-brand h1 { margin: 0; font-size: 34px; line-height: 1.3; }.brand-rule { width: 48px; height: 3px; margin-top: 26px; border-radius: 3px; background: #60a5fa; }
.login-panel { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form-wrap { width: min(390px, 100%); }.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }.login-heading h2 { margin: 0; font-size: 24px; }.login-heading p { margin: 4px 0 0; color: var(--color-text-secondary); }.mobile-brand-mark { display: none; }.login-footer { position: absolute; bottom: 24px; color: var(--color-text-weak); font-size: 12px; }
.mobile-nav { display: none; }

@media (max-width: 1100px) {
  :root {
    --sidebar-width: 196px;
  }
  .page-shell { padding-left: 20px; padding-right: 20px; }
  .dashboard-grid { grid-template-columns: minmax(190px, 26fr) minmax(340px, 48fr) minmax(190px, 26fr); gap: 14px; }.panel { padding: 16px; }
  .role-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { padding-bottom: 72px; }
  .login-page { padding-bottom: 0; }
  .app-shell {
    display: block;
    min-height: 100vh;
  }
  html.sidebar-collapsed .app-shell {
    grid-template-columns: none;
  }
  .app-sidebar { display: none !important; }
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .97);
  }
  .brand { min-width: 0; }
  .brand > span { font-size: 14px; }
  .user-menu { display: flex; }
  .user-menu-trigger { min-height: 38px; padding: 2px 6px; }
  .user-menu .user-copy span { display: none; }
  .user-menu-dropdown { min-width: 160px; }
  .page-shell { padding: 20px 16px 32px; }
  .dashboard-heading { margin-bottom: 14px; }
  .dashboard-heading h1 { font-size: 22px; }
  .date-chip { display: none; }
  .mobile-user-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; }.mobile-user-summary div { display: grid; }.mobile-user-summary span { color: var(--color-text-secondary); font-size: 12px; }
  .dashboard-grid { display: flex; flex-direction: column; }.work-panel { order: 1; }.warning-panel { order: 2; }.tracking-panel { order: 3; }.panel, .tracking-panel { min-height: auto; }.empty-state { min-height: 260px; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 66px; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--color-border); background: rgba(255,255,255,.98); }.mobile-nav a, .mobile-nav button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; color: var(--color-text-secondary); background: transparent; font-size: 11px; }.mobile-nav a span:first-child, .mobile-nav button span:first-child { font-size: 18px; line-height: 1; }.mobile-nav .active { color: var(--color-primary); }
  .admin-nav { margin-top: -4px; gap: 2px; }.admin-nav a { padding-left: 10px; padding-right: 10px; font-size: 13px; }.page-heading-actions { align-items: center; }.filter-bar { flex-wrap: wrap; }.filter-bar .field, .filter-bar .field-grow { min-width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
  .toast-region { top: 12px; right: 16px; }
}

@media (max-width: 700px) {
  .page-heading { align-items: flex-start; }.page-heading h1 { font-size: 22px; }.page-heading-actions { flex-direction: column; align-items: stretch; }.page-heading-actions > .button { width: 100%; }
  .filter-bar .field, .filter-bar .field-grow { min-width: 100%; flex-basis: 100%; }.filter-submit { flex: 1; }.filter-reset { flex: 1; }
  .table-panel { border-left: 0; border-right: 0; border-radius: 0; margin-left: -16px; margin-right: -16px; }.table-scroll { overflow: visible; } table, thead, tbody, tr, th, td { display: block; } thead { display: none; } tbody { display: grid; gap: 10px; padding: 10px 16px; } tbody tr { padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; } tbody tr:hover { background: white; } td { min-height: 42px; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; padding: 9px 0; border-top: 1px solid var(--color-divider); overflow-wrap: anywhere; } td:first-child { border-top: 0; } td::before { content: attr(data-label); color: var(--color-text-secondary); font-size: 12px; }.row-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; padding-top: 12px; }.row-actions::before { width: 110px; }.long-cell { max-width: none; white-space: normal; }.pagination { margin: 0 16px; }
  .form-panel { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }.form-section { padding: 20px 16px; }.form-grid, .role-options, .permission-list { grid-template-columns: 1fr; }.form-grid-wide { grid-column: auto; }.permission-row:nth-child(odd) { border-right: 0; }.form-actions { position: sticky; bottom: 66px; z-index: 20; padding: 12px 16px; border-top: 1px solid var(--color-border); background: rgba(255,255,255,.98); }.form-actions .button { min-height: 44px; flex: 1; }
  .inline-edit input { min-width: 0; }.login-layout { display: block; }.login-brand { display: none; }.login-panel { min-height: 100vh; padding: 30px 20px 70px; }.mobile-brand-mark { display: inline-grid; }.login-heading { margin-bottom: 28px; }.login-footer { bottom: 20px; }
  .button { min-height: 44px; }.button-small { min-height: 38px; }.confirm-dialog form { padding: 18px; }.dialog-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Phase 2 task surfaces */
.status-tag-warning { color: #9a4d08; background: var(--color-warning-soft); }.status-tag-warning i { background: var(--color-warning); }
.status-tag-current { color: #5b21b6; background: #f5f3ff; }.status-tag-current i { background: var(--color-purple); }
.status-tag-single { color: #0f766e; background: #ecfdf5; }.status-tag-single i { background: #14b8a6; }
.status-tag-combination { color: #9a3412; background: #fff7ed; }.status-tag-combination i { background: #f97316; }
.text-danger { color: var(--color-danger) !important; }
.numeric-cell { text-align: right; font-variant-numeric: tabular-nums; }
.empty-action { margin-top: 20px; }

.order-type-fieldset { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.order-type-fieldset legend { margin: 0 0 10px; color: var(--color-text); font-size: 13px; font-weight: 650; }
.order-type-fieldset legend span { color: var(--color-danger); }
.order-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-type-card { position: relative; min-width: 0; cursor: pointer; }
.order-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.order-type-card-body { min-height: 84px; display: grid; align-content: center; gap: 4px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #fafcff; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.order-type-card-body strong { font-size: 15px; }
.order-type-card-body small { color: var(--color-text-secondary); font-size: 12px; line-height: 1.45; }
.order-type-card:hover .order-type-card-body { border-color: #93c5fd; background: #f8fbff; }
.order-type-card input:checked + .order-type-card-body { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px var(--color-primary); }
.order-type-card input:focus-visible + .order-type-card-body { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.metric-list a, .warning-metrics a { width: 100%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-divider); }
.metric-list a { min-height: 62px; padding: 0 4px; }.metric-list a:hover span, .warning-metrics a:hover span { color: var(--color-primary); }
.metric-list a strong, .warning-metrics a strong { min-width: 34px; text-align: right; font-size: 24px; }
.warning-metrics a { min-height: 72px; }
.dashboard-task-list { flex: 1; display: grid; align-content: start; }
.dashboard-task-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 72px; padding: 10px 2px; border-bottom: 1px solid var(--color-divider); transition: background-color 180ms ease; }
.dashboard-task-item:hover { background: #fafcff; }.dashboard-task-item > div { min-width: 0; display: grid; }.dashboard-task-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dashboard-task-item span, .task-item-deadline { color: var(--color-text-secondary); font-size: 12px; }.task-item-deadline { text-align: right; }

.task-create-heading { align-items: flex-start; }
.task-create-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); gap: 20px; align-items: start; }
.task-form-column, .task-upload-column { min-width: 0; display: grid; gap: 16px; }
.task-section { min-width: 0; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.task-section > header { display: flex; gap: 12px; margin-bottom: 22px; }.task-section > header h2 { margin: 0 0 3px; font-size: 16px; }.task-section > header p { margin: 0; color: var(--color-text-secondary); font-size: 13px; }
.section-number { flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); color: var(--color-primary); background: var(--color-primary-soft); font-size: 12px; font-weight: 750; }
.required-chip, .optional-chip { display: inline-flex; margin-left: 5px; padding: 1px 6px; border-radius: 999px; font-size: 11px; vertical-align: 2px; }.required-chip { color: #991b1b; background: var(--color-danger-soft); }.optional-chip { color: var(--color-text-secondary); background: #f3f4f6; }
.upload-section { padding-bottom: 18px; }
.upload-dropzone { width: 100%; min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 18px; border: 1px dashed #b8c5d6; border-radius: var(--radius-sm); color: var(--color-text); background: #fafcff; cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease; }.upload-dropzone.compact { min-height: 88px; }.upload-dropzone span { color: var(--color-text-secondary); font-size: 12px; }.upload-dropzone:hover, .upload-dropzone.dragging { border-color: var(--color-primary); background: var(--color-primary-soft); }
.upload-list { display: grid; gap: 8px; margin-top: 12px; }
.upload-item { min-width: 0; min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid var(--color-divider); border-radius: var(--radius-sm); background: #fff; }
.upload-item.is-error { border-color: #fecaca; background: var(--color-danger-soft); }.upload-item.is-uploading { border-color: #bfdbfe; }
.file-type-mark { flex: 0 0 auto; width: 42px; height: 38px; display: grid; place-items: center; border-radius: 5px; color: #475569; background: #f1f5f9; font-size: 10px; font-weight: 800; }
.upload-item-copy { min-width: 0; flex: 1; display: grid; }.upload-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.upload-item-copy span { color: var(--color-text-secondary); font-size: 11px; }
.upload-progress { height: 3px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: #e5e7eb; }.upload-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--color-primary); transition: width 150ms ease; }.is-error .upload-progress i { background: var(--color-danger); }
.upload-remove, .image-order-actions button, .upload-retry { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); color: var(--color-text-secondary); background: transparent; cursor: pointer; }.upload-remove { font-size: 19px; }.upload-remove:hover { color: var(--color-danger); background: var(--color-danger-soft); }.upload-retry { width: auto; padding: 0 8px; color: var(--color-primary); font-size: 12px; }.upload-retry:hover, .image-order-actions button:hover { background: var(--color-primary-soft); }
.upload-image-item { cursor: grab; }.upload-image-item.drag-over { border-color: var(--color-primary); }.upload-thumb { flex: 0 0 auto; width: 54px; height: 46px; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 5px; background: #f3f4f6; cursor: zoom-in; }.upload-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }.image-order-actions { flex: 0 0 auto; display: flex; gap: 2px; }
.upload-named-item { align-items: flex-start; min-height: 86px; padding-top: 10px; padding-bottom: 10px; }
.upload-named-item .upload-thumb { margin-top: 2px; }
.upload-named-item .image-order-actions,
.upload-named-item .upload-remove { margin-top: 2px; }
.upload-display-name-field {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  cursor: default;
}
.upload-display-name-field > span {
  color: var(--color-text-weak);
  font-size: 11px;
  font-weight: 650;
}
.upload-display-name-field input {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: white;
  font-size: 13px;
}
.upload-display-name-field input:focus {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 1px;
  border-color: #93c5fd;
}
.upload-display-name-field input:disabled {
  color: var(--color-text-weak);
  background: #f8fafc;
}
.publish-summary { padding: 20px 22px; border-left: 3px solid var(--color-primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: #f8fafc; }.publish-summary h2 { margin: 2px 0 14px; font-size: 16px; }.publish-summary > p { margin: 14px 0 0; color: var(--color-text-secondary); font-size: 12px; }.publish-summary dl { margin: 0; }.publish-summary dl div { min-height: 38px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--color-divider); }.publish-summary dt { color: var(--color-text-secondary); }.publish-summary dd { margin: 0; font-weight: 700; }
.task-publish-actions { position: sticky; z-index: 20; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; margin: 22px -32px -48px; padding: 14px 32px; border-top: 1px solid var(--color-border); background: rgba(255, 255, 255, .97); }

.task-table { min-width: 1440px; }.task-table tbody tr[data-row-link] { cursor: pointer; }.task-table tbody tr[data-row-link]:focus-visible { outline-offset: -3px; }
.pool-task-card > header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pool-task-card > header h2 { width: 100%; }
.phase-notice { min-height: 62px; display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #fde68a; border-radius: var(--radius-md); background: var(--color-warning-soft); }.phase-notice strong { color: #92400e; }.phase-notice span { color: #6b5b38; font-size: 13px; }
.phase-notice-info { border-color: #bfdbfe; background: #eff6ff; }.phase-notice-info strong { color: #1d4ed8; }.phase-notice-info span { color: #334155; }
.pool-card-actions { align-items: center !important; }.pool-card-actions .action-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.task-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-card { min-width: 0; display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #f8fafc; }
.action-card h3 { margin: 0; font-size: 15px; }.action-card > p { margin: 0; color: var(--color-text-secondary); font-size: 13px; line-height: 1.55; }
.action-card .field { margin: 0; }.action-card .button { justify-self: start; margin-top: 4px; }
.action-card-warn { border-color: #fecaca; background: #fff7f7; }
.inline-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid #c4b5fd; border-radius: var(--radius-md); background: #faf5ff; }
.inline-callout > div { display: grid; gap: 4px; min-width: 0; }.inline-callout strong { font-size: 14px; }.inline-callout span { color: var(--color-text-secondary); font-size: 13px; overflow-wrap: anywhere; }
.inline-callout-warn { border-color: #fcd34d; background: #fffbeb; }
.form-error-banner { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: var(--radius-md); color: #991b1b; background: #fef2f2; }
.fieldset-inline { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fieldset-inline legend { width: 100%; margin-bottom: 8px; color: var(--color-text-secondary); font-size: 12px; }
.choice-pill, .choice-card { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 999px; background: white; cursor: pointer; }
.choice-pill input, .choice-card input { accent-color: var(--color-primary); }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice-card { border-radius: var(--radius-md); min-height: 52px; justify-content: center; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.field-hint { display: block; margin-top: 6px; font-size: 12px; }
.task-pool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pool-task-card { min-width: 0; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-soft); }.pool-task-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--color-divider); }.pool-task-card h2 { margin: 9px 0 0; font-size: 17px; overflow-wrap: anywhere; }.task-card-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }.task-card-facts > div { min-width: 0; padding: 13px 4px; border-bottom: 1px solid var(--color-divider); }.task-card-facts dt { color: var(--color-text-secondary); font-size: 11px; }.task-card-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; }.task-card-facts small { display: block; color: var(--color-text-secondary); }.pool-task-card > footer { min-height: 54px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; color: var(--color-text-secondary); font-size: 12px; }

.task-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 20px; }.task-detail-header h1 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }.task-detail-header p { margin: 7px 0 0; color: var(--color-text-secondary); }.detail-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }.deadline-block { flex: 0 0 auto; display: grid; min-width: 190px; text-align: right; }.deadline-block span, .deadline-block small { color: var(--color-text-secondary); font-size: 12px; }.deadline-block strong { font-size: 16px; }
.current-stage-panel { min-height: 154px; display: flex; align-items: center; gap: 22px; margin-bottom: 18px; padding: 24px; border: 1px solid #c4b5fd; border-left: 4px solid var(--color-purple); border-radius: var(--radius-md); background: #faf9ff; }.stage-marker { position: relative; flex: 0 0 auto; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--color-purple); font-weight: 800; }.stage-marker i { position: absolute; inset: -7px; border: 1px solid #ddd6fe; border-radius: 50%; }.current-stage-panel h2 { margin: 3px 0 15px; font-size: 20px; }.current-stage-panel dl { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 0; }.current-stage-panel dl div { display: flex; gap: 8px; }.current-stage-panel dt { color: var(--color-text-secondary); }.current-stage-panel dd { margin: 0; font-weight: 650; }
.detail-section { min-width: 0; margin-bottom: 18px; padding: 22px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-soft); }.detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--color-divider); }.detail-section > header h2 { margin: 2px 0 0; font-size: 17px; }.detail-section > header > span { color: var(--color-text-secondary); font-size: 12px; }

/* 订单详情：紧凑双栏工作台 */
.task-detail-page .page-shell { width: min(1540px, 100%); padding-top: 16px; padding-bottom: 24px; }
.detail-breadcrumb { margin-bottom: 8px; font-size: 12px; }
.detail-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(390px, .8fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .045);
}
.detail-overview-main { min-width: 0; }
.detail-overview-card .detail-title-row { gap: 7px; }
.detail-overview-card h1 { margin: 0 6px 0 0; font-size: 23px; line-height: 1.25; overflow-wrap: anywhere; }
.detail-overview-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 7px; color: var(--color-text-secondary); font-size: 12px; }
.detail-overview-meta strong { color: #334155; font-weight: 650; }
.proxy-note { color: var(--color-primary); }
.detail-deadline { min-width: 178px; display: grid; padding: 0 18px; border-left: 1px solid var(--color-divider); border-right: 1px solid var(--color-divider); }
.detail-deadline span, .detail-deadline small { color: var(--color-text-secondary); font-size: 11px; }
.detail-deadline strong { font-size: 15px; }
.detail-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.detail-quick-actions button, .detail-summary-links button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  align-content: center;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.detail-quick-actions button:hover, .detail-summary-links button:hover { border-color: #bfdbfe; color: var(--color-primary); background: var(--color-primary-soft); }
.detail-quick-actions span { font-size: 12px; font-weight: 700; }
.detail-quick-actions small { color: var(--color-text-secondary); font-size: 10px; }
.compact-stage-panel { min-height: 82px; display: grid; grid-template-columns: auto minmax(210px, .55fr) minmax(0, 1.45fr); gap: 18px; margin-bottom: 10px; padding: 12px 16px; }
.compact-stage-panel .stage-marker { width: 46px; height: 46px; font-size: 12px; }
.compact-stage-panel .stage-marker i { inset: -4px; }
.compact-stage-primary { min-width: 0; }
.compact-stage-panel h2 { margin: 1px 0 0; font-size: 17px; }
.compact-stage-panel dl { min-width: 0; display: grid; grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr); gap: 8px 18px; }
.compact-stage-panel dl div { min-width: 0; display: grid; gap: 1px; }
.compact-stage-panel dt { font-size: 11px; }
.compact-stage-panel dd { overflow-wrap: anywhere; font-size: 13px; }
.detail-workbench { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, .7fr); gap: 10px; align-items: stretch; margin-bottom: 10px; }
.detail-workbench-readonly { grid-template-columns: minmax(280px, 380px); justify-content: end; }
.task-detail-page .detail-section { margin-bottom: 10px; padding: 14px 16px; border-radius: 10px; }
.task-detail-page .detail-section > header { margin-bottom: 12px; padding-bottom: 10px; }
.task-detail-page .detail-section > header h2 { font-size: 16px; }
.task-detail-page .action-section { margin-bottom: 0; }
.task-detail-page .action-card { gap: 7px; padding: 12px; }
.task-detail-page .task-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.task-detail-page .task-action-grid-single { grid-template-columns: minmax(0, 1fr); }
.task-detail-page .action-card textarea { min-height: 56px; }
.task-detail-page .action-card .button { margin-top: 2px; }
.detail-summary-card { min-width: 0; padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: white; box-shadow: var(--shadow-soft); }
.detail-summary-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.detail-summary-card h2 { margin: 1px 0 0; font-size: 16px; }
.detail-text-button { padding: 0; border: 0; color: var(--color-primary); background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }
.detail-text-button:hover { color: var(--color-primary-dark); text-decoration: underline; }
.detail-summary-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.detail-summary-facts > div { min-width: 0; display: grid; gap: 1px; padding: 7px 4px; border-top: 1px solid var(--color-divider); }
.detail-summary-facts dt { color: var(--color-text-secondary); font-size: 10px; }
.detail-summary-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.summary-state { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 999px; color: #92400e; background: #fffbeb; font-size: 10px; }
.summary-state.is-ready { color: #166534; background: #f0fdf4; }
.detail-summary-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.detail-summary-links button { min-height: 34px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.detail-summary-links strong { color: var(--color-primary); }
.compact-process-section { margin-bottom: 0 !important; }
.compact-process-section > header { margin-bottom: 7px !important; padding-bottom: 7px !important; }
.compact-process-actions { display: flex; align-items: center; gap: 12px; color: var(--color-text-secondary); font-size: 11px; }
.compact-process-track { overflow: hidden; padding: 2px 0 0; }
.compact-process-track li { min-width: 0; gap: 4px; }
.compact-process-track li::after { left: calc(50% + 13px); right: calc(-50% + 13px); top: 13px; }
.compact-process-track li > span { width: 26px; height: 26px; font-size: 10px; }
.compact-process-track strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-process-track small { display: none; }
.compact-process-track li.current > span { box-shadow: 0 0 0 3px #f3e8ff; }
.detail-drawer { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
.detail-drawer[open] { display: flex; justify-content: flex-end; }
.detail-drawer::backdrop { background: rgba(15, 23, 42, .38); backdrop-filter: blur(2px); }
.detail-drawer-panel { width: min(660px, 92vw); height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); background: white; box-shadow: -20px 0 60px rgba(15, 23, 42, .18); }
.detail-drawer-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 13px 18px; border-bottom: 1px solid var(--color-divider); }
.detail-drawer-panel > header h2 { margin: 1px 0 0; font-size: 18px; }
.detail-drawer-body { min-height: 0; overflow-y: auto; padding: 16px 18px 24px; overscroll-behavior: contain; }
.detail-drawer-body .detail-facts { grid-template-columns: 1fr 1fr; }
.drawer-people-section, .drawer-gallery-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--color-divider); }
.drawer-people-section > h3, .drawer-gallery-section > h3 { margin: 0 0 8px; font-size: 14px; }
.drawer-gallery-section > h3 span { margin-left: 5px; color: var(--color-text-secondary); font-size: 11px; font-weight: 500; }
.drawer-count { margin-bottom: 12px; color: var(--color-text-secondary); font-size: 12px; }
.drawer-process-summary { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; padding: 12px 14px; border-radius: 9px; color: var(--color-primary); background: var(--color-primary-soft); }
.drawer-process-summary strong { font-size: 22px; }
.drawer-process-summary span { color: var(--color-text-secondary); font-size: 12px; }
.drawer-process-track { margin: 0; padding: 0; list-style: none; }
.drawer-process-track li { position: relative; min-height: 58px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.drawer-process-track li::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #e5e7eb; }
.drawer-process-track li:last-child::after { display: none; }
.drawer-process-track li > span { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #d1d5db; border-radius: 50%; color: var(--color-text-secondary); background: white; font-size: 10px; font-weight: 700; }
.drawer-process-track li div { display: grid; align-content: start; padding-top: 2px; }
.drawer-process-track li small { color: var(--color-text-secondary); font-size: 11px; }
.drawer-process-track li.done > span { color: white; border-color: var(--color-success); background: var(--color-success); }
.drawer-process-track li.current > span { color: white; border-color: var(--color-purple); background: var(--color-purple); box-shadow: 0 0 0 4px #f3e8ff; }
.drawer-process-track li.skipped > span { color: #9ca3af; background: #f8fafc; }
.detail-drawer .event-section li { min-height: 68px; }
.detail-drawer .formal-file-list article { padding-top: 10px; padding-bottom: 10px; }
.attachment-image-thumb { width: 42px; height: 42px; display: block; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: 8px; background: #f3f4f6; cursor: zoom-in; }
.attachment-image-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.attachment-empty-state { margin: 0; padding: 14px; border: 1px dashed #d1d5db; border-radius: 9px; color: var(--color-text-secondary); background: #f8fafc; font-size: 12px; text-align: center; }
.process-track { display: grid; grid-template-columns: repeat(11, minmax(96px, 1fr)); margin: 0; padding: 6px 0 4px; list-style: none; overflow-x: auto; }.process-track li { position: relative; min-width: 128px; display: grid; justify-items: center; gap: 7px; text-align: center; }.process-track li::after { content: ""; position: absolute; left: calc(50% + 19px); right: calc(-50% + 19px); top: 18px; height: 2px; background: #e5e7eb; }.process-track li:last-child::after { display: none; }.process-track li > span { position: relative; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #d1d5db; border-radius: 50%; color: var(--color-text-secondary); background: white; font-size: 12px; font-weight: 700; }.process-track li div { display: grid; }.process-track strong { font-size: 12px; }.process-track small { color: var(--color-text-weak); font-size: 11px; }.process-track li.done > span { color: white; border-color: var(--color-success); background: var(--color-success); }.process-track li.done::after { background: #86efac; }.process-track li.done small { color: var(--color-success); }.process-track li.skipped > span { color: #9ca3af; border-color: #e5e7eb; background: #f9fafb; }.process-track li.skipped small { color: #9ca3af; }.process-track li.current > span { color: white; border-color: var(--color-purple); background: var(--color-purple); box-shadow: 0 0 0 5px #f3e8ff; }.process-track li.current small { color: var(--color-purple); font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }.detail-grid .detail-section { margin-bottom: 0; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }.detail-facts > div { min-width: 0; padding: 12px 5px; border-bottom: 1px solid var(--color-divider); }.detail-facts .wide { grid-column: 1 / -1; border-bottom: 0; }.detail-facts dt { color: var(--color-text-secondary); font-size: 12px; }.detail-facts dd { margin: 4px 0 0; overflow-wrap: anywhere; }.craft-copy { white-space: pre-wrap; line-height: 1.75; }
.attachment-group + .attachment-group { margin-top: 20px; }.attachment-group h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 14px; }.attachment-group h3 span { color: var(--color-text-secondary); font-size: 11px; }.formal-file-list { display: grid; }.formal-file-list article { min-width: 0; min-height: 62px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--color-divider); }.formal-file-list article > div { min-width: 0; }.formal-file-list article > div:nth-child(2) { display: grid; }.formal-file-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }.formal-file-list small { color: var(--color-text-secondary); font-size: 11px; }.formal-file-list article > div:last-child { display: flex; }
.combination-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }.combination-gallery button { position: relative; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: #f3f4f6; cursor: zoom-in; }.combination-gallery img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 180ms ease; }.combination-gallery button:hover img { transform: scale(1.025); }.combination-gallery button span { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; color: white; background: rgba(17, 24, 39, .72); font-size: 10px; }
.event-section ol { margin: 0; padding: 0; list-style: none; }.event-section li { position: relative; display: flex; gap: 12px; min-height: 58px; }.event-section li::after { content: ""; position: absolute; left: 5px; top: 16px; bottom: -2px; width: 1px; background: #d1d5db; }.event-section li:last-child::after { display: none; }.event-section li > i { position: relative; z-index: 1; flex: 0 0 auto; width: 11px; height: 11px; margin-top: 4px; border: 2px solid white; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 1px var(--color-success); }.event-section li.current > i { background: var(--color-purple); box-shadow: 0 0 0 1px var(--color-purple); }.event-section li div { display: grid; align-content: start; }.event-section li span { color: var(--color-text-secondary); font-size: 12px; }
.image-lightbox {
  width: min(920px, calc(100vw - 32px));
  height: min(88vh, 860px);
  max-height: min(88vh, 860px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: white;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .22);
}
.image-lightbox[open] {
  display: flex;
  flex-direction: column;
}
.image-lightbox::backdrop {
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(2px);
}
.lightbox-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-divider);
  background: white;
}
.lightbox-header h2 {
  margin: 2px 0 0;
  max-width: min(620px, 70vw);
  overflow: hidden;
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-header .icon-button {
  flex: 0 0 auto;
  color: var(--color-text-secondary);
}
.lightbox-header .icon-button:hover {
  color: var(--color-text);
  background: var(--color-bg);
}
.lightbox-tabs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-divider);
  background: #fafbfc;
}
.lightbox-tabs[hidden] { display: none !important; }
.lightbox-tab {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-secondary);
  background: white;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.lightbox-tab:hover {
  border-color: #bfdbfe;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.lightbox-tab.is-active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  padding: 16px 14px;
  background: #f6f7f9;
}
.lightbox-frame {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
}
.lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: white;
}
.lightbox-nav {
  align-self: center;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  background: white;
  box-shadow: var(--shadow-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.lightbox-nav:hover {
  border-color: #bfdbfe;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.lightbox-nav[hidden] { visibility: hidden; pointer-events: none; }
.lightbox-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-top: 1px solid var(--color-divider);
  color: var(--color-text-secondary);
  background: white;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .task-create-layout { grid-template-columns: minmax(0, 1fr) minmax(350px, .85fr); }
  .task-pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combination-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-overview-card { grid-template-columns: minmax(0, 1fr) auto; }
  .detail-quick-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-workbench { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .7fr); }
  .compact-stage-panel { grid-template-columns: auto minmax(180px, .5fr) minmax(0, 1.5fr); }
}

@media (max-width: 940px) {
  .task-create-layout, .detail-grid { grid-template-columns: 1fr; }
  .task-upload-column { grid-template-columns: 1fr 1fr; }.task-upload-column .upload-section:first-child, .task-upload-column .publish-summary { grid-column: 1 / -1; }
  .task-publish-actions { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .combination-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-action-grid { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .detail-overview-card { grid-template-columns: 1fr auto; }
  .detail-deadline { padding-right: 0; border-right: 0; }
  .detail-workbench { grid-template-columns: 1fr; }
  .detail-workbench-readonly { justify-content: stretch; }
  .compact-stage-panel { grid-template-columns: auto minmax(0, 1fr); }
  .compact-stage-panel dl { grid-column: 1 / -1; }
  .compact-process-track { overflow-x: auto; }
  .compact-process-track li { min-width: 86px; }
}

@media (max-width: 700px) {
  .task-create-heading { margin-bottom: 16px; }.task-create-layout, .task-upload-column { display: grid; grid-template-columns: 1fr; gap: 12px; }.task-upload-column .upload-section:first-child, .task-upload-column .publish-summary { grid-column: auto; }
  .order-type-options { grid-template-columns: 1fr; }.order-type-card-body { min-height: 76px; }
  .task-section { margin-left: -16px; margin-right: -16px; padding: 20px 16px; border-left: 0; border-right: 0; border-radius: 0; }.task-section > header { margin-bottom: 18px; }
  .upload-dropzone { min-height: 96px; }.image-order-actions { display: flex; }.upload-item { gap: 8px; }.upload-thumb { width: 46px; }.file-type-mark { width: 38px; }.upload-remove { width: 30px; }
  .task-publish-actions { bottom: 66px; margin-bottom: -32px; }.task-publish-actions .button { min-height: 46px; flex: 1; padding-left: 10px; padding-right: 10px; }
  .task-table { min-width: 0; }.task-table-panel { overflow: visible; }.task-table .numeric-cell { text-align: left; }
  .phase-notice { align-items: flex-start; flex-direction: column; gap: 3px; }.task-pool-grid { grid-template-columns: 1fr; }.pool-task-card { padding: 16px; }.pool-task-card > header { flex-wrap: wrap; }.task-card-facts { grid-template-columns: 1fr 1fr; }
  .task-action-grid { grid-template-columns: 1fr; }.inline-callout { flex-direction: column; align-items: stretch; }.choice-grid { grid-template-columns: 1fr 1fr; }.form-actions .button { flex: 1; }
  .task-detail-header { display: grid; }.deadline-block { text-align: left; }.detail-title-row { align-items: flex-start; }.task-detail-header h1 { width: 100%; font-size: 22px; }
  .current-stage-panel { align-items: flex-start; min-height: auto; gap: 16px; margin-left: -16px; margin-right: -16px; padding: 20px 16px; border-left-width: 4px; border-right: 0; border-radius: 0; }.stage-marker { width: 48px; height: 48px; }.current-stage-panel h2 { font-size: 17px; }.current-stage-panel dl { display: grid; gap: 7px; }
  .detail-section { margin-left: -16px; margin-right: -16px; padding: 20px 16px; border-left: 0; border-right: 0; border-radius: 0; }.detail-grid { gap: 18px; }.detail-grid .detail-section { margin-bottom: 0; }
  .process-section { overflow: hidden; }.process-track { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; }.process-track li { scroll-snap-align: start; }
  .task-detail-page .page-shell { padding-top: 12px; }
  .detail-overview-card { grid-template-columns: 1fr; margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .detail-overview-card h1 { width: 100%; font-size: 21px; }
  .detail-deadline { padding: 8px 0 0; border: 0; border-top: 1px solid var(--color-divider); }
  .detail-quick-actions { grid-template-columns: 1fr 1fr; }
  .compact-stage-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); margin-left: -16px; margin-right: -16px; padding: 14px 16px; }
  .compact-stage-panel dl { grid-template-columns: 1fr; }
  .task-detail-page .detail-section { padding: 16px; }
  .task-detail-page .task-action-grid { grid-template-columns: 1fr; }
  .detail-summary-card { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .compact-process-actions { align-items: flex-end; flex-direction: column; gap: 2px; }
  .detail-drawer-panel { width: 100vw; }
  .detail-drawer-body .detail-facts { grid-template-columns: 1fr; }
  .detail-drawer-body .detail-facts .wide { grid-column: auto; }
  .drawer-gallery-section .combination-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-facts { grid-template-columns: 1fr 1fr; }.formal-file-list article { grid-template-columns: 38px minmax(0, 1fr); }.formal-file-list article > div:last-child { grid-column: 1 / -1; padding-left: 48px; }.combination-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-lightbox {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .lightbox-header { min-height: 60px; padding: 12px 14px; }
  .lightbox-header h2 { font-size: 15px; }
  .lightbox-tabs { padding: 10px 14px; gap: 6px; }
  .lightbox-stage { padding: 12px 8px; gap: 4px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 22px; }
  .lightbox-footer { min-height: 48px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .upload-item-copy strong { max-width: 150px; }.task-card-facts, .detail-facts { grid-template-columns: 1fr; }.detail-facts .wide { grid-column: auto; }.combination-gallery { grid-template-columns: 1fr 1fr; gap: 7px; }
}

/* Progress board */
.panel-header-actions, .progress-heading-actions { display: flex; align-items: center; gap: 8px; }
.progress-page { overflow-x: clip; }
.progress-page .page-shell { width: min(1720px, 100%); max-width: 100%; }
.progress-heading { align-items: center; }
.progress-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.progress-metric { position: relative; min-width: 0; min-height: 124px; display: grid; align-content: space-between; padding: 17px 18px 15px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.progress-metric::after { content: ""; position: absolute; width: 72px; height: 72px; right: -30px; bottom: -36px; border-radius: 50%; background: #eff6ff; }
.progress-metric > span { display: flex; align-items: center; gap: 8px; color: var(--color-text-secondary); font-size: 12px; font-weight: 650; }
.progress-metric > span i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary); }
.progress-metric strong { position: relative; z-index: 1; margin: 5px 0 0; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.progress-metric small { color: var(--color-text-weak); font-size: 11px; }
.progress-metric.metric-active > span i { background: var(--color-purple); }.progress-metric.metric-active::after { background: #f5f3ff; }
.progress-metric.metric-due > span i { background: var(--color-warning); }.progress-metric.metric-due::after { background: var(--color-warning-soft); }
.progress-metric.metric-overdue > span i { background: var(--color-danger); }.progress-metric.metric-overdue::after { background: var(--color-danger-soft); }
.progress-metric.metric-finished > span i { background: var(--color-success); }.progress-metric.metric-finished::after { background: var(--color-success-soft); }

.progress-board-panel { min-width: 0; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.progress-section-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--color-divider); }
.progress-section-header h2 { margin: 2px 0 0; font-size: 17px; }
.progress-section-header > p { margin: 0; color: var(--color-text-secondary); font-size: 12px; }
.order-process-scroll { min-width: 0; overflow-x: auto; background: white; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.order-process-scroll:focus-visible { outline-offset: -4px; }

.order-count-chip { flex: 0 0 auto; min-height: 28px; display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-secondary); background: #fafbfc; font-size: 11px; font-weight: 650; }
.order-progress-list { display: grid; gap: 10px; padding: 12px; background: #f7f9fc; }
.order-progress-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 200px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  scroll-margin-top: 88px;
  transition: box-shadow 400ms ease, border-color 400ms ease;
}
.order-progress-card.is-scroll-focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), var(--shadow-soft);
}
.order-progress-card-compact {
  grid-template-columns: minmax(0, 1fr) 220px;
}
.progress-section-header-search {
  flex-wrap: wrap;
  gap: 12px 16px;
}
.progress-search-inline {
  flex: 1 1 320px;
  margin: 0;
  min-width: min(100%, 360px);
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.progress-search-inline .field {
  flex: 1 1 180px;
  margin: 0;
}
.progress-search-inline .field label { display: none; }
.progress-search-inline .order-count-chip {
  margin-left: auto;
}
.order-process-track {
  --node-mark-size: 38px;
  --node-label-space: 40px;
  --process-node-count: 11;
  min-width: calc(var(--process-node-count) * 88px);
  width: max(100%, calc(var(--process-node-count) * 88px));
  display: grid;
  grid-template-columns: repeat(var(--process-node-count), minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  margin: 0;
  padding: 14px 10px;
  list-style: none;
  flex-wrap: nowrap;
}
.order-process-node {
  position: relative;
  min-width: 0;
  min-height: calc(var(--node-mark-size) + var(--node-label-space) * 2);
  display: grid;
  grid-template-rows: var(--node-label-space) var(--node-mark-size) var(--node-label-space);
  justify-items: center;
  align-items: center;
  padding: 0 2px;
  text-align: center;
}
.order-process-node::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc(50% + (var(--node-mark-size) / 2) + 2px);
  right: calc(-50% + (var(--node-mark-size) / 2) + 2px);
  top: calc(var(--node-label-space) + (var(--node-mark-size) / 2) - 1px);
  height: 2px;
  background: #e5e7eb;
}
.order-process-node:last-child::after { display: none; }
.order-process-node.done::after { background: #86efac; }
.order-process-node.returned::after { background: #fcd34d; }
.order-node-mark {
  position: relative;
  z-index: 1;
  grid-row: 2;
  width: var(--node-mark-size);
  height: var(--node-mark-size);
  display: grid;
  place-items: center;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  color: var(--color-text-secondary);
  background: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.order-process-node.done .order-node-mark { color: white; border-color: var(--color-success); background: var(--color-success); }
/* 蓝色：全员可见的「当前流程节点」 */
.order-process-node.current .order-node-mark { color: white; border-color: var(--color-primary); background: var(--color-primary); box-shadow: 0 0 0 5px #dbeafe; }
.order-process-node.returned .order-node-mark { color: white; border-color: var(--color-warning); background: var(--color-warning); box-shadow: 0 0 0 5px var(--color-warning-soft); }
.order-process-node.skipped .order-node-mark { color: #9ca3af; border-color: #e5e7eb; background: #f9fafb; }
.order-process-node.upcoming .order-node-mark { color: #9ca3af; border-color: #d1d5db; background: white; }
/* 橙色：仅「该你处理」的人看到（在蓝色当前节点上叠加） */
.order-process-node.current.is-mine-turn .order-node-mark {
  border-color: #ea580c;
  background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 0 0 5px #ffedd5, 0 4px 12px rgba(234, 88, 12, .35);
}
.order-process-node.returned.is-mine-turn .order-node-mark {
  border-color: #dc2626;
  background: linear-gradient(145deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 0 0 5px #fee2e2, 0 4px 12px rgba(220, 38, 38, .3);
}
.order-node-label {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: #4b5563;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.order-process-node:nth-child(odd) .order-node-label { grid-row: 3; align-self: start; padding-top: 8px; }
.order-process-node:nth-child(even) .order-node-label { grid-row: 1; align-self: end; padding-bottom: 8px; }
.order-process-node.done .order-node-label { color: var(--color-success); }
.order-process-node.current .order-node-label { color: var(--color-primary); font-weight: 700; }
.order-process-node.returned .order-node-label { color: var(--color-warning); font-weight: 700; }
.order-process-node.skipped .order-node-label { color: #9ca3af; font-weight: 500; }
.order-process-node.upcoming .order-node-label { color: #6b7280; font-weight: 500; }
.order-process-node.current.is-mine-turn .order-node-label {
  color: #c2410c;
  font-weight: 800;
}
.order-process-node.returned.is-mine-turn .order-node-label {
  color: #b91c1c;
  font-weight: 800;
}
.order-node-mine-hint {
  display: block;
  margin-top: 1px;
  color: #ea580c;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}
.order-process-node.returned.is-mine-turn .order-node-mine-hint {
  color: #dc2626;
}
.order-process-node.is-actionable,
.order-process-node.is-mine-turn,
.order-process-node[aria-current="step"] {
  cursor: pointer;
}
.order-process-node.is-mine-turn:hover .order-node-mark {
  transform: scale(1.08);
}
.order-process-node.is-mine-turn:hover .order-node-label {
  color: #9a3412;
}
.order-node-mark { transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease; }

.stage-action-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: var(--color-text);
  background: white;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}
.stage-action-dialog.is-assign {
  width: min(780px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
}
.stage-action-dialog.is-pattern-complete,
.stage-action-dialog.is-purchase-complete,
.stage-action-dialog.is-decoration-complete,
.stage-action-dialog.is-production-complete,
.stage-action-dialog.is-assign-sample {
  width: min(640px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
}
.stage-brief-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #f8fafc;
}
.stage-brief-panel > header h3 {
  margin: 2px 0 0;
  font-size: 15px;
}
.stage-brief-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}
.stage-brief-facts > div {
  display: grid;
  gap: 2px;
}
.stage-brief-facts dt {
  color: var(--color-text-secondary);
  font-size: 12px;
}
.stage-brief-facts dd {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}
.stage-brief-empty {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
}
.brief-file-list {
  display: grid;
  gap: 8px;
}
.brief-file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: white;
}
.brief-file-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-upload-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
}
.stage-upload-section > header h3 {
  margin: 2px 0 0;
  font-size: 15px;
}
.stage-upload-section > header p {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
}
.stage-upload-section .upload-dropzone {
  min-height: 72px;
}
.stage-upload-section .upload-list:empty {
  display: none;
}
.stage-upload-section.compact {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.action-card-pattern {
  grid-column: 1 / -1;
}
.stage-action-dialog[open] {
  display: grid;
}
.stage-action-dialog::backdrop {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
}
.stage-action-dialog > form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(92dvh, 860px);
}
.stage-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--color-divider);
  background: white;
}
.stage-action-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
}
.stage-action-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
  background: #f7f9fc;
}
.stage-action-dialog.is-assign .stage-action-body {
  padding: 18px 22px 22px;
}
.stage-action-message {
  margin: 0 0 14px;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}
.stage-action-dialog.is-assign .stage-action-message {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: var(--color-primary-soft);
  color: #1e3a8a;
  font-weight: 550;
}
.stage-action-fields {
  display: grid;
  gap: 12px;
}
.stage-action-fields .field {
  margin: 0;
}
.stage-action-fields .field > span,
.stage-action-fields .field > legend {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.stage-action-fields .field em {
  color: var(--color-danger);
  font-style: normal;
}
.stage-action-fields input[type="text"],
.stage-action-fields input:not([type]),
.stage-action-fields select,
.stage-action-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
}
.stage-action-fields textarea { min-height: 88px; resize: vertical; }
.stage-action-fields textarea.is-invalid,
.field textarea.is-invalid,
.field input.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.field > span em[data-fitting-required-mark] {
  color: var(--color-danger);
  font-style: normal;
}
.stage-action-fields .fieldset-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
}
.stage-action-fields .choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 试版 / 决策结果：双卡片选择 */
.outcome-choice-field {
  margin: 0;
  border: 0;
  padding: 0;
}
.outcome-choice-field > legend {
  display: block;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.outcome-choice-field > legend em {
  color: var(--color-danger);
  font-style: normal;
}
.outcome-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.outcome-choice {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.outcome-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.outcome-choice-body {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.outcome-choice-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #64748b;
  background: #f1f5f9;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.outcome-choice-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.outcome-choice-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.outcome-choice-copy strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
}
.outcome-choice-copy small {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}
.outcome-choice-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.outcome-choice-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg);
}
.outcome-choice:hover .outcome-choice-body {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}
.outcome-choice input:focus-visible + .outcome-choice-body {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}
.outcome-choice:has(input:checked) .outcome-choice-check {
  border-color: currentColor;
  background: currentColor;
}
.outcome-choice:has(input:checked) .outcome-choice-check::after {
  opacity: 1;
}

/* 通过：绿色 */
.outcome-choice-pass:hover .outcome-choice-body {
  border-color: #86efac;
  background: #f8fff9;
}
.outcome-choice-pass:has(input:checked) {
  color: var(--color-success);
}
.outcome-choice-pass:has(input:checked) .outcome-choice-body {
  border-color: #22c55e;
  background: var(--color-success-soft);
  box-shadow: inset 0 0 0 1px #22c55e, 0 6px 18px rgba(21, 128, 61, .08);
}
.outcome-choice-pass:has(input:checked) .outcome-choice-icon {
  color: white;
  background: var(--color-success);
  box-shadow: 0 4px 10px rgba(21, 128, 61, .22);
}
.outcome-choice-pass:has(input:checked) .outcome-choice-copy strong {
  color: #166534;
}
.outcome-choice-pass:has(input:checked) .outcome-choice-copy small {
  color: #3f7a4f;
}

/* 改版：琥珀色 */
.outcome-choice-rework:hover .outcome-choice-body {
  border-color: #fcd34d;
  background: #fffdf5;
}
.outcome-choice-rework:has(input:checked) {
  color: #d97706;
}
.outcome-choice-rework:has(input:checked) .outcome-choice-body {
  border-color: #f59e0b;
  background: var(--color-warning-soft);
  box-shadow: inset 0 0 0 1px #f59e0b, 0 6px 18px rgba(217, 119, 6, .08);
}
.outcome-choice-rework:has(input:checked) .outcome-choice-icon {
  color: white;
  background: #d97706;
  box-shadow: 0 4px 10px rgba(217, 119, 6, .22);
}
.outcome-choice-rework:has(input:checked) .outcome-choice-copy strong {
  color: #b45309;
}
.outcome-choice-rework:has(input:checked) .outcome-choice-copy small {
  color: #a16207;
}

/* 不合格退回：红色 */
.outcome-choice-return:hover .outcome-choice-body {
  border-color: #fca5a5;
  background: #fff8f8;
}
.outcome-choice-return:has(input:checked) {
  color: var(--color-danger);
}
.outcome-choice-return:has(input:checked) .outcome-choice-body {
  border-color: #ef4444;
  background: var(--color-danger-soft, #fef2f2);
  box-shadow: inset 0 0 0 1px #ef4444, 0 6px 18px rgba(220, 38, 38, .08);
}
.outcome-choice-return:has(input:checked) .outcome-choice-icon {
  color: white;
  background: var(--color-danger, #dc2626);
  box-shadow: 0 4px 10px rgba(220, 38, 38, .22);
}
.outcome-choice-return:has(input:checked) .outcome-choice-copy strong {
  color: #b91c1c;
}
.outcome-choice-return:has(input:checked) .outcome-choice-copy small {
  color: #9f1239;
}

.stage-action-fields .outcome-choice-field {
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fafbfc;
}
.stage-action-fields .outcome-choice-field > legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}
.stage-action-dialog.is-review {
  width: min(640px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
}
.stage-action-dialog.is-review .outcome-choice-body {
  min-height: 96px;
}
.stage-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 12px 18px;
  border-top: 1px solid var(--color-border);
  background: white;
}
.stage-action-dialog.is-assign .stage-action-footer {
  padding: 12px 22px;
}
.stage-footer-hint {
  color: var(--color-text-secondary);
  font-size: 12px;
}
.stage-footer-actions {
  display: flex;
  gap: 9px;
  margin-left: auto;
}
.stage-action-footer .button { min-width: 96px; }

.assign-modal-layout {
  display: grid;
  gap: 14px;
}
.assign-modal-section,
.assign-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: white;
  box-shadow: none;
}
.assign-modal-section > header,
.assign-section > header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
}
.assign-modal-section > header h3,
.assign-section > header h2 {
  margin: 0 0 3px;
  font-size: 16px;
}
.assign-modal-section > header p,
.assign-section > header p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}
.assign-section-hint {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
}
.assign-modal-grid,
.assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
/* 版师下拉与备注输入保持相同高度（全局控件高度 42px） */
.assign-maker-note-row select,
.assign-maker-note-row input[name="note"] {
  width: 100%;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  padding-top: 9px;
  padding-bottom: 9px;
  line-height: 1.35;
  resize: none;
}
.assign-modal-section .field > span,
.assign-section .field > span {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 650;
}
.assign-modal-section .field em,
.assign-section .field em {
  color: var(--color-danger);
  font-style: normal;
}
.assign-sublabel {
  margin: 0 0 8px;
  color: #374151;
  font-size: 13px;
  font-weight: 650;
}
.assign-purchase-block {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--color-divider);
}
.assign-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.assign-toggle-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.assign-toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.assign-toggle-card > span {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fafbfc;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}
.assign-toggle-card strong {
  font-size: 14px;
}
.assign-toggle-card small {
  color: var(--color-text-secondary);
  font-size: 12px;
}
.assign-toggle-card:hover > span {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.assign-toggle-card:has(input:checked) > span {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.assign-toggle-card:has(input:checked) strong {
  color: var(--color-primary);
}
.assign-toggle-card input:focus-visible + span {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}
.assign-purchaser-field,
.assign-worker-field {
  animation: assign-field-in 160ms ease-out;
}
@keyframes assign-field-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.craft-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.craft-picker-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.craft-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.craft-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.craft-card-body {
  position: relative;
  min-height: 108px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 14px 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fafbfc;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.craft-card-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 10px;
  color: #64748b;
  background: #eef2f7;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}
.craft-card strong {
  font-size: 14px;
  line-height: 1.2;
}
.craft-card small {
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.35;
}
.craft-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: white;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.craft-card-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg);
}
.craft-card:hover .craft-card-body {
  border-color: #bfdbfe;
  background: #f8fbff;
  transform: translateY(-1px);
}
.craft-card:has(input:checked) .craft-card-body {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  box-shadow: inset 0 0 0 1px var(--color-primary);
}
.craft-card:has(input:checked) .craft-card-mark {
  color: white;
  background: var(--color-primary);
}
.craft-card:has(input:checked) strong {
  color: var(--color-primary);
}
.craft-card:has(input:checked) .craft-card-check {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.craft-card:has(input:checked) .craft-card-check::after {
  opacity: 1;
}
.craft-card input:focus-visible + .craft-card-body {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}
.craft-card-none:has(input:checked) .craft-card-body {
  border-color: #94a3b8;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px #94a3b8;
}
.craft-card-none:has(input:checked) .craft-card-mark {
  color: #334155;
  background: #cbd5e1;
}
.craft-card-none:has(input:checked) strong {
  color: #334155;
}
.craft-card-none:has(input:checked) .craft-card-check {
  border-color: #64748b;
  background: #64748b;
}
.craft-card-print:has(input:checked) .craft-card-mark { background: #2563eb; }
.craft-card-embroidery:has(input:checked) .craft-card-mark { background: #7c3aed; }
.craft-card-heat_transfer:has(input:checked) .craft-card-mark { background: #ea580c; }
.craft-card-embroidery:has(input:checked) .craft-card-body {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: inset 0 0 0 1px #7c3aed;
}
.craft-card-embroidery:has(input:checked) strong { color: #6d28d9; }
.craft-card-embroidery:has(input:checked) .craft-card-check {
  border-color: #7c3aed;
  background: #7c3aed;
}
.craft-card-heat_transfer:has(input:checked) .craft-card-body {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1px #ea580c;
}
.craft-card-heat_transfer:has(input:checked) strong { color: #c2410c; }
.craft-card-heat_transfer:has(input:checked) .craft-card-check {
  border-color: #ea580c;
  background: #ea580c;
}

.craft-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 10px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--color-text-secondary);
  font-size: 12px;
}
.craft-summary strong {
  color: var(--color-text);
  font-size: 13px;
}
.craft-summary em {
  margin-left: auto;
  color: var(--color-text-weak);
  font-style: normal;
  font-size: 11px;
}

.assign-form {
  max-width: 860px;
  overflow: hidden;
}
.assign-form .task-section {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  box-shadow: none;
}
.assign-form .task-section + .task-section {
  border-top: 1px solid var(--color-divider);
}
.assign-form-actions {
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  background: #fafbfc;
}
.assign-form-actions > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 700px) {
  .assign-modal-grid,
  .assign-grid,
  .assign-toggle-group,
  .outcome-choice-grid { grid-template-columns: 1fr; }
  .craft-picker-cards { grid-template-columns: 1fr 1fr; }
  .stage-action-dialog.is-assign { width: calc(100vw - 12px); }
  .stage-action-dialog.is-assign .stage-action-body,
  .stage-action-dialog.is-assign .stage-action-footer,
  .stage-action-header { padding-left: 14px; padding-right: 14px; }
  .assign-modal-section { padding: 14px; }
  .craft-summary em { margin-left: 0; width: 100%; }
  .assign-form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .assign-form-actions > div { width: 100%; }
  .assign-form-actions .button { flex: 1; }
  .stage-action-footer { flex-wrap: wrap; }
  .stage-footer-actions { width: 100%; }
  .stage-footer-actions .button { flex: 1; }
}

@media (max-width: 1180px) {
  .progress-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-progress-card { grid-template-columns: 190px minmax(0, 1fr) 180px; }
  .order-progress-card-compact { grid-template-columns: minmax(0, 1fr) 200px; }
  .order-process-track { min-width: calc(var(--process-node-count, 11) * 80px); }
}

@media (max-width: 860px) {
  .progress-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-metric.metric-total { grid-column: 1 / -1; }
  .progress-metric { min-height: 112px; }
}

@media (max-width: 700px) {
  .progress-heading { gap: 14px; }.progress-heading-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }.progress-heading-actions .button:only-child { grid-column: 1 / -1; }
  .progress-metrics { gap: 8px; margin-left: -4px; margin-right: -4px; }.progress-metric { min-height: 108px; padding: 14px 13px 12px; }.progress-metric strong { font-size: 26px; }.progress-metric small { font-size: 10px; }
  .progress-board-panel { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .progress-section-header { min-height: 70px; align-items: flex-start; padding: 14px 16px; }.progress-section-header > p { max-width: 145px; text-align: right; }
  .order-progress-list { gap: 10px; padding: 10px; }
}

/* Publish task modal */
[hidden] { display: none !important; }
.user-create-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(92dvh, 860px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: var(--color-text);
  background: white;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .28);
}
.user-create-dialog::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(2px); }
.user-create-dialog > form {
  max-height: min(92dvh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.user-create-dialog .publish-dialog-body { overflow: auto; padding: 18px 22px 20px; }
.field-hint {
  display: block;
  margin-top: 4px;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}
.publish-task-dialog { width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: min(92dvh, 900px); padding: 0; overflow: hidden; border: 0; border-radius: 12px; color: var(--color-text); background: white; box-shadow: 0 28px 90px rgba(15, 23, 42, .28); }
.publish-task-dialog::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(2px); }
.publish-task-dialog > form { max-height: min(92dvh, 900px); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.publish-dialog-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 22px; border-bottom: 1px solid var(--color-divider); }
.publish-dialog-header h2 { margin: 1px 0 0; font-size: 20px; }
.publish-type-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 12px 22px; border: 0; border-bottom: 1px solid var(--color-divider); background: #fafbfc; }
.publish-type-tabs label { position: relative; min-width: 0; cursor: pointer; }
.publish-type-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.publish-type-tabs label span { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--color-border); color: var(--color-text-secondary); background: white; }
.publish-type-tabs label:first-of-type span { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.publish-type-tabs label:last-of-type span { margin-left: -1px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.publish-type-tabs label small { font-size: 11px; }
.publish-type-tabs input:checked + span { position: relative; z-index: 1; border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px var(--color-primary); }
.publish-type-tabs input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .2); outline-offset: 2px; }
.publish-dialog-body { min-height: 0; overflow-y: auto; padding: 18px 22px 22px; background: #f7f9fc; }
.publish-dialog-body .task-create-layout { grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 14px; }
.publish-dialog-body .task-form-column, .publish-dialog-body .task-upload-column { gap: 12px; }
.publish-dialog-body .task-section { padding: 18px; box-shadow: none; }
.publish-dialog-body .task-section > header { margin-bottom: 16px; }
.publish-dialog-body .task-section > header h3 { margin: 0 0 2px; font-size: 15px; }
.publish-dialog-body .task-section > header p { margin: 0; color: var(--color-text-secondary); font-size: 12px; }
.publish-dialog-body .form-grid { gap: 13px 14px; }
.publish-dialog-body textarea { min-height: 108px; }
.publish-dialog-error { margin-bottom: 14px; }
.publish-image-section .upload-dropzone { min-height: 78px; }
.publish-image-section .upload-list:empty { display: none; }
.publish-image-summary { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 9px 13px; border: 1px solid #bfdbfe; border-radius: var(--radius-sm); color: var(--color-text-secondary); background: var(--color-primary-soft); font-size: 12px; }
.publish-image-summary b { color: var(--color-text); }
.publish-dialog-actions { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 22px; border-top: 1px solid var(--color-border); background: white; }
.publish-dialog-actions > span { color: var(--color-text-secondary); font-size: 12px; }
.publish-dialog-actions > div { display: flex; gap: 9px; }

/* Compact progress filters and split order cards */
.progress-search-bar, .task-search-bar { margin-bottom: 12px; padding: 12px 14px; }
.progress-metrics { gap: 9px; margin-bottom: 14px; }
.progress-metric { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; border-radius: 7px; }
.progress-metric::after { width: 42px; height: 42px; right: -22px; bottom: -24px; }
.progress-metric > span { position: relative; z-index: 1; font-size: 12px; }
.progress-metric strong { margin: 0; font-size: 23px; }
.progress-metric small { display: none; }
.progress-metric:hover { border-color: #bfdbfe; background: #fbfdff; }
.progress-metric.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1px var(--color-primary); }
.progress-metric.metric-urgent > span i { background: var(--color-danger); }
.progress-metric.metric-urgent::after { background: var(--color-danger-soft); }
.status-tag-urgent { color: #b91c1c; background: var(--color-danger-soft); }
.status-tag-urgent i { background: var(--color-danger); }

/* Three-column order progress card */
.order-card-left {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 12px;
  border-right: 1px solid var(--color-divider);
}
.order-card-head {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.order-card-media {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
}
.order-main-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f3f4f6;
  cursor: zoom-in;
}
.order-main-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.order-main-thumb > span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: white;
  background: rgba(17, 24, 39, .78);
  font-size: 10px;
  line-height: 1.2;
}
.order-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--color-text-weak);
  cursor: default;
  background: #f8fafc;
}
.order-image-placeholder span { font-size: 12px; }
.order-card-head-meta {
  min-width: 0;
  flex: 1;
  display: grid;
  align-content: space-between;
  gap: 6px;
}
.order-card-head-meta > .status-tag {
  justify-self: start;
  min-height: 22px;
  padding: 1px 8px;
  font-size: 11px;
}
.order-head-fact {
  min-width: 0;
  margin: 0;
}
.order-head-fact > div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f8fafc;
}
.order-head-fact dt {
  color: var(--color-text-weak);
  font-size: 10px;
  line-height: 1.3;
}
.order-head-fact dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.order-card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
}
.order-card-facts > div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f8fafc;
}
.order-card-facts > .order-fact-full { grid-column: 1 / -1; }
.order-card-facts dt,
.order-card-status-facts dt {
  color: var(--color-text-weak);
  font-size: 10px;
  line-height: 1.3;
}
.order-card-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.order-card-facts .order-sample-link {
  color: inherit;
  font-weight: 650;
}
.order-card-facts .order-sample-link:hover { color: var(--color-primary); }
.order-card-workflow {
  min-width: 0;
  display: grid;
  align-content: center;
  padding: 8px 4px;
  overflow: hidden;
}
.order-card-workflow .order-process-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  background: transparent;
}

.order-card-right {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 12px;
  border-left: 1px solid var(--color-divider);
  background: #fafbfc;
}
.order-right-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.order-right-badges .status-tag {
  min-height: 26px;
  padding: 2px 9px;
  font-size: 11px;
}
.order-status-badge {
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.order-status-badge.is-pending {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}
.order-status-badge.is-urgent {
  color: #b91c1c;
  border-color: #fecaca;
  background: var(--color-danger-soft);
}
.order-status-badge.is-returned {
  color: #b45309;
  border-color: #fcd34d;
  background: var(--color-warning-soft);
}
.order-status-badge.is-completed {
  color: var(--color-success);
  border-color: #bbf7d0;
  background: var(--color-success-soft);
}
.order-card-status-facts {
  display: grid;
  gap: 6px;
  margin: 0;
}
.order-card-status-facts > div,
.order-card-status-facts > .order-status-pair > div {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: white;
  border: 1px solid #f1f5f9;
}
.order-card-status-facts > .order-status-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.order-card-status-facts dd {
  margin: 2px 0 0;
  min-height: calc(12px * 1.35); /* 无人名时仍保持与有内容时相同行高 */
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.order-card-status-facts dd:empty::before {
  content: "\00a0"; /* 占位，避免空 dd 被浏览器压扁 */
}
.order-card-actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.order-card-actions form,
.order-card-actions .button { width: 100%; }
.deadline-copy.deadline-overdue { color: var(--color-danger); }
.deadline-copy.deadline-due_soon { color: #9a4d08; }
.deadline-copy.deadline-completed { color: var(--color-success); }
.deadline-copy.deadline-on_track { color: var(--color-text); }

@media (max-width: 940px) {
  .publish-dialog-body .task-create-layout { grid-template-columns: 1fr; }
  .order-progress-card { grid-template-columns: 170px minmax(0, 1fr) 160px; }
  .order-progress-card-compact { grid-template-columns: minmax(0, 1fr) 170px; }
  .order-card-left,
  .order-card-right { padding: 12px 10px; }
  .order-process-track {
    --node-mark-size: 34px;
    --node-label-space: 36px;
    min-width: calc(var(--process-node-count, 11) * 76px);
  }
  .order-node-label { font-size: 11px; }
  .order-node-mark { font-size: 11px; }
}

@media (max-width: 760px) {
  .publish-task-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .publish-task-dialog > form { height: 100dvh; max-height: none; }
  .publish-dialog-header { min-height: 64px; padding: 12px 16px; }
  .publish-type-tabs { padding: 10px 16px; }
  .publish-type-tabs label span { min-height: 50px; padding: 7px 10px; }
  .publish-type-tabs label small { display: none; }
  .publish-dialog-body { padding: 12px 16px 16px; }
  .publish-dialog-body .task-section { margin: 0; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .publish-dialog-body .form-grid { grid-template-columns: 1fr; }
  .publish-dialog-body .form-grid-wide { grid-column: auto; }
  .publish-dialog-actions { min-height: 70px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .publish-dialog-actions > span { display: none; }
  .publish-dialog-actions > div { width: 100%; }
  .publish-dialog-actions .button { flex: 1; }

  .progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-metric.metric-total { grid-column: auto; }
  .progress-metric { min-height: 62px; padding: 10px 12px; }
  .progress-metric strong { font-size: 21px; }

  .order-progress-card {
    grid-template-columns: 1fr;
  }
  .order-card-left {
    border-right: 0;
    border-bottom: 1px solid var(--color-divider);
    padding: 14px;
  }
  .order-card-workflow {
    border-bottom: 1px solid var(--color-divider);
    padding: 6px 0;
  }
  .order-card-right {
    border-left: 0;
    padding: 14px;
  }
  .order-process-track {
    min-width: calc(var(--process-node-count, 11) * 72px);
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 520px) {
  .order-card-left,
  .order-card-right { padding: 12px; }
  .order-card-facts { gap: 5px; }
  .order-card-facts > div { padding: 6px 7px; }
  .order-card-actions .button { min-height: 40px; }
}

/* 统计页 */
.stats-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}
.stats-section-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.stats-section-link:hover {
  border-color: #bfdbfe;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.stats-section-link.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.stats-section {
  scroll-margin-top: 88px;
}
.stats-section.is-hidden,
.stats-section[hidden] {
  display: none !important;
}
.stats-section-heading {
  margin: 0 0 14px;
}
.stats-section-heading h2 {
  margin: 2px 0 6px;
  font-size: 22px;
}
.stats-section-heading p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
}
.stats-cancel-card {
  overflow: hidden;
}
.stats-cancel-toolbar {
  margin: 0;
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--color-divider);
}
.stats-cancel-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
}
.stats-cancel-select-field {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
}
.stats-cancel-select-field > span {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}
.stats-cancel-select-field select {
  min-width: 240px;
}
.stats-cancel-summary-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px 0;
  margin: 0;
  flex: 1 1 320px;
}
.stats-cancel-summary-inline > div {
  display: grid;
  gap: 4px;
  min-width: 110px;
  padding: 0 18px;
  border-left: 1px solid var(--color-divider);
}
.stats-cancel-summary-inline > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.stats-cancel-summary-inline dt {
  color: var(--color-text-secondary);
  font-size: 12px;
}
.stats-cancel-summary-inline dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}
.stats-cancel-summary-inline dd small {
  display: block;
  margin-top: 2px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 500;
}
.stats-cancel-toolbar-hint {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  align-self: center;
}
.stats-cancel-card .table-scroll {
  border-top: 0;
}
.stats-cancel-card .empty-state {
  border-top: 0;
}
.stats-metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
  margin: 0 0 18px;
}
.stats-metric-row-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 560px;
}
.stats-invalid-table .role-code-hint {
  display: block;
  margin-top: 2px;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 500;
}
.text-danger {
  color: #b91c1c;
}
.stats-metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.stats-metric-card span {
  display: block;
  color: var(--color-text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}
.stats-metric-card strong {
  font-size: 28px;
  line-height: 1.1;
  color: var(--color-text);
}
.stats-summary-panel,
.stats-detail-panel { margin-top: 16px; }
.panel-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.panel-section-header h2,
.panel-section-header h3 { margin: 2px 0 4px; font-size: 18px; }
.panel-section-header p { margin: 0; color: var(--color-text-secondary); font-size: 13px; }
.compact-empty { padding: 28px 16px; }
@media (max-width: 720px) {
  .stats-metric-row { grid-template-columns: 1fr 1fr; }
  .stats-cancel-summary-inline > div {
    min-width: calc(50% - 8px);
    padding: 8px 12px;
    border-left: 0;
    border-top: 1px solid var(--color-divider);
  }
  .stats-cancel-select-field,
  .stats-cancel-select-field select {
    width: 100%;
    min-width: 0;
  }
}

/* 任务列表状态切换 */
.task-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.filter-tabs .filter-tab,
.task-status-tabs .filter-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.filter-tabs .filter-tab:hover,
.task-status-tabs .filter-tab:hover {
  border-color: #bfdbfe;
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.filter-tabs .filter-tab.is-active,
.task-status-tabs .filter-tab.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.status-tag-danger {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}
.status-tag-danger i { background: var(--color-danger); }

/* 任务发布信息编辑页 */
.publish-edit-form {
  display: grid;
  gap: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.publish-edit-form .publish-type-tabs { margin: 0 0 14px; }
.publish-edit-body {
  min-height: 0;
  padding: 18px 22px 22px;
  background: #f7f9fc;
}
.publish-edit-body .task-create-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 14px;
}
.publish-edit-body .task-section {
  padding: 18px;
  box-shadow: none;
}
.publish-edit-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
}
@media (max-width: 980px) {
  .publish-edit-body .task-create-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .publish-edit-body { padding: 12px 16px 16px; }
  .publish-edit-actions > span { display: none; }
  .publish-edit-actions > div { width: 100%; }
  .publish-edit-actions .button { flex: 1; }
}
