.workflow-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; margin:10px 0 14px; }
.survey-header-actions {display:flex;align-items:center;gap:8px;margin-left:auto;flex:none;}
#editorPanel .survey-header-actions #archiveBtn {width:40px;height:40px;min-width:40px;padding:8px;background:#fff0f2;color:#a11e38;border:1px solid #f7c8d0;}
#editorPanel .survey-header-actions #archiveBtn svg {width:20px;height:20px;}
#editorPanel input.workflow-required-missing,#editorPanel #photoPanel.workflow-required-missing {border:2px solid #c33449;background:#fff7f8;}
#editorPanel #photoPanel.workflow-required-missing {border-radius:6px;padding:10px;}
.workflow-required-help {display:block;color:#aa243b;font-size:12px;line-height:1.5;margin:5px 0 8px;}
.workflow-required-help[hidden] {display:none;}
.workflow-tab-missing {position:relative;}
.workflow-tab-missing::after {content:'!';position:absolute;right:4px;top:3px;width:14px;height:14px;border-radius:50%;background:#b72e44;color:#fff;font:700 11px/14px sans-serif;text-align:center;}
#workflowSavedState.draft-save-error {color:#a92335;font-weight:700;}
.details-title-row #detailsTitle {flex:1;min-width:0;}
.details-title-row #recordPreviewDelete {width:40px;height:40px;flex:none;padding:8px;}
@media(max-width:420px){#editorPanel .survey-window-heading{gap:6px;}#editorPanel #formTitle{font-size:15px;}#editorPanel .survey-window-icon{width:22px;height:22px;}.survey-header-actions{gap:6px;}}
#editorPanel {--survey-accent:#1769b0;--survey-tint:#edf5ff;--survey-border:#b8d5ee;--text:#203047;--muted:#526579;--line:#cbd5df;--line-soft:#dce3eb;--border:#b7c5d2;color:#203047;background:#f8fafc;border:1px solid var(--survey-border);border-radius:8px;box-shadow:0 12px 32px #14223333;color-scheme:light;}
#editorPanel[data-survey-kind="land"] {--survey-accent:#087b56;--survey-tint:#edf9f2;--survey-border:#b3d9c3;}
#editorPanel[data-survey-kind="sign"] {--survey-accent:#af3457;--survey-tint:#fff0f4;--survey-border:#e9b8c7;}
#editorPanel>.panel-head {background:var(--survey-accent);color:white;padding:14px;gap:10px;border:0;}
.survey-window-heading {display:flex;align-items:center;gap:10px;min-width:0;}
.survey-window-heading>div {min-width:0;}
#editorPanel #formTitle {font-size:18px;line-height:1.45;color:white;overflow-wrap:anywhere;margin:0;}
.survey-window-icon {width:28px;height:28px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#surveyWindowMode {font-size:12px;line-height:1.5;color:#fff;opacity:.9;}
#editorPanel #closeEditorBtn {color:white;background:#ffffff18;border:1px solid #ffffff66;width:40px;height:40px;flex:none;}
#editorPanel #surveyForm {background:var(--survey-tint);}
#editorPanel label,#editorPanel summary,#editorPanel legend,#editorPanel h3,#editorPanel strong {color:#203047;}
#editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select,#editorPanel textarea {color:#203047;background:#fff;border:1px solid #b7c5d2;border-radius:6px;box-shadow:none;}
#editorPanel input::placeholder,#editorPanel textarea::placeholder {color:#69788a;opacity:1;}
#editorPanel input:read-only {background:#edf1f5;color:#526579;}
#editorPanel input:focus,#editorPanel select:focus,#editorPanel textarea:focus {outline:2px solid var(--survey-accent);outline-offset:1px;}
#editorPanel button {border-radius:6px;}
#editorPanel .secondary,#editorPanel .icon-btn.light,#editorPanel .geometry-draw-btn,#editorPanel #pickDraftLocationBtn {background:white;color:#294058;border:1px solid #b7c5d2;box-shadow:none;}
#editorPanel .primary {background:var(--survey-accent);color:#fff;border:1px solid var(--survey-accent);box-shadow:none;}
#editorPanel .workflow-tabs button {background:#fff;color:#415569;border:1px solid #c6d3df;border-bottom:3px solid #c6d3df;}
#editorPanel .workflow-tabs button[aria-selected="true"] {background:var(--survey-accent);border-color:var(--survey-accent);color:white;}
#editorPanel .workflow-missing-link {color:var(--survey-accent);}
#editorPanel .building-page-tabs button {background:white;color:#294058;border-color:#b7c5d2;}
#editorPanel .building-page-tabs [aria-selected="true"] {background:var(--survey-accent);color:white;border-color:var(--survey-accent);}
#editorPanel #buildingBodyPage,#editorPanel #buildingUsesPage {border-top-color:var(--survey-border);}
#editorPanel #buildingFloorWarning,#editorPanel #ltax-error {color:#ad2445;}
#editorPanel #ltax-check-note {color:#765119;}
#editorPanel .linked-parcel-context,#editorPanel .geometry-info {background:#fff;color:#203047;border-color:var(--survey-border);}
#editorPanel #archiveBtn {color:#a92643;background:#fff4f5;border-color:#e3b6c2;}
#editorPanel button:disabled {opacity:.5;cursor:not-allowed;}
#surveyTypeMenu {background:#f8fafc;color:#203047;border:1px solid #cbd5df;}
#surveyTypeMenu h2 {color:#203047;}
#surveyTypeMenu .menu-head {display:flex;align-items:center;justify-content:space-between;gap:10px;}
#surveyTypeMenu .menu-head h2 {font-size:17px;min-width:0;}
#surveyTypeMenu .menu-head button {flex:none;color:#294058;background:#fff;border:1px solid #b7c5d2;}
#surveyTypeMenu .menu-item {order:4;}
#surveyTypeMenu [data-survey-kind="land"] {order:1;}
#surveyTypeMenu [data-survey-kind="building"] {order:2;}
#surveyTypeMenu [data-survey-kind="sign"] {order:3;}
#editorPanel svg {fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#surveyTypeMenu .menu-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
#surveyTypeMenu .menu-item {background:#fff;color:#294058;border:1px solid #cbd5df;border-radius:6px;min-height:84px;padding:12px 8px;min-width:0;white-space:normal;}
#surveyTypeMenu .menu-item>span:last-child {font-size:13px;line-height:1.5;overflow-wrap:anywhere;}
#surveyTypeMenu [data-survey-kind="building"] {color:#1769b0;background:#edf5ff;border-color:#b8d5ee;}
#surveyTypeMenu [data-survey-kind="land"] {color:#087b56;background:#edf9f2;border-color:#b3d9c3;}
#surveyTypeMenu [data-survey-kind="sign"] {color:#af3457;background:#fff0f4;border-color:#e9b8c7;}
#surveyTypeMenu .menu-icon svg {width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.workflow-tabs button { min-width:0; padding:10px 2px; background:#eef2f5; color:#344351; border:0; border-bottom:3px solid transparent; border-radius:4px; font:inherit; font-size:13px; overflow-wrap:anywhere; cursor:pointer; }
.workflow-tabs [aria-selected="true"] { border-bottom-color:#067a72; background:#ddf4ef; color:#07564f; font-weight:700; }
.workflow-tabs button {min-height:54px;padding:10px 0;}
.workflow-tabs button span {display:block;white-space:nowrap;font-size:12px;line-height:1.5;}
#workflowSavedState { display:block; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
#draftRecoveryStatus {position:relative;flex:none;}
#draftRecoveryStatus b {position:absolute;right:-3px;top:-4px;min-width:16px;padding:0 2px;border-radius:8px;background:#116e7a;color:#fff;font:700 10px/16px Arial,sans-serif;}
#draftRecoveryStatus b[hidden] {display:none;}
#draftRecoveryStatus.draft-save-error {color:#a92335;border-color:#a92335;}
#draftRecoveryStatus.draft-save-error b {background:#a92335;}
.survey-pin-choice {display:block;width:100%;margin:8px 0;text-align:left;white-space:normal;overflow-wrap:anywhere;min-height:44px;}
.guided-survey [role="tabpanel"] { min-width:0; }
#surveyForm.guided-survey { padding:0 14px 14px; }
#surveyForm.guided-survey [role="tabpanel"] > * { margin-left:0; margin-right:0; max-width:100%; }
#surveyForm.guided-survey .field-grid { margin-left:0; margin-right:0; }
#surveyForm.guided-survey .form-actions { margin-left:0; margin-right:0; }
#surveyForm.guided-survey input,#surveyForm.guided-survey select,#surveyForm.guided-survey textarea,#surveyForm.guided-survey label { margin-left:0; margin-right:0; max-width:100%; }
.guided-survey [role="tabpanel"] > label { display:block; margin-top:10px; }
.guided-survey [role="tabpanel"] > input,.guided-survey [role="tabpanel"] > textarea { width:100%; box-sizing:border-box; }
.workflow-navigation { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-top:1px solid #dce3e8; margin-top:12px; }
.workflow-navigation .icon-btn { width:40px; height:40px; flex-shrink:0; }
#workflowReview { border-top:1px solid #dce3e8; margin-top:16px; padding-top:8px; }
#workflowReview h3 { font-size:15px; }
.workflow-missing-link { display:block; width:100%; text-align:left; border:0; border-bottom:1px solid var(--line-soft); padding:10px 4px; background:transparent; color:#7ed5ed; cursor:pointer; font:inherit; overflow-wrap:anywhere; }
.workflow-missing-link:focus-visible,.workflow-tabs button:focus-visible { outline:2px solid #075f80; outline-offset:2px; }
.guided-survey .form-actions { display:flex; flex-wrap:wrap; gap:8px; }
.guided-survey #landWorkflowActions { display:contents; }
.guided-survey #landWorkflowActions[hidden] { display:none; }
.guided-survey #saveBtn,.guided-survey #landSubmitBtn { flex:1 1 120px; min-height:44px; }
.guided-survey #newBtn,.guided-survey #archiveBtn { flex:1 1 120px; }
.guided-survey:not(.is-land) [data-land-owner],.guided-survey:not(.is-land) label[for="landOccupier"] { display:none; }
.guided-survey .ltax-check { margin-top:14px; }
@media(max-width:760px) {
  .guided-survey .field-grid,.guided-survey .ltax-grid { grid-template-columns:minmax(0,1fr); }
  .guided-survey input,.guided-survey select,.guided-survey textarea { font-size:16px; min-width:0; }
  .guided-survey .ltax-wide { grid-column:auto; }
  .workflow-tabs { gap:2px; }
}
#editorPanel #photoPanel { margin: 12px 0; padding: 12px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
#editorPanel .photo-drop-zone { margin: 0; padding: 12px; border: 0; background: transparent; }
#editorPanel .photo-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#editorPanel .photo-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 8px; border: 1px solid var(--survey-accent, #1769b0); border-radius: 8px; background: #fff; color: var(--survey-accent, #1769b0); font-size: 14px; font-weight: 700; }
#editorPanel .photo-action-primary { background: var(--survey-accent, #1769b0); color: #fff; }
#editorPanel .photo-action svg { width: 24px; height: 24px; margin: 0; flex: 0 0 24px; opacity: 1; color: inherit; }
#editorPanel #photoGallery:empty,#editorPanel #photoList:empty { display: none; }
#editorPanel .photo-action:disabled { opacity: .55; cursor: wait; }
#editorPanel .photo-drop-zone small { display: block; margin-top: 10px; color: #526070; font-size: 12px; }
#editorPanel #photoProgress { font-size: 12px; color: #36566e; min-height: 18px; margin-top: 4px; }
#editorPanel .photo-drop-zone.dragover { background: #e7f4ee; outline: 2px dashed #087b56; }
#editorPanel .photo-thumb { background: #fff; border-color: #d7dfe7; }
#editorPanel .photo-preview-button { display: block; width: 100%; min-height: 44px; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
#photoPreviewDialog { width: min(92vw, 900px); max-height: 90dvh; padding: 48px 8px 8px; border: 0; border-radius: 8px; background: #fff; }
#photoPreviewDialog::backdrop { background: #000b; }
#photoPreviewDialog img { display: block; width: 100%; max-height: 75dvh; object-fit: contain; }
#closePhotoPreview { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: #edf1f5; color: #203047; }

/* Readable translucent survey windows, with the existing per-type accents. */
#editorPanel #fieldBookNumber { font-size:17px; line-height:1.4; }
#editorPanel .field-book-panel { padding:8px 0; margin-bottom:10px; gap:8px; }
#editorPanel { background:rgba(248,250,252,.9); font-size:13px; }
#editorPanel #surveyForm { background:transparent; }
#editorPanel>.panel-head { padding:9px 12px; gap:8px; background:color-mix(in srgb,var(--survey-accent) 90%,transparent); }
#editorPanel #formTitle { font-size:15px; }
.survey-window-icon { width:22px; height:22px; }
#editorPanel #closeEditorBtn { width:32px; height:32px; min-width:32px; min-height:32px; }
#surveyForm.guided-survey { padding:0 10px 10px; }
#editorPanel .workflow-tabs { margin:8px 0 10px; }
#editorPanel .workflow-tabs button { min-height:42px; padding:6px 2px; font-size:12px; }
#editorPanel .workflow-tabs button span { font-size:11px; }
#editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select { min-height:36px; padding:7px 8px; font-size:13px; }
#editorPanel textarea { font-size:13px; padding:8px; }
#editorPanel .ltax-grid,#editorPanel .field-grid { gap:8px; }
#editorPanel .workflow-navigation { padding:8px 0; margin-top:8px; }
#editorPanel .photo-action { min-height:40px; font-size:13px; padding:7px; }
#editorPanel .photo-action svg { width:20px; height:20px; }
#surveyTypeMenu { background:rgba(248,250,252,.9); backdrop-filter:blur(12px); }
#surveyTypeMenu .menu-head h2 { font-size:14px; }
#surveyTypeMenu .menu-item { min-height:64px; padding:8px; }
#surveyTypeMenu .menu-icon svg { width:22px; height:22px; }
@media(max-width:760px) {
  #editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select,#editorPanel textarea { font-size:16px; min-height:40px; }
  #editorPanel #closeEditorBtn { width:36px; height:36px; }
  #editorPanel .photo-action { min-height:44px; }
}
@media(prefers-reduced-transparency:reduce) {
  #editorPanel,#surveyTypeMenu { background:#f8fafc; }
}
#workflowSuggestions { margin:12px 0; padding:8px 0; border-top:1px solid #d9c28b; }
#workflowSuggestions h4 { margin:0 0 6px; font-size:13px; color:#805300; }
#workflowSuggestions .workflow-suggestion { color:#805300; background:#fff7e4; border-color:#dcc28c; min-height:44px; }
.asset-review-summary [data-review-state="recommended"] .land-review-state { color:#805300; background:#fff0c7; }

/* Compact fieldwork palette; status errors remain distinct from type colors. */
#editorPanel {--survey-accent:#1768ad;--survey-tint:#edf5fc;--survey-border:#b7d2e8;background:rgba(249,252,253,.97);box-shadow:0 8px 24px #132e4226;}
#editorPanel[data-survey-kind="land"] {--survey-accent:#087550;--survey-tint:#edf8f2;--survey-border:#afd6c2;}
#editorPanel[data-survey-kind="sign"] {--survey-accent:#ac325c;--survey-tint:#fff1f6;--survey-border:#e9b8c9;}
#editorPanel>.panel-head {background:var(--survey-accent);padding:8px 10px;min-height:52px;box-sizing:border-box;}
#editorPanel .survey-window-heading {gap:8px;flex:1;}
#editorPanel .survey-window-icon {width:24px;height:24px;}
#editorPanel #formTitle {font-size:14px;line-height:1.4;}
#editorPanel #surveyWindowMode {font-size:11px;}
#editorPanel .survey-header-actions {gap:5px;}
#editorPanel .survey-header-actions button,#editorPanel .survey-header-actions #archiveBtn,#editorPanel .survey-header-actions #closeEditorBtn {width:40px;height:40px;min-width:40px;min-height:40px;flex:0 0 40px;padding:9px;border-radius:6px;}
#editorPanel .survey-header-actions #moveSurveyPositionBtn {background:#fff;color:var(--survey-accent);border:1px solid #ffffffb3;}
#editorPanel .survey-header-actions svg {width:20px;height:20px;}
#editorPanel .workflow-tabs {gap:5px;margin:10px 0 12px;}
#editorPanel .workflow-tabs button {display:grid;grid-template-columns:16px 16px;justify-content:center;align-content:center;column-gap:4px;row-gap:3px;min-height:54px;padding:5px 2px;background:#fff;border:1px solid #cbd8df;border-bottom:3px solid #cbd8df;box-shadow:0 1px 2px #1733450a;}
#editorPanel .workflow-tabs button>svg {width:16px;height:16px;}
#editorPanel .workflow-tabs button>span:first-of-type {font-size:11px;line-height:16px;font-weight:700;}
#editorPanel .workflow-tabs button>span:last-of-type {grid-column:1/-1;font-size:11px;line-height:16px;}
#editorPanel .workflow-tabs button[aria-selected="true"] {background:var(--survey-tint);color:var(--survey-accent);border-color:var(--survey-border);border-bottom-color:var(--survey-accent);box-shadow:none;}
#editorPanel label {font-weight:600;line-height:1.5;}
#editorPanel input:not([type="checkbox"]):not([type="radio"]),#editorPanel select,#editorPanel textarea {border-color:#c0ced7;background:#fff;}
#editorPanel input:focus,#editorPanel select:focus,#editorPanel textarea:focus {outline:2px solid var(--survey-accent);outline-offset:2px;border-color:var(--survey-accent);}
#editorPanel button:focus-visible {outline:2px solid #163e57;outline-offset:3px;}
#editorPanel .field-book-panel {border-bottom:1px solid var(--survey-border);background:transparent;}
#editorPanel #fieldBookNumber {color:var(--survey-accent);font-variant-numeric:tabular-nums;font-weight:700;}
#editorPanel .linked-parcel-context,#editorPanel .geometry-info {border-left:3px solid var(--survey-accent);border-radius:4px;background:var(--survey-tint);}
#editorPanel .photo-action {border-radius:6px;min-height:44px;}
#editorPanel .workflow-navigation {border-top:1px solid var(--survey-border);gap:8px;}
#editorPanel .form-actions {gap:8px;padding-top:8px;}
#editorPanel .form-actions .primary {min-height:44px;font-weight:600;}
#surveyTypeMenu .menu-grid {gap:8px;}
#surveyTypeMenu .menu-item {min-height:72px;box-shadow:none;}
@media(max-width:360px) {#editorPanel #formTitle {font-size:13px;}#editorPanel .survey-window-icon {width:20px;height:20px;}#editorPanel .survey-header-actions {gap:3px;}#editorPanel>.panel-head {padding:8px;}}
@media(prefers-reduced-transparency:reduce) {#editorPanel {background:#f9fcfd;}}
#editorPanel #surveyForm input.workflow-required-missing,
#editorPanel #surveyForm select.workflow-required-missing,
#editorPanel #surveyForm textarea.workflow-required-missing {border:2px solid #c33449;background:#fff7f8;}
#editorPanel #surveyForm .workflow-required-missing:focus {outline-color:#c33449;}
