/**
 * Leadio App - Mobile-First CSS
 * Native Android app-like experience
 */

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Modern thin scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] * {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-theme="dark"] *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] *::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   CSS VARIABLES - LIGHT MODE (Default)
   ============================================ */
:root,
[data-theme="light"] {
    /* Background colors */
    --bg-body: #F8FAFC;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F1F5F9;
    --bg-tertiary: #E2E8F0;
    --bg-hover: #F1F5F9;
    --bg-active: #E2E8F0;

    /* Text colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Border colors */
    --border: #E2E8F0;
    --border-hover: #CBD5E1;
    --border-focus: #3B82F6;

    /* Accent colors */
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: #EFF6FF;
    --accent-rgb: 59, 130, 246;

    /* Status colors */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --error: #EF4444;
    --error-bg: #FEF2F2;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;

    /* Stage colors */
    --stage-incoming: #6B7280;
    --stage-discovery: #3B82F6;
    --stage-analysis: #F59E0B;
    --stage-followup: #10B981;
    --stage-quote: #8B5CF6;
    --stage-negotiation: #EC4899;
    --stage-onhold: #8B5CF6;
    --stage-archived: #9CA3AF;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-nav: 0 -1px 10px rgba(0, 0, 0, 0.1);

    /* Misc */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   CSS VARIABLES - DARK MODE
   ============================================ */
[data-theme="dark"] {
    --bg-body: #0F172A;
    --bg-primary: #1E293B;
    --bg-secondary: #334155;
    --bg-tertiary: #475569;
    --bg-hover: #334155;
    --bg-active: #475569;

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --text-inverse: #0F172A;

    --border: #334155;
    --border-hover: #475569;
    --border-focus: #60A5FA;

    --accent: #60A5FA;
    --accent-hover: #3B82F6;
    --accent-light: #1E3A5F;

    --success-bg: #064E3B;
    --error-bg: #7F1D1D;
    --warning-bg: #78350F;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-header: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-nav: 0 -1px 10px rgba(0, 0, 0, 0.3);
}

/* ============================================
   APP LAYOUT
   ============================================ */
.leadio-app {
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.leadio-main {
    flex: 1;
    padding-top: 56px; /* Header height */
    padding-bottom: 64px; /* Bottom nav height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   HEADER
   ============================================ */
.leadio-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-primary);
    box-shadow: var(--shadow-header);
    padding-top: env(safe-area-inset-top);
}

.leadio-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 17px;
}

.leadio-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    text-align: left;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition);
}

.leadio-header-btn:active {
    background: var(--bg-active);
}

.leadio-header-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.leadio-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Toggle Buttons (Theme, Language) */
.leadio-toggle-btn {
    background: var(--bg-secondary);
    border-radius: 50%;
}

.leadio-toggle-btn:hover {
    background: var(--bg-tertiary);
}

/* Theme toggle icon animation */
.leadio-toggle-btn svg {
    transform-origin: center;
}

.leadio-toggle-btn:active svg {
    transform: rotate(20deg) scale(0.9);
}

/* Push notification toggle active state */
#leadio-push-toggle.active {
    background: var(--primary, #3b82f6);
    color: white;
}

#leadio-push-toggle.active:hover {
    background: var(--primary-hover, #2563eb);
}

.leadio-lang-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Avatar */
.leadio-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* User button */
.leadio-user-btn {
    background: transparent;
    padding: 0;
}

.leadio-user-btn:hover {
    background: transparent;
}

.leadio-user-btn .leadio-avatar {
    width: 100%;
    height: 100%;
}

.leadio-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

/* Search Bar */
.leadio-search-bar {
    padding: 12px;
    margin: 12px 17px 0 17px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.leadio-search-inner {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 0 12px;
    height: 44px;
}

.leadio-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leadio-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 12px;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.leadio-search-input::placeholder {
    color: var(--text-muted);
}

.leadio-search-clear {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
}

.leadio-search-clear svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.leadio-dropdown {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top));
    right: 8px;
    width: 280px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.leadio-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.leadio-dropdown-user {
    flex: 1;
    min-width: 0;
}

.leadio-dropdown-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-dropdown-email {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

.leadio-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition);
}

.leadio-dropdown-item:hover {
    background: var(--bg-secondary);
}

.leadio-dropdown-item:active {
    background: var(--bg-active);
}

.leadio-dropdown-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.leadio-dropdown-danger {
    color: var(--error);
}

.leadio-dropdown-danger svg {
    color: var(--error);
}

/* Dropdown toggle item with switch */
.leadio-dropdown-toggle {
    cursor: pointer;
}

.leadio-dropdown-toggle:hover {
    background: var(--bg-secondary);
}

.leadio-dropdown-toggle span:first-of-type {
    flex: 1;
    font-weight: 500;
}

/* Toggle Switch */
.leadio-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.leadio-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.leadio-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--text-muted);
    transition: 0.2s;
    border-radius: 26px;
}

.leadio-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.leadio-switch input:checked + .leadio-switch-slider {
    background-color: var(--primary);
}

.leadio-switch input:checked + .leadio-switch-slider:before {
    transform: translateX(22px);
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.leadio-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    background: var(--bg-primary);
    box-shadow: var(--shadow-nav);
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(64px + env(safe-area-inset-bottom));
}

.leadio-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
}

.leadio-nav-item.active {
    color: var(--accent);
}

.leadio-nav-item:active {
    background: var(--bg-hover);
}

.leadio-nav-item svg {
    width: 24px;
    height: 24px;
}

.leadio-nav-label {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.leadio-nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.leadio-nav-badge:not(:empty) {
    display: flex;
}

/* ============================================
   MORE MENU (Bottom Sheet)
   ============================================ */
.leadio-more-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
}

.leadio-more-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.leadio-more-menu-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.leadio-more-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
}

.leadio-more-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
}

.leadio-more-close svg {
    width: 20px;
    height: 20px;
}

.leadio-more-menu-items {
    padding: 8px 0;
}

.leadio-more-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}

.leadio-more-item:active {
    background: var(--bg-active);
}

.leadio-more-item svg {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
}

.leadio-more-item .leadio-nav-badge {
    position: static;
    transform: none;
    margin-left: auto;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.leadio-content {
    padding: 16px;
}

/* Pull to Refresh Indicator */
.leadio-ptr {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    transform: translateY(-100%);
    transition: transform var(--transition);
}

.leadio-ptr.active {
    transform: translateY(0);
}

.leadio-ptr svg {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   LEAD CARDS
   ============================================ */
.leadio-leads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.leadio-lead-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.leadio-lead-card:active {
    transform: scale(0.98);
}

.leadio-lead-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.leadio-lead-info {
    flex: 1;
    min-width: 0;
}

.leadio-lead-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-lead-company {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action Buttons */
.leadio-lead-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.leadio-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    text-decoration: none;
}

.leadio-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.leadio-action-btn svg {
    width: 16px;
    height: 16px;
}

/* WhatsApp button */
.leadio-action-whatsapp:hover {
    background: #25D366;
    color: white;
}

/* Telegram button */
.leadio-action-telegram:hover {
    background: #0088cc;
    color: white;
}

/* Meet button states */
.leadio-action-meet.inactive {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.leadio-action-meet.active {
    background: var(--success-light, #dcfce7);
    color: var(--success, #16a34a);
}

.leadio-action-meet.active:hover {
    background: var(--success, #16a34a);
    color: white;
}

/* Copy button */
.leadio-action-copy.copied {
    background: var(--success, #16a34a);
    color: white;
}

/* Tooltips */
.leadio-action-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: var(--bg-inverse, #1f2937);
    color: var(--text-inverse, white);
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
    pointer-events: none;
}

.leadio-action-btn[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--bg-inverse, #1f2937);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.leadio-action-btn[data-tooltip]:hover::after,
.leadio-action-btn[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Schedule with timezones */
.leadio-lead-schedule {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    overflow: hidden;
}

.leadio-lead-schedule svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.leadio-schedule-date {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 2px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* First timezone (always visible) */
.leadio-tz-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    margin-left: 6px;
    flex-shrink: 0;
}

.leadio-tz-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Lead cards: Show only first timezone (svg, date, flag1, time1 = 4 children) */
.leadio-lead-schedule > *:nth-child(n+5) {
    display: none;
}

.leadio-lead-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.leadio-lead-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.leadio-lead-stage {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.leadio-lead-stage[data-stage="incoming"] { background: var(--stage-incoming); }
.leadio-lead-stage[data-stage="discovery"] { background: var(--stage-discovery); }
.leadio-lead-stage[data-stage="analysis"] { background: var(--stage-analysis); }
.leadio-lead-stage[data-stage="follow_up"] { background: var(--stage-followup); }
.leadio-lead-stage[data-stage="quote"] { background: var(--stage-quote); }
.leadio-lead-stage[data-stage="negotiation"] { background: var(--stage-negotiation); }
.leadio-lead-stage[data-stage="closed"] { background: var(--success); }
.leadio-lead-stage[data-stage="active"] { background: #f59e0b; }
.leadio-lead-stage[data-stage="on_hold"] { background: var(--stage-onhold); }
.leadio-lead-stage[data-stage="archived"] { background: var(--stage-archived); }

/* ============================================
   LEAD CARD PRICING
   ============================================ */
.leadio-lead-price {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.3px;
}

/* ============================================
   OWNER ROW IN CONTACT SECTION
   ============================================ */
/* Owner Card */
.leadio-owner-card {
    padding: 0;
}

.leadio-owner-card .leadio-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
}

.leadio-owner-card .leadio-card-header i,
.leadio-owner-card .leadio-card-header svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.leadio-owner-select-wrapper {
    padding: 10px 16px 12px;
    position: relative;
}

/* Custom dropdown trigger */
.leadio-owner-dropdown {
    position: relative;
}

.leadio-owner-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.leadio-owner-dropdown-trigger:hover {
    border-color: var(--border-hover);
}

.leadio-owner-dropdown-trigger.open {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.leadio-owner-dropdown-trigger .leadio-dropdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.leadio-owner-dropdown-trigger .leadio-dropdown-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.leadio-owner-dropdown-trigger .leadio-dropdown-avatar.unassigned {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.leadio-owner-dropdown-trigger .leadio-dropdown-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leadio-owner-dropdown-trigger .leadio-dropdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.leadio-owner-dropdown-trigger.open .leadio-dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown menu */
.leadio-owner-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg, 0 4px 16px rgba(0, 0, 0, 0.1));
    z-index: 100;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    max-height: 240px;
    overflow-y: auto;
}

.leadio-owner-dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.leadio-owner-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.1s ease;
    font-size: 14px;
    color: var(--text-primary);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.leadio-owner-dropdown-option:hover {
    background: var(--bg-secondary);
}

.leadio-owner-dropdown-option.selected {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.leadio-owner-dropdown-option .leadio-dropdown-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.leadio-owner-dropdown-option .leadio-dropdown-avatar.unassigned {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.leadio-owner-dropdown-option .leadio-option-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leadio-option-email {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.leadio-owner-dropdown-option .leadio-option-check {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0;
}

.leadio-owner-dropdown-option.selected .leadio-option-check {
    opacity: 1;
}

/* Hidden native select for form data */
.leadio-owner-select {
    display: none;
}

/* ============================================
   CATEGORY CARD
   ============================================ */
.leadio-category-row .leadio-detail-row-content {
    position: relative;
}

.leadio-category-dropdown {
    position: relative;
}

.leadio-category-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.leadio-category-dropdown-trigger .leadio-dropdown-text.muted {
    color: var(--text-muted);
}

.leadio-category-dropdown-trigger .leadio-dropdown-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.leadio-category-dropdown-trigger.open .leadio-dropdown-chevron {
    transform: rotate(180deg);
}

.leadio-category-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}

.leadio-category-dropdown-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.leadio-category-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    text-align: left;
    transition: background 0.1s;
}

.leadio-category-dropdown-option:hover {
    background: var(--bg-secondary);
}

.leadio-category-dropdown-option.selected {
    background: var(--accent-light);
    color: var(--accent);
}

.leadio-category-dropdown-option .leadio-option-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leadio-category-dropdown-option .leadio-option-check {
    width: 16px;
    height: 16px;
    color: var(--accent);
    opacity: 0;
    flex-shrink: 0;
}

.leadio-category-dropdown-option.selected .leadio-option-check {
    opacity: 1;
}

/* ============================================
   FINANCIAL SECTION
   ============================================ */
.leadio-financial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 16px;
}

.leadio-financial-full {
    grid-column: 1 / -1;
}

.leadio-financial-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.leadio-financial-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.leadio-financial-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.leadio-currency-symbol {
    padding: 8px 0 8px 10px;
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leadio-financial-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 8px 10px;
    font-size: 14px;
    background: transparent;
    color: var(--text-primary);
    -moz-appearance: textfield;
}

.leadio-financial-input::-webkit-outer-spin-button,
.leadio-financial-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ──────────────────────────────────────────
   Payment Schedule Section
   ────────────────────────────────────────── */

.leadio-payment-summary {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.leadio-payment-summary-item {
    flex: 1;
    min-width: 70px;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.leadio-payment-summary-item .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leadio-payment-summary-item .value {
    font-size: 23px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.leadio-payment-summary-item.overdue .value {
    color: var(--error);
}

.leadio-payment-summary-item.paid .value {
    color: var(--success);
}

.leadio-payment-list {
    padding: 0;
}

.leadio-payment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.leadio-payment-item:last-child {
    border-bottom: none;
}

.leadio-payment-item-info {
    flex: 1;
    min-width: 0;
}

.leadio-payment-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

.leadio-payment-item-amount {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.leadio-payment-item-notes {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-payment-item-assignee {
    font-size: 11px;
    color: var(--text-muted);
}

.leadio-payment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.leadio-payment-status.pending {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.leadio-payment-status.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.leadio-payment-status.overdue {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.leadio-payment-method-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.leadio-payment-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.leadio-payment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--text-muted);
    transition: var(--transition);
}

.leadio-payment-actions button:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.leadio-payment-actions .mark-paid-btn {
    color: var(--success);
}

.leadio-payment-actions .mark-paid-btn:hover {
    background: rgba(16, 185, 129, 0.1);
}

.leadio-action-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.leadio-action-link:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.leadio-action-link-success {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--success);
    transition: var(--transition);
    white-space: nowrap;
}

.leadio-action-link-success:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.1);
}

.leadio-action-link-danger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.leadio-action-link-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.leadio-action-link:disabled,
.leadio-action-link-success:disabled,
.leadio-action-link-danger:disabled {
    cursor: default;
    opacity: 0.7;
}

.leadio-payment-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    margin: 8px 16px;
    width: calc(100% - 32px);
    box-sizing: border-box;
}

.leadio-payment-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.leadio-expense-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.leadio-expense-item:last-child {
    border-bottom: none;
}

.leadio-expense-item-date {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leadio-expense-item-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    min-width: 0;
}

.leadio-expense-item-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    margin-left: auto;
}

.leadio-payment-net-profit {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    font-weight: 600;
}

.leadio-payment-net-profit .label {
    color: var(--text-secondary);
}

.leadio-payment-net-profit .value {
    color: var(--text-primary);
    font-size: 23px;
}

/* ──────────────────────────────────────────
   Finance Overview Page
   ────────────────────────────────────────── */

.leadio-finance-page {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.leadio-finance-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.leadio-finance-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.leadio-finance-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.leadio-finance-card .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.leadio-finance-card.overdue .value {
    color: var(--error);
}

.leadio-finance-card.revenue .value {
    color: var(--success);
}

.leadio-finance-filters-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.leadio-finance-filters-bar select,
.leadio-finance-filters-bar input {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.leadio-finance-filters-bar select:focus,
.leadio-finance-filters-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.leadio-finance-table-wrap {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.leadio-finance-table {
    width: 100%;
    border-collapse: collapse;
}

.leadio-finance-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.leadio-finance-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.leadio-finance-table tr:last-child td {
    border-bottom: none;
}

.leadio-finance-table tr:hover td {
    background: var(--bg-secondary);
    cursor: pointer;
}

.leadio-finance-table tr.overdue td {
    background: rgba(239, 68, 68, 0.04);
}

.leadio-finance-table tr.paid td {
    background: rgba(16, 185, 129, 0.04);
}

.leadio-finance-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.leadio-finance-pagination button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
}

.leadio-finance-pagination button:hover {
    background: var(--bg-secondary);
}

.leadio-finance-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.leadio-finance-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Finance nav button in header */
.leadio-finance-nav-btn.active {
    color: var(--accent);
    background: var(--accent-light);
}

/* Responsive */
@media (max-width: 768px) {
    .leadio-finance-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .leadio-finance-card:last-child {
        grid-column: span 2;
    }

    .leadio-finance-filters-bar {
        flex-direction: column;
    }

    .leadio-finance-filters-bar select,
    .leadio-finance-filters-bar input {
        width: 100%;
    }

    .leadio-finance-table-wrap {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .leadio-payment-summary {
        gap: 4px;
    }

    .leadio-payment-summary-item {
        min-width: 60px;
        padding: 6px 4px;
    }

    .leadio-payment-summary-item .value {
        font-size: 13px;
    }
}

/* ============================================
   STAGE SUMMARY BAR
   ============================================ */
.leadio-stage-summary {
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    margin: 16px;
    margin-bottom: 0;
}

.leadio-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.leadio-summary-stage {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.leadio-summary-count {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 20px;
}

.leadio-summary-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.leadio-summary-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leadio-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.leadio-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Summary on desktop */
@media (min-width: 992px) {
    .leadio-stage-summary {
        margin: 0 0 20px 0;
    }

    .leadio-summary-stats {
        gap: 40px;
    }

    .leadio-summary-value {
        font-size: 24px;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.leadio-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.leadio-empty svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.leadio-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.leadio-empty-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================
   LOADING SKELETON
   ============================================ */
.leadio-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton container - prevent overflow */
#leadio-skeleton {
    overflow: hidden;
}

/* Skeleton Card - matches real card exactly */
.leadio-skeleton-card {
    pointer-events: none;
    cursor: default;
}

.leadio-skeleton-card:hover,
.leadio-skeleton-card:active {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

/* Skeleton elements with exact dimensions */
.leadio-skeleton-name {
    height: 24px; /* 16px font * 1.5 line-height */
    width: 140px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.leadio-skeleton-company {
    height: 21px; /* 14px font * 1.5 line-height */
    width: 180px;
    border-radius: 4px;
}

/* Hide 4th skeleton on mobile */
.leadio-skeleton-card:nth-child(4) {
    display: none;
}

@media (min-width: 992px) {
    .leadio-skeleton-card:nth-child(4) {
        display: block;
    }
}

.leadio-skeleton-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.leadio-skeleton-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.leadio-skeleton-date {
    width: 70px;
    height: 16px;
    border-radius: 3px;
}

.leadio-skeleton-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    margin-left: 6px;
}

.leadio-skeleton-time {
    width: 45px;
    height: 14px;
    border-radius: 3px;
}

.leadio-skeleton-tag {
    width: 70px;
    height: 26px;
    border-radius: 20px;
}

.leadio-skeleton-stage {
    width: 70px;
    height: 26px;
    border-radius: 20px;
    margin-left: auto;
}

/* Hide extra skeleton timezones on desktop */
@media (min-width: 992px) {
    .leadio-skeleton-tz-extra {
        display: none;
    }
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.leadio-page-login .leadio-main {
    padding-top: 56px; /* Header height */
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
}

.leadio-login-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.leadio-login-box {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.leadio-login-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

/* ============================================
   FORMS
   ============================================ */
.leadio-form-group {
    margin-bottom: 20px;
}

.leadio-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.leadio-form-group input,
.leadio-form-group select,
.leadio-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.leadio-form-group input:focus,
.leadio-form-group select:focus,
.leadio-form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.leadio-form-group input::placeholder,
.leadio-form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Password field with toggle */
.leadio-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.leadio-password-wrapper input {
    width: 100%;
    padding-right: 48px;
}

.leadio-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.leadio-password-toggle:hover {
    color: var(--text-primary);
}

.leadio-password-toggle svg {
    width: 20px;
    height: 20px;
}

.leadio-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Checkbox */
.leadio-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.leadio-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* Link */
.leadio-form-link {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

.leadio-form-link:active {
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.leadio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.leadio-btn-primary {
    width: 100%;
    background: var(--accent);
    color: var(--text-inverse);
}

.leadio-btn-primary:active {
    background: var(--accent-hover);
    transform: scale(0.98);
}

.leadio-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.leadio-btn-secondary:active {
    background: var(--bg-tertiary);
}

.leadio-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.leadio-btn-icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   ALERTS
   ============================================ */
.leadio-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}

.leadio-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.leadio-alert-error {
    background: var(--error-bg);
    color: var(--error);
}

.leadio-alert-success {
    background: var(--success-bg);
    color: var(--success);
}

.leadio-alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

/* ============================================
   DETAIL VIEW (Lead Detail)
   ============================================ */
.leadio-detail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    background: var(--bg-body);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.leadio-detail.active {
    transform: translateX(0);
}

.leadio-detail-header {
    flex-shrink: 0;
    z-index: 10;
    background: var(--bg-primary);
    padding: 0 8px;
    padding-top: env(safe-area-inset-top);
    box-shadow: var(--shadow-header);
    overflow: visible;
}

.leadio-detail-header-inner {
    display: flex;
    align-items: center;
    height: 56px;
    overflow: visible;
}

.leadio-detail-content {
    flex: 1;
    padding: 12px 16px;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.leadio-detail-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.leadio-card-header {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.leadio-card-inline {
    padding: 0;
}

.leadio-card-inline .leadio-detail-row {
    border-bottom: none;
    padding: 12px 16px;
}

.leadio-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
}

.leadio-detail-row:first-child {
    padding-top: 16px;
}

.leadio-card-header + .leadio-detail-row {
    padding-top: 12px;
}

.leadio-detail-row svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.leadio-detail-row svg.leadio-edit-icon {
    width: 24px;
    height: 24px;
    margin-top: 0;
}

.leadio-detail-row-content {
    flex: 1;
    min-width: 0;
}

.leadio-detail-row-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.leadio-detail-row-value {
    font-size: 15px;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

.leadio-detail-row-value a {
    color: var(--accent);
    text-decoration: none;
}

/* Scrollable text sections (summary, transcription) */
.leadio-scrollable-value {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.leadio-scrollable-value::-webkit-scrollbar {
    width: 5px;
}

.leadio-scrollable-value::-webkit-scrollbar-track {
    background: transparent;
}

.leadio-scrollable-value::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Markdown rendered content in call summary */
.leadio-md-content {
    white-space: normal;
}

.leadio-md-content h3.leadio-md-h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.leadio-md-content h3.leadio-md-h2:first-child {
    margin-top: 0;
}

.leadio-md-content h4.leadio-md-h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 12px 0 6px 0;
}

.leadio-md-content ul {
    margin: 4px 0 8px 0;
    padding-left: 20px;
    list-style: disc;
}

.leadio-md-content li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.leadio-md-content a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.leadio-md-content a:hover {
    text-decoration: underline;
}

/* Timezone list in detail panel */
.leadio-timezone-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.leadio-timezone-list .leadio-tz-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.leadio-timezone-list .leadio-tz-flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.leadio-timezone-list .leadio-tz-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 0;
}

/* Contact section 3-column grid on desktop */
@media (min-width: 992px) {
    .leadio-detail-card[data-section="contact"] .leadio-collapsible-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Collapsible Sections */
.leadio-collapsible .leadio-card-header {
    cursor: pointer;
    user-select: none;
}

.leadio-collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.leadio-collapse-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.leadio-collapsible.collapsed .leadio-collapse-icon {
    transform: rotate(-90deg);
}

.leadio-collapsible.collapsed .leadio-card-header {
    border-bottom: none;
}

.leadio-collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.leadio-collapsible.expanded .leadio-collapsible-content {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
}

.leadio-collapsible.collapsed .leadio-collapsible-content {
    max-height: 0;
    opacity: 0;
}

/* Editable Rows */
.leadio-editable-row {
    position: relative;
    transition: background 0.15s ease;
}

.leadio-editable-row:hover {
    /* Pencil icon visibility is enough */
}

.leadio-edit-icon {
    padding: 6px;
    color: var(--text-secondary);
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 8px;
    box-sizing: content-box;
}

/* Desktop: show on hover */
@media (hover: hover) {
    .leadio-editable-row:hover .leadio-edit-icon {
        opacity: 0.6;
    }

    .leadio-edit-icon:hover {
        color: var(--primary, #3b82f6);
        background: var(--bg-hover, rgba(59, 130, 246, 0.1));
        opacity: 1;
    }
}

/* Mobile/touch: show on tap */
@media (hover: none) {
    .leadio-edit-icon {
        margin-top: 5px;
    }

    .leadio-editable-row:active .leadio-edit-icon,
    .leadio-editable-row:focus-within .leadio-edit-icon {
        opacity: 0.6;
    }

    .leadio-edit-icon:active {
        color: var(--primary, #3b82f6);
        opacity: 1;
    }
}

.leadio-editable-row.editing {
    /* Editing state */
}

.leadio-editable-row.editing .leadio-edit-icon {
    display: none;
}

.leadio-empty-value {
    color: var(--text-muted);
    font-style: italic;
}

.leadio-saving {
    color: var(--text-muted);
    font-style: italic;
}

.leadio-save-error {
    color: var(--danger, #ef4444);
    font-style: italic;
}

.leadio-editable-row.save-error {
    background: rgba(239, 68, 68, 0.1);
}

/* Edit Input Wrapper */
.leadio-edit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leadio-edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.leadio-edit-input:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.leadio-edit-input {
    min-height: 80px;
    resize: vertical;
}

@media (max-width: 767px) {
    textarea.leadio-edit-input {
        max-height: 80vh;
        overflow-y: auto;
    }
}

select.leadio-edit-input {
    cursor: pointer;
}

.leadio-edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.leadio-edit-confirm,
.leadio-edit-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
}

.leadio-edit-confirm {
    background: var(--success, #22c55e);
    color: white;
}

.leadio-edit-confirm:hover {
    background: #16a34a;
}

.leadio-edit-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.leadio-edit-cancel:hover {
    background: var(--bg-active);
}

.leadio-edit-confirm svg,
.leadio-edit-cancel svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
    margin-top: 0;
}

.leadio-detail-row .leadio-edit-confirm svg {
    color: white !important;
}

/* Floating Save Dialog */
.leadio-save-dialog {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.leadio-save-dialog.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.leadio-save-dialog-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.leadio-save-dialog.success .leadio-save-dialog-content {
    animation: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px 4px rgba(34, 197, 94, 0.5);
    border-color: var(--success, #22c55e);
}

.leadio-save-dialog.error .leadio-save-dialog-content {
    animation: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px 4px rgba(239, 68, 68, 0.5);
    border-color: var(--danger, #ef4444);
}

.leadio-save-dialog-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.leadio-save-dialog.success .leadio-save-dialog-text {
    color: var(--success, #22c55e);
}

.leadio-save-dialog.error .leadio-save-dialog-text {
    color: var(--danger, #ef4444);
}

.leadio-save-dialog-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leadio-save-dialog-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.leadio-save-dialog-btn.save {
    background: var(--success, #22c55e);
    color: white;
}

.leadio-save-dialog-btn.save:hover:not(:disabled) {
    background: #16a34a;
}

.leadio-save-dialog-btn.save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.leadio-save-dialog-btn.discard {
    width: 36px;
    padding: 0;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.leadio-save-dialog-btn.discard:hover {
    background: var(--danger, #ef4444);
    color: white;
}

.leadio-save-dialog-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile positioning */
@media (max-width: 767px) {
    .leadio-save-dialog {
        bottom: calc(80px + env(safe-area-inset-bottom));
        right: 16px;
        left: 16px;
    }

    .leadio-save-dialog-content {
        justify-content: space-between;
    }
}

/* Save Bar */
.leadio-save-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.leadio-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leadio-save-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.leadio-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.leadio-save-btn svg {
    width: 18px;
    height: 18px;
}

/* Spin animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Feasibility Conditional Fields */
.leadio-feasible-no-fields,
.leadio-feasible-yes-fields {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 4px;
}

.leadio-feasible-no-fields .leadio-detail-row:first-child,
.leadio-feasible-yes-fields .leadio-detail-row:first-child {
    padding-top: 12px;
}

/* Attachments Section */
.leadio-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
}

.leadio-empty-attachments {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    padding: 8px 0;
}

.leadio-attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    transition: background 0.15s ease;
}

.leadio-attachment-item:hover {
    background: var(--bg-hover);
}

.leadio-attachment-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    min-width: 0;
}

.leadio-attachment-link:hover {
    text-decoration: underline;
}

.leadio-attachment-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.leadio-attachment-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leadio-attachment-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.leadio-attachment-remove:hover {
    background: var(--danger);
    color: white;
}

.leadio-attachment-remove svg {
    width: 14px;
    height: 14px;
}

/* Attachment Add Form */
.leadio-attachment-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

@media (min-width: 480px) {
    .leadio-attachment-add {
        flex-direction: row;
        align-items: center;
    }
}

.leadio-attachment-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.leadio-attachment-input:focus {
    outline: none;
    border-color: var(--accent);
}

.leadio-attachment-input::placeholder {
    color: var(--text-muted);
}

.leadio-attachment-url {
    flex: 2;
}

.leadio-attachment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.leadio-attachment-btn:hover {
    background: var(--accent-hover);
}

.leadio-attachment-btn svg {
    width: 16px;
    height: 16px;
}

/* Modal Attachment Form (inline in modals) */
.leadio-modal-attachment-add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.leadio-modal-attachment-add .leadio-attachment-input {
    flex: 1;
}

.leadio-modal-attachment-add .leadio-attachment-url {
    flex: 2;
}

/* Attachment icon beside payment/expense items */
.leadio-payment-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: var(--accent-light, rgba(59, 130, 246, 0.1));
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.leadio-payment-attachment-link:hover {
    background: var(--accent-light, rgba(59, 130, 246, 0.2));
}

.leadio-payment-attachment-link svg {
    width: 12px;
    height: 12px;
}

/* Move Stage Buttons */
.leadio-move-next-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.leadio-move-next-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.leadio-move-next-btn:active {
    transform: translateY(0);
}

.leadio-move-next-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile: Compact move button */
@media (max-width: 480px) {
    .leadio-move-next-btn {
        padding: 6px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .leadio-move-next-btn svg {
        width: 14px;
        height: 14px;
    }

    .leadio-header-btn {
        width: 32px;
        height: 32px;
    }

    .leadio-header-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Move Dropdown Wrapper */
.leadio-move-dropdown-wrapper {
    position: relative;
}

.leadio-move-dropdown-wrapper .leadio-header-btn.active {
    background: var(--bg-active);
}

/* Move Dropdown */
.leadio-move-dropdown {
    position: fixed;
    min-width: 180px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    overflow: hidden;

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-8px);
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.leadio-move-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Move Option */
.leadio-move-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.leadio-move-option:last-child {
    border-bottom: none;
}

.leadio-move-option:hover {
    background: var(--bg-hover);
}

.leadio-move-option:active {
    background: var(--bg-active);
}

.leadio-move-option svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */
.leadio-fab {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), background var(--transition);
}

.leadio-fab:active {
    transform: scale(0.95);
    background: var(--accent-hover);
}

.leadio-fab svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   UTILITIES
   ============================================ */
.leadio-hidden {
    display: none !important;
}

.leadio-text-center {
    text-align: center;
}

.leadio-text-muted {
    color: var(--text-muted);
}

.leadio-mt-auto {
    margin-top: auto;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.leadio-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.leadio-slide-up {
    animation: slideUp 0.3s ease;
}

/* ============================================
   DESKTOP ELEMENTS - Hidden on mobile by default
   ============================================ */
.leadio-top-nav {
    display: none;
}

/* Detail panel (side) - always hidden, we use slide-in on all devices */
.leadio-detail-panel {
    display: none !important;
}

/* ============================================
   TABLE VIEW (Desktop)
   ============================================ */
.leadio-view-toggle {
    display: none;
}

.leadio-table {
    display: none;
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.leadio-table-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 100px;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.leadio-table-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr 100px;
    gap: 16px;
    padding: 14px 16px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}

.leadio-table-row:last-child {
    border-bottom: none;
}

.leadio-table-row:hover {
    background: var(--bg-hover);
}

.leadio-table-row.active {
    background: var(--accent-light);
    border-color: var(--accent);
}

.leadio-table-row.active:hover {
    background: var(--accent-light);
}

.leadio-table-cell {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-table-cell-muted {
    color: var(--text-secondary);
    font-size: 13px;
}

.leadio-table-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leadio-table-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.leadio-table-info {
    min-width: 0;
}

.leadio-table-info-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-table-info-company {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   DESKTOP LAYOUT (992px+)
   ============================================ */
@media (min-width: 992px) {
    /* Hide mobile bottom nav */
    .leadio-bottom-nav {
        display: none;
    }

    /* Hide mobile more menu */
    .leadio-more-menu {
        display: none !important;
    }

    /* Adjust main padding */
    .leadio-main {
        padding-top: 130px; /* Header + Top Nav */
        padding-bottom: 24px;
    }

    /* Desktop Header */
    .leadio-header {
        box-shadow: none;
        border-bottom: 1px solid var(--border);
    }

    .leadio-header-inner {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
    }

    .leadio-header-title {
        text-align: left;
        flex: none;
        margin-right: auto;
    }

    /* Desktop Top Navigation */
    .leadio-top-nav {
        display: flex !important;
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        z-index: 99;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        height: 56px;
    }

    .leadio-top-nav-inner {
        display: flex;
        align-items: center;
        gap: 4px;
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
        width: 100%;
        height: 100%;
    }

    /* Search bar in content area */
    .leadio-desktop-layout .leadio-search-bar {
        display: block;
        padding: 0;
        margin: 0 0 20px 0;
    }

    .leadio-top-nav-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: transparent;
        border: none;
        border-radius: var(--radius);
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all var(--transition);
        position: relative;
        height: 40px;
        white-space: nowrap;
    }

    .leadio-top-nav-item:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    .leadio-top-nav-item.active {
        background: var(--accent-light);
        color: var(--accent);
    }

    .leadio-top-nav-item svg {
        width: 18px;
        height: 18px;
    }

    .leadio-top-nav-item .leadio-nav-badge {
        position: static;
        transform: none;
        margin-left: 4px;
    }

    .leadio-top-nav-spacer {
        flex: 1;
    }

    /* View Toggle */
    .leadio-view-toggle {
        display: flex;
        align-items: center;
        gap: 4px;
        background: var(--bg-secondary);
        padding: 4px;
        border-radius: var(--radius);
    }

    .leadio-view-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 32px;
        background: transparent;
        border: none;
        border-radius: var(--radius-sm);
        color: var(--text-muted);
        cursor: pointer;
        transition: all var(--transition);
    }

    .leadio-view-btn:hover {
        color: var(--text-primary);
    }

    .leadio-view-btn.active {
        background: var(--bg-primary);
        color: var(--accent);
        box-shadow: var(--shadow-sm);
    }

    .leadio-view-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Single Column Layout */
    .leadio-desktop-layout {
        display: block;
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
    }

    /* Lead List Panel */
    .leadio-list-panel {
        min-width: 0;
    }

    .leadio-leads-list {
        padding: 0;
        gap: 16px;
    }

    .leadio-lead-card {
        transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    }

    .leadio-lead-card:hover {
        border-color: var(--border-hover);
        box-shadow: var(--shadow);
    }

    .leadio-lead-card.active {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
    }

    /* Table View */
    .leadio-app[data-view="table"] .leadio-leads-list {
        display: none;
    }

    .leadio-app[data-view="table"] .leadio-table {
        display: block;
    }

    /* User dropdown positioning - align with content area */
    .leadio-dropdown {
        right: 40px;
    }

    /* Login page desktop - wider form */
    .leadio-page-login .leadio-login-container {
        max-width: 480px;
        padding: 48px;
    }

    .leadio-page-login .leadio-login-box {
        padding: 32px 40px;
    }
}

/* ============================================
   LARGE DESKTOP (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .leadio-table-header,
    .leadio-table-row {
        grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 120px;
    }

    /* Keep dropdown within centered content area */
    .leadio-dropdown {
        right: calc((100vw - 1400px) / 2 + 40px);
    }
}

/* ============================================
   TABLET ONLY (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .leadio-main {
        max-width: 700px;
        margin: 0 auto;
    }

    .leadio-bottom-nav {
        max-width: 700px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .leadio-leads-list {
        padding: 20px;
        gap: 16px;
    }

    .leadio-lead-card {
        padding: 18px;
    }
}

/* ============================================
   MOBILE ADJUSTMENTS (below 992px)
   ============================================ */
@media (max-width: 991px) {
    .leadio-list-panel {
        display: block;
    }

    .leadio-content {
        padding: 0;
    }
}

/* ============================================
   KANBAN BOARD
   ============================================ */
.leadio-kanban {
    display: none;
    flex-direction: column;
    padding: 0;
}

.leadio-kanban-columns {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 16px 16px;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.leadio-kanban-columns.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.leadio-kanban-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.leadio-kanban-column {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    height: 100%;
    overflow: hidden;
}

.leadio-kanban-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.leadio-kanban-column-header svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leadio-kanban-column-header[data-stage="incoming"] svg { color: var(--stage-incoming); }
.leadio-kanban-column-header[data-stage="discovery"] svg { color: var(--stage-discovery); }
.leadio-kanban-column-header[data-stage="analysis"] svg { color: var(--stage-analysis); }
.leadio-kanban-column-header[data-stage="follow_up"] svg { color: var(--stage-followup); }
.leadio-kanban-column-header[data-stage="quote"] svg { color: var(--stage-quote); }
.leadio-kanban-column-header[data-stage="negotiation"] svg { color: var(--stage-negotiation); }
.leadio-kanban-column-header[data-stage="closed"] svg { color: var(--success); }
.leadio-kanban-column-header[data-stage="active"] svg { color: #f59e0b; }
.leadio-kanban-column-header[data-stage="archived"] svg { color: var(--stage-archived); }

.leadio-kanban-column-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.leadio-kanban-column-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    margin-left: auto;
}

.leadio-kanban-column-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.leadio-kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
    transition: border-color 0.15s ease, background 0.15s ease;
    border: 2px solid transparent;
    border-radius: 0 0 var(--radius) var(--radius);
}

.leadio-kanban-cards.drag-over {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
    border-style: dashed;
}

.leadio-kanban-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
}

.leadio-kanban-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    user-select: none;
}

.leadio-kanban-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.leadio-kanban-card.dragging {
    opacity: 0.5;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

.leadio-kanban-card-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.leadio-kanban-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.leadio-kanban-card-info {
    flex: 1;
    min-width: 0;
}

.leadio-kanban-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-kanban-card-company {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leadio-kanban-card-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.leadio-kanban-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.leadio-kanban-card-owner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.leadio-kanban-card-owner svg {
    width: 12px;
    height: 12px;
}

.leadio-kanban-card-value {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    margin-left: auto;
}

/* ============================================
   KANBAN VIEW TOGGLE (Desktop only)
   ============================================ */

/* Hide kanban button on mobile */
.leadio-view-btn[data-view="kanban"] {
    display: none;
}

@media (min-width: 992px) {
    .leadio-view-btn[data-view="kanban"] {
        display: flex;
    }
}

/* When kanban view is active */
body[data-view="kanban"] .leadio-leads-list,
body[data-view="kanban"] #leadio-app,
body[data-view="kanban"] .leadio-search-bar,
body[data-view="kanban"] .leadio-stage-summary,
body[data-view="kanban"] .leadio-table {
    display: none !important;
}

body[data-view="kanban"] .leadio-kanban {
    display: flex !important;
    height: calc(100vh - 60px);
}

body[data-view="kanban"] .leadio-top-nav {
    display: none !important;
}

body[data-view="kanban"] .leadio-main {
    padding-top: 56px;
    padding-bottom: 0;
}

body[data-view="kanban"] .leadio-content {
    max-width: 100%;
    padding: 0;
}

/* ============================================
   ADD LEAD MODAL
   ============================================ */
.leadio-add-lead-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leadio-add-lead-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.leadio-add-lead-panel {
    position: relative;
    background: var(--bg-primary);
    border-radius: 12px;
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.leadio-add-lead-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.leadio-add-lead-header h2,
.leadio-add-lead-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.leadio-add-lead-body {
    padding: 8px 24px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.leadio-form-section {
    padding: 16px 0 0;
}

.leadio-form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.leadio-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.leadio-form-field {
    flex: 1;
    min-width: 0;
}

.leadio-form-field.full {
    flex-basis: 100%;
}

.leadio-form-field input,
.leadio-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.leadio-form-field input[type="number"]::-webkit-inner-spin-button,
.leadio-form-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.leadio-form-field input[type="number"] {
    -moz-appearance: textfield;
}

.leadio-form-field input:focus,
.leadio-form-field textarea:focus {
    border-color: var(--accent);
}

/* Custom select dropdown */
.leadio-custom-select {
    position: relative;
}

.leadio-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    user-select: none;
}

.leadio-custom-select-trigger:hover {
    border-color: var(--text-muted);
}

.leadio-custom-select.open .leadio-custom-select-trigger {
    border-color: var(--accent);
}

.leadio-custom-select-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leadio-custom-select-text.muted {
    color: var(--text-muted);
}

.leadio-custom-select-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.leadio-custom-select.open .leadio-custom-select-chevron {
    transform: rotate(180deg);
}

.leadio-custom-select-menu {
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    max-height: 200px;
    overflow-y: auto;
}

.leadio-custom-select.open .leadio-custom-select-menu {
    opacity: 1;
    pointer-events: auto;
}

.leadio-custom-select-option {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.1s ease;
}

.leadio-custom-select-option:first-child {
    border-radius: 8px 8px 0 0;
}

.leadio-custom-select-option:last-child {
    border-radius: 0 0 8px 8px;
}

.leadio-custom-select-option:hover {
    background: var(--bg-secondary);
}

.leadio-custom-select-option.selected {
    background: var(--accent-light);
    color: var(--accent);
}

.leadio-form-field input::placeholder,
.leadio-form-field textarea::placeholder {
    color: var(--text-muted);
}

.leadio-form-field input.leadio-field-error,
.leadio-form-field textarea.leadio-field-error {
    border-color: var(--danger, #ef4444);
}

.leadio-form-field textarea {
    resize: vertical;
    min-height: 60px;
}

.leadio-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Toggle switch for form */
.leadio-form-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    user-select: none;
}

.leadio-form-toggle input {
    display: none;
}

.leadio-form-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border);
    border-radius: 11px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.leadio-form-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.leadio-form-toggle input:checked + .leadio-form-toggle-slider {
    background: var(--accent);
}

.leadio-form-toggle input:checked + .leadio-form-toggle-slider::after {
    transform: translateX(18px);
}

.leadio-form-toggle-label {
    font-weight: 500;
}

.leadio-add-lead-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.leadio-add-lead-cancel {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.leadio-add-lead-cancel:hover {
    background: var(--bg-active);
}

.leadio-add-lead-save {
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.leadio-add-lead-save:hover {
    opacity: 0.9;
}

.leadio-add-lead-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.leadio-add-lead-save {
    min-width: 80px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.leadio-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: leadioSpin 0.6s linear infinite;
}

@keyframes leadioSpin {
    to { transform: rotate(360deg); }
}

.leadio-add-lead-btn {
    background: var(--accent) !important;
    color: #fff !important;
}

.leadio-add-lead-btn svg {
    color: #fff;
}

/* Kanban top bar with back button */
.leadio-kanban-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 17px;
    flex-shrink: 0;
}

/* Kanban search */
.leadio-kanban-search {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    flex: 1;
    max-width: 320px;
    transition: border-color 0.15s ease;
}

.leadio-kanban-search:focus-within {
    border-color: var(--accent);
}

.leadio-kanban-search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leadio-kanban-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 10px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.leadio-kanban-search-input::placeholder {
    color: var(--text-muted);
}

.leadio-kanban-search-clear {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.leadio-kanban-search-clear:hover {
    color: var(--text-primary);
}

.leadio-kanban-search-clear svg {
    width: 14px;
    height: 14px;
}

.leadio-kanban-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.leadio-kanban-back-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.leadio-kanban-back-btn i,
.leadio-kanban-back-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.leadio-scroll-top {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.15s ease;
    z-index: 90;
}

.leadio-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.leadio-scroll-top:hover {
    background: var(--bg-hover);
}

.leadio-scroll-top:active {
    transform: scale(0.95);
}

.leadio-scroll-top svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* Mobile positioning - above bottom nav */
@media (max-width: 767px) {
    .leadio-scroll-top {
        bottom: calc(72px + env(safe-area-inset-bottom));
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .leadio-scroll-top svg {
        width: 18px;
        height: 18px;
    }
}
