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

:root {
    --bg-primary: #fef7ed;
    --bg-secondary: #ffffff;
    --bg-whiteboard: #fffef9;
    --border-color: #d97706;
    --border-light: #fbbf24;
    --text-primary: #78350f;
    --text-secondary: #92400e;
    --text-dark: #451a03;
    --accent-orange: #ea580c;
    --accent-yellow: #f59e0b;
    --accent-green: #059669;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.1), 0 2px 4px -2px rgba(120, 53, 15, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(120, 53, 15, 0.1), 0 8px 10px -6px rgba(120, 53, 15, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background: 
        linear-gradient(90deg, transparent 79px, #abced4 79px, #abced4 81px, transparent 81px),
        linear-gradient(#eee .1em, transparent .1em);
    background-size: 100% 1.2em;
    background-color: var(--bg-whiteboard);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    border-bottom: 4px solid #991b1b;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.logo {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: 0.12em;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    font-family: 'Patrick Hand', cursive;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #fed7aa;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-btn {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.8125rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header-stats {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.625rem 2rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.main-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 120px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-section,
.quick-pitch-section,
.action-guide-section {
    background: var(--bg-secondary);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    position: relative;
}

.filter-section::before,
.quick-pitch-section::before,
.action-guide-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 10px;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    border-radius: 2px;
}

.section-title {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed var(--border-light);
    font-weight: 700;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #fed7aa;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: #fffbeb;
    transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--accent-orange);
    background: white;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.reset-btn {
    width: 100%;
    padding: 0.625rem;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pitch-card-mini {
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 3px solid var(--accent-yellow);
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.625rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: all 0.2s;
}

.pitch-card-mini:hover {
    transform: translateX(4px);
    border-left-width: 4px;
}

.pitch-card-mini strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
}

.highlight-card {
    background: linear-gradient(90deg, #dcfce7 0%, #bbf7d0 100%);
    border-left-color: var(--accent-green);
}

.filter-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    padding: 0.75rem;
    background: #fffbeb;
    border-radius: 6px;
    border: 1px solid #fed7aa;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-orange);
}

.tip-item {
    background: #f0f9ff;
    border-left: 3px solid var(--accent-blue);
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tip-item strong {
    color: var(--text-dark);
    display: block;
}

.content {
    background: transparent;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #fff7ed 0%, #fed7aa 100%);
    padding: 1rem 1.25rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.results-count {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.results-count span {
    color: var(--accent-orange);
    font-size: 1.375rem;
    font-weight: 800;
}

.results-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sort-select {
    padding: 0.375rem 0.75rem;
    border: 2px solid #fdba74;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    font-weight: 500;
}

.view-toggle {
    display: flex;
    gap: 0.375rem;
    background: white;
    padding: 0.25rem;
    border-radius: 8px;
    border: 2px solid #fdba74;
}

.view-btn {
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.view-btn.active {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #dc2626 100%);
    color: white;
    font-weight: 700;
}

.view-btn:not(.active):hover {
    background: #fed7aa;
    color: var(--text-dark);
}

.cards-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1rem;
}

.lead-card {
    background: var(--bg-secondary);
    border: 2px solid #fdba74;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.lead-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-orange) 0%, var(--accent-yellow) 50%, var(--accent-green) 100%);
}

.lead-card:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 20px 40px -10px rgba(234, 88, 12, 0.3);
    transform: translateY(-4px) scale(1.01);
}

.lead-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.lead-company {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    flex: 1;
    font-family: 'Inter', sans-serif;
}

.lead-type-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-hot {
    background: #fecaca;
    color: #991b1b;
}

.badge-warm {
    background: #fed7aa;
    color: #9a3412;
}

.badge-cold {
    background: #e0f2fe;
    color: #075985;
}

.lead-info {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.lead-info strong {
    color: var(--text-dark);
    font-weight: 500;
}

.lead-sector {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.lead-actions {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px dashed #fdba74;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 70px;
    padding: 0.5rem 0.375rem;
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-pitch {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #dc2626 100%);
    color: white;
    flex: 2;
}

.btn-pitch:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.btn-copy {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
}

.btn-analyze {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #6b21a8;
}

.btn-analyze:hover {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
}

.table-view {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.leads-table thead {
    background: linear-gradient(90deg, #fed7aa 0%, #fdba74 100%);
    border-bottom: 2px solid var(--border-color);
}

.leads-table th {
    padding: 0.75rem 0.625rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.leads-table tbody tr {
    border-bottom: 1px solid #fed7aa;
    transition: background 0.2s;
}

.leads-table tbody tr:hover {
    background: #fffbeb;
}

.leads-table tbody tr:last-child {
    border-bottom: none;
}

.leads-table td {
    padding: 0.625rem;
    color: var(--text-primary);
    vertical-align: top;
}

.company-cell {
    font-weight: 600;
    color: var(--text-dark);
    max-width: 200px;
}

.sector-cell {
    color: var(--accent-green);
    font-weight: 500;
}

.contact-cell {
    font-size: 0.75rem;
    line-height: 1.4;
}

.table-action-btn {
    padding: 0.375rem 0.75rem;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.table-action-btn:hover {
    background: #dc2626;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(69, 26, 3, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 4px solid var(--border-color);
    border-radius: 14px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(69, 26, 3, 0.8);
    animation: slideUp 0.3s;
    margin-bottom: 2rem;
}

.modal-content.large {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(90deg, #fed7aa 0%, #fdba74 50%, #fbbf24 100%);
    border-bottom: 3px solid var(--border-color);
}

.modal-title {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.modal-body {
    padding: 1.5rem;
}

.pitch-section {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, #fffbeb 0%, #fef7ed 100%);
    border-left: 4px solid var(--accent-yellow);
    border-radius: 8px;
    border: 1px solid #fed7aa;
}

.pitch-section h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.375rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.pitch-section p {
    color: var(--text-secondary);
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.7;
}

.pitch-section ul {
    margin-left: 1.25rem;
    color: var(--text-secondary);
}

.pitch-section li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.pitch-section strong {
    color: var(--text-dark);
}

.pitch-highlight {
    background: linear-gradient(90deg, #dcfce7 0%, #bbf7d0 100%);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
    margin: 0.75rem 0;
    border: 1px solid #86efac;
}

.pitch-highlight strong {
    color: #166534;
}

.kanban-view {
    width: 100%;
}

.kanban-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 2px solid #fdba74;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.kanban-header {
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-header.hot {
    background: linear-gradient(90deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
}

.kanban-header.warm {
    background: linear-gradient(90deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
}

.kanban-header.cold {
    background: linear-gradient(90deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985;
}

.kanban-count {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.kanban-body {
    padding: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kanban-card {
    background: #fffbeb;
    border: 1px solid #fdba74;
    border-radius: 6px;
    padding: 0.625rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.kanban-card:hover {
    background: white;
    border-color: var(--accent-orange);
    box-shadow: var(--shadow);
}

.kanban-card-company {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-size: 0.8125rem;
}

.kanban-card-sector {
    color: var(--accent-green);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 0.875rem;
    border-radius: 8px;
    border: 2px solid #fdba74;
    text-align: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-orange);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 1200px) {
    .kanban-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .content {
        order: 1;
    }
    
    .cards-view {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-info {
        width: 100%;
        flex-direction: column;
    }
    
    .info-link {
        width: 100%;
        text-align: center;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .view-toggle {
        width: 100%;
    }
    
    .view-btn {
        flex: 1;
    }
    
    .modal.active {
        padding-top: 1rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}
