.work-log-content{max-width:1560px}.work-log-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:start;gap:20px}.work-log-form{display:grid;gap:18px}.work-log-date-card,.work-log-module,.work-log-history{border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 12px 32px rgba(20,60,52,.05)}.work-log-date-card{position:relative;padding:26px;display:flex;align-items:center;justify-content:space-between;gap:24px;overflow:hidden}.work-log-date-card:before{content:"";position:absolute;inset:0 auto 0 0;width:7px;background:var(--yellow)}.work-log-date-card h2{margin:0 0 7px}.work-log-date-card p{margin:0;color:var(--muted);font-size:9px}.work-log-date-card label{min-width:240px;display:grid;gap:8px;color:var(--muted);font-size:8px}.work-log-date-card input,.work-log-fields input,.work-log-fields select,.work-log-fields textarea{width:100%;border:1px solid #d4e0dc;border-radius:12px;background:#fafcfb;color:var(--ink);outline:0}.work-log-date-card input{height:48px;padding:0 14px;font-weight:700}.work-log-module{overflow:hidden}.work-log-module>header{padding:20px 24px;display:flex;align-items:center;gap:13px;background:linear-gradient(100deg,#f2cc63,#f7dc91)}.work-log-module>header>span{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#173c34;color:#fff;font-weight:800}.work-log-module h3{margin:0 0 4px;font-size:15px}.work-log-module header p{margin:0;color:#625a39;font-size:8px}.work-log-fields{padding:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.work-log-fields label{display:grid;gap:7px;color:#415952;font-size:9px;font-weight:700}.work-log-fields input,.work-log-fields select{height:44px;padding:0 12px}.work-log-fields textarea{min-height:92px;padding:12px;resize:vertical}.work-log-fields.textareas{grid-template-columns:1fr}.work-log-save{padding:22px;display:flex;align-items:center;gap:16px;border-radius:18px;background:#e8f3ef}.work-log-save button{min-width:190px;height:48px;border:0;border-radius:13px;background:var(--green);color:#fff;font-weight:800}.work-log-save p{margin:0;color:var(--green);font-size:9px}.work-log-save p.error{color:#a34e43}.work-log-history{position:sticky;top:120px;padding:20px}.work-log-history h3{margin:0 0 14px}.work-log-history button,.work-log-history article{width:100%;margin-top:10px;padding:14px;display:grid;gap:5px;border:1px solid var(--line);border-radius:13px;background:#f8faf9;color:var(--ink);text-align:left}.work-log-history button:hover{border-color:#73aa9c}.work-log-history b{font-size:12px}.work-log-history span,.work-log-history small,.viewer-note,.work-log-empty{color:var(--muted);font-size:8px}.viewer-note{margin:0 0 12px}.work-log-empty{padding:20px 0;text-align:center}@media(max-width:980px){.work-log-layout{grid-template-columns:1fr}.work-log-history{position:static;order:-1}.work-log-history>div:last-child{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.work-log-history button,.work-log-history article{margin:0}}@media(max-width:680px){.work-log-date-card{align-items:stretch;flex-direction:column}.work-log-date-card label{min-width:0}.work-log-fields{grid-template-columns:1fr;padding:16px}.work-log-module>header{padding:17px}.work-log-save{align-items:stretch;flex-direction:column}.work-log-save button{width:100%}.work-log-history>div:last-child{grid-template-columns:1fr}}
.work-log-export{min-width:145px;height:48px;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #b9d5cc;border-radius:13px;background:var(--mint);color:var(--green);font-size:9px;font-weight:800;text-decoration:none}

/* Keep all work-log actions on the fixed title bar. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.work-log-topbar{overflow:visible}
.work-log-top-actions{position:relative;flex:1;justify-content:flex-end;gap:7px}
.work-log-primary-actions{position:static;display:flex;align-items:center;gap:6px;transform:none}
.work-log-top-save,.work-log-top-export,.work-log-topbar #headerNewWorkLog{height:36px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;font-size:10px;font-weight:800;line-height:1;text-decoration:none;white-space:nowrap;cursor:pointer}
.work-log-top-save{min-width:88px;border:0;background:var(--green);color:#fff;box-shadow:0 6px 14px rgba(23,107,91,.16)}
.work-log-top-save:disabled{cursor:wait;opacity:.62}
.work-log-top-export{min-width:92px;border:1px solid #b9d5cc;background:var(--mint);color:var(--green)}
.work-log-topbar #headerNewWorkLog{min-width:82px;border:0}
.work-log-action-message{margin:0;padding:12px 16px;border:1px solid #cfe0da;border-radius:12px;background:#e8f3ef;color:var(--green);font-size:10px}
.work-log-action-message:empty{display:none}
.work-log-action-message.error{border-color:#e5c7c2;background:#fbefed;color:#a34e43}
.work-log-missing-alert{width:max-content!important;margin-top:10px!important;padding:7px 10px;border:1px solid #e7b8b0;border-radius:9px;background:#fff0ed;color:#b23f35!important;font-size:10px!important;font-weight:800}
.work-log-missing-alert[hidden]{display:none}
.work-log-missing-alert strong{font-size:13px}
.work-log-field-missing{border-color:#dc8176!important;background:#fff0ed!important;box-shadow:0 0 0 2px rgba(202,75,63,.08)}
.work-content-body{padding:22px}
.work-content-summary{margin-bottom:14px;display:flex;align-items:stretch;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.work-content-summary span{min-width:112px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #d7e5e0;border-radius:11px;background:#f7faf9;color:var(--muted);font-size:10px}
.work-content-summary strong{color:var(--green);font-size:16px}
.work-content-summary button{min-width:112px;padding:0 15px;border:0;border-radius:11px;background:var(--mint);color:var(--green);font-size:10px;font-weight:800;cursor:pointer}
.work-content-table-wrap{width:100%;overflow-x:auto;border:1px solid #dbe6e2;border-radius:13px}
.work-content-grid{min-width:930px;display:grid;grid-template-columns:minmax(120px,1fr) minmax(310px,2.5fr) repeat(3,minmax(100px,.75fr)) 70px;align-items:stretch}
.work-content-head{background:#f0f6f3;color:#52675f;font-size:10px;font-weight:800;text-align:center}
.work-content-head span{padding:11px 8px;border-right:1px solid #dbe6e2}
.work-content-row{border-top:1px solid #dbe6e2;background:#fff}
.work-content-row label{padding:7px;border-right:1px solid #e2e9e6}
.work-content-row input,.work-content-row textarea{width:100%;height:42px;padding:8px 10px;border:1px solid #d4e0dc;border-radius:9px;background:#fafcfb;color:var(--ink);font-size:10px;outline:0}
.work-content-row textarea{min-height:54px;resize:vertical;line-height:1.45}
.work-content-row input:focus,.work-content-row textarea:focus{border-color:#65a997;box-shadow:0 0 0 3px rgba(101,169,151,.12)}
.work-content-row>button{margin:7px;padding:0 8px;border:0;border-radius:9px;background:#f8e8e4;color:#a34e43;font-size:10px;font-weight:700;cursor:pointer}
.work-log-history-item{margin-top:10px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:7px}
.work-log-history-item .work-log-history-load{width:auto;min-width:0;margin:0;padding:12px;display:grid;gap:4px;border:1px solid #dce7e2;border-radius:11px;background:#f8fbf9;color:var(--ink);text-align:left;cursor:pointer}
.work-log-history-item .work-log-history-load:hover{border-color:#80b5a6;background:var(--mint)}
.work-log-history-item .work-log-history-delete{width:auto;margin:0;padding:0 10px;border:1px solid #edc9c3;border-radius:11px;background:#fff0ed;color:#a8443a;font-size:10px;font-weight:800;text-align:center;cursor:pointer}
.work-log-history-item .work-log-history-delete:hover{border-color:#d78378;background:#fbe2de}
.work-log-history-item .work-log-history-delete:disabled{cursor:wait;opacity:.6}

@media(max-width:760px){
  .work-log-workspace{padding-top:144px}
  .work-log-topbar{min-height:144px;align-content:center;align-items:center;flex-wrap:wrap;gap:8px 14px;padding-top:14px;padding-bottom:14px}
  .work-log-topbar>div:first-child{flex:1}
  .work-log-top-actions{position:static;flex:0 0 100%;justify-content:flex-end;gap:7px}
  .work-log-primary-actions{position:static;flex:0 1 auto;gap:5px;transform:none}
  .work-log-primary-actions>*{min-width:0;flex:none;padding-right:9px;padding-left:9px}
  .work-log-top-save,.work-log-top-export,.work-log-topbar #headerNewWorkLog{height:40px}
  .work-log-topbar #headerNewWorkLog{display:inline-flex!important;min-width:0;padding-right:9px;padding-left:9px}
  .work-content-body{padding:16px}
  .work-content-summary{justify-content:stretch}
  .work-content-summary span,.work-content-summary button{min-height:46px;flex:1 1 120px}
}
.work-log-fields.personnel-fields{grid-template-columns:1fr}.work-log-fields.personnel-fields label{grid-template-columns:170px minmax(0,1fr);align-items:center}.work-log-date-card input:disabled{cursor:not-allowed;border-color:#dce5e1;background:#edf1ef;color:#687872;opacity:1}.work-log-history-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.work-log-new{flex:0 0 auto;padding:8px 10px;border:0;border-radius:9px;background:var(--green);color:#fff;font-size:8px;font-weight:800;cursor:pointer}@media(max-width:680px){.work-log-fields.personnel-fields label{grid-template-columns:1fr}.work-log-history-head{align-items:stretch;flex-direction:column}.work-log-new{width:100%}}
.work-log-temperature{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(35,66,57,.035)}.work-log-temperature>header{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#e7f2ee}.work-log-temperature>header h3{margin:0;font-size:13px}.work-log-temperature>header span{color:var(--green);font-size:10px;font-weight:800}.work-log-temperature-table{width:100%;overflow:auto}.work-log-temperature-table table{width:100%;min-width:720px;border-collapse:collapse}.work-log-temperature-table th,.work-log-temperature-table td{padding:10px 12px;border:1px solid #e0e8e5;text-align:center;white-space:nowrap}.work-log-temperature-table thead th{background:#f3f7f5;color:#52665f;font-size:10px}.work-log-temperature-table tbody th{min-width:120px;background:#f8faf9;color:var(--green);font-size:10px}.work-log-temperature-table tbody td{font-size:10px}.work-log-temperature-empty{margin:0;padding:24px;color:var(--muted);text-align:center}
.work-log-fields label,.work-log-fields input,.work-log-fields select,.work-log-fields textarea{font-size:11px}
.work-log-date-card .eyebrow{font-size:10px}.work-log-date-card h2{font-size:20px}.work-log-date-card p{font-size:11px}.work-log-date-card label{font-size:10px}.work-log-date-card input{font-size:10px}.topbar button.export-cta{border:0;cursor:pointer}
.work-log-temperature-table table{table-layout:fixed}.work-log-temperature-table .measurement-category-column{width:18%}.work-log-temperature-table .measurement-item-column{width:28%}.work-log-temperature-table .measurement-slot-column{width:18%}.work-log-temperature-table tbody td.measurement-item-cell{min-width:0;font-weight:800!important;text-align:center!important;white-space:normal;overflow-wrap:anywhere}.work-log-temperature-table tbody td.measurement-slot-cell{min-width:0;font-weight:400!important;text-align:center!important}

/* Replace the long history list with a compact date selector above the form. */
.work-log-content{padding-top:0}.work-log-layout{grid-template-columns:minmax(0,1fr)}
.work-log-frozen-area{position:sticky;top:100px;z-index:18;padding:38px 0 18px;background:var(--paper)}.work-log-section-intro{margin-bottom:24px}.work-log-date-card{position:relative;box-shadow:0 14px 34px rgba(35,66,57,.11)}
.work-log-date-controls{width:min(650px,58%);display:grid;grid-template-columns:minmax(190px,1fr) minmax(180px,.85fr) auto;align-items:end;gap:10px}
.work-log-date-card .work-log-date-controls label{min-width:0;width:auto}
.work-log-date-card select{width:100%;height:48px;padding:0 14px;border:1px solid #d4e0dc;border-radius:12px;background:#fafcfb;color:var(--green);font-size:11px;font-weight:800;outline:0}
.work-log-selected-delete{height:48px;padding:0 14px;border:1px solid #edc9c3;border-radius:11px;background:#fff0ed;color:#a8443a;font-size:10px;font-weight:800;white-space:nowrap;cursor:pointer}
.work-log-selected-delete:hover{border-color:#d78378;background:#fbe2de}
.work-log-selected-delete:disabled{cursor:wait;opacity:.6}
.work-log-toolbar button:disabled,.work-log-toolbar .permission-disabled{cursor:not-allowed;opacity:.46;filter:saturate(.35);box-shadow:none;pointer-events:none}
.work-log-readonly-note{height:32px;padding:0 9px;display:inline-flex;align-items:center;border:1px solid #d8e2de;border-radius:9px;background:#f4f7f6;color:#667872;font-size:9px;font-weight:800;white-space:nowrap}
@media(max-width:680px){.work-log-frozen-area{position:static;padding:0;background:transparent}.work-log-content{padding-top:24px}.work-log-date-controls{width:100%;grid-template-columns:1fr}.work-log-date-card .work-log-date-controls label{width:100%}}

/* Compact work-log month calendar. */
.work-log-calendar-card{width:min(560px,100%);margin:0 0 12px;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 9px 24px rgba(35,66,57,.06)}
.work-log-calendar-card>header{padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(120deg,#f7fbf9 0%,#edf6f2 100%);border-bottom:1px solid #dce8e3}
.work-log-calendar-card>header h2{margin:2px 0 0;font-size:16px}
.work-log-calendar-card>header .eyebrow{font-size:9px}
.work-log-calendar-nav{display:flex;align-items:center;gap:7px}
.work-log-calendar-nav strong{min-width:92px;color:var(--ink);font-size:12px;text-align:center;white-space:nowrap}
.work-log-calendar-nav button{width:31px;height:31px;padding:0;border:1px solid #c9dbd4;border-radius:9px;background:#fff;color:var(--green);font-size:19px;font-weight:800;line-height:1;cursor:pointer}
.work-log-calendar-nav button:hover:not(:disabled){border-color:#6aa997;background:var(--mint)}
.work-log-calendar-nav button:disabled{cursor:not-allowed;opacity:.35}
.work-log-calendar-weekdays,.work-log-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.work-log-calendar-weekdays{padding:9px 12px 3px;color:#6a7c76;font-size:9px;font-weight:800;text-align:center}
.work-log-calendar-grid{padding:0 12px 8px}
.work-log-calendar-day,.work-log-calendar-empty{min-width:0;height:34px}
.work-log-calendar-day{padding:0;display:grid;place-items:center;border:0;background:transparent;font:inherit}
.work-log-calendar-day>span{width:27px;height:27px;display:grid;place-items:center;border-radius:50%;font-size:10px;font-weight:800;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.work-log-calendar-day.has-log{cursor:pointer}
.work-log-calendar-day.has-log>span{background:#173c34;color:#fff;box-shadow:0 5px 13px rgba(23,60,52,.2)}
.work-log-calendar-day.has-log:hover>span{transform:translateY(-2px);background:#176b5b;box-shadow:0 8px 17px rgba(23,107,91,.26)}
.work-log-calendar-day.has-log:focus-visible{outline:0}
.work-log-calendar-day.has-log:focus-visible>span,.work-log-calendar-day.selected>span{background:#173c34;box-shadow:0 0 0 4px #f2cc63,0 7px 16px rgba(23,60,52,.22)}
.work-log-calendar-day.no-log{cursor:not-allowed}
.work-log-calendar-day.no-log>span{background:#edf1ef;color:#a4aea9}
.work-log-calendar-body>footer{min-height:35px;padding:7px 15px;display:flex;align-items:center;gap:12px;border-top:1px solid #e2ebe7;background:#fafcfb;color:var(--muted);font-size:9px}
.work-log-calendar-body>footer span{display:inline-flex;align-items:center;gap:7px}
.work-log-calendar-body>footer i{width:9px;height:9px;display:inline-block;border-radius:50%}
.work-log-calendar-body>footer i.has-log{background:#173c34}
.work-log-calendar-body>footer i.no-log{background:#dce3e0}
.work-log-calendar-body>footer strong{margin-left:auto;color:var(--green);font-size:9px}
.work-log-date-controls{width:min(440px,50%);grid-template-columns:minmax(180px,1fr) auto}
#workLogForm{scroll-margin-top:104px}

@media(max-width:680px){
  .work-log-calendar-card{width:100%}
  .work-log-calendar-card>header{padding:11px 12px}
  .work-log-calendar-nav strong{min-width:78px}
  .work-log-calendar-weekdays{padding:8px 7px 3px}
  .work-log-calendar-grid{padding:0 7px 8px}
  .work-log-calendar-day,.work-log-calendar-empty{height:38px}
  .work-log-calendar-day>span{width:30px;height:30px;font-size:10px}
  .work-log-calendar-body>footer{padding:7px 12px;gap:10px;flex-wrap:wrap}
  .work-log-calendar-body>footer strong{width:auto;margin-left:auto}
}

/* Denser log modules: less vertical travel while keeping fields readable. */
.work-log-form{gap:12px}
#workLogModules{display:grid;gap:12px}
.work-log-frozen-area{position:static;top:auto;z-index:auto;padding:12px 0 10px;background:transparent}
.work-log-section-intro{margin-bottom:10px}
.work-log-section-intro h2{font-size:18px}
.work-log-section-intro p{font-size:10px}
.work-log-date-card{padding:15px 18px;gap:16px;border-radius:16px}
.work-log-date-card:before{width:5px}
.work-log-date-card h2{margin-bottom:4px;font-size:16px}
.work-log-date-card p{font-size:10px}
.work-log-date-card label{gap:4px;font-size:9px}
.work-log-date-card input{height:38px;padding:0 11px}
.work-log-date-controls{width:min(380px,46%);gap:7px}
.work-log-selected-delete{height:38px;padding:0 12px}
.work-log-module{border-radius:16px}
.work-log-module>header{padding:10px 14px;gap:10px}
.work-log-module>header>span{width:30px;height:30px;border-radius:8px;font-size:10px}
.work-log-module h3{margin-bottom:2px;font-size:13px}
.work-log-module header p{font-size:8px}
.work-log-fields{padding:12px 14px;gap:9px 12px}
.work-log-fields label{gap:4px;font-size:10px}
.work-log-fields input,.work-log-fields select{height:34px;padding:0 10px;border-radius:9px}
.work-log-fields textarea{min-height:54px;padding:8px 10px;border-radius:9px;line-height:1.35}
.work-log-fields.personnel-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.work-log-fields.personnel-fields label{grid-template-columns:110px minmax(0,1fr);gap:8px}
.work-log-module-weather .work-log-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.work-log-module-equipment .work-log-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.work-log-module-hse .work-log-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.work-log-module-meals .work-log-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
.work-content-body{padding:12px 14px}
.work-content-summary{margin-bottom:8px;gap:6px}
.work-content-summary span{min-width:100px;padding:6px 9px;gap:8px}
.work-content-summary strong{font-size:14px}
.work-content-summary button{min-width:100px;min-height:34px;padding:0 11px}
.work-content-head span{padding:7px 6px}
.work-content-row label{padding:4px}
.work-content-row input,.work-content-row textarea{height:34px;padding:6px 8px}
.work-content-row textarea{min-height:40px;line-height:1.25}
.work-content-row>button{margin:4px}
.work-log-temperature{border-radius:16px}
.work-log-temperature>header{padding:10px 14px}
.work-log-temperature-table th,.work-log-temperature-table td{padding:7px 9px}
.work-log-temperature-empty{padding:16px}
.work-log-action-message{padding:9px 12px}

@media(max-width:1100px){
  .work-log-module-equipment .work-log-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .work-log-module-weather .work-log-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:680px){
  .work-log-frozen-area{padding:0 0 10px}
  .work-log-date-card{padding:14px}
  .work-log-date-controls{width:100%}
  .work-log-fields.personnel-fields,.work-log-module-weather .work-log-fields,.work-log-module-equipment .work-log-fields,.work-log-module-hse .work-log-fields,.work-log-module-meals .work-log-fields{grid-template-columns:1fr}
  .work-log-fields.personnel-fields label{grid-template-columns:1fr}
  .work-log-fields{padding:11px 12px;gap:8px}
}

/* Work-log command center, module navigation, and status feedback. */
.work-log-content{max-width:1400px}
.work-log-command-grid,.work-log-module-nav,.work-log-layout{width:min(1280px,100%);margin-right:auto;margin-left:auto}
.work-log-command-grid{display:grid;grid-template-columns:minmax(420px,560px) minmax(360px,1fr);align-items:start;gap:12px}
.work-log-command-grid .work-log-calendar-card{width:100%;margin:0}
.work-log-command-grid .work-log-date-card{width:100%;min-height:112px;margin:0;box-shadow:0 9px 24px rgba(35,66,57,.06);scroll-margin-top:112px}
.work-log-command-grid .work-log-date-controls{width:min(380px,48%)}
.work-log-calendar-header-actions{display:flex;align-items:center;gap:8px}
.work-log-calendar-toggle{height:31px;padding:0 10px;border:1px solid #c9dbd4;border-radius:9px;background:#fff;color:var(--green);font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer}
.work-log-calendar-toggle:hover{border-color:#6aa997;background:var(--mint)}
.work-log-calendar-body[hidden]{display:none}
.work-log-calendar-card.is-collapsed>header{min-height:56px;border-bottom:0}
.work-log-calendar-card.is-collapsed>header .eyebrow{display:none}
.work-log-calendar-card.is-collapsed>header h2{margin:0}
.work-log-module-nav{position:sticky;top:100px;z-index:19;margin-top:10px;margin-bottom:2px;padding:6px;display:flex;align-items:center;gap:6px;overflow-x:auto;border:1px solid #dce7e2;border-radius:13px;background:rgba(250,252,251,.96);box-shadow:0 8px 20px rgba(35,66,57,.06);backdrop-filter:blur(10px)}
.work-log-module-nav button{height:32px;padding:0 13px;flex:0 0 auto;border:1px solid transparent;border-radius:9px;background:transparent;color:#536861;font-size:9px;font-weight:800;white-space:nowrap;cursor:pointer}
.work-log-module-nav button:hover{background:#e7f2ee;color:var(--green)}
.work-log-module-nav button.active{border-color:#b8d3ca;background:var(--mint);color:var(--green)}
.work-log-module,.work-content-module{scroll-margin-top:154px}
.work-log-save-state{height:32px;padding:0 8px;display:inline-flex;align-items:center;gap:6px;border:1px solid #d6e2de;border-radius:9px;background:#f8faf9;color:#5f716b;font-size:9px;white-space:nowrap}
.work-log-save-state i{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#d09b22}
.work-log-save-state b{padding:3px 5px;border-radius:6px;background:#edf2f0;color:#6c7b76;font-size:8px}
.work-log-save-state[data-state="saving"] i{background:#3b82a0;animation:work-log-status-pulse 1s ease-in-out infinite}
.work-log-save-state[data-state="saved"]{border-color:#c5ded5;background:#f1f8f5;color:var(--green)}
.work-log-save-state[data-state="saved"] i{background:#2f8a70}
.work-log-save-state[data-state="error"]{border-color:#e6c7c1;background:#fff3f1;color:#a34e43}
.work-log-save-state[data-state="error"] i{background:#c55347}
@keyframes work-log-status-pulse{50%{opacity:.35}}

/* Equipment remains compact but is easier to scan by category. */
.work-log-module-equipment .work-log-fields{grid-template-columns:1fr;gap:10px}
.work-log-equipment-group{min-width:0;margin:0;padding:9px 10px 10px;border:1px solid #dde7e3;border-radius:11px;background:#fbfcfc}
.work-log-equipment-group legend{padding:0 6px;color:var(--green);font-size:9px;font-weight:900;letter-spacing:.05em}
.work-log-equipment-group>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 11px}

@media(max-width:980px){
  .work-log-command-grid{grid-template-columns:1fr}
  .work-log-command-grid .work-log-calendar-card{width:min(560px,100%)}
  .work-log-command-grid .work-log-date-card{min-height:0}
}

@media(max-width:1100px){
  .work-log-equipment-group>div{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
  .work-log-module-nav{top:144px}
  .work-log-module,.work-content-module{scroll-margin-top:198px}
  .work-log-save-state{height:36px;padding-right:6px;padding-left:6px;gap:4px}
}

@media(max-width:680px){
  .work-log-calendar-card>header{align-items:flex-start;flex-direction:column;gap:8px}
  .work-log-calendar-header-actions{width:100%;justify-content:space-between}
  .work-log-calendar-card.is-collapsed>header{align-items:center;flex-direction:row}
  .work-log-calendar-card.is-collapsed .work-log-calendar-nav{display:none}
  .work-log-command-grid .work-log-date-card{align-items:stretch}
  .work-log-command-grid .work-log-date-controls{width:100%}
  .work-log-module-nav{margin-top:8px;padding:5px}
  .work-log-equipment-group>div{grid-template-columns:1fr}
}

@media(max-width:430px){.work-log-save-state b{display:none}}

/* Fixed weekly work-log control center. */
.work-log-content{max-width:1560px;padding-top:0}
.work-log-sticky-controls{position:sticky;top:100px;z-index:19;width:min(1380px,100%);margin:0 auto;padding:10px 0 12px;background:rgba(239,246,242,.97);border-radius:0 0 16px 16px;box-shadow:0 12px 24px rgba(35,66,57,.06);backdrop-filter:blur(12px)}
.work-log-command-grid{width:100%;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);align-items:stretch;gap:10px}
.work-log-command-grid .work-log-calendar-card{width:100%;height:114px;margin:0;border-radius:15px}
.work-log-command-grid .work-log-calendar-card>header{height:46px;padding:6px 12px;gap:10px}
.work-log-calendar-card>header h2{margin:1px 0 0;font-size:12px;line-height:1.2}
.work-log-calendar-card>header .eyebrow{margin-bottom:1px;font-size:7px}
.work-log-calendar-card>header small{display:block;margin-top:2px;color:var(--green);font-size:8px;font-weight:800;white-space:nowrap}
.work-log-calendar-header-actions{flex:0 0 auto}
.work-log-calendar-nav{gap:5px}
.work-log-calendar-nav strong{min-width:150px;font-size:10px}
.work-log-calendar-nav button{width:30px;height:30px;border-radius:8px}
.work-log-calendar-body{height:68px}
.work-log-calendar-grid{height:100%;padding:6px 10px 7px;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.work-log-calendar-day{min-width:0;height:54px;padding:4px 2px;display:grid;grid-template-rows:auto 1fr;place-items:center;border:1px solid #dce7e3;border-radius:9px;background:#f8faf9}
.work-log-calendar-day small{color:#73847e;font-size:8px;font-weight:800;line-height:1}
.work-log-calendar-day>span{width:25px;height:25px;font-size:9px}
.work-log-calendar-day.has-log{border-color:#bdd8cf;background:#f0f7f4}
.work-log-calendar-day.no-log{border-color:#e7ecea;background:#f5f7f6}
.work-log-calendar-day.no-log small{color:#a5afab}
.work-log-command-grid .work-log-date-card{width:100%;min-height:114px;padding:14px 18px;align-self:stretch;border-radius:15px}
.work-log-command-grid .work-log-date-card h2{font-size:16px}
.work-log-command-grid .work-log-date-controls{width:min(390px,48%)}
.work-log-module-nav{position:static;top:auto;width:100%;min-height:54px;margin:8px 0 0;padding:7px;gap:8px;border-radius:14px}
.work-log-module-nav button{height:40px;min-width:135px;padding:0 20px;flex:1 1 0;border-radius:10px;font-size:11px;letter-spacing:.02em}
.work-log-module-nav button.active{border-color:#8fc1b3;background:#dff0ea;box-shadow:0 4px 12px rgba(23,107,91,.12)}
.work-log-layout{margin-top:10px}
#workLogForm,.work-log-module,.work-content-module{scroll-margin-top:310px}

@media(max-width:1100px){
  .work-log-command-grid{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}
  .work-log-command-grid .work-log-calendar-card{width:100%}
  .work-log-calendar-nav strong{min-width:112px}
  .work-log-module-nav button{min-width:122px;padding:0 14px}
}

@media(max-width:760px){
  .work-log-sticky-controls{position:static;width:100%;padding-top:10px;background:transparent;box-shadow:none;backdrop-filter:none}
  .work-log-command-grid{grid-template-columns:1fr}
  .work-log-command-grid .work-log-date-card{min-height:0}
  .work-log-module-nav{overflow-x:auto}
  .work-log-module-nav button{min-width:132px;flex:0 0 auto}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:154px}
}

@media(max-width:680px){
  .work-log-calendar-card>header{align-items:center;flex-direction:row;gap:8px}
  .work-log-calendar-header-actions{width:auto}
  .work-log-calendar-nav strong{min-width:96px;font-size:9px}
  .work-log-calendar-grid{padding-right:6px;padding-left:6px;gap:3px}
  .work-log-calendar-day{height:54px}
  .work-log-calendar-day>span{width:25px;height:25px}
}

/* The whole work-log command area lives in the fixed application header. */
.work-log-workspace{padding-top:244px}
.work-log-topbar{height:244px;min-height:244px;padding:10px 44px 12px;display:grid;grid-template-rows:44px 114px 54px;align-content:start;align-items:stretch;gap:5px;background:#fffffff7;overflow:hidden}
.work-log-topbar-main,.work-log-topbar>.work-log-command-grid,.work-log-topbar>.work-log-module-nav{width:min(1380px,100%);margin-right:auto;margin-left:auto}
.work-log-topbar-main{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:24px}
.work-log-topbar-main h1{margin:0;font-size:21px}
.work-log-topbar-main>.top-actions{flex:1}
.work-log-topbar>.work-log-command-grid{height:114px;margin-top:0;margin-bottom:0;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)}
.work-log-topbar .work-log-calendar-card,.work-log-topbar .work-log-date-card{height:114px;min-height:114px}
.work-log-topbar>.work-log-module-nav{position:static;top:auto;height:54px;min-height:54px;margin-top:0;margin-bottom:0}
.work-log-content{padding-top:18px}
.work-log-layout{margin-top:0}
#workLogForm,.work-log-module,.work-content-module{scroll-margin-top:260px}

@media(max-width:1000px){
  .work-log-topbar{padding-right:26px;padding-left:26px}
}

@media(max-width:760px){
  .work-log-workspace{padding-top:244px}
  .work-log-topbar{height:244px;min-height:244px;padding:10px 18px 12px;display:grid;grid-template-rows:44px 114px 54px;gap:5px}
  .work-log-topbar-main{width:100%;flex-wrap:nowrap}
  .work-log-topbar-main>div:first-child{flex:0 0 auto}
  .work-log-topbar-main .work-log-top-actions{position:static;flex:1 1 auto;justify-content:flex-end}
  .work-log-topbar>.work-log-command-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
  .work-log-topbar .work-log-date-card{min-height:114px;padding:10px 12px}
  .work-log-topbar .work-log-date-card>div:first-child>p:not(.eyebrow):not(.work-log-missing-alert){display:none}
  .work-log-topbar .work-log-date-controls{width:min(220px,52%)}
  .work-log-topbar>.work-log-module-nav{overflow-x:auto}
  .work-log-topbar>.work-log-module-nav button{min-width:118px;flex:0 0 auto}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:260px}
}

@media(max-width:680px){
  .work-log-topbar{inset:0 0 auto 0}
  .work-log-topbar-main h1{font-size:18px}
  .work-log-topbar-main .eyebrow{display:none}
  .work-log-topbar .work-log-save-state{display:none}
  .work-log-topbar>.work-log-command-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .work-log-topbar .work-log-calendar-nav strong{min-width:76px}
}

/* Full-width frozen header: title controls on the left, weekly calendar on the right. */
.work-log-workspace{padding-top:222px}
.work-log-topbar{height:222px;min-height:222px;grid-template-columns:minmax(0,1.12fr) minmax(520px,.88fr);grid-template-rows:142px 54px;column-gap:12px;row-gap:4px}
.work-log-topbar-main{width:100%;max-width:none;grid-column:1;grid-row:1;margin:0;display:flex;align-items:center}
.work-log-heading{width:100%;min-width:0}
.work-log-heading h1{margin:0;font-size:25px}
.work-log-top-actions{width:100%;min-width:0;margin-top:10px;display:flex;align-items:center;justify-content:flex-start;gap:7px;flex-wrap:wrap}
.work-log-primary-actions{position:static;display:flex;align-items:center;gap:7px;transform:none}
.work-log-top-save,.work-log-topbar #headerNewWorkLog,.work-log-top-export{width:auto;min-width:92px;height:36px;padding:0 12px;border-radius:9px}
.work-log-top-actions .work-log-selected-delete{height:36px;padding:0 10px}
.work-log-top-actions .avatar{width:36px;height:36px;border-radius:9px}
.work-log-topbar>.work-log-command-grid{width:100%;max-width:none;grid-column:2;grid-row:1;margin:0;display:block;align-self:center}
.work-log-topbar .work-log-calendar-card{width:100%;max-width:none;height:114px;margin:0}
.work-log-topbar>.work-log-module-nav{width:100%;max-width:none;grid-column:1 / -1;grid-row:2;margin:0}
.work-log-content{width:100%;max-width:none}
.work-log-layout{width:100%;max-width:none}
#workLogForm,.work-log-module,.work-content-module{scroll-margin-top:238px}

@media(max-width:1100px){
  .work-log-workspace{padding-top:278px}
  .work-log-topbar{height:278px;min-height:278px;grid-template-columns:minmax(0,1fr) minmax(390px,.9fr);grid-template-rows:198px 54px}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:294px}
}

@media(max-width:680px){
  .work-log-workspace{padding-top:368px}
  .work-log-topbar{height:368px;min-height:368px;grid-template-columns:1fr;grid-template-rows:170px 114px 54px;row-gap:5px}
  .work-log-topbar-main{grid-column:1;grid-row:1}
  .work-log-topbar>.work-log-command-grid{grid-column:1;grid-row:2}
  .work-log-topbar>.work-log-module-nav{grid-column:1;grid-row:3}
  .work-log-heading h1{font-size:20px}
  .work-log-top-actions{margin-top:7px;gap:5px}
  .work-log-top-save,.work-log-topbar #headerNewWorkLog,.work-log-top-export{min-width:82px;padding-right:8px;padding-left:8px;font-size:9px}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:384px}
}

/* Place primary actions beside the page title and keep the weekly calendar shallow. */
.work-log-workspace{padding-top:188px}
.work-log-topbar{height:188px;min-height:188px;grid-template-rows:112px 50px}
.work-log-title-row{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:18px}
.work-log-title-copy{min-width:max-content}
.work-log-title-row .work-log-primary-actions{margin-left:auto;flex:0 0 auto}
.work-log-top-actions{margin-top:5px}
.work-log-topbar>.work-log-command-grid{align-self:center}
.work-log-topbar .work-log-calendar-card{height:108px;min-height:108px}
.work-log-topbar .work-log-calendar-card>header{height:40px;padding:5px 10px}
.work-log-topbar .work-log-calendar-body{height:68px}
.work-log-topbar .work-log-calendar-grid{padding:5px 8px 6px;gap:4px}
.work-log-topbar .work-log-calendar-day{height:57px;padding:4px 2px;border-radius:8px}
.work-log-topbar .work-log-calendar-day>span{width:25px;height:25px;font-size:9px}
.work-log-topbar>.work-log-module-nav{height:50px;min-height:50px;padding:5px 7px}
.work-log-topbar>.work-log-module-nav button{height:38px}
#workLogForm,.work-log-module,.work-content-module{scroll-margin-top:204px}

@media(max-width:1400px){
  .work-log-top-actions .avatar{display:none}
}

@media(max-width:1100px){
  .work-log-workspace{padding-top:230px}
  .work-log-topbar{height:230px;min-height:230px;grid-template-rows:154px 50px}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:246px}
}

@media(max-width:900px){
  .work-log-workspace{padding-top:330px}
  .work-log-topbar{height:330px;min-height:330px;grid-template-columns:1fr;grid-template-rows:142px 108px 50px}
  .work-log-topbar-main{grid-column:1;grid-row:1}
  .work-log-topbar>.work-log-command-grid{grid-column:1;grid-row:2}
  .work-log-topbar>.work-log-module-nav{grid-column:1;grid-row:3}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:346px}
}

@media(max-width:680px){
  .work-log-workspace{padding-top:370px}
  .work-log-topbar{height:370px;min-height:370px;grid-template-rows:180px 108px 50px}
  .work-log-title-row{align-items:flex-start;flex-direction:column;gap:6px}
  .work-log-title-row .work-log-primary-actions{width:100%;margin-left:0}
  .work-log-title-row .work-log-primary-actions>*{flex:1 1 0}
  .work-log-top-actions{margin-top:6px}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:386px}
}

/* Read-only daily statistics assembled from the linked business pages. */
.business-stat-grid{padding:14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.business-stat-grid article{min-width:0;padding:14px;border:1px solid #dbe7e2;border-radius:12px;background:linear-gradient(145deg,#fbfdfc,#f1f7f4)}
.business-stat-grid article>div{display:flex;align-items:center;gap:8px;color:#36554c;font-size:11px;font-weight:800}
.business-stat-grid article>div small{width:25px;height:25px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#e0efe9;color:var(--green);font-size:8px}
.business-stat-grid article>p{margin:12px 0 8px;display:flex;align-items:baseline;gap:5px}
.business-stat-grid article strong{color:var(--ink);font-size:24px;line-height:1}
.business-stat-grid article em{color:#60736c;font-size:9px;font-style:normal;font-weight:800}
.business-stat-grid article>a{color:#4f8072;font-size:8px;font-weight:700;text-decoration:none}
.business-stat-grid article>a:hover{text-decoration:underline}
@media(max-width:1050px){.business-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.business-stat-grid{grid-template-columns:1fr}.business-stat-grid article{padding:12px}}

/* Photos are read-only records matched by the selected station and work-log date. */
.work-log-photo-body{padding:14px;display:grid;gap:12px}
.work-log-photo-summary{padding:11px 13px;display:flex;align-items:center;gap:14px;border:1px solid #d8e6e1;border-radius:12px;background:#f5faf8}
.work-log-photo-summary>div{display:flex;align-items:baseline;gap:5px;color:var(--green)}
.work-log-photo-summary strong{font-size:23px;line-height:1}
.work-log-photo-summary span,.work-log-photo-summary p,.work-log-photo-summary a{font-size:9px}
.work-log-photo-summary p{margin:0;display:flex;align-items:center;gap:8px;color:#62766f}
.work-log-photo-summary p b{color:var(--ink)}
.work-log-photo-summary a{margin-left:auto;color:var(--green);font-weight:800;text-decoration:none}
.work-log-photo-summary a:hover{text-decoration:underline}
.work-log-photo-groups{display:grid;gap:12px}
.work-log-photo-group{padding:12px;border:1px solid #dbe7e2;border-radius:13px;background:#fbfdfc}
.work-log-photo-group>header{margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.work-log-photo-group h4{margin:0;color:var(--ink);font-size:11px}
.work-log-photo-group>header span{padding:4px 8px;border-radius:999px;background:#e2f0eb;color:var(--green);font-size:8px;font-weight:800}
.work-log-photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.work-log-photo-grid figure{min-width:0;margin:0;overflow:hidden;border:1px solid #dde8e4;border-radius:11px;background:#fff}
.work-log-photo-grid figure>a{display:block;overflow:hidden;aspect-ratio:4/3;background:#e9f1ee}
.work-log-photo-grid img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .18s ease}
.work-log-photo-grid a:hover img{transform:scale(1.025)}
.work-log-photo-grid figcaption{padding:8px;display:grid;gap:3px}
.work-log-photo-grid figcaption span{overflow:hidden;color:var(--ink);font-size:9px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}
.work-log-photo-grid figcaption small{color:#72847d;font-size:8px}
.work-log-photo-empty{margin:0;padding:22px;border:1px dashed #cdded8;border-radius:12px;color:var(--muted);font-size:9px;text-align:center}
@media(max-width:1050px){.work-log-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.work-log-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.work-log-photo-summary{align-items:flex-start;flex-wrap:wrap}.work-log-photo-summary a{width:100%;margin-left:0}}
@media(max-width:460px){.work-log-photo-grid{grid-template-columns:1fr}}

/* Personnel hierarchy: only the deputy-duty role and value are emphasized. */
.work-log-module-personnel h3 b{color:var(--green);font-size:inherit;font-weight:800}
.work-log-fields.personnel-fields .personnel-field{font-weight:400}
.work-log-fields.personnel-fields .personnel-field>span,
.work-log-fields.personnel-fields .personnel-field input{font-weight:400}
.work-log-fields.personnel-fields .deputy-duty-field,
.work-log-fields.personnel-fields .deputy-duty-field>span,
.work-log-fields.personnel-fields .deputy-duty-field input{font-weight:800}

/* Equipment and HSE use the same explicit health-state treatment. */
.work-log-module-status{color:#176b5b;font-size:inherit;font-weight:800}
.work-log-module-status.abnormal{color:#a33f35}
.work-log-module-equipment.has-abnormal>header,
.work-log-module-hse.has-abnormal>header{background:linear-gradient(100deg,#f1b9ad,#f8d7cf)}
.work-log-module-equipment.has-abnormal>header>span,
.work-log-module-hse.has-abnormal>header>span{background:#a8443a}
.work-log-module-equipment.has-abnormal header p,
.work-log-module-hse.has-abnormal header p{color:#763d36}

/* Match the overview header: title, actions, compact week calendar, avatar. */
.work-log-workspace{padding-top:176px}
.topbar.work-log-topbar{height:176px;min-height:176px;padding:14px 28px;display:grid;grid-template-columns:112px minmax(0,1.2fr) minmax(0,1fr) 36px;grid-template-rows:90px 50px;gap:8px 14px;align-items:center}
.work-log-topbar .work-log-topbar-main{grid-column:1;grid-row:1;display:block;min-width:0}
.work-log-topbar .work-log-title-copy{min-width:0}
.work-log-topbar h1{margin:0;font-size:23px}
.work-log-toolbar{grid-column:2;grid-row:1;min-width:0;display:flex;align-items:center;justify-content:center;align-content:center;flex-wrap:wrap;gap:10px;align-self:center}
.work-log-topbar .work-log-primary-actions{width:auto;margin:0;display:flex;flex:0 0 auto;align-items:center;gap:8px}
.work-log-topbar .work-log-top-actions{position:static;width:auto;margin:0;flex:0 0 auto;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap}
.work-log-topbar .work-log-save-state{display:inline-flex}
.work-log-topbar>.avatar{grid-column:4;grid-row:1;width:36px;height:36px;display:grid}
.work-log-topbar>.work-log-command-grid{grid-column:3;grid-row:1;min-width:0;min-height:0;height:auto}
.work-log-topbar .work-log-calendar-card{width:100%;height:90px;min-height:90px;padding:7px 9px;display:grid;grid-template-columns:minmax(190px,.65fr) minmax(0,1.8fr);gap:9px;border-radius:14px;background:linear-gradient(120deg,#f8fbfa,#eef7f3);box-shadow:none}
.work-log-topbar .work-log-calendar-card>header{height:auto;min-width:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;border:0;background:none}
.work-log-topbar .work-log-calendar-card>header>div:first-child{align-self:stretch;display:flex;flex-direction:column}
.work-log-topbar .work-log-calendar-card>header h2{margin:1px 0 0;font-size:12px}
.work-log-topbar .work-log-calendar-card>header small{margin-top:auto;margin-bottom:8px;font-size:15px;font-weight:900;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.work-log-calendar-heading-row{display:flex;align-items:baseline;gap:7px}
.work-log-calendar-month{color:var(--green);font-size:17px;font-weight:900;line-height:1;white-space:nowrap}
.work-log-topbar .work-log-calendar-header-actions{width:100%;min-width:0;align-self:stretch;display:grid;grid-template-rows:auto 1fr;gap:4px;justify-items:center}
.work-log-topbar .work-log-calendar-nav{width:auto;align-self:end;justify-content:flex-start;gap:8px}
.work-log-topbar .work-log-calendar-nav button{width:34px;height:34px;min-width:34px;padding:0;border-radius:8px;font-size:24px}
.work-log-topbar .work-log-calendar-body{height:auto;min-width:0}
.work-log-topbar .work-log-calendar-grid{height:100%;padding:0;gap:4px;grid-template-columns:repeat(7,minmax(0,1fr))}
.work-log-topbar .work-log-calendar-day{height:auto;min-height:74px;padding:5px 2px;display:grid;grid-template-rows:auto 1fr;place-items:center;border-radius:9px}
.work-log-topbar .work-log-calendar-day small{color:#71837d;font-size:8px;font-weight:800}
.work-log-topbar .work-log-calendar-day>span{width:27px;height:27px;font-size:9px}
.work-log-topbar .work-log-calendar-day.has-log{border-color:#bdd8cf;background:#f0f7f4;cursor:pointer}
.work-log-topbar .work-log-calendar-day.has-log>span{color:#fff;background:#173c34;box-shadow:0 5px 13px rgba(23,60,52,.18)}
.work-log-topbar .work-log-calendar-day.has-log:hover>span{transform:translateY(-1px);background:#176b5b}
.work-log-topbar .work-log-calendar-day.has-log:focus-visible{outline:2px solid #c99b25;outline-offset:2px}
.work-log-topbar .work-log-calendar-day.selected{border-color:#d5ac3f;background:#fff7df;box-shadow:inset 0 -3px #e6ba49}
.work-log-topbar .work-log-calendar-day.selected>span{color:#173c34;background:#f2cc63;box-shadow:0 5px 13px rgba(191,139,20,.2)}
.work-log-topbar .work-log-calendar-day.no-log{color:#a2ada9;background:#f5f7f6}
.work-log-topbar .work-log-calendar-day.no-log small{color:#a5afab}
.work-log-topbar .work-log-calendar-day.no-log>span{color:#a4aea9;background:#e8eeeb}
.work-log-topbar .work-log-calendar-day.no-log:not(:disabled){cursor:pointer;opacity:1}
.work-log-topbar .work-log-calendar-day.no-log:not(:disabled):hover{border-color:#6aa997;background:#e9f4ef}
.work-log-topbar>.work-log-module-nav{grid-column:1/-1;grid-row:2;height:50px;min-height:50px;margin:0;padding:5px 7px}
#workLogForm,.work-log-module,.work-content-module{scroll-margin-top:192px}
@media(max-width:1100px){
  .work-log-workspace{padding-top:270px}
  .topbar.work-log-topbar{height:270px;min-height:270px;padding:12px 24px;grid-template-columns:124px minmax(0,1fr) 40px;grid-template-rows:90px 90px 50px;gap:8px 12px}
  .work-log-topbar>.avatar{grid-column:3}
  .work-log-topbar>.work-log-command-grid{grid-column:1/-1;grid-row:2}
  .work-log-topbar>.work-log-module-nav{grid-row:3}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:286px}
}
@media(max-width:680px){
  .work-log-workspace{padding-top:306px}
  .topbar.work-log-topbar{height:306px;min-height:306px;padding:10px 16px;grid-template-columns:minmax(0,1fr) 38px;grid-template-rows:38px 76px 92px 50px;gap:10px 7px}
  .work-log-topbar>.avatar{grid-column:2;width:38px;height:38px}
  .work-log-toolbar{grid-column:1/-1;grid-row:2;width:100%;gap:6px}
  .work-log-topbar .work-log-primary-actions{gap:6px}
  .work-log-topbar .work-log-primary-actions>*{min-width:0;padding:0 10px;height:34px}
  .work-log-topbar .work-log-top-actions{gap:6px}
  .work-log-topbar .work-log-save-state{padding:5px 7px;min-height:28px}
  .work-log-topbar .work-log-selected-delete{height:28px}
  .work-log-topbar>.work-log-command-grid{grid-column:1/-1;grid-row:3}
  .work-log-topbar .work-log-calendar-card{height:92px;min-height:92px;grid-template-columns:118px minmax(0,1fr);gap:7px}
  .work-log-topbar .work-log-calendar-card>header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column;gap:5px}
  .work-log-topbar .work-log-calendar-card>header .eyebrow{display:none}
  .work-log-topbar .work-log-calendar-card>header #workLogCalendarStatus{display:none}
  .work-log-calendar-heading-row{gap:5px}
  .work-log-topbar .work-log-calendar-card>header h2{font-size:10px}
  .work-log-calendar-month{font-size:14px}
  .work-log-topbar .work-log-calendar-day>span{width:24px;height:24px}
  .work-log-topbar>.work-log-module-nav{grid-row:4}
  #workLogForm,.work-log-module,.work-content-module{scroll-margin-top:322px}
}

/* A draft marker distinguishes local content from formally saved logs. */
.work-log-topbar .work-log-calendar-day.has-draft{position:relative;border-color:#d7ad41}
.work-log-topbar .work-log-calendar-day.has-draft em{position:absolute;bottom:1px;font-size:7px;font-style:normal;color:#926c10;line-height:1}

.work-log-publication-status { flex-basis:100%; margin:4px 0 0; color:#48695b; font-size:13px; line-height:1.6; }
.work-log-submit { background:#206955; color:white; }
.work-log-submit:disabled { opacity:.55; cursor:wait; }
.work-log-primary-actions [hidden], .sidebar nav a[hidden] { display:none !important; }

.work-log-workspace { padding-top:220px; }
.topbar.work-log-topbar { height:220px; min-height:220px; grid-template-rows:90px 34px 50px; }
.work-log-submission-bar { grid-column:1/-1; grid-row:2; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.work-log-submission-bar .work-log-publication-status { flex:1; margin:0; }
.work-log-publication-summary { flex:1; min-width:0; display:grid; gap:2px; }
.work-log-latest-submission { margin:0; color:#48695b; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.work-log-submission-bar #workLogLogout { flex:none; min-height:30px; padding:4px 8px; }
.work-log-topbar>.work-log-module-nav { grid-row:3; }
#workLogForm,.work-log-module,.work-content-module { scroll-margin-top:236px; }
@media(max-width:1100px) {
  .work-log-workspace { padding-top:314px; }
  .topbar.work-log-topbar { height:314px; min-height:314px; grid-template-rows:90px 90px 34px 50px; }
  .work-log-submission-bar { grid-row:3; }
  .work-log-topbar>.work-log-module-nav { grid-row:4; }
  #workLogForm,.work-log-module,.work-content-module { scroll-margin-top:330px; }
}
@media(max-width:680px) {
  .work-log-workspace { padding-top:356px; }
  .topbar.work-log-topbar { height:356px; min-height:356px; grid-template-rows:38px 76px 92px 40px 50px; }
  .work-log-submission-bar { grid-row:4; }
  .work-log-publication-status,.work-log-latest-submission { font-size:11px; }
  .work-log-topbar>.work-log-module-nav { grid-row:5; }
  #workLogForm,.work-log-module,.work-content-module { scroll-margin-top:372px; }
}

#headerNewWorkLog[hidden],#saveWorkLog[hidden],#submitWorkLog[hidden],#auditArchiveExport[hidden],#deleteSelectedWorkLog[hidden] { display:none !important; }
body { overflow-x:clip; }
body.submitted-log-view #workLogForm .work-log-field-missing { border-color:#dce7e2; background:#f6f9f7; box-shadow:none; }
.submitted-log-view #addWorkContent,.submitted-log-view [data-remove-work-content] { display:none; }
@media(min-width:681px) and (max-width:1100px) {
  .work-log-workspace { padding-top:382px; }
  .topbar.work-log-topbar { height:382px; min-height:382px; grid-template-rows:148px 90px 44px 50px; }
  .work-log-topbar .work-log-primary-actions { flex-wrap:wrap; justify-content:center; width:100%; }
  #workLogForm,.work-log-module,.work-content-module { scroll-margin-top:398px; }
}
@media(max-width:680px) {
  .work-log-workspace { padding-top:418px; }
  .topbar.work-log-topbar { height:418px; min-height:418px; grid-template-rows:38px 124px 92px 54px 50px; }
  .work-log-topbar .work-log-primary-actions { flex-wrap:wrap; justify-content:center; width:100%; }
  #workLogForm,.work-log-module,.work-content-module { scroll-margin-top:434px; }
}

.mobile-work-section input:disabled,.mobile-work-section select:disabled,.mobile-work-section textarea:disabled { color:#36574a; opacity:1; background:#f6f9f7; border-color:#d8e4dc; box-shadow:none; }
.mobile-work-section #addWorkContent,.mobile-work-section [data-remove-work-content] { display:none; }

/* Daily modules show the current value once and keep attribution close to it. */
.work-log-module-activity{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;border-bottom:1px solid var(--line,#dbe7e3);background:#f7faf8}
.work-log-module-activity p{margin:3px 0;color:#31584f;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.work-log-module-activity p span{display:inline-block;min-width:112px;color:#71837c;margin-right:12px}
.work-log-module-activity button,.work-log-unlabelled button{flex-shrink:0;border:1px solid #bad4ca;border-radius:9px;background:white;color:#176b58;padding:8px 14px;font:inherit;font-size:12px;cursor:pointer}
.work-log-temperature{padding:0;display:block}
.work-log-temperature>header{padding:18px 22px;justify-content:flex-start;gap:14px;background:linear-gradient(100deg,#f5d266,#f8df93)}
.work-log-temperature>header>span{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;border-radius:12px;background:#153e34;color:white;font-weight:800}
.work-log-temperature>header h3{margin:0;font-size:18px}.work-log-temperature>header p{margin:4px 0 0;color:#596c55;font-size:12px}
.work-log-temperature-table .measurement-item-cell{font-weight:800;text-align:center}.work-log-temperature-table .measurement-slot-cell{font-weight:400;text-align:center}
.measurement-draft-cell{display:grid;gap:3px;justify-items:center;min-width:0}.measurement-draft-cell input{box-sizing:border-box;width:100%;max-width:140px;min-width:0;height:40px;padding:6px;border:1px solid #c5ddd4;border-radius:8px;background:#f7fbf9;color:var(--ink);font:inherit;text-align:center}.measurement-draft-cell input:focus{outline:2px solid #83b9a7;outline-offset:1px;background:#fff}.measurement-draft-cell input.measurement-unsaved{border-color:#d6ad51;background:#fff9e9}.measurement-draft-cell input:disabled{opacity:.6}.work-log-draft-conflict{width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-sizing:border-box;overflow:auto;border:1px solid #d4e6df;border-radius:18px;padding:24px;background:#fff;color:var(--ink)}.work-log-draft-conflict::backdrop{background:rgba(15,36,29,.45)}.work-log-draft-conflict article{padding:12px;margin:12px 0;border:1px solid #e1c77c;border-radius:10px;background:#fff9e9}.work-log-draft-conflict p{white-space:pre-wrap;overflow-wrap:anywhere}.work-log-draft-conflict select{width:100%;padding:10px}.work-log-draft-conflict footer{display:flex;flex-wrap:wrap;gap:10px}.work-log-draft-conflict button{padding:10px 16px;min-height:40px;border-radius:8px;border:1px solid #94c4b7;background:#e7f4ee;color:#176a57;cursor:pointer}
.measurement-edit{display:inline-block;min-width:56px;padding:6px 12px;border:1px solid #c5ddd4;border-radius:8px;background:#f3faf7;color:#176b58;font:inherit;cursor:pointer}
.measurement-edit:hover{background:#dfefe7;border-color:#176b58}.measurement-edit:focus-visible{outline:2px solid #176b58;outline-offset:3px}
.work-log-unlabelled{padding:16px 20px}.work-log-unlabelled p{display:flex;justify-content:space-between;gap:12px;align-items:center}.work-log-unlabelled h4{margin-top:0}
.work-log-activity-dialog{width:min(740px,calc(100vw - 40px));max-height:85vh;padding:0;border:1px solid #c7ddd4;border-radius:18px;color:#21483d;box-shadow:0 20px 70px #12372e40}
.work-log-activity-dialog::backdrop{background:#102d2580}.work-log-activity-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #dbe7e3;gap:16px}.work-log-activity-dialog h2{margin:5px 0 0;font-size:22px}.work-log-activity-dialog header p{margin:0;color:#6b8176;font-size:13px}.work-log-activity-dialog header button{border:1px solid #c5ddd4;border-radius:9px;background:white;padding:8px 16px;color:#176b58;font:inherit;cursor:pointer}
.work-log-activity-body{padding:8px 24px 24px;overflow:auto}.work-log-activity-body h3{font-size:16px;margin:22px 0 6px}.work-log-activity-body section>p{color:#6b8176;font-size:13px;line-height:1.6}.work-log-activity-body ol{list-style:none;padding:0;margin:12px 0}.work-log-activity-body li{padding:12px 0;border-bottom:1px solid #e4ede8}.work-log-activity-body li div{display:flex;justify-content:space-between;gap:12px}.work-log-activity-body li span{color:#477565;font-size:12px}.work-log-activity-body time{display:block;margin-top:5px;color:#6b8176;font-size:13px}.work-log-activity-body small{display:block;margin-top:6px;color:#7a827c}
@media(max-width:640px){.work-log-module-activity{padding:10px 14px;align-items:flex-start;gap:10px}.work-log-module-activity p span{display:block;margin-right:0}.work-log-activity-dialog{width:calc(100vw - 24px)}.work-log-activity-dialog>header,.work-log-activity-body{padding-left:16px;padding-right:16px}.work-log-submission-bar{flex-wrap:wrap}}

.measurement-cell-reading{display:inline-flex;align-items:center;justify-content:center;gap:4px}.measurement-cell-reading[hidden]{display:none}.measurement-cell-editor{display:grid;grid-template-columns:minmax(40px,1fr) 26px 26px;align-items:center;gap:4px;width:100%;max-width:160px;margin:auto}.measurement-cell-editor input{width:100%;min-width:0;box-sizing:border-box;height:36px;padding:5px;border:1px solid #69a992;border-radius:7px;background:#fff;color:var(--ink);font:inherit;text-align:center}.measurement-cell-editor input:focus{outline:2px solid #93c4b3;outline-offset:1px}.measurement-cell-editor button{min-width:0;height:32px;padding:0;border:1px solid #c1dcd1;border-radius:6px;background:#eef7f2;color:var(--green);font:inherit;cursor:pointer}.measurement-cell-editor [data-save-measurement]{background:var(--green);border-color:var(--green);color:#fff}.measurement-cell-editor button:disabled{opacity:.5;cursor:wait}.measurement-cell-editor small{grid-column:1/-1;white-space:normal;font-size:11px;color:#a24734;line-height:1.4}.measurement-cell-editor small:empty{display:none}.measurement-cell-editor [data-retry-measurement]{grid-column:1/-1;height:auto;min-height:28px;font-size:11px}.measurement-cell-editor [data-retry-measurement][hidden]{display:none}.measurement-conflict-row>td{padding:0!important;text-align:left!important;white-space:normal!important}.measurement-conflict-panel{padding:16px;background:#fff5dc;color:#735521;white-space:normal;scroll-margin-top:236px}.measurement-conflict-panel p{margin:8px 0;font-size:13px;line-height:1.6}.measurement-conflict-actions{display:flex;flex-wrap:wrap;gap:8px}.measurement-conflict-actions button{min-height:36px;padding:7px 12px;border:1px solid #d9c48c;border-radius:8px;background:#fff;color:#735521;font:inherit;cursor:pointer}.measurement-conflict-actions button:disabled{opacity:.5;cursor:wait}@media(max-width:1100px){.measurement-conflict-panel{scroll-margin-top:398px}}@media(max-width:680px){.measurement-conflict-panel{scroll-margin-top:434px}.measurement-conflict-panel{padding:12px}.measurement-conflict-actions button{flex:1 1 130px}}

/* Measurements belong to the daily weather module, below the weather fields. */
.work-log-module-weather > .work-log-temperature{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none}
.work-log-measurement-heading{padding:16px 20px;background:#f7faf8}
.work-log-measurement-heading h4{margin:0;color:var(--green);font-size:15px}
.work-log-measurement-heading p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
@media(max-width:680px){.work-log-measurement-heading{padding:14px}}

/* Pending phone revisions remain visible on their own module tabs. */
#logRevisionToolbar[hidden],.work-log-module-nav button[hidden],.work-log-module[hidden]{display:none!important}
#logRevisionToolbar [role=status]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.work-log-module-nav button.has-phone-revisions{border-color:#e5aaa2;background:#fff0ed;color:#913e34}
.work-log-module-nav button.has-phone-revisions:hover,.work-log-module-nav button.has-phone-revisions.active{border-color:#d9867b;background:#fce5df;color:#88392f;box-shadow:0 3px 10px rgba(150,62,47,.10)}
[data-revision-tab-count]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;margin-left:6px;border-radius:6px;background:#f3c9bf;font-size:11px}

/* Submission status stays beside its action; automatic sync is a separate state. */
.work-log-topbar .work-log-primary-actions>.work-log-submit-actions{display:inline-flex;align-items:center;flex:0 0 auto;gap:12px;height:auto;padding:0}
.work-log-publication-badge{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 14px;border:2px solid #cf9b3e;border-radius:10px;background:#fff3d9;color:#82500d;font-size:14px;font-weight:800;line-height:1.2;white-space:nowrap;box-sizing:border-box}
.work-log-publication-badge i{width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}
.work-log-publication-badge[data-state="submitted"]{border-color:#6aa98b;background:#e4f4eb;color:#185e43}
.work-log-publication-badge[hidden]{display:none!important}
@media(max-width:680px){.work-log-topbar .work-log-primary-actions>.work-log-submit-actions{gap:8px}.work-log-publication-badge{min-height:34px;padding:7px 10px;font-size:13px}.work-log-submit-actions #submitWorkLog{height:34px}}
