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

:root {
    --bg: #fafbff;
    --surface: rgba(255,255,255,0.8);
    --surface-solid: #ffffff;
    --border: rgba(13, 148, 136, 0.12);
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --accent-light: #14b8a6;
    --accent-glow: rgba(13, 148, 136, 0.25);
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 50px -15px rgba(0,0,0,0.1);
    --glass: rgba(255,255,255,0.7);
    --glass-border: rgba(255,255,255,0.5);
    --sidebar-bg: #ffffff;
    --sidebar-text: #64748b;
    --sidebar-text-hover: #0f172a;
    --logout-red: #fecaca;
    --logout-red-hover: #fca5a5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body.page-transition::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(45, 212, 191, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(20, 184, 166, 0.06), transparent);
    pointer-events: none;
    z-index: -1;
}

body.page-transition .main-content {
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px -3px var(--accent-glow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px var(--accent-glow);
}

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

.btn-secondary:hover {
    background: var(--border);
}

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

.btn-danger:hover {
    opacity: 0.9;
}

.input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.card {
    background: var(--surface-solid);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.5) inset;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.6) inset;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1002;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

@media (min-width: 769px) {
    .sidebar-overlay { display: none !important; }
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    border-right: 1px solid var(--border);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: var(--sidebar-text-hover);
    padding: 0 24px 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--sidebar-text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-link:hover {
    background: var(--surface);
    color: var(--sidebar-text-hover);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sidebar-link.active {
    background: var(--surface);
    color: var(--accent-hover);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    margin: 16px;
    margin-top: auto;
    color: #991b1b;
    font-weight: 600;
    background: var(--logout-red);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.sidebar-logout:hover {
    background: var(--logout-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
}

.sidebar-logout .sidebar-icon {
    width: 18px;
    height: 18px;
    color: #991b1b;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background: transparent;
    transition: margin-left 0.3s ease;
}

.main-content .container {
    animation: pageIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .sidebar-toggle { display: flex; }
    .sidebar-overlay { display: block; }
    .sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

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

.page-title {
    font-size: 28px;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 24px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group .input {
    margin-top: 4px;
}

.input-with-toggle {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.input-with-toggle .input {
    flex: 1;
    margin-top: 0;
}

.btn-password-toggle {
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-solid);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.btn-password-toggle:hover {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent);
}

.login-box .btn {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,253,250,0.95) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px -15px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.8) inset;
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card .value {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 8px;
}

.stat-card .label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-icon-leads { background: rgba(13, 148, 136, 0.2); color: var(--accent); }
.stat-icon-bases { background: rgba(45, 212, 191, 0.3); color: #0f766e; }
.stat-icon-users { background: rgba(20, 184, 166, 0.25); color: #115e59; }
.stat-icon-new { background: rgba(251, 191, 36, 0.3); color: #b45309; }
.stat-icon-converted { background: rgba(16, 185, 129, 0.25); color: #047857; }

.stat-card-new { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.stat-card-converted { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow);
}

.action-card:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(240,253,250,0.9) 0%, rgba(204,251,241,0.6) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -10px var(--accent-glow);
}

.action-card svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card .value { font-size: 24px; }
    .stat-card { padding: 16px; }
    .dashboard-actions { grid-template-columns: 1fr; }
}

.table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
    border-radius: var(--radius);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrap::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.04);
    border-radius: 4px;
}

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

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.leads-table {
    min-width: 1200px;
}

.leads-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.leads-card {
    position: relative;
}

.leads-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    font-size: 14px;
    color: var(--text-muted);
    transition: opacity 0.2s ease;
}

.leads-loading.active {
    display: flex;
    animation: loadFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.leads-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.leads-count {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

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

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.leads-table th, .leads-table td {
    padding: 12px 14px;
    font-size: 13px;
    transition: background 0.15s ease;
    vertical-align: middle;
}

.leads-table tbody tr {
    min-height: 44px;
}

.leads-table .lead-row {
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s ease;
}

.leads-table .lead-row:active td {
    background: rgba(13, 148, 136, 0.08) !important;
}

th {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: linear-gradient(180deg, rgba(250,251,255,0.98) 0%, rgba(240,253,250,0.4) 100%);
}

th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child { border-radius: 0 var(--radius) 0 0; }

.leads-table tbody tr {
    transition: background 0.15s ease;
}

.leads-table tbody tr:hover td {
    background: rgba(13, 148, 136, 0.06);
}

.leads-table tbody tr:nth-child(even) td {
    background: rgba(250,251,255,0.5);
}

.leads-table tbody tr:nth-child(even):hover td {
    background: rgba(13, 148, 136, 0.08);
}

.leads-table tbody {
    animation: tableFadeIn 0.25s ease;
}

@keyframes tableFadeIn {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--surface-solid);
    border-radius: var(--radius);
    padding: 32px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5);
    transform: scale(0.96) translateY(-10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal h3 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group:last-of-type {
    margin-bottom: 0;
}

.form-group-with-action {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.form-group-with-action .input {
    flex: 1;
    min-width: 0;
}

.btn-generate {
    padding: 12px 18px;
    font-size: 13px;
    white-space: nowrap;
}

.modal-error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
}

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

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

.filter-control {
    height: 42px;
    box-sizing: border-box;
}

.filters select, .filters input, .filter-control select, .filter-control input {
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    min-width: 120px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filters .filter-control select {
    min-width: 140px;
}

.filters input[type="text"] { min-width: 200px; }
.filters input[type="number"] { min-width: 70px; }

.filter-btn {
    height: 42px;
    padding: 0 20px;
}

.multiselect-wrap {
    position: relative;
    min-width: 160px;
}

.multiselect-trigger {
    position: relative;
}

.multiselect-trigger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-width: 160px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-solid);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.multiselect-trigger:hover {
    border-color: var(--accent);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.multiselect-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.multiselect-value {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.multiselect-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 220px;
    max-height: 280px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    flex-direction: column;
}

.multiselect-dropdown.open {
    display: flex;
    animation: dropdownSlide 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.multiselect-search {
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 13px;
}

.multiselect-search:focus {
    outline: none;
}

.multiselect-options {
    overflow-y: auto;
    max-height: 200px;
    padding: 8px 0;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
}

.multiselect-option:hover {
    background: rgba(13, 148, 136, 0.08);
}

.multiselect-option .custom-checkbox {
    flex-shrink: 0;
}

.multiselect-actions {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.age-filter-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
}

.age-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.age-preset {
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-solid);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.age-preset:hover {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
}

.age-preset.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    color: white;
}

.age-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.age-inputs input {
    width: 64px;
    height: 42px;
    padding: 0 10px;
    text-align: center;
}

.age-sep {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
}

.search-wrap .search-input {
    height: 42px;
    padding-left: 40px !important;
    padding-right: 40px !important;
    min-width: 220px !important;
}

.search-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    opacity: 0.7;
}

.search-icon svg {
    flex-shrink: 0;
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-clear:hover {
    background: var(--danger);
    color: white;
}

.leads-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.leads-filters-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: rgba(13, 148, 136, 0.12);
    border-radius: 20px;
}

.leads-toolbar {
    margin-bottom: 24px;
}

.filters-row {
    align-items: center;
    gap: 12px;
}

@media (max-width: 1100px) {
    .filters { gap: 10px; }
    .filter-control { height: 40px; }
    .filters select, .filters input { height: 40px; min-width: 110px; }
    .multiselect-wrap { min-width: 140px; }
    .multiselect-trigger { min-width: 140px; height: 40px; }
    .age-filter-wrap { height: 40px; }
    .age-preset { height: 40px; padding: 0 12px; font-size: 12px; }
    .age-inputs input { height: 40px; width: 56px; }
    .search-wrap { height: 40px; }
    .search-wrap .search-input { height: 40px; min-width: 180px !important; }
    .filter-btn { height: 40px; }
    .bulk-assign-select { height: 40px; min-width: 160px; }
    .bulk-actions .btn-primary { height: 40px; }
}

@media (max-width: 768px) {
    .filters { flex-direction: column; align-items: stretch; }
    .filters .filter-control, .filters select { min-width: 100%; }
    .age-filter-wrap { flex-wrap: wrap; height: auto; }
    .search-wrap .search-input { min-width: 100% !important; }
    .bulk-actions { flex-direction: column; align-items: stretch; }
    .bulk-assign-wrap { flex-direction: column; align-items: stretch; }
    .bulk-assign-select { min-width: 100%; }
}

.bulk-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 16px;
    padding: 16px 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(240,253,250,0.6) 0%, rgba(255,255,255,0.9) 100%);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.bulk-assign-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-assign-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.bulk-assign-select {
    min-width: 180px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: var(--surface-solid);
}

.bulk-assign-select:focus {
    outline: none;
    border-color: var(--accent);
}

.bulk-actions .btn-primary {
    height: 42px;
    padding: 0 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-label input { display: none; }
.checkbox-label .custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.checkbox-label input:checked + .custom-checkbox {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.checkbox-label .custom-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-bottom: 3px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.checkbox-label input:checked + .custom-checkbox::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label:hover .custom-checkbox {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
}

.btn-sm { padding: 8px 16px; font-size: 13px; }

.leads-table .col-check {
    width: 52px;
    text-align: center;
    vertical-align: middle;
}

.leads-table .col-adresse {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leads-table .col-tel { white-space: nowrap; }
.leads-table .col-email { max-width: 200px; }
.leads-table .col-iban { max-width: 140px; font-family: monospace; font-size: 12px; }

.leads-table .col-check .lead-check-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.leads-table .col-check input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.leads-table .col-check .custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.leads-table .col-check input:checked + .custom-checkbox {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.leads-table .col-check .custom-checkbox::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-bottom: 3px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leads-table .col-check input:checked + .custom-checkbox::after {
    transform: rotate(45deg) scale(1);
}

.leads-table .col-check .custom-checkbox:hover {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
}
.leads-table .status-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    min-width: 110px;
    background: var(--surface-solid);
    transition: all 0.2s;
}

.leads-table .status-select:hover {
    border-color: var(--accent);
}

.leads-table .status-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.leads-table .lead-row.saved td {
    background: rgba(16, 185, 129, 0.12) !important;
    transition: background 0.3s ease;
}

.lead-row.saved .status-select {
    border-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.badge-admin { background: #ccfbf1; color: #0f766e; }
.badge-caller { background: #99f6e4; color: #115e59; }
.badge-PAS_CALL { background: #fef3c7; color: #b45309; }
.badge-CALL { background: #a5f3fc; color: #0e7490; }
.badge-EN_COURS { background: #99f6e4; color: #047857; }
.badge-A_RAPPELER { background: #e9d5ff; color: #6b21a8; }

.lead-row {
    cursor: pointer;
    transition: background 0.2s;
}

.lead-row.expanded td {
    background: rgba(13, 148, 136, 0.08) !important;
}

.leads-table .col-check .lead-check-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.lead-detail-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.lead-detail {
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(240,253,250,0.4) 0%, var(--surface) 100%);
    border-top: 1px solid var(--border);
    animation: detailSlideIn 0.2s ease;
}

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

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

.lead-detail-item {
    font-size: 13px;
}

.lead-detail-item strong {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.import-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.import-form .form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.import-form .form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.file-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-zone:hover, .file-zone.dragover {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.08);
}

.file-zone input {
    display: none;
}

.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.import-loading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

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

.import-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.import-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 4px;
    width: 0;
    transition: width 0.2s ease;
}

.leads-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

.leads-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.lead-detail-rappel {
    margin-top: 16px;
    padding: 12px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.lead-detail-history {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.history-list {
    max-height: 120px;
    overflow-y: auto;
    margin: 8px 0;
}

.history-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

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

.history-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.history-empty {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.history-add {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.history-add .input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
}

.rappel-input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    min-width: 110px;
}

.waiting-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.waiting-box {
    text-align: center;
    padding: 48px 40px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.waiting-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.waiting-box h2 {
    margin-bottom: 8px;
    font-size: 20px;
}

.waiting-box p {
    color: var(--text-muted);
    font-size: 14px;
}

.waiting-hint {
    font-size: 12px !important;
    margin-top: 8px;
    opacity: 0.8;
}

.pending-list .pending-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: var(--text-muted);
}

.pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}

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

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-date {
    font-size: 12px;
    color: var(--text-muted);
}
