.leaflet-control-restitch .leaflet-control-restitch-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    cursor: pointer;
}
.leaflet-control-restitch .leaflet-control-restitch-button:hover {
    background-color: #f4f4f4;
}

.restitch-panel {
    position: absolute;
    right: 50px;
    top: 5px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 14px;
    min-width: 340px;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.restitch-panel h4 {
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.restitch-panel .close-btn {
    cursor: pointer;
    font-size: 18px;
    color: #999;
}
.restitch-panel .close-btn:hover { color: #333; }

.restitch-panel .form-group {
    margin-bottom: 10px;
}
.restitch-panel .form-group label {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
    display: block;
}
.restitch-panel .form-group input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
}

.restitch-panel .plot-summary {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 12px;
}
.restitch-panel .plot-summary .stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.restitch-panel .plot-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 12px;
}
.restitch-panel .plot-list-header label {
    margin: 0;
    cursor: pointer;
}
.restitch-panel .plot-count {
    color: #666;
    font-size: 11px;
}

.restitch-panel .plot-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}
.restitch-panel .plot-item {
    padding: 3px 8px;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.restitch-panel .plot-item:last-child { border-bottom: none; }
.restitch-panel .plot-item label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}
.restitch-panel .plot-item:hover { background: #f8f9fa; }
.restitch-panel .crop-done {
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}
.restitch-panel .crop-done:hover { opacity: 0.7; }
.restitch-panel .crop-summary {
    font-size: 11px;
    color: #2e7d32;
    margin-bottom: 8px;
    font-weight: 600;
}

.restitch-panel .btn-restitch {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
    background: #1976d2;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.restitch-panel .btn-restitch:hover { background: #1565c0; }
.restitch-panel .btn-restitch:disabled {
    background: #bbb;
    cursor: not-allowed;
}

.restitch-panel .jobs-section { margin-top: 10px; }
.restitch-panel .jobs-section h5 {
    margin: 0 0 6px 0;
    font-size: 13px;
}
.restitch-panel .job-item {
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 12px;
}
.restitch-panel .job-item .job-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.restitch-panel .job-item .progress-bar-wrapper {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 4px;
}
.restitch-panel .job-item .progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: #4caf50;
    transition: width 0.5s;
}
.restitch-panel .job-item.running .progress-bar-fill { background: #2196f3; }
.restitch-panel .job-item.queued .progress-bar-fill { background: #ff9800; }
.restitch-panel .job-item.failed .job-header { color: #c62828; }
.restitch-panel .job-item .job-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}
.restitch-panel .job-item .job-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}
.restitch-panel .btn-cancel {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 3px;
    padding: 1px 8px;
    font-size: 11px;
    cursor: pointer;
}
.restitch-panel .btn-cancel:hover { background: #e74c3c; color: white; }
.restitch-panel .btn-cancel:disabled { opacity: 0.5; cursor: default; }
.restitch-panel .worker-count { font-weight: normal; color: #666; font-size: 11px; }
.restitch-panel .no-jobs { font-size: 12px; color: #999; padding: 4px 0; }

.restitch-panel .results-section { margin-top: 10px; }
.restitch-panel .results-section h5 { margin: 0 0 6px 0; font-size: 13px; }
.restitch-panel .result-item {
    padding: 3px 8px;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}
.restitch-panel .result-item.completed { color: #2e7d32; }
.restitch-panel .result-item.failed { color: #c62828; }
.restitch-panel .height-info {
    font-size: 11px;
    color: #666;
    font-family: monospace;
}
