.cpd-workbench { min-height: 650px; height: calc(100vh - 278px); display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; color: #17324d; }
.cpd-layout { min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 10px; }
.cpd-form-panel, .cpd-table-panel, .cpd-draft-panel { min-height: 0; box-sizing: border-box; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(41, 72, 107, .06); }
.cpd-form-panel { padding: 14px; overflow: auto; }
.cpd-workbench h3 { margin: 0 0 10px; font-size: 16px; color: #183b5b; }
.cpd-form-panel label { display: grid; gap: 5px; margin-bottom: 9px; font-size: 13px; font-weight: 600; color: #526b83; }
.cpd-form-panel input, .cpd-form-panel select, .cpd-form-panel textarea { width: 100%; box-sizing: border-box; border: 1px solid #b9c9db; border-radius: 5px; padding: 8px 9px; font: inherit; color: #17324d; resize: vertical; }
.cpd-form-panel textarea { min-height: 48px; }
.cpd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cpd-actions button { border: 1px solid #b9c9db; border-radius: 5px; padding: 8px 16px; color: #17324d; background: #fff; font-weight: 700; cursor: pointer; }
.cpd-actions .cpd-primary { color: #fff; background: #1769aa; border-color: #1769aa; }
.cpd-actions button:disabled { opacity: .5; cursor: not-allowed; }
.cpd-table-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 14px; }
.cpd-draft-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 14px; grid-column: 1 / -1; }
.cpd-table-scroll { min-height: 0; overflow: auto; border: 1px solid #d8e1eb; }
.cpd-table-panel table, .cpd-draft-panel table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.cpd-table-panel th, .cpd-draft-panel th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; color: #38556f; background: #edf3f8; border-bottom: 1px solid #ccd9e6; }
.cpd-table-panel td, .cpd-draft-panel td { padding: 9px 10px; border-bottom: 1px solid #e5ebf1; vertical-align: top; }
.cpd-table-panel tbody tr { cursor: pointer; }
.cpd-table-panel tbody tr:hover, .cpd-table-panel tbody tr.selected { background: #eaf5ff; }
.cpd-name { min-width: 240px; white-space: normal; }
.cpd-empty { text-align: center; color: #778a9d; padding: 28px !important; }
.cpd-status, .cpd-error { border: 1px solid #c8d8e8; border-radius: 6px; padding: 9px 12px; background: #f4f8fb; font-size: 13px; }
.cpd-error { display: grid; gap: 3px; margin-bottom: 8px; color: #9f2929; border-color: #f0b9b9; background: #fff4f4; }
@media (max-width: 1050px) { .cpd-workbench { height: auto; } .cpd-layout { grid-template-columns: 1fr; } .cpd-table-panel, .cpd-draft-panel { min-height: 500px; } }

/* ===== 现场进度草稿面板（mode=site-progress）专用布局 ===== */
.cpd-site-progress { grid-template-rows: auto minmax(0, 1fr) auto; }
.cpd-stats-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.cpd-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(41, 72, 107, .06); }
.cpd-stat-label { font-size: 12px; color: #526b83; font-weight: 600; }
.cpd-stat-value { font-size: 18px; font-weight: 700; color: #183b5b; }
.cpd-site-layout { min-height: 0; display: grid; grid-template-columns: 1.1fr 0.9fr; grid-template-rows: minmax(220px, 1fr) minmax(200px, 0.85fr); gap: 10px; }
.cpd-sp-draft { grid-column: 1; grid-row: 1; }
.cpd-message-panel { grid-column: 2; grid-row: 1; min-height: 0; box-sizing: border-box; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(41, 72, 107, .06); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px; }
.cpd-message-panel h3 { margin: 0 0 10px; font-size: 16px; color: #183b5b; }
.cpd-message-panel .cpd-table-scroll { min-height: 160px; }
.cpd-message-panel table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 13px; }
.cpd-message-panel th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; color: #38556f; background: #edf3f8; border-bottom: 1px solid #ccd9e6; }
.cpd-message-panel td { padding: 9px 10px; border-bottom: 1px solid #e5ebf1; vertical-align: top; }
.cpd-message-panel tbody tr { cursor: pointer; }
.cpd-message-panel tbody tr:hover, .cpd-message-panel tbody tr.selected { background: #eaf5ff; }
.cpd-raw-text { margin-top: 8px; width: 100%; box-sizing: border-box; border: 1px solid #b9c9db; border-radius: 5px; padding: 8px 9px; font: inherit; color: #17324d; resize: vertical; min-height: 80px; background: #f4f8fb; }
.cpd-exception-panel { grid-column: 1 / -1; grid-row: 2; min-height: 0; box-sizing: border-box; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(41, 72, 107, .06); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 14px; }
.cpd-exception-panel h3 { margin: 0 0 10px; font-size: 16px; color: #183b5b; }
.cpd-exception-panel .cpd-table-scroll { min-height: 140px; }
.cpd-exception-panel table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
.cpd-exception-panel th { position: sticky; top: 0; z-index: 1; padding: 9px 10px; text-align: left; color: #38556f; background: #edf3f8; border-bottom: 1px solid #ccd9e6; }
.cpd-exception-panel td { padding: 9px 10px; border-bottom: 1px solid #e5ebf1; vertical-align: top; }
.cpd-error-cell { color: #9f2929; background: #fff4f4; text-align: center; padding: 18px !important; }
@media (max-width: 1050px) { .cpd-site-layout { grid-template-columns: 1fr; grid-template-rows: auto auto auto; } .cpd-sp-draft, .cpd-message-panel, .cpd-exception-panel { grid-column: 1; grid-row: auto; min-height: 320px; } }
