.field-capture-body {
  display: grid;
  gap: 10px;
}

.field-capture-body textarea {
  resize: vertical;
}

.field-capture-open-link {
  display: block;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  font-weight: 700;
  padding: 9px 10px;
  text-align: center;
  text-decoration: none;
}

.field-capture-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.field-capture-tab {
  min-height: 32px;
}

.field-capture-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.field-purpose-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  padding: 8px;
  background: rgba(248, 250, 252, 0.92);
}

.field-purpose-title {
  grid-column: 1 / -1;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.field-purpose-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0;
  padding: 4px 6px;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.field-purpose-group input {
  width: auto;
  margin: 0;
}

.field-photo-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.field-file-input {
  display: none;
}

.field-gps-card,
.field-capture-status,
.field-photo-preview,
.field-existing-photo-list,
.field-sample-photo-list,
.field-capture-list {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.95);
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
  padding: 8px;
}

.field-photo-preview {
  min-height: 86px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.field-photo-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 6px;
  object-fit: contain;
}

.field-existing-photo-list,
.field-sample-photo-list {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
}

.field-existing-photo-row,
.field-sample-photo-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 5px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  text-align: left;
}

.field-existing-photo-row img,
.field-sample-photo-row img {
  width: 46px;
  height: 38px;
  border-radius: 5px;
  object-fit: cover;
  background: #e2e8f0;
}

.field-photo-row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.field-photo-row-text strong,
.field-photo-row-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-capture-list {
  max-height: 160px;
  overflow: auto;
}

.field-capture-row {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.field-capture-row:last-child {
  border-bottom: 0;
}

.field-capture-row strong {
  color: #0f172a;
}

.field-capture-muted {
  color: #64748b;
}

.field-photo-dialog {
  width: min(94vw, 760px);
  max-height: 92vh;
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.36);
}

.field-photo-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.field-photo-dialog form {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto auto;
  max-height: 92vh;
}

.field-photo-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.field-photo-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.field-photo-dialog-subtitle,
.field-photo-marker-summary {
  color: #64748b;
  font-size: 12px;
}

.field-photo-marker-stage {
  position: relative;
  min-height: 260px;
  max-height: 68vh;
  overflow: auto;
  background: #0f172a;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.field-photo-marker-stage img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
}

.field-photo-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.45);
  pointer-events: none;
}

.field-photo-marker.hidden {
  display: none;
}

.field-photo-marker-summary {
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 720px) {
  .field-photo-dialog {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .field-photo-dialog form {
    max-height: 100vh;
  }
}
