/* Dashboard Styles */

.dashboard-body {
    background: linear-gradient(135deg, #0a1628 0%, #1a2744 100%);
    min-height: 100vh;
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: #e0e6ed;
}

/* Header */
/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 25, 45, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 163, 224, 0.1);
    color: #00A3E0;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    background: rgba(0, 163, 224, 0.2);
    transform: translateX(-2px);
}

.logo-icon {
    font-size: 1.25rem;
    color: #00A3E0;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00a6fb, #00d4aa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-center h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right .controls-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    background: transparent;
    border: 1px solid rgba(0, 163, 224, 0.3);
    color: #e0e6ed;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
}

.control-btn:hover {
    border-color: #00A3E0;
    color: #00A3E0;
    background: rgba(0, 163, 224, 0.1);
}

.btn-refresh {
    padding: 0.5rem 1rem;
    background: rgba(0, 163, 224, 0.15);
    border: 1px solid rgba(0, 163, 224, 0.3);
    border-radius: 8px;
    color: #00A3E0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh:hover {
    background: rgba(0, 163, 224, 0.25);
    transform: translateY(-1px);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 100, 100, 0.2);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.stat-card {
    background: rgba(20, 35, 60, 0.8);
    border: 1px solid rgba(0, 166, 251, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 166, 251, 0.4);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00a6fb, #00d4aa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #8892a0;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(15, 25, 45, 0.6);
    border-bottom: 1px solid rgba(0, 166, 251, 0.1);
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: #8892a0;
    font-size: 0.85rem;
}

.filter-group select {
    padding: 0.5rem 1rem;
    background: rgba(20, 35, 60, 0.8);
    border: 1px solid rgba(0, 166, 251, 0.2);
    border-radius: 8px;
    color: #e0e6ed;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #00a6fb;
}

.btn-search {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #00a6fb, #0077cc);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 166, 251, 0.4);
}

/* Prospects Table */
.prospects-container {
    padding: 1rem 2rem 2rem;
    overflow-x: auto;
}

.prospects-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 35, 60, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

.prospects-table th {
    background: rgba(0, 166, 251, 0.1);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #00a6fb;
    border-bottom: 1px solid rgba(0, 166, 251, 0.2);
}

.prospects-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

.prospects-table tr:hover {
    background: rgba(0, 166, 251, 0.05);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-new {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
}

.status-contacted {
    background: rgba(0, 166, 251, 0.2);
    color: #00a6fb;
}

.status-interested {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Business Info */
.business-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.business-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.business-website {
    font-size: 0.8rem;
    color: #00a6fb;
    text-decoration: none;
}

.business-website:hover {
    text-decoration: underline;
}

/* Phone Link */
.phone-link {
    color: #00d4aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.phone-link:hover {
    color: #00ffcc;
}

/* Rating */
.rating-cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.rating-stars {
    color: #ffc107;
    font-weight: 600;
}

.rating-count {
    font-size: 0.8rem;
    color: #8892a0;
}

/* Address */
.address-cell {
    font-size: 0.85rem;
    color: #a0a8b0;
    max-width: 200px;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(100, 120, 150, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #c0c8d0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action-small {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-contact {
    background: linear-gradient(135deg, #00a6fb, #0077cc);
    color: white;
}

.btn-contact:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 166, 251, 0.4);
}

.btn-info {
    background: rgba(100, 120, 150, 0.3);
    color: #c0c8d0;
}

.btn-info:hover {
    background: rgba(100, 120, 150, 0.5);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #0f1929, #1a2744);
    border: 1px solid rgba(0, 166, 251, 0.3);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #8892a0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ff6b6b;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #fff;
}

/* Contact Options */
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.btn-action {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-call {
    background: linear-gradient(135deg, #00d4aa, #00a67d);
    color: white;
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

.btn-script {
    background: rgba(0, 166, 251, 0.2);
    color: #00a6fb;
    border: 1px solid rgba(0, 166, 251, 0.3);
}

.btn-mark {
    background: rgba(100, 120, 150, 0.3);
    color: #c0c8d0;
}

/* Call Script */
.call-script {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.call-script.hidden {
    display: none;
}

.call-script h3 {
    color: #00a6fb;
    margin-bottom: 1rem;
}

.script-content {
    line-height: 1.8;
    color: #c0c8d0;
}

.script-content strong {
    color: #00d4aa;
}

/* Notes Section */
.notes-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 166, 251, 0.2);
}

.notes-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.notes-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 166, 251, 0.2);
    border-radius: 8px;
    color: #e0e6ed;
    font-family: inherit;
    resize: vertical;
}

.btn-save-notes {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 166, 251, 0.2);
    border: 1px solid rgba(0, 166, 251, 0.3);
    border-radius: 6px;
    color: #00a6fb;
    cursor: pointer;
}

/* Search Modal */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #8892a0;
    font-size: 0.9rem;
}

.form-group select,
.form-group input {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 166, 251, 0.2);
    border-radius: 8px;
    color: #e0e6ed;
    font-size: 1rem;
}

.btn-start-search {
    padding: 1rem;
    background: linear-gradient(135deg, #00a6fb, #0077cc);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}

.search-status {
    text-align: center;
    padding: 2rem;
}

.search-status.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 166, 251, 0.2);
    border-top-color: #00a6fb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-search {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* =============================================
   INSURANCE PROSPECTOR SECTION
   ============================================= */
.prospector-divider {
    display: flex;
    align-items: center;
    margin: 2.5rem 1.5rem 1.5rem;
    gap: 1rem;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7dd3fc, transparent);
}

.divider-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #7dd3fc;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.prospector-section {
    margin: 0 1.5rem 2rem;
}

/* Health indicator */
.prospector-health {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.2rem;
    padding: .6rem 1rem;
    border-radius: 8px;
    background: rgba(30, 41, 59, .7);
    border: 1px solid rgba(125, 211, 252, .15);
}

.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    animation: blink 1.4s infinite;
}

.health-dot.healthy {
    background: #22c55e;
}

.health-dot.warning {
    background: #f59e0b;
}

.health-dot.error {
    background: #ef4444;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

.health-text {
    font-size: .85rem;
    color: #94a3b8;
}

/* Cards */
.prospector-card {
    background: rgba(30, 41, 59, .85);
    border: 1px solid rgba(125, 211, 252, .12);
    border-radius: 16px;
    padding: 1.8rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    transition: border-color .3s;
}

.prospector-card:hover {
    border-color: rgba(125, 211, 252, .3);
}

.prospector-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.2rem;
    color: #e2e8f0;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(125, 211, 252, .1);
}

/* Forms */
.p-form-group {
    margin-bottom: 1.4rem;
}

.p-label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: .5rem;
}

.p-hint {
    display: block;
    font-size: .75rem;
    color: #64748b;
    margin-top: .3rem;
}

.p-input {
    width: 100%;
    max-width: 200px;
    padding: .6rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(125, 211, 252, .2);
    background: rgba(15, 23, 42, .6);
    color: #e2e8f0;
    font-size: .9rem;
}

.p-input:focus {
    outline: none;
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, .15);
}

/* Checkbox group */
.p-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.p-checkbox {
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    padding: .4rem .8rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, .4);
    border: 1px solid rgba(125, 211, 252, .1);
    transition: all .2s;
    font-size: .85rem;
    color: #cbd5e1;
}

.p-checkbox:hover {
    border-color: rgba(125, 211, 252, .3);
    background: rgba(15, 23, 42, .7);
}

.p-checkbox input:checked+span {
    color: #7dd3fc;
}

.p-state-tag.ny {
    color: #a78bfa;
}

.p-state-tag.nj {
    color: #f59e0b;
}

.p-state-tag.fl {
    color: #34d399;
}

/* Range slider */
.p-range {
    width: 100%;
    max-width: 300px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #7dd3fc 0%, #a78bfa 100%);
    outline: none;
}

.p-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #7dd3fc;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(125, 211, 252, .5);
}

.p-range-labels {
    display: flex;
    justify-content: space-between;
    max-width: 300px;
    font-size: .75rem;
    color: #64748b;
    margin-top: .3rem;
}

.p-range-value {
    font-weight: 700;
    color: #7dd3fc;
    font-size: .9rem;
}

/* Buttons */
.p-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.p-btn {
    padding: .8rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all .3s;
}

.p-btn-start {
    background: linear-gradient(135deg, #7dd3fc, #6366f1);
    color: #0f172a;
    box-shadow: 0 4px 20px rgba(125, 211, 252, .25);
}

.p-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(125, 211, 252, .35);
}

.p-btn-start:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.p-btn-new {
    background: rgba(125, 211, 252, .1);
    color: #7dd3fc;
    border: 1px solid rgba(125, 211, 252, .3);
}

.p-btn-new:hover {
    background: rgba(125, 211, 252, .2);
}

/* Pipeline steps */
.p-steps {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.p-step {
    flex: 1;
    min-width: 120px;
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .8rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(125, 211, 252, .08);
    transition: all .3s;
}

.p-step.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .08);
}

.p-step.complete {
    border-color: #22c55e;
    background: rgba(34, 197, 94, .08);
}

.p-step-icon {
    font-size: 1.4rem;
}

.p-step-name {
    font-size: .85rem;
    font-weight: 600;
    color: #e2e8f0;
}

.p-step-status {
    font-size: .72rem;
    color: #64748b;
}

.p-step.active .p-step-status {
    color: #f59e0b;
}

.p-step.complete .p-step-status {
    color: #22c55e;
}

/* Progress bar */
.p-progress-bar-wrap {
    height: 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, .6);
    overflow: hidden;
    margin-bottom: .6rem;
}

.p-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #7dd3fc, #a78bfa, #6366f1);
    transition: width .8s ease;
}

.p-progress-text {
    font-size: .8rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 1rem;
}

/* Logs */
.p-logs {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .08);
}

.p-logs-header {
    padding: .5rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(15, 23, 42, .6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.p-logs-content {
    max-height: 120px;
    overflow-y: auto;
    padding: .5rem 1rem;
    background: rgba(15, 23, 42, .4);
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: #94a3b8;
}

.p-log-entry {
    padding: .15rem 0;
}

/* Results metrics */
.p-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.p-metric {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(125, 211, 252, .1);
}

.p-metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e2e8f0;
}

.p-metric-label {
    font-size: .75rem;
    color: #94a3b8;
    margin-top: .3rem;
}

.p-metric-a .p-metric-value {
    color: #22c55e;
}

.p-metric-b .p-metric-value {
    color: #f59e0b;
}

.p-metric-c .p-metric-value {
    color: #94a3b8;
}

.p-meta-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.2rem;
    font-size: .85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

.p-meta strong {
    color: #cbd5e1;
}

/* Download buttons */
.p-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-bottom: 1rem;
}

.p-dl-btn {
    display: inline-block;
    padding: .6rem 1.2rem;
    border-radius: 8px;
    background: rgba(125, 211, 252, .08);
    border: 1px solid rgba(125, 211, 252, .2);
    color: #7dd3fc;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: all .2s;
}

.p-dl-btn:hover {
    background: rgba(125, 211, 252, .15);
    border-color: rgba(125, 211, 252, .4);
    transform: translateY(-1px);
}

.p-result-actions {
    text-align: center;
    margin-top: 1rem;
}

/* Error */
.p-error-card {
    border-color: rgba(239, 68, 68, .3) !important;
}

.p-error-msg {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, .08);
    color: #fca5a5;
    font-size: .9rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .p-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .p-steps {
        flex-direction: column;
    }

    .p-meta-row {
        flex-direction: column;
        gap: .5rem;
    }

    .prospector-section {
        margin: 0 .8rem 1.5rem;
    }
}