.wot-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.wot-intro {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.55;
}

.wot-status {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.wot-status.is-progress {
    border-color: #d9bd74;
    background: #fff8e6;
    color: #73520c;
}

.wot-status.is-complete {
    border-color: #9ac8ac;
    background: #edf7f0;
    color: var(--accent);
}

.wot-form {
    display: grid;
    gap: 16px;
}

.wot-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.wot-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.wot-section-heading > svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
    stroke-width: 1.8;
}

.wot-address {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.wot-address:hover { text-decoration: underline; }

.wot-address svg {
    width: 18px;
    height: 18px;
}

.wot-description {
    max-width: 760px;
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
}

.wot-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.wot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wot-chip {
    padding: 8px 11px;
    border-radius: 999px;
    background: #eef2ef;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
}

.wot-time-grid,
.wot-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.wot-time-panel {
    display: flex;
    flex-direction: column;
    min-height: 175px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdfb;
}

.wot-time-value {
    margin-bottom: 22px;
    font-size: 1.18rem;
}

.wot-button,
.wot-submit {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.wot-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.wot-button-primary {
    margin-top: auto;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

.wot-button-secondary {
    margin-top: auto;
    border: 1px solid var(--accent);
    background: #fff;
    color: var(--accent);
}

.wot-duration {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #eef2ef;
}

.wot-photo-field label { cursor: pointer; }

.wot-upload-box {
    display: grid;
    min-height: 132px;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 20px;
    border: 2px dashed #c9d1cc;
    border-radius: 14px;
    background: #fbfdfb;
    color: var(--accent);
    font-weight: 700;
    text-align: center;
}

.wot-upload-box:hover { border-color: var(--accent); }

.wot-upload-box svg {
    width: 30px;
    height: 30px;
}

.wot-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.wot-photo-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.wot-photo-preview img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
}

.wot-card textarea {
    width: 100%;
    resize: vertical;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    line-height: 1.5;
}

.wot-card textarea:focus,
.wot-button:focus-visible,
.wot-submit:focus-visible,
.wot-checkbox-row input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wot-completion-card { padding-block: 18px; }

.wot-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.wot-checkbox-row input {
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.wot-checkbox-row span {
    display: grid;
    gap: 4px;
}

.wot-checkbox-row small {
    color: var(--muted);
    line-height: 1.4;
}

.wot-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 12px 0 4px;
    background: linear-gradient(to top, var(--bg) 78%, rgba(251, 253, 251, 0));
}

.wot-submit {
    width: 100%;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

.wot-success {
    padding: 14px 16px;
    border: 1px solid #9ac8ac;
    border-radius: 12px;
    background: #edf7f0;
    color: var(--accent);
    font-weight: 800;
    text-align: center;
}

@media (max-width: 700px) {
    .wot-time-grid,
    .wot-photo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wot-hero {
        flex-direction: column;
        gap: 14px;
    }

    .wot-card {
        padding: 18px;
        border-radius: 14px;
    }

    .wot-photo-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.wot-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.wot-field {
    display: block;
}

.wot-field input,
.wot-card textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.wot-field input:focus,
.wot-card textarea:focus,
.wot-map-button:focus-visible,
.wot-clear-signature:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wot-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.wot-address-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.wot-map-button,
.wot-clear-signature {
    min-height: 47px;
    padding: 0 16px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: #fff;
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.wot-map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wot-map-button svg {
    width: 18px;
    height: 18px;
}

.wot-signature-wrap {
    position: relative;
    margin-top: 14px;
}

.wot-signature-canvas {
    display: block;
    width: 100%;
    height: 190px;
    border: 2px dashed #c9d1cc;
    border-radius: 14px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.wot-signature-hint {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    color: #9aa39d;
    font-weight: 700;
    pointer-events: none;
}

.wot-signature-wrap.has-signature .wot-signature-hint {
    display: none;
}

.wot-clear-signature {
    margin-top: 10px;
}

.wot-message {
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 800;
    text-align: center;
}

.wot-message.is-success {
    border: 1px solid #9ac8ac;
    background: #edf7f0;
    color: var(--accent);
}

.wot-message.is-error {
    border: 1px solid #d9a0a0;
    background: #fff2f2;
    color: #8d2626;
}

@media (max-width: 700px) {
    .wot-field-grid,
    .wot-address-row {
        grid-template-columns: 1fr;
    }

    .wot-map-button {
        width: 100%;
    }
}

/* Prototype inspection gate */
.inspection-notice {
    display: grid;
    gap: 5px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #e4b3b3;
    border-radius: 12px;
    background: #fff4f4;
    color: #842929;
    line-height: 1.45;
}

.inspection-timer-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfdfb;
}

.inspection-start { margin: 0; padding: 0 18px; }
.inspection-list { display: grid; gap: 12px; margin-top: 18px; }
.inspection-item { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; }
.inspection-item legend { padding: 0 6px; font-weight: 800; line-height: 1.4; }
.inspection-reference { margin: 6px 0 12px; color: var(--muted); font-size: .82rem; }
.inspection-options { display: flex; flex-wrap: wrap; gap: 10px; }
.inspection-options label { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.inspection-options input { accent-color: var(--accent); }
.inspection-failure[hidden] { display: none; }
.inspection-failure { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid #d89a9a; border-radius: 12px; background: #fff2f2; color: #8d2626; }
.inspection-failure textarea { background: #fff; }
.inspection-corrected { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.inspection-notes-field { margin-top: 16px; }
.inspection-complete { width: 100%; margin-top: 14px; }
.inspection-validation { margin: 10px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
.inspection-card.is-complete { border-color: #9ac8ac; }
.inspection-card.is-complete .inspection-notice { border-color: #9ac8ac; background: #edf7f0; color: var(--accent); }

@media (max-width: 700px) {
    .inspection-timer-row { grid-template-columns: 1fr 1fr; }
    .inspection-start { grid-column: 1 / -1; width: 100%; }
}

/* Guided work-order prototype */
.wot-stepper {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 20px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.wot-step-indicator {
    position: relative;
    min-width: 0;
    padding: 10px 8px;
    border: 0;
    border-radius: 12px;
    background: #f2f3f2;
    color: var(--muted);
    font: inherit;
    font-size: .76rem;
    font-weight: 800;
    text-align: center;
}

.wot-step-indicator::before {
    content: attr(data-step-number);
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: #dfe3e0;
    color: #555;
}

.wot-step-indicator.is-current {
    background: #fff8e6;
    color: #73520c;
    box-shadow: inset 0 0 0 1px #d9bd74;
}

.wot-step-indicator.is-current::before {
    background: #d9bd74;
    color: #fff;
}

.wot-step-indicator.is-complete {
    background: #edf7f0;
    color: var(--accent);
    cursor: pointer;
}

.wot-step-indicator.is-complete::before {
    content: "✓";
    background: var(--accent);
    color: #fff;
}

.wot-stage {
    display: none;
    gap: 16px;
}

.wot-stage.is-current {
    display: grid;
}

.wot-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.wot-stage-status {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff8e6;
    color: #73520c;
    font-size: .78rem;
    font-weight: 800;
}

.wot-stage.is-complete .wot-stage-status {
    background: #edf7f0;
    color: var(--accent);
}

.wot-stage-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.wot-stage-next {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.wot-stage-help {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.wot-review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wot-review-item {
    padding: 14px;
    border: 1px solid #9ac8ac;
    border-radius: 12px;
    background: #edf7f0;
    color: var(--accent);
    font-weight: 800;
}

@media (max-width: 760px) {
    .wot-stepper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .wot-review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .wot-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 10px;
    }
    .wot-step-indicator { font-size: .7rem; }
    .wot-stage-header { align-items: flex-start; flex-direction: column; }
    .wot-stage-actions, .wot-stage-next { width: 100%; }
}

.inspection-photo-field { margin-top: 18px; }
.inspection-photo-field .wot-label small { color: var(--muted); font-weight: 500; }
