:root{font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif;color:#20312e;background:#f3f5f2}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{border:0;border-radius:10px;padding:10px 16px;background:#175d50;color:white;cursor:pointer}button.secondary{background:#e3eae6;color:#174c41}button.danger{background:#a13737}button:disabled{opacity:.45}input,textarea,select{width:100%;border:1px solid #ccd6d0;border-radius:9px;padding:10px;background:white;color:#20312e}textarea{min-height:84px;resize:vertical}label{display:block;font-size:14px;font-weight:600;margin:12px 0 5px}.shell{max-width:1120px;margin:0 auto;padding:20px}.top{display:flex;justify-content:space-between;align-items:center;gap:12px}.brand{font-size:23px;font-weight:750}.muted{color:#65746e;font-size:14px}.grid{display:grid;grid-template-columns:260px 1fr;gap:18px}.card{background:white;border:1px solid #e4e9e5;border-radius:16px;padding:20px;margin:16px 0;box-shadow:0 4px 18px #183b2409}.login{max-width:440px;margin:10vh auto}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.row>*{flex:1}.row button{flex:0 0 auto}.project{display:block;width:100%;text-align:left;background:#f0f5f1;color:#20463e;margin:8px 0}.project.active{background:#175d50;color:white}h1{font-size:24px}h2{font-size:19px;margin:0 0 12px}h3{font-size:16px;margin:0 0 8px}.report{border-top:1px solid #e7ece8;padding:18px 0}.report:first-of-type{border-top:0}.photos{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.photo{width:170px}.photo img{display:block;width:170px;height:130px;object-fit:cover;border-radius:9px}.photo p{font-size:13px;margin:6px 0;overflow-wrap:anywhere}.badge{display:inline-block;background:#e3eee9;color:#1b594a;padding:3px 8px;border-radius:99px;font-size:12px}.badge.draft{background:#fff1d7;color:#744710}.notice{padding:12px;border-radius:9px;background:#e8f2ed;margin:12px 0}.error{background:#ffe8e5;color:#952c28}.half{display:grid;grid-template-columns:1fr 1fr;gap:12px}.checks label{display:flex;gap:8px;align-items:center;font-weight:400}.checks input{width:auto}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}small{display:block;color:#68756e;margin-top:6px}dialog{border:0;border-radius:15px;max-width:min(700px,95vw);width:100%;box-shadow:0 20px 60px #0004}dialog::backdrop{background:#182b25aa}@media(max-width:720px){.grid,.half{display:block}.shell{padding:12px}.top{align-items:flex-start}.photo{width:45%}.photo img{width:100%}}
.entry-row{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;margin:8px 0;align-items:center}.work-row{grid-template-columns:1fr auto}#reportForm h3{margin:22px 0 8px}#reportForm .muted{margin:0 0 8px}@media(max-width:720px){.entry-row{grid-template-columns:1fr 1fr}.entry-row .worker-name{grid-column:1/-1}.work-row{grid-template-columns:1fr}.entry-row button{justify-self:start}}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.section-heading h1,.section-heading h2{margin:0}.section-heading+.muted{margin-top:12px}.icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;height:34px;padding:6px;background:transparent;color:#8a9a93;border-radius:9px}.icon-button:hover,.icon-button:focus-visible{background:#f7e8e5;color:#a13737}.report .row .icon-button{flex:0 0 auto}.icon-button svg{display:block}
.report-photos{margin:12px 0 18px}.report-photos>input[type=file]{margin:4px 0}.photo-entry{display:grid;grid-template-columns:88px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #e7ece8}.photo-entry img{width:88px;height:76px;object-fit:cover;border-radius:8px}.photo-entry label{margin:0 0 5px}.photo-entry button{white-space:nowrap}@media(max-width:520px){.photo-entry{grid-template-columns:64px 1fr}.photo-entry img{width:64px;height:64px}.photo-entry button{grid-column:2;justify-self:start}}
.audit-summary{margin:12px 0 4px}.activity-list{max-height:65vh;overflow:auto}.activity-list .report p{margin:6px 0 0}.staff-row{padding:14px 0}
.worker-choice{min-width:0}.worker-custom{margin-top:6px}.worker-total{background:#f0f4f1;color:#65746e}@media(max-width:720px){.worker-choice{grid-column:1/-1}}

.photo-removed img,.photo-removed>div{opacity:.35}.photo-removed .photo-caption{text-decoration:line-through}

.urgent-row,.urgent-view{display:flex;align-items:center;gap:12px;margin:10px 0}.urgent-row input[type=checkbox],.urgent-view input[type=checkbox]{width:18px;height:18px;flex:0 0 18px;margin:0}.urgent-text,.urgent-view span{flex:1;min-width:0}.urgent-row.done .urgent-text,.urgent-view.done span{text-decoration:line-through;color:#87938c}.urgent-view span{white-space:pre-wrap;overflow-wrap:anywhere}.urgent-view small{white-space:nowrap}.urgent-row .icon-button{flex-shrink:0}

.urgent-card{border:1px solid #dce5df;border-radius:12px;padding:12px;margin:12px 0}.item-photo-group{margin:12px 0}.item-photo-group>input[type=file]{margin-bottom:6px}.legacy-photo{border-bottom:1px solid #dce5df;padding-bottom:14px}.urgent-card .urgent-row{margin-top:0}

.daily-report,.daily-report:first-of-type{border:1px solid #cbd9d1;border-radius:14px;padding:18px;margin:20px 0 28px;background:#fff;box-shadow:0 3px 12px #173c2410}.daily-report>.report-heading{padding:12px 14px;margin:-18px -18px 16px;background:#e7f0eb;border-radius:14px 14px 0 0;border-bottom:1px solid #cbd9d1}.report-heading h3{font-size:17px;font-weight:700;margin:0}.report-heading .badge{flex:0 0 auto;white-space:nowrap;padding:5px 10px}.photo-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:12px}.comparison-column,.item-photo-group{min-width:0}.comparison-column+.comparison-column{border-left:1px solid #e1e8e3;padding-left:16px}.comparison-column .photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:12px}.comparison-column .photo{width:100%;max-width:220px}.comparison-column .photo img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}.empty-photo{font-size:13px;padding:16px 0}.photo-comparison-edit .item-photo-group{margin:0}.photo-comparison-edit .item-photo-group>label{margin-top:0}.photo-comparison-edit .photo-entry{grid-template-columns:64px minmax(0,1fr)}.photo-comparison-edit .photo-entry img{width:64px;height:64px}.photo-comparison-edit .photo-entry button{grid-column:2;justify-self:end}.photo-comparison-edit input[type=file]{font-size:12px;padding:8px;min-width:0}@media(max-width:520px){.daily-report,.daily-report:first-of-type{padding:12px}.daily-report>.report-heading{margin:-12px -12px 14px;padding:12px}.report-heading h3{flex-basis:100%;font-size:16px}.photo-comparison{gap:10px}.comparison-column+.comparison-column{padding-left:10px}.photo-comparison-edit .photo-entry{grid-template-columns:minmax(0,1fr)}.photo-comparison-edit .photo-entry button{grid-column:1}.photo-comparison-edit .photo-entry img{width:100%;height:auto;aspect-ratio:4/3}}
/* V3.13 architectural journal */
:root{color:#24231f;background:#faf9f6;font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif}body{line-height:1.65}.shell{max-width:1440px;padding:34px 48px}.shell>.top{padding-bottom:28px;border-bottom:1px solid #d9d5cd;margin-bottom:30px}.brand{font-family:Georgia,"Times New Roman",serif;font-size:28px;letter-spacing:3px;font-weight:400}.brand .muted{font:11px system-ui;letter-spacing:1px}.muted,small{color:#817b70}.grid{grid-template-columns:240px minmax(0,1fr);gap:52px}.grid>aside{align-self:start;position:sticky;top:24px;border-right:1px solid #ddd8ce;padding-right:28px}.card{border:0;border-radius:0;box-shadow:none;background:transparent;padding:24px 0;margin:0 0 26px}.grid>aside .card{border-bottom:1px solid #ddd8ce}.grid>aside h2{font-size:12px;letter-spacing:3px;color:#8d7a59;margin-bottom:22px}.project{background:transparent;border-radius:0;padding:12px 14px;border-left:2px solid transparent;font-size:15px}.project.active{background:#ece8df;color:#24231f;border-left-color:#a88f63}.grid>section>.card:first-child{background:#22211d;color:#f5f2ec;padding:34px 36px;border-left:3px solid #b59b70}.grid>section>.card:first-child h1{font-size:30px;letter-spacing:2px;font-weight:500}.grid>section>.card:first-child .muted{color:#bbb6ab}.grid>section>.card:first-child .icon-button{color:#bbb6ab}h2{font-size:20px;letter-spacing:1px;font-weight:500}h3{font-weight:500}button{background:#292721;border-radius:2px;font-size:13px;letter-spacing:.5px;padding:10px 16px}button.secondary{background:#ebe7de;color:#4e493f}button:hover{filter:brightness(.95)}button.danger{background:#a13737}button.icon-button{background:transparent;color:#9b9283;border-radius:2px}input,textarea,select{border-radius:2px;border-color:#d9d4c9;color:#28251f;background:#fffefa}input:focus,textarea:focus,select:focus{outline:2px solid #bcaa87;outline-offset:1px}label{font-weight:500;color:#655b4a;font-size:13px}.worker-total{background:#f0ede6;color:#766e60}.badge{border-radius:2px;background:#e8e1d3;color:#6e5b3c}.badge.draft{background:#f3ead8}.daily-report,.daily-report:first-of-type{border:1px solid #d9d4c9;border-radius:0;box-shadow:none;padding:22px;margin:24px 0 32px;background:#fffefa}.daily-report>.report-heading{background:#eeeae1;border-radius:0;border-bottom:1px solid #d9d4c9;border-left:3px solid #a68d60;padding:15px 18px;margin:-22px -22px 20px}.report-heading h3{font-size:17px;font-weight:500;letter-spacing:1px}.urgent-card{border-color:#dfd9ce;border-radius:2px;background:#faf9f5}.photo img,.photo-entry img{border-radius:2px}.comparison-column+.comparison-column{border-color:#dfd9ce}.urgent-row.done .urgent-text,.urgent-view.done span{color:#9b958b}.report-filter{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px;padding:20px 0;border-bottom:1px solid #d9d4c9;margin-bottom:18px}.report-filter>div:not(.actions){flex:1;min-width:150px}.report-filter label{margin-top:0}.report-filter .actions{margin:0}.page-summary{font-size:12px;letter-spacing:.5px}.load-more{text-align:center;padding:10px 0 24px}.load-more button{min-width:220px}.usage-panel{border-top:1px solid #ddd8ce;margin:22px 0 14px;padding-top:12px}.usage-panel strong{font-family:Georgia,serif;font-size:32px;font-weight:400;color:#8f7952}.notice{border-radius:2px;background:#eee9dc}.error{background:#f8e6df}dialog{border-radius:3px;padding:26px;max-width:min(800px,95vw)}dialog>.top{border-bottom:1px solid #ddd8ce;padding-bottom:18px;margin-bottom:20px}dialog::backdrop{background:#22211d99}.login{background:#fffefa;border:1px solid #d9d4c9;padding:36px}.share-shell{max-width:1100px}.pdf-document{max-width:900px;margin:30px auto;padding:24px}.print-toolbar{border:1px solid #d9d4c9;padding:18px;margin-bottom:30px}.pdf-cover{border-bottom:2px solid #a68d60;padding:24px 0;margin-bottom:24px}.pdf-cover h1{font-size:30px}.pdf-mode .daily-report{break-before:page}.pdf-mode .photo img{object-fit:contain;background:#f5f3ee}.pdf-mode .photo p{white-space:pre-wrap}.pdf-mode .daily-report>p{white-space:pre-wrap}.pdf-mode .comparison-column .photo{max-width:100%}
@media(max-width:900px){.shell{padding:24px}.grid{grid-template-columns:200px minmax(0,1fr);gap:28px}.grid>aside{padding-right:18px}.report-filter .actions{flex-basis:100%}.grid>section>.card:first-child{padding:28px}}
@media(max-width:720px){.shell{padding:16px}.brand{font-size:23px;letter-spacing:2px}.grid{display:block}.grid>aside{position:static;border-right:0;padding-right:0}.grid>aside .card{padding:16px 0;margin:0 0 16px}.grid>aside .card:first-child .project{display:inline-block;width:auto;margin:4px}.grid>section>.card:first-child{padding:22px}.grid>section>.card:first-child h1{font-size:25px}.daily-report,.daily-report:first-of-type{padding:16px}.daily-report>.report-heading{margin:-16px -16px 18px;padding:12px}.report-filter{gap:10px}.pdf-document{margin:0;padding:14px}}
@page{size:A4;margin:15mm 13mm}
@media print{html,body{background:#fff;color:#222;font-size:11pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}.pdf-document{max-width:none;padding:0;margin:0}.print-toolbar{display:none}.pdf-cover{padding-top:0;margin-bottom:12mm}.pdf-mode .daily-report,.pdf-mode .daily-report:first-of-type{box-shadow:none;border:0;border-radius:0;padding:0;margin:0 0 10mm;break-before:page}.pdf-mode .report-heading{margin:0 0 6mm;padding:3mm;background:#eeeae1;border-left:2px solid #a68d60;break-after:avoid}.pdf-mode .report-heading h3{font-size:13pt}.pdf-mode .photo-comparison{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.pdf-mode .photo{break-inside:avoid;width:45%}.pdf-mode .photo img{width:100%;height:auto;max-height:65mm;object-fit:contain}.pdf-mode .comparison-column .photos{grid-template-columns:1fr}.pdf-mode .comparison-column .photo{width:100%}.pdf-mode .urgent-card{break-inside:auto;padding:3mm;margin:5mm 0}.pdf-mode .urgent-view{break-after:avoid}.pdf-mode h4{break-after:avoid}.pdf-mode a{color:inherit;text-decoration:none}.pdf-mode .badge{font-size:9pt}.pdf-mode small,.pdf-mode .muted{font-size:9pt}}

button{display:inline-block}button.icon-button{display:inline-flex}@media print{@page{@bottom-center{content:"PIIN  ·  " counter(page) " / " counter(pages);font-family:Arial,sans-serif;font-size:8pt;color:#82745c}}}

/* V3.15 dashboard controls */
button#newReport,button#editProject{background:#ebe7de;color:#000}
.report-filter button.secondary{background:#ebe7de;color:#000}

/* V3.16 compact manpower totals */
.worker-summary{display:inline-block;white-space:nowrap}
.worker-cumulative{font-size:.85em;color:#777065}

/* V3.18 share management */
.share-entry{padding:14px 0;border-bottom:1px solid #ddd8ce}.share-entry p{margin:0 0 10px}.share-link-row{display:flex;gap:8px;align-items:center}.share-link-row input{min-width:0;flex:1}.share-link-row button{flex-shrink:0}

/* V3.19 password visibility */
.password-field{position:relative;width:100%}.password-field input{padding-right:48px}.password-field button.password-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;background:transparent;color:#777065;border:0;border-radius:2px;letter-spacing:0}.password-toggle:focus-visible{outline:2px solid #bcaa87;outline-offset:-3px}

/* V3.20 omit empty photo columns */
.photo-comparison.single-photo-column{grid-template-columns:minmax(0,1fr)}

/* V3.21 photo source controls */
.photo-upload-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.photo-upload-button{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:42px;margin:0;padding:10px 16px;background:#ebe7de;color:#000;border-radius:2px;font-size:13px;cursor:pointer;overflow:hidden}.photo-upload-button input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0;border:0}.photo-upload-button:focus-within{outline:2px solid #bcaa87;outline-offset:2px}

/* V3.22 project pending status */
.pending-overview{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.pending-overview button.pending-active{outline:2px solid #a68d60;outline-offset:2px}.project-pending{display:block;font-size:11px;color:#8a6d3c;margin-top:2px}.urgent-toggle{flex:0 0 auto;cursor:pointer;width:20px;height:20px;accent-color:#8a7550}.urgent-toggle:disabled{cursor:wait}.urgent-status-audit{font-size:12px;margin:4px 0 8px}.urgent-view{flex-wrap:wrap}.urgent-view>span{flex:1;min-width:140px}.urgent-view.done>span{text-decoration:line-through}.pending-overview .muted{font-size:12px}

.quick-toast{position:fixed;right:24px;bottom:24px;z-index:10000;max-width:min(420px,calc(100vw - 32px));padding:12px 18px;background:#ebe7de;color:#22211d;border:1px solid #c8bda8;box-shadow:0 4px 18px #0002;font-size:14px;pointer-events:none}.quick-toast[hidden]{display:none}.quick-toast.error{background:#fff0ed;border-color:#bb7668;color:#7d3026}.edit-audit{margin:20px 0;padding:12px 0;border-top:1px solid #ded8cc}.edit-audit summary{cursor:pointer;color:#777065;font-size:13px}@media(max-width:600px){.quick-toast{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px))}}

.project-hero .pending-overview{column-gap:8px;row-gap:10px}.project-hero .pending-overview>button{white-space:nowrap;flex:0 0 auto}.project-hero .pending-overview>.muted{flex-basis:100%}.project-hero-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px}.project-hero-tools .icon-button{width:36px;height:36px}.project-hero-tools .icon-button:hover,.project-hero-tools .icon-button:focus-visible{background:#ffffff14;color:#f5f2ec;outline:1px solid #b59b70;outline-offset:2px}.project-hero-tools .project-trash{margin-left:12px}.project-hero-tools .project-trash:hover,.project-hero-tools .project-trash:focus-visible{color:#efb4a4}

.project-hero .pending-overview{align-items:flex-end;margin-bottom:0}.project-hero .project-hero-tools{flex:0 0 auto;margin:0 0 0 auto}.project-hero-tools button#editProject,.project-hero-tools button#activityHistory{background:#22211d;color:#f5f2ec}.project-hero-tools button#editProject:hover,.project-hero-tools button#activityHistory:hover,.project-hero-tools button#editProject:focus-visible,.project-hero-tools button#activityHistory:focus-visible{background:#ffffff14;color:#fff}

/* Keep the project actions on one row on phones. */
@media(max-width:720px){.grid>section>.card.project-hero:first-child{padding-left:16px;padding-right:16px}.project-hero .pending-overview{column-gap:4px;row-gap:12px}.project-hero .pending-overview>button{font-size:12px;letter-spacing:0;padding:8px 6px;min-height:36px}.project-hero .project-hero-tools{gap:4px}.project-hero-tools .icon-button{width:28px;height:36px;padding:5px}.project-hero-tools .project-trash{margin-left:4px}}
@media(max-width:340px){.project-hero .pending-overview>button{font-size:11px}.project-hero .pending-overview>.muted{font-size:11px}}

/* V3.30 text search */
.report-filter .report-search{flex:1 1 100%;max-width:100%}
.report-filter input[type=search]{width:100%}
@media(max-width:720px){.report-filter .actions button{font-size:12px;padding:8px 10px}}

/* V3.32 staff account settings */
.workspace-name{display:flex;align-items:center;gap:5px;min-height:30px}
.workspace-name .profile-gear{width:30px;height:30px;color:#817b70}
.workspace-name .profile-gear:hover,.workspace-name .profile-gear:focus-visible{background:#ebe7de;color:#24231f}
