.task-editor-modal{display:flex;flex-direction:column;width:min(700px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:hidden;border-radius:18px;background:#fff}
.task-editor-modal>header{position:static;flex:none;min-height:64px;border-bottom:1px solid #e5ebf3;background:#fff;padding:16px 24px}
.task-editor-modal>header h2{font-size:20px;font-weight:700}
.task-editor-modal>form{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden;padding:0}
.task-editor-modal .form-grid{flex:1;min-height:0;min-width:0;align-content:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;overflow-x:hidden;overflow-y:auto;padding:20px 24px 28px}
.task-editor-modal .form-grid>*{min-width:0}
.task-editor-modal .form-grid>.span-2{grid-column:1/-1}
.task-editor-modal .task-form-heading{display:flex;align-items:center;gap:12px;margin:4px 0 0;color:#16233d;font-size:14px;font-weight:700}
.task-editor-modal .task-form-heading:after{height:1px;flex:1;background:#e5ebf3;content:""}
.task-editor-modal .task-form-heading:first-child{margin-top:0}
.task-editor-modal .form-grid>label{gap:7px;color:#27364f;font-size:13px;font-weight:600}
.task-editor-modal .form-grid input:not([type="hidden"]):not([type="checkbox"]),.task-editor-modal .form-grid textarea,.task-editor-modal .modern-native-select-trigger,.task-editor-modal .modern-date-trigger{min-height:43px;border-radius:10px;background:#fff;padding:9px 12px;color:#17233a;font-size:14px}
.task-editor-modal .form-grid textarea{min-height:72px;height:72px}
.task-editor-modal .task-location-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #e3eaf5;border-radius:12px;background:#f7faff;padding:12px 14px}
.task-editor-modal .task-location-toggle span{display:grid;gap:3px}
.task-editor-modal .task-location-toggle strong{font-size:13px;font-weight:700}
.task-editor-modal .task-location-toggle small{color:#667894;font-size:12px;font-weight:400;line-height:1.35}
.task-editor-modal .task-location-toggle input{position:relative;width:38px;min-width:38px;height:22px;appearance:none;border:0;border-radius:999px;background:#d5dfed;cursor:pointer}
.task-editor-modal .task-location-toggle input:after{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #17233a30;content:"";transition:transform .15s}
.task-editor-modal .task-location-toggle input:checked{background:#3d69ef}
.task-editor-modal .task-location-toggle input:checked:after{transform:translateX(16px)}
.task-editor-modal .task-location-toggle input:focus-visible{outline:2px solid #3d69ef;outline-offset:2px}
.task-editor-modal .task-map-field{gap:8px;margin:0}
.task-editor-modal .task-map-field>div:first-child{align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.task-editor-modal .task-map-field strong{font-size:13px;font-weight:700}
.task-editor-modal .task-map-field small{font-size:12px}
.task-editor-modal .task-map-field #task-location-map{width:100%;height:230px;border-radius:12px}
.task-editor-modal .task-map-field>p{display:block;justify-self:start;margin:0;border:0;background:none;padding:0;color:#667894;font-size:12px;box-shadow:none}
.task-editor-modal .form-actions{position:static;flex:none;gap:10px;margin:0;border-top:1px solid #e5ebf3;background:#fff;padding:14px 24px}
.task-editor-modal .form-actions .primary,.task-editor-modal .form-actions .secondary{min-height:42px;border-radius:9px;font-size:13px}
@media(max-width:600px){
  .modal-layer:has(.task-editor-modal){padding:6px}
  .task-editor-modal{width:100%;max-height:calc(100dvh - 12px)}
  .task-editor-modal>header{min-height:56px;padding:12px 18px}
  .task-editor-modal>header h2{font-size:18px}
  .task-editor-modal .form-grid{grid-template-columns:1fr;gap:14px;padding:16px 18px 22px}
  .task-editor-modal .form-grid>*{grid-column:1/-1}
  .task-editor-modal .form-grid>label{font-size:13px}
  .task-editor-modal .form-grid input:not([type="hidden"]):not([type="checkbox"]),.task-editor-modal .form-grid textarea,.task-editor-modal .modern-native-select-trigger,.task-editor-modal .modern-date-trigger{min-height:43px;font-size:14px}
  .task-editor-modal .task-map-field #task-location-map{height:220px}
  .task-editor-modal .form-actions{margin:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom))}
  .task-editor-modal .form-actions .primary,.task-editor-modal .form-actions .secondary{min-height:42px;font-size:13px}
}

.task-note-images{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;margin-top:-8px}
.task-note-images>small{flex:1 1 220px;color:#64748b;line-height:1.5}
.task-note-image-previews{display:flex;flex-wrap:wrap;gap:10px;width:100%}
.task-note-image-tile{position:relative;width:120px;height:100px;border:1px solid #d6dfed;border-radius:8px;overflow:hidden;background:#f1f5f9}
.task-note-image-tile img{width:100%;height:100%;object-fit:contain}
.task-note-image-tile button{position:absolute;top:3px;right:3px;width:26px;height:26px;padding:0;border:0;border-radius:50%;background:#fff;color:#172b4d;font-size:20px;line-height:1;box-shadow:0 1px 4px #0003}
