* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

#app { display: flex; height: 100vh; }
#map { flex: 1; }
#sidebar { width: 380px; overflow-y: auto; border-left: 1px solid #ddd; background: #fafafa; }

#controls { padding: 16px; }
#controls h1 { font-size: 18px; margin-bottom: 12px; color: #1a1a1a; }
#controls.hidden { display: none; }

.control-group { margin-bottom: 12px; }
.control-group > label:first-child { display: block; font-size: 13px; color: #555; margin-bottom: 4px; font-weight: 600; }
.control-group select { width: 100%; padding: 6px 8px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; }

.tier-filters label { display: inline-block; font-size: 13px; margin-right: 8px; cursor: pointer; }
.tier-filters input[type="checkbox"] { margin-right: 2px; }

#stats { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px; font-size: 13px; margin-top: 8px; }
.stat { display: flex; justify-content: space-between; padding: 3px 0; }
.stat-value { font-weight: 600; color: #1a1a1a; }

#detail { padding: 16px; }
#detail.hidden { display: none; }
#back-btn { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 14px; margin-bottom: 12px; padding: 0; }
#back-btn:hover { text-decoration: underline; }

#position-info { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.6; }
.tier-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 12px; font-weight: 600; }
.tier-1 { background: #dc2626; }
.tier-2 { background: #ea580c; }
.tier-3 { background: #2563eb; }

#external-links { margin-bottom: 12px; }
#external-links a {
    display: inline-block; padding: 6px 12px; margin: 2px;
    background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px;
    color: #374151; text-decoration: none; font-size: 13px;
}
#external-links a:hover { background: #e5e7eb; }

#status-controls { margin-bottom: 12px; }
#status-controls label { font-size: 13px; color: #555; }
#status-controls select { padding: 4px 8px; font-size: 13px; border: 1px solid #ccc; border-radius: 4px; }
#status-controls textarea {
    width: 100%; height: 50px; padding: 6px; font-size: 13px;
    margin-top: 6px; border: 1px solid #ccc; border-radius: 4px;
    font-family: inherit; resize: vertical;
}

#detail h3 { font-size: 14px; margin-bottom: 8px; color: #374151; }

.candidate-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 6px;
    padding: 10px; margin-bottom: 6px; font-size: 13px;
}
.candidate-card .address { font-weight: 500; color: #1a1a1a; }
.candidate-card .meta { color: #6b7280; font-size: 12px; margin-top: 3px; }
.candidate-card .actions { margin-top: 6px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.candidate-card .actions button {
    padding: 3px 8px; font-size: 12px; border: 1px solid #d1d5db;
    border-radius: 3px; background: #fff; cursor: pointer;
}
.candidate-card .actions button:hover { background: #f3f4f6; }
.candidate-card .actions a { font-size: 12px; color: #2563eb; text-decoration: none; }

.status-new { border-left: 3px solid #9ca3af; }
.status-sent { border-left: 3px solid #f59e0b; }
.status-accepted { border-left: 3px solid #10b981; }
.status-declined { border-left: 3px solid #ef4444; }
.status-installed { border-left: 3px solid #8b5cf6; }

#export-actions { padding: 12px 0 0; }
#export-actions button {
    padding: 8px 16px; background: #2563eb; color: #fff;
    border: none; border-radius: 4px; cursor: pointer; font-size: 14px; width: 100%;
}
#export-actions button:hover { background: #1d4ed8; }
