/* ==========================================================================
   中建钢构北非公司 · 项目周报系统 — 统一工程视觉体系 (E646 UI Upgrade)
   风格：中建工程蓝 + 护眼云灰底 + 现代卡片分层，电脑宽屏与手机竖屏全端统一
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Brand & surface palette */
  --navy: #0f2744;
  --navy-deep: #0b1d34;
  --navy-mid: #17375e;
  --navy-hover: #1e4270;
  --blue: #1b56c6;
  --blue-hover: #1545a3;
  --blue-soft: #eaf2ff;
  --blue-border: #c5dbfc;

  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-subtle: #f7f9fd;
  --ink: #14243b;
  --ink-secondary: #3b4f68;
  --muted: #60738b;
  --line: #e2e8f2;
  --line-strong: #cbd5e4;

  /* Semantic palette */
  --green: #0e7040;
  --green-soft: #e7f8ef;
  --green-border: #b8ecd0;

  --amber: #9a5506;
  --amber-soft: #fff6e5;
  --amber-border: #f5d08a;

  --red: #b42318;
  --red-soft: #fef2f2;
  --red-border: #fecaca;

  --indigo: #2346a8;
  --indigo-soft: #eef4ff;
  --indigo-border: #c7d7fe;

  /* Elevation & shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 39, 68, 0.04);
  --shadow-sm: 0 2px 10px rgba(15, 39, 68, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 39, 68, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 31, 56, 0.22);

  --sidebar-width: 264px;
  --header-height: 68px;

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

[v-cloak] { display: none; }
[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; }

/* Buttons */
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  padding: 9px 18px;
  min-height: 42px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease;
}

button:hover:not(:disabled) {
  background: var(--blue-hover);
}

button:active:not(:disabled) {
  transform: translateY(0.5px);
}

button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

button, a, input, select, textarea, summary { outline-offset: 2px; }
:focus-visible { outline: 3px solid rgba(27, 86, 198, 0.38); }

.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.secondary:hover:not(:disabled) {
  background: var(--surface-subtle);
  border-color: #aebcd1;
}

.quiet {
  color: var(--blue);
  background: transparent;
  border-color: transparent;
  padding: 7px 11px;
  min-height: 36px;
  font-weight: 600;
}

.quiet:hover:not(:disabled) {
  background: var(--blue-soft);
  color: var(--blue-hover);
}

/* Form controls */
input:not([type=checkbox]), select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

input:not([type=checkbox]):hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: #9fb0c7;
}

input:not([type=checkbox]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 86, 198, 0.14);
}

input:disabled, select:disabled, textarea:disabled {
  background: #f1f4f9;
  color: #637388;
  border-color: #dce3ee;
}

.editor.is-acquiring-lock input:disabled,
.editor.is-acquiring-lock select:disabled,
.editor.is-acquiring-lock textarea:disabled {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

input[type=file] {
  padding: 12px 14px;
  border: 1.5px dashed #adc2e0;
  border-radius: var(--radius-md);
  background: #f7faff;
  color: var(--ink-secondary);
  cursor: pointer;
}

input[type=file]:hover:not(:disabled) {
  border-color: var(--blue);
  background: #eef4ff;
}

input[type=checkbox] {
  flex: 0 0 auto;
  accent-color: var(--blue);
  width: 19px;
  height: 19px;
  margin: 2px 9px 0 0;
  cursor: pointer;
}

textarea { resize: vertical; }

label {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
}

label input, label select, label textarea { margin-top: 7px; }
label input[type=checkbox] { margin-top: 2px; }

/* Typography */
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 750; letter-spacing: -0.2px; color: var(--navy); }
h2 { font-size: 18px; line-height: 1.4; font-weight: 700; margin: 0 0 14px; color: var(--navy); }
h3 { font-size: 15.5px; font-weight: 700; margin: 20px 0 10px; color: var(--navy); }
p { line-height: 1.7; margin: 8px 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.pre-wrap-text { white-space: pre-wrap; }
.muted, .help, .small-label { color: var(--muted); }
.help { font-size: 13px; line-height: 1.65; margin: 6px 0 10px; }
.small-label { font-size: 12px; }
.error { color: var(--red); font-weight: 500; }

.wordmark {
  color: inherit;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-decoration: none;
}

.icon, .icon-button img { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
}
.mobile-only { display: none !important; }

.mode {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8effb;
  color: #385175;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* ==========================================================================
   Login & First-login Password Gate (Dual-panel CSCEC Engineering Portal)
   ========================================================================== */
.login {
  max-width: 1040px;
  margin: min(7vh, 64px) auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.08fr 440px;
  gap: 0;
  align-items: stretch;
}

.login-intro {
  background:
    radial-gradient(circle at 88% 14%, rgba(59, 130, 246, 0.22), transparent 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 28px),
    linear-gradient(155deg, #0b1d34 0%, #102a4c 52%, #194378 100%);
  color: #f0f6ff;
  padding: 44px 42px;
  border-radius: 20px 0 0 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #dbeafe;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 14px;
}

.login-intro .wordmark {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  opacity: 0.92;
}

.login-intro h1 {
  margin: 20px 0 14px;
  color: #ffffff;
  font-size: 36px;
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.login-intro > p {
  max-width: 420px;
  color: #c5d7f2;
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0 0 26px;
}

.login-highlights {
  list-style: none;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 13px;
}

.login-highlights li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 3px solid #60a5fa;
}

.login-highlights b {
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
}

.login-highlights span {
  font-size: 12.5px;
  color: #b7cceb;
  line-height: 1.5;
}

.login-card {
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 20px 20px 0;
  padding: 40px 36px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--navy);
}

.login-card > label { margin: 16px 0 0; }
.login-card > button { width: 100%; margin-top: 22px; min-height: 46px; font-size: 15.5px; }
.login-exit-btn { margin-top: 10px !important; width: 100%; }

.pwd-rule-box {
  margin: 10px 0 4px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: #184487;
  font-size: 13px;
  line-height: 1.6;
}

.role-options { display: grid; gap: 10px; margin-top: 20px; }
.role-options .role-option {
  width: 100%;
  padding: 12px 15px;
  text-align: left;
  display: block;
  min-height: auto;
}
.role-option strong, .role-option span { display: block; }
.role-option strong { color: var(--navy); font-size: 15px; }
.role-option span { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.55; font-weight: 400; }

/* Standalone privacy card centered */
.login:has(> .login-card:only-child) {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}
.login:has(> .login-card:only-child) > .login-card {
  border-left: 1px solid var(--line);
  border-radius: 18px;
}

/* ==========================================================================
   App Shell: Fixed Deep Navy Sidebar + Sticky Header + Cloud-Gray Canvas
   ========================================================================== */
.app-shell {
  min-height: 100vh;
  padding-left: var(--sidebar-width);
  background: var(--bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  overflow-y: auto;
  padding: 20px 14px 32px;
  background: linear-gradient(180deg, #0c203a 0%, #102a4c 60%, #0e2440 100%);
  color: #eef4ff;
  z-index: 60;
  box-shadow: 2px 0 18px rgba(10, 24, 46, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(164, 190, 228, 0.35) transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-subtitle {
  font-size: 11.5px;
  color: #93b4de;
  letter-spacing: 0.4px;
  font-weight: 500;
}

.sidebar > .mode {
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  margin: 0 0 8px 10px;
}

.main-navigation {
  display: grid;
  gap: 4px;
  padding: 10px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-mobile-tools { padding-top: 12px; }

.main-navigation button {
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  min-height: 42px;
  background: transparent;
  color: #dce8fc;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
}

.main-navigation button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.main-navigation img {
  width: 19px;
  height: 19px;
  filter: invert(1);
  opacity: 0.85;
}

.main-navigation .active,
.chapter-navigation .active {
  background: linear-gradient(90deg, #1b56c6 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(27, 86, 198, 0.32);
}

.main-navigation .active img { opacity: 1; }

.chapter-navigation { padding-top: 16px; }
.chapter-navigation h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #90add6;
  padding: 0 10px;
  margin: 0 0 12px;
}

.chapter-navigation h2 span {
  font-size: 11.5px;
  color: #a9c3e8;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.chapter-navigation button,
.chapter-group summary {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  background: transparent;
  color: #d6e3f8;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.chapter-button,
.chapter-group summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  min-height: 40px;
  margin-bottom: 3px;
}

/* Chapter number pill */
.chapter-button > span:first-child,
.chapter-group summary > span:first-child {
  flex: 0 0 24px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.chapter-button.active > span:first-child {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.chapter-group summary > span:nth-child(2),
.chapter-button > span:nth-child(2) { flex: 1; min-width: 0; }

.chapter-button small,
.chapter-group summary small {
  display: block;
  font-size: 11.5px;
  color: #9ab5dc;
  font-weight: 400;
  margin-top: 2px;
}

.chapter-button.active small { color: #dbeafe; }

.chapter-group summary img {
  width: 15px;
  height: 18px;
  filter: invert(1);
  opacity: 0.7;
  transition: transform 0.16s ease;
}

.chapter-group:not([open]) summary img { transform: rotate(-90deg); }

.chapter-group button {
  display: block;
  padding: 8px 12px 8px 34px;
  min-height: 36px;
  margin: 2px 0 2px 10px;
  width: calc(100% - 10px);
  border-left: 1.5px solid rgba(147, 180, 222, 0.24);
  border-radius: 0 7px 7px 0;
  font-size: 13px;
}

.chapter-navigation button:hover:not(.active),
.chapter-group summary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.chapter-navigation button.active:hover {
  background: linear-gradient(90deg, #1b56c6 0%, #2563eb 100%);
}

summary { cursor: pointer; font-weight: 600; line-height: 1.5; }
.chapter-group summary, .actions > summary { list-style: none; }
.chapter-group summary::-webkit-details-marker, .actions > summary::-webkit-details-marker { display: none; }

/* ==========================================================================
   Sticky Top Header
   ========================================================================== */
.app-header {
  min-height: var(--header-height);
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 6px rgba(15, 39, 68, 0.04);
  z-index: 30;
}

.header-project {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.header-project label {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.header-project select {
  width: 224px;
  max-width: 248px;
  height: 40px;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--surface-subtle);
  border-color: var(--line-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-period {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.header-period b {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 700;
}

.header-period span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.header-period button {
  font-size: 13px;
  padding: 4px 10px;
  min-height: 32px;
}

.period-details { position: relative; font-size: 13px; color: var(--ink-secondary); }
.period-details summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-secondary);
  padding: 4px 8px;
  border-radius: 6px;
}
.period-details summary:hover { background: var(--surface-subtle); }
.period-details[open] span { display: block; line-height: 1.65; }

.header-project-kind {
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #edf2f8;
  color: var(--ink-secondary);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13.5px;
  white-space: nowrap;
}

.header-right > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--blue-border);
  transition: background-color 0.15s;
}

.header-right > a:hover {
  background: #dce9ff;
  text-decoration: none;
}

.header-right .identity {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5fb;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.switch-role { font-size: 13.5px; padding: 6px 10px; color: var(--ink-secondary); }
.switch-role:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }

.history-entry {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}
.history-entry:hover {
  background: var(--surface-subtle);
  color: var(--blue);
  text-decoration: none;
}

/* ==========================================================================
   Toast / Notice Message Stack & Main Workspace
   ========================================================================== */
.message-stack { position: sticky; top: var(--header-height); z-index: 50; }
.message-stack:empty { display: none; }

.notice-bar, .toast {
  margin: 0;
  padding: 11px 28px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  border-bottom: 1px solid var(--amber-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red-border);
}

.workspace {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 28px 100px;
  min-width: 0;
}

.workspace.has-report { padding-bottom: 136px; }

/* Report Picker & Overview Dashboard Card */
.report-picker {
  margin-bottom: 24px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.overview p { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; }

.new-report {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  background: var(--surface-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.new-report label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}

.new-report select,
.new-report input {
  width: auto;
  min-width: 100px;
  min-height: 38px;
  margin: 0;
  padding: 6px 10px;
  font-size: 14px;
}

.resume-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #edf4ff 0%, #f5f9ff 100%);
  border: 1px solid var(--blue-border);
  padding: 16px 20px;
  margin: 0 0 18px;
  border-radius: var(--radius-md);
}

.resume-entry .help {
  flex: 1;
  min-width: 220px;
  margin: 0;
  color: #29466e;
}

.report-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.report-list button {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  justify-content: flex-start;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px 18px;
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.report-list button:hover:not(:disabled) {
  border-color: var(--blue-border);
  background: #f9fbff;
  box-shadow: var(--shadow-sm);
}

.report-list button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(27, 86, 198, 0.14);
}

.report-list b { font-size: 16px; color: var(--navy); }
.report-list span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.report-list small {
  margin-top: 4px;
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #edf2f8;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
}
.report-list button.selected small { background: #d6e6ff; color: var(--blue); }

/* ==========================================================================
   Manager Confirmation Workbench Banner
   ========================================================================== */
.manager-summary {
  grid-column: 1 / -1;
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 22px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--blue-border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.manager-summary h1 { font-size: 20px; margin: 0; }
.manager-summary h2, .manager-summary p { margin: 0; }
.manager-summary button { margin: 0; justify-self: start; }

.manager-scope-card,
.manager-facts {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  display: grid;
  gap: 6px;
}

.manager-scope-card {
  border-left: 4px solid var(--blue);
  background: linear-gradient(135deg, #f3f7ff 0%, #f8fbff 100%);
}

.manager-scope-card > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.4px;
}

.manager-scope-card h2,
.manager-facts h2 { font-size: 17px; color: var(--navy); }

.manager-progress-bar {
  width: 100%;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  border: none;
  background: #dbe7fb;
}

.manager-progress-bar::-webkit-progress-bar {
  background: #dbe7fb;
  border-radius: 999px;
}

.manager-progress-bar::-webkit-progress-value {
  background: linear-gradient(90deg, #1b56c6 0%, #0e7040 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.manager-progress-bar::-moz-progress-bar {
  background: linear-gradient(90deg, #1b56c6 0%, #0e7040 100%);
  border-radius: 999px;
}

.chapter-scope {
  background: #f4f7fd;
  border: 1px solid var(--blue-border);
  padding: 15px 18px;
  border-radius: var(--radius-md);
  margin: 0;
}

.chapter-scope p { font-size: 13.5px; margin: 6px 0; color: var(--ink-secondary); }
.chapter-scope label { display: flex; align-items: center; margin-top: 10px; }

.manager-progress summary,
.manager-return summary {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 14px;
}

.manager-return[open] {
  padding: 14px;
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-md);
  background: #fffcf5;
}

.manager-return[open] summary {
  border: 0;
  background: transparent;
  padding: 0 0 10px;
  color: var(--amber);
}

.chapter-checks {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 4px;
}

.chapter-checks span,
.chapter-checks label {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-size: 12.5px;
  min-height: 36px;
}

/* ==========================================================================
   12-Chapter Editor Area (Card-based Section Architecture)
   ========================================================================== */
.editor-grid, .editor { min-width: 0; }

.editor-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 18px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.editor-heading h1 { font-size: 22px; color: var(--navy); }
.editor-heading p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* Multi-user Concurrent Editing Status Bar & Overwrite Alert Banner */
.collab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
}

.collab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-weight: 600;
}

.collab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
  flex-shrink: 0;
}

.collab-meta {
  color: var(--muted);
  font-size: 12.5px;
}

.collab-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 13px 18px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  border-left: 4px solid #d97706;
  border-radius: var(--radius-md);
  color: #7c4505;
  box-shadow: var(--shadow-xs);
}

.collab-alert-body { flex: 1 1 320px; }
.collab-alert-body p { margin: 3px 0; font-size: 13.5px; line-height: 1.6; }
.collab-alert-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.collab-alert-actions button { min-height: 36px; padding: 6px 12px; font-size: 13px; }

/* Notices, Returned alerts, References */
.read-only, .restore {
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  border-left: 4px solid #d97706;
  border-radius: var(--radius-md);
  color: #7c4505;
  font-size: 14px;
  line-height: 1.65;
}

.restore button { margin: 8px 8px 2px 0; }
.restore pre { max-height: 220px; overflow: auto; }

.inline-notice {
  margin: 14px 0 18px;
  padding: 14px 18px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  border-left: 4px solid #d97706;
  border-radius: var(--radius-md);
  color: #7c4505;
  font-size: 14px;
}

.inline-notice strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.inline-notice p { margin: 4px 0 8px; }

.reference {
  margin: 14px 0;
  padding: 14px 18px;
  font-size: 14px;
  border: 1px solid #d8e4f7;
  border-left: 4px solid var(--blue);
  background: #f5f9ff;
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
}

.reference b, .reference h3 { color: var(--navy); margin-top: 0; }
.reference p { white-space: pre-wrap; margin: 6px 0; }
.reference select { margin-bottom: 10px; }
.reference summary { min-height: 28px; color: var(--navy); }
.reference[open] summary { margin-bottom: 10px; }

.carry-item { border-top: 1px solid #d6e2f5; margin-top: 12px; padding-top: 12px; }
.carry-item dl { margin: 8px 0; }
.carry-item dt { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.carry-item dd { margin: 2px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.carry-item button { margin: 0 8px 6px 0; }

/* Field Group Cards */
.field-group {
  margin: 0 0 18px;
  padding: 22px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.group-title,
.group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 18px;
  padding: 0 0 14px 14px;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  min-height: 36px;
}

.group-title::before,
.group-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: var(--blue);
}

.group-toggle { padding-right: 4px; }
.group-toggle:hover:not(:disabled) { background: transparent; color: var(--blue); }
.group-toggle img { width: 20px; height: 20px; opacity: 0.65; transition: transform 0.16s ease; }
.group-toggle img.collapsed { transform: rotate(-90deg); }

.group-issue-count {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}

.field-group:has(.group-toggle[aria-expanded=false]) {
  padding-top: 14px;
  padding-bottom: 14px;
}
.group-toggle[aria-expanded=false] {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.field { min-width: 0; margin: 0; scroll-margin-top: 160px; }
.field > label { margin-bottom: 7px; font-size: 14px; color: var(--ink); }
.field-wide { grid-column: 1 / -1; }

.is-highlighted {
  outline: 3px solid rgba(27, 86, 198, 0.45);
  outline-offset: 5px;
  border-radius: var(--radius-sm);
  scroll-margin: 160px 0 140px;
}

.checkbox-field {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.checkbox-field label {
  display: flex;
  align-items: flex-start;
  margin: 0;
  line-height: 1.6;
  cursor: pointer;
}
.checkbox-field .help { display: block; margin-top: 2px; }

/* Voice Input & AI Text Polish Bar */
.field-voice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.field-voice > button {
  min-height: 34px;
  padding: 5px 13px;
  font-size: 13px;
  border-radius: 999px;
}

.field-voice > span[role="status"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-size: 12.5px;
  font-weight: 600;
}

.field-voice > textarea,
.field-voice > label,
.field-voice > div {
  flex-basis: 100%;
}

.field-voice > label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--indigo);
}

.field-voice > .reference {
  margin: 6px 0 2px;
  background: var(--indigo-soft);
  border-color: var(--indigo-border);
  border-left-color: var(--indigo);
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(27, 86, 198, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(27, 86, 198, 0.28); }
}

.field.speaking > textarea {
  background: #f2f7ff;
  border-color: var(--blue);
  animation: voicePulse 1.5s ease-in-out infinite;
}

/* AI Precheck & Issue Diagnosis Cards */
.issues { margin: 18px 0; }
.issues h3 { margin-top: 0; }
.issues article,
.appeals article,
.field-review {
  padding: 14px 16px;
  margin: 10px 0;
  border: 1px solid var(--amber-border);
  border-left: 4px solid #d97706;
  border-radius: var(--radius-md);
  background: #fffcf5;
  box-shadow: var(--shadow-xs);
}

.field-review b,
.issues article b {
  display: inline-block;
  font-size: 13.5px;
  color: #8a4b04;
  margin-bottom: 4px;
}

.field-review p,
.issues p { margin: 5px 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }

.issues blockquote,
.appeals blockquote {
  border-left: 3px solid #9ab2d4;
  background: #f6f8fc;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 8px 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  white-space: pre-wrap;
}

.issues article.exempted {
  background: var(--green-soft);
  border-color: var(--green-border);
  border-left-color: var(--green);
}

.issue-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appeals textarea, .issues textarea, .field-review textarea { width: 100%; margin: 10px 0; }
.return-to-issue { margin: 12px 0; }
.precheck-issue-links { padding-inline-start: 1.25rem; }

/* Tables */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f8;
  border-right: 1px solid #edf2f8;
  text-align: left;
  vertical-align: top;
}
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th {
  background: #f5f8fd;
  color: var(--ink-secondary);
  min-width: 112px;
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
}
tbody tr:hover td { background: #fafcff; }
td input { min-width: 104px !important; min-height: 38px; padding: 6px 10px; font-size: 14px; }
td select { min-height: 38px; padding: 6px 10px; font-size: 14px; margin-top: 4px; }

/* Photos / Attachments */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.photos article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.photos a { display: inline-block; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.photos input { margin: 8px 0; }
.photos label { display: flex; align-items: center; font-size: 13.5px; margin-top: 6px; }

.attachment-preview { display: block; min-width: 0; }
.attachment-preview img {
  display: block;
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.upload-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 500;
}
.upload-status progress { display: block; width: 100%; margin: 6px 0 0; }

/* ==========================================================================
   Floating Frosted Bottom Save / Review Bar
   ========================================================================== */
.form-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--sidebar-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 28px max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(15, 39, 68, 0.07);
  z-index: 40;
}

.footer-buttons { display: flex; gap: 10px; flex: 0 0 auto; }
.footer-buttons button { min-width: 132px; min-height: 44px; }

.footer-buttons .primary-save.save-complete:disabled {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-border);
  opacity: 1;
}

.save-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.save-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.save-status.pending { color: var(--amber); font-weight: 600; }
.save-status.pending::before { background: #d97706; }
.save-status .icon { display: none; }

.form-footer .whole-review-short {
  min-height: 36px;
  padding: 4px 10px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12.5px;
}

/* ==========================================================================
   Bottom Actions Card (Whole Review, Submission, Versions)
   ========================================================================== */
.actions {
  margin: 24px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 140px;
}

.actions > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 750;
  color: var(--navy);
}

.actions > summary span { flex: 1; color: var(--muted); font-size: 13px; font-weight: 400; }
.actions > summary img { width: 18px; height: 18px; opacity: 0.65; transition: transform 0.16s ease; }
.actions:not([open]) > summary img { transform: rotate(-90deg); }

.actions-body {
  padding: 0 22px 24px;
  border-top: 1px solid #edf2f8;
}

.actions-body > button { margin: 8px 10px 6px 0; }
.actions p, .actions label { font-size: 14px; }
.actions textarea { max-width: 640px; }

.actions article {
  padding: 14px 16px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.whole-review-feedback {
  margin: 10px 0 14px;
  padding: 12px 16px;
  border: 1px solid var(--blue-border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}
.whole-review-feedback p { margin: 0; line-height: 1.65; }
.whole-review-feedback .whole-review-receipt { color: var(--muted); font-size: 12px; }
.whole-review-result { color: var(--navy); font-weight: 650; }
.whole-review-feedback button { margin-top: 8px; }

/* ==========================================================================
   Panels: Company Overview, Tasks, Notices, Requests, Version Preview
   ========================================================================== */
.panel {
  min-width: 0;
  padding: 22px 24px 26px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel h1 { margin-bottom: 18px; }

.filter-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-row input { width: 92px; }
.filter-row label { font-size: 13px; color: var(--ink-secondary); }

.company-cards { display: none; }

.task, .version {
  padding: 16px 18px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  line-height: 1.7;
}

.version { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }

.task-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  max-width: 840px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.task-form label:has(textarea), .task-form button { grid-column: 1 / -1; }
.task-form > button { justify-self: start; }
.task textarea { max-width: 840px; margin: 10px 0; }
.task button { margin: 8px 8px 0 0; }
.task form > label { display: flex; align-items: center; }

.task-assist {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  margin: 8px 0;
}

.version-preview {
  border-top: 4px solid var(--blue);
  margin-top: 22px;
  scroll-margin-top: 96px;
}
.version-preview p { white-space: pre-wrap; }
.preview-field { border-bottom: 1px solid #edf2f8; padding: 12px 0; }
.preview-field:last-child { border-bottom: 0; }
.version-preview > button { float: right; }

.empty { padding: 20px 0; font-size: 14px; color: var(--muted); }

/* Appointments panel (kept clean for compatibility if ever rendered) */
.appointment-panel { padding-bottom: 112px; }
.appointment-panel h1 { margin-bottom: 8px; }
.appointment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.appointment-block { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 14px; scroll-margin-top: 160px; background: var(--surface-subtle); }
.appointment-block summary { min-height: 44px; padding: 10px 0; overflow-wrap: anywhere; }
.appointment-block[open] { padding-bottom: 12px; }
.appointment-attention { color: var(--amber); }
.appointment-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 4px 12px; min-inline-size: 0; margin: 0; padding: 4px 0 0; border: 0; }
.appointment-options legend { padding: 0; font-weight: 600; }
.appointment-options label { display: flex; align-items: center; min-height: 42px; overflow-wrap: anywhere; }

/* Modals (Main Workbench) */
.logout-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(15, 31, 56, 0.5);
  backdrop-filter: blur(2px);
}

.logout-modal {
  width: min(480px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto 0;
  padding: 24px 26px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.logout-modal h3 { margin: 0 0 10px; font-size: 18px; }
.logout-modal label { margin: 14px 0; }
.logout-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: flex-end; }

/* ==========================================================================
   Tablet & Medium Desktop Breakpoints
   ========================================================================== */
@media (max-width: 1250px) {
  :root { --sidebar-width: 232px; }
  .app-header { flex-wrap: wrap; gap: 10px 14px; padding: 10px 20px; }
  .header-project select { width: 175px; }
  .header-period { padding-left: 14px; }
  .header-period span { display: none; }
  .workspace { padding: 20px 20px 100px; }
  .editor-heading { display: block; }
  .editor-heading p { margin-top: 6px; }
  .chapter-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview { align-items: flex-start; flex-direction: column; }
  .login { grid-template-columns: 1fr 410px; }
}

@media (max-width: 1000px) and (min-width: 761px) {
  .header-project-kind, .header-right .identity { display: none; }
  .header-period { gap: 6px; }
}

/* ==========================================================================
   Mobile Portrait Layout (<= 760px, unified CSCEC Blue + Cloud Gray)
   ========================================================================== */
.current-block-name { display: none; }

@media (max-width: 760px) {
  :root { --sidebar-width: 0px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .app-shell { padding-left: 0; }

  .sidebar {
    width: min(316px, calc(100vw - 44px));
    z-index: 90;
    visibility: hidden;
    transform: translateX(-100%);
    padding-top: 16px;
    transition: transform 0.2s ease, visibility 0.2s;
  }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .sidebar .wordmark { font-size: 20px; }
  .sidebar-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #dbe7ff;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
  }
  .sidebar-nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; }
  .sidebar-brand .icon-button img { filter: invert(1); }
  .chapter-navigation button, .chapter-group summary { min-height: 44px; font-size: 14px; }

  .nav-scrim {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(11, 23, 45, 0.56);
    z-index: 80;
    touch-action: none;
  }

  /* Compact Mobile Header */
  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0;
    padding: 0;
    position: static;
    min-height: 0;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }

  .mobile-brand {
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    gap: 6px;
    padding: 4px 128px 4px 6px;
    min-height: 52px;
    background: linear-gradient(135deg, #0f2744 0%, #1a3d66 100%);
    color: #fff;
  }
  .mobile-brand .wordmark { font-size: 18px; white-space: nowrap; letter-spacing: 0.2px; }
  .mobile-brand .mode { display: none !important; }
  .mobile-brand img { filter: invert(1); width: 22px; height: 22px; }

  .app-header .history-entry {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    align-self: center;
    padding: 4px 8px;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #dceaff;
    font-size: 13px;
    z-index: 2;
  }

  .header-right { display: contents; }
  .switch-role {
    grid-column: 3;
    grid-row: 1;
    z-index: 2;
    padding: 6px 12px 6px 6px;
    color: #c5dcff;
    font-size: 13px;
    min-height: 44px;
    align-self: center;
  }

  .header-project {
    grid-column: 1 / 3;
    grid-row: 2;
    padding: 8px 8px 8px 12px;
  }
  .header-project select {
    width: 100%;
    max-width: none;
    height: 42px;
    min-height: 42px;
    font-size: 15px;
    padding: 7px 10px;
  }

  .header-right .identity {
    display: block;
    grid-column: 3;
    grid-row: 2;
    align-self: center;
    margin: 0 12px 0 4px;
    padding: 4px 9px;
    font-size: 12px;
    max-width: 120px;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
  }

  .header-period {
    grid-column: 1 / -1;
    grid-row: 3;
    border: 0;
    border-top: 1px solid var(--line);
    padding: 8px 12px;
    gap: 4px 10px;
    background: var(--surface-subtle);
  }
  .header-period b { font-size: 13px; padding: 3px 10px; }
  .header-period span { display: block; font-size: 11.5px; }
  .header-period button, .header-period summary { min-height: 38px; font-size: 13px; }
  .header-period button { margin-left: auto; }
  .header-project-kind { display: none; }

  .message-stack { top: 0; }
  .notice-bar, .toast { padding: 10px 14px; font-size: 13px; }

  .workspace { padding: 14px 12px 64px; }
  .workspace.has-report { padding-bottom: 184px; }

  h1 { font-size: 20px; }
  h2 { font-size: 17px; }

  .report-picker { padding: 16px 14px; margin-bottom: 16px; }
  .overview { gap: 12px; margin-bottom: 14px; padding-bottom: 14px; }
  .new-report { width: 100%; flex-wrap: wrap; }
  .new-report button { width: 100%; }
  .report-list { grid-template-columns: 1fr; }

  /* Sticky mobile chapter bar (yields when software keyboard opens) */
  .editor-heading { display: contents; }
  .editor-heading > p { display: none; }
  .mobile-chapter-selector {
    position: sticky;
    top: 0;
    z-index: 45;
    background: rgba(243, 246, 251, 0.96);
    backdrop-filter: blur(8px);
    margin: -6px -12px 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 3px 10px rgba(15, 39, 68, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: stretch;
  }
  .chapter-strip-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .chapter-strip-top span { font-size: 12.5px; font-weight: 600; color: var(--ink-secondary); white-space: nowrap; }
  .chapter-strip-top small { display: none; }
  .chapter-strip-top button { min-height: 40px; font-size: 13px; padding: 6px 12px; }
  .mobile-chapter-selector select {
    flex: 1;
    min-width: 0;
    width: calc(100% - 86px);
    min-height: 44px;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 10px;
  }
  .mobile-chapter-selector > button {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 8px 12px;
    min-height: 44px;
    white-space: nowrap;
  }
  .mobile-chapter-selector .icon { width: 18px; }
  .editor.keyboard-open .mobile-chapter-selector { position: static; }
  .editor.keyboard-open .field { scroll-margin-top: 8px; }

  .field-group { padding: 15px 14px 18px; margin-bottom: 14px; border-radius: var(--radius-md); }
  .group-title, .group-toggle { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; }

  .fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .fields-grid > .field { min-width: 0; grid-column: 1 / -1; }
  .fields-grid > .compact-field { grid-column: span 1; }
  .compact-field input, .compact-field select { min-width: 0; max-width: 100%; width: 100%; }

  /* Keep >=16px inputs on mobile to prevent iOS Safari auto-zoom */
  input:not([type=checkbox]), select, textarea { font-size: 16px; min-height: 44px; }
  .field { scroll-margin-top: 135px; }
  .is-highlighted { scroll-margin-top: 135px; }

  .manager-summary { padding: 14px; gap: 10px; }
  .manager-summary button { width: 100%; }
  .chapter-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }

  .panel { padding: 16px 14px 20px; border-radius: var(--radius-md); }
  .photos { grid-template-columns: 1fr; }
  .task-form { grid-template-columns: 1fr; padding: 14px; }
  .task-form > button { width: 100%; }
  .version { display: block; }
  .version > * { display: block; margin-bottom: 8px; }
  .version-preview > button { float: none; margin-bottom: 10px; }

  .actions > summary { flex-wrap: wrap; gap: 4px 10px; padding: 14px; font-size: 16px; }
  .actions-body { padding: 0 14px 18px; }
  .actions-body > button { width: 100%; margin: 6px 0; }

  /* Mobile bottom action bar */
  .form-footer {
    left: 0;
    display: block;
    padding: 8px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    z-index: 44;
  }
  .save-status { font-size: 12px; margin-bottom: 6px; }
  .footer-buttons { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .footer-buttons button { min-width: 0; flex: 1; min-height: 46px; font-size: 14.5px; padding-inline: 8px; }
  .footer-buttons .primary-save { flex: 1.25; }
  .mobile-whole-review { align-items: center; justify-content: center; }
  .editor-grid:has(.manager-summary) .form-footer { position: static; margin-top: 14px; border-radius: var(--radius-md); border: 1px solid var(--line); }

  .restore button { width: 100%; margin: 5px 0; }

  /* Company receipts switch from table to clean cards on phone */
  .company-overview > .table-scroll { display: none; }
  .company-cards { display: grid; gap: 12px; margin-top: 14px; }
  .inbox-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px;
    background: var(--surface-subtle);
  }
  .inbox-card h2 { font-size: 16px; margin: 0 0 4px; }
  .inbox-card p { margin: 3px 0; font-size: 13px; color: var(--muted); }
  .inbox-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
  .inbox-actions button { padding: 7px 12px; min-height: 38px; font-size: 13px; }

  /* Mobile Login Portal */
  .login {
    display: block;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 14px 32px;
  }
  .login-intro {
    padding: 24px 20px;
    border-radius: 16px 16px 0 0;
  }
  .login-intro h1 { font-size: 25px; margin: 12px 0 8px; }
  .login-intro > p { font-size: 13px; margin-bottom: 14px; }
  .login-highlights { gap: 8px; padding-top: 14px; }
  .login-card {
    padding: 24px 20px;
    border-left: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 16px 16px;
  }
}

@media (max-width: 360px) {
  .mobile-brand .wordmark { font-size: 16px; }
  .header-right .identity { max-width: 104px; font-size: 11.5px; }
  .mobile-chapter-selector { padding-inline: 10px; }
  .mobile-chapter-selector .current-block-name {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
  }
  .editor .footer-buttons button { font-size: 13px; }
}

@media (max-height: 500px) and (max-width: 760px) {
  html:has(.editor .form-footer) { scroll-padding-bottom: 150px; }
  .workspace.has-report:has(.editor .form-footer) { padding-bottom: 150px; }
  .editor .form-footer { position: fixed; padding: 6px 12px max(8px, env(safe-area-inset-bottom)); }
  .editor .form-footer .save-status { margin-bottom: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .field.speaking > textarea { animation: none; }
}

/* ==========================================================================
   Owner Configuration Console (.cfg-*) — Unified with Workbench Design Tokens
   ========================================================================== */
.cfg-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  min-height: 100vh;
}

.cfg-topbar {
  background: linear-gradient(135deg, #0c203a 0%, #173a66 100%);
  color: #fff;
  box-shadow: 0 2px 14px rgba(15, 39, 68, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cfg-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cfg-brand { display: flex; align-items: center; gap: 12px; }
.cfg-brand-titles { display: flex; flex-direction: column; gap: 1px; }
.cfg-brand h1 { margin: 0; font-size: 19px; font-weight: 750; color: #fff; letter-spacing: 0.2px; }
.cfg-brand-sub { font-size: 12px; color: #b6cef0; font-weight: 500; }
.cfg-brand-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  color: #e5f0ff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cfg-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cfg-pill { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.cfg-pill-ok { background: rgba(34, 197, 94, 0.18); color: #bbf7d0; }
.cfg-pill-warn { background: rgba(245, 158, 11, 0.22); color: #fde68a; }

.cfg-main { max-width: 1200px; margin: 0 auto; padding: 22px 20px 56px; }
.cfg-banner { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; line-height: 1.55; }
.cfg-banner-empty { display: none; }
.cfg-banner-info { background: var(--blue-soft); color: #18478a; border: 1px solid var(--blue-border); }
.cfg-banner-ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border); }
.cfg-banner-error { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-border); }

.cfg-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.cfg-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cfg-kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.cfg-kpi-num { font-size: 30px; line-height: 1.15; color: var(--navy); font-weight: 800; }
.cfg-kpi-sub { font-size: 12.5px; color: var(--muted); }

.cfg-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.cfg-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cfg-card-head h2 { margin: 0 0 4px; font-size: 17px; color: var(--navy); font-weight: 750; }
.cfg-sub { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.cfg-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.cfg-select-inline {
  display: inline-block;
  width: auto;
  min-width: 170px;
  max-width: 260px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  margin: 0;
}

.cfg-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.cfg-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.cfg-table thead th {
  background: #f5f8fd;
  color: var(--ink-secondary);
  font-weight: 650;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 0;
  white-space: nowrap;
  font-size: 13px;
}
.cfg-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f8;
  border-right: 0;
  vertical-align: middle;
}
.cfg-table tbody tr:last-child td { border-bottom: none; }
.cfg-table tbody tr:hover td { background: #f9fbff; }
.cfg-empty { text-align: center; color: var(--muted); padding: 28px 16px !important; }
.cfg-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cfg-mono-strong { font-family: var(--font-mono); font-size: 14px; color: var(--navy); word-break: break-all; }

.cfg-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.cfg-badge-green { background: var(--green-soft); color: var(--green); }
.cfg-badge-blue { background: var(--blue-soft); color: var(--blue); }
.cfg-badge-amber { background: var(--amber-soft); color: var(--amber); }
.cfg-badge-red { background: var(--red-soft); color: var(--red); }
.cfg-badge-slate { background: #eef2f7; color: #334760; }
.cfg-badge-gray { background: #f1f4f8; color: #66788e; }

.cfg-col-actions { text-align: right; white-space: nowrap; }
.cfg-ops { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.cfg-btn:hover { text-decoration: none; }
.cfg-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cfg-btn-primary { background: var(--blue); color: #fff; }
.cfg-btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.cfg-btn-light { background: #fff; color: var(--navy); border-color: #d8e1ee; }
.cfg-btn-light:hover { background: #edf3fb; }
.cfg-btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.cfg-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.22); }
.cfg-btn-outline { background: #fff; color: #334760; border-color: var(--line-strong); }
.cfg-btn-outline:hover:not(:disabled) { background: #f5f8fc; }

.cfg-btn-sm {
  min-height: 31px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: #fff;
}
.cfg-btn-edit { color: var(--blue); border-color: #c9dcff; background: #f3f7ff; }
.cfg-btn-edit:hover:not(:disabled) { background: #e5efff; }
.cfg-btn-grant { color: var(--green); border-color: var(--green-border); background: #effcf5; }
.cfg-btn-grant:hover:not(:disabled) { background: #dff8eb; }
.cfg-btn-warn { color: var(--amber); border-color: var(--amber-border); background: #fff9eb; }
.cfg-btn-warn:hover:not(:disabled) { background: #fef0d1; }
.cfg-btn-del { color: var(--red); border-color: #fac5c2; background: #fff5f5; }
.cfg-btn-del:hover:not(:disabled) { background: #fee7e6; }
.cfg-btn-outline-sm { color: #334760; border-color: var(--line-strong); background: #fff; }
.cfg-btn-outline-sm:hover:not(:disabled) { background: #f5f8fc; }

.cfg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(15, 31, 56, 0.5);
  backdrop-filter: blur(2px);
}
.cfg-modal-backdrop[hidden] { display: none; }

.cfg-modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
}
.cfg-modal-wide { width: min(720px, 100%); }
.cfg-modal-xl { width: min(860px, 100%); }

.cfg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9eef6;
}
.cfg-modal-head h3 { margin: 0; font-size: 17px; color: var(--navy); font-weight: 750; }
.cfg-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  border: none;
  background: #f3f6fb;
  color: #4a5d75;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.cfg-modal-close:hover { background: #e5ecf6; color: var(--navy); }

/* Inline modal error alert */
.cfg-modal-err {
  margin: 0;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: var(--red);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
}

.cfg-form { display: flex; flex-direction: column; gap: 14px; }
.cfg-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cfg-field > span,
.cfg-field-label > span { font-size: 13.5px; font-weight: 600; color: #243852; }
.cfg-field input, .cfg-field select {
  margin-top: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.cfg-field input:focus, .cfg-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 86, 198, 0.14);
}
.cfg-field input:disabled, .cfg-field select:disabled { background: #f3f6fa; color: #6c7e96; }

/* Auto-generated Strong Password Row & Tools */
.cfg-pw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cfg-pw-input {
  flex: 1 1 220px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.4px;
}
.cfg-pw-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* One-time Credential Receipt Box */
.cfg-cred-box {
  background: #f5f9ff;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.cfg-cred-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d7e4f8;
}
.cfg-cred-line:last-child { border-bottom: 0; padding-bottom: 0; }
.cfg-cred-line > span { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.cfg-cred-secret {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--blue-border);
  padding: 4px 10px;
  border-radius: 6px;
  user-select: all;
}
.cfg-copy-ok { color: var(--green) !important; font-weight: 600; }
.cfg-sr-copy { position: fixed; left: -9999px; top: 0; opacity: 0; }

.cfg-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cfg-block-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 290px; overflow-y: auto; padding: 2px; }
.cfg-block-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #d7e2f3; border-radius: var(--radius-sm); background: #fff; font-size: 13px; font-weight: 500; color: #1d324d; cursor: pointer; margin: 0; }
.cfg-block-item input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); flex-shrink: 0; }
.cfg-block-item > span { flex: 1; line-height: 1.35; }
.cfg-block-meta { font-size: 11.5px; color: #6c7e96; white-space: nowrap; }
.cfg-block-full { opacity: 0.55; cursor: not-allowed; background: #f5f7fb; }
.cfg-quick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cfg-matrix-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.cfg-matrix-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.cfg-matrix-row-warn { border-color: var(--amber-border); background: #fffdf7; }
.cfg-matrix-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.cfg-matrix-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.cfg-files-list { display: flex; flex-direction: column; gap: 8px; }
.cfg-file-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.cfg-grow { flex: 1; align-self: center; }

.cfg-checks { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 6px 2px; }
.cfg-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #1d324d; cursor: pointer; margin: 0; }
.cfg-check input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.cfg-inline-box { background: #f6f9fe; border: 1px solid #dce7f9; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cfg-inline-title { margin: 0; font-size: 13px; font-weight: 700; color: #1b4b9c; }
.cfg-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cfg-help { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.cfg-warn { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber); font-size: 13px; line-height: 1.55; }
.cfg-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; padding-top: 14px; border-top: 1px solid #eef2f8; }

@media (max-width: 760px) {
  .cfg-topbar-inner { padding: 12px 14px; }
  .cfg-brand h1 { font-size: 17px; }
  .cfg-main { padding: 14px 12px 44px; }
  .cfg-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
  .cfg-card { padding: 14px; }
  .cfg-grid-2 { grid-template-columns: 1fr; }
  .cfg-block-grid { grid-template-columns: 1fr; }
  .cfg-table-wrap { border: none; overflow: visible; }
  .cfg-table thead { display: none; }
  .cfg-table, .cfg-table tbody, .cfg-table tr, .cfg-table td { display: block; width: 100%; }
  .cfg-table tbody tr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  .cfg-table tbody td { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #edf2f8; text-align: right; }
  .cfg-table tbody td:last-child { border-bottom: none; padding-top: 10px; }
  .cfg-table tbody td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; flex-shrink: 0; }
  .cfg-col-actions { text-align: left; }
  .cfg-ops { justify-content: flex-end; }
  .cfg-modal { padding: 18px 16px; }
  .cfg-cred-line { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ==========================================================================
   Weekly Carry Single-Box & Multi-Select Update Checklist (E646 ui6)
   ========================================================================== */
.carry-card {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  box-shadow: var(--shadow-xs);
}
.carry-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.carry-card-head strong {
  display: block;
  font-size: 15.5px;
  color: var(--navy);
}
.carry-card-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}
.carry-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.carry-checklist-wrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--blue-border);
}
.carry-checklist-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.carry-checklist-bar .help { margin: 0; color: var(--ink-secondary); }
.carry-checklist-tools { display: flex; gap: 4px; flex-shrink: 0; }
.carry-checklist {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}
.carry-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.carry-check-row:hover { border-color: #9bb8e8; background: #fbfdff; }
.carry-check-row.is-checked { border-color: var(--blue); background: #f3f8ff; }
.carry-check-row input[type=checkbox] { margin-top: 3px; }
.carry-check-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.carry-check-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.carry-check-title strong { font-size: 14px; color: var(--navy); }
.carry-prev-val {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.carry-cur-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}
.carry-hint-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--ink);
  font-size: 13.5px;
}
.carry-hint-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.carry-hint-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.carry-hint-chips button {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--green-border);
  color: var(--green);
}
.carry-hint-chips button:hover:not(:disabled) { background: #d6f4e4; }
@media (max-width: 760px) {
  .carry-card { padding: 14px; }
  .carry-card-head { flex-direction: column; gap: 6px; }
  .carry-card-actions { flex-direction: column; align-items: stretch; }
  .carry-card-actions button { width: 100%; }
  .carry-hint-bar { flex-direction: column; }
}

/* ==========================================================================
   Footer Precheck Status Pill (E646 ui7 — Passed Gray / Issues Clickable)
   ========================================================================== */
.precheck-status-btn {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
}
.precheck-status-btn:hover:not(:disabled) {
  background: #eaf0f8;
  color: var(--navy);
  border-color: #b4c2d6;
}
.precheck-status-btn.is-passed,
.precheck-status-btn.is-checking {
  background: #edf1f6;
  border-color: #d7dfe9;
  color: #7c8b9e;
  opacity: 1;
  cursor: default;
}
.precheck-status-btn.is-issues {
  background: var(--red-soft);
  border-color: var(--red-border);
  color: var(--red);
}
.precheck-status-btn.is-issues:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
.precheck-status-btn.is-failed {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: var(--amber);
}
.precheck-status-btn.is-failed:hover:not(:disabled) {
  background: #ffedd5;
  border-color: #f0b865;
  color: #7c4304;
}
@media (max-width: 760px) {
  .form-footer .issue-buttons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }
  .form-footer .save-status {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
  }
  .precheck-status-btn {
    padding: 3px 9px;
    min-height: 28px;
    font-size: 12px;
  }
}

/* ==========================================================================
   Prior-Week Inline Preview & Soft Gray Placeholder (E646 ui9)
   ========================================================================== */
.carry-preview-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid #d9e6fa;
}
.carry-preview-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 6px 12px;
  padding: 5px 4px;
  border-bottom: 1px dashed #e6edf7;
  font-size: 13px;
  line-height: 1.5;
}
.carry-preview-row:last-child { border-bottom: none; }
.carry-preview-label {
  font-weight: 600;
  color: var(--navy);
}
.carry-preview-val {
  color: var(--ink-secondary);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.editor input::placeholder,
.editor textarea::placeholder {
  color: #9aa7b8;
  opacity: 1;
  font-weight: 400;
}
.prev-date-hint {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: #9aa7b8;
  font-weight: 400;
}
@media (max-width: 760px) {
  .carry-preview-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* === QINGKONG_ENGINEERING_UI10_START === */
/* ==========================================================================
   晴空工程 · KIMI UI 视觉提案
   用法：追加到原 frontend_src/style.css 末尾，或使用交付的合并版 style.css。
   仅使用系统字体、本地 SVG 与 CSS；不改 DOM、Vue 指令、固定 ID 或业务脚本。
   ========================================================================== */

:root {
  /* Primitive tokens：官方品牌色与中性感知色阶 */
  --cscec-blue: #0081cc;
  --p-blue-700: #006a96;
  --p-blue-600: #0076b8;
  --p-blue-500: #0081cc;
  --p-blue-100: #e9f6fc;
  --p-blue-050: #f4fafd;

  /* Semantic tokens */
  --navy: #153746;
  --navy-deep: #0f2f43;
  --navy-mid: #245365;
  --navy-hover: #eaf6fc;
  --blue: var(--p-blue-500);
  --blue-hover: var(--p-blue-600);
  --blue-strong: var(--p-blue-700);
  --blue-soft: var(--p-blue-100);
  --blue-border: #c7e5f3;
  --bg: #f3f6f8;
  --surface: #fdfeff;
  --surface-subtle: #f7fafc;
  --ink: #173744;
  --ink-secondary: #415c69;
  --muted: #5d7182;
  --line: #e0e8ed;
  --line-strong: #c9d8e0;
  --green: #14745a;
  --green-soft: #eaf7f1;
  --green-border: #bee3d4;
  --amber: #8a5a12;
  --amber-soft: #fff7e8;
  --amber-border: #eed5a6;
  --red: #b2443c;
  --red-soft: #fff1ef;
  --red-border: #efc8c3;
  --indigo: #35658b;
  --indigo-soft: #edf5fa;
  --indigo-border: #c9dfe9;

  /* Component tokens */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-xs: 0 1px 2px rgba(20, 55, 70, 0.025);
  --shadow-sm: 0 2px 8px rgba(20, 55, 70, 0.035), 0 1px 2px rgba(20, 55, 70, 0.025);
  --shadow-md: 0 12px 32px rgba(20, 55, 70, 0.08), 0 2px 8px rgba(20, 55, 70, 0.04);
  --shadow-lg: 0 24px 64px rgba(15, 47, 67, 0.18);
  --sidebar-width: 248px;
  --header-height: 64px;
  --control-height: 42px;
  color-scheme: light;
  font-size: 16px;
}

html { min-height: 100%; background: var(--bg); }
body { min-height: 100dvh; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; }
[v-cloak] { display: none; }
[hidden] { display: none !important; }
::selection { background: #cdeaf7; color: var(--navy-deep); }

h1, h2, h3 { color: var(--navy); letter-spacing: -0.015em; }
h1 { font-size: 24px; line-height: 1.35; font-weight: 700; }
h2 { font-size: 17px; line-height: 1.45; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { line-height: 1.65; }
a { color: var(--blue-strong); }
.help { color: var(--muted); font-size: 13px; line-height: 1.6; }
.small-label { font-size: 12px; }
.wordmark { color: var(--navy); font-weight: 700; letter-spacing: -0.02em; }

button {
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 8px;
  background: var(--blue-hover);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 106, 150, 0.1);
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
button:hover:not(:disabled) { background: var(--blue-strong); box-shadow: 0 3px 8px rgba(0, 106, 150, 0.13); }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
button:disabled { opacity: 0.48; box-shadow: none; }
button.secondary {
  background: var(--surface);
  color: var(--ink-secondary);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
button.secondary:hover:not(:disabled) { background: var(--p-blue-050); color: var(--blue-strong); border-color: #a9d2e5; box-shadow: none; }
button.quiet { min-height: 36px; background: transparent; color: var(--blue-strong); box-shadow: none; }
button.quiet:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue-strong); box-shadow: none; }
:focus-visible { outline: 3px solid rgba(0, 118, 184, 0.35); outline-offset: 2px; }

input:not([type=checkbox]), select, textarea {
  min-height: var(--control-height);
  padding: 9px 12px;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  box-shadow: 0 1px 1px rgba(20, 55, 70, 0.02);
}
input:not([type=checkbox]):hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #9eb8c5; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { border-color: var(--blue-hover); box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.12); }
input::placeholder, textarea::placeholder { color: #82939d; }
input:disabled, select:disabled, textarea:disabled { background: #f3f6f8; color: #637b87; border-color: #dbe4e9; }
.editor.is-acquiring-lock input:disabled,
.editor.is-acquiring-lock select:disabled,
.editor.is-acquiring-lock textarea:disabled {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
}
input[type=file] { border-color: #b7d6e5; background: var(--p-blue-050); border-radius: 10px; }
input[type=file]:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
input[type=checkbox] { accent-color: var(--blue-hover); }
label { color: var(--ink-secondary); font-size: 14px; font-weight: 600; }
label input, label select, label textarea { margin-top: 7px; }

.mode {
  padding: 3px 9px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  border: 1px solid rgba(0, 129, 204, 0.08);
  font-size: 12px;
  font-weight: 600;
}
.icon, .icon-button img { width: 18px; height: 18px; }
.mobile-only { display: none !important; }

/* 登录：浅色品牌区 + 单一登录主面 */
.login {
  max-width: 1080px;
  min-height: 600px;
  margin: clamp(24px, 7vh, 72px) auto 40px;
  padding: 0 24px;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 430px);
  align-items: stretch;
}
.login-intro {
  position: relative;
  overflow: hidden;
  padding: 52px 48px;
  border: 1px solid #d7e8ef;
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(0, 129, 204, 0.12), transparent 38%),
    linear-gradient(145deg, #eaf6fb 0%, #f5fafc 58%, #fdfeff 100%);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  justify-content: center;
}
.login-intro::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -92px;
  width: 250px;
  height: 250px;
  border: 42px solid rgba(0, 129, 204, 0.045);
  border-radius: 50%;
  pointer-events: none;
}
.brand-kicker {
  margin-bottom: 18px;
  padding: 4px 10px;
  border-color: #c8e1ec;
  background: rgba(255, 255, 255, 0.62);
  color: var(--blue-strong);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.login-intro .wordmark { color: var(--navy); font-size: 20px; opacity: 1; }
.login-intro h1 { margin: 26px 0 18px; color: var(--navy-deep); font-size: clamp(34px, 3.2vw, 44px); line-height: 1.22; font-weight: 700; letter-spacing: -0.045em; }
.login-intro > p { max-width: 440px; margin-bottom: 30px; color: var(--ink-secondary); font-size: 16px; line-height: 1.75; }
.login-highlights { position: relative; z-index: 1; gap: 18px; padding-top: 24px; border-top-color: #d5e5eb; }
.login-highlights li { position: relative; gap: 3px; padding-left: 24px; border-left: 0; }
.login-highlights li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(0, 129, 204, 0.1); }
.login-highlights b { color: var(--navy); font-size: 15px; font-weight: 650; }
.login-highlights span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.login-card {
  padding: 48px 38px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 22px 22px 0;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.login-card > .mode { margin-bottom: 18px; }
.login-card h2 { margin-bottom: 8px; font-size: 25px; color: var(--navy-deep); }
.login-card > .muted { margin: 0 0 12px; font-size: 14px; }
.login-card > label { margin-top: 18px; }
.login-card > button { min-height: 46px; margin-top: 24px; font-size: 15px; }
.login-card > .help { margin-top: 16px; }
.pwd-rule-box { background: var(--p-blue-050); border-color: var(--blue-border); color: var(--blue-strong); }
.role-options .role-option { border-color: var(--line); }
.role-options .role-option:hover { border-color: var(--blue-border); }

/* 工作台：轻侧栏、安静顶栏、正文优先 */
.app-shell { min-height: 100dvh; background: var(--bg); }
.sidebar {
  padding: 18px 12px 28px;
  border-right: 1px solid var(--line);
  background: #f9fbfc;
  color: var(--ink);
  box-shadow: none;
  scrollbar-color: #c9d8e0 transparent;
}
.sidebar-brand { margin-bottom: 14px; padding: 4px 10px 18px; border-bottom-color: var(--line); }
.sidebar-brand .wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; }
.sidebar-brand .wordmark::before { content: "CS"; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -0.03em; box-shadow: 0 4px 10px rgba(0, 129, 204, 0.18); }
.brand-stack { gap: 4px; }
.brand-subtitle { padding-left: 43px; color: var(--muted); font-size: 12px; font-weight: 500; }
.sidebar > .mode { margin: 0 0 10px 10px; background: var(--blue-soft); color: var(--blue-strong); }
.main-navigation { gap: 3px; padding: 4px 0 16px; border-bottom-color: var(--line); }
.main-navigation button { min-height: 42px; padding: 9px 12px; border-radius: 8px; background: transparent; color: var(--ink-secondary); font-size: 14px; font-weight: 500; box-shadow: none; }
.main-navigation button:hover:not(:disabled) { background: #edf3f6; color: var(--navy); }
.main-navigation img { width: 18px; height: 18px; filter: none; opacity: 0.62; }
.main-navigation .active, .chapter-navigation .active { background: var(--blue-soft); color: var(--blue-strong); font-weight: 650; box-shadow: none; }
.main-navigation .active img { opacity: 1; }
.chapter-navigation { padding-top: 18px; }
.chapter-navigation h2 { margin-bottom: 10px; padding: 0 10px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.chapter-navigation h2 span { background: #eaf0f3; color: var(--muted); font-size: 12px; }
.chapter-navigation button, .chapter-group summary { border-radius: 8px; background: transparent; color: var(--ink-secondary); font-size: 13px; font-weight: 500; box-shadow: none; }
.chapter-button, .chapter-group summary { gap: 9px; min-height: 40px; margin-bottom: 2px; padding: 8px 9px; }
.chapter-button > span:first-child, .chapter-group summary > span:first-child { flex-basis: 23px; height: 22px; border-radius: 6px; background: #eaf0f3; color: var(--muted); font-size: 12px; font-weight: 600; }
.chapter-button.active > span:first-child { background: #ccebf8; color: var(--blue-strong); }
.chapter-button small, .chapter-group summary small { color: #718691; font-size: 12px; }
.chapter-button.active small { color: var(--blue-strong); }
.chapter-group summary img { filter: none; opacity: 0.45; }
.chapter-group button { border-left-color: #d8e4e9; color: var(--muted); }
.chapter-navigation button:hover:not(.active), .chapter-group summary:hover { background: #edf3f6; color: var(--navy); }
.chapter-navigation button.active:hover { background: var(--blue-soft); }

.app-header {
  gap: 14px;
  min-height: var(--header-height);
  padding: 10px 24px;
  border-bottom-color: var(--line);
  background: rgba(253, 254, 255, 0.92);
  box-shadow: 0 1px 3px rgba(20, 55, 70, 0.025);
  backdrop-filter: blur(14px);
}
.header-project { gap: 10px; }
.header-project label { color: var(--muted); font-size: 12px; font-weight: 500; }
.header-project select { width: 230px; max-width: 250px; min-height: 38px; height: 38px; border-color: transparent; background: #f2f6f8; color: var(--navy); font-size: 14px; font-weight: 600; box-shadow: none; }
.header-period { gap: 8px; padding-left: 14px; }
.header-period b { padding: 4px 10px; background: var(--blue-soft); color: var(--blue-strong); font-size: 13px; font-weight: 650; }
.header-period button, .period-details summary { color: var(--muted); font-size: 13px; }
.period-details summary:hover { background: #edf3f6; }
.header-right { gap: 6px; }
.header-right > a { border-color: var(--line); background: var(--surface); color: var(--ink-secondary); }
.header-right > a:hover { border-color: var(--blue-border); background: var(--blue-soft); color: var(--blue-strong); }
.header-right .identity { padding: 5px 10px; background: #eef3f5; color: var(--ink-secondary); font-size: 12px; font-weight: 550; }
.switch-role { color: var(--muted); }
.history-entry { min-height: 36px; border-color: var(--line); background: transparent; color: var(--ink-secondary); font-size: 13px; box-shadow: none; }
.history-entry:hover { background: var(--blue-soft); color: var(--blue-strong); }
.workspace { max-width: 1380px; padding: 22px 24px 110px; }
.workspace.has-report { padding-bottom: 126px; }
.message-stack { top: var(--header-height); }
.notice-bar, .toast { padding: 10px 24px; }

/* 编辑主面：减少框套框，保持信息节奏 */
.editor-grid, .editor { min-width: 0; }
.editor-heading { margin-bottom: 12px; padding: 3px 1px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.editor-heading h1 { color: var(--navy-deep); font-size: 24px; }
.editor-heading p { color: var(--muted); font-size: 13px; }
.collab-bar { margin-bottom: 12px; padding: 9px 13px; border: 1px solid #dfebf0; border-radius: 9px; background: #f3f8fa; box-shadow: none; color: var(--ink-secondary); font-size: 13px; }
.collab-pill { color: var(--ink-secondary); font-weight: 550; }
.collab-dot { width: 7px; height: 7px; background: #1a946c; box-shadow: 0 0 0 3px rgba(26, 148, 108, 0.12); }
.collab-meta { color: var(--muted); font-size: 12px; }
.collab-alert { border: 1px solid var(--amber-border); border-left: 3px solid #c28b2f; border-radius: 10px; background: var(--amber-soft); color: var(--amber); box-shadow: none; }
.reference { margin: 12px 0 16px; padding: 12px 14px; border: 1px solid #dfe9ee; border-left: 1px solid #dfe9ee; border-radius: 9px; background: #f5f8fa; color: var(--ink-secondary); font-size: 14px; }
.reference summary { color: var(--ink-secondary); font-size: 13px; font-weight: 600; }
.reference b, .reference h3 { color: var(--navy); }
.read-only, .restore, .inline-notice { border: 1px solid var(--amber-border); border-left: 3px solid #c28b2f; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
.field-group { margin-bottom: 16px; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.group-title, .group-toggle { min-height: 32px; margin-bottom: 18px; padding: 0 0 14px; border-bottom-color: var(--line); color: var(--navy); font-size: 17px; font-weight: 650; }
.group-title::before, .group-toggle::before { display: none; }
.group-title .mode { margin-left: 8px; vertical-align: middle; }
.group-toggle:hover:not(:disabled) { background: transparent; color: var(--blue-strong); }
.group-toggle img { opacity: 0.45; }
.fields-grid { gap: 18px 22px; }
.field > label { margin-bottom: 6px; color: var(--ink-secondary); font-size: 14px; }
.field > .help { margin: 0 0 7px; }
.field-wide { grid-column: 1 / -1; }
.is-highlighted { outline-color: rgba(0, 129, 204, 0.45); }
.field-voice { gap: 8px; margin-top: 8px; padding: 7px 9px; border: 1px solid #e1edf2; border-radius: 9px; background: #f5fafc; }
.field-voice > button { min-height: 34px; padding: 5px 11px; border-radius: 7px; font-size: 13px; }
.field-voice > button.quiet { min-height: 34px; }
.field-voice > span[role="status"], .field-voice > span[data-voice-status] { color: var(--muted); font-size: 12px; font-weight: 500; }
.field.speaking > textarea { border-color: var(--blue); background: var(--p-blue-050); box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.13); animation: none; }
.field.speaking .field-voice { border-color: var(--blue-border); background: var(--blue-soft); }
.issues article, .appeals article, .field-review { border: 1px solid var(--amber-border); border-left: 3px solid #c28b2f; border-radius: 10px; background: #fffbF4; box-shadow: none; }
.field-review b, .issues article b { color: var(--amber); }
.table-scroll { border-color: var(--line); border-radius: 10px; }
th { background: #f4f7f9; color: var(--ink-secondary); }
th, td { border-bottom-color: var(--line); border-right-color: var(--line); }
tbody tr:hover td { background: #f8fbfc; }
.photos article { border-color: var(--line); background: var(--surface-subtle); }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.version-preview { border-top: 1px solid var(--line); }

.form-footer {
  padding: 11px 24px max(11px, env(safe-area-inset-bottom));
  border-top-color: var(--line);
  background: rgba(253, 254, 255, 0.94);
  box-shadow: 0 -4px 16px rgba(20, 55, 70, 0.045);
  backdrop-filter: blur(14px);
}
.save-status { color: var(--ink-secondary); font-size: 13px; }
.save-status::before { width: 7px; height: 7px; background: var(--green); }
.footer-buttons button { min-width: 118px; min-height: 42px; }
.footer-buttons .primary-save.save-complete:disabled { color: var(--green); background: var(--green-soft); border-color: var(--green-border); }
.form-footer .whole-review-short { background: var(--blue-soft); color: var(--blue-strong); }
.actions { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-xs); }
.actions > summary { padding: 16px 18px; color: var(--navy); font-size: 16px; font-weight: 650; }
.actions > summary span { color: var(--muted); font-size: 12px; }
.actions-body { padding: 0 16px 18px; border-top-color: var(--line); }
.actions-body > button { width: 100%; margin: 10px 0 0; }
.actions-body > button.quiet { color: var(--blue-strong); }
.actions article { padding: 12px 13px; border-color: var(--line); border-radius: 9px; background: #f6f9fa; }
.actions article p { margin: 5px 0 8px; color: var(--ink-secondary); font-size: 13px; }
.actions-deadline { padding: 13px 0 3px; color: var(--muted); font-size: 13px; }
.actions-deadline b { color: var(--navy); font-size: 16px; }
.actions h3 { margin: 20px 0 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.whole-review-feedback { border: 1px solid var(--blue-border); border-left: 3px solid var(--blue); border-radius: 9px; background: var(--blue-soft); }

/* 宽屏：正文与本期办理形成稳定双栏 */
@media (min-width: 1280px) {
  .editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 20px; align-items: start; }
  .editor-grid > .manager-summary, .editor-grid > .panel { grid-column: 1 / -1; }
  .editor-grid > .editor { grid-column: 1; }
  .editor-grid > .actions { grid-column: 2; position: sticky; top: 84px; max-height: calc(100dvh - 104px); margin: 0; overflow-y: auto; }
  .editor-grid > .actions > summary { flex-wrap: wrap; gap: 3px 8px; }
  .editor-grid > .actions > summary span { flex-basis: 100%; }
}

/* 经理确认：双列摘要，不再把正文推到首屏之外 */
.manager-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.manager-summary > h1 { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-size: 20px; }
.manager-scope-card, .manager-facts { gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafb; }
.manager-scope-card { border-left: 3px solid var(--blue); background: var(--p-blue-050); }
.manager-scope-card > span { color: var(--blue-strong); font-size: 12px; letter-spacing: 0; }
.manager-scope-card h2, .manager-facts h2 { color: var(--navy); font-size: 17px; }
.manager-scope-card p, .manager-facts p { color: var(--ink-secondary); font-size: 13px; line-height: 1.55; }
.manager-facts .quiet { min-height: 30px; padding: 3px 0; }
.manager-progress-bar { height: 7px; margin-top: 6px; background: #dcecf3; }
.manager-progress-bar::-webkit-progress-bar { background: #dcecf3; }
.manager-progress-bar::-webkit-progress-value { background: var(--blue-hover); }
.manager-progress-bar::-moz-progress-bar { background: var(--blue-hover); }
.chapter-scope { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.chapter-scope b { color: var(--navy); font-size: 14px; }
.chapter-scope p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; }
.chapter-scope label { display: flex; align-items: center; margin: 0; color: var(--ink-secondary); font-size: 13px; }
.manager-summary > .help { grid-column: 1 / -1; margin: 0; }
.manager-summary > button { justify-self: start; }
.manager-progress summary, .manager-return summary { border-color: var(--line); background: transparent; color: var(--ink-secondary); }
.manager-return[open] { background: #fffcf6; }
.chapter-checks span, .chapter-checks label { border-color: var(--line); background: #f7fafb; }

/* 后台：明亮顶栏、统一表格与操作层级 */
.cfg-body { min-height: 100dvh; background: var(--bg); color: var(--ink); }
.cfg-topbar { border-bottom: 1px solid var(--line); background: rgba(253, 254, 255, 0.96); color: var(--ink); box-shadow: none; backdrop-filter: blur(12px); }
.cfg-topbar-inner { max-width: 1280px; padding: 14px 24px; }
.cfg-brand { gap: 14px; }
.cfg-brand h1 { color: var(--navy-deep); font-size: 20px; font-weight: 700; }
.cfg-brand-sub { color: var(--muted); font-size: 12px; }
.cfg-brand-tag { border: 1px solid var(--blue-border); background: var(--blue-soft); color: var(--blue-strong); }
.cfg-pill-ok { background: var(--green-soft); color: var(--green); }
.cfg-pill-warn { background: var(--amber-soft); color: var(--amber); }
.cfg-topbar .cfg-btn-ghost, .cfg-topbar .cfg-btn-outline { border-color: var(--line-strong); background: var(--surface); color: var(--ink-secondary); }
.cfg-topbar .cfg-btn-ghost:hover, .cfg-topbar .cfg-btn-outline:hover { background: var(--blue-soft); color: var(--blue-strong); }
.cfg-btn-light { border-color: var(--line-strong); background: var(--surface); color: var(--ink-secondary); }
.cfg-btn-light:hover { background: var(--blue-soft); color: var(--blue-strong); }
.cfg-main { max-width: 1280px; padding: 22px 24px 56px; }
.cfg-banner { border-radius: 10px; }
.cfg-banner-info { border-color: #d6e8ef; background: #eef7fa; color: var(--ink-secondary); }
.cfg-kpi-grid { gap: 14px; margin-bottom: 18px; }
.cfg-kpi-card { gap: 5px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-xs); }
.cfg-kpi-label { color: var(--muted); font-size: 13px; font-weight: 550; }
.cfg-kpi-num { color: var(--navy-deep); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cfg-kpi-sub { color: var(--muted); font-size: 12px; }
.cfg-card { margin-bottom: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.cfg-card-head { margin-bottom: 16px; }
.cfg-card-head h2 { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 17px; font-weight: 650; }
.cfg-section-number { color: var(--blue-strong); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cfg-sub { max-width: 760px; color: var(--muted); font-size: 13px; }
.cfg-btn { min-height: 38px; border-radius: 8px; font-size: 14px; }
.cfg-btn-primary { background: var(--blue-hover); color: #fff; }
.cfg-btn-primary:hover:not(:disabled) { background: var(--blue-strong); }
.cfg-btn-outline { border-color: var(--line-strong); background: var(--surface); color: var(--ink-secondary); }
.cfg-btn-outline:hover:not(:disabled) { background: var(--blue-soft); color: var(--blue-strong); }
.cfg-table-wrap { border-color: var(--line); border-radius: 10px; }
.cfg-table { font-size: 14px; }
.cfg-table thead th { padding: 11px 14px; border-bottom-color: var(--line); background: #f4f7f9; color: var(--muted); font-size: 12px; font-weight: 600; }
.cfg-table tbody td { padding: 14px; border-bottom-color: #e7edf0; color: var(--ink-secondary); }
.cfg-table tbody td b { color: var(--navy); font-weight: 600; }
.cfg-table tbody tr:hover td { background: #f8fbfc; }
.cfg-mono { color: var(--muted); }
.cfg-badge { padding: 3px 8px; font-size: 12px; font-weight: 550; }
.cfg-badge-blue { background: var(--blue-soft); color: var(--blue-strong); }
.cfg-badge-slate { background: #edf2f4; color: var(--ink-secondary); }
.cfg-btn-sm { min-height: 32px; border-radius: 7px; font-size: 12px; font-weight: 550; }
.cfg-btn-edit { border-color: #cce1ec; background: #f2f9fc; color: var(--blue-strong); }
.cfg-btn-edit:hover:not(:disabled) { background: #e3f2f8; }
.cfg-btn-grant { border-color: var(--green-border); background: #f1f9f5; color: var(--green); }
.cfg-btn-warn { border-color: var(--amber-border); background: #fffaf0; color: var(--amber); }
.cfg-btn-del { border-color: var(--red-border); background: #fff5f3; color: var(--red); }
.cfg-modal { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg); }
.cfg-modal-head { border-bottom-color: var(--line); }
.cfg-modal-head h3 { color: var(--navy); }
.cfg-cred-box { border-color: var(--blue-border); background: var(--p-blue-050); }
.cfg-cred-secret { color: var(--blue-strong); }
.cfg-inline-box { border-color: #dbe9ee; background: #f5f9fa; }
.cfg-inline-title { color: var(--blue-strong); }

/* 中等桌面与折叠屏展开态：不硬塞双栏 */
@media (max-width: 1279px) {
  .editor-grid > .actions { position: static; max-height: none; margin-top: 16px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  :root { --sidebar-width: 208px; }
  .sidebar { padding-inline: 9px; }
  .sidebar-brand .wordmark { font-size: 18px; }
  .brand-subtitle { padding-left: 0; }
  .app-header { gap: 9px 12px; padding: 10px 16px; }
  .header-project select { width: 190px; }
  .header-right .identity, .header-project-kind { display: none; }
  .workspace { padding: 18px 16px 110px; }
  .field-group { padding: 20px; }
  .manager-summary { grid-template-columns: 1fr; }
  .manager-summary > h1, .chapter-scope, .manager-summary > .help { grid-column: 1; }
}

/* 手机竖屏：轻量顶栏、粘性章节条、44px 触控目标 */
@media (max-width: 760px) {
  :root { --sidebar-width: 0px; --control-height: 44px; }
  body { font-size: 16px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .sidebar { width: min(310px, calc(100vw - 42px)); padding: 16px 12px 28px; background: #f9fbfc; box-shadow: 16px 0 40px rgba(15, 47, 67, 0.14); }
  .sidebar-brand .icon-button img { filter: none; }
  .sidebar-nav-link { color: var(--ink-secondary); }
  .sidebar-nav-link:hover { background: #edf3f6; color: var(--navy); }
  .nav-scrim { background: rgba(15, 47, 67, 0.38); backdrop-filter: blur(2px); }
  .app-header { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0; padding: 0; background: var(--surface); box-shadow: none; }
  .mobile-brand { min-height: 52px; padding: 4px 124px 4px 6px; background: var(--surface); color: var(--navy); }
  .mobile-brand .wordmark { color: var(--navy); font-size: 17px; }
  .mobile-brand img { filter: none; width: 21px; height: 21px; }
  .app-header .history-entry { min-height: 44px; padding: 6px 5px; background: transparent; color: var(--blue-strong); font-size: 12px; }
  .header-right { display: contents; }
  .switch-role { min-height: 44px; padding: 6px 9px 6px 4px; color: var(--muted); font-size: 12px; }
  .header-project { grid-column: 1 / 3; padding: 8px 8px 8px 12px; }
  .header-project select { width: 100%; max-width: none; min-height: 42px; height: 42px; padding: 7px 10px; background: #f2f6f8; font-size: 15px; }
  .header-right .identity { display: block; grid-column: 3; grid-row: 2; max-width: 108px; margin: 0 10px 0 3px; padding: 5px 8px; overflow: hidden; color: var(--ink-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .header-period { grid-column: 1 / -1; grid-row: 3; gap: 4px 7px; padding: 7px 12px; border-top-color: var(--line); background: #f8fafb; }
  .header-period b { padding: 3px 8px; font-size: 12px; }
  .header-period span { display: block; font-size: 12px; }
  .header-period button, .header-period summary { min-height: 40px; font-size: 12px; }
  .workspace { padding: 12px 12px 70px; }
  .workspace.has-report { padding-bottom: 184px; }
  h1 { font-size: 21px; }
  h2 { font-size: 17px; }
  .editor-heading { display: contents; }
  .mobile-chapter-selector { margin: -4px -12px 12px; padding: 7px 12px; border-bottom-color: var(--line); background: rgba(243, 246, 248, 0.95); box-shadow: 0 3px 10px rgba(20, 55, 70, 0.035); }
  .chapter-strip-top { gap: 6px; }
  .chapter-strip-top span { color: var(--muted); font-size: 12px; font-weight: 550; }
  .chapter-strip-top button { min-height: 44px; padding: 7px 9px; font-size: 12px; }
  .mobile-chapter-selector select { min-height: 46px; font-size: 16px; font-weight: 600; }
  .mobile-chapter-selector > button { min-height: 46px; padding: 8px 11px; }
  .collab-bar { margin-bottom: 10px; padding: 9px 11px; font-size: 13px; }
  .collab-meta { display: none; }
  .reference { margin: 10px 0 12px; padding: 10px 12px; font-size: 14px; }
  .field-group { margin-bottom: 12px; padding: 16px 14px 18px; border-radius: 12px; }
  .group-title, .group-toggle { margin-bottom: 15px; padding-bottom: 12px; font-size: 16px; }
  .fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 10px; }
  .fields-grid > .field { grid-column: 1 / -1; }
  .fields-grid > .compact-field { grid-column: span 1; }
  .field > label { font-size: 14px; }
  .field > .help { font-size: 12px; }
  input:not([type=checkbox]), select, textarea { min-height: 44px; font-size: 16px; }
  .field-voice { padding: 7px; }
  .field-voice > button, .field-voice > button.quiet { min-height: 44px; padding: 7px 10px; }
  .field-voice > span[role="status"], .field-voice > span[data-voice-status] { flex: 1 1 120px; font-size: 12px; }
  .form-footer { left: 0; display: block; padding: 8px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .save-status { margin-bottom: 6px; font-size: 12px; }
  .footer-buttons { gap: 8px; }
  .footer-buttons button { min-width: 0; min-height: 48px; font-size: 15px; }
  .manager-summary { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .manager-summary > h1, .chapter-scope, .manager-summary > .help { grid-column: 1; }
  .manager-summary > button { width: 100%; min-height: 44px; }
  .chapter-scope { align-items: flex-start; }
  .chapter-scope label { flex-basis: 100%; min-height: 44px; }
  .chapter-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { margin-top: 14px; }
  .actions > summary { padding: 14px; }
  .actions-body { padding: 0 14px 16px; }
  .actions-body > button { min-height: 44px; }
  .login { display: block; min-height: 0; max-width: 460px; margin: 0 auto; padding: 14px 14px 28px; }
  .login-intro { padding: 22px; border: 1px solid #d7e8ef; border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: none; }
  .login-intro .brand-kicker { margin-bottom: 12px; }
  .login-intro h1 { margin: 14px 0 10px; font-size: 28px; }
  .login-intro > p { margin-bottom: 0; font-size: 14px; line-height: 1.65; }
  .login-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; }
  .login-highlights li { gap: 0; padding-left: 0; text-align: center; }
  .login-highlights li::before { display: none; }
  .login-highlights b { font-size: 12px; line-height: 1.45; }
  .login-highlights span { display: none; }
  .login-card { padding: 22px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; box-shadow: var(--shadow-md); }
  .login-card > .mode { margin-bottom: 12px; }
  .login-card h2 { font-size: 22px; }
  .login-card > label { margin-top: 14px; }
  .login-card > button { min-height: 48px; margin-top: 18px; }
  .login-card > .help { margin-top: 12px; }
  .cfg-topbar-inner { padding: 12px 14px; }
  .cfg-brand { align-items: flex-start; }
  .cfg-brand h1 { font-size: 17px; }
  .cfg-brand-sub { font-size: 12px; }
  .cfg-main { padding: 14px 12px 44px; }
  .cfg-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cfg-kpi-card { padding: 12px 10px; }
  .cfg-kpi-label { font-size: 12px; }
  .cfg-kpi-num { font-size: 25px; }
  .cfg-kpi-sub { display: none; }
  .cfg-card { padding: 14px; }
  .cfg-card-head { align-items: stretch; }
  .cfg-card-head .cfg-btn { min-height: 44px; }
  .cfg-table tbody tr { border-color: var(--line); border-radius: 10px; background: var(--surface); }
  .cfg-table tbody td { font-size: 14px; }
  .cfg-table tbody td::before { font-size: 12px; }
  .cfg-btn-sm { min-height: 44px; padding: 8px 12px; }
  .cfg-modal { padding: 18px 16px; }
}

@media (max-width: 380px) {
  .fields-grid > .compact-field { grid-column: 1 / -1; }
  .mobile-brand { padding-right: 112px; }
  .app-header .history-entry { font-size: 12px; }
  .header-right .identity { max-width: 96px; }
}

/* 支持双屏/折叠屏浏览器：避免关键操作跨铰链，其他浏览器自动使用响应式布局 */
@media (horizontal-viewport-segments: 2) {
  .editor-grid { display: block; }
  .editor-grid > .actions { position: static; max-height: none; }
  .form-footer { left: env(viewport-segment-left 0 0, 0px); right: env(viewport-segment-right 1 0, 0px); }
}

/* 浅色分区层：用低饱和底色区分内容，不增加 DOM 或卡片层级 */
:root {
  --section-blue: #e8f3f9;
  --section-blue-border: #cfe3ed;
  --section-mint: #eaf5ef;
  --section-mint-border: #d2e7dc;
  --section-indigo: #edf1f8;
  --section-indigo-border: #dbe2ee;
  --section-amber: #fff4df;
  --section-amber-border: #ead9b8;
  --section-slate: #edf4f7;
}

/* 导航与正文形成轻微的色温差异 */
.sidebar { border-right-color: #d7e5ec; background: var(--section-slate); }
.collab-bar { border-color: var(--section-mint-border); background: var(--section-mint); }
.reference { border-color: var(--section-indigo-border); background: var(--section-indigo); }

/* 填报分组：奇数组浅蓝、偶数组浅绿，输入框保持近白以利阅读 */
.editor > form > .field-group { border-color: var(--section-blue-border); background: var(--section-blue); }
.editor > form > .field-group:nth-of-type(even) { border-color: var(--section-mint-border); background: var(--section-mint); }
.editor > form > .field-group .group-title,
.editor > form > .field-group .group-toggle { border-bottom-color: rgba(65, 92, 105, 0.18); }
.editor > form > .field-group .field-voice { background: rgba(253, 254, 255, 0.64); }

/* 本期办理与经理确认：蓝靛表达资料，暖黄只提示需要核对 */
.actions { border-color: var(--section-indigo-border); background: var(--section-indigo); }
.actions-body { border-top-color: var(--section-indigo-border); }
.actions article { border-color: var(--section-indigo-border); background: rgba(253, 254, 255, 0.72); }
.manager-summary { border-color: #d9e6ec; background: #f5fafc; }
.manager-scope-card { border-color: var(--section-blue-border); background: var(--section-blue); }
.manager-facts { border-color: var(--section-indigo-border); background: var(--section-indigo); }
.chapter-scope { border-color: var(--section-amber-border); background: var(--section-amber); }
.manager-progress summary, .manager-return summary { background: rgba(237, 244, 247, 0.68); }

/* 后台：总览与三类清单同色系呼应，表格仍保持高可读性 */
.cfg-body { background: #f1f5f7; }
.cfg-kpi-card:nth-child(1) { border-color: var(--section-blue-border); background: var(--section-blue); }
.cfg-kpi-card:nth-child(2) { border-color: var(--section-mint-border); background: var(--section-mint); }
.cfg-kpi-card:nth-child(3) { border-color: var(--section-indigo-border); background: var(--section-indigo); }
#sec-projects { border-color: var(--section-blue-border); background: #f0f8fc; }
#sec-accounts { border-color: var(--section-mint-border); background: #eff8f3; }
#sec-grants { border-color: var(--section-indigo-border); background: #f2f5fa; }
#sec-accounts .cfg-section-number { color: var(--green); }
#sec-grants .cfg-section-number { color: #4c628c; }
.cfg-table-wrap { background: rgba(253, 254, 255, 0.82); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
/* ==========================================================================
   E646(ui10) 晴空工程与 ui6–ui9 功能组件融合收口补丁
   ========================================================================== */
.precheck-status-btn,
.carry-hint-chips button {
  box-shadow: none;
}
.precheck-status-btn:hover:not(:disabled),
.carry-hint-chips button:hover:not(:disabled) {
  box-shadow: none;
}
.carry-card {
  background: var(--section-blue);
  border-color: var(--section-blue-border);
}
.carry-preview-list {
  border-color: var(--blue-border);
}
.carry-preview-row {
  border-bottom-color: #dfebf0;
}
.carry-check-row:hover {
  border-color: #a9d2e5;
  background: var(--p-blue-050);
}
.carry-check-row.is-checked {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.carry-hint-chips button:hover:not(:disabled) {
  background: #daf0e5;
}
.cfg-banner:not(.cfg-banner-ok):not(.cfg-banner-error):not(.cfg-banner-empty) {
  border: 1px solid #d6e8ef;
  background: #eef7fa;
  color: var(--ink-secondary);
}
@media (max-width: 760px) {
  .form-footer .issue-buttons {
    margin-bottom: 6px;
  }
  .form-footer .save-status {
    margin-bottom: 0;
    font-size: 12px;
  }
}

/* ==========================================================================
   E646(ui11) 表格宽敞可读性（多行自动换行、去数字箭头、首列冻结）与宽屏空间优化
   ========================================================================== */
:root {
  --sidebar-width: 232px;
}
.workspace {
  max-width: 1480px;
}
@media (min-width: 1280px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 18px;
  }
}

/* 全局隐藏数字框右侧挡字的上下微调小箭头，工程大数字与“上周：xxx”浅灰提示清晰完整 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* 填报明细表格：按列内容给足宽敞列宽，文字多自动换行可拉高 */
.field .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.field .table-scroll table {
  width: max-content;
  min-width: 100%;
}
.field .table-scroll th,
.field .table-scroll td {
  padding: 10px 10px;
  vertical-align: top;
}
.field .table-scroll th {
  min-width: 112px;
  white-space: nowrap;
}

/* 宽文本列：加工单位、事项名称、定标单位、当前状态、统计范围、完成时间 */
.field .table-scroll th[data-column="factory"],
.field .table-scroll td[data-column="factory"],
.field .table-scroll th[data-column="winner"],
.field .table-scroll td[data-column="winner"] {
  min-width: 220px;
  width: 230px;
}
.field .table-scroll th[data-column="status"],
.field .table-scroll td[data-column="status"],
.field .table-scroll th[data-column="scope"],
.field .table-scroll td[data-column="scope"] {
  min-width: 240px;
  width: 260px;
}
.field .table-scroll th[data-column="due"],
.field .table-scroll td[data-column="due"] {
  min-width: 175px;
  width: 185px;
}
.field .table-scroll th[data-column="category"],
.field .table-scroll td[data-column="category"] {
  min-width: 162px;
  width: 168px;
}
.field .table-scroll th[data-column="method"],
.field .table-scroll td[data-column="method"] {
  min-width: 152px;
  width: 158px;
}
/* 第4章 name 为多行文本，第6章 name 为下拉指标，按内部控件自动匹配列宽 */
.field .table-scroll th[data-column="name"],
.field .table-scroll td[data-column="name"] {
  min-width: 165px;
}
.field .table-scroll td[data-column="name"]:has(textarea) {
  min-width: 220px;
  width: 235px;
}
.field .table-scroll th[data-column="ratio_basis"],
.field .table-scroll td[data-column="ratio_basis"] {
  min-width: 165px;
}
.field .table-scroll th[data-column="unit"],
.field .table-scroll td[data-column="unit"] {
  min-width: 124px;
  width: 130px;
}
/* 数值列：给足宽度放下大数字与“上周：xxx”浅灰提示 */
.field .table-scroll th[data-column="total"],
.field .table-scroll td[data-column="total"],
.field .table-scroll th[data-column="made_week"],
.field .table-scroll td[data-column="made_week"],
.field .table-scroll th[data-column="made_total"],
.field .table-scroll td[data-column="made_total"],
.field .table-scroll th[data-column="in_progress"],
.field .table-scroll td[data-column="in_progress"],
.field .table-scroll th[data-column="shipped_week"],
.field .table-scroll td[data-column="shipped_week"],
.field .table-scroll th[data-column="shipped_total"],
.field .table-scroll td[data-column="shipped_total"],
.field .table-scroll th[data-column="week"],
.field .table-scroll td[data-column="week"],
.field .table-scroll th[data-column="denominator"],
.field .table-scroll td[data-column="denominator"],
.field .table-scroll th[data-column="lots"],
.field .table-scroll td[data-column="lots"] {
  min-width: 134px;
  width: 138px;
}
/* 操作列紧凑居中 */
.field .table-scroll th[data-column="_ops"],
.field .table-scroll td[data-column="_ops"] {
  min-width: 72px;
  width: 76px;
  text-align: center;
}

/* 表格内多行文本框、数字框与紧凑状态下拉 */
.field .table-scroll td textarea.table-text-input {
  display: block;
  width: 100%;
  min-width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.field .table-scroll td input[type=number] {
  width: 100%;
  min-width: 112px !important;
  min-height: 40px;
  padding: 7px 10px;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.field .table-scroll td select {
  width: 100%;
  min-height: 40px;
  margin-top: 0;
  padding: 7px 10px;
  font-size: 14px;
}
.field .table-scroll td select.table-num-state {
  min-height: 32px;
  margin-top: 5px;
  padding: 4px 8px;
  font-size: 12.5px;
  color: var(--muted);
  background: #f7fafc;
  border-color: #dce6ec;
}

/* 电脑与平板横向滚动表格时，首列（如加工单位/分类/指标）固定在最左侧不串行 */
@media (min-width: 761px) {
  .field .table-scroll th:first-child,
  .field .table-scroll td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 3px 0 8px -3px rgba(20, 55, 70, 0.1);
  }
  .field .table-scroll th:first-child {
    z-index: 3;
    background: #f4f7f9;
  }
  .field .table-scroll td:first-child {
    background: var(--surface);
  }
  .field .table-scroll tbody tr:hover td:first-child {
    background: #f8fbfc;
  }
}

/* ==========================================================================
   E646(ui13) 灰字直接可编辑预览条、上周计划核对清单与光标防溢出裁剪
   ========================================================================== */
.field textarea {
  overflow: auto;
  overscroll-behavior: contain;
}
.field textarea.is-prefill-preview {
  color: #7b8f9e;
  background: #fafdff;
  border-style: dashed;
  border-color: #b7d2e0;
}
.field textarea.is-prefill-preview:focus {
  border-style: solid;
  border-color: var(--blue-hover);
  background: #fff;
}
.prefill-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 6px;
  padding: 6px 11px;
  border: 1px solid #d4e6f0;
  border-radius: 8px;
  background: #f2f8fc;
  color: var(--ink-secondary);
  font-size: 12.5px;
  line-height: 1.45;
}
.prefill-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.prefill-bar-actions button {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12.5px;
  border-radius: 6px;
  box-shadow: none;
}
.prefill-bar-actions .prefill-adopt-btn {
  background: var(--surface);
  border: 1px solid var(--blue-border);
  color: var(--blue-strong);
}
.prefill-bar-actions .prefill-adopt-btn:hover:not(:disabled) {
  background: var(--blue-soft);
}
.prefill-bar-actions .prefill-clear-btn {
  color: var(--muted);
}
.prev-inline-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 5px;
  font-size: 12.5px;
  color: #7c909f;
}
.prev-inline-hint button {
  min-height: 26px;
  padding: 2px 9px;
  font-size: 12px;
  border: 1px solid var(--blue-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--blue-strong);
  box-shadow: none;
}
.prev-inline-hint button:hover:not(:disabled) {
  background: var(--blue-soft);
}

/* 上周第九章计划完成情况核对清单 */
.plan-checklist-card {
  padding: 15px 16px;
  border: 1px solid var(--section-indigo-border);
  background: var(--section-indigo);
}
.plan-check-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.plan-check-head b {
  display: block;
  font-size: 15px;
  color: var(--navy);
}
.plan-check-head .help {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
}
.plan-check-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.plan-check-tools button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12.5px;
}
.plan-check-list {
  display: grid;
  gap: 7px;
}
.plan-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9e4ee;
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 140ms ease, background-color 140ms ease;
}
.plan-check-row.is-done {
  border-color: var(--green-border);
  background: var(--green-soft);
}
.plan-check-row.is-pending {
  border-color: var(--amber-border);
  background: var(--amber-soft);
}
.plan-check-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  background: #e9f1f7;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
}
.plan-check-row.is-done .plan-check-idx {
  background: #cdece0;
  color: var(--green);
}
.plan-check-row.is-pending .plan-check-idx {
  background: #f5dfb8;
  color: var(--amber);
}
.plan-check-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.plan-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.plan-tag.is-in-current {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
}
.plan-tag.is-in-next {
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue-strong);
}
.plan-check-opts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.plan-check-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.plan-check-opt input[type=checkbox] {
  margin: 0;
  width: 15px;
  height: 15px;
}
.plan-check-row.is-done .plan-check-opt.is-done {
  border-color: var(--green-border);
  color: var(--green);
}
.plan-check-row.is-pending .plan-check-opt.is-pending {
  border-color: var(--amber-border);
  color: var(--amber);
}
.plan-check-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--section-indigo-border);
}
.plan-check-foot .help {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 13px;
}
.plan-check-foot button {
  min-height: 38px;
  padding: 7px 18px;
}
.plan-feedback-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--green-border);
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}
.plan-feedback-body {
  flex: 1;
  min-width: 220px;
}
.plan-feedback-body strong {
  color: var(--green);
}
.plan-copy-preview {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 12.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.plan-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.plan-feedback-actions button {
  min-height: 32px;
  padding: 4px 11px;
  font-size: 12.5px;
  box-shadow: none;
}

@media (max-width: 760px) {
  .plan-check-row {
    flex-wrap: wrap;
    padding: 10px;
  }
  .plan-check-opts {
    width: 100%;
    padding-left: 32px;
  }
  .plan-check-opt {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }
  .plan-check-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .plan-check-foot button {
    width: 100%;
    min-height: 44px;
  }
  .prefill-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   E646(ui14) 未完成计划简写输入框与清空后灰字恢复条样式
   ========================================================================== */
.plan-check-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-check-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.plan-pending-note input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
  border-color: var(--amber-border);
}
.plan-pending-note input:focus {
  border-color: var(--blue-hover);
}
.prefill-bar-restore {
  border-style: dashed;
  background: #f7fafc;
  color: var(--muted);
}
@media (max-width: 760px) {
  .plan-check-top {
    flex-direction: column;
    gap: 8px;
  }
  .plan-check-opts {
    padding-left: 0;
  }
}

/* ==========================================================================
   E646(ui16) 正式 Word 文档逐页仿真预览覆盖层 + 固定底部「退出预览」栏
   ========================================================================== */
body.is-preview-open {
  overflow: hidden;
}
.doc-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  background: #dde5ee;
  color: var(--ink);
}
.doc-preview-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px 32px;
}
.doc-preview-sheet-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.doc-preview-loading,
.doc-preview-error,
.doc-preview-banner {
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.doc-preview-loading {
  margin-top: 12vh;
  background: #ffffff;
  color: var(--navy);
  border: 1px solid #cdd9e6;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  font-weight: 600;
}
.doc-preview-error {
  margin-top: 10vh;
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid var(--red-border);
  font-weight: 600;
}
.doc-preview-banner {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  text-align: left;
  font-size: 13px;
}
.doc-preview-page {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.doc-preview-page img {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.14);
}
.doc-preview-page figcaption {
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
}
.doc-preview-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
}
.doc-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.doc-preview-meta b {
  font-size: 14.5px;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-preview-meta span {
  font-size: 12.5px;
  color: var(--muted);
}
.doc-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.doc-preview-exit-btn {
  min-width: 124px;
  min-height: 40px;
  padding: 8px 22px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--cscec-blue, #0081cc);
  color: #ffffff;
  border: 1px solid var(--cscec-blue, #0081cc);
}
.doc-preview-exit-btn:hover {
  background: var(--blue-hover, #006bab);
  border-color: var(--blue-hover, #006bab);
}
@media (max-width: 760px) {
  .doc-preview-stage {
    padding: 12px 10px 20px;
  }
  .doc-preview-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .doc-preview-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  .doc-preview-actions button {
    flex: 1 1 auto;
    min-height: 44px;
  }
  .doc-preview-exit-btn {
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   E646(ui18) 招采清单等明细表「可手输下拉组合框」（Combobox）
   ========================================================================== */
.field .table-scroll td .table-combo {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 40px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #d4e0e8);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field .table-scroll td .table-combo:focus-within {
  border-color: var(--cscec-blue, #0081cc);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
}
.field .table-scroll td .table-combo.is-disabled {
  background: #f5f7f9;
  border-color: #e2e8ee;
}
.field .table-scroll td .table-combo-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 7px 36px 7px 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink, #172834);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
.field .table-scroll td .table-combo-input:disabled {
  color: var(--muted, #5c7080);
  background: transparent;
  cursor: not-allowed;
}
.field .table-scroll td .table-combo-trigger {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #3f637a;
  background: #f2f7fb;
  border-left: 1px solid #dce7ef;
  pointer-events: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.field .table-scroll td .table-combo:hover:not(.is-disabled) .table-combo-trigger {
  background: #e3f1fb;
  color: var(--cscec-blue, #0081cc);
}
.field .table-scroll td .table-combo.is-disabled .table-combo-trigger {
  background: #eef2f5;
  color: #9aaab6;
}
.field .table-scroll td select.table-combo-select {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  min-width: 32px;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.field .table-scroll td select.table-combo-select:disabled {
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .field .table-scroll td .table-combo {
    min-height: 44px;
  }
  .field .table-scroll td .table-combo-input {
    min-height: 42px;
    padding-right: 40px;
    font-size: 15px;
  }
  .field .table-scroll td .table-combo-trigger,
  .field .table-scroll td select.table-combo-select {
    width: 38px;
    min-width: 38px;
  }
}

/* ==========================================================================
   E646(ui19) 精简数值状态切换、第7章原周报同款7行财务表与预审追问闭环
   ========================================================================== */
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.field-label-row > label {
  margin-bottom: 0;
}
.num-quick-ops {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.num-chip,
.num-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  color: #6a8092;
  background: transparent;
  border: 1px solid #d9e4ec;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}
.num-chip:hover {
  color: var(--cscec-blue, #0081cc);
  background: #edf6fc;
  border-color: #a8d4f0;
}
.num-chip-clear {
  color: var(--cscec-blue, #0081cc);
  background: #ffffff;
  border-color: #b4d8ef;
}
.num-chip-clear:hover {
  background: #e5f3fc;
}
.num-status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 13.5px;
  color: #5b4b1a;
  background: #fffaf0;
  border: 1px dashed #e6c677;
  border-radius: 8px;
}
.num-status-pill.is-compact {
  min-height: 36px;
  margin-top: 4px;
  padding: 4px 9px;
  font-size: 13px;
}
.table-num-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.table-num-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 40px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #5b4b1a;
  background: #fffaf0;
  border: 1px dashed #e6c677;
  border-radius: 8px;
}

/* 第 7 章：原周报同款 7 行仿真财务大表 */
.finance-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
}
.finance-matrix-unit {
  font-size: 13px;
  color: var(--muted, #5c7080);
}
.finance-matrix-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.fin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: #214e6b;
  background: #eef6fc;
  border: 1px solid #cce3f3;
  border-radius: 999px;
}
.fin-badge.is-warn {
  color: #8a5100;
  background: #fff7e6;
  border-color: #f0cc82;
}
.finance-matrix-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #cddce7;
  border-radius: 10px;
  background: var(--surface, #ffffff);
}
.finance-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.finance-matrix tr + tr {
  border-top: 1px solid #e1ebf2;
}
.finance-matrix .fin-group-th {
  width: 82px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1f4f72;
  text-align: center;
  vertical-align: middle;
  background: #f2f7fb;
  border-right: 1px solid #d7e4ee;
  white-space: nowrap;
}
.finance-matrix .fin-cell {
  padding: 9px 11px;
  vertical-align: top;
  border-right: 1px solid #e6eef4;
  background: var(--surface, #ffffff);
}
.finance-matrix .fin-cell:last-child {
  border-right: 0;
}
.finance-matrix .fin-cell.is-computed {
  background: #f7fbfe;
}
.finance-matrix .fin-cell.is-highlighted {
  background: #fff9e8;
  box-shadow: inset 0 0 0 2px #f2a93b;
}
.fin-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 5px;
}
.fin-cell-head label,
.fin-computed-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #344d5f;
  margin: 0;
  line-height: 1.3;
}
.fin-num-input {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #172834);
  background: #ffffff;
  border: 1px solid #d2e0ea;
  border-radius: 7px;
}
.fin-num-input:focus {
  border-color: var(--cscec-blue, #0081cc);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
  outline: none;
}
.fin-num-input:disabled {
  background: #f5f7f9;
  color: #5c7080;
}
.fin-computed-val {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cscec-blue, #0081cc);
  background: #ebf5fd;
  border: 1px solid #cae3f5;
  border-radius: 7px;
}
.fin-prev-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: #6c8090;
}

/* 预审数据不一致追问互动区 */
.issue-mismatch-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dfcbb0;
}
.issue-mismatch-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.issue-explain-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.issue-explain-box textarea {
  width: 100%;
  padding: 7px 10px;
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid #c9dae6;
  border-radius: 7px;
  background: #ffffff;
}
.issue-explain-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .finance-matrix-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .finance-matrix,
  .finance-matrix tbody,
  .finance-matrix tr,
  .finance-matrix th,
  .finance-matrix td {
    display: block;
    width: 100%;
  }
  .finance-matrix tr {
    margin-bottom: 10px;
    border: 1px solid #d4e2ec;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
  }
  .finance-matrix tr + tr {
    border-top: 1px solid #d4e2ec;
  }
  .finance-matrix .fin-group-th {
    width: 100%;
    padding: 7px 12px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid #dce8f0;
  }
  .finance-matrix .fin-cell {
    border-right: 0;
    border-bottom: 1px solid #edf3f7;
    padding: 9px 12px;
  }
  .finance-matrix .fin-cell:last-child {
    border-bottom: 0;
  }
}

/* ==========================================================================
   E646(ui23) 「是否沿用上周内容？」正文同款清爽表格（第4/5/6章明细表、第7章财务表、常规对照表）
   ========================================================================== */
.carry-preview-list,
.carry-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: none;
  overflow: visible;
  margin: 10px 0 12px;
  padding: 0;
  background: transparent;
  border: 0;
}
.carry-checklist {
  margin: 0 0 12px;
}
.carry-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.carry-sub-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.carry-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.carry-sub-btn {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 12.5px;
}
.carry-table-scroll {
  width: 100%;
  max-height: 360px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid #c6dce9;
  border-radius: 10px;
  background: var(--surface, #ffffff);
  box-shadow: 0 1px 2px rgba(20, 55, 70, 0.03);
}
.carry-table-scroll.is-checklist {
  max-height: 400px;
}
.carry-data-table,
.carry-kv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink);
}
.carry-data-table {
  width: max-content;
  min-width: 100%;
}
.carry-data-table th,
.carry-data-table td,
.carry-kv-table th,
.carry-kv-table td {
  min-width: 0;
  padding: 7px 10px;
  border-right: 1px solid #e6eff5;
  border-bottom: 1px solid #e6eff5;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.carry-data-table th:last-child,
.carry-data-table td:last-child,
.carry-kv-table th:last-child,
.carry-kv-table td:last-child {
  border-right: 0;
}
.carry-data-table tbody tr:last-child td,
.carry-kv-table tbody tr:last-child td {
  border-bottom: 0;
}
.carry-data-table thead th,
.carry-kv-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf5fa;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid #cce0ec;
  white-space: nowrap;
}
.carry-data-table tbody tr:nth-child(even) td,
.carry-kv-table tbody tr:nth-child(even) td {
  background: #fafdff;
}
.carry-data-table tbody tr:hover td,
.carry-kv-table tbody tr:hover td {
  background: #f0f8fe;
}
.carry-data-table.is-selectable tbody tr,
.carry-kv-table.is-selectable tbody tr {
  cursor: pointer;
}
.carry-data-table.is-selectable tbody tr.is-checked td,
.carry-kv-table.is-selectable tbody tr.is-checked td {
  background: #e5f3fd;
}
.carry-data-table.is-selectable tbody tr.is-checked:hover td,
.carry-kv-table.is-selectable tbody tr.is-checked:hover td {
  background: #daf0fc;
}

/* 复选框列与序号列 */
.carry-col-check {
  width: 42px;
  min-width: 42px !important;
  max-width: 42px;
  padding: 7px 6px !important;
  text-align: center !important;
  vertical-align: middle !important;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface, #ffffff);
  box-shadow: 2px 0 6px -3px rgba(20, 55, 70, 0.12);
}
thead th.carry-col-check {
  z-index: 4 !important;
  background: #edf5fa !important;
}
tbody tr:nth-child(even) td.carry-col-check {
  background: #fafdff;
}
tbody tr:hover td.carry-col-check {
  background: #f0f8fe;
}
tbody tr.is-checked td.carry-col-check {
  background: #e5f3fd;
}
tbody tr.is-checked:hover td.carry-col-check {
  background: #daf0fc;
}
.carry-col-check input[type=checkbox] {
  margin: 0;
  width: 17px;
  height: 17px;
  vertical-align: middle;
}
.carry-col-seq {
  width: 46px;
  min-width: 46px !important;
  max-width: 52px;
  padding: 7px 6px !important;
  text-align: center !important;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap !important;
}

/* 明细表各业务列紧凑易读列宽 */
.carry-data-table th.is-num,
.carry-data-table td.is-num,
.carry-kv-table th.is-num,
.carry-kv-table td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.carry-data-table td[data-column="category"] {
  min-width: 88px;
  max-width: 136px;
}
.carry-data-table td[data-column="name"] {
  min-width: 140px;
  max-width: 240px;
  font-weight: 600;
  color: var(--navy);
}
.carry-data-table td[data-column="factory"] {
  min-width: 130px;
  max-width: 220px;
  font-weight: 600;
  color: var(--navy);
}
.carry-data-table td[data-column="unit"] {
  min-width: 64px;
  text-align: center;
  white-space: nowrap;
}
.carry-data-table td[data-column="lots"] {
  min-width: 66px;
}
.carry-data-table td[data-column="method"] {
  min-width: 86px;
  max-width: 132px;
}
.carry-data-table td[data-column="due"] {
  min-width: 100px;
  max-width: 168px;
}
.carry-data-table td[data-column="winner"],
.carry-data-table td[data-column="status"],
.carry-data-table td[data-column="scope"] {
  min-width: 110px;
  max-width: 220px;
}
.carry-kv-table .carry-kv-key {
  width: 170px;
  min-width: 120px;
  max-width: 220px;
  font-weight: 600;
  color: var(--navy);
}
.carry-kv-table .carry-kv-col {
  width: 130px;
  min-width: 96px;
  color: var(--ink-secondary);
}
.carry-kv-table .carry-kv-val {
  min-width: 140px;
}
.carry-cell-empty {
  color: #96a8b6 !important;
}
.carry-cell-cur {
  color: var(--amber);
  font-weight: 600;
  background: #fffaf0 !important;
}
.is-checked td.carry-cell-cur {
  background: #fdf3dc !important;
}

/* 第 7 章：沿用卡片内正文同款 7 行 x 3 格清爽财务表 */
.carry-finance-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #c6dce9;
  border-radius: 10px;
  background: var(--surface, #ffffff);
  box-shadow: 0 1px 2px rgba(20, 55, 70, 0.03);
}
.carry-finance-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.carry-finance-table tr + tr {
  border-top: 1px solid #e1ebf2;
}
.carry-finance-table .carry-fin-group {
  width: 80px;
  min-width: 74px;
  padding: 8px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1f4f72;
  text-align: center;
  vertical-align: middle;
  background: #edf5fa;
  border-right: 1px solid #cfe0ec;
  border-bottom: 0;
  white-space: nowrap;
}
.carry-finance-table .carry-fin-cell {
  padding: 8px 10px;
  vertical-align: top;
  border-right: 1px solid #e6eef4;
  border-bottom: 0;
  background: var(--surface, #ffffff);
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}
.carry-finance-table .carry-fin-cell:last-child {
  border-right: 0;
}
.carry-finance-table .carry-fin-cell.is-computed {
  background: #f5fafe;
}
.carry-finance-table .carry-fin-cell.is-period,
.carry-finance-table .carry-fin-cell.is-matched {
  background: #f7fafb;
}
.carry-finance-table .carry-fin-cell.is-selectable-cell {
  padding: 0;
}
.carry-finance-table .carry-fin-cell.is-selectable-cell:hover {
  background: #f0f8fe;
}
.carry-finance-table .carry-fin-cell.is-checked {
  background: #e5f3fd;
  box-shadow: inset 0 0 0 1.5px var(--blue);
}
.carry-fin-check-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 8px 10px;
  margin: 0;
  cursor: pointer;
  font-weight: 400;
}
.carry-fin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
}
.carry-fin-check-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.carry-fin-check-title input[type=checkbox] {
  margin: 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.carry-fin-label {
  font-size: 12px;
  font-weight: 600;
  color: #466071;
  line-height: 1.3;
}
.carry-fin-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e9f0f4;
  color: #627786;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.carry-fin-val {
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  line-height: 1.35;
}
.carry-fin-cell.is-computed .carry-fin-val {
  color: var(--cscec-blue, #0081cc);
}
.carry-fin-cell.is-period .carry-fin-val {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.carry-fin-cell.is-matched .carry-fin-val {
  color: var(--ink-secondary);
  font-weight: 600;
}
.carry-fin-cur {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--amber);
}

@media (max-width: 760px) {
  .carry-table-scroll {
    max-height: 320px;
  }
  .carry-table-scroll.is-checklist {
    max-height: 360px;
  }
  .carry-kv-table .carry-kv-key {
    width: 112px;
    min-width: 96px;
  }
  .carry-finance-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .carry-finance-table,
  .carry-finance-table tbody,
  .carry-finance-table tr,
  .carry-finance-table th,
  .carry-finance-table td {
    display: block;
    width: 100%;
  }
  .carry-finance-table tr {
    margin-bottom: 8px;
    border: 1px solid #cce0ec;
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff;
  }
  .carry-finance-table tr + tr {
    border-top: 1px solid #cce0ec;
  }
  .carry-finance-table .carry-fin-group {
    width: 100%;
    padding: 6px 12px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid #d7e7f0;
  }
  .carry-finance-table .carry-fin-cell {
    border-right: 0;
    border-bottom: 1px solid #edf3f7;
  }
  .carry-finance-table .carry-fin-cell:last-child {
    border-bottom: 0;
  }
  .carry-fin-check-label {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   E646(ui24) 「已核对的跨周沿用记录」表格化、再次沿用图标按钮与冲突确认框
   ========================================================================== */
.carry-existing-tip {
  margin: 8px 0 0;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: var(--amber);
  font-size: 12.5px;
  line-height: 1.5;
}
.carry-history-card {
  padding: 12px 15px;
}
.carry-history-card[open] > summary {
  margin-bottom: 10px;
}
.carry-history-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.carry-history-source {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.carry-col-status {
  width: 84px;
  min-width: 78px !important;
  text-align: center !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}
.carry-col-reapply {
  width: 92px;
  min-width: 88px !important;
  text-align: center !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  position: sticky;
  right: 0;
  z-index: 2;
  background: var(--surface, #ffffff);
  box-shadow: -2px 0 6px -3px rgba(20, 55, 70, 0.12);
}
thead th.carry-col-reapply {
  z-index: 4 !important;
  background: #edf5fa !important;
}
.carry-history-table tbody tr:nth-child(even) td.carry-col-reapply {
  background: #fafdff;
}
.carry-history-table tbody tr:hover td.carry-col-reapply {
  background: #f0f8fe;
}
.carry-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.carry-status-pill.is-adopt {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
}
.carry-status-pill.is-keep {
  background: #edf2f6;
  border: 1px solid #d4dfe7;
  color: var(--ink-secondary);
}
.carry-status-pill.is-mixed {
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}
.carry-status-pill.is-archive {
  background: #eef4f8;
  border: 1px solid #d6e3ec;
  color: var(--muted);
}
.carry-reapply-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.carry-reapply-btn,
.carry-reapply-mini,
.carry-reapply-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: none;
}
.carry-reapply-btn {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  border: 1px solid var(--blue-border);
}
.carry-reapply-btn:hover:not(:disabled) {
  background: #d6eefb;
  color: var(--navy);
  border-color: #8ccae8;
  box-shadow: none;
}
.carry-reapply-mini {
  min-height: 24px;
  padding: 1px 7px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  border: 1px solid var(--blue-border);
}
.carry-reapply-mini:hover:not(:disabled) {
  background: #d6eefb;
  color: var(--navy);
  box-shadow: none;
}
.carry-reapply-mini .carry-reapply-icon {
  width: 12px;
  height: 12px;
}
.carry-reapply-all-btn {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12.5px;
}
.carry-reapply-modal {
  max-width: 500px;
}
@media (max-width: 760px) {
  .carry-reapply-btn {
    min-height: 36px;
    padding: 5px 11px;
  }
  .carry-reapply-all-btn {
    width: 100%;
    min-height: 40px;
  }
}

/* ==========================================================================
   E646(ui25) 长明细表上下双置「增加一行」按钮与宽屏右侧固定操作列
   ========================================================================== */
.table-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.table-field-head > label {
  margin-bottom: 0;
}
.table-row-count {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.table-add-top-btn {
  min-height: 34px;
  padding: 5px 13px;
  font-size: 13px;
}
@media (min-width: 761px) {
  .field .table-scroll th[data-column="_ops"],
  .field .table-scroll td[data-column="_ops"] {
    position: sticky;
    right: 0;
    z-index: 2;
    box-shadow: -3px 0 8px -3px rgba(20, 55, 70, 0.1);
  }
  .field .table-scroll th[data-column="_ops"] {
    z-index: 3;
    background: #f4f7f9;
  }
  .field .table-scroll td[data-column="_ops"] {
    background: var(--surface);
  }
  .field .table-scroll tbody tr:hover td[data-column="_ops"] {
    background: #f8fbfc;
  }
}

/* ==========================================================================
   E646(ui26) 板块预审醒目红底、问题内容标红、表格精确标红单元格与整块红底警示
   ========================================================================== */
/* 1. 底部「板块预审」面板：有预审问题时醒目红色底色 + 红边 + 红徽章 */
.reference.precheck-panel.is-issue-alert {
  background: #fff0ef;
  border: 1.5px solid #e7908a;
  border-left: 4px solid #d12e26;
  color: #7f1d1d;
}
.precheck-panel.is-issue-alert h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #a61d17;
}
.precheck-alert-badge,
.block-issue-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #d12e26;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.block-issue-badge {
  margin-left: auto;
}
.precheck-panel.is-issue-alert > .muted,
.precheck-panel.is-issue-alert > .help {
  color: #8c3a35;
}
.precheck-panel details.has-row-issues {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #ffe6e4;
  border: 1px solid #eda09a;
}
.precheck-panel details.has-row-issues > summary {
  color: #a61d17;
  font-weight: 700;
}
.precheck-panel .precheck-issue-links {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.precheck-panel .precheck-issue-links li.is-issue-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7f6;
  border: 1px solid #f0aba6;
  border-left: 3px solid #d12e26;
  color: #8f1d18;
}
.precheck-panel .precheck-issue-links li.is-issue-item strong {
  display: block;
  color: #b42318;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.precheck-panel .precheck-issue-links li.is-issue-item p {
  margin: 4px 0 6px;
  color: #8f1d18;
  font-size: 13.5px;
  line-height: 1.6;
}
.precheck-panel .precheck-issue-links li.is-issue-item button.quiet {
  color: #b42318;
  background: #ffe5e3;
  border: 1px solid #f0a8a2;
  padding: 4px 11px;
  min-height: 30px;
  font-size: 12.5px;
}
.precheck-panel .precheck-issue-links li.is-issue-item button.quiet:hover:not(:disabled) {
  background: #ffd5d2;
  color: #8f1d18;
}
.precheck-panel .precheck-issue-links li.is-exempted {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  color: var(--green);
}

/* 2. 正文内联预审问题卡片（field-review）：统一醒目红底红字 */
.field-review,
.issues article.field-review {
  background: #fff0ef;
  border: 1.5px solid #eb9892;
  border-left: 4px solid #d12e26;
  color: #8f1d18;
}
.field-review b,
.issues article.field-review b {
  color: #b42318;
  font-weight: 700;
}
.field-review p,
.issues article.field-review p {
  color: #8f1d18;
}
.field-review .issue-mismatch-actions {
  border-top-color: #f0b3ae;
}
.field-review.is-exempted,
.issues article.field-review.is-exempted {
  background: var(--green-soft);
  border-color: var(--green-border);
  border-left-color: var(--green);
  color: var(--green);
}
.field-review.is-exempted b,
.field-review.is-exempted p {
  color: var(--green);
}

/* 3. 不能精确到单元格的表格级或板块级问题：整个板块红色底色 */
.editor > form > .field-group.has-block-issue,
.editor > form > .field-group.has-block-issue:nth-of-type(even) {
  background: #ffefee;
  border-color: #e68d87;
  box-shadow: 0 2px 10px rgba(209, 46, 38, 0.08);
}
.editor > form > .field-group.has-block-issue .group-title,
.editor > form > .field-group.has-block-issue .group-toggle {
  color: #a61d17;
  border-bottom-color: rgba(209, 46, 38, 0.24);
}
.editor > form > .field-group.has-block-issue .table-scroll {
  border-color: #e48d87;
}
.editor > form > .field-group.has-block-issue .table-scroll th {
  background: #ffe3e1;
  color: #9b1c15;
}

/* 4. 有问题的普通单栏字段（文本框/输入框/下拉框/表格区）：醒目红底红框 + 红字 */
.field.has-field-issue {
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffe8e6;
  border: 1.5px solid #e68680;
}
.field.has-field-issue > label,
.field.has-field-issue .field-label-row > label,
.field.has-field-issue .table-field-head > label {
  color: #a61d17;
  font-weight: 700;
}
.field.has-field-issue > textarea,
.field.has-field-issue > input:not([type=checkbox]),
.field.has-field-issue > select,
.field.has-field-issue .field-label-row ~ textarea,
.field.has-field-issue .field-label-row ~ input:not([type=checkbox]),
.field.has-field-issue .field-label-row ~ select {
  border-color: #d93025;
  background: #fff8f7;
  color: #9b1c15;
}
.field.has-field-issue > .table-scroll {
  border-color: #d93025;
}

/* 5. 表格问题精确到单元格时：精准标红该单元格（含明细表单元格 & 第 7 章财务矩阵单元格） */
.field .table-scroll tbody tr td.has-cell-issue,
.field .table-scroll tbody tr:hover td.has-cell-issue,
.field .table-scroll tbody tr td.has-cell-issue:first-child,
.field .table-scroll tbody tr:hover td.has-cell-issue:first-child {
  background: #ffe2e0;
  box-shadow: inset 0 0 0 2px #d93025;
}
.field .table-scroll tbody tr td.has-cell-issue input,
.field .table-scroll tbody tr td.has-cell-issue textarea,
.field .table-scroll tbody tr td.has-cell-issue select,
.field .table-scroll tbody tr td.has-cell-issue .table-combo {
  border-color: #d93025;
  background: #fff7f6;
  color: #9b1c15;
}
.field .table-scroll tbody tr td.has-cell-issue .table-combo-input {
  color: #9b1c15;
}
/* 精确到整行但无具体列时：标红该整行 */
.field .table-scroll tbody tr.has-row-issue td,
.field .table-scroll tbody tr.has-row-issue:hover td,
.field .table-scroll tbody tr.has-row-issue td:first-child,
.field .table-scroll tbody tr.has-row-issue:hover td:first-child {
  background: #ffe8e6;
}
/* 第 7 章财务表精确单元格标红 */
.finance-matrix .fin-cell.has-cell-issue {
  background: #ffe2e0;
  box-shadow: inset 0 0 0 2px #d93025;
}
.finance-matrix .fin-cell.has-cell-issue .fin-cell-head label {
  color: #a61d17;
  font-weight: 700;
}
.finance-matrix .fin-cell.has-cell-issue .fin-num-input {
  border-color: #d93025;
  background: #fff7f6;
  color: #9b1c15;
}
/* 跳转定位聚焦高亮（红系醒目外环） */
.is-highlighted {
  outline: 3px solid rgba(209, 46, 38, 0.58);
}
.finance-matrix .fin-cell.is-highlighted {
  background: #ffe2e0;
  box-shadow: inset 0 0 0 2.5px #d93025;
}
.field .table-scroll tbody tr td.is-highlighted {
  box-shadow: inset 0 0 0 2.5px #d93025;
}
.group-issue-count {
  background: #ffe2e0;
  color: #b42318;
}

/* ==========================================================================
   E646(ui28) 双端章节状态色标与手机端全量 UI/体验重构（桌面端零回退）
   ========================================================================== */

/* 1. 通用小图标、勾选框自然分行、折叠态去悬空线、表格滑动穿透（双端受益） */
.btn-mini-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.checkbox-text > span {
  display: block;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
}
.checkbox-text > .help {
  display: block;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}
.editor > form > .field-group:has(.group-toggle[aria-expanded=false]) .group-toggle {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.resume-blocks-brief {
  display: none;
}

/* 根治手机端表格内多行文本框吞掉左右滑动手势的问题 */
.field .table-scroll {
  touch-action: pan-x pan-y;
  overscroll-behavior-x: auto;
}
.field .table-scroll td textarea.table-text-input,
.field .table-scroll td input,
.field .table-scroll td .table-combo-input {
  overscroll-behavior: auto;
  touch-action: pan-x pan-y;
}

/* 2. 左侧边栏章节与子板块：大白话状态 + 清晰语义底色（电脑端 + 手机端统一） */
.chapter-button,
.chapter-group > summary {
  border: 1px solid transparent;
  margin-bottom: 5px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.chapter-button > span:nth-child(2),
.chapter-group > summary > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.chapter-status-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0 !important;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 650 !important;
  line-height: 1.45;
  border: 1px solid transparent;
}

/* 五档语义底色：红(预审问题/退回) · 暖黄(已填待预审) · 蓝(已填完待审核) · 绿(已审核) · 淡灰(未填写) */
.chapter-button.is-tone-danger,
.chapter-group.is-tone-danger > summary {
  background: #fff1f0;
  border-color: #f3c4c0;
}
.chapter-button.is-tone-danger > span:first-child,
.chapter-group.is-tone-danger > summary > span:first-child {
  background: #ffd9d6;
  color: #b42318;
}
.chapter-status-tag.is-tone-danger,
.subblock-tag.is-tone-danger {
  background: #fee2e0;
  border-color: #f4aca6;
  color: #b42318 !important;
}

.chapter-button.is-tone-warn,
.chapter-group.is-tone-warn > summary {
  background: #fff8ea;
  border-color: #f0dab2;
}
.chapter-button.is-tone-warn > span:first-child,
.chapter-group.is-tone-warn > summary > span:first-child {
  background: #fae4b8;
  color: #8a560e;
}
.chapter-status-tag.is-tone-warn,
.subblock-tag.is-tone-warn {
  background: #ffefd0;
  border-color: #ebd09d;
  color: #8a560e !important;
}

.chapter-button.is-tone-info,
.chapter-group.is-tone-info > summary {
  background: #edf6fc;
  border-color: #c8e2f2;
}
.chapter-button.is-tone-info > span:first-child,
.chapter-group.is-tone-info > summary > span:first-child {
  background: #d1eaf8;
  color: #006a96;
}
.chapter-status-tag.is-tone-info,
.subblock-tag.is-tone-info {
  background: #ddf0fb;
  border-color: #b5dcf2;
  color: #006a96 !important;
}

.chapter-button.is-tone-success,
.chapter-group.is-tone-success > summary {
  background: #ebf7f1;
  border-color: #c1e4d4;
}
.chapter-button.is-tone-success > span:first-child,
.chapter-group.is-tone-success > summary > span:first-child {
  background: #c7ecdc;
  color: #14745a;
}
.chapter-status-tag.is-tone-success,
.subblock-tag.is-tone-success {
  background: #d9f3e7;
  border-color: #aedcc8;
  color: #14745a !important;
}

.chapter-button.is-tone-muted,
.chapter-group.is-tone-muted > summary {
  background: rgba(255, 255, 255, 0.45);
  border-color: #e2eaef;
}
.chapter-status-tag.is-tone-muted,
.subblock-tag.is-tone-muted {
  background: #edf2f5;
  border-color: #dce4ea;
  color: #6c808f !important;
}

/* 选中态保持中建蓝清晰高亮外环，同时保留语义标签辨识度 */
.chapter-button.active {
  background: #dff1fc !important;
  border-color: #6bb9e5 !important;
  color: var(--navy-deep) !important;
  box-shadow: inset 3px 0 0 var(--cscec-blue);
}
.chapter-button.active.is-tone-danger {
  background: #ffe8e6 !important;
  border-color: #e4847d !important;
  box-shadow: inset 3px 0 0 #d12e26;
}
.chapter-button.active.is-tone-success {
  background: #dcf3e8 !important;
  border-color: #6ec4a3 !important;
  box-shadow: inset 3px 0 0 #14745a;
}

/* 第 8/9 章展开子板块：左右排列（名称 + 状态色标） */
.chapter-group button.subblock-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 9px 7px 14px;
  margin: 3px 0 3px 14px;
  width: calc(100% - 14px);
  border: 1px solid transparent;
  border-left: 2px solid #cbd9e2;
  border-radius: 7px;
}
.chapter-group button.subblock-btn.is-tone-danger {
  background: #fff3f2;
  border-left-color: #d93025;
}
.chapter-group button.subblock-btn.is-tone-warn {
  background: #fffaf0;
  border-left-color: #d4942a;
}
.chapter-group button.subblock-btn.is-tone-info {
  background: #f2f9fd;
  border-left-color: #0081cc;
}
.chapter-group button.subblock-btn.is-tone-success {
  background: #eff9f4;
  border-left-color: #14745a;
}
.chapter-group button.subblock-btn.active {
  background: #dff1fc !important;
  border-color: #7cc2e8;
  border-left: 3px solid var(--cscec-blue);
  color: var(--navy-deep);
  font-weight: 650;
}
.subblock-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subblock-tag {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* 3. 本周报送与版本：草稿与正式版预览、Word/PDF 下载按钮清晰化（双端均美观） */
.actions-preview-btn {
  background: var(--p-blue-050);
  color: var(--blue-strong);
  border-color: var(--blue-border);
  font-weight: 650;
}
.actions-preview-btn:hover:not(:disabled) {
  background: var(--blue-soft);
  border-color: #8ccae8;
}
.version-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.version-action-links .version-view-btn {
  min-height: 34px;
  padding: 5px 11px;
  font-size: 12.5px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  border-color: var(--blue-border);
}
.version-dl-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.version-dl-link:hover {
  background: var(--p-blue-050);
  border-color: var(--blue-border);
  color: var(--blue-strong);
  text-decoration: none;
}

/* 4. 语音输入与 AI 整理本栏基础增强（桌面端克制协调） */
.field-voice > button.voice-record-btn.secondary {
  background: #edf7fd;
  border-color: #b4daf0;
  color: var(--blue-strong);
}
.field-voice > button.voice-record-btn.secondary:hover:not(:disabled) {
  background: #ddf0fb;
  border-color: #7cc0e6;
}
.field-voice > button.voice-record-btn.is-recording {
  background: #fff1f0;
  border-color: #b42318;
  color: #9a2119;
}
.voice-record-btn.is-recording::before {
  content: "";
  width: .7em;
  height: .7em;
  border-radius: 50%;
  background: #c52119;
  animation: recording-pulse 1.5s ease-in-out infinite alternate;
}
@keyframes recording-pulse { to { opacity: .48; } }
@media (prefers-reduced-motion: reduce) {
  .voice-record-btn.is-recording::before { animation: none; }
}
.field-voice > button.voice-ai-btn {
  border: 1px solid #cfe0ec;
  background: var(--surface);
  color: var(--blue-strong);
}
.field-voice > button.voice-ai-btn:hover:not(:disabled) {
  background: var(--blue-soft);
  border-color: #93cae8;
}

/* ==========================================================================
   手机竖屏全面重构（<= 760px，严格隔离不影响桌面端）
   ========================================================================== */
@media (max-width: 760px) {
  /* A. 登录页 & 首次改密页：去冗余宣传，一屏居中装完零滚动 */
  .login {
    padding: 12px 12px 20px;
  }
  .login-intro {
    padding: 16px 18px 14px;
    border-radius: 16px 16px 0 0;
  }
  .login-intro .brand-kicker {
    margin-bottom: 8px;
    padding: 3px 9px;
    font-size: 11.5px;
  }
  .login-intro .wordmark {
    font-size: 17px;
  }
  .login-intro h1 {
    margin: 6px 0 0;
    font-size: 20px;
    line-height: 1.3;
  }
  .login-intro h1 br {
    display: none;
  }
  .login-intro > p,
  .login-highlights {
    display: none;
  }
  .login-card {
    padding: 18px 18px 20px;
    border-radius: 0 0 16px 16px;
  }
  .login-card h2 {
    font-size: 19px;
    margin-bottom: 4px;
  }
  .login-card > .muted {
    margin-bottom: 8px;
    font-size: 13px;
  }
  .login-card .pwd-rule-box {
    margin: 6px 0 2px;
    padding: 8px 10px;
    font-size: 12.5px;
    line-height: 1.48;
  }
  .login-card > label {
    margin-top: 11px;
    font-size: 13.5px;
  }
  .login-card > label input {
    margin-top: 5px;
    min-height: 42px;
  }
  .login-card > button {
    min-height: 44px;
    margin-top: 14px;
  }

  /* B. 手机顶栏瘦身 + 「历史周报」「退出」显眼带框 + 周次行水平齐平含「预览」黄金按钮 */
  .mobile-brand {
    min-height: 48px;
    padding: 4px 150px 4px 6px;
    gap: 4px;
  }
  .mobile-brand .wordmark {
    font-size: 16.5px;
  }
  .app-header .history-entry {
    min-height: 34px;
    padding: 4px 10px;
    margin-right: 6px;
    border-radius: 8px;
    border: 1px solid #b5dcf2;
    background: #eaf6fd;
    color: var(--blue-strong);
    font-size: 12.5px;
    font-weight: 650;
  }
  .switch-role {
    justify-self: end;
    width: auto;
    min-height: 34px;
    padding: 4px 10px;
    margin-right: 10px;
    border-radius: 8px;
    border: 1px solid #e4c7c4;
    background: #fff5f4;
    color: #a6342c;
    font-size: 12.5px;
    font-weight: 650;
  }
  .header-project {
    padding: 6px 6px 6px 10px;
  }
  .header-project select {
    min-height: 38px;
    height: 38px;
    padding: 5px 10px;
    font-size: 14.5px;
  }
  .header-right .identity {
    max-width: 116px;
    margin: 0 10px 0 2px;
    padding: 5px 8px;
    font-size: 11.5px;
  }
  .header-period {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    min-height: 44px;
  }
  .header-period b {
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
  }
  .header-period .period-details {
    flex: 1;
    min-width: 0;
  }
  .header-period .period-details summary {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 3px 7px;
    font-size: 12px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-secondary);
    white-space: nowrap;
  }
  .header-period .period-details[open] {
    position: relative;
  }
  .header-period .period-details[open] span {
    font-size: 11.5px;
    white-space: normal;
  }
  .header-period .header-week-btn {
    margin-left: auto;
    flex-shrink: 0;
    min-height: 32px;
    padding: 4px 9px;
    font-size: 12px;
    border-radius: 7px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-secondary);
    white-space: nowrap;
  }
  .header-period .mobile-preview-btn {
    flex-shrink: 0;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 7px;
    border: 1px solid var(--cscec-blue);
    background: var(--cscec-blue);
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 129, 204, 0.22);
  }
  .header-period .mobile-preview-btn span {
    display: inline;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
  }
  .header-period .mobile-preview-btn:disabled {
    opacity: 0.45;
  }

  /* 左边栏抽屉内「预览 / 导出周报」快捷大按钮与工具区垂直排布 */
  .sidebar-mobile-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .sidebar-preview-btn {
    width: 100%;
    justify-content: center !important;
    min-height: 44px !important;
    margin-bottom: 2px;
    background: var(--cscec-blue) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 9px !important;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 129, 204, 0.2) !important;
  }

  /* C. 手机吸顶章节条：砍掉原生下拉框，极简 1 行（左箭头 + 点按开目录抽屉 + 右箭头） */
  .mobile-chapter-selector {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin: -4px -12px 10px;
    padding: 6px 10px;
    min-height: 54px;
  }
  .chapter-nav-arrow {
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    min-height: 42px !important;
    padding: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 700;
    border-radius: 9px;
    color: var(--navy);
  }
  .chapter-picker-trigger {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px !important;
    padding: 5px 8px 5px 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border-radius: 9px;
    border: 1.5px solid #96c8e4;
    background: #ffffff;
    color: var(--navy-deep);
    box-shadow: 0 1px 3px rgba(20, 55, 70, 0.06);
    text-align: left;
  }
  .chapter-picker-trigger:active {
    background: var(--p-blue-050);
  }
  .chapter-picker-main {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
  }
  .chapter-picker-idx {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--blue-soft);
    color: var(--blue-strong);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .chapter-picker-title {
    min-width: 0;
    flex: 1;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--navy-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chapter-picker-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 7px;
    background: #eaf5fc;
    border: 1px solid #c2e1f3;
    color: var(--blue-strong);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
  }
  .chapter-picker-badge .icon {
    width: 14px;
    height: 14px;
  }
  .field { scroll-margin-top: 76px; }
  .is-highlighted { scroll-margin-top: 76px; }

  /* D. 选周首页瘦身 + 按钮全宽统一对齐 + 隐藏22板块长名单 */
  .report-picker {
    padding: 14px 12px;
    margin-bottom: 12px;
  }
  .overview {
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
  .overview p {
    font-size: 12.5px;
    margin-top: 2px;
  }
  .new-report {
    padding: 8px 10px;
    gap: 8px;
  }
  .new-report button {
    min-height: 42px;
  }
  .resume-entry {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    margin-bottom: 12px;
  }
  .resume-entry .resume-open-btn {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }
  .resume-entry .help {
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.5;
  }
  .resume-blocks-full {
    display: none;
  }
  .resume-blocks-brief {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #dff0fb;
    color: var(--blue-strong);
    font-weight: 600;
  }
  .resume-entry .resume-notices-btn {
    width: 100%;
    min-height: 40px;
    background: var(--surface);
    border: 1px solid var(--blue-border);
    color: var(--blue-strong);
  }
  .report-list {
    gap: 9px;
  }
  .report-list button {
    padding: 12px 14px;
    gap: 3px;
  }

  /* E. 协同条瘦身 + 折叠辅助条更紧凑 + 第1章落单吨位框拉通整行 */
  .collab-bar {
    margin-bottom: 8px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
  }
  .reference {
    margin: 8px 0 10px;
    padding: 9px 11px;
    font-size: 13.5px;
  }
  .reference summary {
    min-height: 32px;
    display: flex;
    align-items: center;
  }
  .fields-grid > .field[data-field="contract_tonnage"] {
    grid-column: 1 / -1;
  }

  /* F. 语音输入 & AI 整理本栏：1:1 撑满整行的显眼带图标大按钮 */
  .field-voice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }
  .field-voice > button.voice-record-btn,
  .field-voice > button.voice-ai-btn {
    flex: 1 1 0;
    min-width: 124px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 650;
    border-radius: 9px;
    justify-content: center;
  }
  .field-voice > button.voice-record-btn.secondary {
    background: #e6f4fd;
    border: 1.5px solid #6cb8e6;
    color: #005f8a;
  }
  .field-voice > button.voice-ai-btn {
    background: #ffffff;
    border: 1.5px solid #b4d5e8;
    color: var(--navy);
  }

  /* G. 第 4/5/6 章明细表：醒目电脑端提示条 + 收窄手机列宽 + 表底全宽虚线添加条 */
  .mobile-table-tip {
    display: block !important;
    margin: 6px 0 8px;
    padding: 8px 11px;
    border-radius: 8px;
    background: #fff7e6;
    border: 1px solid #ecc984;
    border-left: 3.5px solid #d48806;
    color: #7c4a03;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
  }
  .field .table-scroll {
    background:
      linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 100%),
      radial-gradient(farthest-side at 100% 50%, rgba(15, 47, 67, 0.14), rgba(15, 47, 67, 0)) right center / 14px 100% no-repeat scroll,
      var(--surface);
  }
  .field .table-scroll th,
  .field .table-scroll td {
    padding: 8px 8px;
  }
  .field .table-scroll th[data-column="category"],
  .field .table-scroll td[data-column="category"],
  .field .table-scroll th[data-column="method"],
  .field .table-scroll td[data-column="method"] {
    min-width: 126px;
    width: 130px;
  }
  .field .table-scroll th[data-column="factory"],
  .field .table-scroll td[data-column="factory"],
  .field .table-scroll th[data-column="winner"],
  .field .table-scroll td[data-column="winner"],
  .field .table-scroll td[data-column="name"]:has(textarea) {
    min-width: 175px;
    width: 185px;
  }
  .field .table-scroll th[data-column="status"],
  .field .table-scroll td[data-column="status"],
  .field .table-scroll th[data-column="scope"],
  .field .table-scroll td[data-column="scope"] {
    min-width: 185px;
    width: 195px;
  }
  .field .table-scroll th[data-column="due"],
  .field .table-scroll td[data-column="due"] {
    min-width: 140px;
    width: 148px;
  }
  .field .table-scroll th[data-column="total"],
  .field .table-scroll td[data-column="total"],
  .field .table-scroll th[data-column="made_week"],
  .field .table-scroll td[data-column="made_week"],
  .field .table-scroll th[data-column="made_total"],
  .field .table-scroll td[data-column="made_total"],
  .field .table-scroll th[data-column="in_progress"],
  .field .table-scroll td[data-column="in_progress"],
  .field .table-scroll th[data-column="shipped_week"],
  .field .table-scroll td[data-column="shipped_week"],
  .field .table-scroll th[data-column="shipped_total"],
  .field .table-scroll td[data-column="shipped_total"],
  .field .table-scroll th[data-column="week"],
  .field .table-scroll td[data-column="week"],
  .field .table-scroll th[data-column="denominator"],
  .field .table-scroll td[data-column="denominator"],
  .field .table-scroll th[data-column="lots"],
  .field .table-scroll td[data-column="lots"] {
    min-width: 108px;
    width: 112px;
  }
  .table-add-bottom-btn {
    width: 100%;
    min-height: 44px;
    margin-top: 2px;
    border: 1.5px dashed #7cc0e6;
    background: #f1f9fe;
    color: var(--blue-strong);
    font-weight: 650;
  }

  /* H. 灰字预览条按钮对称带框 + 第 8 章上周计划核对卡紧凑化 + 板块预审按钮全宽 */
  .prefill-bar-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .prefill-bar-actions button {
    flex: 1;
    min-height: 36px;
    font-size: 13px;
  }
  .prefill-bar-actions .prefill-clear-btn {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--ink-secondary);
  }
  .plan-checklist-card {
    padding: 12px;
  }
  .plan-check-head {
    gap: 6px;
    margin-bottom: 8px;
  }
  .plan-check-head .help {
    font-size: 12px;
    line-height: 1.45;
  }
  .plan-check-tools {
    width: 100%;
    gap: 8px;
  }
  .plan-check-tools button {
    flex: 1;
    min-height: 36px;
    border: 1px solid var(--blue-border);
    background: var(--surface);
    color: var(--blue-strong);
    border-radius: 7px;
  }
  .plan-check-row {
    padding: 8px 10px;
  }
  .precheck-panel > button.secondary {
    width: 100%;
    min-height: 44px;
    margin-top: 4px;
    background: var(--surface);
    border-color: #96c8e4;
    color: var(--blue-strong);
  }

  /* I. 底部固定栏：放大预审状态胶囊 + 主次清晰 + 3 按钮不折行 */
  .form-footer {
    padding: 7px max(10px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .form-footer .issue-buttons {
    margin-bottom: 6px;
  }
  .precheck-status-btn {
    min-height: 34px;
    padding: 4px 12px;
    font-size: 12.5px;
  }
  .precheck-status-btn.is-issues {
    background: #d12e26;
    border-color: #b42318;
    color: #ffffff;
  }
  .footer-buttons {
    flex-wrap: nowrap;
    gap: 7px;
  }
  .footer-buttons button {
    min-height: 46px;
    font-size: 14px;
    padding-inline: 6px;
    white-space: nowrap;
  }
  .footer-buttons:has(.mobile-whole-review) button {
    font-size: 13px;
    padding-inline: 5px;
  }

  /* J. 经理确认页：收紧留白，显眼带框次按钮 */
  .manager-summary {
    padding: 12px;
    gap: 8px;
    margin-bottom: 12px;
  }
  .manager-summary > h1 {
    font-size: 18px;
  }
  .manager-scope-card,
  .manager-facts {
    padding: 10px 12px;
    gap: 4px;
  }
  .manager-facts .quiet,
  .manager-summary > button.quiet {
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--blue-border);
    background: var(--surface);
    color: var(--blue-strong);
  }

  /* K. 配置后台（configuration.html）：取消顶栏吸顶挡屏 + 2x2 整齐操作网格 + 时区不歪 */
  .cfg-topbar {
    position: static;
  }
  .cfg-card-head .cfg-btn {
    width: 100%;
  }
  .cfg-table tbody td {
    align-items: center;
  }
  .cfg-table tbody td[data-label*="类型"],
  .cfg-table tbody td[data-label*="时区"],
  .cfg-table tbody td[data-label*="账号"] {
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
  }
  .cfg-table tbody td[data-label*="类型"]::before,
  .cfg-table tbody td[data-label*="时区"]::before,
  .cfg-table tbody td[data-label*="账号"]::before {
    align-self: flex-start;
  }
  .cfg-table tbody td.cfg-col-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cfg-table tbody td.cfg-col-actions .cfg-ops {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .cfg-table tbody td.cfg-col-actions .cfg-ops button {
    width: 100%;
    min-height: 40px;
  }

  /* L. 版本卡片操作按钮在手机端均分易点 */
  .version-action-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .version-action-links > * {
    width: 100%;
    min-height: 38px;
    padding: 5px 6px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .mobile-brand {
    padding-right: 136px;
  }
  .app-header .history-entry,
  .switch-role {
    padding: 4px 7px;
    font-size: 12px;
  }
  .chapter-picker-title {
    font-size: 13.5px;
  }
  .chapter-picker-badge {
    padding: 3px 5px;
    font-size: 11.5px;
  }
  .header-period {
    gap: 4px;
    padding: 6px 8px;
  }
  .header-period b {
    padding: 3px 6px;
    font-size: 11.5px;
  }
  .header-period .period-details summary,
  .header-period .header-week-btn,
  .header-period .mobile-preview-btn {
    padding: 3px 7px;
    font-size: 11.5px;
  }
}
@media (max-width: 360px) {
  .mobile-chapter-selector .current-block-name {
    display: none;
  }
}

/* ==========================================================================
   E646(ui29) 系统管理员后台「项目成员与权限清单」批量设置权限
   ========================================================================== */
.cfg-btn-batch {
  border-color: #96c8e4;
  background: #edf7fd;
  color: var(--blue-strong);
  font-weight: 650;
}
.cfg-btn-batch:hover:not(:disabled) {
  background: #dceffb;
  border-color: #6bb5e0;
  color: var(--navy);
}
.cfg-btn-danger {
  background: #d12e26;
  color: #ffffff;
  border-color: #b42318;
}
.cfg-btn-danger:hover:not(:disabled) {
  background: #b42318;
}
.cfg-batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #e9f5fc;
  border: 1px solid #b6dcf0;
}
.cfg-batch-count {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
}
.cfg-col-check {
  width: 44px;
  min-width: 44px;
  text-align: center !important;
  vertical-align: middle !important;
}
.cfg-table th.cfg-col-check input[type="checkbox"],
.cfg-table td.cfg-col-check input[type="checkbox"] {
  width: 17px !important;
  min-width: 17px !important;
  max-width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  padding: 0 !important;
  margin: 0 !important;
  vertical-align: middle;
  cursor: pointer;
  accent-color: var(--blue-hover);
}
.cfg-table tbody tr.cfg-row-selected td {
  background: #edf7fd;
}
.cfg-batch-pickers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cfg-batch-picker-grid {
  max-height: 185px;
}
.cfg-batch-blocks-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #d5e4ee;
}
.cfg-batch-summary {
  margin: 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: #eef7fa;
  border: 1px solid #cce2ed;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .cfg-head-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .cfg-head-right select,
  .cfg-head-right .cfg-select-inline,
  .cfg-head-right .cfg-btn {
    width: 100% !important;
    max-width: none !important;
  }
  .cfg-batch-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .cfg-batch-bar .cfg-ops {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .cfg-batch-bar .cfg-ops button {
    width: 100%;
    padding: 6px 4px;
    font-size: 12.5px;
  }
  .cfg-table tbody td.cfg-col-check {
    width: 100%;
    text-align: right !important;
  }
  .cfg-table tbody td.cfg-col-check input[type="checkbox"] {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
  }
  #batch-grant-modal .cfg-box-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #batch-grant-modal .cfg-box-head .cfg-ops {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  #batch-grant-modal .cfg-box-head .cfg-ops .cfg-btn-sm {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
  }
}

/* ==========================================================================
   E646(ui30) 晴空工程 · 分段胶囊按钮 & 全站自定义下拉选择器（彻底替换丑原生下拉）
   ========================================================================== */
.upload-class-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 6px;
}
.upload-class-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}
.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.choice-pills-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.choice-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 78px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1.5px solid #d2e2ec;
  border-radius: 10px;
  background: #f6fafc;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.choice-pill:hover:not(:disabled) {
  background: #ebf5fb;
  border-color: #9dc8e2;
  color: var(--navy);
}
.choice-pill.is-selected {
  background: #e6f4fc;
  border-color: var(--blue-hover);
  color: var(--blue-strong);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(0, 129, 204, 0.13);
}
.choice-pill:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.choice-pills-cards .choice-pill {
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  text-align: center;
}
.choice-pills-cards .choice-pill b {
  font-size: 14px;
  font-weight: 650;
  color: inherit;
  line-height: 1.25;
}
.choice-pills-cards .choice-pill small {
  font-size: 11.5px;
  font-weight: 450;
  color: var(--muted);
  line-height: 1.2;
}
.choice-pills-cards .choice-pill.is-selected small {
  color: var(--blue-strong);
}

/* 原生 <select> 视觉隐藏（保留 DOM 与双向事件绑定） */
select.ns-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}

/* 自定义触发按钮（统一晴空表单视觉，覆盖全局 button 样式） */
button.ns-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 1px 2px rgba(20, 55, 70, 0.03);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
button.ns-trigger:hover:not(:disabled) {
  border-color: #88bcdb;
  background: #fafdff;
}
button.ns-trigger:focus-visible,
button.ns-trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
}
button.ns-trigger.is-placeholder {
  color: var(--muted);
}
button.ns-trigger.is-disabled,
button.ns-trigger:disabled {
  background: #f3f6f8;
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}
.ns-trigger-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.15s ease;
}
button.ns-trigger[aria-expanded="true"] .ns-chevron,
button.ns-combo-btn[aria-expanded="true"] .ns-chevron {
  transform: rotate(180deg);
  color: var(--blue-hover);
}

/* 上下文场景微调：顶栏项目 / 选周次 / 表格内 / 后台筛选 */
.header-project button.ns-trigger-project {
  width: 230px;
  max-width: 260px;
  min-height: 38px;
  height: 38px;
  border-color: transparent;
  background: #f2f6f8;
  color: var(--navy);
  font-size: 14px;
  font-weight: 650;
  box-shadow: none;
}
.header-project button.ns-trigger-project:hover:not(:disabled) {
  background: #e7f1f6;
  border-color: #c8dfec;
}
.new-report button.ns-trigger-compact {
  width: auto;
  min-width: 84px;
  min-height: 36px;
  height: 36px;
  padding: 5px 10px;
  margin: 0 4px;
  vertical-align: middle;
}
.table-scroll button.ns-trigger-table {
  min-height: 36px;
  padding: 5px 9px;
  font-size: 13.5px;
  border-radius: 7px;
  box-shadow: none;
}
button.ns-trigger-inline {
  width: auto;
  min-width: 170px;
  min-height: 38px;
  height: 38px;
}
.cfg-field button.ns-trigger {
  min-height: 40px;
}

/* 第 4 章招采可手输组合框右侧触发按钮 */
.table-combo.ns-combo-enhanced .table-combo-trigger {
  display: none;
}
button.ns-combo-btn {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid #e1ebf0;
  border-radius: 0 7px 7px 0;
  background: #f4f9fc;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
}
button.ns-combo-btn:hover:not(:disabled) {
  background: #e4f2fb;
  color: var(--blue-strong);
}
button.ns-combo-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 弹层遮罩与选择面板（高于后台 Modal，防裁切） */
html.ns-scroll-lock {
  overflow: hidden;
}
.ns-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
}
.ns-overlay[hidden] {
  display: none !important;
}
.ns-overlay.is-desktop {
  background: transparent;
}
.ns-overlay.is-desktop .ns-panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #d1e3ee;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 45, 65, 0.14), 0 2px 6px rgba(15, 45, 65, 0.06);
  overflow: hidden;
  animation: nsPopIn 0.13s ease-out;
}
.ns-overlay.is-desktop .ns-sheet-handle,
.ns-overlay.is-desktop .ns-panel-head {
  display: none;
}

.ns-overlay.is-mobile {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(12, 34, 48, 0.44);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.ns-overlay.is-mobile .ns-panel {
  width: 100%;
  max-height: 74dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 32px rgba(10, 32, 46, 0.22);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
  animation: nsSheetUp 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.ns-sheet-handle {
  width: 38px;
  height: 4px;
  margin: 10px auto 2px;
  border-radius: 999px;
  background: #cfdce4;
  flex: 0 0 auto;
}
.ns-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 11px;
  border-bottom: 1px solid #e7eff4;
  flex: 0 0 auto;
}
.ns-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.ns-panel-close {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid #d5e3ec;
  border-radius: 999px;
  background: #f4f8fa;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}
button.ns-panel-close:hover {
  background: #e7f2f8;
  color: var(--navy);
}
.ns-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #edf3f7;
  background: #f9fbfd;
  flex: 0 0 auto;
}
.ns-search-wrap[hidden] {
  display: none !important;
}
input.ns-search-input {
  width: 100%;
  min-height: 36px;
  height: 36px;
  padding: 6px 11px;
  border: 1px solid #cfe0eb;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}
input.ns-search-input:focus {
  outline: none;
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 2px rgba(0, 129, 204, 0.14);
}
.ns-options {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
button.ns-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 450;
  line-height: 1.4;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
button.ns-option:hover:not(:disabled),
button.ns-option.is-focused:not(:disabled) {
  background: #f1f8fc;
  color: var(--navy);
}
button.ns-option.is-selected {
  background: #e7f5fd;
  color: var(--blue-strong);
  font-weight: 650;
}
button.ns-option.is-disabled,
button.ns-option:disabled {
  color: var(--muted);
  opacity: 0.6;
  cursor: not-allowed;
}
.ns-option-label {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}
.ns-check-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--blue-hover);
}
.ns-empty {
  padding: 20px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}

@keyframes nsPopIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes nsSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (max-width: 760px) {
  .header-project button.ns-trigger-project {
    width: 100%;
    max-width: none;
  }
  .cfg-head-right button.ns-trigger-inline {
    width: 100%;
    min-width: 0;
  }
  .choice-pills-cards {
    gap: 6px;
  }
  .choice-pills-cards .choice-pill {
    min-height: 52px;
    padding: 8px 5px;
  }
  .choice-pills-cards .choice-pill b {
    font-size: 13px;
  }
  .choice-pills-cards .choice-pill small {
    font-size: 11px;
  }
  .ns-overlay.is-mobile .ns-options {
    padding: 8px 10px;
    gap: 4px;
  }
  .ns-overlay.is-mobile button.ns-option {
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 11px;
    font-size: 15px;
  }
}

/* === KIMI_UI29_POLISH_START === */
/* ==========================================================================
   E646(ui31) 双端审美减法精修（精选合入 Kimi 建议） + 折叠屏全形态适配
   基于现网 ui30 末尾追加：完整保留 ui29 批量权限与 ui30 全站自定义下拉框；
   不改 DOM / Vue / 固定 id / 业务 JS；不触碰 [v-cloak]/[hidden]/防闪灰与 ui26 预审标红。
   ========================================================================== */

/* 01｜双端色温与层级：浅色分区退到内容后面，减少次要阴影和多余描边 */
:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --line: #e2e9ed;
  --line-strong: #cfdae1;
  --section-blue: #f3f8fa;
  --section-blue-border: #dce8ed;
  --section-mint: #f4f9f6;
  --section-mint-border: #deebe3;
  --section-indigo: #f6f8fa;
  --section-indigo-border: #e1e7ec;
  --section-amber: #fffaf1;
  --section-amber-border: #ecdfc7;
  --shadow-xs: 0 1px 2px rgba(20, 55, 70, 0.025);
  --shadow-sm: 0 2px 8px rgba(20, 55, 70, 0.03);
}

body { line-height: 1.6; }
h1, h2, h3, .group-title, .group-toggle { letter-spacing: 0; }
button.secondary,
.cfg-btn-outline,
.cfg-btn-light { box-shadow: none; }

/* 02｜侧栏：保留清晰五档底色与大白话（轻柔收敛 20–30%，去掉多余胶囊描边，户外/普通屏仍一眼分色） */
.sidebar {
  background: #f7fafb;
  border-right-color: var(--line);
}
.chapter-button,
.chapter-group > summary { box-shadow: none; }
.chapter-button.is-tone-danger,
.chapter-group.is-tone-danger > summary {
  background: #fff2f0;
  border-color: #f0c4bf;
}
.chapter-button.is-tone-warn,
.chapter-group.is-tone-warn > summary {
  background: #fff9ec;
  border-color: #edd7ad;
}
.chapter-button.is-tone-info,
.chapter-group.is-tone-info > summary {
  background: #f1f8fd;
  border-color: #cfe5f3;
}
.chapter-button.is-tone-success,
.chapter-group.is-tone-success > summary {
  background: #eef9f3;
  border-color: #cbe8da;
}
.chapter-button.is-tone-muted,
.chapter-group.is-tone-muted > summary {
  background: rgba(255, 255, 255, 0.72);
  border-color: #e4ecf0;
}
.chapter-status-tag,
.subblock-tag {
  border-color: transparent;
  font-weight: 600 !important;
  letter-spacing: 0;
}
.chapter-button.is-tone-warn > span:first-child,
.chapter-group.is-tone-warn > summary > span:first-child { background: #f8e5bf; }
.chapter-button.is-tone-info > span:first-child,
.chapter-group.is-tone-info > summary > span:first-child { background: #daeef9; }
.chapter-button.is-tone-success > span:first-child,
.chapter-group.is-tone-success > summary > span:first-child { background: #d6efe2; }

/* 03｜卡片与大区块：父层纯白安静、子层轻云灰；不改变业务警示色与 ui29 批量选中条 */
.editor > form > .field-group,
.panel,
.actions,
.report-picker,
.cfg-card { box-shadow: var(--shadow-xs); }
.actions,
.actions article,
.manager-summary,
.manager-facts,
.manager-scope-card,
.cfg-table-wrap { border-color: var(--line); }
.actions,
.manager-summary { background: #ffffff; }
.actions article,
.manager-facts { background: var(--surface-subtle); }
.manager-scope-card { background: var(--p-blue-050); }
#sec-projects,
#sec-accounts,
#sec-grants {
  background: #ffffff;
  border-color: var(--line);
}
.cfg-kpi-grid .cfg-kpi-card { box-shadow: none; }

/* 04｜选周首页：去多余外框；存在续填主按钮时仅保留一个蓝色主行动（不误伤 ui30 label 内 ns-trigger-compact） */
.new-report {
  padding: 0;
  border: 0;
  background: transparent;
}
.report-picker:has(.resume-entry) .new-report > button {
  background: var(--surface);
  color: var(--blue-strong);
  border-color: var(--line-strong);
  box-shadow: none;
}
.report-picker:has(.resume-entry) .new-report > button:hover:not(:disabled) {
  background: var(--p-blue-050);
  border-color: var(--blue-border);
}
.resume-entry {
  background: #f5fafc;
  border-color: var(--line);
  box-shadow: none;
}
.report-list button { box-shadow: none; }

/* 05｜第 8 章上周计划核对：由“卡中卡”改为“一层外框 + 内部横线分隔”，保留已完成绿底与未完成黄底 */
.plan-checklist-card {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
}
.plan-check-list { gap: 0; }
.plan-check-row {
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.plan-check-row:last-child { border-bottom: 0; }
.plan-check-row.is-done { background: var(--green-soft); }
.plan-check-row.is-pending { background: var(--amber-soft); }
.plan-check-row.is-done,
.plan-check-row.is-pending { border-bottom-color: var(--line); }
.plan-check-opt { box-shadow: none; }
.prefill-bar {
  background: #f7fafb;
  border-color: var(--line);
}

/* 06｜表格与等宽数字：表头更安静、数字等宽对齐（保持自然左对齐以贴合栏目标签与上周提示） */
.field .table-scroll th,
.cfg-table thead th {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.field .table-scroll td input[type=number],
.fin-num-input,
.fin-computed-val,
.fin-prev-hint,
.cfg-kpi-num {
  font-variant-numeric: tabular-nums;
}
.finance-matrix-wrap { border-color: var(--line); }

/* 后台表格操作列素净统一（精准锁死在表格行内操作列，绝不误伤 ui29 批量操作条与弹窗快捷按钮） */
.cfg-table tbody td.cfg-col-actions .cfg-ops .cfg-btn-sm {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--ink-secondary);
  box-shadow: none;
}
.cfg-table tbody td.cfg-col-actions .cfg-ops .cfg-btn-sm:hover:not(:disabled) {
  background: var(--p-blue-050);
  border-color: var(--blue-border);
  color: var(--blue-strong);
}
.cfg-table tbody td.cfg-col-actions .cfg-ops .cfg-btn-del {
  background: #fff8f6;
  border-color: var(--red-border);
  color: var(--red);
}
.cfg-table tbody td.cfg-col-actions .cfg-ops .cfg-btn-del:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: #e5a39c;
  color: #8f1d18;
}

@media (min-width: 761px) {
  .login-intro h1 { letter-spacing: -0.02em; }
  .field .table-scroll th,
  .cfg-table thead th {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* 07｜折叠屏内屏展开态 & 中等平板区间（761px–1000px，覆盖华为 Mate X / 三星 Z Fold / 荣耀 Magic V 展开态） */
@media (min-width: 761px) and (max-width: 1000px) {
  /* 顶栏 ui30 项目自定义下拉按钮收窄，避免折叠屏展开态顶栏折行增厚 */
  .header-project button.ns-trigger-project {
    width: 184px;
    max-width: 196px;
  }
  .header-period {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  /* 折叠屏展开态登录 & 首次改密页：改为单列居中卡片，告别左右硬挤 */
  .login {
    display: block;
    min-height: 0;
    max-width: 520px;
    margin: 24px auto;
    padding: 0 18px 28px;
  }
  .login-intro {
    padding: 22px 24px 18px;
    border: 1px solid #d7e8ef;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: none;
  }
  .login-intro h1 {
    margin: 12px 0 8px;
    font-size: 26px;
  }
  .login-intro > p {
    margin-bottom: 0;
    font-size: 14px;
  }
  .login-highlights {
    display: none;
  }
  .login-card {
    padding: 22px 24px 24px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow-sm);
  }
  /* 折叠屏展开态第 7 章财务仿真表与后台表格：紧凑铺满一屏完整展示、后台表允许丝滑横滚 */
  .finance-matrix-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .finance-matrix-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .finance-matrix {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .finance-matrix .fin-group-th {
    width: 64px;
    padding: 8px 4px;
    font-size: 12px;
  }
  .finance-matrix .fin-cell {
    padding: 7px 6px;
  }
  .finance-matrix .fin-cell-head label,
  .finance-matrix .fin-computed-label {
    font-size: 11.5px;
  }
  .finance-matrix .fin-num-input,
  .finance-matrix .fin-computed-val {
    padding: 5px 7px;
    font-size: 13.5px;
  }
  .cfg-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  :root { --sidebar-width: 196px; }
  .workspace { padding: 16px 14px 110px; }
  .field-group { padding: 16px; }
  .fields-grid { gap: 14px; }
  .chapter-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 08｜手机端（<= 760px）：顶栏轻量化不隐形、抽屉提速（兼顾 5 键经理端）、财务与表格更紧凑 */
@media (max-width: 760px) {
  /* 登录与首次改密全浏览器兼容安全垂直居中（超高自动回落可滚动，绝不裁顶） */
  body:has(.login) #app > div {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  body:has(.login) #app > div > .login {
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
  }

  /* 手机顶栏折中减负：轻盈素净但不隐形，保持一眼可辨可点，突出蓝色「预览」 */
  .app-header .history-entry {
    background: #ffffff;
    border-color: var(--line-strong);
    color: var(--ink-secondary);
    box-shadow: none;
  }
  .header-right button.switch-role {
    background: #fff9f8;
    border-color: #ebd0cd;
    color: #a6342c;
    box-shadow: none;
  }
  .header-right .identity {
    background: transparent;
    border-left: 1px solid var(--line);
    border-radius: 0;
  }
  .header-period .period-details summary,
  .header-period .header-week-btn {
    background: #f4f7f9;
    border-color: #dce6ec;
    color: var(--ink-secondary);
    box-shadow: none;
  }
  .header-period .period-details summary:hover,
  .header-period .header-week-btn:hover:not(:disabled) {
    background: #e9f2f7;
    border-color: var(--blue-border);
    color: var(--navy);
  }
  .header-period .mobile-preview-btn { box-shadow: none; }

  .new-report {
    margin-top: 4px;
    gap: 8px;
  }

  /* 吸顶章节条减负 */
  .chapter-nav-arrow {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }
  .chapter-nav-arrow:hover:not(:disabled) { background: #eaf1f4; }
  .chapter-picker-trigger {
    border: 1px solid var(--line-strong);
    box-shadow: none;
  }
  .chapter-picker-idx {
    background: #eef3f5;
    color: var(--muted);
  }
  .chapter-picker-badge {
    padding-inline: 3px;
    background: transparent;
    border: 0;
  }

  /* 抽屉主导航 2×2（>=44px 触控高度），经理端 5 按钮最后一项自动跨两列居中铺满不缺角 */
  .sidebar { padding: 12px 12px 24px; }
  .sidebar-brand {
    margin-bottom: 10px;
    padding-bottom: 12px;
  }
  .sidebar > .mode { margin-bottom: 6px; }
  .sidebar .main-navigation:not(.sidebar-mobile-tools) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 2px 0 12px;
  }
  .sidebar .main-navigation:not(.sidebar-mobile-tools) button {
    min-height: 44px;
    padding: 8px;
    gap: 7px;
    font-size: 13px;
  }
  .sidebar .main-navigation:not(.sidebar-mobile-tools) button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .sidebar-mobile-tools {
    margin: 0;
    padding: 8px 0 12px;
  }
  .sidebar-preview-btn { box-shadow: none !important; }
  .chapter-navigation { padding-top: 12px; }
  .chapter-navigation h2 { margin-bottom: 8px; }
  .chapter-button,
  .chapter-group > summary {
    margin-bottom: 4px;
    padding: 7px 9px;
  }
  .chapter-status-tag { font-size: 11.5px !important; }
  .subblock-tag { font-size: 11px; }

  /* 计划核对与财务徽章 */
  .plan-checklist-card { padding: 12px; }
  .plan-check-row { padding: 10px 6px; }

  .finance-matrix-head { gap: 8px; }
  .finance-matrix-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .fin-badge {
    justify-content: center;
    padding: 4px 5px;
    font-size: 11px;
    white-space: nowrap;
  }
  .editor > form > .field-group:has(.finance-matrix) { background: #ffffff; }
  .finance-matrix tr { border-color: var(--line); }

  /* 语音 / AI 按钮、明细表提示与表底添加条精修 */
  .field-voice > button.voice-record-btn.secondary,
  .field-voice > button.voice-ai-btn {
    border-width: 1px;
    box-shadow: none;
  }
  .mobile-table-tip {
    background: #fffaf1;
    border: 1px solid var(--amber-border);
    border-left: 3px solid #c28b2f;
    box-shadow: none;
  }
  .table-add-bottom-btn {
    background: var(--p-blue-050);
    border: 1px dashed var(--blue-border);
    box-shadow: none;
  }
  .form-footer { box-shadow: 0 -2px 10px rgba(20, 55, 70, 0.04); }
  .cfg-table tbody td::before {
    flex-basis: 38%;
    max-width: 148px;
  }

  /* 任务书守护项：原值明确保留，不得删除或改小 */
  .workspace.has-report { padding-bottom: 184px; }
  .editor-grid:has(.manager-summary) .form-footer { position: static; }
}

/* 09｜安卓窄屏（<= 380px）与折叠屏合盖超窄外屏（<= 360px / <= 355px，如三星 Z Fold 344px） */
@media (max-width: 380px) {
  .fin-badge { font-size: 10.5px; }
}
@media (max-width: 360px) {
  .choice-pills-cards .choice-pill b { font-size: 12.5px; }
  .choice-pills-cards .choice-pill small { font-size: 10.5px; }
}
@media (max-width: 355px) {
  .finance-matrix-badges {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .fin-badge {
    font-size: 11.5px;
    padding: 5px 10px;
    white-space: nowrap;
  }
  .mobile-brand { padding-right: 122px; }
  .mobile-brand .wordmark { font-size: 15px; }
  .app-header .history-entry,
  .switch-role {
    padding: 3px 6px;
    font-size: 11.5px;
  }
  .header-period { gap: 3px; padding: 6px 6px; }
  .header-period b { font-size: 11px; padding: 3px 5px; }
  .header-period .period-details summary,
  .header-period .header-week-btn,
  .header-period .mobile-preview-btn {
    padding: 3px 5px;
    font-size: 11px;
  }
}

/*
 * 明确不在本补丁中改写：
 * [v-cloak] / [hidden] / .editor.is-acquiring-lock 防闪灰；
 * .has-block-issue / .has-field-issue / .has-cell-issue；
 * .reference.precheck-panel.is-issue-alert / .field-review / .is-highlighted；
 * @media (horizontal-viewport-segments: 2) 双屏铰链避让规则。
 */
/* === KIMI_UI29_POLISH_END === */

/* === E646_UI32_STITCH_FLAGSHIP_START === */
/* ==========================================================================
   E646(ui32) Google Stitch 旗舰视觉升舱（方案 A：深海建筑藏青 × 极净云白）
   纯 CSS 安全转译：0 外部 CDN / 0 oklch / 0 内联样式 / 0 DOM 或 JS 改动；
   100% 保留 ui26 预审红底标红、ui29 批量权限、ui30 自定义下拉与 ui31 折叠屏适配。
   ========================================================================== */

:root {
  --flagship-navy: #0B2239;
  --flagship-navy-deep: #071A2C;
  --flagship-navy-mid: #103252;
  --flagship-emerald: #0F9D68;
  --flagship-emerald-hover: #0C8759;
}

/* 01｜登录页 & 首次改密页：深海建筑藏青蓝图网格门面 + 极净高光白卡 */
body:has(.login) {
  background: #F1F5F9;
}
.login-intro {
  position: relative;
  overflow: hidden;
  background-color: var(--flagship-navy-deep);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(0, 149, 235, 0.24) 0%, rgba(0, 149, 235, 0) 48%),
    linear-gradient(rgba(148, 210, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 210, 255, 0.055) 1px, transparent 1px),
    linear-gradient(155deg, #071A2C 0%, #0B243D 52%, #11385C 100%);
  background-size: 100% 100%, 36px 36px, 36px 36px, 100% 100%;
  border-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.login-intro::after {
  display: none;
}
.login-intro .brand-kicker {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: #BAE6FD;
  font-weight: 600;
}
.login-intro .wordmark {
  color: #FFFFFF;
  letter-spacing: -0.01em;
}
.login-intro h1 {
  color: #FFFFFF;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}
.login-intro > p {
  color: #BCD3E6;
}
.login-highlights li {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(186, 230, 253, 0.14);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.login-highlights li b {
  color: #FFFFFF;
}
.login-highlights li span {
  color: #AFC9DF;
}
.login-card {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border-color: #DCE5EE;
  box-shadow: 0 18px 44px rgba(7, 26, 44, 0.08), 0 2px 6px rgba(7, 26, 44, 0.04);
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0B2239 0%, #0081CC 58%, #38BDF8 100%);
}
.login-card h2 {
  color: var(--flagship-navy);
}
.login-card > label input {
  background: #F8FAFC;
  border-color: #CFDCE6;
}
.login-card > label input:focus {
  background: #FFFFFF;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
}
.login-card > button[type="submit"],
.login-card > button:not(.secondary):not(.quiet) {
  background: var(--flagship-navy);
  border-color: var(--flagship-navy);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(11, 34, 57, 0.22);
}
.login-card > button[type="submit"]:hover:not(:disabled),
.login-card > button:not(.secondary):not(.quiet):hover:not(:disabled) {
  background: #0068B5;
  border-color: #0068B5;
  box-shadow: 0 6px 18px rgba(0, 104, 181, 0.26);
}

/* 02｜左侧旗舰深海藏青导航栏（电脑端 + 手机抽屉全端统一，五档状态清晰透亮） */
.sidebar {
  background: linear-gradient(180deg, #081C30 0%, #0C253E 58%, #0E2B47 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2EEF8;
}
.sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.sidebar-brand .wordmark {
  color: #FFFFFF;
}
.sidebar-brand .wordmark::before {
  background: linear-gradient(135deg, #0081CC 0%, #0EA5E9 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 4px 12px rgba(0, 129, 204, 0.32);
}
.sidebar-brand .brand-subtitle {
  color: #8FB1CC;
}
.sidebar > .mode {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.26);
  color: #BAE6FD;
}
.sidebar .main-navigation {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.sidebar .main-navigation button {
  color: #C5D9EA;
  background: transparent;
  border: 1px solid transparent;
}
.sidebar .main-navigation button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.sidebar .main-navigation img {
  filter: brightness(0) invert(1);
  opacity: 0.72;
}
.sidebar .main-navigation button.active {
  background: rgba(0, 129, 204, 0.28);
  border-color: rgba(56, 189, 248, 0.38);
  color: #FFFFFF;
  box-shadow: inset 3px 0 0 #38BDF8;
}
.sidebar .main-navigation button.active img {
  opacity: 1;
}
.sidebar .sidebar-nav-link {
  color: #C5D9EA;
}
.sidebar .sidebar-nav-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
}
.sidebar .chapter-navigation h2 {
  color: #8CAEC9;
}
.sidebar .chapter-navigation h2 span {
  background: rgba(255, 255, 255, 0.1);
  color: #D2E3F1;
}
.sidebar .chapter-button,
.sidebar .chapter-group > summary {
  color: #E7F1FA;
  border-width: 1px;
  border-style: solid;
}
.sidebar .chapter-button:hover:not(.active),
.sidebar .chapter-group > summary:hover {
  filter: brightness(1.12);
  color: #FFFFFF;
}
.sidebar .chapter-group > summary img {
  filter: brightness(0) invert(1);
  opacity: 0.65;
}

/* 深海底五档章节状态色：红(预审问题/退回) · 暖黄(已填待预审) · 蓝(已填完待审核) · 绿(已审核) · 柔灰(未填写) */
.sidebar .chapter-button.is-tone-danger,
.sidebar .chapter-group.is-tone-danger > summary {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.44);
}
.sidebar .chapter-button.is-tone-danger > span:first-child,
.sidebar .chapter-group.is-tone-danger > summary > span:first-child {
  background: rgba(239, 68, 68, 0.34);
  color: #FECACA;
}
.sidebar .chapter-status-tag,
.sidebar .subblock-tag {
  border-color: transparent !important;
}
.sidebar .chapter-status-tag.is-tone-danger,
.sidebar .subblock-tag.is-tone-danger {
  background: rgba(239, 68, 68, 0.24) !important;
  color: #FECACA !important;
}

.sidebar .chapter-button.is-tone-warn,
.sidebar .chapter-group.is-tone-warn > summary {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(251, 191, 36, 0.35);
}
.sidebar .chapter-button.is-tone-warn > span:first-child,
.sidebar .chapter-group.is-tone-warn > summary > span:first-child {
  background: rgba(245, 158, 11, 0.28);
  color: #FDE68A;
}
.sidebar .chapter-status-tag.is-tone-warn,
.sidebar .subblock-tag.is-tone-warn {
  background: rgba(245, 158, 11, 0.22) !important;
  color: #FDE68A !important;
}

.sidebar .chapter-button.is-tone-info,
.sidebar .chapter-group.is-tone-info > summary {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.40);
}
.sidebar .chapter-button.is-tone-info > span:first-child,
.sidebar .chapter-group.is-tone-info > summary > span:first-child {
  background: rgba(14, 165, 233, 0.30);
  color: #BAE6FD;
}
.sidebar .chapter-status-tag.is-tone-info,
.sidebar .subblock-tag.is-tone-info {
  background: rgba(14, 165, 233, 0.24) !important;
  color: #BAE6FD !important;
}

.sidebar .chapter-button.is-tone-success,
.sidebar .chapter-group.is-tone-success > summary {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.42);
}
.sidebar .chapter-button.is-tone-success > span:first-child,
.sidebar .chapter-group.is-tone-success > summary > span:first-child {
  background: rgba(16, 185, 129, 0.30);
  color: #A7F3D0;
}
.sidebar .chapter-status-tag.is-tone-success,
.sidebar .subblock-tag.is-tone-success {
  background: rgba(16, 185, 129, 0.24) !important;
  color: #A7F3D0 !important;
}

.sidebar .chapter-button.is-tone-muted,
.sidebar .chapter-group.is-tone-muted > summary {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.11);
  color: #C7D9E9;
}
.sidebar .chapter-button.is-tone-muted > span:first-child,
.sidebar .chapter-group.is-tone-muted > summary > span:first-child {
  background: rgba(255, 255, 255, 0.10);
  color: #A6BFD4;
}
.sidebar .chapter-status-tag.is-tone-muted,
.sidebar .subblock-tag.is-tone-muted {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #BCD1E3 !important;
}

/* 深海侧栏当前激活章节高亮（精准覆盖 ui28 浅色 !important） */
.sidebar .chapter-navigation .chapter-button.active,
.sidebar .chapter-navigation .chapter-button.active:hover {
  background: rgba(0, 129, 204, 0.34) !important;
  border-color: rgba(56, 189, 248, 0.78) !important;
  color: #FFFFFF !important;
  box-shadow: inset 3px 0 0 #38BDF8, 0 2px 10px rgba(0, 0, 0, 0.20) !important;
}
.sidebar .chapter-navigation .chapter-button.active.is-tone-danger {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: rgba(248, 113, 113, 0.82) !important;
  box-shadow: inset 3px 0 0 #F87171, 0 2px 10px rgba(0, 0, 0, 0.20) !important;
}
.sidebar .chapter-navigation .chapter-button.active.is-tone-success {
  background: rgba(16, 185, 129, 0.26) !important;
  border-color: rgba(52, 211, 153, 0.80) !important;
  box-shadow: inset 3px 0 0 #34D399, 0 2px 10px rgba(0, 0, 0, 0.20) !important;
}
.sidebar .chapter-navigation .chapter-button.active > span:first-child {
  background: #0081CC !important;
  color: #FFFFFF !important;
}
.sidebar .chapter-navigation .chapter-button.active.is-tone-danger > span:first-child {
  background: #DC2626 !important;
  color: #FFFFFF !important;
}
.sidebar .chapter-navigation .chapter-button.active.is-tone-success > span:first-child {
  background: #0F9D68 !important;
  color: #FFFFFF !important;
}

/* 第 8/9 章子板块深海适配 */
.sidebar .chapter-group button.subblock-btn {
  border-left-color: rgba(255, 255, 255, 0.16);
  color: #D2E3F1;
  background: rgba(255, 255, 255, 0.03);
}
.sidebar .chapter-group button.subblock-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
}
.sidebar .chapter-group button.subblock-btn.is-tone-danger {
  background: rgba(239, 68, 68, 0.14);
  border-left-color: #F87171;
}
.sidebar .chapter-group button.subblock-btn.is-tone-warn {
  background: rgba(245, 158, 11, 0.12);
  border-left-color: #FBBF24;
}
.sidebar .chapter-group button.subblock-btn.is-tone-info {
  background: rgba(14, 165, 233, 0.13);
  border-left-color: #38BDF8;
}
.sidebar .chapter-group button.subblock-btn.is-tone-success {
  background: rgba(16, 185, 129, 0.13);
  border-left-color: #34D399;
}
.sidebar .chapter-group button.subblock-btn.active {
  background: rgba(0, 129, 204, 0.30);
  border-left-color: #38BDF8;
  color: #FFFFFF;
}

/* 03｜顶栏、卡片蓝竖条标题、实心深海蓝分段胶囊、暖琥珀截止卡与实心翠绿已保存 */
.header-period b {
  background: var(--flagship-navy);
  color: #FFFFFF;
  border: 0;
  border-radius: 8px;
  letter-spacing: 0.01em;
}
.field-group > h2.group-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 9px;
  width: 100%;
}
.field-group > h2.group-title .block-issue-badge {
  margin-left: auto;
}
.field-group > button.group-toggle > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.field-group > h2.group-title::before,
.field-group > button.group-toggle > span:first-child::before {
  content: "";
  position: static;
  transform: none;
  display: inline-block;
  flex: 0 0 4px;
  width: 4px;
  height: 16px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--flagship-navy) 0%, var(--cscec-blue) 100%);
}

/* 分段单选胶囊：Stitch 同款浅灰槽 + 实心深海藏青选中态（不影响 3 张图片类型卡片） */
.choice-pills:not(.choice-pills-cards) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: auto;
  max-width: 100%;
  padding: 4px;
  border-radius: 11px;
  background: #EEF3F7;
  border: 1px solid #DFE8F0;
}
.choice-pills:not(.choice-pills-cards) .choice-pill {
  min-height: 36px;
  padding: 6px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary);
  font-weight: 550;
}
.choice-pills:not(.choice-pills-cards) .choice-pill:hover:not(:disabled):not(.is-selected) {
  background: rgba(255, 255, 255, 0.72);
  border-color: transparent;
  color: var(--flagship-navy);
}
.choice-pills:not(.choice-pills-cards) .choice-pill.is-selected {
  background: var(--flagship-navy);
  border-color: var(--flagship-navy);
  color: #FFFFFF;
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(11, 34, 57, 0.22);
}
.choice-pills-cards .choice-pill.is-selected {
  background: #EDF7FD;
  border-color: var(--flagship-navy);
  color: var(--flagship-navy);
  box-shadow: 0 0 0 2px rgba(11, 34, 57, 0.12);
}

/* 右侧「本周报送与版本」编辑截止暖琥珀醒目提示块 */
.actions-body > p:first-of-type {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  font-size: 13px;
  line-height: 1.6;
}
.actions-body > p:first-of-type b {
  display: inline-block;
  margin-top: 2px;
  color: #78350F;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.actions-body > p:first-of-type small.muted {
  color: #A16207;
}

/* 底部操作栏：未保存深海工程蓝 / 已保存高级实心翠绿 */
.footer-buttons .primary-save {
  background: var(--flagship-navy);
  border-color: var(--flagship-navy);
  color: #FFFFFF;
}
.footer-buttons .primary-save:hover:not(:disabled) {
  background: #0068B5;
  border-color: #0068B5;
}
.footer-buttons .primary-save.save-complete:disabled {
  background: var(--flagship-emerald);
  border-color: var(--flagship-emerald-hover);
  color: #FFFFFF;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(15, 157, 104, 0.22);
}

/* 04｜管理后台（configuration.html）：深海建筑藏青旗舰顶栏 + 顶部色条 KPI 卡片 */
.cfg-topbar {
  background-color: var(--flagship-navy-deep);
  background-image:
    radial-gradient(circle at 92% 20%, rgba(0, 149, 235, 0.22) 0%, rgba(0, 149, 235, 0) 44%),
    linear-gradient(rgba(148, 210, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 210, 255, 0.05) 1px, transparent 1px),
    linear-gradient(120deg, #071A2C 0%, #0C2742 56%, #11385C 100%);
  background-size: 100% 100%, 32px 32px, 32px 32px, 100% 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}
.cfg-brand h1 {
  color: #FFFFFF;
}
.cfg-brand-sub {
  color: #9BB9D1;
}
.cfg-badge-role {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.30);
  color: #BAE6FD;
}
.cfg-topbar .cfg-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}
.cfg-topbar .cfg-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}
.cfg-topbar .cfg-btn-light {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--flagship-navy);
  font-weight: 650;
}
.cfg-topbar .cfg-btn-light:hover {
  background: #E8F4FC;
  color: var(--blue-strong);
}
.cfg-kpi-grid .cfg-kpi-card {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border-color: var(--line);
}
.cfg-kpi-grid .cfg-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.cfg-kpi-grid .cfg-kpi-card:nth-child(1)::before { background: var(--cscec-blue); }
.cfg-kpi-grid .cfg-kpi-card:nth-child(2)::before { background: var(--flagship-emerald); }
.cfg-kpi-grid .cfg-kpi-card:nth-child(3)::before { background: var(--flagship-navy); }
.cfg-kpi-num {
  color: var(--flagship-navy);
}
.cfg-card-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cfg-card-head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--flagship-navy) 0%, var(--cscec-blue) 100%);
}

/* 05｜手机端 & 折叠屏专项精修（双端气质 100% 统一，保持零溢出与触控高度） */
@media (max-width: 760px) {
  .mobile-brand .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .mobile-brand .wordmark::before {
    content: "CS";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--flagship-navy);
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  .sidebar {
    background: linear-gradient(180deg, #081C30 0%, #0D2740 100%);
    box-shadow: 16px 0 44px rgba(7, 26, 44, 0.34);
  }
  .sidebar-brand .icon-button {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
  }
  .sidebar-brand .icon-button img {
    filter: brightness(0) invert(1);
    opacity: 0.92;
  }
  .choice-pills:not(.choice-pills-cards) {
    display: flex;
    width: 100%;
  }
  .choice-pills:not(.choice-pills-cards) .choice-pill {
    flex: 1 1 0;
    padding: 6px 8px;
    font-size: 13.5px;
  }
  .header-period .mobile-preview-btn {
    background: var(--flagship-navy);
    border-color: var(--flagship-navy);
  }
  .login-intro {
    border-color: rgba(255, 255, 255, 0.08);
  }
  .login-card::before {
    height: 0;
  }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .login-card::before {
    height: 0;
  }
}

@media (max-width: 355px) {
  .mobile-brand .wordmark::before {
    width: 22px;
    height: 22px;
    font-size: 9.5px;
    border-radius: 6px;
  }
}
/* === E646_UI32_STITCH_FLAGSHIP_END === */

/* === E646_UI33_CI_ZOOM_UX_START === */
/* ==========================================================================
   E646(ui33) 六项双端精修：
   1. 中国建筑官方标准 CI 标识（左上角 + 登录页/改密页 + 后台顶栏）
   2. 手机端章节目录抽屉丝滑滚动 + 彻底阻断背景滚动穿透
   3. 预览层全视口锁定与独立放大 + 顶栏「历史周报」与「退出」间固定档位正文缩放
   4. 图片说明（最多300字）固定宽度 + 自动换行 + 自动增高
   5. 明细表（加工单位明细等）自动换行 + 整行文本框等高伸展 + 文字垂直居中
   6. 本章自动汇总与核对升级为专业表格卡片
   ========================================================================== */

/* 01｜中国建筑官方标准 CI 标识（严格按 CI 规范：浅底蓝标、深底白底蓝标，0 外部 CDN） */
.sidebar-brand .wordmark::before,
.mobile-brand .wordmark::before {
  content: none !important;
  display: none !important;
}
.ci-mark {
  display: block;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: none !important;
  opacity: 1 !important;
}
.sidebar-brand .wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ci-mark-sidebar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.sidebar-brand .brand-subtitle {
  padding-left: 44px;
}
.ci-mark-mobile {
  width: 25px;
  height: 25px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 114, 184, 0.22);
}
.mobile-brand img.ci-mark-mobile {
  width: 25px;
  height: 25px;
  filter: none !important;
}
.ci-mark-cfg {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 登录页 & 首次改密页：中国建筑联合品牌锁（CI 规范净空区 + 视觉层级） */
.login-ci-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(186, 230, 253, 0.16);
}
.ci-mark-hero {
  width: 54px;
  height: 54px;
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.login-ci-sep {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.08) 0%, rgba(186, 230, 253, 0.36) 50%, rgba(186, 230, 253, 0.08) 100%);
  flex-shrink: 0;
}
.login-ci-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
.login-ci-group {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.login-ci-lockup .brand-kicker {
  margin: 0;
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 999px;
}

/* 02｜手机端章节目录抽屉流畅滚动 + 彻底阻断背景滚动穿透 */
html.is-nav-open,
body.is-nav-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
.sidebar {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.sidebar .main-navigation,
.sidebar .chapter-navigation,
.sidebar button,
.sidebar summary,
.sidebar a {
  touch-action: pan-y;
}
.nav-scrim {
  touch-action: none !important;
  overscroll-behavior: none;
}

/* 03｜顶栏固定档位正文缩放（严格位于「历史周报」与「退出」正中间，双端共享） */
.header-right > a.history-entry {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  flex-shrink: 0;
}
.header-right > a.history-entry:hover {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue-strong);
  text-decoration: none;
}
.ui-scale-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 40;
}
.ui-scale-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ui-scale-btn:hover,
.ui-scale-picker.is-open .ui-scale-btn {
  background: var(--blue-soft);
  border-color: var(--blue-border);
  color: var(--blue-strong);
}
.ui-scale-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ui-scale-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 196px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #d4e0eb;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(7, 26, 44, 0.16), 0 2px 6px rgba(7, 26, 44, 0.06);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ui-scale-menu-head {
  padding: 4px 10px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid #eef3f7;
  margin-bottom: 2px;
}
.ui-scale-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ui-scale-opt:hover {
  background: #f1f6fb;
}
.ui-scale-opt strong {
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--flagship-navy);
}
.ui-scale-opt span {
  font-size: 12px;
  color: var(--muted);
}
.ui-scale-opt.is-active {
  background: var(--flagship-navy);
  border-color: var(--flagship-navy);
  color: #ffffff;
}
.ui-scale-opt.is-active strong {
  color: #ffffff;
}
.ui-scale-opt.is-active span {
  color: #bae6fd;
}

/* 正文区固定档位缩放（仅缩放正文工作区，不破坏顶栏、侧栏、预览层与弹窗） */
body.ui-scale-75 .workspace { zoom: 0.75; }
body.ui-scale-85 .workspace { zoom: 0.85; }
body.ui-scale-100 .workspace { zoom: 1; }
body.ui-scale-110 .workspace { zoom: 1.1; }

@media (min-width: 761px) {
  body.ui-scale-75 .workspace .form-footer { left: calc(var(--sidebar-width) / 0.75); }
  body.ui-scale-85 .workspace .form-footer { left: calc(var(--sidebar-width) / 0.85); }
  body.ui-scale-110 .workspace .form-footer { left: calc(var(--sidebar-width) / 1.1); }
}

/* 03B｜预览层全视口锁定 + 预览内置独立缩放（彻底修复手机端预览缩放和退出后正文错位） */
html.is-preview-open,
body.is-preview-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
.doc-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  zoom: 1 !important;
}
.doc-preview-stage {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.doc-preview-sheet-list.is-pzoom-100 {
  width: 100%;
  max-width: 860px;
}
.doc-preview-sheet-list.is-pzoom-130 {
  width: 130%;
  max-width: 1120px;
}
.doc-preview-sheet-list.is-pzoom-160 {
  width: 160%;
  max-width: 1380px;
}
.doc-preview-sheet-list.is-pzoom-130 .doc-preview-page img,
.doc-preview-sheet-list.is-pzoom-160 .doc-preview-page img {
  max-width: none;
  width: 100%;
}
.doc-preview-zoom-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #edf3f8;
  border: 1px solid #d2dfe9;
}
.doc-preview-zoom-btn {
  min-height: 32px;
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}
.doc-preview-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--flagship-navy);
}
.doc-preview-zoom-btn.is-active {
  background: var(--flagship-navy);
  color: #ffffff;
}

/* 04｜自动换行且随内容自动增高的通用网格镜像容器（0 内联 style，全浏览器兼容） */
.auto-grow-wrap {
  display: grid;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.auto-grow-wrap::after {
  content: attr(data-replicated-value) " ";
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  visibility: hidden;
  pointer-events: none;
}
.auto-grow-wrap::after,
.auto-grow-wrap > textarea {
  grid-area: 1 / 1 / 2 / 2;
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.auto-grow-wrap > textarea {
  resize: none !important;
  overflow: hidden !important;
  min-height: 0;
  border: 0;
  background: transparent;
  outline: none;
  box-shadow: none;
}

/* 图片说明（最多300字）：固定占满卡片宽度 + 到头自动换行 + 随字数自动增高 */
.photos {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.photos article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(11, 34, 57, 0.04);
}
.photo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.photo-card-head a {
  margin-bottom: 0;
}
.photos label.photo-caption-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  margin: 0;
}
.photo-caption-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}
.photo-caption-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.photo-caption-grow {
  width: 100%;
  min-height: 68px;
  background: #f8fbfd;
  border: 1px solid #cfdce6;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.photo-caption-grow:focus-within {
  background: #ffffff;
  border-color: var(--cscec-blue, #0081cc);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
}
.photo-caption-grow.is-disabled {
  background: #f4f6f8;
  border-color: #e2e8ee;
}
.photo-caption-grow::after,
.photo-caption-grow > textarea.photo-caption-input {
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.55;
  min-height: 66px;
}
.photo-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #eef3f7;
}
.photos label.photo-wide-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}
.photos label.photo-wide-toggle input {
  margin: 0;
}
.photo-card-ops {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 05｜明细表（含制造进度「加工单位明细」）：文字自动换行 + 整行文本框等高 + 文字垂直居中 */
.field .table-scroll table {
  height: 1px;
}
.field .table-scroll tbody td {
  height: 100%;
  vertical-align: middle;
}
.field .table-scroll td .table-cell-fill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 42px;
  width: 100%;
}
.field .table-scroll td:has(.field-review) .table-cell-fill {
  height: auto;
}
.field .table-scroll td .table-text-grow {
  flex: 1 1 auto;
  height: 100%;
  min-height: 42px;
  align-content: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #d4e0e8);
  border-radius: 8px;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field .table-scroll td .table-text-grow:focus-within {
  border-color: var(--cscec-blue, #0081cc);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.14);
}
.field .table-scroll td .table-text-grow.is-disabled {
  background: #f5f7f9;
  border-color: #e2e8ee;
  cursor: default;
}
.field .table-scroll td .table-text-grow::after,
.field .table-scroll td .table-text-grow > textarea.table-text-input {
  display: block;
  width: 100%;
  min-width: 100%;
  min-height: 0 !important;
  padding: 9px 10px;
  font-size: 14px;
  line-height: 1.48;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none !important;
  overflow: hidden !important;
}
.field .table-scroll td input[type=number] {
  flex: 1 1 auto;
  height: 100%;
  min-height: 42px;
  margin: 0;
  box-sizing: border-box;
}
.field .table-scroll td .nice-select-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 42px;
}
.field .table-scroll td .ns-trigger,
.field .table-scroll td .ns-trigger-table,
.field .table-scroll td .nice-select-trigger,
.field .table-scroll td select:not(.ns-native-select) {
  flex: 1 1 auto;
  height: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0;
  box-sizing: border-box;
}
.field .table-scroll td .table-combo {
  flex: 1 1 auto;
  height: 100%;
  min-height: 42px;
  align-items: center;
}
.field .table-scroll td .table-combo .ns-combo-btn {
  height: 100%;
}
.field .table-scroll td .table-combo-input {
  height: 100%;
  min-height: 40px;
}
.field .table-scroll td .table-num-pill {
  flex: 1 1 auto;
  height: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field .table-scroll td .table-ops-fill {
  align-items: center;
  justify-content: center;
}

/* 06｜本章自动汇总与核对（专业清晰表格卡片，替代原纯文本 pre） */
.reference.calc-summary-card {
  margin: 18px 0 14px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #d5e3ee;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(11, 34, 57, 0.045);
}
.calc-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaf0f6;
}
.calc-summary-titles {
  min-width: 0;
  flex: 1 1 240px;
}
.calc-summary-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--flagship-navy);
}
.calc-summary-head h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--flagship-navy) 0%, #0072B8 100%);
}
.calc-summary-sub {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.calc-summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf5fc;
  border: 1px solid #c5e2f5;
  color: #0b5d8f;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.calc-summary-badge.is-stale {
  background: #fff7e6;
  border-color: #f3d28f;
  color: #9a5b08;
}
.calc-summary-block + .calc-summary-block {
  margin-top: 16px;
}
.calc-summary-tbl-title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
}
.calc-summary-warn {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 500;
}
.calc-summary-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
}
.calc-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #ffffff;
}
.calc-summary-table thead th {
  padding: 9px 12px;
  background: #f0f6fb;
  color: var(--flagship-navy);
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid #d5e3ee;
  white-space: nowrap;
}
.calc-summary-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  color: var(--ink);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.calc-summary-table tbody tr:last-child td {
  border-bottom: 0;
}
.calc-summary-table tbody tr:nth-child(even) td {
  background: #fafcfe;
}
.calc-summary-table .is-align-left { text-align: left; }
.calc-summary-table .is-align-center { text-align: center; }
.calc-summary-table .is-align-right { text-align: right; }
.calc-summary-table .is-strong { font-weight: 700; }
.calc-summary-table .is-tone-num { color: var(--flagship-navy); }
.calc-summary-table .is-tone-accent { color: #0072B8; }
.calc-summary-table .is-tone-good { color: #0F9D68; }
.calc-summary-table .is-tone-warn { color: #b45309; }
.calc-summary-table .is-tone-danger { color: #c53030; }
.calc-summary-table .is-tone-muted { color: #64748b; font-weight: 400; }
.calc-summary-notes {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}

/* 07｜手机端与折叠屏专项适配（保持 0 溢出、触控顺滑与双端一致） */
@media (max-width: 760px) {
  body.is-nav-open {
    touch-action: none;
  }
  .sidebar {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    will-change: transform;
    padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  }
  .login-ci-lockup {
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
  .ci-mark-hero {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }
  .login-ci-sep {
    height: 26px;
  }
  .login-ci-group {
    font-size: 14px;
  }
  .login-ci-lockup .brand-kicker {
    font-size: 11px;
    padding: 1px 8px;
  }
  .ci-mark-cfg {
    width: 32px;
    height: 32px;
  }

  /* 手机顶栏第一行真正 4 列布局：[菜单+CI+项目周报] [历史周报] [缩放] [退出] */
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: center;
  }
  .mobile-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding: 4px 4px 4px 6px;
    gap: 5px;
    overflow: hidden;
  }
  .mobile-brand .wordmark {
    gap: 6px;
    font-size: 16px;
    min-width: 0;
  }
  .app-header .history-entry {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-height: 34px;
    padding: 4px 8px;
    margin-right: 4px;
    font-size: 12px;
    white-space: nowrap;
  }
  .app-header .ui-scale-picker {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-right: 4px;
    z-index: 6;
  }
  .app-header .ui-scale-btn {
    min-height: 34px;
    padding: 4px 7px;
    border-radius: 8px;
    border: 1px solid #cbd9e6;
    background: #f3f7fb;
    color: var(--flagship-navy);
    font-size: 12px;
    gap: 3px;
  }
  .app-header .switch-role {
    grid-column: 4;
    grid-row: 1;
    min-height: 34px;
    padding: 4px 8px;
    margin-right: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .header-project {
    grid-column: 1 / 2;
    grid-row: 2;
  }
  .header-right .identity {
    grid-column: 2 / 5;
    grid-row: 2;
    justify-self: end;
    max-width: 156px;
    margin: 0 8px 0 4px;
  }
  .header-period {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  /* 预览页底栏手机端精简紧凑、退出按钮永不掉出屏幕外 */
  .doc-preview-stage {
    padding: 10px 8px 18px;
  }
  .doc-preview-footer {
    gap: 8px;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .doc-preview-meta b {
    font-size: 13.5px;
  }
  .doc-preview-meta span {
    font-size: 11.5px;
  }
  .doc-preview-zoom-bar {
    width: 100%;
    justify-content: space-between;
  }
  .doc-preview-zoom-btn {
    flex: 1 1 0;
    min-height: 34px;
    padding: 4px 6px;
    font-size: 12px;
  }
  .doc-preview-actions {
    gap: 8px;
  }
  .doc-preview-actions > button {
    min-height: 40px;
    font-size: 13.5px;
    padding: 6px 12px;
  }
  .doc-preview-exit-btn {
    flex: 1 1 100%;
    min-height: 42px;
    background: var(--flagship-navy);
    border-color: var(--flagship-navy);
  }

  .photos {
    grid-template-columns: 1fr;
  }
  .photo-caption-grow::after,
  .photo-caption-grow > textarea.photo-caption-input {
    font-size: 16px;
  }
  .field .table-scroll td .table-text-grow::after,
  .field .table-scroll td .table-text-grow > textarea.table-text-input {
    font-size: 15px;
  }

  .reference.calc-summary-card {
    padding: 14px 12px;
  }
  .calc-summary-table {
    font-size: 13px;
  }
  .calc-summary-table thead th,
  .calc-summary-table tbody td {
    padding: 8px 9px;
  }
}

@media (max-width: 355px) {
  .mobile-brand {
    padding: 4px 2px 4px 4px;
    gap: 3px;
  }
  .mobile-brand img.ci-mark-mobile {
    width: 20px;
    height: 20px;
  }
  .mobile-brand .wordmark {
    font-size: 14px;
    gap: 4px;
  }
  .app-header .history-entry {
    padding: 3px 5px;
    margin-right: 3px;
    font-size: 11px;
  }
  .app-header .ui-scale-picker {
    margin-right: 3px;
  }
  .app-header .ui-scale-icon {
    display: none;
  }
  .app-header .ui-scale-btn {
    padding: 3px 5px;
    font-size: 11px;
  }
  .app-header .switch-role {
    padding: 3px 5px;
    margin-right: 5px;
    font-size: 11px;
  }
}
/* === E646_UI33_CI_ZOOM_UX_END === */

/* === E646_UI34_LIGHTBLUE_SPLIT_UX_START === */
/* ==========================================================================
   E646(ui34) 晴空海蓝提亮 + 手机分栏视图 + 8 项双端体验精修
   ========================================================================== */

/* 01｜告别过深藏青/发黑色调，全站焕新为清澈明朗的「中建晴空海蓝」 */
:root {
  --flagship-navy: #14538A;
  --flagship-navy-deep: #114778;
  --flagship-navy-mid: #1C66A8;
  --navy: #1B4A75;
  --navy-deep: #173F66;
  --ink: #22384D;
  --ink-secondary: #3E5973;
}

.login-intro {
  background-color: #134C80;
  background-image:
    radial-gradient(circle at 86% 14%, rgba(125, 211, 252, 0.24) 0%, rgba(125, 211, 252, 0) 48%),
    linear-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.065) 1px, transparent 1px),
    linear-gradient(150deg, #134C80 0%, #19609E 54%, #2276BE 100%);
  border-color: rgba(255, 255, 255, 0.14);
}
.login-intro > p {
  color: #DCEEFB;
}
.login-intro .brand-kicker {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

/* 02｜电脑端（及通用）登录页左下方 3 条亮点去掉背后的小框框，通透轻盈 */
.login-highlights li {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 5px 0 5px 18px !important;
  position: relative;
}
.login-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7DD3FC;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.22);
}
.login-highlights li span {
  color: #D2E8FA;
}

.login-card::before {
  background: linear-gradient(90deg, #14538A 0%, #0072B8 58%, #38BDF8 100%);
}
.login-card > button[type="submit"],
.login-card > button:not(.secondary):not(.quiet) {
  background: #0072B8;
  border-color: #0072B8;
  box-shadow: 0 4px 14px rgba(0, 114, 184, 0.24);
}
.login-card > button[type="submit"]:hover:not(:disabled),
.login-card > button:not(.secondary):not(.quiet):hover:not(:disabled) {
  background: #0B5E99;
  border-color: #0B5E99;
}

/* 左侧导航栏与后台顶栏同步提亮为柔和中建海蓝 */
.sidebar {
  background: linear-gradient(180deg, #154F85 0%, #1B5E9B 58%, #226FB2 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  color: #EEF6FD;
}
.sidebar-brand .brand-subtitle {
  color: #CBE3F8;
}
.sidebar .main-navigation button {
  color: #E2F0FC;
}
.sidebar .main-navigation button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}
.sidebar .main-navigation button.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(186, 230, 253, 0.45);
  box-shadow: inset 3px 0 0 #7DD3FC;
}
.sidebar .chapter-navigation h2 {
  color: #CBE3F8;
}
.sidebar .chapter-navigation h2 span {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}
.sidebar .chapter-button,
.sidebar .chapter-group > summary {
  color: #F4F9FE;
}
.sidebar .chapter-button.is-tone-idle,
.sidebar .chapter-group.is-tone-idle > summary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}
.sidebar .chapter-button.active,
.sidebar .chapter-group > .subblock-btn.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(186, 230, 253, 0.65);
  box-shadow: inset 3px 0 0 #BAE6FD;
}
.sidebar .chapter-status-tag.is-tone-idle {
  background: rgba(255, 255, 255, 0.16);
  color: #E2F0FC;
}

.cfg-topbar {
  background: linear-gradient(135deg, #134C80 0%, #1B64A4 62%, #2379C2 100%);
}
.header-period b {
  background: #14538A;
  color: #FFFFFF;
}
.choice-pills:not(.choice-pills-cards) .choice-pill.is-selected {
  background: #0072B8;
  border-color: #0072B8;
  color: #FFFFFF;
}
.ui-scale-opt.is-active,
.doc-preview-zoom-btn.is-active,
.doc-preview-exit-btn {
  background: #0072B8;
  border-color: #0072B8;
  color: #FFFFFF;
}
.ui-scale-opt.is-active:hover,
.doc-preview-exit-btn:hover {
  background: #0B5E99;
  border-color: #0B5E99;
}

/* 03｜「查看日期」升级为洋气晴空浮层时间卡（双端适用，点外部自动收起） */
.period-details {
  position: relative;
}
.period-details summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #d4e3ef;
  background: #f5f9fc;
  color: #14538A;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.period-details summary::-webkit-details-marker {
  display: none;
}
.period-details summary::after {
  content: "▾";
  font-size: 11px;
  opacity: 0.72;
  transition: transform 0.15s ease;
}
.period-details[open] summary {
  background: #e6f3fc;
  border-color: #8cc5ea;
  color: #0072B8;
}
.period-details[open] summary::after {
  transform: rotate(180deg);
}
.period-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 326px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cfe0ee;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(17, 71, 120, 0.16), 0 2px 6px rgba(17, 71, 120, 0.06);
  z-index: 320;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.period-popover-title {
  font-size: 12px;
  font-weight: 700;
  color: #14538A;
  padding-bottom: 7px;
  border-bottom: 1px solid #edf3f8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.period-popover-title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: #0072B8;
}
.period-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f7fafd;
  border: 1px solid #e6eff6;
}
.period-row.is-deadline {
  background: #fff9eb;
  border-color: #f4d898;
}
.period-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #5b748d;
  white-space: nowrap;
}
.period-row.is-deadline .period-lbl {
  color: #9a5b08;
}
.period-val {
  font-size: 13px;
  font-weight: 700;
  color: #173F66;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: normal;
}
.period-row.is-deadline .period-val {
  color: #8a4b04;
}

/* 04｜第 7 章预付款已收齐默认提示与超收策划追问卡 */
.fin-advance-done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #eefaf4;
  border: 1px solid #b6e6ce;
  color: #0f764e;
  font-size: 12.5px;
  font-weight: 600;
}
.fin-advance-ask {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff8eb;
  border: 1px solid #f2cf84;
  border-left: 4px solid #d97706;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fin-advance-ask.is-answered {
  background: #f1fbf6;
  border-color: #b7e4cd;
  border-left-color: #0F9D68;
}
.fin-advance-ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.fin-advance-ask-head strong {
  font-size: 13.5px;
  color: #92400e;
}
.fin-advance-ask.is-answered .fin-advance-ask-head strong {
  color: #0f6b47;
}
.fin-advance-ask-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #0F9D68;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
}
.fin-advance-ask p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b440e;
}
.fin-advance-ask.is-answered p {
  color: #275a45;
}

/* 05｜全站单行文字/备注框与招采组合框：固定宽度、到头自动换行、自动增高 */
.scalar-text-grow {
  width: 100%;
  min-height: 42px;
  align-content: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #cfdce6);
  border-radius: 8px;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scalar-text-grow:focus-within {
  border-color: #0072B8;
  box-shadow: 0 0 0 3px rgba(0, 114, 184, 0.14);
}
.scalar-text-grow.is-disabled {
  background: #f5f7f9;
  border-color: #e2e8ee;
  cursor: default;
}
.scalar-text-grow::after,
.scalar-text-grow > textarea.scalar-text-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  padding: 9px 11px;
  font-size: 14.5px;
  line-height: 1.5;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  resize: none !important;
  overflow: hidden !important;
}
.matter-place-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 招采可手输组合框自动换行 + 与整行等高居中 */
.field .table-scroll td .table-combo {
  align-items: stretch;
}
.field .table-scroll td .table-combo-grow {
  flex: 1 1 auto;
  display: grid;
  align-content: center;
  min-height: 40px;
  height: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: text;
}
.field .table-scroll td .table-combo-grow::after,
.field .table-scroll td .table-combo-grow > textarea.table-combo-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  margin: 0;
  padding: 8px 34px 8px 10px;
  font-size: 14px;
  line-height: 1.48;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  resize: none !important;
  overflow: hidden !important;
}

/* 桌面端不展示手机专属「分栏视图」选项（桌面端本来就常驻左侧栏） */
@media (min-width: 761px) {
  .ui-scale-opt-split {
    display: none;
  }
}

/* 06｜手机端：项目全称全宽多行 + 缩放下拉防目录遮挡 + 提亮侧栏 + 分栏全景视图 */
@media (max-width: 760px) {
  .app-header {
    position: relative;
    z-index: 75;
  }
  .app-header:has(.ui-scale-picker.is-open),
  .app-header:has(.period-details[open]) {
    z-index: 260;
  }
  .ui-scale-picker.is-open {
    z-index: 410;
  }
  .ui-scale-menu {
    z-index: 420;
    min-width: 224px;
  }
  .sidebar {
    background: linear-gradient(180deg, #154F85 0%, #1C609E 100%);
    box-shadow: 16px 0 40px rgba(17, 71, 120, 0.28);
  }
  .header-period .mobile-preview-btn {
    background: #0072B8;
    border-color: #0072B8;
  }

  /* 手机端第 2 行：项目名独占全宽并允许完整换行展示项目全称（彻底打破 6 字限制） */
  .header-project {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 6px 10px 4px;
  }
  .header-project .ns-trigger-project,
  .header-project select {
    width: 100%;
    height: auto !important;
    min-height: 40px;
    padding: 8px 12px;
    white-space: normal;
  }
  .header-project .ns-trigger-project .ns-trigger-text {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.38;
    text-align: left;
    word-break: break-word;
  }

  /* 第 3 行：精炼身份微条，不与项目名抢空间 */
  .header-right .identity {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    max-width: calc(100% - 20px);
    margin: 0 10px 6px;
    padding: 3px 10px;
    font-size: 11.5px;
    border-radius: 6px;
    background: #eef4f9;
    color: #36526d;
  }
  .header-period {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  /* 手机端查看日期浮层居中不越界 */
  .period-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 24px);
    margin-top: 8px;
  }

  .scalar-text-grow::after,
  .scalar-text-grow > textarea.scalar-text-input {
    font-size: 16px;
  }

}

/* The same desktop geometry is used by native viewport scaling and the WebView fallback. */
html.ui-panoramic-fallback { width: 980px; }
html.ui-panoramic-fallback body { width: 980px; }
html.ui-panoramic { --sidebar-width: 232px; }
html.ui-panoramic body .app-header { flex-wrap: nowrap; gap: 6px; padding-inline: 10px; }
html.ui-panoramic body .header-period { flex-wrap: nowrap; gap: 4px; padding-inline-start: 4px; }
html.ui-panoramic body .header-project .ns-trigger-project { width: 145px; }
html.ui-panoramic body .header-right { gap: 5px; }
html.ui-panoramic body :is(.sidebar, .sidebar *, .table-scroll, .table-scroll *, .doc-preview-stage) {
  touch-action: pan-x pan-y pinch-zoom;
}
html.ui-panoramic body .ui-scale-opt-split { display: flex; }
html.ui-panoramic body .sidebar .chapter-button,
html.ui-panoramic body .sidebar .chapter-group > summary { min-height: 33px; padding-block: 4px; }
/* === E646_UI34_LIGHTBLUE_SPLIT_UX_END === */

.draft-limit-note { margin: .4rem 0; padding: .4rem .6rem; background: #fff7ce; color: #6f4d00; border-radius: .35rem; }
.draft-limit-note.is-hard { color: #8b2020; background: #fff0ed; }
.field.limit-exceeded { outline: 2px solid #b83c35; outline-offset: 2px; }

/* === E650U1_CLARIFY_ISSUE_UX_START === */
.suggestion-card .suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.reason-handoff-panel {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.reason-handoff-panel .help {
  margin: 0;
}
.issue-explain-box .issue-explain-grow {
  width: 100%;
  margin: 0;
  border: 1px solid #c9dae6;
  border-radius: 7px;
  background: #ffffff;
}
.issue-explain-box .issue-explain-grow:focus-within {
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 3px rgba(0, 129, 204, 0.12);
}
.issue-explain-box .issue-explain-grow::after,
.issue-explain-box .issue-explain-grow > textarea {
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 82px;
  box-sizing: border-box;
  margin: 0;
}
.issue-explain-box .issue-explain-grow > textarea {
  border: 0;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 760px) {
  .issue-explain-box .issue-explain-grow::after,
  .issue-explain-box .issue-explain-grow > textarea {
    font-size: 16px;
    min-height: 92px;
  }
}
.issue-recheck-btn {
  margin-top: 8px;
}
/* === E650U1_CLARIFY_ISSUE_UX_END === */

/* === E651U1_BATCH_ACCOUNTS_START === */
.cfg-batch-names-input {
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid #c5d7e6;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  box-sizing: border-box;
}
.cfg-batch-names-input:focus {
  outline: none;
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 3px rgba(0, 114, 184, 0.14);
}
.cfg-batch-acc-wrap {
  width: 100%;
  max-height: 310px;
  overflow: auto;
  border: 1px solid #d5e4f0;
  border-radius: 10px;
  background: #ffffff;
}
.cfg-batch-acc-table,
.cfg-batch-cred-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.cfg-batch-acc-table th,
.cfg-batch-cred-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eff6fc;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 8px;
  text-align: left;
  border-bottom: 1px solid #d2e2ef;
}
.cfg-batch-acc-table td,
.cfg-batch-cred-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
  vertical-align: top;
  font-size: 13.5px;
}
.cfg-batch-acc-table tbody tr:last-child td,
.cfg-batch-cred-table tbody tr:last-child td {
  border-bottom: 0;
}
.cfg-ba-col-idx { width: 34px; text-align: center !important; color: var(--muted); }
.cfg-ba-col-name { width: 18%; min-width: 112px; }
.cfg-ba-col-user { width: 26%; min-width: 155px; }
.cfg-ba-col-role { width: 17%; min-width: 115px; }
.cfg-ba-col-pw { width: 27%; min-width: 168px; }
.cfg-ba-col-del { width: 58px; text-align: center !important; }
.cfg-ba-input,
.cfg-ba-select {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #c9dae8;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  box-sizing: border-box;
}
.cfg-ba-input:focus,
.cfg-ba-select:focus {
  outline: none;
  border-color: var(--blue-hover);
  box-shadow: 0 0 0 2px rgba(0, 114, 184, 0.14);
}
.cfg-ba-input-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.cfg-ba-input-err {
  border-color: #d12e26 !important;
  background: #fff5f5 !important;
}
.cfg-ba-pw-cell {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cfg-ba-pw-cell .cfg-ba-input {
  flex: 1 1 auto;
  min-width: 96px;
}
.cfg-ba-hint {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.35;
}
.cfg-ba-hint-warn { color: #9a5b00; }
.cfg-ba-hint-err { color: #c5221f; font-weight: 600; }
.cfg-ba-row-err td { background: #fff8f8; }
.cfg-batch-cred-pw {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--blue-strong);
  letter-spacing: 0.4px;
}
@media (max-width: 760px) {
  .cfg-batch-acc-wrap {
    max-height: 46vh;
  }
  .cfg-batch-acc-table thead,
  .cfg-batch-cred-table thead {
    display: none;
  }
  .cfg-batch-acc-table tbody,
  .cfg-batch-cred-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
    background: #f5f9fc;
  }
  .cfg-batch-acc-table tr,
  .cfg-batch-cred-table tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid #d5e4f0;
    border-radius: 10px;
    background: #ffffff;
  }
  .cfg-batch-acc-table td,
  .cfg-batch-cred-table td {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    border: 0;
    width: 100% !important;
    min-width: 0 !important;
    text-align: left !important;
  }
  .cfg-batch-acc-table td::before,
  .cfg-batch-cred-table td::before {
    content: attr(data-label);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
  }
  .cfg-ba-input,
  .cfg-ba-select,
  .cfg-batch-names-input {
    font-size: 16px;
  }
}
/* === E651U1_BATCH_ACCOUNTS_END === */

/* === E651U3_ROLE_PRESETS_MATRIX_START === */
.cfg-modal-top {
  z-index: 2400;
}
.cfg-modal-matrix {
  width: min(1440px, 96vw);
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.cfg-pm-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}
.cfg-pm-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.cfg-pm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px;
  background: #f2f8fd;
  border: 1px solid #d1e3f2;
  border-radius: 10px;
}
.cfg-pm-tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #134c80;
}
.cfg-pm-tool-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
}
.cfg-pm-tool-add select {
  flex: 1 1 180px;
  min-width: 170px;
}
.cfg-pm-cov-bar {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  border: 1px solid #cce0f0;
  background: #f3f9ff;
  color: #124877;
}
.cfg-pm-cov-bar.is-ok {
  border-color: #9ed7b4;
  background: #edf9f1;
  color: #166138;
}
.cfg-pm-cov-bar.is-miss {
  border-color: #f3a6a0;
  background: #fff3f2;
  color: #a81c17;
}
.cfg-pm-cov-head {
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cfg-pm-miss-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.cfg-pm-miss-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ffe0de;
  border: 1px solid #eb9690;
  color: #9e1713;
  font-size: 12px;
  font-weight: 700;
}
.cfg-pm-table-wrap {
  width: 100%;
  max-height: 54vh;
  overflow: auto;
  border: 1px solid #cde0ef;
  border-radius: 10px;
  background: #ffffff;
}
.cfg-pm-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.cfg-pm-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #eaf4fc;
  color: #114370;
  border-bottom: 2px solid #c3dbee;
  border-right: 1px solid #dceaf5;
  padding: 8px 6px;
  text-align: center;
  vertical-align: top;
  min-width: 78px;
  max-width: 98px;
  font-weight: 700;
}
.cfg-pm-table thead th.cfg-pm-sticky-col {
  left: 0;
  z-index: 5;
  text-align: left;
  min-width: 280px;
  max-width: 310px;
  width: 290px;
  padding: 10px 12px;
  background: #e1effb;
  border-right: 2px solid #b5d2ea;
}
.cfg-pm-table tbody td {
  border-bottom: 1px solid #e4eef6;
  border-right: 1px solid #edf3f8;
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  background: #ffffff;
}
.cfg-pm-table tbody td.cfg-pm-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  min-width: 280px;
  max-width: 310px;
  width: 290px;
  padding: 10px 12px;
  background: #fbfdff;
  border-right: 2px solid #c3dbee;
  vertical-align: top;
}
.cfg-pm-table tbody tr.cfg-pm-row-mgr td {
  background: #f4fbf7;
}
.cfg-pm-table tbody tr.cfg-pm-row-mgr td.cfg-pm-sticky-col {
  background: #ebf8f1;
}
.cfg-pm-table thead th.cfg-pm-col-missing {
  background: #ffe7e5;
  color: #a81c17;
  border-bottom-color: #e48c86;
}
.cfg-pm-table tbody td.cfg-pm-col-missing {
  background: #fff7f6;
}
.cfg-pm-table tbody tr.cfg-pm-row-mgr td.cfg-pm-col-missing {
  background: #f7f4f2;
}
.cfg-pm-table thead th.cfg-pm-col-over {
  background: #fff1db;
  color: #9e4c00;
}
.cfg-pm-th-title {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  word-break: break-all;
}
.cfg-pm-th-count {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #d7ebf9;
  color: #134c80;
}
.cfg-pm-col-missing .cfg-pm-th-count {
  background: #d93025;
  color: #ffffff;
}
.cfg-pm-col-over .cfg-pm-th-count {
  background: #d97706;
  color: #ffffff;
}
.cfg-pm-person-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.cfg-pm-person-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cfg-pm-person-name strong {
  font-size: 14px;
  color: #12293d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfg-pm-person-name small {
  font-size: 11.5px;
  color: #5e7487;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cfg-pm-person-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.cfg-pm-role-select {
  min-height: 28px;
  padding: 2px 6px;
  font-size: 12px;
  border: 1px solid #bfd6e8;
  border-radius: 6px;
  background: #ffffff;
  color: #143654;
}
.cfg-pm-remove-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #f0c2bf;
  background: #fff5f5;
  color: #c5221f;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.cfg-pm-remove-btn:hover {
  background: #ffe2e0;
}
.cfg-pm-mgr-banner {
  font-size: 12px;
  line-height: 1.45;
  color: #14633a;
  background: #dff4e7;
  border: 1px solid #a8dcbe;
  border-radius: 7px;
  padding: 5px 8px;
}
.cfg-pm-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cfg-pm-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #c3d9eb;
  background: #ffffff;
  color: #274a68;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.cfg-pm-chip:hover {
  border-color: #2276be;
  background: #edf6fd;
}
.cfg-pm-chip.is-active {
  background: #1a66ab;
  border-color: #134c80;
  color: #ffffff;
}
.cfg-pm-person-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 5px;
  border-top: 1px dashed #dde9f3;
  font-size: 11.5px;
  color: #4f6a80;
}
.cfg-pm-delegate-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11.5px;
}
.cfg-pm-cell-lbl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  cursor: pointer;
}
.cfg-pm-cell-lbl input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #1a66ab;
}
.cfg-pm-row-mgr .cfg-pm-cell-lbl {
  cursor: default;
}
.cfg-pm-row-mgr .cfg-pm-cell-lbl input[type="checkbox"] {
  accent-color: #1c804c;
  cursor: default;
}
.cfg-pm-footer {
  padding-top: 8px;
  border-top: 1px solid #dce8f2;
  background: #ffffff;
}
.cfg-badge-red {
  background: #fde8e7;
  color: #b42318;
  border: 1px solid #f5bab6;
}
.cfg-rp-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.25fr);
  gap: 14px;
  align-items: start;
}
.cfg-rp-list-panel,
.cfg-rp-editor-panel {
  border: 1px solid #d3e3f0;
  border-radius: 10px;
  padding: 12px;
  background: #fafdff;
}
.cfg-rp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow: auto;
  margin-top: 8px;
}
.cfg-rp-item {
  border: 1px solid #d5e5f2;
  border-radius: 9px;
  padding: 10px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cfg-rp-item.is-editing {
  border-color: #1a66ab;
  box-shadow: 0 0 0 2px rgba(26, 102, 171, 0.14);
}
.cfg-rp-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cfg-rp-item-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .cfg-rp-layout {
    grid-template-columns: 1fr;
  }
  .cfg-pm-table thead th.cfg-pm-sticky-col,
  .cfg-pm-table tbody td.cfg-pm-sticky-col {
    min-width: 215px;
    width: 215px;
  }
}
/* === E651U3_ROLE_PRESETS_MATRIX_END === */

/* === E651U4_UI_POLISH_START === */
/* 1. Owner home appeals & modification-requests card alignment */
.owner-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.owner-panel-head h1,
.owner-panel-head h2 {
  margin: 0;
}
.owner-panel-head p.muted {
  margin: 4px 0 0;
  font-size: 13.5px;
}
.owner-requests-panel {
  margin-top: 16px;
}

/* 2. Single-line project short names in tables without wrapping */
.cfg-proj-name-cell,
.project-short-cell {
  white-space: nowrap;
}
.cfg-proj-name-cell strong {
  white-space: nowrap;
  display: inline-block;
}

/* 3. Single-screen compact Project Permission Matrix (Plan A multi-select role picker) */
#matrix-modal.cfg-modal-backdrop {
  padding: 10px 12px;
}
.cfg-modal-matrix {
  width: min(1500px, calc(100vw - 116px));
  max-width: calc(100vw - 116px);
  max-height: 95vh;
  padding: 14px 16px;
}
.cfg-modal-matrix .cfg-modal-head {
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.cfg-modal-matrix .cfg-modal-head h3 {
  font-size: 16px;
}
.cfg-pm-body {
  gap: 6px;
}
.cfg-pm-form {
  gap: 6px;
  flex: 1 1 auto;
}
.cfg-pm-toolbar {
  padding: 6px 10px;
  gap: 8px 12px;
  border-radius: 8px;
}
.cfg-pm-tool-item {
  font-size: 13px;
}
.cfg-pm-tool-item select,
.cfg-pm-tool-add select {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}
.cfg-pm-body > .cfg-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}
.cfg-pm-cov-bar {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.cfg-pm-miss-tags {
  margin-top: 4px;
  gap: 4px;
}
.cfg-pm-miss-pill {
  padding: 1px 7px;
  font-size: 11px;
}
.cfg-pm-table-wrap {
  max-height: 64vh;
  flex: 1 1 auto;
  border-radius: 8px;
}
.cfg-pm-table {
  width: 100%;
  min-width: 100%;
  font-size: 12px;
}
.cfg-pm-table thead th {
  padding: 5px 2px 4px;
  min-width: 44px;
  width: 48px;
  max-width: 58px;
  line-height: 1.15;
  vertical-align: middle;
}
.cfg-pm-table thead th.cfg-pm-th-ch8 {
  box-shadow: inset 0 3px 0 #1f7bc4;
}
.cfg-pm-table thead th.cfg-pm-th-ch9 {
  box-shadow: inset 0 3px 0 #189878;
}
.cfg-pm-table thead th.cfg-pm-sticky-col {
  min-width: 234px;
  width: 236px;
  max-width: 248px;
  padding: 6px 8px;
  font-size: 12.5px;
  vertical-align: middle;
}
.cfg-pm-th-ch {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #36648b;
  line-height: 1.1;
}
.cfg-pm-th-title {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
}
.cfg-pm-th-count {
  display: inline-block;
  margin-top: 3px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 700;
}
.cfg-pm-table tbody td {
  padding: 4px 2px;
  min-width: 44px;
  width: 48px;
}
.cfg-pm-table tbody td.cfg-pm-sticky-col {
  min-width: 234px;
  width: 236px;
  max-width: 248px;
  padding: 6px 8px;
  vertical-align: middle;
}
/* Override global `td input { min-width: 104px !important; min-height: 38px; }` for compact crisp matrix checkboxes */
.cfg-pm-table td input[type="checkbox"],
.cfg-pm-cell-lbl input[type="checkbox"] {
  min-width: 0 !important;
  min-height: 0 !important;
  width: 15px !important;
  height: 15px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  accent-color: #1a66ab;
  vertical-align: middle;
}
.cfg-pm-row-mgr .cfg-pm-cell-lbl input[type="checkbox"] {
  accent-color: #1c804c;
  cursor: default;
}
.cfg-pm-cell-lbl {
  min-height: 28px;
  margin: 0;
}
.cfg-pm-person-top {
  gap: 5px;
  margin-bottom: 4px;
}
.cfg-pm-person-name {
  flex-direction: row;
  align-items: baseline;
  gap: 5px;
  overflow: hidden;
}
.cfg-pm-person-name strong {
  font-size: 13px;
  flex-shrink: 0;
}
.cfg-pm-person-name small {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfg-pm-role-select,
.cfg-pm-person-controls .ns-trigger {
  min-height: 24px !important;
  height: 24px;
  padding: 1px 6px !important;
  font-size: 11.5px !important;
  border-radius: 5px !important;
  gap: 3px;
}
.cfg-pm-toolbar .ns-trigger {
  min-height: 32px !important;
  height: 32px;
  padding: 3px 9px !important;
  font-size: 13px !important;
}
.cfg-pm-remove-btn {
  min-width: 0 !important;
  min-height: 0 !important;
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  font-size: 14px;
  line-height: 1;
  border-radius: 5px;
}
.cfg-pm-mgr-banner {
  font-size: 11px;
  line-height: 1.3;
  padding: 3px 7px;
  border-radius: 5px;
}
/* Plan A: Neat Multi-Select Role Picker Combobox */
.cfg-pm-role-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid #bfd6e8;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.cfg-pm-role-picker:hover,
.cfg-pm-role-picker.is-open {
  border-color: #1a66ab;
  box-shadow: 0 0 0 2px rgba(26, 102, 171, 0.14);
}
.cfg-pm-rp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}
.cfg-pm-rp-placeholder {
  font-size: 11.5px;
  color: #7b93a8;
  line-height: 1.4;
}
.cfg-pm-sel-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 4px 1px 6px;
  border-radius: 4px;
  background: #e6f2fc;
  border: 1px solid #b5d6f2;
  color: #124877;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
}
.cfg-pm-sel-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #2f6593;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.cfg-pm-sel-x:hover {
  background: #cde3f7;
  color: #0e385c;
}
.cfg-pm-rp-caret {
  flex: 0 0 auto;
  font-size: 11px;
  color: #547593;
  line-height: 1;
}
/* Floating Role Picker Popover (above .ns-overlay 2600) */
.cfg-pm-role-popover {
  position: fixed;
  z-index: 2650;
  background: #ffffff;
  border: 1px solid #b8d3e8;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 42, 70, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cfg-pm-rp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #eef6fd;
  border-bottom: 1px solid #d5e5f2;
}
.cfg-pm-rp-head strong {
  font-size: 12px;
  color: #124877;
}
.cfg-pm-rp-done {
  min-height: 0;
  padding: 2px 9px;
  border: 1px solid #1a66ab;
  border-radius: 5px;
  background: #1a66ab;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.cfg-pm-rp-done:hover {
  background: #134c80;
}
.cfg-pm-rp-list {
  padding: 6px;
  max-height: 256px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cfg-pm-rp-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  margin: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: #16324b;
  transition: background-color 0.12s ease;
}
.cfg-pm-rp-opt:hover {
  background: #f2f8fd;
}
.cfg-pm-rp-opt.is-selected {
  background: #e7f3fc;
  color: #10426e;
  font-weight: 700;
}
.cfg-pm-rp-opt input[type="checkbox"].cfg-pm-rp-cb {
  min-width: 0 !important;
  min-height: 0 !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #1a66ab;
  flex-shrink: 0;
}
.cfg-pm-rp-name {
  flex: 1 1 auto;
  min-width: 0;
}
.cfg-pm-rp-meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: #5c7891;
  background: #eef4f9;
  padding: 1px 6px;
  border-radius: 999px;
}
.cfg-pm-person-foot {
  margin-top: 4px;
  padding-top: 3px;
  font-size: 11px;
}
.cfg-pm-delegate-lbl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #365672;
}
.cfg-pm-delegate-lbl input[type="checkbox"] {
  min-width: 0 !important;
  min-height: 0 !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cfg-pm-block-cnt {
  font-size: 11px;
  color: #5c768d;
  white-space: nowrap;
}
.cfg-pm-footer {
  margin-top: 2px;
  padding-top: 6px;
}
#matrix-files-sec.is-empty {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px !important;
}
#matrix-files-sec.is-empty .cfg-inline-title {
  margin: 0 !important;
  font-size: 12px;
  white-space: nowrap;
}
#matrix-files-sec.is-empty .cfg-inline-title::after {
  content: "：";
}
#matrix-files-sec.is-empty .cfg-files-list {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
}
#matrix-files-sec.is-empty .cfg-help {
  margin: 0 !important;
  font-size: 12px;
  text-align: left !important;
}
@media (max-width: 960px) {
  .cfg-modal-matrix {
    width: 96vw;
    max-width: 96vw;
  }
}
@media (max-width: 760px) {
  .cfg-proj-name-cell,
  .cfg-proj-name-cell strong,
  .project-short-cell {
    white-space: normal;
  }
  .cfg-pm-table thead th.cfg-pm-sticky-col,
  .cfg-pm-table tbody td.cfg-pm-sticky-col {
    min-width: 196px;
    width: 196px;
    max-width: 210px;
  }
}
/* === E651U4_UI_POLISH_END === */

/* === E651U6_PENDING_UPLOAD_VOICE_START === */
.pending-upload-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0f7ff;
  border: 1.5px solid #93c5fd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pending-upload-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pending-upload-title-wrap strong {
  color: #134c80;
  font-size: 14px;
}

.pending-upload-sub {
  font-size: 12.5px;
  color: #475569;
}

.pending-upload-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pending-upload-card {
  background: #ffffff;
  border: 1px solid #cbd9e8;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-upload-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-upload-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #cbd9e8;
  flex-shrink: 0;
  background: #f8fafc;
}

.pending-upload-file-badge {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #134c80;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #93c5fd;
}

.pending-upload-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pending-upload-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
}

.pending-upload-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.pending-upload-tags span {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 999px;
}

.pending-caption-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-caption-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.caption-voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  min-height: 30px;
  font-size: 12.5px;
  border-radius: 8px;
  white-space: nowrap;
}

.caption-voice-btn.is-recording {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
}

.caption-voice-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 12px;
}

.pending-upload-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pending-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 2px;
}

@media (max-width: 760px) {
  .pending-upload-panel {
    padding: 10px;
  }
  .pending-upload-head {
    flex-direction: column;
    align-items: stretch;
  }
  .pending-upload-thumb,
  .pending-upload-file-badge {
    width: 48px;
    height: 48px;
  }
  .pending-upload-actions button {
    width: 100%;
  }
}
/* === E651U6_PENDING_UPLOAD_VOICE_END === */

/* === E651U7_BETA8_ADMIN_SIDEBAR_HISTORY_START === */
.cfg-topbar-inner {
  max-width: 1420px;
}

.cfg-main {
  max-width: 1420px;
}

.cfg-mobile-nav-btn {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.cfg-mobile-nav-btn[hidden] {
  display: none !important;
}

.cfg-mobile-nav-bars {
  font-size: 15px;
  line-height: 1;
}

.cfg-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.cfg-shell[hidden] {
  display: none !important;
}

.cfg-nav-scrim {
  display: none;
}

.cfg-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--line, #dbe5ee);
  border-radius: 14px;
  background: var(--surface, #ffffff);
  box-shadow: 0 4px 16px rgba(15, 39, 68, 0.05);
}

body.has-beta-banner .cfg-sidebar {
  top: calc(86px + var(--beta-banner-h, 36px));
}

.cfg-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 6px;
  border-bottom: 1px solid var(--line, #e6eef5);
}

.cfg-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted, #5c6f82);
}

.cfg-sidebar-close {
  display: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong, #cbd8e5);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  color: var(--ink, #172b4d);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cfg-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfg-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-secondary, #334e68);
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.cfg-nav-item:hover {
  background: #f0f6fc;
  color: #134c80;
}

.cfg-nav-item.is-active {
  border-color: #b7d7f0;
  background: linear-gradient(135deg, #e8f3fd 0%, #f1f8ff 100%);
  color: #0e4a80;
  font-weight: 700;
}

.cfg-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  border-radius: 0 3px 3px 0;
  background: #1b6eb8;
}

.cfg-nav-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cfg-nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #9cb5cc;
  flex-shrink: 0;
}

.cfg-nav-item.is-active .cfg-nav-dot {
  background: #1b6eb8;
}

.cfg-nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfg-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf3f8;
  color: #486581;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.cfg-nav-item.is-active .cfg-nav-badge {
  background: #1b6eb8;
  color: #ffffff;
}

.cfg-nav-badge-accent {
  background: #e1f0fc;
  color: #13548f;
}

.cfg-nav-badge-warn {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

.cfg-sidebar-foot {
  padding: 8px 8px 2px;
  border-top: 1px dashed var(--line, #e2ebf2);
}

.cfg-sidebar-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted, #627d98);
}

.cfg-content {
  min-width: 0;
}

.cfg-panel[hidden] {
  display: none !important;
}

.cfg-kpi-clickable {
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.cfg-kpi-clickable:hover {
  transform: translateY(-2px);
  border-color: #9dc7ea;
  box-shadow: 0 8px 20px rgba(19, 76, 128, 0.09);
}

.cfg-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cfg-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid var(--line, #dce6f0);
  border-radius: 12px;
  background: #f8fbfe;
  color: var(--ink, #172b4d);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.cfg-quick-tile strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #134c80;
}

.cfg-quick-tile span {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted, #5c6f82);
}

.cfg-quick-tile:hover {
  transform: translateY(-1px);
  border-color: #90c0e8;
  background: #eff7ff;
}

.cfg-quick-tile-accent {
  border-color: #c2ddf5;
  background: linear-gradient(135deg, #f2f8ff 0%, #eaf4fe 100%);
}

.cfg-search-inline {
  min-width: 190px;
  max-width: 240px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong, #c5d5e4);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  color: var(--ink, #172b4d);
  font-size: 13.5px;
}

.cfg-search-inline:focus {
  outline: none;
  border-color: #1b6eb8;
  box-shadow: 0 0 0 3px rgba(27, 110, 184, 0.14);
}

.cfg-history-head {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cfg-seg-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line, #d5e2ee);
  border-radius: 11px;
  background: #eef4fa;
  flex-shrink: 0;
}

.cfg-seg-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #486581;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.cfg-seg-tab.is-active {
  background: #134c80;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(19, 76, 128, 0.22);
}

.cfg-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line, #dce6f0);
  border-radius: 12px;
  background: #f7fafd;
}

.cfg-filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
  flex: 0 1 170px;
}

.cfg-filter-field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #52677c);
}

.cfg-filter-field input,
.cfg-filter-field select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong, #c5d5e4);
  border-radius: 8px;
  background: var(--surface, #ffffff);
  color: var(--ink, #172b4d);
  font-size: 13px;
}

.cfg-filter-narrow {
  min-width: 92px;
  flex: 0 1 100px;
}

.cfg-filter-grow {
  min-width: 190px;
  flex: 1 1 220px;
}

.cfg-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  background: #fff5f5;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.cfg-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cfg-filter-actions .cfg-btn {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

.cfg-history-status {
  min-height: 20px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted, #5c6f82);
}

.cfg-history-status.is-error {
  color: #c81e1e;
  font-weight: 600;
}

.cfg-nowrap {
  white-space: nowrap;
}

.cfg-cell-strong {
  font-weight: 650;
  color: var(--navy, #102a43);
}

.cfg-cell-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted, #627d98);
}

.cfg-change-summary {
  line-height: 1.5;
  word-break: break-word;
}

.cfg-conflict-badge {
  margin-top: 5px;
  display: inline-block;
}

.cfg-row-conflict td {
  background: #fff6f6;
}

.cfg-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line, #e4edf5);
}

.cfg-pager-info {
  font-size: 13px;
  color: var(--muted, #5c6f82);
}

.cfg-pager-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cfg-pager-page {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary, #334e68);
  font-variant-numeric: tabular-nums;
}

.cfg-diff-modal {
  max-width: 920px;
}

.cfg-diff-conflict {
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #f5b5b5;
  border-radius: 10px;
  background: #fff2f2;
  color: #b42318;
  font-size: 13.5px;
  font-weight: 600;
}

.cfg-diff-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 2px;
}

.cfg-diff-item {
  border: 1px solid var(--line, #dce6f0);
  border-radius: 12px;
  background: var(--surface, #ffffff);
  overflow: hidden;
}

.cfg-diff-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #e4edf5);
  background: #f6f9fc;
}

.cfg-diff-item-head strong {
  font-size: 14px;
  color: var(--navy, #102a43);
}

.cfg-diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px;
}

.cfg-diff-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  min-width: 0;
}

.cfg-diff-before {
  border-color: #f3c4c4;
  background: #fff6f6;
}

.cfg-diff-after {
  border-color: #b7e3c9;
  background: #f2fbf5;
}

.cfg-diff-col-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cfg-diff-before .cfg-diff-col-label {
  color: #b42318;
}

.cfg-diff-after .cfg-diff-col-label {
  color: #0f764a;
}

.cfg-diff-pre {
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink, #1f2937);
}

@media (max-width: 1120px) {
  .cfg-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .cfg-mobile-nav-btn {
    display: inline-flex;
  }

  .cfg-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .cfg-nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 940;
    background: rgba(10, 25, 47, 0.48);
    backdrop-filter: blur(2px);
  }

  .cfg-nav-scrim[hidden] {
    display: none !important;
  }

  .cfg-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 950;
    width: 268px;
    max-width: 82vw;
    border-radius: 0 16px 16px 0;
    padding: 18px 14px;
    transform: translateX(-106%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }

  body.has-beta-banner .cfg-sidebar {
    top: var(--beta-banner-h, 36px);
  }

  .cfg-sidebar.is-open {
    transform: translateX(0);
  }

  .cfg-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.cfg-nav-drawer-open {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .cfg-quick-grid {
    grid-template-columns: 1fr;
  }

  .cfg-search-inline {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .cfg-seg-tabs {
    width: 100%;
  }

  .cfg-seg-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 0 8px;
    font-size: 13px;
  }

  .cfg-filter-bar {
    padding: 12px;
  }

  .cfg-filter-field,
  .cfg-filter-narrow,
  .cfg-filter-grow {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cfg-filter-actions {
    width: 100%;
    margin-left: 0;
  }

  .cfg-filter-actions .cfg-btn {
    flex: 1 1 calc(50% - 6px);
  }

  .cfg-diff-grid {
    grid-template-columns: 1fr;
  }

  .cfg-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .cfg-pager-btns {
    justify-content: space-between;
  }
}
/* === E651U7_BETA8_ADMIN_SIDEBAR_HISTORY_END === */
