.annual-planning { display:grid; gap:18px; min-width:0; color:var(--ink); }
.plan-scope-toolbar,.plan-overview-filters { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.annual-planning > .plan-scope-toolbar { background:var(--panel); border-block:1px solid var(--line); padding:16px 20px; }
.plan-scope-name { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.plan-scope-switch button { min-height:36px; }
.plan-scope-switch button:disabled { opacity:.5; cursor:default; }
.plan-overview-filters { padding-inline:2px; }
.plan-overview-metrics .plan-metric:nth-child(4) strong { color:var(--green); }
.plan-overview-metrics .plan-metric:nth-child(5) strong,.plan-overdue { color:#b42338; }
.plan-summary-table { width:100%; min-width:960px; table-layout:fixed; font-size:13px; }
.plan-summary-table th,.plan-summary-table td { padding:14px 10px; white-space:normal; overflow-wrap:anywhere; vertical-align:middle; }
.plan-summary-table th:first-child { width:170px; text-align:left; }
.plan-summary-table tbody th { background:transparent; color:var(--ink); }
.plan-summary-table tbody th .btn { white-space:normal; text-align:left; padding:0; border:0; background:transparent; color:var(--brand); }
.plan-summary-table td { font-variant-numeric:tabular-nums; }
.plan-completion { display:grid; gap:6px; }
.plan-completion progress { width:100%; height:4px; border:0; accent-color:var(--green); }
.plan-completion progress::-webkit-progress-bar { background:var(--line-soft); }
.plan-completion progress::-webkit-progress-value { background:var(--green); }
.plan-month-table { min-width:1020px; }
.plan-month-table th:not(:first-child),.plan-month-table td { text-align:center; }
.plan-month-count { display:inline-grid; place-items:center; min-width:28px; height:26px; padding-inline:4px; background:#e8f3ef; color:#146648; border-radius:3px; }
.plan-authorized-details > summary { cursor:pointer; padding:14px 20px; background:var(--panel); border-block:1px solid var(--line); font-weight:600; font-size:14px; }
.plan-period-totals { display:flex; flex-wrap:wrap; gap:24px; font-size:13px; border-bottom:1px solid var(--line); padding:0 4px 14px; }
.plan-overview-table { width:100%; min-width:830px; table-layout:fixed; font-size:13px; }
.plan-overview-table th,.plan-overview-table td { padding:12px 10px; white-space:normal; overflow-wrap:anywhere; vertical-align:middle; }
.plan-overview-table small { display:block; color:var(--muted); font-size:12px; margin-top:5px; }
.plan-overview-table .btn { padding:5px 8px; white-space:nowrap; }
.plan-overview-name { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; text-align:left; white-space:normal; line-height:1.6; }
.annual-planning button, .annual-planning input, .annual-planning select { font:inherit; }
.plan-section { background:var(--panel); padding:18px 20px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); min-width:0; }
.plan-section h2 { font-size:15px; margin:0; font-weight:700; }
.plan-section-head { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.plan-section .toolbar { flex-wrap:wrap; margin-bottom:16px; gap:8px; }
.plan-metrics { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); background:var(--panel); border-block:1px solid var(--line); }
.plan-metric { display:grid; align-content:start; gap:8px; padding:18px 20px; border-right:1px solid var(--line-soft); min-width:0; }
.plan-metric span, .plan-metric small { color:var(--muted); overflow-wrap:anywhere; }
.plan-metric strong { font-size:28px; line-height:1.2; }
.plan-metric small { min-height:18px; font-size:12px; }
.plan-tabs { display:flex; flex-wrap:wrap; border-bottom:1px solid var(--line); gap:6px; background:var(--panel); padding:0 12px; }
.plan-tabs button { background:transparent; color:var(--muted); border:0; border-bottom:3px solid transparent; padding:14px 18px; min-height:48px; cursor:pointer; }
.plan-tabs button[aria-selected="true"] { color:var(--brand); border-bottom-color:var(--brand); font-weight:700; }
.plan-tabs button:hover { background:var(--brand-soft); }
.plan-tabs span { margin-left:8px; font-size:12px; }
.plan-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); list-style:none; margin:18px 0 24px; padding:0; }
.plan-steps li { position:relative; display:grid; justify-items:center; text-align:center; gap:6px; padding:0 8px; color:var(--muted); }
.plan-steps li:not(:last-child)::after { content:""; position:absolute; height:1px; background:var(--line); width:calc(100% - 52px); top:14px; left:calc(50% + 26px); }
.plan-steps li.done::after { background:var(--green); }
.plan-step-icon { width:28px; height:28px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; font-size:13px; background:var(--panel); }
.plan-steps .done .plan-step-icon { background:var(--green); color:var(--panel); border-color:var(--green); }
.plan-steps .current { color:var(--brand); }
.plan-steps .current .plan-step-icon { border:2px solid var(--brand); }
.plan-steps strong { font-size:14px; }
.plan-steps small { font-size:12px; }
.plan-category-progress { display:grid; grid-template-columns:repeat(5,minmax(136px,1fr)); gap:12px; overflow-x:auto; padding-bottom:4px; }
.plan-category-progress span { display:flex; justify-content:space-between; gap:6px; font-size:12px; color:var(--muted); white-space:nowrap; }
.plan-category-progress b { font-weight:400; white-space:nowrap; }
.plan-category-progress progress { display:block; width:100%; height:5px; border:0; margin-top:7px; border-radius:3px; overflow:hidden; }
.plan-category-progress progress::-webkit-progress-bar { background:var(--line-soft); }
.plan-category-progress progress::-webkit-progress-value { background:var(--brand); }
.plan-table { width:100%; min-width:1320px; font-size:13px; }
.plan-table th, .plan-table td { padding:12px 10px; vertical-align:top; }
.plan-table th { white-space:nowrap; }
.plan-table .plan-name { min-width:180px; max-width:300px; white-space:normal; overflow-wrap:anywhere; }
.plan-name small { display:block; color:var(--muted); font-size:12px; margin-top:6px; }
.plan-row-actions { display:flex; gap:6px; flex-wrap:wrap; min-width:140px; }
.plan-row-actions .btn { padding:4px 8px; font-size:12px; flex:none; white-space:nowrap; }
.plan-record-table { width:var(--plan-table-width); min-width:var(--plan-table-width); table-layout:fixed; }
.plan-record-table td { white-space:normal; overflow-wrap:anywhere; }
.plan-record-table .plan-name { min-width:0; max-width:none; }
.plan-record-table .plan-row-actions { min-width:0; }
.plan-record-table .plan-code { font-size:12px; font-variant-numeric:tabular-nums; }
.plan-record-table small,.plan-period span { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.plan-period { font-variant-numeric:tabular-nums; }
.plan-period time,.plan-period span { white-space:nowrap; }
.plan-pagination { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-top:14px; color:var(--muted); font-size:12px; }
.plan-segments { display:flex; gap:0; }
.plan-segments button { padding:6px 10px; background:var(--panel); border:1px solid var(--line); color:var(--muted); cursor:pointer; }
.plan-segments button[aria-pressed="true"] { background:var(--brand-soft); color:var(--brand); border-color:var(--brand); }
.plan-gantt-scroll { overflow:auto; }
.plan-gantt { min-width:1060px; }
.plan-gantt-head, .plan-gantt-row { display:grid; grid-template-columns:400px minmax(660px,1fr); border-bottom:1px solid var(--line-soft); }
.plan-gantt-head { background:var(--page); }
.plan-gantt-head strong { padding:12px; font-size:13px; }
.plan-gantt-head>div { display:grid; grid-template-columns:repeat(var(--plan-columns),minmax(0,1fr)); text-align:center; align-items:center; font-size:12px; }
.plan-gantt-row>button { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center; background:transparent; text-align:left; border:0; border-right:1px solid var(--line-soft); padding:10px 12px; min-height:44px; color:var(--ink); cursor:pointer; }
.plan-gantt-name { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.plan-gantt-owner { color:var(--muted); font-size:12px; white-space:nowrap; max-width:88px; overflow:hidden; text-overflow:ellipsis; }
.plan-gantt-row small { color:var(--muted); font-size:12px; white-space:nowrap; }
.plan-gantt-track { position:relative; min-height:44px; background-image:linear-gradient(to right,var(--line-soft) 1px,transparent 1px); background-size:calc(100% / var(--plan-columns)) 100%; }
.plan-gantt-bar { position:absolute; top:14px; height:16px; min-width:3px; padding:0; background:var(--brand); border:0; border-radius:3px; cursor:pointer; }
.plan-gantt-bar.approved { background:var(--green); }
.plan-batch-table { min-width:1040px; table-layout:fixed; }
.plan-batch-table th:first-child { width:160px; }
.plan-batch-table th:nth-child(2) { width:260px; }
.plan-batch-table td { overflow-wrap:anywhere; }
.annual-planning button:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
.annual-planning .work-error { overflow-wrap:anywhere; }
#annualPlanForm .plan-choice-group { padding:0; margin:0; border:0; min-width:0; }
.plan-choice-group legend { color:var(--muted); font-size:13px; margin-bottom:8px; }
.plan-choice-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; max-height:190px; overflow:auto; padding:2px; }
.plan-choice-list:has([name="focusCycles"]) { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:none; overflow:visible; }
.work-dialog:has(#planTerminationForm) { height:fit-content; }
.work-fields .plan-choice-list label { display:flex; flex-direction:row; align-items:flex-start; gap:8px; min-width:0; color:var(--ink); font-size:13px; line-height:20px; }
.work-fields .plan-choice-list input { width:16px; height:16px; flex:0 0 16px; margin-top:2px; }
.plan-choice-list span { overflow-wrap:anywhere; }
.plan-ai-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#planAiPreview textarea { width:100%; box-sizing:border-box; }
#annualPlanForm [hidden] { display:none!important; }
.plan-editor { display:grid; gap:20px; min-width:0; }
.plan-form-section { min-width:0; }
.plan-form-section > h3 { position:relative; margin:0 0 14px; padding:10px 16px; background:#edf4fc; color:#163e74; font-size:14px; line-height:20px; border-block:1px solid #e0ebf7; }
.plan-form-section > h3::before { content:""; position:absolute; left:6px; top:11px; bottom:11px; width:3px; background:#2563eb; }
.plan-form-section > .work-fields { padding:0 8px; }
#annualPlanForm .wide { grid-column:1 / -1; }
.plan-basic-section { container:plan-basic / inline-size; }
#annualPlanForm .plan-basic-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
#annualPlanForm .plan-basic-fields > * { min-width:0; }
.plan-name-field { min-width:0; }
@container plan-basic (min-width:1050px) {
  #annualPlanForm .plan-basic-fields { grid-template-columns:96px minmax(240px,1fr) 152px 210px 124px; }
}
@container plan-basic (max-width:520px) {
  #annualPlanForm .plan-basic-fields { grid-template-columns:minmax(0,1fr); }
}
.plan-contact-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 8px 12px; }
#annualPlanForm [data-plan-year] { appearance:textfield; background:var(--page); }
#annualPlanForm [data-plan-year]::-webkit-inner-spin-button, #annualPlanForm [data-plan-year]::-webkit-outer-spin-button { appearance:none; margin:0; }
.plan-contact-toolbar input { flex:1 1 260px; height:36px; padding:6px 10px; border:1px solid #d4e0ee; border-radius:6px; min-width:0; font:inherit; }
.plan-contact-toolbar span { font-size:12px; color:var(--muted); white-space:nowrap; }
.plan-scope-toolbar > label { display:flex; flex:0 0 auto; align-items:center; gap:8px; white-space:nowrap; margin:0; }
.plan-scope-toolbar > label select { width:112px; height:36px; margin:0; }
.plan-contact-filters { display:flex; flex:1 1 400px; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.plan-contact-actions { display:flex; gap:6px; flex-wrap:wrap; }
.plan-contact-actions .btn { min-height:34px; padding:6px 10px; white-space:nowrap; }
.plan-contact-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; max-height:240px; overflow:auto; padding:0 8px; }
.plan-contact-list label { display:flex; align-items:flex-start; gap:10px; padding:10px 4px; border-bottom:1px solid #e5edf5; min-width:0; cursor:pointer; }
.plan-contact-list input { flex:0 0 16px; width:16px; height:16px; margin-top:2px; }
.plan-contact-list span { min-width:0; overflow-wrap:anywhere; font-size:13px; }
.plan-contact-list small { display:block; font-size:12px; line-height:1.6; color:var(--muted); margin-top:4px; }
#planContactEmpty { padding:8px; }
@media(max-width:600px) { .plan-contact-list { grid-template-columns:1fr; }.plan-form-section > .work-fields { padding:0; }.plan-contact-toolbar { margin-inline:0; } }
@media(max-width:600px) { .plan-choice-list { grid-template-columns:1fr; } }
@media(max-width:900px) { .plan-choice-list:has([name="focusCycles"]) { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .plan-choice-list:has([name="focusCycles"]) { grid-template-columns:minmax(0,1fr); } }
@media(max-width:1100px) { .plan-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .plan-section { padding:14px 12px; } .plan-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .plan-metric { padding:14px 12px; } .plan-tabs button { padding:12px 10px; } .plan-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; } .plan-steps li::after { display:none; } .plan-section .input { min-width:0; width:100%; } }
.plan-bulk-list { max-height:360px; overflow:auto; }
.plan-bulk-list .work-table { min-width:0; table-layout:fixed; }
.plan-bulk-list th,.plan-bulk-list td { white-space:normal; overflow-wrap:anywhere; }
.plan-bulk-list th:first-child { width:180px; }
.plan-bulk-list th:last-child { width:120px; }
.plan-bulk-scope { margin:12px 0; }
.plan-bulk-scope summary { cursor:pointer; margin-bottom:8px; }
/* Overview-only layout; compilation, ledger and editors retain their existing styling. */
.plan-overview { gap:16px; container:plan-overview / inline-size; letter-spacing:0; }
.plan-overview > .plan-overview-toolbar { border:0; padding:16px; gap:10px; }
.plan-overview-toolbar .select { width:auto; min-width:108px; max-width:188px; }
.plan-overview-asof { margin-left:auto; white-space:nowrap; font-size:12px; color:#667e9f; }
.plan-overview .plan-segments { flex:none; }
.plan-overview .spacer { flex:1; }
.plan-overview .plan-segments button { min-height:36px; white-space:nowrap; }
.plan-overview .plan-segments button:first-child { border-radius:6px 0 0 6px; }
.plan-overview .plan-segments button:last-child { border-radius:0 6px 6px 0; }
.plan-overview .plan-segments button + button { margin-left:-1px; }
.plan-overview .plan-segments button[aria-pressed="true"] { background:#eaf1ff; font-weight:600; position:relative; }
.plan-overview-aux { display:flex; gap:8px 16px; flex-wrap:wrap; font-size:12px; color:var(--muted); padding:0 2px; }
.plan-overview-aux b { color:var(--ink); margin-left:4px; font-weight:600; }
.plan-overview-columns { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; align-items:stretch; min-width:0; }
.plan-overview-columns>.plan-section { display:flex; flex-direction:column; }
.plan-overview-columns .plan-section-head { min-height:32px; }
.plan-summary-extra { margin-top:auto; padding-top:18px; }
.plan-overview-periods { margin-top:12px; padding-top:12px; border-top:1px solid var(--line-soft); }
.plan-overview-pagination { margin-top:auto; padding-top:16px; flex-wrap:wrap; gap:8px; }
.plan-overview-pagination .select { width:110px; height:32px; padding:4px 8px; }
.plan-overview-pagination .btn { padding:4px 8px; }
.plan-overview-deadline time { white-space:nowrap; font-variant-numeric:tabular-nums; }
.plan-overview .plan-section { border:0; padding:18px 16px; }
.plan-overview .plan-section-head { margin-bottom:14px; gap:8px; }
.plan-overview .plan-overview-table { min-width:800px; }
.plan-overview .plan-overview-table th,.plan-overview .plan-overview-table td { padding:12px 8px; }
.plan-overview-table .plan-overdue { color:#b42338; }
.plan-overview .plan-summary-table { min-width:430px; }
.plan-overview .plan-summary-table th:first-child { width:auto; }
.plan-overview .plan-summary-table th,.plan-overview .plan-summary-table td { padding:14px 6px; font-size:12px; text-align:center; }
.plan-overview .plan-summary-table th:first-child { text-align:left; }
.plan-overview .plan-summary-table tbody th .btn { line-height:1.6; }
.plan-overview .plan-summary-table tbody tr:hover { background:#f3f7fc; }
.plan-overview .plan-summary-table tfoot { background:#edf3fc; font-weight:700; border-top:1px solid var(--line); }
.plan-summary-foot { display:flex; justify-content:space-between; gap:16px; padding-top:18px; font-size:12px; color:var(--muted); }
.plan-summary-foot>span:last-child { text-align:right; color:var(--ink); }
.plan-summary-foot small { display:block; color:var(--muted); margin-top:6px; }
.plan-overview .plan-gantt { min-width:960px; }
.plan-overview .plan-gantt-head,.plan-overview .plan-gantt-row { grid-template-columns:300px minmax(660px,1fr); }
.plan-overview .plan-gantt-head>div,.plan-gantt-grid { grid-template-columns:var(--plan-tracks); }
.plan-overview .plan-gantt-head>div { position:relative; min-height:42px; }
.plan-overview .plan-gantt-track { background:none; }
.plan-gantt-grid { position:absolute; inset:0; display:grid; pointer-events:none; }
.plan-gantt-grid span { border-left:1px solid var(--line-soft); }
.plan-today-line { position:absolute; top:0; bottom:0; width:0; border-left:2px dashed #bf3e4e; pointer-events:none; z-index:2; }
.plan-overview .state-pending,.plan-overview .state-not_started { background:#a2b0c7; }
.plan-overview .state-in_progress,.plan-overview .state-due { background:#377ce1; }
.plan-overview .state-completed { background:#189c78; }
.plan-overview .state-unapproved { background:#e5ebf4; border:1px dashed #9daec6; }
.plan-overview .state-suspended,.plan-overview .state-terminated { background:#ae8c5c; }
.plan-overview .is-overdue { box-shadow:inset 0 -4px #d84859; }
.plan-overview .plan-gantt-bar { min-width:0; border-radius:3px; height:18px; }
.plan-overview .plan-gantt-bar:hover { outline:2px solid var(--ink); outline-offset:2px; }
.plan-overview .plan-gantt-row>button { grid-template-columns:minmax(0,1fr) auto; row-gap:3px; }
.plan-overview .plan-gantt-row>button small { grid-column:1/-1; }
.plan-period-load { position:relative; display:inline-flex; align-items:center; gap:8px; padding:8px 14px; font-size:12px; color:var(--muted); }
.plan-schedule-legend { display:flex; flex-wrap:wrap; gap:10px 18px; margin:0 0 14px; color:var(--muted); font-size:12px; }
.plan-schedule-legend>span { display:flex; align-items:center; gap:6px; }
.plan-schedule-legend i { width:12px; height:10px; display:inline-block; border-radius:2px; }
.plan-schedule-legend .today { width:0; border-left:2px dashed #bf3e4e; border-radius:0; }
@container plan-overview (min-width:1316px) { .plan-overview-columns { grid-template-columns:minmax(832px,1.86fr) minmax(464px,1fr); } }
.plan-recurrence-fields { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px; }
.plan-period-summary { display:block;white-space:normal;margin-top:5px;color:#617392; }
button.plan-period-summary { border:0;background:none;padding:0;font:inherit;font-size:12px;cursor:pointer;text-align:left; }
[data-period-row] { cursor:pointer; }
[data-period-row]:focus-visible { outline:2px solid #2461ed;outline-offset:-2px; }
.period-chevron { display:inline-block;transition:transform .15s;width:12px;text-align:center; }
[aria-expanded="true"]>.period-chevron { transform:rotate(90deg); }
.plan-period-expansion { background:#f8fafc;padding:16px!important; }
.plan-period-expansion>.table-wrap { position:sticky;left:0;width:var(--period-width);max-width:100%; }
.plan-period-table { min-width:700px; }
.plan-period-overdue { color:#b42318; }
.plan-period-files { list-style:none;padding:0; }
.plan-period-files li { display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0; }
.plan-period-files button { overflow-wrap:anywhere;max-width:100%; }
.plan-period-attachment-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);margin:12px 0; }
.plan-period-attachment-heading .work-section-heading { border:0;margin:0;width:auto; }
.plan-period-attachment-heading > button { display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;margin-bottom:6px; }
.plan-period-files { display:flex;flex-wrap:wrap;gap:10px; }
.plan-period-files li.plan-period-file { position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:180px;max-width:min(100%,440px);border:1px solid var(--line);border-radius:6px;padding:10px 38px 10px 12px;margin:0; }
.plan-period-file-name { white-space:normal;text-align:left;line-height:1.5; }
.plan-period-file-remove { position:absolute;top:4px;right:4px;display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:4px;background:transparent;cursor:pointer; }
.plan-period-file-remove:hover { background:var(--page); }
.plan-period-file-remove:focus-visible { outline:2px solid var(--brand); }
.plan-period-event { margin:12px 0;color:var(--muted);font-size:12px;overflow-wrap:anywhere; }
.plan-period-event summary { cursor:pointer; }
#planPeriodForm>label { display:flex;flex-direction:column;gap:8px; }
#planPeriodForm textarea { width:100%;box-sizing:border-box; }
@media(max-width:600px){.plan-recurrence-fields { grid-template-columns:1fr; }}
@media (max-width:600px) {
  .plan-bulk-list th:first-child { width:132px; }
  .plan-bulk-list th:last-child { width:78px; }
}

/* 计划总览 · 逾期周报三块 */
.plan-overdue-report { margin-top:4px; }
.plan-overdue-report h3 { margin:0 0 10px; font-size:14px; font-weight:600; }
.plan-overdue-grid { display:grid; grid-template-columns:minmax(0,0.9fr) minmax(0,1.4fr); gap:20px; align-items:start; }
.plan-overdue-tasks { margin-top:18px; }
.plan-overdue-tasks > .hint { display:inline-block; margin:0 0 10px 8px; color:var(--muted); font-size:12px; }
.plan-overdue-table { width:100%; min-width:0; font-size:13px; }
.plan-overdue-table th,.plan-overdue-table td { padding:10px 8px; vertical-align:middle; }
.plan-overdue-table small { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
@media (max-width:1100px){ .plan-overdue-grid { grid-template-columns:1fr; } }
