/* Custom Premium CSS with Dark Glassmorphism Aesthetics */

/* ── App Initialization & Loading ── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: #0a0b10;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.splash-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

:root {
    --bg-dark: #0a0b10;
    --card-bg: rgba(18, 19, 30, 0.65);
    --card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Elegant Accent Colors */
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.35);
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.35);
    --accent-cyan: #06b6d4;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Radial Glow */
.glow-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120vw;
    height: 120vh;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.12) 0%, rgba(13, 14, 21, 0) 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, rgba(13, 14, 21, 0) 50%);
    z-index: -1;
    pointer-events: none;
}

/* ── Frosted Glass Cards ── */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

/* Header Styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    background: rgba(10, 11, 16, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px var(--accent-blue-glow));
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo h1 span {
    color: var(--accent-blue);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Odoo Status Badges */
.odoo-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.odoo-badge.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.05);
}

.odoo-badge.disconnected i {
    animation: pulse-red 2s infinite;
}

.odoo-badge.connected {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.05);
}

/* General Layout Container */
.app-container {
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 40px;
    display: flex;
    justify-content: center;
}

/* Odoo Login card */
.login-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    margin-top: 40px;
}

.login-icon {
    font-size: 2.5rem;
    color: var(--accent-purple);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 12px var(--accent-purple-glow));
}

.card-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Forms and Inputs */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

input, select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    width: 100%;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
    background: rgba(255, 255, 255, 0.05);
}

select option {
    background-color: #12131e !important;
    color: #f3f4f6 !important;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(139, 92, 246, 0.45);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: #fff;
}

.btn-block {
    width: 100%;
}

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

/* ── Dashboard Grid ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 30px;
    width: 100%;
}

.sidebar-panel {
    padding: 24px;
    height: fit-content;
}

.panel-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
}

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

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

/* Toggle Switches container */
.toggles-container {
    margin-top: 24px;
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

.toggle-section-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-section-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.toggle-section-card h5 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-left: 2px solid var(--accent-blue);
    padding-left: 6px;
}

.toggle-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toggle Switch Styling */
.switch-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    gap: 10px;
}

.switch-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.slider {
    width: 32px;
    height: 18px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    position: relative;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #cbd5e1;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.switch-container input:checked + .slider {
    background-color: var(--accent-blue);
    border-color: rgba(59, 130, 246, 0.5);
}

.switch-container input:checked + .slider::before {
    transform: translateX(14px);
    background-color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.label-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.btn-search {
    margin-top: 10px;
}

/* ── Results Panel States ── */
.results-panel {
    padding: 30px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.results-state-content {
    margin: auto;
    max-width: 440px;
}

.earth-icon {
    font-size: 4rem;
    color: var(--accent-blue);
    margin-bottom: 24px;
    opacity: 0.5;
    filter: drop-shadow(0 0 16px var(--accent-blue-glow));
    animation: rotate-earth 20s linear infinite;
}

.results-state-content h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.results-state-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Active Sourcing Loading Spinner */
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.glow-spinner {
    box-sizing: border-box;
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin-glow 1.5s linear infinite;
}

.brand-scanning-icon {
    font-size: 2rem;
    position: absolute;
    top: 24px;
    left: 24px;
    color: var(--accent-blue);
    animation: scanning-pulse 2s infinite ease-in-out;
}

.scanning-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-progress-bar {
    width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 16px auto 0;
    overflow: hidden;
}

.progress-fill {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
    animation: progress-slide 2s infinite ease-in-out;
}

/* Leads Table Results */
.results-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.header-titles h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.header-titles p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.count-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

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

.lead-cell-muted {
    color: var(--text-muted);
}

.lead-url-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.lead-url-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

.export-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ── Modal Settings Overlay ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 16, 0.8);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: var(--transition-smooth);
}

.modal-content {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: modal-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal-btn:hover {
    color: #fff;
}

.settings-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrapper input {
    padding-right: 44px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.toggle-password-btn:hover {
    color: var(--text-primary);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 16px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.15);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ── Keyframes & Animations ── */
@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rotate-earth {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-glow {
    0% { transform: rotate(0deg); box-shadow: 0 0 10px var(--accent-purple-glow); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.6); }
    100% { transform: rotate(360deg); box-shadow: 0 0 10px var(--accent-purple-glow); }
}

@keyframes scanning-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 5px var(--accent-blue-glow)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.7)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 5px var(--accent-blue-glow)); }
}

@keyframes progress-slide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(150%); }
    100% { transform: translateX(-100%); }
}

@keyframes modal-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ── Premium Sidebar Preset Bar ── */
.toggle-presets-bar {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.btn-preset {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-preset:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Custom Styled Table Checkboxes ── */
.custom-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

/* ── Row Status Badges ── */
.badge-status {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.badge-ready {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-exporting {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Single Lead Actions ── */
.btn-action-sm {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-action-sm.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-action-sm.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* ── Global Centered Glass Modal ── */
.details-drawer {
    position: fixed;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    display: grid !important;
    place-items: center !important;
    background: transparent;
    transition: var(--transition-smooth);
}

.details-drawer.hidden {
    display: none !important;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.drawer-content {
    position: relative;
    z-index: 2;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    padding: 60px 10%; /* More generous padding for fullscreen */
    overflow-y: auto;
    
    /* Hide scrollbar indicators */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    animation: modal-fade-in 0.4s ease-out forwards;
}

.drawer-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.drawer-header h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-brand);
}

.btn-close-circle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-close-circle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.05);
}

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

.drawer-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-blue);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.drawer-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.drawer-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px;
    border-radius: 8px;
}

.drawer-info-card.span-full {
    grid-column: 1 / -1;
}

.drawer-info-card .card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.drawer-info-card .card-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drawer-info-card .card-value a {
    color: var(--accent-blue);
    text-decoration: none;
}

.drawer-info-card .card-value a:hover {
    text-decoration: underline;
}

.social-links-drawer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-pill {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.social-pill.linkedin { background: rgba(10, 102, 194, 0.1); color: #0a66c2; border: 1px solid rgba(10, 102, 194, 0.2); }
.social-pill.facebook { background: rgba(24, 119, 242, 0.1); color: #1877f2; border: 1px solid rgba(24, 119, 242, 0.2); }
.social-pill.instagram { background: rgba(225, 48, 108, 0.1); color: #e1306c; border: 1px solid rgba(225, 48, 108, 0.2); }
.social-pill.twitter { background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); }

.social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── Premium Tabbed Navigation ── */
.dashboard-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* ── Horizontal Filters Layout ── */
.filter-panel {
    padding: 24px;
}

.filter-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: end;
}

@media (max-width: 1024px) {
    .filter-horizontal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .filter-horizontal-grid {
        grid-template-columns: 1fr;
    }
}

.filter-actions-cell {
    display: flex;
    align-items: flex-end;
    height: 100%;
}

.filter-actions-cell button {
    width: 100%;
    height: 42px;
}

.btn-search-wide {
    font-weight: 700;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-search-wide:hover {
    background: #2563eb;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

/* ── Collapsible Extraction Fields ── */
.collapsible-fields-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    animation: slide-down-fade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toggle-presets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.toggles-grid-panels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .toggles-grid-panels {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .toggles-grid-panels {
        grid-template-columns: 1fr;
    }
}

/* ── Inline Settings Panel Tab View ── */
.settings-panel-container {
    padding: 30px;
}

.settings-panel-header {
    margin-bottom: 24px;
}

.settings-panel-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

@keyframes slide-down-fade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Sourcing History UI Styles ── */
.history-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .history-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .history-list-grid {
        grid-template-columns: 1fr;
    }
}

.history-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.history-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.history-card-header {
    margin-bottom: 12px;
}

.history-card-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-card-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-card-body {
    margin-bottom: 20px;
}

.history-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.history-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.history-badge.location { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.history-badge.provider { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.history-badge.count { background: rgba(234, 179, 8, 0.1); color: #eab308; }

.history-card-footer {
    display: flex;
    gap: 10px;
}

.btn-history-action {
    width: 100%;
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

/* ── AI Data Quality Checker Banner ── */
.checker-toggle-group {
    margin-bottom: 16px;
}

.checker-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 10px;
    padding: 10px 16px;
    min-height: 54px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.checker-banner:has(input:checked) {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
}

.checker-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checker-banner-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.checker-banner-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Fixed Toggle Design ── */
.checker-switch {
    width: 38px !important;
    height: 20px !important;
    flex-shrink: 0;
}

.checker-switch .slider {
    width: 38px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.checker-switch .slider::before {
    width: 14px !important;
    height: 14px !important;
    left: 2px !important;
    bottom: 2px !important;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.checker-switch input:checked + .slider {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)) !important;
    border-color: transparent !important;
}

.checker-switch input:checked + .slider::before {
    transform: translateX(18px) !important;
}

