:root {
    --primary: #2563eb;
    --bg: #f8fafc;
    --text: #1e293b;
    --border: #e2e8f0;
    --white: #ffffff;
    --new: #3b82f6;
    --in-progress: #f59e0b;
    --scheduled: #8b5cf6;
    --converted: #10b981;
    --lost: #64748b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); }
.hidden { display: none !important; }

/* Auth */
.auth-wrapper { height: 100vh; display: flex; align-items: center; justify-content: center; background: #eef2f6; }
.auth-card { background: var(--white); padding: 2rem; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; }
.auth-card input { width: 100%; padding: 0.8rem; margin: 0.5rem 0; border: 1px solid var(--border); border-radius: 6px; }

/* Layout */
.topbar { background: var(--white); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); sticky; top: 0; z-index: 100; }
.topbar-actions { display: flex; align-items: center; }
.content { padding: 2rem; max-width: 1200px; margin: 0 auto; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: 10px; border-left: 4px solid var(--border); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.stat-card[data-status="new"] { border-left-color: var(--new); }
.stat-card[data-status="in_progress"] { border-left-color: var(--in-progress); }
.stat-card[data-status="scheduled"] { border-left-color: var(--scheduled); }
.stat-card[data-status="converted"] { border-left-color: var(--converted); }
.stat-card[data-status="lost"] { border-left-color: var(--lost); }

/* Filters */
.filters { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.filters input, .filters select { padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; }
.filters input { flex: 1; }

/* Table & Inputs */
.table-responsive { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; border-bottom: 1px solid var(--border); text-align: left; }
th { background: #f1f5f9; font-size: 0.75rem; text-transform: uppercase; color: #64748b; }

.input-obs { border: 1px solid transparent; background: #f1f5f9; padding: 4px 8px; border-radius: 4px; font-size: 0.85rem; width: 140px; transition: 0.2s; }
.input-obs:focus { outline: none; border-color: var(--primary); background: white; width: 180px; }

/* Badges */
.badge { padding: 4px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; color: white; white-space: nowrap; }
.badge-new { background: var(--new); }
.badge-in_progress { background: var(--in-progress); }
.badge-scheduled { background: var(--scheduled); }
.badge-converted { background: var(--converted); }
.badge-lost { background: var(--lost); }

/* Buttons */
.btn-primary { background: var(--primary); color: white; border: none; padding: 0.8rem; border-radius: 6px; cursor: pointer; }
.btn-outline { border: 1px solid var(--border); background: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }
.btn-whatsapp { background: #25d366; color: white; text-decoration: none; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; padding: 2rem; border-radius: 12px; width: 90%; max-width: 400px; }
.modal-content input, .modal-content textarea { width: 100%; padding: 0.8rem; margin: 0.5rem 0; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
.modal-buttons { display: flex; gap: 10px; margin-top: 1rem; }

/* Mobile */
.mobile-only { display: none; }
@media (max-width: 768px) {
    .table-responsive { display: none; }
    .mobile-only { display: block; }
    .lead-card-mobile { background: white; padding: 1rem; margin-bottom: 1rem; border-radius: 8px; border: 1px solid var(--border); }
}
.demo-footer { text-align: center; padding: 2rem; color: #94a3b8; font-size: 0.8rem; }

/* ... (mantenha o restante do CSS anterior e substitua/adicione as regras abaixo) ... */

@media (max-width: 768px) {
    .content { padding: 1rem; }
    
    .table-responsive { display: none; }
    .mobile-only { display: block; }

    .filters { flex-direction: column; gap: 0.8rem; }
    
    .lead-card-mobile { 
        background: var(--white); 
        padding: 1.25rem; 
        margin-bottom: 1.25rem; 
        border-radius: 12px; 
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .card-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .card-header-mobile h4 {
        font-size: 1.1rem;
        color: var(--text);
        font-weight: 700;
    }

    .card-body-mobile {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #64748b;
    }

    .card-body-mobile p {
        margin-bottom: 0.4rem;
        display: flex;
        justify-content: space-between;
    }

    .card-body-mobile strong {
        color: var(--text);
    }

    /* Input de nota no mobile ocupando 100% */
    .lead-card-mobile .input-obs {
        width: 100% !important;
        margin: 0.5rem 0;
        background: #f8fafc;
        border: 1px solid var(--border);
    }

    /* Ações empilhadas no mobile */
    .card-actions-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 0.5rem;
    }

    .card-actions-mobile .btn-whatsapp {
        text-align: center;
        padding: 12px;
        font-size: 0.9rem;
        grid-column: span 2; /* WhatsApp ganha destaque total */
    }

    .card-actions-mobile select {
        padding: 10px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: #f8fafc;
        font-size: 0.85rem;
        grid-column: span 2;
    }
}