/* FunnyFunnel 2025 - Modern UI v3.0 - Multi-Select Edition */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    --accent: #06b6d4;
    --accent-light: #22d3ee;

    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;

    /* Neutrals */
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: rgba(30, 30, 50, 0.8);
    --bg-card-hover: rgba(40, 40, 65, 0.9);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.2);

    /* Effects */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.header {
    text-align: center;
    padding: 48px 0 32px;
    position: relative;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 40px var(--primary-glow)); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 8px;
    font-weight: 400;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    gap: 12px;
}

/* Form Elements */
.filter-select,
.filter-input {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-base);
    outline: none;
}

.filter-select:hover,
.filter-input:hover {
    border-color: var(--border-light);
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-input {
    min-width: 220px;
}

.filter-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    position: relative;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

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

.btn-outline:hover:not(:disabled) {
    background: var(--glass);
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-item.clickable {
    cursor: pointer;
}

.stat-item.clickable:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.stat-item.clickable:active {
    transform: translateY(-2px);
}

.stat-item.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Lead List */
.lead-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Bulk Actions Toolbar */
.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    animation: fadeIn 0.2s ease-out;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.bulk-actions-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.bulk-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.bulk-actions-buttons {
    display: flex;
    gap: 10px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto 0;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Lead Card */
.lead-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    animation: cardSlideIn 0.4s ease-out backwards;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.lead-card:nth-child(1) { animation-delay: 0.05s; }
.lead-card:nth-child(2) { animation-delay: 0.1s; }
.lead-card:nth-child(3) { animation-delay: 0.15s; }
.lead-card:nth-child(4) { animation-delay: 0.2s; }
.lead-card:nth-child(5) { animation-delay: 0.25s; }

.lead-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateX(4px);
}

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

/* Lead Header */
.lead-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    transition: background var(--transition-fast);
}

.lead-header:hover {
    background: var(--glass);
}

/* Selection Checkbox */
.select-checkbox {
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    background: var(--bg-tertiary);
}

.select-checkbox:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.select-checkbox:checked {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
}

.select-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lead-header-content {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    align-items: center;
    gap: 20px;
    flex: 1;
    cursor: pointer;
}

/* Lead Card Selected State */
.lead-card.selected {
    border-color: var(--success);
    box-shadow: 0 0 0 1px var(--success), var(--shadow-md);
}

/* Custom Checkbox (for activation) */
.lead-checkbox {
    appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    background: var(--bg-tertiary);
}

.lead-checkbox:hover:not(:disabled) {
    border-color: var(--primary);
}

.lead-checkbox:checked {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
}

.lead-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkPop 0.2s ease-out;
}

@keyframes checkPop {
    0% { transform: rotate(45deg) scale(0); }
    50% { transform: rotate(45deg) scale(1.2); }
    100% { transform: rotate(45deg) scale(1); }
}

.lead-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lead-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.lead-header:hover .lead-title {
    color: var(--primary-light);
}

.lead-company {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.lead-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.keyword-tag {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--primary-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all var(--transition-fast);
}

.keyword-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.3));
    transform: scale(1.05);
}

/* Status Badges */
.lead-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.lead-status::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
}

.status-in-arbeit {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding-left: 22px;
    animation: pulse-status 1.5s ease-in-out infinite;
}
.status-in-arbeit::before { background: #fbbf24; }

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-neu {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding-left: 22px;
}
.status-neu::before { background: var(--warning); }

.status-aktiviert {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding-left: 22px;
}
.status-aktiviert::before { background: var(--primary); }

.status-recherchiert {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding-left: 22px;
}
.status-recherchiert::before { background: var(--accent); }

.status-anschreiben_erstellt {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding-left: 22px;
}
.status-anschreiben_erstellt::before { background: #8b5cf6; }

.status-angeschrieben {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
    padding-left: 22px;
}
.status-angeschrieben::before { background: #ec4899; }

.status-antwort_erhalten {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding-left: 22px;
}
.status-antwort_erhalten::before { background: var(--success); animation: none; }

/* Expand Arrow */
.lead-expand {
    font-size: 1rem;
    color: var(--text-muted);
    transition: all var(--transition-base);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.lead-header:hover .lead-expand {
    color: var(--primary-light);
    background: var(--glass);
}

.lead-card.expanded .lead-expand {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Lead Details */
.lead-details {
    display: none;
    padding: 0 24px 24px;
    animation: detailsSlide 0.3s ease-out;
}

@keyframes detailsSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.lead-card.expanded .lead-details {
    display: block;
}

.detail-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.detail-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.detail-section h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h4 span {
    font-size: 1.2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.detail-item {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.detail-item:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-word;
}

.detail-value a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.detail-value a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.fulltext-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.9;
    white-space: pre-wrap;
    max-height: 600px;
    overflow-y: auto;
    color: var(--text-primary);
    word-wrap: break-word;
}

.letter-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-primary);
}

/* Lead Actions */
.lead-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
}

.status-select {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.status-select:hover {
    border-color: var(--border-light);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalBgFade 0.3s ease-out;
}

@keyframes modalBgFade {
    from { opacity: 0; }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-tertiary);
}

/* Form Elements in Modal */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.7;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--primary);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.success::before {
    background: var(--success);
}

.toast.error::before {
    background: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .lead-header {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .lead-company,
    .lead-keywords {
        grid-column: 2;
    }

    .lead-status {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters,
    .actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .filter-input {
        min-width: 100%;
    }

    .lead-header {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .lead-checkbox {
        grid-row: 1;
        grid-column: 1;
    }

    .lead-title {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .lead-company {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .lead-keywords {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .lead-status {
        grid-row: 1;
        grid-column: 2;
    }

    .lead-expand {
        display: none;
    }

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

    .stat-value {
        font-size: 2rem;
    }
}

/* Utility Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

/* ==================== Import Modal Styles ==================== */

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

.modal-large .modal-body {
    max-height: 70vh;
}

/* Import Search Form */
.import-search-form {
    background: var(--bg-tertiary);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Search Results */
.search-results {
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.results-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.results-actions {
    display: flex;
    gap: 8px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Result Item */
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.result-item:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.result-item.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.result-checkbox {
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    background: var(--bg-secondary);
    margin-top: 2px;
}

.result-checkbox:checked {
    background: linear-gradient(135deg, var(--success), #059669);
    border-color: var(--success);
}

.result-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.result-company,
.result-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.result-keywords .keyword-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
}

/* Search Loading */
.search-loading {
    padding: 40px;
    text-align: center;
}

/* Empty Results */
.empty-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-results h4 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Responsive Import Modal */
@media (max-width: 768px) {
    .modal-large {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .result-item {
        flex-direction: column;
    }

    .result-checkbox {
        margin-top: 0;
    }

    .result-meta {
        gap: 8px;
    }
}
