/* Scene Setters CRM Dashboard Styles */
/* Branded theme matching scenesetterslab.com */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Scene Setters Brand Colors */
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Dark Theme */
    --dark: #0a0a0a;
    --dark-light: #141414;
    --dark-lighter: #1f1f1f;
    --text: #fafafa;
    --text-muted: #999999;
    --border: #262626;
    --background: #0a0a0a;
    --card: #0f0f0f;
    --surface-elevated: #141414;

    /* Effects */
    --shadow-glow: 0 0 60px rgba(249, 115, 22, 0.15);
    --shadow-subtle: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
    background: var(--dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 96px;
    height: 96px;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--dark-light);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--text), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--dark-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

tbody tr {
    transition: all 0.2s;
}

tbody tr:hover {
    background: var(--dark-light);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    color: var(--primary-light);
}

.venue-name {
    font-weight: 600;
    color: var(--text);
}

.venue-name:hover {
    color: var(--primary);
}

/* Badges */
.venue-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--dark-lighter);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.venue-city {
    font-weight: 500;
}

.venue-area {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-new {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-contacted {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-qualified {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-converted {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--dark-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--dark-lighter);
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Forms */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 1rem;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    min-width: 150px;
    transition: all 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Contact Icons */
.contact-cell {
    display: flex;
    gap: 0.5rem;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--dark-lighter);
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.contact-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    background: var(--dark-lighter);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Detail Page */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}

.detail-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 140px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.detail-value {
    flex: 1;
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    border: 4px solid;
    background: var(--dark-light);
}

.score-circle.high {
    border-color: var(--success);
    color: var(--success);
}

.score-circle.medium {
    border-color: var(--warning);
    color: var(--warning);
}

.score-circle.low {
    border-color: var(--danger);
    color: var(--danger);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Notes Section */
.notes-textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 120px;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Maps Embed */
.map-embed {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Summary Cards */
.summary-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
}

.summary-card h4 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 700;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--background);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-content {
    margin-top: 0.25rem;
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.75rem;
    vertical-align: middle;
}

.priority-hot-prospect {
    animation: pulse 1.5s infinite;
}

.priority-hidden-gold {
    animation: sparkle 2s infinite;
}

.priority-decliner {
    opacity: 0.8;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes sparkle {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

/* Score badges with priority */
.score {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
}

.score-high {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.score-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.score-low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* =============================================================================
   LEAD DETAIL PAGE
   ============================================================================= */

.lead-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.detail-header {
    margin-bottom: 2rem;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-light);
}

.detail-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.75rem;
}

.venue-type-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.header-meta .location {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Detail Grid - 2 columns on desktop */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Detail Cards */
.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.detail-card h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* Score Card */
.score-card {
    text-align: center;
}

.big-score {
    font-size: 4rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.big-score.score-high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 3px solid #10b981;
}

.big-score.score-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 3px solid #f59e0b;
}

.big-score.score-low {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 3px solid #ef4444;
}

.score-reasoning {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.score-signals {
    margin-top: 1.5rem;
    text-align: left;
}

.score-signals h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.signal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.signal-chip {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.signal-chip.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.signal-chip.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.signal-chip.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.signal-chip.neutral {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

/* Venue Summary & Pitch */
.venue-summary-text,
.pitch-angle-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Contact List */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--dark-lighter);
    border-radius: 8px;
}

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.contact-value {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.contact-value:hover {
    color: var(--primary);
}

.contact-item .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Detail List */
.detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.detail-value {
    color: var(--text);
    font-weight: 500;
}

/* Status Buttons */
.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.status-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--dark-lighter);
    color: var(--text);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.status-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.status-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Notes Section */
.notes-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background: var(--dark-lighter);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

.notes-section textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.notes-section .btn {
    margin-top: 0.75rem;
}

.no-contact-message {
    color: var(--text-muted);
    font-style: italic;
}

/* Instagram followers display */
td span[title="Instagram followers"] {
    color: #e1306c;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }

    table {
        font-size: 0.875rem;
    }

    th,
    td {
        padding: 0.5rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}