:root {
    /* ── Paleta Oficial 6.6 ── */
    --primary: #5D45FB;
    --primary-light: #F1F0FF;
    --primary-dark: #4835e0;
    --primary-rgb: 93, 69, 251;
    --primary-shadow: rgba(93, 69, 251, 0.25);

    --accent: #00D1FF;

    /* Superfícies */
    --bg-main: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;

    /* Texto */
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --text-light: #FFFFFF;
    --text-placeholder: #94A3B8;

    /* Semânticas */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Bordas */
    --border-color: #F1F3F4;
    --border-light: rgba(0, 0, 0, 0.05);
    --border-medium: #E2E8F0;

    /* Sombras */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 30px rgba(93, 69, 251, 0.12);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);

    /* Raios */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Vidro */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);

    /* Tipografia */
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Legado (mantido para compatibilidade) */
    --neutral-light: #F1F5F9;
}

[data-theme="dark"] {
    --bg-main: #0B1120;
    --bg-card: #151C2C;
    --bg-sidebar: #151C2C;

    --text-dark: #F1F5F9;
    --text-muted: #94A3B8;
    --text-light: #FFFFFF;

    --border-color: #1E293B;
    --border-light: rgba(255, 255, 255, 0.06);
    --border-medium: #334155;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);

    --primary-light: rgba(93, 69, 251, 0.15);
    --neutral-light: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ================== Topbar Flutuante ================== */
.topbar {
    min-height: 80px;
    height: auto;
    background-color: var(--bg-main);
    /* Fundo igual ao corpo para parecer solto */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 240px;
}

.brand i {
    color: var(--primary);
    background: var(--primary-light);
    padding: 10px;
    border-radius: 12px;
}

.brand-text {
    font-size: 1.4rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

/* ==========================================================================
   WhatsApp Conexões (Multi-Session Grid) (Item 2.9)
   ========================================================================== */
.whatsapp-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.session-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.session-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.session-header {
    border-bottom: 1px solid var(--border-light);
}

.session-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

#wp-qrcode-box {
    background: #ffffff !important;
    animation: qrPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes qrPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(39, 174, 96, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

/* Tipografia de Cores */
.text-primary {
    color: var(--primary);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-info {
    color: var(--info);
}

.text-success {
    color: var(--success);
}

.text-purple {
    color: #8b5cf6;
    /* Cor roxa moderna */
}

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

/* Search Premium */
.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
    margin: 0 2rem;
}

.search-bar i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 14px 18px 14px 45px;
    border-radius: 100px;
    /* Pílula perfeita */
    border: 1px solid transparent;
    background-color: var(--bg-card);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-soft);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(88, 86, 214, 0.1);
    background-color: #ffffff;
}

/* Data no Topo */
.topbar-date {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 8px 16px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    margin-right: auto;
    white-space: nowrap;
    /* Não quebrar a data */
}

/* Ações Header */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: #fff;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    border: 2px solid var(--bg-main);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
    padding: 0 2px;
}

.chat-header {
    background: var(--bg-card);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 8px 16px 8px 8px;
    border-radius: 100px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: 0.3s;
}

.user-profile:hover {
    box-shadow: var(--shadow-hover);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #8a2be2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ================== Layout Central ================== */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ================== Sidebar Flutuante ================== */
.sidebar {
    width: 260px;
    background-color: transparent;
    /* Apenas uma área de navegação */
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem 2rem 2rem;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    /* nunca barra horizontal */
    overflow-y: auto;
    /* scroll vertical quando precisar */
    flex-shrink: 0;
    scrollbar-width: thin;
    /* Firefox — scrollbar fina */
    scrollbar-color: var(--border-color) transparent;
}

/* Scrollbar slim para Webkit (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

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

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

/* ====== Estado: Sidebar Recolhida ====== */
.sidebar--collapsed {
    width: 72px;
    padding: 1rem 0.75rem 2rem 0.75rem;
}

/* Esconde os textos dos itens de nav quando recolhida */
.sidebar--collapsed .nav-item span,
.sidebar--collapsed .nav-title,
.sidebar--collapsed .sidebar-footer,
.sidebar--collapsed .user-info {
    display: none;
}

/* Deixa os itens centralizados sem texto */
.sidebar--collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    position: relative;
}

/* Tooltip ao hover nos itens recolhidos */
.sidebar--collapsed .nav-item .nav-tooltip {
    display: none;
    /* o span de tooltip é injetado via JS */
}

/* ícone da barra recolhida na hero area */
.sidebar-toggle-btn {
    color: var(--text-muted);
    flex-shrink: 0;
}

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


.nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mt-4 {
    margin-top: 2.5rem;
}

.nav-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    padding-left: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-item i {
    font-size: 1.25rem;
    transition: 0.3s;
}

.nav-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(88, 86, 214, 0.3);
}

.nav-item.active i {
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--text-dark);
    /* Estilo SaaS Black Button */
    color: white;
}

.btn-primary:hover {
    background-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* ================== Conteúdo Principal ================== */
.main-content {
    flex: 1;
    padding: 1rem 2.5rem 2.5rem 1rem;
    overflow-y: auto;
}

.page-view {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ================== Dashboard Skeletons (Saudação & KPIs) ================== */
.greeting-header {
    margin-bottom: 2rem;
}

.greeting-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.greeting-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

.kpi-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #8a2be2 100%);
    color: white !important;
}

.bg-primary-gradient * {
    color: white !important;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.kpi-header i {
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px;
    border-radius: 50%;
}

.bg-primary-gradient .kpi-header i {
    background: rgba(255, 255, 255, 0.2);
}

.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 10px 0;
}

.kpi-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.bg-primary-gradient .badge-success {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Filtros Estilo Pílula Premium */
.status-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 10px 20px;
    background: var(--bg-card);
    border: none;
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--text-dark);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.filter-pill.active .dot {
    opacity: 0.8;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bg-primary {
    background-color: var(--primary);
}

.bg-success {
    background-color: var(--success);
}

.bg-info {
    background-color: var(--info);
}

.bg-warning {
    background-color: var(--warning);
}

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

.bg-success-dark {
    background-color: #047857;
}

/* ================== KANBAN BOARD ================== */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: calc(100vh - 400px);
    align-items: flex-start;
}

.kanban-col {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    min-width: 320px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .kanban-col {
    background: #1a2744;
    border-color: #334155;
}

[data-theme="dark"] .kanban-col-header {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .kanban-col-count {
    background: #253050;
    color: var(--text-muted);
}

[data-theme="dark"] .lead-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-primary {
    background-color: var(--primary);
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background-color: var(--primary-dark);
}

.kanban-col-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kanban-col-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-col-count {
    background: white;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    box-shadow: var(--shadow-soft);
}

.kanban-cards-list {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    transition: 0.2s;
}

.kanban-cards-list.drag-over {
    background: rgba(88, 86, 214, 0.05);
}

/* Redefinição do Lead Card para Kanban */
.lead-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    cursor: move;
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
    user-select: none;
    width: 100%;
    /* Garante que o card ocupe apenas a largura da coluna */
    box-sizing: border-box;
}

.lead-card:last-child {
    margin-bottom: 0;
}

.lead-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.lead-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

/* Indicador de Status Super Discreto */
.card-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.card-warning .card-indicator {
    background-color: var(--warning);
}

.card-default .card-indicator {
    background-color: var(--neutral-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 16px;
    /* Mais respiro */
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    /* Squircle Moderno */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-dark);
    flex-shrink: 0;
    /* Garante que não achate */
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    object-fit: cover;
    /* Para fotos reais */
    background-color: var(--neutral-light);
    /* Fallback bg */
}

/* Item 2.10 - Metadados Extras */
.platform-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    vertical-align: middle;
    margin-left: 5px;
}

#lead-bio-header {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-primary-light {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.bg-primary-dark {
    background-color: var(--primary);
    color: white;
}

.contact-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.contact-phone {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Badges Premium */
.badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.badge-warning-light {
    background-color: var(--warning-light);
    color: var(--warning);
}

.badge-warning-solid {
    background-color: var(--warning);
    color: white;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.card-body {
    margin-top: 1.5rem;
    flex: 1;
}

.last-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    /* Linha tracejada mais limpa */
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.time-ago i,
.msg-count i {
    font-size: 1rem;
    margin-right: 4px;
    vertical-align: middle;
}

/* ================== CHAT MODAL ================== */
.chat-overlay {
    position: fixed;
    top: 20px;
    right: -550px;
    width: 480px;
    height: calc(100vh - 40px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.chat-overlay.open {
    right: 0;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-3 {
    gap: 16px;
}

.chat-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.chat-close {
    background: var(--neutral-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: 0.2s;
}

.chat-close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

#chatName {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.chat-status {
    font-size: 0.85rem;
    font-weight: 600;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Balões de Chat Refinados */
.chat-bubble {
    padding: 14px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

/* === LEAD / CLIENTE — ESQUERDA (cinza neutro, bem diferente das nossas msgs) === */
.chat-bubble.user {
    align-self: flex-start;
    background: var(--bg-main);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

/* === IA (BOT Gemini) — DIREITA (roxo primário da marca) === */
.chat-bubble.bot,
.chat-bubble.ia {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    border-bottom-right-radius: 4px;
    border: none;
}

/* === ATENDENTE HUMANO — DIREITA (verde esmeralda, diferente do roxo da IA) === */
.chat-bubble.humano {
    align-self: flex-end;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-bottom-right-radius: 4px;
    border: none;
}

/* === TIMESTAMPS === */
.msg-time {
    display: block;
    font-size: 0.72rem;
    margin-top: 5px;
    opacity: 0.65;
}

/* Lead — hora à esquerda, cor muted */
.chat-bubble.user .msg-time {
    text-align: left;
    color: var(--text-muted);
}

/* IA e Atendente — hora à direita, cor branca */
.chat-bubble.bot .msg-time,
.chat-bubble.ia .msg-time,
.chat-bubble.humano .msg-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.75);
}

/* === SENDER BADGE (mini label IA / Atendente) === */
.msg-sender-badge {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.85;
}

/* IA badge — branco sobre roxo */
.chat-bubble.bot .msg-sender-badge,
.chat-bubble.ia .msg-sender-badge {
    color: rgba(255, 255, 255, 0.9);
}

/* Atendente badge — branco sobre verde */
.chat-bubble.humano .msg-sender-badge {
    color: rgba(255, 255, 255, 0.9);
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.chat-input-area textarea {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid transparent;
    color: var(--text-dark);
    padding: 16px;
    border-radius: var(--radius-md);
    resize: none;
    height: 64px;
    font-size: 0.95rem;
    transition: 0.3s;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(88, 86, 214, 0.1);
}

.send-btn {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--primary);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-btn:hover {
    box-shadow: 0 10px 20px rgba(88, 86, 214, 0.3);
    transform: translateY(-2px);
}

/* ================== DASHBOARD CONVERSATIONS ================== */
.dashboard-conversations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1.5rem;
}

.conv-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.conv-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width 0.3s ease;
    opacity: 0.1;
}

.conv-card:hover {
    transform: translateX(10px) translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.conv-card:hover::before {
    width: 6px;
}

.conv-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
}

.conv-info>div:not(.contact-avatar) {
    min-width: 0;
    flex: 1;
}

.contact-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block !important;
    /* Sobrescreve line-clamp se necessário para alinhar */
}

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

/* Indicadores nos Cards */
.indicator-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag-ia-active {
    background: var(--success-light);
    color: var(--success);
}

.tag-ia-paused {
    background: var(--warning-light);
    color: var(--warning);
}

.tag-dossie {
    background: var(--info-light);
    color: var(--info);
}

/* ================== CHAT OVERLAY REFINES ================== */
.takeover-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.takeover-btn:hover {
    transform: scale(1.05);
}

.dossie-box {
    margin-bottom: 20px;
}

/*Separadores de Data Premium*/
.chat-date-separator,
.date-separator-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    position: relative;
    pointer-events: none;
}

.chat-date-separator::before,
.date-separator-dashboard::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.chat-date-separator span,
.date-separator-dashboard span {
    background: var(--bg-card);
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.date-separator-dashboard {
    margin: 30px 0 15px 0;
}

.date-separator-dashboard span {
    background: var(--bg-main);
}

[data-theme="dark"] .chat-date-separator span {
    background: var(--bg-card);
}

[data-theme="dark"] .date-separator-dashboard span {
    background: var(--bg-main);
}

/* ================== NOTIFICAÇÕES (FASE 4.9) ================== */
.notification-item {
    cursor: default;
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background-color: var(--bg-main);
}

.notification-item.bg-primary-light {
    border-left-color: var(--primary);
}

[data-theme="dark"] .notification-item.bg-primary-light {
    background-color: rgba(88, 86, 214, 0.1);
}

.notification-item h4 {
    color: var(--text-dark);
}

.notification-item .icon-btn {
    opacity: 0.6;
    transition: all 0.2s;
}

.notification-item:hover .icon-btn {
    opacity: 1;
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-text {
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-text:hover {
    opacity: 0.8;
}

/* ================== MÉTRICAS (FASE 4.9) ================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

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

.w-100 {
    width: 100%;
}

.font-bold {
    font-weight: 700;
}

/* ================== FUNIL DE CONVERSÃO (FASE 4.9) ================== */
.funnel-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.funnel-stages-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.funnel-stage-row {
    display: grid;
    grid-template-columns: 155px 1fr 140px;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 600px) {
    .funnel-stage-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .funnel-stage-conv {
        text-align: left;
        font-size: 0.78rem;
    }
}

.funnel-stage-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.funnel-stage-bar-wrap {
    background: var(--bg-main);
    border-radius: 999px;
    height: 32px;
    overflow: hidden;
}

.funnel-stage-bar {
    height: 100%;
    border-radius: 999px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    min-width: 44px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.funnel-stage-conv {
    font-size: 0.82rem;
    text-align: right;
    color: var(--text-muted);
}

/* ================== RANKING (FASE 4.9) ================== */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ranking-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 40px 48px 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    row-gap: 0.6rem;
    align-items: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ranking-card--top {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.06), var(--bg-card));
}

.ranking-position {
    font-size: 1.4rem;
    text-align: center;
    grid-row: 1 / 3;
    align-self: center;
}

.ranking-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    grid-row: 1 / 3;
    align-self: center;
}

.ranking-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ranking-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.ranking-role {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.ranking-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ranking-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.ranking-stat-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ranking-bar-wrap {
    grid-column: 3 / 5;
    background: var(--bg-main);
    border-radius: 999px;
    height: 5px;
    overflow: hidden;
}

.ranking-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 640px) {
    .ranking-card {
        grid-template-columns: 36px 40px 1fr;
    }

    .ranking-stats {
        gap: 0.8rem;
    }

    .ranking-card .ranking-stats {
        grid-column: 1 / -1;
    }

    .ranking-bar-wrap {
        grid-column: 1 / -1;
    }
}

/* ================== PEDIDOS (FASE 4.9) ================== */
.pedidos-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.pedidos-kpi {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.pedidos-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.pedidos-kpi-info {
    display: flex;
    flex-direction: column;
}

.pedidos-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pedidos-kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}

.pedidos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pedido-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    column-gap: 1.25rem;
    align-items: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid var(--success);
}

.pedido-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.pedido-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.pedido-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pedido-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.pedido-phone {
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pedido-date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-right: 2rem;
    border-right: 1px solid var(--border-light);
}

.pedido-date-val {
    font-size: 0.9rem;
    font-weight: 600;
}

.pedido-time-val {
    font-size: 0.75rem;
}

.pedido-value {
    font-size: 1.15rem;
    padding-left: 1.5rem;
    text-align: right;
    min-width: 130px;
}

@media (max-width: 640px) {
    .pedido-card {
        grid-template-columns: 40px 1fr auto;
        grid-template-rows: auto auto;
        padding: 1rem;
        column-gap: 0.8rem;
    }

    .pedido-value {
        grid-column: 1 / -1;
        padding-left: 0;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.8rem;
        border-top: 1px dashed var(--border-light);
    }

    .pedido-date {
        padding-right: 0;
        border-right: none;
    }

    .pedido-date-val {
        font-size: 0.85rem;
    }
}

/* ================== CENTRAL DE CHATS (FASE 4.9) ================== */
.chat-central-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-central-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: 1.25rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.chat-central-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.chat-central-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.chat-central-info {
    display: flex;
    flex-direction: column;
}

.chat-central-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chat-central-time {
    font-size: 0.8rem;
}

.chat-central-phone {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-central-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 600px) {
    .chat-central-card {
        grid-template-columns: 40px 1fr;
        padding: 0.875rem 1rem;
        column-gap: 1rem;
    }

    .chat-central-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .chat-central-name {
        font-size: 0.95rem;
    }

    .chat-central-status {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* ================== RESPONSIVIDADE MOBILE GLOBAL (FASE 4.9.9) ================== */
@media (max-width: 900px) {
    .kpi-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Topbar Ajustes */
    .topbar {
        padding: 8px 15px;
        flex-wrap: nowrap;
        /* Impede quebra para manter tudo na mesma linha compacta */
        justify-content: space-between;
        min-height: 60px;
        /* Altura menor para mobile */
    }

    .brand-text {
        display: none;
    }

    .brand {
        width: auto;
    }

    .brand i.ri-blaze-fill {
        display: none;
    }

    .topbar-date {
        display: none;
        /* Esconde a data no mobile */
    }

    .search-bar {
        display: none !important;
        /* Esconde barra de busca cheia */
    }

    .search-btn-mobile {
        display: flex !important;
        /* Exibe icone de busca */
    }

    .user-profile {
        display: none !important;
        /* Esconde perfil completo */
    }

    .user-btn-mobile {
        display: flex !important;
        /* Exibe icone user */
    }

    /* Conteiner principal empilha e reage à sidebar offcanvas */
    .app-container {
        flex-direction: column;
    }

    .topbar-actions {
        gap: 12px;
    }

    /* Sidebar Mobile virando Off-Canvas */
    .sidebar {
        position: fixed;
        left: -260px;
        /* Começa escondida */
        top: 0;
        /* Cola no topo para o offcanvas ficar fullscreen em altura */
        /* Abaixo do topbar (aprox) */
        bottom: 0;
        z-index: 1000;
        background: var(--bg-card);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px;
        padding-top: 1.5rem;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    /* Chat Overlay (Fix 7: Mobile Fullscreen) */
    .chat-overlay {
        top: 0;
        right: -100vw;
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        margin-right: 0;
    }

    .chat-overlay.open {
        right: 0;
    }

    .chat-panel {
        padding: 1rem;
    }

    /* Removemos o comportamento collapsed que fizemos pro desktop, pois mobile usa botão open/close nav */
    .sidebar.sidebar--collapsed {
        width: 260px;
        /* Força largura full offcanvas no mobile */
        padding: 1rem 1.5rem 2rem 1.5rem;
    }

    .sidebar.sidebar--collapsed .nav-item span,
    .sidebar.sidebar--collapsed .nav-title,
    .sidebar.sidebar--collapsed .sidebar-footer,
    .sidebar.sidebar--collapsed .user-info {
        display: flex;
        /* Override para mostrar texto */
    }

    .sidebar.sidebar--collapsed .nav-item {
        justify-content: flex-start;
    }

    /* Overlay Mobile para cobrir a tela quando sidebar abrir */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        /* Fullscreen */
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Main Content */
    .page-view {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    /* KPIs Empilham 100% */
    .kpi-dashboard {
        grid-template-columns: 1fr;
    }

    /* Kanban Horizontal Scroll */
    .kanban-board {
        gap: 15px;
        padding-bottom: 20px;
        /* Scroll horizontal em mobile nativo já estava garantido por flex + overflow, mas reforçando: */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .kanban-column {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: center;
    }

    /* Ranking */
    .ranking-top3 {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        margin-top: 1rem;
    }

    .podium-1,
    .podium-2,
    .podium-3 {
        transform: none !important;
        width: 100%;
        max-width: 300px;
    }

    /* Pedidos Layout */
    .pedidos-summary {
        grid-template-columns: 1fr;
    }

    .pedido-card {
        grid-template-columns: 48px 1fr;
        font-size: 0.9rem;
    }

    .pedido-date,
    .pedido-value {
        grid-column: 1 / -1;
        text-align: left;
        padding-left: 0;
        border-left: none;
        border-top: 1px dashed var(--border-light);
        margin-top: 10px;
        padding-top: 10px;
    }

    /* Admin Table (Mobile) */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #view-admin .table th,
    #view-admin .table td {
        white-space: nowrap;
        padding: 10px;
    }

    /* Funil Layout */
    .funil-stage {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .funil-icon {
        margin: 0 auto 10px auto;
    }
}

/* ================== NOTIFICAÇÕES (Fix 2) ================== */
.notif-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notif-date-group {
    margin-bottom: 8px;
}

.notif-date-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 0 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.notif-card {
    display: flex;
    gap: 14px;
    padding: 1rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    margin-bottom: 4px;
    align-items: flex-start;
}

.notif-card:hover {
    background: var(--bg-main);
}

.notif-card--unread {
    background: var(--primary-light);
}

.notif-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.notif-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.notif-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-msg {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.notif-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-text-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.btn-text-link:hover {
    opacity: 0.75;
}

.btn-text-link.text-muted {
    color: var(--text-muted);
}

/* ================== RANKING (Fix 3) ================== */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.ranking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.ranking-card--top {
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    border-color: rgba(88, 86, 214, 0.3);
}

.ranking-position {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.ranking-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-role {
    font-size: 0.75rem;
}

.ranking-stats {
    display: flex;
    gap: 20px;
}

.ranking-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ranking-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
}

.ranking-stat-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-bar-wrap {
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 100px;
    margin-top: 10px;
    overflow: hidden;
    grid-column: 1 / -1;
}

.ranking-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8a2be2);
    border-radius: 100px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

/* ================== PEDIDOS Search Bar (Fix 1) ================== */
.pedidos-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 10px 20px;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
    max-width: 400px;
}

.pedidos-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(88, 86, 214, 0.1);
}

.pedidos-search-bar i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.pedidos-search-bar input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-dark);
    flex: 1;
    min-width: 0;
}

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

/* ================== MÉTRICAS Daily (Fix 4) ================== */
.metrics-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.metrics-day-card {
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.metrics-day-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.metrics-day-date {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.metrics-day-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
}

.metrics-day-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ================== FUNIL Stages (Fix 5) ================== */
.funnel-stage-row {
    display: grid;
    grid-template-columns: 160px 1fr 120px;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.funnel-stage-row:last-child {
    border: none;
}

.funnel-stage-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.88rem;
}

.funnel-stage-bar-wrap {
    background: var(--border-color);
    border-radius: 100px;
    height: 10px;
    overflow: hidden;
}

.funnel-stage-bar {
    height: 100%;
    border-radius: 100px;
    display: flex;
    align-items: center;
    padding-right: 8px;
    justify-content: flex-end;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 24px;
}

.funnel-stage-bar span {
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.funnel-stage-conv {
    font-size: 0.78rem;
    text-align: right;
}

/* ================== Real-Time Connection Status (Fase 5.1) ================== */
.connection-status-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

.connection-status-banner.error {
    background: var(--danger);
}

.connection-status-banner.success {
    background: var(--success);
}

@keyframes slideDown {
    from {
        top: -50px;
        opacity: 0;
    }

    to {
        top: 20px;
        opacity: 1;
    }
}

/* ================== Typing Indicator (Fase 5.1) ================== */
.chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-main);
    border-radius: 20px;
    margin: 10px 20px;
    width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots span {
    animation: typingBlink 1.4s infinite both;
    width: 4px;
    height: 4px;
    background-color: var(--text-muted);
    border-radius: 50%;
    display: inline-block;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBlink {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    20% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
}

/* ==========================================
   SPRINT 6.5.3 - CHAT CENTRAL E TIMELINE
   ========================================== */

.chat-central-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: calc(100vh - 160px);
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* ---- Painel Esquerdo: Inbox ---- */
.chat-inbox-panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-inbox-header {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-inbox-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
    flex-shrink: 0;
}

.chat-inbox-list {
    flex: 1;
    overflow-y: auto;
}

.chat-inbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.chat-inbox-item:hover {
    background: var(--bg-main);
}

.chat-inbox-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
}

.chat-inbox-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-inbox-info {
    flex: 1;
    min-width: 0;
}

.chat-inbox-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-inbox-preview {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-inbox-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-inbox-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* SLA Badges */
.sla-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    white-space: nowrap;
}

.sla-badge.ok {
    background: #d1fae5;
    color: #059669;
}

.sla-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.sla-badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

/* ---- Painel Direito: Timeline ---- */
.chat-timeline-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-central-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
}

.chat-timeline-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-timeline-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.chat-timeline-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Barra de Ações */
.chat-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-main);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.ia-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.ia-status-badge.ativa {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.ia-status-badge.pausada {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Scroll da Timeline */
.chat-timeline-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 1.4rem;
}

/* Eventos da Timeline */
.timeline-event {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-start;
}

.timeline-event-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-event-icon.msg-user {
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.timeline-event-icon.msg-ia {
    background: var(--primary-light);
    color: var(--primary);
}

.timeline-event-icon.msg-humano {
    background: #d1fae5;
    color: #059669;
}

.timeline-event-icon.evt-transferencia {
    background: #ede9fe;
    color: #7c3aed;
}

.timeline-event-icon.evt-ia-pausa {
    background: #fef3c7;
    color: #d97706;
}

.timeline-event-icon.evt-ia-retoma {
    background: #d1fae5;
    color: #059669;
}

.timeline-event-icon.evt-assumiu {
    background: #dbeafe;
    color: #2563eb;
}

.timeline-event-icon.evt-handoff {
    background: #fee2e2;
    color: #dc2626;
}

.timeline-event-icon.evt-default {
    background: var(--bg-main);
    color: var(--text-muted);
}

.timeline-event-body {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
}

.timeline-event-body.msg-ia-body {
    background: var(--primary-light);
    border-color: transparent;
}

.timeline-event-body.msg-humano-body {
    background: #d1fae5;
    border-color: transparent;
}

.timeline-event-body.evt-body {
    background: var(--bg-main);
}

.timeline-event-text {
    font-size: 0.84rem;
    color: var(--text-dark);
    line-height: 1.5;
    word-break: break-word;
}

.timeline-event-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.timeline-empty {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
}

/* Dropdown de Transferência */
.transfer-dropdown {
    position: relative;
    display: inline-block;
}

.transfer-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 300;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 190px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: none;
    max-height: 220px;
    overflow-y: auto;
}

.transfer-dropdown-menu.open {
    display: block;
}

.transfer-dropdown-item {
    padding: 9px 14px;
    font-size: 0.83rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: background 0.12s;
}

.transfer-dropdown-item:hover {
    background: var(--bg-main);
}

/* Dark mode overrides */
[data-theme="dark"] .sla-badge.ok {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .sla-badge.warning {
    background: #78350f;
    color: #fcd34d;
}

[data-theme="dark"] .sla-badge.danger {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .ia-status-badge.ativa {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #065f46;
}

[data-theme="dark"] .ia-status-badge.pausada {
    background: #78350f;
    color: #fcd34d;
    border-color: #92400e;
}

[data-theme="dark"] .timeline-event-body.msg-humano-body {
    background: #064e3b;
}

[data-theme="dark"] .timeline-event-icon.msg-humano {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .timeline-event-icon.evt-ia-pausa {
    background: #78350f;
    color: #fcd34d;
}

[data-theme="dark"] .timeline-event-icon.evt-transferencia {
    background: #4c1d95;
    color: #a78bfa;
}

[data-theme="dark"] .timeline-event-icon.evt-assumiu {
    background: #1e3a8a;
    color: #93c5fd;
}


/* ==========================================
   SPRINT 6.5.4 — Score Badge + Copiloto + Playbooks
   ========================================== */

/* Score badge no inbox */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 28px;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 4px;
}

.score-badge.score-high {
    background: #d1fae5;
    color: #065f46;
}

.score-badge.score-mid {
    background: #fef3c7;
    color: #92400e;
}

.score-badge.score-low {
    background: #fee2e2;
    color: #991b1b;
}

/* Copiloto panel */
.copiloto-panel {
    margin: 0 0 0 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    padding: 12px 16px;
    flex-shrink: 0;
}

.copiloto-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.copiloto-loading,
.copiloto-error {
    padding: 8px 0;
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copiloto-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.copiloto-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 90px;
}

.copiloto-score-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.copiloto-score-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.copiloto-score-bar.score-high {
    background: #10b981;
}

.copiloto-score-bar.score-mid {
    background: #f59e0b;
}

.copiloto-score-bar.score-low {
    background: #ef4444;
}

.copiloto-proxima-acao {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--bg-main);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 0.83rem;
}

.copiloto-proxima-acao i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.copiloto-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.copiloto-value {
    font-weight: 600;
    color: var(--text-dark);
}

.copiloto-resposta {
    background: var(--bg-main);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.83rem;
    margin-bottom: 4px;
}

.copiloto-resposta-text {
    color: var(--text-dark);
    margin-top: 4px;
    line-height: 1.5;
    font-style: italic;
}

.copiloto-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 8px;
    padding: 3px 8px;
    margin-top: 6px;
}

.copiloto-justificativa {
    font-style: italic;
}

/* Playbooks view */
.status-badge.ativo {
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.status-badge.inativo {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

/* Dark mode overrides sprint 6.5.4 */
[data-theme="dark"] .score-badge.score-high {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .score-badge.score-mid {
    background: #78350f;
    color: #fcd34d;
}

[data-theme="dark"] .score-badge.score-low {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .copiloto-panel {
    background: var(--card-bg);
}

[data-theme="dark"] .copiloto-proxima-acao,
[data-theme="dark"] .copiloto-resposta {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .copiloto-template-badge {
    background: #4c1d95;
    color: #c4b5fd;
}

[data-theme="dark"] .status-badge.ativo {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .status-badge.inativo {
    background: #7f1d1d;
    color: #fca5a5;
}

/* ==========================================
   SPRINT 6.5.5 - CAMPANHAS
   ========================================== */

/* Barra de progresso de disparo */
.campanha-progress-bar {
    width: 100%;
    height: 10px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.campanha-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: 8px;
    transition: width 0.5s ease;
}

/* Caixa de prévia de leads */
.campanha-preview-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .88rem;
    color: var(--primary);
    margin-top: 8px;
}

.campanha-preview-box i {
    font-size: 1.1rem;
}

/* Badges de status */
.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.badge-secondary {
    background: var(--border);
    color: var(--text-muted);
}

/* Dark mode campanhas */
[data-theme="dark"] .campanha-preview-box {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

/* ============================================================
   SPRINT 6.6.1 — Dashboard Redesign
   ============================================================ */

/* ── Sidebar 6.6 ── */
.sidebar-66 {
    width: 264px;
    min-width: 264px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 20;
    transition: width 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.sidebar-66::-webkit-scrollbar {
    width: 4px;
}

.sidebar-66::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

.sidebar-66-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px 20px;
    flex-shrink: 0;
}

.sidebar-66-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.sidebar-66-logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.sidebar-66-nav {
    flex: 1;
    padding: 4px 12px;
}

.sidebar-66-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-placeholder);
    text-transform: uppercase;
    letter-spacing: 0.9px;
    padding: 14px 10px 6px;
}

.sidebar-66-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    position: relative;
    margin-bottom: 2px;
}

.sidebar-66-item i {
    font-size: 1.15rem;
    flex-shrink: 0;
    transition: color 0.18s;
}

.sidebar-66-item:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.sidebar-66-item:hover i {
    color: var(--primary);
}

.sidebar-66-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.sidebar-66-item.active i {
    color: #fff;
}

.sidebar-66-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 100px;
    line-height: 1.4;
    min-width: 18px;
    text-align: center;
}

.sidebar-66-item.active .sidebar-66-badge {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-66-footer {
    padding: 12px 16px 20px;
    flex-shrink: 0;
}

.sidebar-66-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.sidebar-66-status-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-66-status-label {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.sidebar-66-status-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
}

[data-theme="dark"] .sidebar-66 {
    background: var(--bg-card);
    border-right-color: var(--border-color);
}

[data-theme="dark"] .sidebar-66-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .sidebar-66-status {
    background: rgba(93, 69, 251, 0.12);
}

[data-theme="dark"] .sidebar-66-status-icon {
    background: rgba(93, 69, 251, 0.15);
}

/* ── Topbar 6.6 ── */
.topbar-66 {
    height: 64px;
    min-height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 15;
    gap: 16px;
}

.topbar-66-search {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.topbar-66-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-placeholder);
    font-size: 1rem;
    pointer-events: none;
}

.topbar-66-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid var(--border-medium);
    border-radius: 100px;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 0.875rem;
    font-family: var(--font-primary);
    transition: all 0.2s;
    outline: none;
}

.topbar-66-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 69, 251, 0.1);
    background: var(--bg-card);
}

.topbar-66-search input::placeholder {
    color: var(--text-placeholder);
}

.topbar-66-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-66-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all 0.18s;
    position: relative;
}

.topbar-66-icon-btn:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.topbar-66-notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.topbar-66-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    margin: 0 6px;
}

.topbar-66-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.topbar-66-user-info {
    text-align: right;
}

.topbar-66-user-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.topbar-66-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.topbar-66-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px var(--primary-shadow);
    flex-shrink: 0;
}

[data-theme="dark"] .topbar-66 {
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .topbar-66-search input {
    background: var(--bg-main);
    border-color: var(--border-color);
    color: var(--text-dark);
}

/* ── Layout principal 6.6 ── */
.layout-66 {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-66 {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.content-66 {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}

.content-66::-webkit-scrollbar {
    width: 5px;
}

.content-66::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

/* ── KPI Cards 6.6 ── */
.kpi-grid-66 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1280px) {
    .kpi-grid-66 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.kpi-card-66 {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card-66:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.kpi-card-66-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-card-66-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.kpi-card-66-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.kpi-icon-blue {
    background: #EFF6FF;
    color: #3B82F6;
}

.kpi-icon-indigo {
    background: #EEF2FF;
    color: #6366F1;
}

.kpi-icon-green {
    background: #ECFDF5;
    color: #10B981;
}

.kpi-icon-purple {
    background: #F5F3FF;
    color: #8B5CF6;
}

.kpi-card-66-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.kpi-card-66-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend-up {
    color: var(--success);
}

.kpi-trend-down {
    color: var(--danger);
}

.kpi-trend-neutral {
    color: var(--text-muted);
}

[data-theme="dark"] .kpi-card-66 {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .kpi-icon-blue {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .kpi-icon-indigo {
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .kpi-icon-green {
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .kpi-icon-purple {
    background: rgba(139, 92, 246, 0.1);
}

/* ── Grid 2 colunas dashboard 6.6 ── */
.dash-grid-66 {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1280px) {
    .dash-grid-66 {
        grid-template-columns: 1fr;
    }
}

/* ── Radar da IA ── */
.radar-card-66 {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.radar-header-66 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.radar-title-66 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.radar-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse66 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse66 {

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

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

.radar-ver-todas {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: none;
}

.radar-ver-todas:hover {
    text-decoration: underline;
}

.radar-table-66 {
    width: 100%;
    border-collapse: collapse;
}

.radar-table-66 thead tr {
    background: rgba(248, 249, 250, 0.6);
}

[data-theme="dark"] .radar-table-66 thead tr {
    background: rgba(255, 255, 255, 0.03);
}

.radar-table-66 th {
    padding: 12px 18px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-placeholder);
    text-align: left;
    white-space: nowrap;
}

.radar-table-66 tbody tr {
    border-top: 1px solid var(--border-color);
    transition: background 0.15s;
}

.radar-table-66 tbody tr:hover {
    background: rgba(248, 249, 250, 0.8);
}

[data-theme="dark"] .radar-table-66 tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.radar-table-66 td {
    padding: 14px 18px;
    font-size: 0.84rem;
    color: var(--text-dark);
    vertical-align: middle;
}

.radar-client-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radar-client-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.radar-client-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.radar-client-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.radar-client-canal {
    font-size: 0.71rem;
    color: var(--text-placeholder);
    margin-top: 1px;
}

.radar-msg-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

.radar-msg-time {
    font-size: 0.69rem;
    color: var(--text-placeholder);
    margin-top: 2px;
}

/* Badges sentimento */
.sentimento-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.sentimento-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sentimento-quente {
    background: #ECFDF5;
    color: #059669;
}

.sentimento-quente::before {
    background: #059669;
}

.sentimento-ansioso {
    background: #FFF7ED;
    color: #C2410C;
}

.sentimento-ansioso::before {
    background: #EA580C;
}

.sentimento-neutro {
    background: #EFF6FF;
    color: #2563EB;
}

.sentimento-neutro::before {
    background: #3B82F6;
}

.sentimento-frio {
    background: var(--bg-main);
    color: var(--text-muted);
}

.sentimento-frio::before {
    background: var(--text-placeholder);
}

.radar-dossie-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radar-action-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: rgba(93, 69, 251, 0.1);
    color: var(--primary);
    transition: all 0.18s;
    white-space: nowrap;
}

.radar-action-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px var(--primary-shadow);
}

.radar-footer-66 {
    padding: 14px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: rgba(248, 249, 250, 0.4);
}

.radar-load-more {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-placeholder);
    cursor: pointer;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.18s;
}

.radar-load-more:hover {
    color: var(--primary);
}

/* ── Coluna de widgets ── */
.widgets-col-66 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget-card-66 {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.widget-header-66 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.widget-title-66 {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Fila de Transbordo */
.widget-card-66.transbordo {
    border-color: rgba(239, 68, 68, 0.2);
}

.widget-card-66.transbordo .widget-header-66 {
    background: rgba(239, 68, 68, 0.04);
    border-bottom-color: rgba(239, 68, 68, 0.1);
}

.widget-card-66.transbordo .widget-title-66 {
    color: var(--danger);
}

.transbordo-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
}

.transbordo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    transition: background 0.15s;
    cursor: pointer;
}

.transbordo-item:first-child {
    border-top: none;
}

.transbordo-item:hover {
    background: var(--bg-main);
}

.transbordo-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FEF2F2;
    color: var(--danger);
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transbordo-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.transbordo-msg {
    font-size: 0.71rem;
    color: var(--danger);
    font-style: italic;
    margin-top: 1px;
    font-weight: 600;
}

.transbordo-send-btn {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--danger);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.transbordo-send-btn:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Ranking de Desejo */
.ranking-desejo-list {
    padding: 8px 0;
}

.ranking-desejo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    transition: background 0.15s;
}

.ranking-desejo-item:hover {
    background: var(--bg-main);
}

.ranking-desejo-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-desejo-pos {
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ranking-desejo-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
}

.ranking-desejo-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-placeholder);
}

/* Origem de Leads */
.origem-chart-wrap {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.origem-chart-canvas-wrap {
    position: relative;
    width: 130px;
    height: 130px;
}

.origem-chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.origem-chart-pct {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.origem-chart-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-placeholder);
}

.origem-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.origem-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.origem-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Período filter pills */
.dash-period-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-period-pill {
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: all 0.18s;
}

.dash-period-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dash-period-pill.active {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

[data-theme="dark"] .dash-period-pill.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Collapsed sidebar 6.6 */
.sidebar-66.collapsed {
    width: 64px;
    min-width: 64px;
}

.sidebar-66.collapsed .sidebar-66-logo-text,
.sidebar-66.collapsed .sidebar-66-group-label,
.sidebar-66.collapsed .sidebar-66-item span,
.sidebar-66.collapsed .sidebar-66-badge,
.sidebar-66.collapsed .sidebar-66-status-label,
.sidebar-66.collapsed .sidebar-66-status-value {
    display: none;
}

.sidebar-66.collapsed .sidebar-66-item {
    justify-content: center;
    padding: 10px;
}

.sidebar-66.collapsed .sidebar-66-logo {
    justify-content: center;
    padding: 24px 10px 20px;
}

.sidebar-66.collapsed .sidebar-66-status {
    justify-content: center;
}

.sidebar-66.collapsed .sidebar-66-status-icon {
    margin: 0;
}

/* Onboarding banner no novo layout */
#onboarding-banner {
    margin-bottom: 20px;
}

/* ================================================================ */
/* SPRINT 6.6.2 — CHAT CENTRAL WHATSAPP STYLE                      */
/* ================================================================ */

.chat-66-view {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.chat-66-layout {
    display: flex;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}

/* ---- Left sidebar ---- */
.chat-66-sidebar {
    width: 320px;
    min-width: 320px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
}

.chat-66-sidebar-header {
    padding: 16px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.chat-66-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin: 0 0 10px;
}

.chat-66-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-66-search-wrap i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.chat-66-search {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.82rem;
    outline: none;
    font-family: var(--font-primary);
    transition: border-color .2s;
}

.chat-66-search:focus {
    border-color: var(--primary);
}

/* Inbox list */
.chat-66-inbox {
    flex: 1;
    overflow-y: auto;
}

.chat-66-inbox-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background .15s;
    position: relative;
}

.chat-66-inbox-item:hover {
    background: var(--bg-main);
}

.chat-66-inbox-item.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.chat-66-inbox-row1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
}

.chat-66-inbox-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.chat-66-inbox-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-66-inbox-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-66-ia-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    color: #10B981;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ---- Right panel ---- */
.chat-66-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #EFEAE2;
    min-width: 0;
}

[data-theme="dark"] .chat-66-main {
    background: #0B1120;
}

/* Chat header */
.chat-66-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-66-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-66-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-66-header-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
}

.chat-66-header-status {
    font-size: 0.75rem;
    color: #10B981;
    font-weight: 500;
    margin: 0;
}

.chat-66-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-66-header-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 7px;
    border-radius: 8px;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
}

.chat-66-header-btn:hover {
    background: var(--bg-main);
    color: var(--primary);
}

/* Messages area */
.chat-66-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-66-date-divider {
    text-align: center;
    margin: 10px 0;
}

.chat-66-date-divider span {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
}

[data-theme="dark"] .chat-66-date-divider span {
    background: rgba(30, 41, 59, 0.9);
}

/* Bubbles */
.chat-66-msg {
    display: flex;
    margin-bottom: 2px;
}

.chat-66-msg.received {
    justify-content: flex-start;
}

.chat-66-msg.sent {
    justify-content: flex-end;
}

.chat-66-bubble {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chat-66-msg.received .chat-66-bubble {
    background: #fff;
    color: var(--text-main);
    border-top-left-radius: 4px;
}

[data-theme="dark"] .chat-66-msg.received .chat-66-bubble {
    background: #151C2C;
    color: var(--text-main);
}

.chat-66-msg.sent .chat-66-bubble {
    background: #D9FDD3;
    color: #1A3D1A;
    border-top-right-radius: 4px;
}

[data-theme="dark"] .chat-66-msg.sent .chat-66-bubble {
    background: var(--primary);
    color: #fff;
}

.chat-66-bubble-text {
    font-size: 0.855rem;
    line-height: 1.5;
    margin: 0;
}

.chat-66-bubble-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 3px;
}

.chat-66-bubble-time {
    font-size: 0.67rem;
    color: var(--text-muted);
}

.chat-66-msg.sent .chat-66-bubble-time {
    color: rgba(26, 61, 26, 0.55);
}

[data-theme="dark"] .chat-66-msg.sent .chat-66-bubble-time {
    color: rgba(255, 255, 255, 0.55);
}

/* Audio bubble */
.chat-66-audio-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    margin-bottom: 6px;
}

.chat-66-audio-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: background .15s;
    box-shadow: 0 2px 8px rgba(93, 69, 251, 0.3);
}

.chat-66-audio-play:hover {
    background: var(--primary-dark);
}

.chat-66-audio-bar {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="dark"] .chat-66-audio-bar {
    background: rgba(255, 255, 255, 0.12);
}

.chat-66-audio-progress {
    width: 33%;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

.chat-66-audio-dur {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.chat-66-transcricao {
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    margin-top: 4px;
}

[data-theme="dark"] .chat-66-transcricao {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.chat-66-transcricao-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.chat-66-transcricao-text {
    font-size: 0.78rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* Input bar */
.chat-66-input-bar {
    background: #F0F2F5;
    border-top: none;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

[data-theme="dark"] .chat-66-input-bar {
    background: #151C2C;
}

.chat-66-attach-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 4px;
    transition: color .15s;
}

.chat-66-attach-btn:hover {
    color: var(--primary);
}

.chat-66-input-wrap {
    flex: 1;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-66-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-main);
    font-family: var(--font-primary);
}

.chat-66-input::placeholder {
    color: var(--text-placeholder);
}

.chat-66-assumir-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 9px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(93, 69, 251, 0.25);
}

.chat-66-assumir-btn:hover {
    background: var(--primary-dark);
}

.chat-66-send-btn {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background .15s;
    box-shadow: 0 3px 10px rgba(93, 69, 251, 0.25);
    flex-shrink: 0;
}

.chat-66-send-btn:hover {
    background: var(--primary-dark);
}

/* Empty state */
.chat-66-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    color: var(--text-muted);
}

.chat-66-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.7;
}

.chat-66-empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.chat-66-empty-state p {
    font-size: 0.82rem;
    margin: 0;
}

/* Filter selects — Chat 6.6 */
.chat-66-filter-select {
    flex: 1;
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    transition: border-color .2s;
}

.chat-66-filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .chat-66-filter-select {
    background-color: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

/* Topbar-66 supplement */
.topbar-66 {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 0 var(--border-color) !important;
}

/* Responsive — Chat Central: lógica de "duas telas" no mobile */
@media (max-width: 768px) {

    /* O layout vira uma única coluna */
    .chat-66-layout {
        flex-direction: column;
    }

    /* Sidebar (lista de contatos) ocupa 100% por padrão */
    .chat-66-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    /* Painel de chat escondido por padrão no mobile */
    .chat-66-main {
        display: none;
    }

    /* Quando um chat está aberto: esconde sidebar, mostra chat */
    .chat-66-layout.chat-open .chat-66-sidebar {
        display: none;
    }

    .chat-66-layout.chat-open .chat-66-main {
        display: flex;
        height: calc(100vh - 64px);
    }

    /* Botão de voltar — só aparece no mobile */
    .chat-66-back-btn {
        display: flex !important;
        align-items: center;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-muted);
        font-size: 1.1rem;
        padding: 7px;
        border-radius: 8px;
        transition: background .15s, color .15s;
        margin-right: 4px;
    }

    .chat-66-back-btn:hover {
        background: var(--bg-main);
        color: var(--primary);
    }

    /* Reduz tamanho dos balões no mobile */
    .chat-66-bubble {
        max-width: 85%;
    }

    .chat-66-messages {
        padding: 12px 10px;
    }

    /* Botões da barra inferior menores */
    .chat-66-input-bar {
        padding: 8px 10px;
        gap: 6px;
    }

    .chat-66-assumir-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .chat-66-assumir-btn .assumir-full {
        display: none;
    }

    .chat-66-assumir-btn .assumir-short {
        display: inline !important;
    }

    .chat-66-send-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    /* Esconde ícones de telefone/vídeo no header do chat */
    .chat-66-header-hide-mobile {
        display: none !important;
    }
}

/* Desktop: esconde o botão de voltar e o texto curto */
@media (min-width: 769px) {
    .chat-66-back-btn {
        display: none !important;
    }

    .chat-66-assumir-btn .assumir-short {
        display: none;
    }
}


/* ============================================================ */
/* Sprint 6.6.3 — Mobile Sidebar + Page Header + User Dropdown */
/* ============================================================ */

/* ---- Mobile sidebar overlay ---- */
@media (max-width: 768px) {
    .content-wrapper {
        position: relative;
    }

    .sidebar-66 {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100% !important;
        z-index: 1000;
        width: 264px !important;
        min-width: 264px !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(.4, 0, .2, 1), box-shadow 0.3s ease;
        box-shadow: none;
    }

    .sidebar-66.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.2);
    }

    /* collapsed no mobile = mesmo que fechado */
    .sidebar-66.collapsed {
        transform: translateX(-100%) !important;
        width: 264px !important;
        min-width: 264px !important;
    }

    .sidebar-66.collapsed .sidebar-66-logo-text,
    .sidebar-66.collapsed .sidebar-66-group-label,
    .sidebar-66.collapsed .sidebar-66-item span,
    .sidebar-66.collapsed .sidebar-66-badge {
        display: flex !important;
    }

    .main-content {
        width: 100% !important;
        padding: 1rem 1rem 2rem;
    }
}

/* ---- Page Header 6.6 (usado em todas as views secundárias) ---- */
.page-header-66 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header-66-left {
    flex: 1;
}

.page-header-66-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.4px;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-header-66-title i {
    font-size: 1.2rem;
    color: var(--primary);
}

.page-header-66-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.page-header-66-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Hub Minha Empresa (abas internas no padrão visual da sidebar) */
.empresa-hub-wrap {
    margin-top: 4px;
    margin-bottom: 0;
}

.empresa-hub-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.empresa-hub-wrap+.page-header-66,
.empresa-hub-wrap+.d-flex {
    margin-top: 16px;
}

.empresa-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all .18s ease;
    box-shadow: none;
    cursor: pointer;
}

.empresa-hub-tab i {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color .18s ease;
}

.empresa-hub-tab:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.empresa-hub-tab:hover i {
    color: var(--primary);
}

.empresa-hub-tab.is-active {
    background: transparent;
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
    box-shadow: none;
}

.empresa-hub-tab.is-active i {
    color: var(--primary);
}

/* Action button pill inside page header */
.page-header-66-actions .ph-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    transition: all .18s;
}

.ph-btn-outline {
    background: var(--bg-card);
    border: 1px solid var(--border-color) !important;
    color: var(--text-dark);
}

.ph-btn-outline:hover {
    background: var(--bg-main);
    border-color: var(--primary) !important;
    color: var(--primary);
}

.ph-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.ph-btn-primary:hover {
    filter: brightness(1.07);
}

.ph-select-66 {
    height: 34px;
    padding: 0 28px 0 12px;
    font-size: 0.82rem;
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-weight: 600;
    transition: border-color .2s;
}

.ph-select-66:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .ph-select-66,
[data-theme="dark"] .ph-btn-outline {
    background-color: var(--dark-card);
    border-color: var(--dark-border) !important;
    color: var(--dark-text);
}

/* Content card inside views */
.view-content-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

[data-theme="dark"] .view-content-card {
    background: var(--dark-card);
    border-color: var(--dark-border);
}

/* ---- User Profile Dropdown ---- */
.user-profile {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.user-profile-chevron {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: transform .2s;
    margin-left: 2px;
}

.user-profile.open .user-profile-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 196px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    overflow: hidden;
    animation: dropFadeIn .18s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.open {
    display: block;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}

.user-dropdown-item i {
    font-size: 1rem;
    color: var(--text-muted);
}

.user-dropdown-item:hover {
    background: var(--bg-main);
}

.user-dropdown-item:hover i {
    color: var(--primary);
}

.user-dropdown-item--danger {
    color: var(--danger);
}

.user-dropdown-item--danger i {
    color: var(--danger);
}

.user-dropdown-item--danger:hover {
    background: rgba(239, 68, 68, .06);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2px 0;
}

[data-theme="dark"] .user-dropdown {
    background: var(--dark-card);
    border-color: var(--dark-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .user-dropdown-item {
    color: var(--dark-text);
}

[data-theme="dark"] .user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .user-dropdown-divider {
    background: var(--dark-border);
}

/* Notif list wrapper inside view-notificacoes */
.notif-list-wrap {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

[data-theme="dark"] .notif-list-wrap {
    background: var(--dark-card);
    border-color: var(--dark-border);
}

/* ============================================================
   WIDGET DE SUPORTE — Sprint 6.7.0
   ============================================================ */

.sup-widget-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--primary-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
    user-select: none;
}

.sup-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--primary-shadow);
}

.sup-widget-btn i {
    font-size: 1.2rem;
}

.sup-widget-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.sup-widget-popup {
    position: fixed;
    bottom: 84px;
    right: 24px;
    z-index: 9001;
    width: 360px;
    max-height: 520px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.sup-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--primary);
    color: #fff;
}

.sup-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #22c55e;
}

.sup-widget-header span:nth-child(2) {
    flex: 1;
    font-weight: 600;
    font-size: 0.92rem;
}

.sup-widget-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: flex;
    align-items: center;
}

.sup-widget-close:hover {
    color: #fff;
}

.sup-widget-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.sup-wtab {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color 0.15s;
    border-bottom: 2px solid transparent;
}

.sup-wtab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.sup-wpanel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.sup-chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sup-chat-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
    padding: 2rem 1rem;
    line-height: 1.6;
}

.sup-bubble {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sup-bubble-user {
    align-self: flex-end;
    align-items: flex-end;
}

.sup-bubble-sa {
    align-self: flex-start;
    align-items: flex-start;
}

.sup-bubble-text {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.sup-bubble-user .sup-bubble-text {
    background: var(--primary);
    color: #fff;
    border-radius: 12px 12px 2px 12px;
}

.sup-bubble-sa .sup-bubble-text {
    background: var(--bg-main);
    color: var(--text-dark);
    border-radius: 12px 12px 12px 2px;
}

.sup-bubble-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.sup-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.sup-chat-input-row input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    background: var(--bg-main);
    color: var(--text-dark);
}

.sup-chat-input-row input:focus {
    border-color: var(--primary);
}

.sup-chat-input-row button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 1rem;
}

.sup-chat-input-row button:hover {
    background: var(--primary-dark);
}

.sup-offline-info {
    padding: 12px 16px 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.sup-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 12px;
    overflow-y: auto;
    flex: 1;
}

.sup-ticket-form input,
.sup-ticket-form textarea,
.sup-ticket-form select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.83rem;
    outline: none;
    background: var(--bg-main);
    color: var(--text-dark);
    font-family: inherit;
    resize: vertical;
}

.sup-ticket-form input:focus,
.sup-ticket-form textarea:focus {
    border-color: var(--primary);
}

.sup-btn-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.sup-btn-submit:hover {
    background: var(--primary-dark);
}

.sup-tickets-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sup-ticket-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: var(--bg-main);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sup-ticket-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.sup-ticket-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sup-ticket-titulo {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-dark);
}

.sup-ticket-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sup-btn-novo-ticket {
    margin: 8px 12px 12px;
    background: none;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 8px;
    font-size: 0.84rem;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.15s;
}

.sup-btn-novo-ticket:hover {
    background: var(--primary-light);
}

/* Dark mode */
[data-theme="dark"] .sup-widget-popup {
    background: var(--dark-card);
    border-color: var(--dark-border);
}

[data-theme="dark"] .sup-chat-input-row {
    background: var(--dark-card);
}

[data-theme="dark"] .sup-chat-input-row input {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: #e2e8f0;
}

[data-theme="dark"] .sup-bubble-sa .sup-bubble-text {
    background: var(--dark-bg);
    color: #e2e8f0;
}

[data-theme="dark"] .sup-ticket-form input,
[data-theme="dark"] .sup-ticket-form textarea,
[data-theme="dark"] .sup-ticket-form select {
    background: var(--dark-bg);
    border-color: var(--dark-border);
    color: #e2e8f0;
}

[data-theme="dark"] .sup-ticket-item {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

[data-theme="dark"] .sup-ticket-titulo {
    color: #e2e8f0;
}

[data-theme="dark"] .sup-wtab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

@media (max-width: 480px) {
    .sup-widget-popup {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 76px;
    }

    .sup-widget-label {
        display: none;
    }

    .sup-widget-btn {
        padding: 12px;
        border-radius: 50%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SPRINT 6.7.2 — MINHA EMPRESA REDESIGN + PLANO E FATURA
   ═══════════════════════════════════════════════════════════════ */

/* ── Profile Card (Dados da Empresa) ── */
.emp-profile-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px 28px;
    flex-wrap: wrap;
}

.emp-profile-logo-wrap {
    position: relative;
    flex-shrink: 0;
}

.emp-profile-logo {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.emp-profile-initial {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.emp-logo-upload-btn {
    position: absolute;
    bottom: -6px;
    right: -6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s;
}

.emp-logo-upload-btn:hover {
    transform: scale(1.15);
}

.emp-profile-info {
    flex: 1;
    min-width: 200px;
}

.emp-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-main);
}

.emp-profile-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.emp-meta-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.emp-plano-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: #fff;
    letter-spacing: 0.02em;
}

.emp-status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
}

.emp-status-dot::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.emp-status-dot.emp-status-ativo::before {
    background: #22c55e;
}

.emp-status-dot.emp-status-inativo::before {
    background: #ef4444;
}

.emp-status-dot.emp-status-trial::before {
    background: #f59e0b;
}

.emp-profile-actions {
    margin-left: auto;
}

/* ── Empresa Form ── */
.emp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

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

.emp-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.emp-form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.emp-form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

/* ===== INLINE EDITING (R1) ===== */
.emp-profile-card.editing .emp-field-value { display: none; }
.emp-profile-card.editing .emp-field-input { display: block !important; }
.emp-field-input { display: none; }
.emp-field-input input,
.emp-field-input select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-main);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--text-dark);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.emp-field-input input:focus,
.emp-field-input select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.emp-edit-actions {
    display: none;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.emp-profile-card.editing .emp-edit-actions { display: flex; }

/* ===== EMPTY STATES (R3) ===== */
.emp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}
.emp-empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 1rem;
}
.emp-empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}
.emp-empty-state-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

/* ===== TABELAS LGPD/NPS (R4) ===== */
.lgpd-table tbody tr:nth-child(even) { background: var(--bg-main); }
.lgpd-table tbody tr:hover { background: var(--bg-card-hover, rgba(99,102,241,0.04)); }
.lgpd-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border-light);
}
.lgpd-table td {
    font-size: 0.85rem;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.lgpd-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.lgpd-badge-consentido { background: #dcfce7; color: #16a34a; }
.lgpd-badge-pendente { background: #fef3c7; color: #d97706; }
.lgpd-badge-rejeitado { background: #fee2e2; color: #dc2626; }
[data-theme="dark"] .lgpd-badge-consentido { background: rgba(22,163,74,0.15); color: #4ade80; }
[data-theme="dark"] .lgpd-badge-pendente { background: rgba(217,119,6,0.15); color: #fbbf24; }
[data-theme="dark"] .lgpd-badge-rejeitado { background: rgba(220,38,38,0.15); color: #f87171; }

/* ===== BARRAS DE PROGRESSO — compat com classes existentes ===== */
.pf-uso-bar-fill.safe,
.pf-uso-bar-fill.pf-bar-ilimitado { background: #22c55e; }
.pf-uso-bar-fill.warn,
.pf-uso-bar-fill.pf-bar-warn { background: #f59e0b; }
.pf-uso-bar-fill.danger,
.pf-uso-bar-fill.pf-bar-danger { background: #ef4444; }

/* ===== FEATURES GRID ===== */
.pf-features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pf-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-main);
    font-size: 0.85rem;
}
.pf-feature-item i { font-size: 1.1rem; }
.pf-feature-item.included { color: #22c55e; }
.pf-feature-item.excluded { color: var(--text-muted); opacity: 0.5; }

/* ===== PLANS GRID ===== */
.pf-plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pf-plan-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg, 16px);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    background: var(--bg-card);
}
.pf-plan-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(99,102,241,0.1); }
.pf-plan-card.current { border-color: var(--primary); background: rgba(99,102,241,0.04); }
.pf-plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.pf-plan-price { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.pf-plan-price small { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }
.pf-plan-features { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; }
.pf-plan-features li { padding: 4px 0; font-size: 0.82rem; color: var(--text-muted); }
.pf-plan-features li::before { content: "✓ "; color: #22c55e; font-weight: 700; }

/* ── Equipe Stats Bar ── */
.equipe-stats-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px 24px;
    width: fit-content;
}

.equipe-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.equipe-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.equipe-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.equipe-stat-sep {
    width: 1px;
    height: 36px;
    background: var(--border-light);
}

/* ── Equipe Cards ── */
.equipe-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}

.equipe-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 0.95rem;
}

.member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.18s, transform 0.18s;
    position: relative;
}

.member-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.member-card.is-inactive {
    opacity: 0.65;
}

.member-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.member-avatar.role-admin {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.member-avatar.role-gerente {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.member-avatar.role-vendedor {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.member-avatar.role-default {
    background: linear-gradient(135deg, #64748b, #475569);
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-nome {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 3px;
}

.member-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.member-status-dot.ativo {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.member-status-dot.inativo {
    background: #ef4444;
}

.member-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.member-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.member-role-badge.admin {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.member-role-badge.gerente {
    background: rgba(29, 78, 216, 0.12);
    color: #1d4ed8;
}

.member-role-badge.vendedor {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
}

.member-role-badge.default {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.member-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

.member-status-badge.ativo {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.member-status-badge.inativo {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

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

.member-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--bg-main);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.member-action-btn:hover {
    background: var(--bg-card);
    color: var(--primary);
    border-color: var(--primary);
}

.member-action-btn.danger:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.member-action-btn.warning:hover {
    color: #f59e0b;
    border-color: #f59e0b;
}

.member-action-btn.success:hover {
    color: #22c55e;
    border-color: #22c55e;
}

/* ── Plano e Fatura — Hero ── */
.pf-hero-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border-radius: 16px;
    padding: 28px 32px;
    color: #fff;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.pf-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 200px;
}

.pf-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.pf-hero-label {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.pf-hero-nome {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.pf-hero-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

.pf-hero-mid {
    text-align: center;
}

.pf-price-currency {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: top;
    line-height: 2.5;
}

.pf-price-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.pf-price-period {
    font-size: 0.85rem;
    opacity: 0.75;
}

.pf-hero-expiry {
    font-size: 0.82rem;
    opacity: 0.75;
    margin-top: 4px;
}

.pf-hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.pf-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Uso dos Recursos ── */
.pf-uso-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .pf-uso-grid {
        grid-template-columns: 1fr;
    }
}

.pf-uso-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pf-uso-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.pf-uso-label i {
    color: var(--primary);
}

.pf-uso-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pf-uso-value strong {
    color: var(--text-main);
}

.pf-uso-bar-wrap {
    height: 8px;
    background: var(--bg-main);
    border-radius: 100px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.pf-uso-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--primary), #4338ca);
    transition: width 0.6s ease;
}

.pf-uso-bar-fill.pf-bar-warn {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.pf-uso-bar-fill.pf-bar-danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.pf-uso-bar-fill.pf-bar-ilimitado {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    width: 100% !important;
}

.pf-uso-skeleton {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 8px 0;
}

/* ── Features ── */
.pf-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.pf-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-main);
    font-size: 0.85rem;
    font-weight: 500;
}

.pf-feature-item i.ok {
    color: #22c55e;
    font-size: 1rem;
}

.pf-feature-item i.nok {
    color: #ef4444;
    font-size: 1rem;
}

/* ── Comparativo de Planos ── */
.pf-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 700px) {
    .pf-plans-grid {
        grid-template-columns: 1fr;
    }
}

.pf-plan-card {
    border: 2px solid var(--border-light);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.18s, box-shadow 0.18s;
    position: relative;
}

.pf-plan-card.is-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.pf-plan-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.pf-plan-badge.current-badge {
    background: linear-gradient(135deg, var(--primary), #4338ca);
}

.pf-plan-nome {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.pf-plan-preco {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.pf-plan-preco span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pf-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pf-plan-features li i {
    color: #22c55e;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.pf-plan-action {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* ── Payment placeholder ── */
.pf-payment-placeholder {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.pf-payment-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.pf-payment-text {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-payment-text strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.pf-payment-text span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Danger zone ── */
.pf-danger-zone {
    border-color: rgba(239, 68, 68, 0.2);
}

.pf-cancel-btn {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.pf-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: #ef4444;
}

/* ── Upgrade info box ── */
.pf-upgrade-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.pf-upgrade-info i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* =====================================================
   CATÁLOGO DE ARQUIVOS — Sprint 6.8.0c
   ===================================================== */
.cat-info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.cat-info-banner i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.cat-info-banner code {
    background: rgba(99, 102, 241, 0.12);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.79rem;
    color: var(--primary);
}

.cat-upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
}

.cat-upload-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.cat-upload-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

#catalogoUploadMsg {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.cat-stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.81rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 0 2px;
}

.cat-stats-sep {
    opacity: .4;
}

.cat-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-loading,
.cat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
}

.cat-loading i,
.cat-empty i {
    font-size: 2rem;
    opacity: .4;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s;
}

.cat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.cat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cat-icon-pdf {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.cat-icon-img {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.cat-card-body {
    flex: 1;
    min-width: 0;
}

.cat-card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.cat-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cat-meta-sep {
    opacity: .4;
}

.cat-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.cat-badge-catalogo {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.cat-badge-unitaria {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.cat-badge-projeto {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.cat-delete-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.cat-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* =============================================
   SPRINT 7.0 — AGENTE COMERCIAL IA
   ============================================= */
.agente-section-70 {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}

.agente-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.agente-robot-icon {
    font-size: 1.5rem;
}

.agente-section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 2px;
    color: var(--text-main);
}

.agente-section-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.agente-badge-total,
.agente-badge-tokens {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.agente-badge-tokens {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.agente-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

@media (max-width: 1024px) {
    .agente-cards-grid {
        grid-template-columns: 1fr;
    }
}

.agente-card {
    border-right: 1px solid var(--border-color);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.agente-card:last-child {
    border-right: none;
}

.agente-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.agente-header-red {
    color: #ef4444;
}

.agente-header-blue {
    color: #3b82f6;
}

.agente-header-green {
    color: #10b981;
}

.agente-count-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

.agente-badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.agente-badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.agente-badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.agente-card-body {
    padding: 10px 16px;
    flex: 1;
    overflow-y: auto;
    max-height: 240px;
}

.agente-empty-msg {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 16px 0;
    text-align: center;
}

.agente-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    color: var(--text-main);
}

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

.agente-item-lead {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agente-item-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.agente-kanban-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    margin-top: 3px;
}

.agente-status-pill {
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
}

.agente-confianca-bar-wrap {
    background: var(--border-color);
    border-radius: 4px;
    height: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.agente-confianca-bar {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width .4s ease;
}

.agente-apply-btn {
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.agente-apply-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.agente-empty-state {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Toggle switch — Sprint 7.0.1 */
.ia-toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.ia-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ia-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-color);
    border-radius: 26px;
    transition: background .25s;
}

.ia-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.ia-toggle-switch input:checked+.ia-toggle-slider {
    background: var(--primary);
}

.ia-toggle-switch input:checked+.ia-toggle-slider::before {
    transform: translateX(22px);
}

/* =============================================
   SPRINT 7.2 — BILLING / PLANO VENCIDO
   ============================================= */
.billing-blocked-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    background: var(--bg-main);
}

/* view oculta via JS sobrepõe o flex — sem !important */
.billing-blocked-view[style*="display:none"],
.billing-blocked-view[style*="display: none"] {
    display: none !important;
}

.billing-blocked-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
}

.billing-blocked-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.billing-blocked-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px;
}

.billing-blocked-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

.billing-blocked-info {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.billing-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 0.83rem;
    color: var(--text-main);
}

.billing-info-item i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.billing-renovar-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .2s;
    margin-bottom: 12px;
}

.billing-renovar-btn:hover {
    opacity: .88;
}

.billing-renovar-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.billing-pix-box {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.billing-pix-code {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--text-main);
    word-break: break-all;
    background: var(--card-bg);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    max-height: 80px;
    overflow-y: auto;
    text-align: left;
}

.billing-copy-btn {
    width: 100%;
    padding: 9px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.billing-copy-btn:hover {
    background: var(--primary);
    color: #fff;
}

.billing-pix-obs {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.billing-support-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.billing-support-link a {
    color: var(--primary);
    text-decoration: none;
}

.billing-support-link a:hover {
    text-decoration: underline;
}


/* ═══════════════════════════════════════════════════════
   SPRINT 7.2.1 — Portal Billing: PIX + Histórico Faturas
   ═══════════════════════════════════════════════════════ */

/* PIX row no portal */
.pf-pix-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pf-pix-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.pf-pix-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #22c55e22, #16a34a22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #16a34a;
    flex-shrink: 0;
}

.pf-pix-obs {
    font-size: 0.78rem;
    margin: 6px 0 0;
}

/* Histórico de faturas — tabela */
.pf-hist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.pf-hist-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-light);
}

.pf-hist-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-main);
}

.pf-hist-table tr:last-child td {
    border-bottom: none;
}

.pf-hist-table td a {
    color: var(--primary);
    font-size: 1rem;
    text-decoration: none;
}

.pf-hist-table td a:hover {
    opacity: 0.75;
}

/* Badges de status da fatura */
.pf-hist-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pf-hist-ok {
    background: #dcfce7;
    color: #16a34a;
}

.pf-hist-warn {
    background: #fef9c3;
    color: #ca8a04;
}

.pf-hist-danger {
    background: #fee2e2;
    color: #dc2626;
}

.pf-hist-muted {
    background: var(--bg-main);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .pf-hist-ok {
    background: #14532d44;
    color: #4ade80;
}

[data-theme="dark"] .pf-hist-warn {
    background: #78350f44;
    color: #fbbf24;
}

[data-theme="dark"] .pf-hist-danger {
    background: #7f1d1d44;
    color: #f87171;
}

/* Upgrade modal step 2 */
.pf-upgrade-success {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

[data-theme="dark"] .pf-upgrade-success {
    background: #14532d22;
}

/* ── Sprint 7.5 — PWA Install Banner ──────────────────────────────────────── */

.pwa-install-banner {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: min(420px, calc(100vw - 32px));
    animation: pwaSlideUp 0.3s ease;
}

@keyframes pwaSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
}

.pwa-install-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-install-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-pwa-install {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.btn-pwa-install:hover {
    opacity: 0.85;
}

.btn-pwa-dismiss {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: color 0.15s;
}

.btn-pwa-dismiss:hover {
    color: var(--text-primary);
}

/* ══════════════════════════════════════
   Sprint 7.6.1 — Agendamentos de Consulta
   ══════════════════════════════════════ */

.agend-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 12px;
}

.agend-week-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.agend-day-col {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 10px 8px;
    min-height: 160px;
}

.agend-day-col.today {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.agend-day-header {
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.agend-day-header .day-number {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-top: 2px;
}

.agend-day-col.today .agend-day-header .day-number {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    line-height: 28px;
    margin: 2px auto 0;
}

.agend-slot-card {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: .75rem;
    cursor: pointer;
    transition: transform .1s;
}

.agend-slot-card:hover {
    transform: scale(1.02);
}

.agend-slot-card .slot-time {
    font-weight: 600;
    color: var(--primary);
}

.agend-slot-card .slot-name {
    color: var(--text-primary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agend-slot-card.status-cancelado {
    opacity: .5;
    border-left-color: var(--danger);
    background: rgba(239,68,68,.08);
}

.agend-slot-card.status-realizado {
    border-left-color: var(--success);
    background: rgba(34,197,94,.08);
}

.agend-slot-card.status-no_show {
    border-left-color: var(--warning);
    background: rgba(245,158,11,.08);
}

/* Lista de agendamentos */
.agend-list-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 8px;
    transition: box-shadow .15s;
}

.agend-list-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.agend-list-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.agend-list-info {
    flex: 1;
    min-width: 0;
}

.agend-list-info h4 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.agend-list-info p {
    font-size: .78rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.agend-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.agend-list-actions button {
    padding: 4px 10px;
    font-size: .72rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: background .15s;
}

.agend-list-actions button:hover {
    background: var(--bg-hover);
}

.agend-list-actions .btn-realizado {
    color: var(--success);
    border-color: var(--success);
}

.agend-list-actions .btn-noshow {
    color: var(--warning);
    border-color: var(--warning);
}

.agend-list-actions .btn-cancelar {
    color: var(--danger);
    border-color: var(--danger);
}

.agend-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.agend-badge.confirmado { background: rgba(93,69,251,.12); color: var(--primary); }
.agend-badge.realizado  { background: rgba(34,197,94,.12);  color: var(--success); }
.agend-badge.no_show    { background: rgba(245,158,11,.12); color: var(--warning); }
.agend-badge.cancelado  { background: rgba(239,68,68,.12);  color: var(--danger); }

.agend-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.agend-empty i {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
}

/* ── Google Calendar — Sprint 7.6.1 Fase B ─────────────── */
.agend-meet-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 10px;
    background: #1a73e8;
    color: #fff;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.agend-meet-btn:hover { background: #1558b0; color: #fff; }

.google-connected-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(52,168,83,.12);
    border: 1px solid rgba(52,168,83,.3);
    border-radius: 8px;
    color: #188038;
    font-size: .8rem;
    font-weight: 600;
}
.google-disconnect-btn {
    background: none;
    border: none;
    color: #c5221f;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
    margin-left: 2px;
}
.google-disconnect-btn:hover { opacity: .7; }

@media (max-width: 768px) {
    .agend-week-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ===== MINHA EMPRESA — RESPONSIVO ===== */
    /* Tab bar com scroll horizontal */
    .empresa-hub-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    .empresa-hub-bar::-webkit-scrollbar { display: none; }
    .empresa-hub-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    /* Profile card empilha em mobile */
    .emp-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .emp-profile-logo-wrap {
        margin-bottom: 12px;
    }
    .emp-profile-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .emp-profile-actions {
        flex-direction: column;
        width: 100%;
    }
    .emp-profile-actions .ph-btn,
    .emp-profile-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Hero card Plano empilha */
    .pf-hero-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .pf-hero-left { flex-direction: column; }
    .pf-hero-right {
        flex-direction: column;
        align-items: center;
    }
    .pf-hero-right .btn { width: 100%; }

    /* Grids em 1 coluna */
    .pf-uso-grid { grid-template-columns: 1fr; }
    .pf-features-grid { grid-template-columns: 1fr; }
    .pf-plans-grid { grid-template-columns: 1fr; }

    /* Tabelas LGPD com scroll horizontal */
    .lgpd-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Empty states menor em mobile */
    .emp-empty-state {
        padding: 2rem 1rem;
    }
    .emp-empty-state-icon { font-size: 2.5rem; }
    .emp-empty-state-title { font-size: 1rem; }
    .emp-empty-state-desc { font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .empresa-hub-tab {
        padding: 8px 12px;
        font-size: 0.78rem;
    }
    .empresa-hub-tab i { font-size: 0.9rem; }
    .emp-profile-card { padding: 16px; }
    .emp-profile-name { font-size: 1.1rem; }
    .pf-hero-nome { font-size: 1.2rem; }
    .pf-hero-price { font-size: 1.5rem; }
}