/* Dialog containers receive initial focus; controls retain their own focus indicators. */
.task-detail-modal:focus,.tech-job-modal:focus{outline:none}
.task-detail-modal{display:flex;flex-direction:column;width:min(512px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:hidden;border:1px solid #e5eaf1;border-radius:13px;background:#f8fafc;box-shadow:0 25px 70px #0913223b;color:#263246}
.task-detail-modal>header{display:flex;min-height:61px;flex:none;align-items:center;border-bottom:0;padding:17px 24px 8px}
.task-detail-modal>header h2{font-size:17px;font-weight:700;letter-spacing:-.025em;color:#202b3d}
.task-detail-modal>header .icon{display:grid;width:26px;height:26px;place-items:center;border:2px solid #91aaf2;border-radius:50%;background:transparent;color:#446ce1;font-size:18px;line-height:1}
.task-detail-modal .task-detail-body{display:block;overflow-y:auto;overscroll-behavior:contain;padding:8px 24px 28px}
.task-detail-title{display:grid;gap:3px}
.task-detail-title h3{margin:0;color:#202b3d;font-size:15px;font-weight:700;line-height:1.25}
.task-detail-title>span{color:#75839a;font-size:11px}
.task-detail-title>small{color:#8c98aa;font-size:10px}
.task-detail-badges{display:flex;flex-wrap:wrap;gap:7px;margin-top:6px}
.task-detail-badges .priority,.task-detail-badges .status{border:1px solid #caddff;padding:4px 10px;background:#f1f6ff;color:#3e72e7;font-size:10px;font-weight:600}
.task-detail-badges .status.completed{border-color:#aae9cd;background:#eafaf2;color:#198f60}
.task-detail-info{display:grid;gap:11px;margin-top:16px}
.task-detail-info>div{display:flex;align-items:flex-start;gap:8px;color:#697b96;font-size:11px;line-height:1.35}
.task-detail-info svg{width:14px;height:14px;flex:none;fill:none;stroke:#7085a3;stroke-width:1.8}
.task-detail-info>div:has(span:first-child:last-child){min-width:0}
.task-detail-info>div:nth-child(4){color:#20a068}
.task-detail-info>div:nth-child(4) svg{stroke:#20a068}
.task-detail-technician{margin:17px 0 0;color:#76849b;font-size:11px}
.task-detail-technician+ .task-detail-technician{margin-top:8px}
.task-detail-technician strong,.task-detail-technician a{color:#303b4c;font-weight:600}
.tech-customer-card p.task-nap-badge,.task-detail-modal p.task-nap-badge{display:inline-flex;align-items:center;gap:8px;width:fit-content;max-width:100%;margin:10px 0 0;padding:0;border:0;background:transparent;color:#080b12;font-size:11px;font-weight:700;line-height:1.4}
.tech-customer-card p.task-nap-badge svg,.task-nap-badge svg{width:14px;height:14px;flex:none;fill:none;stroke:#7085a3;stroke-width:1.8}
.task-nap-badge span{overflow-wrap:anywhere}
.task-detail-section{margin-top:18px}
.task-detail-section h4{margin:0 0 8px;color:#76849b;font-size:11px;font-weight:500}
.task-detail-section>p{margin:0;border-radius:11px;background:#f2f5f9;padding:12px;color:#3b495e;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.task-detail-section>p.task-detail-empty{color:#8390a2}
.task-detail-photos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.task-detail-photos button{display:block;width:100%;padding:0;overflow:hidden;border:1px solid #e0e7f0;border-radius:10px;background:#fff;cursor:pointer}
.task-detail-photos img{display:block;width:100%;aspect-ratio:1;object-fit:cover}
.task-detail-photos button:focus-visible{outline:3px solid #4a7ef3;outline-offset:2px}
.task-detail-actions{display:flex;gap:8px;margin-top:17px}
.task-detail-actions .primary{min-height:38px;flex:1;border-radius:9px;font-size:11px}
.task-detail-actions .secondary{width:42px;min-height:38px;border-radius:9px}
.task-detail-cashflow-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.task-detail-cashflow-actions button{min-height:38px;border-radius:9px;font-size:12px}
.task-cashflow-amount-hint{color:#697b96;font-size:11px;line-height:1.5}
.task-cashflow-amount-error{margin:0;color:#b42318;font-size:12px;line-height:1.5}
.task-cashflow-modal{width:min(380px,calc(100vw - 28px))}
.task-cashflow-modal .form-grid{grid-template-columns:1fr}
.task-cashflow-modal .form-grid label{width:100%}
.task-cashflow-modal input,.task-cashflow-modal .form-actions button{min-height:42px}
.task-detail-more{margin-top:18px;border-top:1px solid #e5eaf1;padding-top:13px}
.task-detail-more summary{font-size:11px}
.task-detail-more>.timeline,.task-detail-more>.muted{margin-top:12px}
.task-detail-map-section{margin-top:20px}
.task-detail-map-section #task-detail-map{height:220px;overflow:hidden;border:1px solid #dce5ed;border-radius:11px;background:#e3eef1}
.task-detail-map-section>a{display:inline-flex;align-items:center;gap:6px;margin-top:9px;color:#416eeb;font-size:11px;font-weight:600;text-decoration:none}
.task-detail-map-section>a svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.task-detail-modal .task-map-layer-control{position:relative;margin:10px 10px 0 0}
.task-detail-modal .task-map-layer-toggle{display:grid;width:40px;height:40px;place-items:center;border:1px solid #e6ebf2;border-radius:10px;background:#fff;color:#326df4;box-shadow:0 3px 12px #18274426;cursor:pointer}
.task-detail-modal .task-map-layer-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8}
.task-detail-modal .task-map-layer-menu{position:absolute;top:49px;right:0;display:grid;width:190px;padding:7px 0;border:1px solid #e1e7ef;border-radius:12px;background:#fff;box-shadow:0 10px 26px #17243a29}
.task-detail-modal .task-map-layer-menu[hidden]{display:none}
.task-detail-modal .task-map-layer-menu button{display:flex;width:100%;min-height:38px;align-items:center;gap:9px;border:0;background:transparent;padding:0 14px;color:#31415d;text-align:left;font:600 11px Inter,Arial,sans-serif;cursor:pointer}
.task-detail-modal .task-map-layer-menu button:hover{background:#f2f6fc}
.task-detail-modal .task-map-radio{display:block;width:12px;height:12px;flex:none;border:1px solid #a8b7cb;border-radius:50%;background:#fff}
.task-detail-modal .task-map-layer-menu button[aria-checked="true"] .task-map-radio{border:3px solid #3473f5}
.modal-layer:has(.photo-viewer){background:rgba(15,23,42,.46)}
.task-photo-gallery{display:flex;flex-direction:column;width:min(880px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:hidden;border:1px solid #dde5ef;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.2)}
.task-photo-gallery>header{min-height:56px;flex:none;border-bottom:1px solid #e8edf4;padding:11px 18px;background:#fff}
.task-photo-gallery>header h2{color:#172033;font-size:14px;font-weight:700}
.task-photo-gallery>header small{margin-left:8px;color:#8090a6;font-size:11px;font-weight:500}
.task-photo-gallery>header .icon{display:grid;width:32px;height:32px;place-items:center;border:1px solid #dbe3ee;border-radius:9px;background:#fff;color:#53647d;font-size:19px}
.task-photo-gallery>header .icon:hover{background:#f3f7fd;color:#2563eb}
.task-photo-gallery-stage{display:grid;min-height:0;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:10px;margin:14px;border:1px solid #e7edf5;border-radius:11px;background:#f7f9fc;padding:12px}
.photo-viewer-viewport{min-width:0;min-height:0;max-height:calc(100dvh - 150px);overflow:auto}
.photo-viewer-viewport.zoomed{cursor:grab}
.photo-viewer-viewport.dragging{cursor:grabbing;user-select:none}
.task-photo-gallery-stage img{display:block;max-width:100%;max-height:calc(100dvh - 150px);margin:auto;border-radius:7px;object-fit:contain;-webkit-user-drag:none}
.task-photo-gallery-stage button{display:grid;width:34px;height:34px;place-items:center;border:1px solid #d9e2ee;border-radius:50%;background:#fff;color:#526783;font-size:25px;line-height:1;cursor:pointer;box-shadow:0 2px 6px rgba(15,23,42,.07)}
.task-photo-gallery-stage button:hover{border-color:#aac5f7;color:#2563eb}
.task-photo-gallery-stage button:disabled{opacity:.35;cursor:default}
.task-photo-gallery-stage button:focus-visible,.task-photo-gallery>header .icon:focus-visible{outline:3px solid #93b7ff;outline-offset:2px}
.task-photo-gallery-stage.photo-viewer-single{grid-template-columns:minmax(0,1fr)}
.task-photo-gallery-stage [hidden]{display:none!important}
.photo-viewer-message{margin:24px auto;color:#718096;font-size:13px;text-align:center}
.technician-mode .modal-layer .photo-viewer{width:min(880px,calc(100vw - 28px));max-width:100%;overflow:hidden}
.tech-job-modal{display:flex;flex-direction:column;width:min(512px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:hidden;border:1px solid #e5eaf1;border-radius:13px;background:#f8fafc;box-shadow:0 25px 70px #0913223b}
.tech-job-modal>header{min-height:61px;flex:none;border-bottom:0;padding:17px 24px 8px}
.tech-job-modal>header h2{color:#202b3d;font-size:17px;font-weight:700;letter-spacing:-.025em}
.tech-job-modal>header .icon{display:grid;width:26px;height:26px;place-items:center;border:2px solid #91aaf2;border-radius:50%;color:#446ce1;font-size:18px}
.tech-job-modal .tech-job-detail{display:grid;gap:16px;overflow-y:auto;overscroll-behavior:contain;padding:8px 24px 28px}
.tech-job-modal .tech-detail-title h3{font-size:15px;font-weight:700}
.tech-job-modal .tech-detail-title>p{font-size:11px}
.tech-job-modal .tech-detail-pills .priority,.tech-job-modal .tech-detail-pills .status{padding:4px 10px;font-size:10px}
.tech-job-modal .tech-detail-photo-section h4{color:#76849b;font-size:11px;font-weight:500}
.tech-job-modal .tech-detail-photos button{border:1px solid #e0e7f0;border-radius:10px}
.tech-job-modal .tech-detail-photos img{aspect-ratio:1;border-radius:0}
.tech-job-modal .tech-detail-map{margin-top:2px;border-radius:11px}
.tech-job-modal .tech-detail-map #tech-job-map,.tech-job-modal .tech-detail-map-unavailable{height:220px}
.tech-job-modal .tech-detail-actions{margin-top:0}
@media(max-width:540px){.task-detail-modal{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.task-detail-modal>header{padding:15px 18px 7px}.task-detail-modal .task-detail-body{padding:8px 18px 22px}.task-detail-map-section #task-detail-map{height:180px}.task-photo-gallery-stage{grid-template-columns:30px minmax(0,1fr) 30px;gap:5px;margin:8px;padding:7px}.task-photo-gallery-stage button{width:30px;height:30px;font-size:22px}.task-photo-gallery-stage img{max-height:calc(100dvh - 120px)}}
@media(max-width:540px){.tech-job-modal{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.tech-job-modal>header{padding:15px 18px 7px}.tech-job-modal .tech-job-detail{padding:8px 18px 22px}.tech-job-modal .tech-detail-map #tech-job-map,.tech-job-modal .tech-detail-map-unavailable{height:180px}}
