.service-bottom-nav{grid-template-columns:repeat(6,1fr)!important}.project-filter-row{display:grid;grid-template-columns:minmax(240px,1fr) 180px auto auto;gap:8px;align-items:center}.project-create-summary{cursor:pointer;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:4px}.project-create-summary span{font-size:13px;color:#64748b}.project-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.project-form label{display:flex;flex-direction:column;gap:5px;font-weight:800}.project-form .project-full{grid-column:1/-1}.project-form-actions{display:flex!important;flex-direction:row!important;align-items:center;gap:10px}.project-list{display:grid;gap:10px}.project-row{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid #dbe5f1;border-radius:16px;padding:15px;background:#fff}.project-row.is-closed{background:#f8fafc;opacity:.82}.project-row-main{min-width:0;flex:1}.project-row-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.project-row-top>b{font-size:18px}.project-status,.project-entry-type{display:inline-flex;padding:4px 9px;border-radius:999px;background:#eef4ff;color:#245184;font-size:12px;font-weight:900}.status-closed{background:#edf0f4;color:#596579}.status-agency_processing,.status-tracking{background:#fff4df;color:#8a5b00}.status-pending_acceptance{background:#eefbf3;color:#177545}.project-meta{font-size:13px;color:#64748b;margin-top:5px}.project-detail-title{margin-bottom:14px}.project-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:14px}.project-detail-grid>div{padding:12px;border-radius:13px;background:#f7f9fc;border:1px solid #e3eaf3}.project-detail-grid span{display:block;font-size:12px;color:#64748b}.project-detail-grid b{display:block;margin-top:4px}.project-editor{border:1px solid #dbe5f1;border-radius:14px;padding:12px;margin-bottom:16px}.project-editor summary{cursor:pointer}.project-subsection{border-top:1px solid #e8edf4;padding-top:18px;margin-top:18px}.project-timeline{position:relative;display:grid;gap:14px;margin-left:8px}.timeline-item{position:relative;padding-left:26px}.timeline-item:before{content:"";position:absolute;left:5px;top:18px;bottom:-18px;width:2px;background:#dbe5f1}.timeline-item:last-child:before{display:none}.timeline-dot{position:absolute;left:0;top:8px;width:12px;height:12px;border-radius:50%;background:#1769e0;box-shadow:0 0 0 4px #eaf2ff}.timeline-content{border:1px solid #dbe5f1;border-radius:15px;padding:14px;background:#fff}.timeline-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.timeline-top>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.timeline-top time{font-size:12px;color:#64748b;white-space:nowrap}.timeline-content p{line-height:1.7}.project-followup{margin-top:8px;padding:8px 10px;border-radius:10px;background:#fff7e8;color:#8a5b00;font-weight:800}.timeline-photos{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px}.timeline-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px}.timeline-foot{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:10px;padding-top:10px;border-top:1px dashed #e2e8f0;font-size:12px;color:#64748b}.timeline-foot button{min-height:34px;padding:6px 10px}.project-link-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:12px}.project-linked-posts{display:grid;gap:8px}.project-linked-post{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:11px 12px;border:1px solid #e1e8f1;border-radius:12px;background:#f9fbfd}.project-linked-post b,.project-linked-post span{display:block}.project-linked-post span{font-size:12px;color:#64748b;margin-top:3px}.project-linked-post>div:last-child{display:flex;gap:6px}.project-linked-post a{display:inline-flex;align-items:center;text-decoration:none}.project-link-field{display:block;margin-top:12px}.project-link-field>.hint{display:block;font-weight:400}@media(max-width:820px){.service-bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr))!important}.service-nav-btn b{font-size:12px!important}.project-filter-row,.project-form,.project-detail-grid{grid-template-columns:1fr}.project-form .project-full{grid-column:auto}.project-row{align-items:stretch;flex-direction:column}.project-row>button{width:100%}.timeline-top{flex-direction:column}.timeline-photos{grid-template-columns:repeat(2,1fr)}.project-link-row{grid-template-columns:1fr}.project-linked-post{align-items:flex-start;flex-direction:column}.project-linked-post>div:last-child{width:100%}.project-linked-post>div:last-child>*{flex:1;text-align:center;justify-content:center}}

/* =========================================================
   V1.7.7.6.23｜專案自動總整理＋結案報告
   ========================================================= */
.project-report-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.project-report-actions>*{min-width:180px}.project-report-modal{position:fixed;inset:0;z-index:120;background:rgba(15,23,42,.58);display:flex;align-items:flex-start;justify-content:center;padding:28px 16px;overflow:auto}.project-report-modal.hidden{display:none}.project-report-dialog{width:min(1120px,100%);background:#fff;border-radius:22px;box-shadow:0 24px 80px rgba(15,23,42,.25);overflow:hidden}.project-report-toolbar{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px 18px;border-bottom:1px solid #e2e8f0;background:rgba(255,255,255,.97);backdrop-filter:blur(10px)}.project-report-toolbar>div:first-child{display:flex;flex-direction:column;gap:2px}.project-report-toolbar>div:first-child b{font-size:18px}.project-report-toolbar>div:first-child span{font-size:12px;color:#64748b}.project-report-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.project-report-body{padding:24px;background:#f3f6fa}.project-report-loading{padding:60px 20px;text-align:center;color:#64748b;font-weight:800}.project-report-sheet{max-width:920px;margin:0 auto;background:#fff;border:1px solid #dbe4ef;border-radius:18px;padding:34px 38px;box-shadow:0 10px 30px rgba(15,23,42,.07);color:#172033}.project-report-header{text-align:center;border-bottom:2px solid #172033;padding-bottom:20px;margin-bottom:18px}.report-brand{font-weight:900;color:#2563eb}.report-kind{font-size:14px;color:#64748b;margin-top:5px}.project-report-header h1{font-size:30px;margin:10px 0 6px}.report-owner{color:#475569;font-weight:800}.report-draft-warning{padding:12px 14px;border:1px solid #f2c46d;background:#fff8e6;border-radius:12px;color:#7c5200;font-weight:800;margin-bottom:16px}.report-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:18px 0 24px}.report-stats>div{text-align:center;padding:14px 8px;border:1px solid #dbe5f1;border-radius:14px;background:#f8fafc}.report-stats b{display:block;font-size:26px}.report-stats span{display:block;margin-top:5px;font-size:12px;color:#64748b}.report-block{margin-top:28px}.report-block h2{font-size:20px;border-left:5px solid #2563eb;padding-left:10px;margin-bottom:14px}.report-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.report-info-grid>div{border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px}.report-info-grid span{display:block;font-size:12px;color:#64748b}.report-info-grid b{display:block;margin-top:4px}.report-summary-text{line-height:1.9;white-space:pre-wrap}.report-timeline{display:grid;gap:12px}.report-event{display:grid;grid-template-columns:36px 1fr;gap:10px}.report-event-no{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#eaf2ff;color:#1d4ed8;font-weight:900;margin-top:2px}.report-event>div:last-child{border:1px solid #dfe7f1;border-radius:12px;padding:12px 14px}.report-event-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.report-event-head span{font-size:12px;color:#64748b;white-space:nowrap}.report-event-content{margin-top:8px;line-height:1.75}.report-event-meta{margin-top:6px;font-size:13px;color:#52657d}.report-event-meta a{color:#1769e0;font-weight:800}.report-followups{line-height:1.8}.project-report-footer{border-top:1px solid #dbe4ef;margin-top:28px;padding-top:14px;text-align:center;color:#64748b;font-size:12px}.project-report-open{overflow:hidden}.project-report-print-page{background:#fff!important}.project-report-print-page .project-report-sheet{box-shadow:none;border:0;max-width:none;border-radius:0;margin:0;padding:12mm 13mm}.project-report-print-page .report-block{break-inside:avoid-page}.project-report-print-page .report-event{break-inside:avoid-page}
@media(max-width:820px){.project-report-modal{padding:0}.project-report-dialog{border-radius:0;min-height:100vh}.project-report-toolbar{align-items:stretch;flex-direction:column}.project-report-toolbar-actions{display:grid;grid-template-columns:1fr 1fr}.project-report-toolbar-actions button{width:100%}.project-report-body{padding:10px}.project-report-sheet{border-radius:14px;padding:20px 15px}.project-report-header h1{font-size:24px}.report-stats{grid-template-columns:repeat(2,1fr)}.report-stats>div:last-child{grid-column:1/-1}.report-info-grid{grid-template-columns:1fr}.report-event{grid-template-columns:30px 1fr}.report-event-no{width:28px;height:28px}.report-event-head{flex-direction:column}.report-event-head span{white-space:normal}.project-report-actions{display:grid;grid-template-columns:1fr}.project-report-actions>*{min-width:0;width:100%}}
@media print{html,body{background:#fff!important}body.project-report-open{overflow:visible!important}body.project-report-open>*:not(#projectReportModal){display:none!important}#projectReportModal{display:block!important;position:static!important;inset:auto!important;background:#fff!important;padding:0!important;overflow:visible!important}.no-print{display:none!important}.project-report-dialog{box-shadow:none!important;width:100%!important;max-width:none!important;border-radius:0!important;overflow:visible!important}.project-report-body{padding:0!important;background:#fff!important;overflow:visible!important}.project-report-sheet{display:block!important;box-shadow:none!important;border:0!important;max-width:none!important;width:100%!important;margin:0!important;padding:10mm 12mm!important;border-radius:0!important}.project-report-header{break-after:avoid-page}.report-block,.report-event,.report-info-grid>div,.report-stats>div{break-inside:avoid-page}.project-report-footer{break-before:avoid-page}}

/* V1.7.7.6.23.1｜專案一鍵結案／恢復追蹤 */
.project-status-quickbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 18px;padding:14px 16px;border:1px solid #bfdbfe;border-radius:16px;background:#eff6ff}.project-status-quickbar>div{min-width:0}.project-status-quickbar b{display:block;color:#1d4ed8;font-size:17px}.project-status-quickbar span{display:block;margin-top:4px;color:#52657d;font-size:13px;line-height:1.6}.project-status-quickbar.is-closed{background:#ecfdf3;border-color:#bbf7d0}.project-status-quickbar.is-closed b{color:#15803d}.project-close-btn{white-space:nowrap;min-width:132px}.project-status-quickbar button{flex:0 0 auto}@media(max-width:700px){.project-status-quickbar{align-items:stretch;flex-direction:column}.project-status-quickbar button{width:100%}}

/* V1.7.7.6.23.3｜專案 PDF 列印 visibility 衝突修正
   全站 style.css 的 service-scorecard 列印規則會把 body * 全部 visibility:hidden，
   因此在專案報告列印模式下明確恢復報告區可見，並關閉舊成績單列印區。 */
@media print{
  body.project-report-open #projectReportModal,
  body.project-report-open #projectReportModal *{
    visibility:visible!important;
  }
  body.project-report-open .service-scorecard-shell,
  body.project-report-open .service-scorecard-shell *{
    visibility:hidden!important;
  }
  body.project-report-open .service-scorecard-shell{
    display:none!important;
  }
  body.project-report-open #projectReportModal .no-print{
    display:none!important;
  }
  body.project-report-open #projectReportModal{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    margin:0!important;
  }
  body.project-report-open #projectReportModal .project-report-dialog,
  body.project-report-open #projectReportModal .project-report-body,
  body.project-report-open #projectReportModal .project-report-sheet{
    visibility:visible!important;
  }
}

/* =========================================================
   V1.7.7.6.23.4｜A4 正式報告排版優化版
   只影響列印 / PDF，不改畫面、不改資料。
   ========================================================= */
@media print{
  @page{size:A4 portrait;margin:11mm 10mm 12mm 10mm}

  body.project-report-open #projectReportModal{
    position:static!important;
    width:auto!important;
    margin:0!important;
  }
  body.project-report-open #projectReportModal .project-report-dialog,
  body.project-report-open #projectReportModal .project-report-body{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
  }
  body.project-report-open #projectReportModal .project-report-sheet{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    color:#172033!important;
    font-size:10.5pt!important;
    line-height:1.55!important;
  }

  /* 首頁標題改為正式公文式橫排，避免手機規則造成換行擠壓 */
  .project-report-header{
    display:grid!important;
    grid-template-columns:31mm minmax(0,1fr)!important;
    grid-template-areas:
      "brand kind"
      "brand title"
      "brand owner"!important;
    column-gap:8mm!important;
    row-gap:1.5mm!important;
    align-items:center!important;
    text-align:left!important;
    padding:0 0 5mm!important;
    margin:0 0 4mm!important;
    border-bottom:1.4pt solid #172033!important;
    break-after:avoid-page!important;
  }
  .project-report-header .report-brand{
    grid-area:brand!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:24mm!important;
    padding-right:6mm!important;
    border-right:1px solid #d8e1ed!important;
    font-size:14pt!important;
    line-height:1.45!important;
    text-align:center!important;
    color:#2563eb!important;
  }
  .project-report-header .report-kind{
    grid-area:kind!important;
    margin:0!important;
    font-size:9pt!important;
    line-height:1.3!important;
    color:#64748b!important;
    letter-spacing:.03em!important;
  }
  .project-report-header h1{
    grid-area:title!important;
    margin:0!important;
    font-size:19pt!important;
    line-height:1.25!important;
    letter-spacing:.01em!important;
    color:#172033!important;
  }
  .project-report-header .report-owner{
    grid-area:owner!important;
    margin:0!important;
    font-size:10pt!important;
    line-height:1.4!important;
    color:#475569!important;
  }

  .report-draft-warning{
    margin:0 0 4mm!important;
    padding:3mm 4mm!important;
    border-radius:2mm!important;
    font-size:10pt!important;
    break-inside:avoid!important;
  }

  /* 統計固定 5 欄，同一列呈現 */
  .report-stats{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:2.3mm!important;
    margin:0 0 5mm!important;
    break-inside:avoid!important;
  }
  .report-stats>div,
  .report-stats>div:last-child{
    grid-column:auto!important;
    min-height:17mm!important;
    padding:3mm 1.5mm!important;
    border-radius:2.5mm!important;
    background:#fafcff!important;
  }
  .report-stats b{font-size:16pt!important;line-height:1.1!important}
  .report-stats span{margin-top:1.5mm!important;font-size:8.5pt!important}

  /* 區塊不要整塊禁止分頁，避免前頁留下大片空白 */
  .report-block{
    margin:0 0 5mm!important;
    break-inside:auto!important;
    page-break-inside:auto!important;
  }
  .report-block h2{
    margin:0 0 3mm!important;
    padding-left:3mm!important;
    border-left:3pt solid #2563eb!important;
    font-size:13pt!important;
    line-height:1.35!important;
    break-after:avoid-page!important;
    page-break-after:avoid!important;
  }

  /* 基本資料壓成 4 欄 × 2 列 */
  .report-info-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:2mm!important;
  }
  .report-info-grid>div{
    min-height:18mm!important;
    padding:2.5mm 3mm!important;
    border-radius:2mm!important;
    break-inside:avoid!important;
  }
  .report-info-grid span{font-size:8pt!important;line-height:1.2!important}
  .report-info-grid b{margin-top:1mm!important;font-size:10.5pt!important;line-height:1.4!important}

  /* 自動總整理縮短行距，讓第一頁能自然接續 */
  .report-summary-text,
  .report-block p,
  .report-followups{
    margin:0 0 2.5mm!important;
    font-size:10.5pt!important;
    line-height:1.7!important;
  }
  .report-followups{padding-left:6mm!important}

  /* 時間軸改成緊湊案件紀錄卡 */
  .report-timeline{gap:2.5mm!important}
  .report-event{
    display:grid!important;
    grid-template-columns:9mm minmax(0,1fr)!important;
    gap:2.5mm!important;
    break-inside:avoid-page!important;
    page-break-inside:avoid!important;
  }
  .report-event-no{
    width:7mm!important;
    height:7mm!important;
    margin-top:1mm!important;
    font-size:9.5pt!important;
  }
  .report-event>div:last-child{
    padding:3mm 3.5mm!important;
    border-radius:2.5mm!important;
  }
  .report-event-head{
    display:flex!important;
    flex-direction:row!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    gap:3mm!important;
  }
  .report-event-head b{font-size:11pt!important;line-height:1.35!important}
  .report-event-head span{
    flex:0 0 auto!important;
    max-width:58mm!important;
    white-space:normal!important;
    text-align:right!important;
    font-size:8pt!important;
    line-height:1.35!important;
  }
  .report-event-content{
    margin-top:2mm!important;
    font-size:10pt!important;
    line-height:1.65!important;
  }
  .report-event-meta{
    margin-top:1mm!important;
    font-size:8.5pt!important;
    line-height:1.4!important;
  }

  .project-report-footer{
    margin-top:5mm!important;
    padding-top:3mm!important;
    font-size:8pt!important;
    line-height:1.4!important;
    break-before:avoid-page!important;
  }
}

/* ============================================================
   V1.7.7.6.24｜議員質詢稿輔助產生版
   ============================================================ */
.project-questioning-btn{background:#fff7ed!important;border-color:#fed7aa!important;color:#9a3412!important}
.questioning-warning{margin:14px 0 18px;padding:14px 16px;border:1px solid #f0c36a;border-radius:14px;background:#fff8e8;color:#7c4a03;font-weight:800;line-height:1.7}
.questioning-chronology{display:grid;gap:8px;padding-left:24px}.questioning-chronology li{padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;line-height:1.55}.questioning-chronology span{color:#64748b;font-size:13px;margin-left:6px}.questioning-list{display:grid;gap:12px}.questioning-item{padding:14px 16px;border:1px solid #dbe5f1;border-radius:14px;background:#fff}.questioning-item>b{display:block;color:#9a3412;margin-bottom:6px}.questioning-item p{margin:0;line-height:1.8}
@media(max-width:700px){.project-report-actions{grid-template-columns:1fr!important}.project-questioning-btn{width:100%}.questioning-warning{padding:12px}.questioning-item{padding:12px}}
@media print{
  .questioning-sheet .questioning-warning{background:#fff!important;color:#000!important;border:1px solid #888!important}
  .questioning-sheet .questioning-chronology li,.questioning-sheet .questioning-item{background:#fff!important;color:#000!important;break-inside:avoid;page-break-inside:avoid}
  .questioning-sheet .questioning-item>b{color:#000!important}
  .questioning-sheet .questioning-chronology span{color:#444!important}
}

/* ============================================================
   V1.7.7.6.25｜專案追蹤提醒＋逾期案件
   ============================================================ */
.project-followup-home-card{border-color:#dbe7f5}.project-followup-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.project-followup-stats button{border:1px solid #dbe5f1;border-radius:16px;background:#f8fafc;padding:16px 10px;cursor:pointer;text-align:center;transition:.15s}.project-followup-stats button:hover,.project-followup-stats button.active{border-color:#7da9ea;background:#eff6ff;box-shadow:0 5px 16px rgba(23,105,224,.08)}.project-followup-stats button b{display:block;font-size:30px;line-height:1.05;color:#172033}.project-followup-stats button span{display:block;margin-top:8px;font-weight:850;color:#52657d}.project-followup-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-top:4px;margin-bottom:8px}.project-followup-list{display:grid;gap:9px}.project-followup-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #dfe7f1;border-radius:14px;padding:13px 14px;background:#fff}.project-followup-row.is-overdue{border-color:#fecaca;background:#fff7f7}.project-followup-row.is-today{border-color:#fed7aa;background:#fffbeb}.project-followup-main{min-width:0;flex:1}.project-followup-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.project-followup-title>b{font-size:17px}.project-followup-title span{font-size:12px;padding:3px 8px;border-radius:999px;background:#eef4ff;color:#34506f;font-weight:800}.project-followup-date{margin-top:5px;font-weight:900;color:#9a3412}.project-followup-meta{margin-top:4px;color:#64748b;font-size:13px;line-height:1.5}.project-list-followup{margin-top:7px;padding:7px 9px;border-radius:10px;background:#eef6ff;color:#245184;font-size:13px;font-weight:850}.project-list-followup.is-overdue{background:#fff1f2;color:#b4232f}.project-list-followup.is-today{background:#fff7e8;color:#8a5b00}@media(max-width:820px){.project-followup-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.project-followup-row{align-items:stretch;flex-direction:column}.project-followup-row>button{width:100%}.project-followup-toolbar{align-items:flex-start;flex-direction:column}.project-followup-stats button b{font-size:26px}}

/* ============================================================
   V1.7.7.6.26｜案件公文／附件管理
   ============================================================ */
.project-attachments-section{border-top:1px solid #e6edf5;padding-top:16px}.project-attachment-upload{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;gap:10px;align-items:center;margin:12px 0}.project-attachment-upload input[type=file],.project-attachment-upload input[type=text],.project-attachment-upload input:not([type]){min-width:0}.project-attachment-overview,.timeline-attachments{display:grid;gap:8px}.timeline-attachments{margin:12px 0}.project-attachment-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #dde6f0;background:#f8fbff;border-radius:12px;padding:10px 12px}.project-attachment-info{min-width:0;flex:1}.project-attachment-info>b{display:block;overflow-wrap:anywhere;color:#26384f}.project-attachment-info>div{display:flex;flex-wrap:wrap;gap:6px 10px;margin-top:5px;color:#65788e;font-size:12px}.project-attachment-info p{margin:6px 0 0;color:#465b72;font-size:13px;line-height:1.5}.project-attachment-source{font-weight:800;color:#315c91}.project-attachment-actions{display:flex;gap:7px;flex:0 0 auto}.timeline-attachment-add{margin-top:10px;border-top:1px dashed #d6e0eb;padding-top:8px}.timeline-attachment-add>summary{cursor:pointer;color:#315c91;font-weight:800}.timeline-attachment-add .project-attachment-upload{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;margin:10px 0 2px}.report-stats-six{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:900px){.project-attachment-upload,.timeline-attachment-add .project-attachment-upload{grid-template-columns:1fr}.project-attachment-row{align-items:stretch;flex-direction:column}.project-attachment-actions{width:100%}.project-attachment-actions>a,.project-attachment-actions>button{flex:1;text-align:center}.report-stats-six{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.report-stats-six{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.report-stats.report-stats-six{grid-template-columns:repeat(6,minmax(0,1fr))!important}.report-stats.report-stats-six>div{min-width:0!important}}

/* V1.7.7.6.27｜專案重要節點與里程碑 */
.project-highlight-chip{display:inline-flex;align-items:center;padding:4px 9px;border-radius:99px;font-size:12px;font-weight:850;background:#eaf3ff;color:#245184;margin-left:8px;white-space:normal}
.project-highlight-chip.highlight-dispute{background:#fff0d5;color:#865400}.project-highlight-chip.highlight-done{background:#e7f8ee;color:#17633c}.project-highlight-chip.highlight-question{background:#f4ecff;color:#663a99}
.timeline-highlight-editor{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0;border-top:1px dashed #dbe6f0;margin-top:12px}
.timeline-highlight-editor label{display:flex;align-items:center;gap:8px;font-weight:750;color:#34506f}.timeline-highlight-editor select{max-width:250px;min-width:160px;padding:8px;border:1px solid #ccdaea;border-radius:10px;background:#fff;color:#26384f}
.report-highlight-list{display:grid;gap:8px;margin:12px 0;padding:0;list-style:none}.report-highlight-list li{padding:10px 12px;border:1px solid #dfe7ef;border-radius:10px;background:#f7faff;line-height:1.65}.report-highlight-note{margin:10px 0;color:#805415;background:#fff8e8;padding:10px;border-radius:10px}.report-highlight-badge{display:inline-block;font-size:12px;font-style:normal;font-weight:750;color:#38517b;margin:0 8px}
@media(max-width:600px){.timeline-highlight-editor{align-items:stretch;flex-direction:column}.timeline-highlight-editor label{align-items:stretch;flex-direction:column}.timeline-highlight-editor select{max-width:none;width:100%}}
@media print{.report-highlight-list li{background:#fff!important;color:#000!important;break-inside:avoid}.report-highlight-note{background:#fff!important;color:#000!important}.report-highlight-badge{color:#000!important}}

/* V1.7.7.6.28｜專案內部備註與對外報告分流 */
.project-private-note,.project-entry-private{background:#fffdf4;border:1px solid #eadfc4;border-radius:13px;padding:12px;margin:12px 0}
.project-private-form,.entryInternalNoteForm{display:grid;gap:10px;margin-top:10px}
.project-private-form textarea,.entryInternalNoteForm textarea{display:block;width:100%;min-height:94px;border:1px solid #d5dfea;border-radius:11px;padding:12px;box-sizing:border-box;background:#fff;color:#243246;font-size:15px;line-height:1.6}
.project-private-form button,.entryInternalNoteForm button{justify-self:start}
.project-entry-private>summary{cursor:pointer;color:#6b531f;font-weight:800;padding:5px}
.project-private-chip{display:inline-flex;font-size:12px;font-weight:850;margin:3px 6px;padding:4px 8px;background:#fff0d9;color:#825006;border-radius:99px;vertical-align:middle;white-space:normal}
.project-private-chip.is-report{background:#e9f4ff;color:#275c8b}
.project-attachment-row.private-attachment{background:#fffdf5;border-color:#ebdfc7}
.project-attachment-actions select{min-width:135px;max-width:170px;border:1px solid #cbd9e7;border-radius:9px;padding:7px;background:#fff;color:#304258}
.project-privacy-editor{background:#f8fafc;padding:10px 12px;border-radius:11px}
.project-attachment-upload select{min-width:135px;border:1px solid #cbd9e7;border-radius:9px;padding:10px;background:#fff;color:#304258}
@media(max-width:900px){.project-attachment-actions{flex-wrap:wrap}.project-attachment-actions select{max-width:none;width:100%;flex-basis:100%}}
@media print{.project-private-note,.project-entry-private,.project-privacy-editor,.project-private-chip{display:none!important}}

/* V1.7.7.6.28.3｜對外報告收錄標題維持單行，不影響現有切換操作 */
.project-privacy-editor > label{white-space:nowrap;flex-shrink:0}
.project-privacy-editor > label > select{flex-shrink:0}
@media(max-width:600px){.project-privacy-editor > label{white-space:nowrap}}

/* V1.7.7.6.29｜案件多人協作／承辦助理 */
.project-member-filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;margin:12px 0 16px}
.project-member-filter-row label{display:flex;align-items:center;gap:10px;white-space:nowrap;color:#25426b;font-weight:700}
.project-member-filter-row select{min-width:175px;max-width:100%;padding:10px 12px;border:1px solid #cbd9eb;border-radius:11px;background:#fff;font-size:15px}
.project-assignment-summary{font-weight:650;color:#22528b;font-size:14px;line-height:1.7;margin-top:6px;overflow-wrap:anywhere}
.project-assignment-panel{background:#f6f9fe;border:1px solid #d8e5f5;border-radius:14px;padding:16px;margin:16px 0}
.project-assignment-panel .section-title-row{margin-bottom:10px}
.project-assignment-info{padding:10px 12px;background:#fff;border-radius:10px;line-height:1.9;margin-bottom:12px;font-size:15px}
.project-assignment-form{display:grid;gap:14px}
.project-assignment-form>label{display:grid;gap:7px;font-weight:700;max-width:420px}
.project-assignment-form select{width:100%;padding:11px 12px;border:1px solid #c6d8ec;border-radius:10px;background:#fff;font-size:16px}
.project-assignment-form fieldset{border:1px solid #d5e2f1;border-radius:12px;padding:12px 14px;min-width:0}
.project-assignment-form legend{font-weight:700;color:#294775;padding:0 5px}
.project-collaborator-choices{display:flex;gap:8px 12px;flex-wrap:wrap;max-height:180px;overflow:auto}
.project-collaborator-item{display:flex;align-items:center;gap:7px;border-radius:9px;background:#fff;border:1px solid #d6e3f2;padding:8px 11px;font-size:15px}
.project-collaborator-item input{width:18px;height:18px;accent-color:#2468d4}
.project-collaborator-item:has(input:disabled){opacity:.55}
.project-assignment-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.project-followup-mine{display:inline-flex;align-items:center;gap:8px;margin:9px 0 12px;padding:8px 12px;border-radius:10px;background:#edf4ff;color:#254d81;font-weight:700}
.project-followup-mine input{width:18px;height:18px;accent-color:#2468d4}
.project-followup-assignee{display:block;font-size:12px;font-weight:500;color:#58769c;margin-top:3px}
@media(max-width:600px){.project-assignment-panel{padding:12px}.project-member-filter-row label{width:100%;justify-content:space-between}.project-member-filter-row select{min-width:0;width:62%}.project-assignment-form>label{max-width:none}.project-collaborator-choices{max-height:240px}}

/* V1.7.7.6.30｜專案儀表板與案件統計 */
.project-dashboard-card{overflow:hidden}.project-dashboard-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.project-dashboard-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:15px 0}
.project-dashboard-stat{display:flex;flex-direction:column;gap:5px;border:1px solid #dae7f7;border-radius:15px;background:#f6faff;padding:15px 12px;min-width:0}
.project-dashboard-stat b{color:#164c91;font-size:30px;line-height:1.1}.project-dashboard-stat span{font-size:13px;font-weight:750;color:#496782}
.project-dashboard-duration{display:flex;align-items:center;flex-wrap:wrap;gap:8px 15px;border:1px solid #dfecf7;background:#eff7ff;border-radius:12px;padding:13px 15px;margin:10px 0 18px;color:#244b74}
.project-dashboard-grids{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.project-dashboard-grids>section{background:#fff;border:1px solid #dce7f4;border-radius:14px;padding:15px;min-width:0}
.project-dashboard-grids h4{margin:0 0 13px;color:#254871;font-size:16px}
.project-dashboard-bar-row{display:grid;grid-template-columns:minmax(70px,1.1fr) minmax(45px,2fr) 37px;align-items:center;gap:9px;margin:10px 0;font-size:14px;color:#3b516c}
.project-dashboard-bar-row>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-dashboard-bar-row>b{text-align:right}
.project-dashboard-track{height:11px;border-radius:30px;background:#e9f0fa;overflow:hidden}.project-dashboard-track>div{height:100%;border-radius:30px;background:linear-gradient(90deg,#509bee,#236bd5)}
.project-dashboard-table-wrap{overflow-x:auto}.project-dashboard-table-wrap table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}
.project-dashboard-table-wrap th,.project-dashboard-table-wrap td{padding:9px 8px;text-align:right;border-bottom:1px solid #e6edf6}
.project-dashboard-table-wrap th:first-child,.project-dashboard-table-wrap td:first-child{text-align:left}.project-dashboard-table-wrap thead{background:#f2f7ff;color:#345678}
.project-dashboard-footnote{color:#70839a;font-size:12px;line-height:1.7;margin:16px 0 0}
@media(max-width:850px){.project-dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.project-dashboard-grids{grid-template-columns:1fr}}
@media(max-width:420px){.project-dashboard-stat b{font-size:25px}.project-dashboard-card .section-title-row{align-items:flex-start;flex-direction:column}}

/* V1.7.7.6.30.1｜儀表板八張統計卡片文字放大，保留響應式排版 */
.project-dashboard-stat{gap:8px;padding:18px 16px}
.project-dashboard-stat b{font-size:36px;line-height:1.12}
.project-dashboard-stat span{font-size:17px;line-height:1.45;font-weight:800}
@media(max-width:420px){.project-dashboard-stat{padding:15px 12px}.project-dashboard-stat b{font-size:30px}.project-dashboard-stat span{font-size:16px}}

/* V1.7.7.6.30.3｜詳細統計預設收合；8 張數字卡保持常駐 */
.project-dashboard-details{margin:8px 0 4px;border:1px solid #d5e4f5;border-radius:14px;background:#fff;overflow:hidden}
.project-dashboard-details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:7px;padding:15px 18px;color:#22528a;background:#f2f7fd;font-size:18px;font-weight:800;user-select:none}
.project-dashboard-details>summary::-webkit-details-marker{display:none}
.project-dashboard-details>summary:before{content:'▶';display:inline-block;font-size:13px;transition:transform .15s}
.project-dashboard-details[open]>summary:before{transform:rotate(90deg)}
.project-dashboard-details>summary span{color:#667f9e;font-size:14px;font-weight:500}
.project-dashboard-details[open]>summary{border-bottom:1px solid #dce8f5}
.project-dashboard-details>.project-dashboard-duration,.project-dashboard-details>.project-dashboard-grids,.project-dashboard-details>.project-dashboard-footnote{margin-left:16px;margin-right:16px}
.project-dashboard-details>.project-dashboard-duration{margin-top:16px}
.project-dashboard-details>.project-dashboard-footnote{margin-bottom:16px}
@media(max-width:600px){.project-dashboard-details>summary{padding:13px 12px;font-size:16px;flex-wrap:wrap}.project-dashboard-details>summary span{font-size:12px}.project-dashboard-details>.project-dashboard-duration,.project-dashboard-details>.project-dashboard-grids,.project-dashboard-details>.project-dashboard-footnote{margin-left:10px;margin-right:10px}}


/* V1.7.7.6.31｜進階搜尋預設收合，保留 V30.3 儀表板與既有管理版面 */
.project-advanced-search{border:1px solid #d9e5f4;border-radius:12px;background:#f7faff;margin:12px 0 14px;overflow:hidden}
.project-advanced-search>summary{cursor:pointer;list-style:none;padding:13px 16px;font-weight:800;color:#23518a;font-size:16px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.project-advanced-search>summary::-webkit-details-marker{display:none}
.project-advanced-search>summary:before{content:'▶';font-size:12px;transition:transform .15s}
.project-advanced-search[open]>summary:before{transform:rotate(90deg)}
.project-advanced-search>summary span{font-size:13px;color:#70849d;font-weight:500}
.project-advanced-search[open]>summary{border-bottom:1px solid #dce8f4}
.project-advanced-grid{padding:15px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.project-advanced-grid label{display:flex;flex-direction:column;gap:6px;color:#345779;font-weight:700;min-width:0;font-size:14px}
.project-advanced-grid input,.project-advanced-grid select{width:100%;min-width:0;padding:11px 12px;border:1px solid #cbd9eb;border-radius:10px;background:#fff;color:#253b59;font-size:15px;box-sizing:border-box}
.project-advanced-search>.hint{margin:0 15px 15px;font-size:13px;line-height:1.6}
@media(max-width:900px){.project-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.project-advanced-grid{grid-template-columns:1fr}.project-advanced-search>summary{padding:12px;font-size:15px}.project-advanced-search>summary span{font-size:12px}}

/* V1.7.7.6.32｜案件編號與快速定位 */
.project-case-locator{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 2px;padding:12px 14px;background:#f4f8fd;border:1px solid #dbe6f3;border-radius:13px}
.project-case-locator label{font-weight:800;white-space:nowrap;color:#2c5179}
.project-case-locator input{flex:1 1 230px;min-width:180px;max-width:390px;padding:11px 13px;border-radius:10px;border:1px solid #bed0e4;font:inherit}
.project-case-locator button{white-space:nowrap}
.project-case-locator .hint{flex:1 1 100%;font-size:14px}
.project-case-code{display:inline-block;font-size:13px;font-weight:800;color:#1d5798;background:#eaf3ff;border:1px solid #cbdcf0;border-radius:8px;padding:3px 7px;white-space:nowrap}
.project-case-copy{background:#fff;color:#205e9d;border:1px solid #c5d9ef;border-radius:8px;padding:4px 8px;font-size:13px;cursor:pointer;white-space:nowrap}
.project-case-copy:hover{background:#eaf3ff}
.project-report-case-number{text-align:center;font-size:15px;font-weight:700;margin:5px 0 9px;color:#234b72}
@media(max-width:680px){.project-case-locator{align-items:stretch}.project-case-locator input{max-width:none;flex-basis:100%}.project-case-locator button{width:100%}}

/* V1.7.7.6.33：案件稽核清單預設收合，不影響原始管理區域版面 */
.project-audit-panel details{border:1px solid #d9e3ef;border-radius:12px;padding:12px;background:#f8fbff}
.project-audit-panel summary{cursor:pointer;font-size:16px;font-weight:800;color:#17395f}
.project-audit-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:14px 0 10px}
.project-audit-toolbar label{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-weight:700}
.project-audit-toolbar select{min-width:150px;max-width:100%;padding:7px}
.project-audit-rows{display:grid;gap:9px;margin-bottom:10px}
.project-audit-row{border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:12px}
.project-audit-row-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;align-items:center}
.project-audit-row-head b{color:#153d66}
.project-audit-row-head time,.project-audit-by{font-size:13px;color:#596c80}
.project-audit-by{margin-top:6px;overflow-wrap:anywhere}
.project-audit-changes{border-left:3px solid #b3d3f2;margin-top:10px;padding-left:10px;display:grid;gap:5px}
.project-audit-change{font-size:13px;overflow-wrap:anywhere}

/* V1.7.7.6.34｜案件稽核條件查詢／匯出（不重新載入專案） */
.project-audit-toolbar input[type="date"]{min-width:145px;max-width:100%;padding:7px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.project-audit-export{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:6px 0 14px;padding:10px 12px;border:1px solid #d9e3ef;background:#fff;border-radius:10px}
.project-audit-export b{color:#153d66;margin-right:5px}
.project-audit-export button{white-space:nowrap}
@media(max-width:540px){.project-audit-toolbar label{width:100%;justify-content:space-between}.project-audit-toolbar select,.project-audit-toolbar input[type="date"]{flex:1;min-width:0}.project-audit-export b{width:100%}}
