#unfinishedTab, #tasksTab, #historyTab { flex: 1; padding-inline: 6px; }
.worker-task-context { display: grid; gap: .25rem; margin-block: .5rem; color: var(--muted); }
.worker-task-context[hidden] { display: none; }
#serviceList .service-card { padding: .65rem; }
.worker-service-row { display: flex; align-items: center; gap: .5rem; }
.worker-service-info { flex: 1; min-width: 0; }
.worker-service-info strong { display: block; overflow-wrap: anywhere; }
.worker-service-info small { display: inline; margin-right: .4rem; }
.worker-service-quantity { flex: none; padding: .3rem .45rem; border: 1px solid var(--line); border-radius: .45rem; white-space: nowrap; }
#serviceList .worker-service-row .service-actions { display: flex; gap: .25rem; margin: 0; }
#serviceList .worker-service-row button[data-action] { width: auto; min-height: 40px; padding: .25rem .4rem; font-size: .78rem; white-space: nowrap; margin: 0; }
#serviceList button[data-action="fail"] { color: var(--text); background: var(--tint); border: 1px solid var(--accent); }
@media (max-width: 460px) {
  .worker-service-row { flex-wrap: wrap; }
  .worker-service-info { flex-basis: calc(100% - 7rem); }
  #serviceList .worker-service-row .service-actions { flex-basis: 100%; justify-content: flex-end; }
}
.worker-task-context small { display: block; margin-top: .2rem; }

.worker-customer { padding: .55rem .7rem; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.worker-customer strong { display: block; color: var(--text); font-size: .95rem; }
.worker-customer small { font-size: .82rem; }

#photoSection { padding-block: 12px; }
#photoSection .section-head { align-items: center; margin-bottom: 8px; }
#photoSection .upload { flex-direction: row; gap: 8px; min-height: 44px; padding: 6px 12px; border-radius: 10px; }
#photoSection .upload-icon { font-size: 20px; }
#photoGrid:empty { display: none; }

@media(max-width:650px) {
  .shell .app-tabs {display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:4px 0 9px}
  .shell .app-tabs button {
    flex:0 0 auto;
    min-height:36px;
    padding:5px clamp(6px,2vw,11px);
    border-radius:999px;
    font-size:clamp(11px,3.2vw,13px);
    line-height:1.2;
    white-space:nowrap;
  }
  .shell .app-tabs button[aria-pressed=true] {
    background:var(--tint);
    border-color:var(--accent);
    box-shadow:none;
    font-weight:650;
  }
}

.worker-task-context .worker-customer {
  display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:9px;
  padding:7px 8px;border:1px solid var(--line);border-radius:10px;background:var(--panel);
}
.worker-customer small {display:block;color:var(--muted);line-height:1.35}
.worker-order-icon {
  display:grid;place-items:center;width:42px;height:42px;border-radius:9px;
  background:var(--tint);color:var(--accent);
}
.worker-order-icon::before {
  content:"";width:15px;height:20px;border:2px solid currentColor;border-radius:3px;
  background:linear-gradient(currentColor,currentColor) center 6px/7px 1px no-repeat,
    linear-gradient(currentColor,currentColor) center 10px/7px 1px no-repeat;
}

#orderFilesSection.order-files-empty {padding:6px 9px;margin-block:6px}
#orderFilesSection.order-files-empty .section-head {display:none}
#orderFilesSection.order-files-empty #orderFilesList {margin:0}
#orderFilesSection.order-files-empty p {margin:0}
@media(max-width:650px) {
  #orderFilesSection:not(.order-files-empty),#serviceSection {padding:9px}
  #serviceSection .section-head {margin-bottom:6px}
  #serviceSection .service-card {padding:7px;margin-block:4px}
  #serviceSection .worker-service-quantity {font-size:11px;white-space:normal;text-align:right;max-width:38%;padding:2px 5px}
  #serviceSection .quantity-unavailable {color:var(--muted);font-weight:400}
  #serviceSection .service-actions {gap:4px;margin-top:5px}
}

@media(max-width:650px) {
  .shell .intro {padding-block:8px;margin-block:0 7px}
  .shell .intro h1 {margin-block:3px 5px}
  .shell .worker-task-context {gap:3px;margin-block:4px}
  .shell .worker-task-context .worker-customer {padding:5px 7px;gap:7px}
  .shell .worker-customer strong,.shell .worker-customer small {margin:0;line-height:1.22}
  .shell .card {margin-block:7px;padding-block:9px}
  .shell .card .section-head {margin-bottom:5px}
  .shell .card .section-head :is(h2,p) {margin-block:0;line-height:1.25}
  .shell .card :is(.hint,.fineprint) {line-height:1.25;margin-block:3px}
  .shell .worker-service-info {gap:1px;line-height:1.25}
  .shell .task-choices {gap:4px}
}

.shell:has(#serviceSection:not([hidden])) .intro .eyebrow {
  font-size:clamp(18px,5vw,24px);line-height:1.2;font-weight:800;letter-spacing:0;text-transform:none;
}
.shell:has(#serviceSection:not([hidden])) #pageTitle {display:none}
.worker-planned-slot {font-size:13px;color:var(--muted)}
.worker-order-heading {font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.shell .worker-task-context .worker-customer {padding:6px 8px;gap:9px}
.shell .worker-customer strong {font-size:13px;line-height:1.4}
.shell .worker-customer small {font-size:12px;line-height:1.4;color:var(--text)}

#serviceSection .worker-service-quantity {white-space:nowrap;max-width:none}
#orderFilesSection .order-files-empty-note {display:flex;align-items:center;gap:5px}

#serviceSection .service-card[data-service-state=completed] {--service-state-color:#248657;border-color:var(--service-state-color)}
#serviceSection .service-card[data-service-state=pending] {--service-state-color:#b0800c;border-color:var(--service-state-color)}
#serviceSection .service-card[data-service-state=paused] {--service-state-color:#c56915;border-color:var(--service-state-color);background:var(--panel)}
#serviceSection .service-card[data-service-state=completed] .worker-service-status {color:#17613d;font-weight:700}
#serviceSection .service-card[data-service-state=pending] .worker-service-status {color:#795608;font-weight:700}
#serviceSection .service-card[data-service-state=paused] .worker-service-status {color:#904200;font-weight:700}
:root[data-theme=dark] #serviceSection .service-card[data-service-state=completed] .worker-service-status {color:#89dfaa}
:root[data-theme=dark] #serviceSection .service-card[data-service-state=pending] .worker-service-status {color:#f7d56f}
:root[data-theme=dark] #serviceSection .service-card[data-service-state=paused] .worker-service-status {color:#ffba79}

#serviceSection .service-card[data-service-state=cancelled] {border-color:#dc293e}
#serviceSection .service-card[data-service-state=cancelled] .worker-service-status {color:#a7152a;font-weight:700}
:root[data-theme=dark] #serviceSection .service-card[data-service-state=cancelled] .worker-service-status {color:#ff9ca7}
#serviceSection .inline-failure > strong {font-size:13px;line-height:1.2}
#serviceSection .inline-failure button {min-height:36px;padding:5px 9px;font-size:13px}

#serviceSection .inline-failure {
  display:grid;grid-template-columns:minmax(0,1fr);gap:6px;
  margin-top:5px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--panel);
}
#serviceSection .failure-heading {padding-bottom:6px;border-bottom:1px solid var(--line)}
#serviceSection .failure-caption {display:flex;align-items:center;gap:6px;line-height:1.2}
#serviceSection .failure-icon {
  display:grid;place-items:center;width:20px;height:20px;flex:none;border-radius:5px;
  background:var(--soft);color:var(--text);font-size:13px;font-weight:750;
}
#serviceSection .failure-heading .failure-icon {background:var(--tint);color:var(--accent)}
#serviceSection .inline-failure label {display:grid;gap:3px;margin:0;font-size:13px;font-weight:600}
#serviceSection .inline-failure select {
  width:100%;min-width:0;min-height:38px;padding:4px 7px;border:1px solid var(--line);
  border-radius:8px;background:var(--soft);color:var(--text);font:inherit;
}
#serviceSection .failure-save-row {display:flex;justify-content:flex-end;padding-top:6px;border-top:1px solid var(--line)}
#serviceSection .failure-save-row button {width:auto}

@media(max-width:650px) {
  #serviceSection .worker-service-info > strong {font-size:14px;line-height:1.22;font-weight:700}
  #serviceSection .worker-service-info > small {font-size:12px;line-height:1.2}
  #serviceSection :is(.service-actions,.failure-save-row) button {
    min-height:36px;width:auto;padding-inline:7px;font-size:12px;line-height:1.2;
  }
}

#serviceList .worker-service-row .service-actions > button {
  flex:0 0 auto;
  width:max-content;
  min-width:0;
  min-height:30px;
  max-width:100%;
  padding:3px 5px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}

.worker-planned-slot {display:flex;align-items:center;gap:6px}
.worker-planned-slot::before {
  content:"";width:12px;height:12px;flex:none;border:1.5px solid currentColor;border-radius:50%;
  background:linear-gradient(currentColor,currentColor) 5px 2px/1px 4px no-repeat,
    linear-gradient(currentColor,currentColor) 5px 5px/3px 1px no-repeat;
}
.shell .worker-customer strong {margin-bottom:3px}

@media(max-width:650px) {
  .shell .worker-planned-slot {margin-bottom:7px}
  .shell:has(#serviceSection:not([hidden])) .intro {padding-bottom:0;margin-bottom:3px}
  .shell #statusMessage:not(:empty) {margin-block:3px 4px;padding:7px 9px;min-height:0}
  .shell #statusMessage:not(:empty) ~ #orderFilesSection {margin-top:4px}
}

@media(max-width:650px) {
  #workList .work {padding-block:5px;gap:6px}
  #workList .work strong {font-size:13px;line-height:1.22}
  #workList .work small {font-size:11px;line-height:1.2}
}

#workSummarySection .section-head {align-items:center;gap:6px;margin-bottom:4px}
#workSummarySection .section-head .step {width:25px;height:25px;min-width:25px;font-size:13px}
#workSummarySection #workTitle {font-size:15px;line-height:1.2}
#workSummarySection #workList .work {padding:4px 0;gap:5px}
#workSummarySection #workList .work strong {font-size:12px;line-height:1.2}
#workSummarySection #workList .work small {font-size:11px;line-height:1.2;margin-top:1px}
#workSummarySection #workList .work-check {font-size:12px}
#workSummarySection #reportNoteLabel {font-size:12px;margin:6px 0 3px}
#workSummarySection #reportNote {min-height:0;padding:6px 8px;font-size:13px;line-height:1.3}
#workSummarySection #reportNote::placeholder {font-size:12px}

@media(max-width:650px) {
  .shell :is(.report-section,#measurementSection) {padding:8px 10px;margin-block:6px;font-size:13px;line-height:1.3}
  .shell :is(.report-section,#measurementSection) .section-head {align-items:center;gap:6px;margin-bottom:4px}
  .shell :is(.report-section,#measurementSection) .section-head .step {
    width:25px;height:25px;min-width:25px;flex-basis:25px;font-size:13px;
  }
  .shell :is(.report-section,#measurementSection) :is(h2,summary) {font-size:15px;line-height:1.2}
  .shell :is(.report-section,#measurementSection) :is(h3,.field-label,label,.section-head p) {font-size:12px;line-height:1.25}
  .shell .report-section :is(.upload,.document-info,.act-work,.act-extra,.act-check,.act-data-group) {padding:6px 8px}
  .shell .report-section :is(.act-fields,.act-signature-actions,.act-extra-actions,.act-add-actions) {gap:5px}
  .shell .report-section :is(.act-work-info,.act-extra-help,.act-extra-meta,.hint,.fineprint) {font-size:11px;line-height:1.25}
  .shell .report-section :is(.primary,.secondary-button,.signature-actions button) {
    padding:6px 9px;font-size:13px;min-height:36px;line-height:1.2;
  }
}

.pdf-canvas-toolbar :is(.pdf-zoom-label,button:last-child) {display:none}
