:root {
    /* Unified Off-White Premium Theme */
    --bg-base: #f4f4f5;
    /* Off-white / light zinc */
    --bg-surface: #ffffff;
    /* Clean white cards */
    --bg-elevated: #f4f4f5;
    --border-light: #e4e4e7;
    --border-focus: #d4d4d8;
    --text-main: #09090b;
    /* Very dark gray for contrast */
    --text-muted: #52525b;
    /* Darkened from #71717a for better readability */

    --accent-primary: #f4f4f5;
    --accent-secondary: #09090b;
    --accent-brand: #4f46e5;

    --success-bg: #ecfdf5;
    --success-text: #059669;
    --danger-bg: #fef2f2;
    --danger-text: #dc2626;
    --warning-bg: #fffbeb;
    --warning-text: #d97706;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    font-size: 14px;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.logo-icon {
    background: var(--text-main);
    color: var(--bg-base);
    font-weight: 800;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

.logo h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--bg-elevated);
    color: var(--text-main);
    font-weight: 600;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 16px 8px;
}

.badge {
    margin-left: auto;
    background: var(--text-main);
    color: var(--bg-base);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-base);
}

.topbar {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-surface);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    padding: 10px 16px;
    transition: border-color 0.2s;
}

.search-bar:focus-within {
    border-color: var(--border-focus);
}

.search-bar svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    margin-left: 12px;
    font-size: 0.95rem;
    outline: none;
}

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

.quick-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    /* transition is removed because JS will drive it frame-by-frame on scroll */
    opacity: 1;
    overflow: visible;
    /* Needed for dropdowns to show outside */
}

.quick-filters>.multi-select-container {
    flex: 1;
    min-width: 0;
}

.quick-filters>.smart-match-container {
    flex: 0 0 auto !important;
    min-width: auto;
    margin-left: auto;
}

/* Inputs & Pills */
.filter-select,
.pill-toggle {
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 0 14px;
    /* Using height instead of vertical padding for perfect alignment */
    height: 36px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
    outline: none;
}

select.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 32px;
    /* Extra space for the custom arrow */
}

.filter-select:hover,
.pill-toggle:hover {
    border-color: var(--border-focus);
    color: var(--text-main);
}

.pill-toggle.active {
    background: var(--text-main);
    color: var(--bg-base);
    border-color: var(--text-main);
}

.pill-toggle input[type="checkbox"],
.pill-toggle input[type="radio"] {
    display: none;
    /* Hide default checkboxes and radios */
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    border-radius: 6px;
    color: var(--text-main);
    width: 100%;
    box-sizing: border-box;
}

.dropdown-option:hover {
    background: var(--bg-base);
}

.dropdown-option.active {
    background: var(--bg-base);
    font-weight: 500;
}

.ai-toggle {
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    /* Removed margin-left: auto; so it wraps cleanly with the rest of the pills */
}

.ai-toggle.active {
    background: var(--accent-brand);
    border-color: var(--accent-brand);
    color: white;
}

.ai-toggle svg {
    width: 16px;
    height: 16px;
}

/* Smart Match Square Button */
.smart-match-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    overflow: visible;
}

.smart-match-sq-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #43434a 0%, #5f5f6b 100%);
    color: #ffffff;
    border: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    flex-shrink: 0;
}

.smart-match-sq-btn:hover {
    transform: scale(1.06);
    background: #09090b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Smart CV Dropzone */
.smart-cv-dropzone {
    border: 2px dashed var(--border-light);
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;
    background: var(--bg-base);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
}

.smart-cv-dropzone:hover,
.smart-cv-dropzone.dragover {
    border-color: var(--accent-brand) !important;
    background: var(--bg-surface) !important;
}

.smart-match-sq-btn .sparkle-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 11px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* Feed Container */
.feed-container {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    /* Center cards */
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* Job Cards (SaaS Style) */
.job-card {
    width: 100%;
    max-width: 800px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.job-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-focus);
}

/* Card Entrance Stagger Animation */
@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card.stagger-card {
    animation: cardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

/* Skeleton Loading Shimmer */
@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 0.45;
        background-color: var(--border-light);
    }

    50% {
        opacity: 0.85;
        background-color: var(--border-focus);
    }
}

.skeleton-box {
    animation: skeletonPulse 1.4s ease-in-out infinite;
    background-color: var(--border-light);
}

.card-header {
    margin-bottom: 4px;
}

.job-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.company-name {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Data Grid */
.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.meta-pill svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    opacity: 0.7;
}

.salary-badge {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 600;
}

/* Action Buttons & Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 0;
}

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

.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

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

.btn-icon.active-save {
    color: #ef4444;
    /* Red heart */
}

.btn-icon.active-save svg {
    fill: #ef4444;
    stroke: #ef4444;
}

/* Expandable Details */
.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    display: inline-block;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--accent-brand);
    text-decoration: underline;
}

.job-details {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.grid-label {
    font-size: 0.85rem;
    color: var(--text-main);
}

.grid-value {
    justify-content: center;
    width: 100%;
    background: transparent;
}

/* Premium AI Badge */
.ai-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--text-main);
    color: var(--bg-base);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-md);
}

.ai-badge svg {
    width: 12px;
    height: 12px;
}

/* Settings Forms */
.form-group {
    width: 100%;
    max-width: 800px;
}

.form-group textarea {
    width: 100%;
    height: 200px;
    background: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    border-color: var(--border-focus);
}

.primary-btn {
    background: var(--text-main);
    color: var(--bg-base);
    border: 1px solid var(--text-main);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

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

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    border-color: var(--border-focus);
    background: var(--bg-elevated);
}

/* Dropzone Styles */
.dropzone {
    width: 100%;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-base);
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--accent-brand);
    background: var(--bg-elevated);
}

.dropzone svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.dropzone.dragover svg {
    color: var(--accent-brand);
}

/* Mobile Responsiveness */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.mobile-overlay.open {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .sheet-drag-handle {
        width: 38px;
        height: 4px;
        background: var(--border-focus);
        border-radius: 2px;
        margin: -8px auto 16px auto;
        align-self: center;
        flex-shrink: 0;
    }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
        border-radius: 24px 24px 0 0;
        padding-bottom: 40px;
        /* Safe area */
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .mobile-only {
        display: flex !important;
    }

    .logo {
        margin-left: 40px;
        gap: 6px !important;
    }

    .brand-text {
        flex-direction: row !important;
        gap: 6px;
    }

    .topbar {
        padding: 12px 8px;
    }

    .feed-container {
        padding: 16px;
    }

    .job-card {
        padding: 16px;
    }

    .quick-filters {
        gap: 6px;
        padding-bottom: 2px;
    }

    .filter-select,
    .pill-toggle {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
    }

    .job-title {
        font-size: 1.3rem;
        /* Increased for mobile */
    }

    .company-name {
        font-size: 1.05rem;
        /* Increased for mobile */
    }

    .meta-pill {
        font-size: 0.95rem;
        /* Increased for mobile */
        padding: 6px 12px;
    }

    /* removed .card-actions mobile override to fix stray borders */
}

@keyframes pulse-skeleton {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        opacity: 0.6;
    }
}

.skeleton-box {
    background: var(--border-light);
    border-radius: var(--radius-sm);
    animation: pulse-skeleton 1.5s ease-in-out infinite;
}

/* Chip / Pill Selectors for Lead Intake Wizard */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-btn {
    background: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.3;
}

.chip-btn:hover {
    border-color: var(--border-focus);
    background: var(--bg-elevated);
}

.chip-btn.active {
    background: var(--text-main);
    color: var(--bg-base);
    border-color: var(--text-main);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Clean Symmetric Card Grids for Lead Intake Wizard */
.question-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 32px;
}

.question-label {
    display: block;
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.4;
}

.lead-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lead-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 580px) {
    .lead-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lead-card-btn {
    background: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    box-sizing: border-box;
    user-select: none;
}

.lead-card-btn:hover {
    border-color: var(--accent-brand);
    background: var(--bg-elevated);
}

.lead-card-btn.active {
    background: var(--accent-brand);
    color: #ffffff;
    border-color: var(--accent-brand);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Hide raw browser scrollbars inside modals for a clean native app feel */
.modal-overlay,
.modal-overlay *,
#lead-modal *,
.wiz-slide-container {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.modal-overlay::-webkit-scrollbar,
.modal-overlay *::-webkit-scrollbar,
#lead-modal *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

@media (max-width: 640px) {
    #lead-modal>div {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #wizard-footer-controls {
        padding: 12px 16px max(14px, env(safe-area-inset-bottom)) 16px !important;
        background: var(--bg-surface) !important;
        border-top: 1px solid var(--border-light) !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06) !important;
        z-index: 10 !important;
    }

    #wizard-next-btn {
        font-size: 0.92rem !important;
        padding: 12px 18px !important;
        min-height: 48px !important;
    }

    #wizard-prev-btn {
        min-width: 80px !important;
        font-size: 0.88rem !important;
        padding: 12px 14px !important;
        min-height: 48px !important;
    }
}

/* 🧙‍♂️ Nea Vasile Conversational Wizard Engine Styles - Soft Off-White Layering */
.wiz-mascot-card {
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.wiz-mascot-header {
    display: flex;
    gap: 14px;
    align-items: center;
}

.wiz-avatar-briefcase-box {
    width: 46px;
    height: 46px;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    user-select: none;
}

.briefcase-mascot-unit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: briefcaseFloat 1.2s ease-in-out infinite alternate;
}

.briefcase-mascot-unit .briefcase-emoji {
    font-size: 26px;
    line-height: 1;
    z-index: 2;
    position: relative;
    display: block;
}

.briefcase-mascot-unit .wing {
    position: absolute;
    top: 5px;
    width: 17px;
    height: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #dbeafe 100%);
    border: 1.5px solid var(--accent-brand);
    z-index: 1;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.briefcase-mascot-unit .wing-left {
    left: -11px;
    border-radius: 90% 20% 10% 80%;
    transform-origin: 100% 50%;
    animation: flapLeft 0.26s ease-in-out infinite alternate;
}

.briefcase-mascot-unit .wing-right {
    right: -11px;
    border-radius: 20% 90% 80% 10%;
    transform-origin: 0% 50%;
    animation: flapRight 0.26s ease-in-out infinite alternate;
}

.briefcase-mascot-unit .sparkle-trail {
    position: absolute;
    bottom: -4px;
    right: -8px;
    font-size: 11px;
    left: auto;
    animation: sparklePulse 0.9s ease-in-out infinite alternate;
    z-index: 3;
}

@keyframes sparklePulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.25);
        opacity: 1;
    }
}

.wiz-speech-content {
    flex: 1;
}

.wiz-speech-bubble {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 1.04rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.wiz-speech-bubble::before {
    content: '';
    position: absolute;
    top: 42%;
    transform: translateY(-42%);
    left: -8px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 8px solid var(--border-light);
}

.wiz-speech-bubble::after {
    content: '';
    position: absolute;
    top: 42%;
    transform: translateY(-42%);
    left: -6px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 7px solid var(--bg-surface);
}

.wiz-tip-box {
    background: transparent;
    border: none;
    padding: 6px 2px 0 2px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
    width: 100%;
    box-sizing: border-box;
}

.wiz-tip-box svg {
    display: inline;
    vertical-align: -2px;
    margin-right: 6px;
    color: var(--accent-brand);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.wiz-option-btn {
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-base);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.18s ease;
    box-sizing: border-box;
    user-select: none;
}

.wiz-option-btn:hover {
    border-color: var(--accent-brand);
    background: var(--bg-surface);
}

.wiz-option-btn:active {
    transform: scale(0.98);
}

.wiz-option-btn.selected {
    background: var(--accent-brand);
    color: #ffffff;
    border-color: var(--accent-brand);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.wiz-option-btn.selected .wiz-check-icon {
    opacity: 1;
    transform: scale(1);
}

.wiz-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s ease;
}

.wiz-slide-container {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.wiz-slide-out {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

.wiz-slide-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Premium Silky Smooth Modal Entrance System */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 11, 0.65);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-backdrop-filter 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card-animated {
    transform: scale(0.92) translateY(24px);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.2),
                opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.modal-backdrop.open .modal-card-animated {
    transform: scale(1) translateY(0);
    opacity: 1;
}

@media (max-width: 640px) {
    #lead-cta-banner {
        margin: 12px 12px 0 12px !important;
        padding: 16px !important;
        border-radius: 14px !important;
    }

    #lead-cta-banner #open-lead-modal-btn {
        width: 100% !important;
        margin-top: 6px;
    }
}

/* Flying Briefcase Mascot */
.flying-briefcase-mascot {
    position: fixed;
    z-index: 9999;
    bottom: 110px;
    left: -70px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
    transition: opacity 0.4s ease;
}

.flying-briefcase-mascot.flying {
    animation: flyWavyAcross 12s cubic-bezier(0.35, 0, 0.65, 1) forwards;
}

@keyframes flyWavyAcross {
    0% {
        transform: translate(0, 0) rotate(-6deg);
        opacity: 0;
    }

    4% {
        opacity: 1;
    }

    25% {
        transform: translate(28vw, -35px) rotate(5deg);
    }

    50% {
        transform: translate(58vw, 15px) rotate(-6deg);
    }

    75% {
        transform: translate(82vw, -25px) rotate(4deg);
    }

    96% {
        opacity: 1;
    }

    100% {
        transform: translate(calc(100vw + 80px), 10px) rotate(-4deg);
        opacity: 0;
    }
}

.briefcase-body {
    font-size: 32px;
    line-height: 1;
    transform-origin: center;
    animation: briefcaseFloat 1.1s ease-in-out infinite alternate;
}

@keyframes briefcaseFloat {
    0% {
        transform: translateY(0) rotate(-2deg);
    }

    100% {
        transform: translateY(-7px) rotate(2deg);
    }
}

.wing {
    width: 16px;
    height: 11px;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid #2563eb;
    border-radius: 50% 50% 10% 50%;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.wing-left {
    transform-origin: right center;
    animation: flapLeft 0.2s ease-in-out infinite alternate;
    margin-right: -5px;
}

.wing-right {
    transform-origin: left center;
    animation: flapRight 0.2s ease-in-out infinite alternate;
    margin-left: -5px;
    border-radius: 50% 50% 50% 10%;
}

@keyframes flapLeft {
    0% {
        transform: scaleY(1) rotate(-20deg);
    }

    100% {
        transform: scaleY(-0.6) rotate(30deg);
    }
}

@keyframes flapRight {
    0% {
        transform: scaleY(1) rotate(20deg);
    }

    100% {
        transform: scaleY(-0.6) rotate(-30deg);
    }
}

.sparkle-trail {
    position: absolute;
    bottom: -4px;
    left: -10px;
    font-size: 13px;
    animation: sparklePulse 0.5s ease-in-out infinite alternate;
}

@keyframes sparklePulse {
    0% {
        opacity: 0.3;
        transform: scale(0.7);
    }

    100% {
        opacity: 1;
        transform: scale(1.25);
    }
}