* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}
.report-table th, .report-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.report-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}
.status-running { background: #e8f5e9; color: #2e7d32; }
.status-sqs { background: #fff3e0; color: #ef6c00; }
.download-box {
    background: white;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px;
}
.button {
    display: inline-block;
    background: #333;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}
.button:hover { background: #444; }
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9em;
}

.top-navbar {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Responsive Campaign Config Grid */
.campaign-config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 20px 0;
    width: 100%;
}

/* Section styling */
.config-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.config-sidebar {
    display: flex;
    flex-direction: column;
}

/* Desktop layout */
@media (min-width: 992px) {
    .campaign-config-grid {
        grid-template-columns: 350px 1fr;
    }
}

.config-section h3 {
    margin-top: 0;
    font-size: 1.1em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.config-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.config-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Location Item Styling */
.location-item {
    position: relative;
    min-height: 120px;
    padding: 15px !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    overflow: hidden;
    transition: transform 0.2s;
}

.location-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.location-content {
    position: relative;
    z-index: 2;
    pointer-events: none; /* Let clicks pass to background for map trigger */
}

.location-content * {
    pointer-events: auto; /* Re-enable for buttons */
}

.location-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2; /* Default very low until active */
    transition: opacity 0.3s;
}

.location-item.active .location-map-bg {
    opacity: 0.8;
}

.tile-id-badge {
    font-size: 1.2em; /* 50% larger than baseline 0.8em approx */
    font-weight: bold;
    padding: 4px 8px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
}

.delete-confirm-area {
    height: 30px; /* Reserved space */
    margin-top: 10px;
}

.btn-remove {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-remove:hover {
    background: #cc0000;
}

.btn-confirm {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    margin-right: 5px;
    cursor: pointer;
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
    font-size: 0.9em;
}

.stat-box {
    background: rgba(255,255,255,0.7);
    padding: 5px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.input-group {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.input-group input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.input-group button {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pending-changes {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pending-changes h3 {
    margin-top: 0;
    color: #856404;
}

#pending-commands-box {
    background: #333;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    margin: 10px 0;
}

.config-list li:last-child {
    border-bottom: none;
}

.config-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: auto;
    padding-top: 15px;
    font-style: italic;
}

/* Existing Dashboard Styles */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.report-table th, .report-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    background: #eee;
}
.status-running { background: #d4edda; color: #155724; }
.status-sqs { background: #fff3cd; color: #856404; }

.badge-count {
    background: var(--status-sqs);
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.7em;
    vertical-align: middle;
}

#submission-status {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.status-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.status-error { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }

.draft {
    border-left: 4px solid var(--status-sqs) !important;
    background-color: #fffde7 !important;
}

.draft-remove {
    opacity: 0.6;
    background-color: #ffebee !important;
    border-left: 4px solid #f44336 !important;
}

.confirm-box {
    background: #fff3e0;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #ffe0b2;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.btn-confirm { background: #f44336; color: white; border: none; padding: 2px 8px; border-radius: 3px; cursor: pointer; }
.btn-cancel { background: #bdbdbd; color: white; border: none; padding: 2px 8px; border-radius: 3px; cursor: pointer; }

.download-box {
    background: #e9ecef;
    padding: 20px;
    border-radius: 8px;
}
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* Prospect Card Grid Layout */
.prospect-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .prospect-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.company-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.card-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.card-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.2em;
    text-align: left;
}

.domain-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
}

.domain-link:hover {
    text-decoration: underline;
}

.card-body {
    font-size: 0.95em;
    color: #333;
}

.info-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.info-row strong {
    font-weight: 500;
    color: #666;
    min-width: 80px;
    display: inline-block;
}

.info-data {
    font-weight: 600;
    color: #111;
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-list div {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Roboto Mono', monospace;
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: #1a1a1a;
}

.phone-number {
    font-family: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #1a1a1a;
}

#clear-search:hover {
    color: #333 !important;
}

.panel-section {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.toggle-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    padding: 5px 10px;
    margin-bottom: 5px;
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 4px;
    transition: background 0.2s;
}

.toggle-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.panel-content {
    background: #fafafa;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85em;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.keyword-tag {
    background: #e1f5fe;
    color: #01579b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    border: 1px solid #b3e5fc;
    text-transform: capitalize;
}
