/* Modern Design System - CinaTech Blue Theme */
:root {
    --bg-primary: #1a1a1f;
    --bg-secondary: #222228;
    --bg-card: rgba(74, 144, 164, 0.05);
    --bg-card-hover: rgba(74, 144, 164, 0.1);
    --border-color: rgba(124, 185, 232, 0.15);
    --text-primary: #e8f4fc;
    --text-secondary: #8eb8d4;
    --text-muted: #5a8aa8;
    --accent-primary: #7CB9E8;
    --accent-secondary: #4A90A4;
    --accent-tertiary: #3D7A8C;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --gradient-mesh: linear-gradient(135deg, #7CB9E8 0%, #4A90A4 50%, #3D7A8C 100%);
    --glass-bg: rgba(26, 26, 31, 0.9);
    --glass-border: rgba(124, 185, 232, 0.2);
    --shadow-glow: 0 0 60px rgba(124, 185, 232, 0.15);
}

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

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 Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(124, 185, 232, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(74, 144, 164, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(61, 122, 140, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

/* Noise Texture Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    position: relative;
    padding: 60px 50px;
    border-radius: 24px;
    margin-bottom: 40px;
    overflow: visible;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-mesh);
}

header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(124, 185, 232, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
    justify-content: space-between;
}

.logo {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.logo:hover {
    transform: scale(1.08);
}

.logo img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(124, 185, 232, 0.5));
    transition: all 0.4s ease;
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(124, 185, 232, 0.7));
}

.logo svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 8px rgba(124, 185, 232, 0.4));
}

.header-text {
    flex: 1;
    min-width: 0;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #c7c7d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

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

/* Stats Section */
.stats-section {
    margin-bottom: 35px;
}

.stats-section h2 {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 185, 232, 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 185, 232, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
    transform: scale(0.5);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(124, 185, 232, 0.4);
    box-shadow: 0 20px 40px rgba(124, 185, 232, 0.15), var(--shadow-glow);
}

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

.stat-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient-mesh);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Actions Section */
.actions-section {
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.actions-section .btn {
    position: relative;
    z-index: 10;
}

/* Action Button Tooltips */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-wrapper .tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a32;
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    width: 220px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(124, 185, 232, 0.25);
    z-index: 1000;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.tooltip-wrapper .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2a2a32;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Filters */
.filters-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.filters-section h3 {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

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

.filters select,
.filters input[type="number"] {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.filters select:hover,
.filters input[type="number"]:hover {
    border-color: rgba(124, 185, 232, 0.4);
}

.filters select:focus,
.filters input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 232, 0.15);
}

.filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.filters label:hover {
    color: var(--text-primary);
}

.filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* Sort Control */
.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.sort-control label {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sort-control select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 170px;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-control select:hover {
    border-color: rgba(124, 185, 232, 0.4);
}

.sort-control select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 232, 0.15);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-mesh);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 185, 232, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    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-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(124, 185, 232, 0.4);
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 185, 232, 0.1), transparent);
    transition: left 0.5s;
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(124, 185, 232, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover::after {
    left: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

.btn-danger:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(124, 185, 232, 0.4);
    color: var(--accent-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
    background: rgba(124, 185, 232, 0.15);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 185, 232, 0.2);
}

/* Leads Section */
.leads-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.leads-section h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: rgba(124, 185, 232, 0.08);
}

th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
}

th:first-child {
    border-radius: 12px 0 0 0;
}

th:last-child {
    border-radius: 0 12px 0 0;
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.95rem;
}

tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

tbody tr:hover {
    background: rgba(124, 185, 232, 0.08);
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(124, 185, 232, 0.1);
}

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

.loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px;
}

/* Score Badge */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 50px;
}

.score-badge.high {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.score-badge.medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.score-badge.low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

/* Grade Badge */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.grade-A {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.grade-B {
    background: linear-gradient(135deg, #7CB9E8 0%, #4A90A4 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(124, 185, 232, 0.3);
}
.grade-C {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}
.grade-D {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.3);
}
.grade-F {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-new {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.status-contacted {
    background: rgba(74, 144, 164, 0.15);
    color: #7CB9E8;
    border: 1px solid rgba(74, 144, 164, 0.3);
}
.status-qualified {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-converted {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-lost {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    overflow: auto;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-secondary);
    padding: 35px;
    border-radius: 20px;
    max-width: 620px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.close {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.close:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Form */
.form-group {
    margin-bottom: 22px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s;
}

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 232, 0.15);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 10px;
}

.phone-input-group .country-code-select {
    width: 160px;
    flex-shrink: 0;
}

.phone-input-group input[type="tel"] {
    flex: 1;
}

.phone-required-note {
    display: block;
    margin-top: 6px;
    color: var(--accent-warning);
    font-size: 0.85rem;
}

/* Lead Details */
.lead-details {
    padding: 20px 0;
}

.lead-header {
    margin-bottom: 30px;
}

.lead-name {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section h3 {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: var(--accent-primary);
    font-weight: 600;
}

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

.detail-item {
    padding: 14px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

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

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

.score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.score-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.score-item-value {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-mesh);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.score-item-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

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

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .logo img {
        width: 100px;
        height: 100px;
    }

    .logo svg {
        width: 48px;
        height: 48px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header {
        padding: 40px 25px;
    }

    .container {
        padding: 15px;
    }

    .sort-control {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
        margin-top: 10px;
    }
}

/* Discovery Modal Tabs */
.discovery-tabs {
    display: flex;
    gap: 5px;
    margin: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.discovery-tab {
    display: none;
    padding: 25px 0;
}

.discovery-tab.active {
    display: block;
}

.discovery-tab textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.discovery-tab textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(124, 185, 232, 0.15);
}

.discovery-tab small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Discovery Results */
.discovery-results {
    margin-top: 30px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
}

.discovery-results h3 {
    color: var(--accent-primary);
    margin-bottom: 18px;
    font-size: 1.1rem;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.result-stat {
    text-align: center;
    padding: 18px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.result-stat-value {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-mesh);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.discovered-leads-list {
    max-height: 300px;
    overflow-y: auto;
}

.discovered-lead-item {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.discovered-lead-item:hover {
    border-color: rgba(124, 185, 232, 0.3);
    background: var(--bg-card-hover);
}

.discovered-lead-info {
    flex: 1;
}

.discovered-lead-name {
    font-weight: 600;
    color: var(--text-primary);
}

.discovered-lead-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.loading-spinner {
    text-align: center;
    padding: 50px;
    color: var(--accent-primary);
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Restore Banner */
.restore-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    margin-bottom: 25px;
}

.restore-banner span {
    flex: 1;
    font-weight: 500;
    color: #fbbf24;
}

.btn-restore {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-restore:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.btn-dismiss {
    background: transparent;
    color: #fbbf24;
    padding: 10px 16px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-dismiss:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Suggestion Chips */
.suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.suggestion-chip {
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.suggestion-chip:hover {
    background: var(--bg-card-hover);
    border-color: rgba(124, 185, 232, 0.4);
}

.suggestion-chip.selected {
    background: var(--gradient-mesh);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(124, 185, 232, 0.3);
}

.suggestion-chip.selected .company-website-link {
    background: rgba(255, 255, 255, 0.2);
}

.company-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-website-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(124, 185, 232, 0.15);
    border-radius: 50%;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s;
}

/* Company Cards Grid */
.company-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s;
}

.company-card:hover {
    border-color: rgba(124, 185, 232, 0.4);
    box-shadow: 0 4px 20px rgba(124, 185, 232, 0.1);
    transform: translateY(-2px);
}

.company-card.selected {
    border-color: var(--accent-primary);
    background: rgba(124, 185, 232, 0.08);
}

.company-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.company-card-name {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    flex: 1;
}

.company-card-domain {
    font-size: 0.75rem;
    color: var(--accent-primary);
    background: rgba(124, 185, 232, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
}

.company-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.company-card-stat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 6px;
}

.company-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.company-card-link {
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(124, 185, 232, 0.1);
    transition: all 0.2s;
}

.company-card-link:hover {
    background: var(--accent-primary);
    color: white;
}

.company-card-link.linkedin {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.1);
}

.company-card-link.linkedin:hover {
    background: #0a66c2;
    color: white;
}

.company-website-link:hover {
    background: rgba(124, 185, 232, 0.3);
    transform: scale(1.1);
}

/* Data Source Badge */
.source-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 10px;
    font-weight: 500;
}

.source-badge.source-live {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.source-badge.source-fallback {
    background: var(--bg-card);
    color: var(--text-muted);
}

/* Company Results */
.company-results {
    margin: 18px 0;
    padding: 14px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.company-result-item {
    padding: 10px 14px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 3px solid var(--accent-success);
}

.company-result-item.error {
    border-left-color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.08);
}

.company-result-item.warning {
    border-left-color: var(--accent-warning);
    background: rgba(245, 158, 11, 0.08);
}

.company-result-item.success {
    border-left-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.08);
}

.filtered-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.data-source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.data-source-badge.source-apollo {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.data-source-badge.source-hunter {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.confidence-small {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(124, 185, 232, 0.15);
    color: #7CB9E8;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 6px;
}

.domain-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.leads-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.pattern-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.error-text {
    color: #f87171;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* Verified Badge */
.verified-badge {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 500;
}

/* Lead Email Display */
.discovered-lead-email {
    color: var(--accent-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9rem;
    margin: 4px 0;
}

/* Email Finder Result */
.email-finder-result {
    padding: 24px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.found-email {
    text-align: center;
    padding: 25px;
}

.email-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    margin-bottom: 12px;
}

.confidence-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
}

.confidence-badge.verified {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.confidence-badge.unverified {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.email-meta {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

.alternatives {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.alt-email {
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Info boxes in discovery */
.discovery-tab > div[style*="background: #e8f5e9"],
.discovery-tab > div[style*="background: #fff3e0"] {
    background: var(--bg-card) !important;
    border-left-color: var(--accent-primary) !important;
    color: var(--text-secondary) !important;
    border-radius: 10px;
}

#suggestionsResults > div[style*="background: #dbeafe"] {
    background: rgba(99, 102, 241, 0.1) !important;
    border-radius: 10px;
    color: var(--text-secondary) !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Selection */
::selection {
    background: rgba(124, 185, 232, 0.3);
    color: var(--text-primary);
}

/* Bulk Upload Styles */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-card);
    margin-bottom: 25px;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(124, 185, 232, 0.05);
}

.upload-zone.dragover {
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.upload-format-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.upload-format-info h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.upload-format-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.format-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.format-col {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text-secondary);
}

.format-col.required {
    background: rgba(124, 185, 232, 0.15);
    color: var(--accent-primary);
    font-weight: 500;
}

.upload-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.upload-preview h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-preview h4 span {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-table-container {
    max-height: 250px;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.preview-table-container table {
    font-size: 0.85rem;
}

.preview-table-container th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.preview-table-container td {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.upload-progress {
    padding: 25px;
    text-align: center;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-mesh);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.upload-results {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.upload-results.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.upload-results.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.upload-results h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.upload-results.success h4 {
    color: #34d399;
}

.upload-results.error h4 {
    color: #f87171;
}

.upload-results p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.upload-results .result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.upload-results .result-stat {
    text-align: center;
}

.upload-results .result-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-mesh);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-results .result-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============ Dynamic Animations ============ */

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(124, 185, 232, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 185, 232, 0.4);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Apply entrance animations */
header {
    animation: fadeInUp 0.8s ease-out;
}

.stats-section {
    animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.stat-card:nth-child(1) { animation: fadeInScale 0.5s ease-out 0.2s backwards; }
.stat-card:nth-child(2) { animation: fadeInScale 0.5s ease-out 0.3s backwards; }
.stat-card:nth-child(3) { animation: fadeInScale 0.5s ease-out 0.4s backwards; }
.stat-card:nth-child(4) { animation: fadeInScale 0.5s ease-out 0.5s backwards; }

.actions-section {
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.filters-section {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.leads-section {
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

/* Button group staggered animation */
.actions-section .tooltip-wrapper:nth-child(1) { animation: slideInLeft 0.4s ease-out 0.4s backwards; }
.actions-section .tooltip-wrapper:nth-child(2) { animation: slideInLeft 0.4s ease-out 0.5s backwards; }
.actions-section .tooltip-wrapper:nth-child(3) { animation: slideInLeft 0.4s ease-out 0.6s backwards; }
.actions-section .tooltip-wrapper:nth-child(4) { animation: slideInRight 0.4s ease-out 0.7s backwards; }
.actions-section .tooltip-wrapper:nth-child(5) { animation: slideInRight 0.4s ease-out 0.8s backwards; }
.actions-section .tooltip-wrapper:nth-child(6) { animation: slideInRight 0.4s ease-out 0.9s backwards; }

/* Table row animations */
tbody tr {
    animation: fadeInUp 0.4s ease-out backwards;
}

tbody tr:nth-child(1) { animation-delay: 0.1s; }
tbody tr:nth-child(2) { animation-delay: 0.15s; }
tbody tr:nth-child(3) { animation-delay: 0.2s; }
tbody tr:nth-child(4) { animation-delay: 0.25s; }
tbody tr:nth-child(5) { animation-delay: 0.3s; }
tbody tr:nth-child(6) { animation-delay: 0.35s; }
tbody tr:nth-child(7) { animation-delay: 0.4s; }
tbody tr:nth-child(8) { animation-delay: 0.45s; }
tbody tr:nth-child(9) { animation-delay: 0.5s; }
tbody tr:nth-child(10) { animation-delay: 0.55s; }

/* Modal animations */
.modal.active .modal-content {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus effects for inputs */
.form-group input:focus,
.form-group select:focus,
.filters select:focus,
.filters input:focus {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Floating logo animation */
.logo {
    animation: float 6s ease-in-out infinite;
}

/* Shimmer effect for loading states */
.loading {
    background: linear-gradient(90deg,
        var(--bg-card) 25%,
        rgba(124, 185, 232, 0.1) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Score badge pulse on hover */
.score-badge:hover,
.grade-badge:hover {
    animation: pulseGlow 1s ease-in-out infinite;
    transform: scale(1.1);
}

.score-badge,
.grade-badge {
    transition: transform 0.3s ease;
}

/* Status badge hover effect */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Interactive card lift effect */
.detail-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-item:hover {
    transform: translateY(-4px);
    background: rgba(124, 185, 232, 0.08);
    border-color: rgba(124, 185, 232, 0.3);
}

/* Upload zone pulse animation */
.upload-zone {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-zone:hover {
    animation: pulseGlow 2s ease-in-out infinite;
}

.upload-zone.dragover {
    animation: pulseGlow 0.5s ease-in-out infinite;
    border-color: var(--accent-primary);
    background: rgba(124, 185, 232, 0.1);
}

/* Progress bar animation */
.progress-fill {
    transition: width 0.3s ease-out;
    background: var(--gradient-mesh);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Discovery tab transitions */
.discovery-tab {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.discovery-tab.active {
    animation: fadeInUp 0.4s ease-out;
}

/* Tab button animations */
.tab-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-mesh);
    transition: width 0.3s ease, left 0.3s ease;
}

.tab-btn:hover::after,
.tab-btn.active::after {
    width: 100%;
    left: 0;
}

/* Suggestion chip animations */
.suggestion-chip {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion-chip:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(124, 185, 232, 0.2);
}

.suggestion-chip.selected {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Company card animations */
.company-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(124, 185, 232, 0.15);
}

/* Smooth scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 185, 232, 0.3) transparent;
}

/* Filter section enhanced styling */
.filters-section {
    position: relative;
    overflow: hidden;
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 185, 232, 0.05), transparent);
    animation: slideAcross 8s linear infinite;
}

@keyframes slideAcross {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* Restore banner animation */
.restore-banner {
    animation: slideInLeft 0.5s ease-out;
}

/* Results animation */
.upload-results {
    animation: fadeInScale 0.5s ease-out;
}

.upload-results .result-stat {
    animation: fadeInUp 0.4s ease-out backwards;
}

.upload-results .result-stat:nth-child(1) { animation-delay: 0.1s; }
.upload-results .result-stat:nth-child(2) { animation-delay: 0.2s; }
.upload-results .result-stat:nth-child(3) { animation-delay: 0.3s; }

/* ============ Authentication & User Menu ============ */

.header-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-auth {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 185, 232, 0.4);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-blue);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-card);
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-arrow {
    font-size: 0.6rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: visible;
    padding-bottom: 4px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: var(--bg-elevated);
}

.user-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

.user-dropdown hr,
.user-dropdown .dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
    display: block !important;
    visibility: visible !important;
    height: 1px;
}

.user-dropdown .logout-link {
    color: #ef4444 !important;
    display: block !important;
    visibility: visible !important;
}

.user-dropdown .logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Auth Modal Styles */
.modal-auth {
    max-width: 400px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-blue);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer .signup-link {
    color: #ffffff;
    font-weight: 600;
}

.auth-footer .forgot-password-link {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer .forgot-password-link:hover {
    color: var(--accent-blue);
}

/* Password Hint Display */
.password-hint-display {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Password Hint Inline (in login error) */
.password-hint-inline {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-blue);
    font-size: 0.95rem;
}

.password-hint-display label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.password-hint-display .hint-text {
    color: var(--accent-blue);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Recovery Flow Styles */
.recovery-help-link {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recovery-help-link a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.recovery-help-link a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.recovery-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
}

.recovery-success .success-icon {
    font-size: 1.5rem;
    color: #22c55e;
}

.recovery-success p {
    margin: 0;
    color: #22c55e;
    font-weight: 500;
}

.recovery-choice-text {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.recovery-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recovery-help-content {
    text-align: center;
    padding: 20px 0;
}

.recovery-help-content .help-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.recovery-help-content h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.recovery-help-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-full {
    width: 100%;
}

/* Remember Me Checkbox */
.remember-me {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* Auth Required Modal */
.modal-auth-required {
    max-width: 420px;
    text-align: center;
}

.auth-required-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.auth-required-benefits {
    color: var(--text-secondary);
    margin: 20px 0 12px;
    font-size: 0.95rem;
}

.auth-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
}

.auth-benefits-list li {
    padding: 8px 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-benefits-list li::before {
    content: '✓';
    color: var(--accent-success);
    font-weight: bold;
}

.auth-required-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Profile Modal Styles */
.modal-profile {
    max-width: 600px;
}

.profile-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-blue);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-description {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-info {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* My Leads Filter Checkbox */
.my-leads-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-leads-filter input[type="checkbox"] {
    accent-color: var(--accent-blue);
}

/* Claim Button */
.btn-claim {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
}

.btn-claim:hover {
    box-shadow: 0 2px 10px rgba(124, 185, 232, 0.4);
}

/* Responsive Auth */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .header-auth {
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }

    .modal-auth,
    .modal-profile {
        max-width: 95%;
        margin: 10px;
    }

    .profile-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ============ Avatar Upload Styles ============ */
.avatar-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.avatar-preview-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 3px solid var(--accent-blue);
    cursor: pointer;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.avatar-preview.has-image {
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

.avatar-placeholder.hidden {
    display: none;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.avatar-overlay span {
    font-size: 24px;
}

.avatar-preview-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.avatar-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
}

/* ============ Password Hint Styles ============ */
.hint-note {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.security-section {
    margin-bottom: 24px;
}

.security-section h4 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.security-divider {
    height: 1px;
    background: var(--border-color);
    margin: 24px 0;
}

/* ============ Lead Banks Modal Styles ============ */
.modal-lead-banks {
    max-width: 600px;
}

.lead-banks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lead-banks-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.lead-bank-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--accent-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lead-bank-info {
    flex: 1;
}

.lead-bank-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.lead-bank-description {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.lead-bank-count {
    color: var(--text-secondary);
    font-size: 12px;
}

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

.lead-bank-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Bank Form Modal */
.modal-bank-form {
    max-width: 400px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row input[type="color"] {
    width: 50px;
    height: 36px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

#bankColorHex {
    color: var(--text-secondary);
    font-family: monospace;
}

/* Add to Bank Modal */
.modal-add-to-bank {
    max-width: 400px;
}

.bank-checkbox-list {
    margin: 16px 0;
    max-height: 250px;
    overflow-y: auto;
}

.bank-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.bank-checkbox-item:hover {
    background: var(--bg-tertiary);
}

.bank-checkbox-item input[type="checkbox"] {
    accent-color: var(--accent-blue);
    width: 18px;
    height: 18px;
}

.bank-checkbox-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.bank-checkbox-name {
    flex: 1;
    color: var(--text-primary);
}

.bank-checkbox-in-bank {
    color: var(--accent-green);
    font-size: 12px;
}

.bank-warning {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid var(--warning-color);
    color: var(--warning-color);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Lead row bank indicator */
.lead-bank-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.lead-bank-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: white;
    background: var(--accent-blue);
}

/* Add to bank button in lead actions */
.btn-add-bank {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.btn-add-bank:hover {
    box-shadow: 0 2px 10px rgba(155, 89, 182, 0.4);
}

/* ============ Image Crop Modal Styles ============ */
.modal-crop {
    max-width: 420px;
    padding: 24px;
}

.modal-crop h2 {
    margin-bottom: 8px;
}

.modal-crop .modal-subtitle {
    margin-bottom: 12px;
    font-size: 13px;
}

.crop-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.crop-area {
    position: relative;
    width: 240px;
    height: 240px;
    background: var(--bg-primary);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.crop-area:active {
    cursor: grabbing;
}

#cropImage {
    position: absolute;
    transform-origin: center center;
    max-width: none;
    pointer-events: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.crop-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
}

.crop-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 12px 0;
}

.crop-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 8px 14px;
    border-radius: 8px;
}

.zoom-control label {
    color: var(--text-secondary);
    font-size: 13px;
}

#zoomSlider {
    width: 100px;
    accent-color: var(--accent-primary);
}

#zoomValue {
    color: var(--text-primary);
    font-size: 13px;
    min-width: 40px;
}

.crop-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
}

.crop-preview-section label {
    color: var(--text-secondary);
    font-size: 12px;
}

.crop-preview-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
}

#cropPreviewCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-crop .form-actions {
    margin-top: 16px;
    padding-top: 12px;
}

/* Contact Link in Header */
.contact-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.contact-link:hover {
    color: var(--accent-blue);
    background: rgba(124, 185, 232, 0.1);
}

.contact-icon {
    font-size: 1rem;
}

.contact-text {
    font-weight: 500;
}

/* Site Footer */
.site-footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-contact {
    display: flex;
    align-items: center;
}

.footer-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(74, 144, 164, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-email:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(124, 185, 232, 0.1);
    transform: translateY(-2px);
}

.email-icon {
    font-size: 1.1rem;
}

/* Email Popup */
.footer-contact {
    position: relative;
}

.email-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    background: #2a2a32;
    border: 1px solid rgba(124, 185, 232, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.email-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.email-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

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

.popup-email {
    color: var(--accent-blue);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.popup-email:hover {
    background: rgba(124, 185, 232, 0.15);
    text-decoration: underline;
}

.popup-arrow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #2a2a32;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-text {
        display: none;
    }

    .contact-link {
        padding: 8px;
        margin-right: 8px;
    }
}
