@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   WhatsApp CRM - Design Moderno (Estilo Chatwoot)
   ============================================ */

:root {
    /* Cores de Marca */
    --primary: #1f93ff;
    --primary-hover: #177cd8;
    --primary-light: rgba(31, 147, 255, 0.08);
    --primary-active: #0c61b4;

    /* Cores de Layout */
    --bg-main: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-nav-hover: rgba(255, 255, 255, 0.05);
    --sidebar-nav-active: rgba(255, 255, 255, 0.08);
    --card-bg: #ffffff;
    --border-color: #e2e8f0;

    /* Textos */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --white: #ffffff;

    /* Estados */
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-text: #047857;

    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-text: #b91c1c;

    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-text: #b45309;

    --info: #3b82f6;
    --info-light: #eff6ff;
    --info-text: #1d4ed8;

    /* Utilitários */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header h2 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo {
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: block;
    margin-bottom: 8px;
}

.sidebar-header small {
    display: block;
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    list-style: none;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-nav li a:hover {
    background: var(--sidebar-nav-hover);
    color: var(--white);
}

.sidebar-nav li a.active {
    background: var(--sidebar-nav-active);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav li a .icon {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    stroke-width: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.sidebar-nav li a.active .icon {
    transform: scale(1.1);
    color: var(--primary);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 40px;
    min-height: 100vh;
    max-width: 1600px;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
    color: var(--primary);
}

.page-header span {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.card-stat {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-stat .number {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.card-stat .label {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom background styles for key indicator metrics */
.cards-grid>.card:nth-child(6) .number,
/* Taxa Entrega */
.cards-grid>.card:nth-child(7) .number {
    /* Taxa Leitura */
    color: var(--primary);
}

/* Table Container */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 32px;
}

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

.table-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
}

table td {
    padding: 16px 24px;
    font-size: 0.875rem;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

table tr:last-child td {
    border-bottom: none;
}

table tr {
    transition: var(--transition-fast);
}

table tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    gap: 6px;
    outline: none;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-warning:hover {
    background: #d97706;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

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

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

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

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

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-main);
    background-color: var(--white);
    transition: var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 147, 255, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(216, 241, 230, 0.46) 0.1%, rgba(233, 226, 226, 0.28) 90.1%), linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-box {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-box h1 {
    text-align: center;
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.login-logo {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.login-box p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
    font-weight: 500;
}

.login-box .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(31, 147, 255, 0.2);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-text);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: var(--info-text);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Botões de Atalho de Variáveis */
.btn-var-helper {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(31, 147, 255, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 4px;
    margin-right: 6px;
    margin-bottom: 8px;
}

.btn-var-helper:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(31, 147, 255, 0.2);
}

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

.btn-var-helper code {
    background: rgba(31, 147, 255, 0.15);
    padding: 1px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
}

.btn-var-helper:hover code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Modern Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 68px;
    }

    .sidebar-header {
        padding: 20px 10px;
    }

    .sidebar-header h2,
    .sidebar-logo,
    .sidebar-header small,
    .sidebar-nav li a span {
        display: none;
    }

    .sidebar-nav li a {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-nav li a .icon {
        margin-right: 0;
        font-size: 1.25rem;
    }

    .main-content {
        margin-left: 68px;
        padding: 24px;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* Split Screen Login Moderno */
.login-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
}

/* Painel Esquerdo (Apresentação / Marketing) */
.login-info-panel {
    flex: 1.1;
    background: radial-gradient(circle at 30% 20%, rgba(31, 147, 255, 0.15) 0%, rgba(15, 23, 42, 0) 100%), linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-info-panel::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    top: -50px;
    left: -50px;
    border-radius: 50%;
}

.info-content {
    max-width: 520px;
    z-index: 2;
}

.info-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.info-logo-img {
    max-height: 100px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 10px;
    border-radius: var(--radius-md);
}

.login-info-panel h2 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: #ffffff;
}

.login-info-panel .subtitle {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(31, 147, 255, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.feature-text strong {
    display: block;
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 4px;
    font-weight: 600;
}

.feature-text span {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    display: block;
}

/* WhatsApp Message Mockup */
.info-mockup {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.mockup-header {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

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

.mockup-bubble {
    background: #056162;
    /* WhatsApp dark mode sender bubble color */
    border-radius: 0 10px 10px 10px;
    padding: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #e9edef;
    max-width: 90%;
    margin-left: 8px;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.bubble-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #00a884;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bubble-body {
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.bubble-footer {
    font-size: 0.7rem;
    color: rgba(233, 237, 239, 0.6);
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 4px;
}

/* Painel Direito (Formulário) */
.login-form-panel {
    flex: 0.9;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-panel .login-box {
    background: #ffffff;
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border-color);
}

.login-form-panel .login-box h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 8px;
    text-align: left;
}

.login-form-panel .login-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    text-align: left;
}

.mobile-only {
    display: none;
}

/* Responsividade do Login Split */
@media (max-width: 1024px) {
    .login-info-panel {
        display: none;
        /* Oculta apresentação em telas pequenas/celulares */
    }

    .login-form-panel {
        flex: 1;
        background: radial-gradient(circle at 10% 20%, rgba(216, 241, 230, 0.46) 0.1%, rgba(233, 226, 226, 0.28) 90.1%), linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .mobile-only {
        display: flex;
        justify-content: center;
        margin-bottom: 24px;
    }

    .login-form-panel .login-box {
        box-shadow: var(--shadow-modal);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* Background Dotted Grid para valorizar o painel de login */
.login-form-panel {
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    position: relative;
    overflow: hidden;
}

/* Container de Animação CRM */
.crm-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Linhas de Conexão SVG */
.crm-connection-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.connection-line {
    stroke: #cbd5e1;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 6 4;
    fill: none;
    opacity: 0.6;
    animation: dashFlow 2s linear infinite;
}

@keyframes dashFlow {
    to {
        stroke-dashoffset: -20;
    }
}

/* Hub Node (Supermercado Rede VM) */
.crm-hub-node {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hub-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #10b981;
    /* Verde do WhatsApp / CRM Ativo */
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hub-pulse {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -10%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: hubPulse 3s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes hubPulse {
    0% {
        transform: translate(-50%, 0) scale(0.9);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, 0) scale(1.6);
        opacity: 0;
    }
}

.hub-label {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Nós dos Clientes */
.crm-client-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
    width: 60px;
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffffff;
    transition: transform 0.3s ease;
}

.avatar-maria {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.avatar-joao {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.avatar-ana {
    background: linear-gradient(135deg, #a855f7, #d946ef);
}

.avatar-pedro {
    background: linear-gradient(135deg, #f97316, #eab308);
}

.client-label {
    margin-top: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Balão de Reação */
.client-reaction {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translate(-50%, 0) scale(0);
    opacity: 0;
    z-index: 4;
}

.reaction-badge {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 0.85rem;
    display: block;
}

/* Balões de Mensagens/Ofertas Flutuantes */
.floating-offer {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.offer-bubble {
    background: #25d366;
    /* Verde do WhatsApp */
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.offer-emoji {
    font-size: 0.9rem;
}

/* --- ANIMAÇÕES DE CRONOGRAMA SINCRONIZADO (CICLO 12 SEG) --- */

/* Ofertas Flutuantes (Envios) */
.offer-maria {
    animation: sendToMaria 12s infinite linear;
}

.offer-joao {
    animation: sendToJoao 12s infinite linear;
}

.offer-ana {
    animation: sendToAna 12s infinite linear;
}

.offer-pedro {
    animation: sendToPedro 12s infinite linear;
}

/* Balões de Reação (Clientes felizes) */
.reaction-maria {
    animation: reactMaria 12s infinite ease-out;
}

.reaction-joao {
    animation: reactJoao 12s infinite ease-out;
}

.reaction-ana {
    animation: reactAna 12s infinite ease-out;
}

.reaction-pedro {
    animation: reactPedro 12s infinite ease-out;
}

/* Pulsos nos Avatares dos Clientes */
.client-maria .client-avatar {
    animation: pulseMaria 12s infinite ease-out;
}

.client-joao .client-avatar {
    animation: pulseJoao 12s infinite ease-out;
}

.client-ana .client-avatar {
    animation: pulseAna 12s infinite ease-out;
}

.client-pedro .client-avatar {
    animation: pulsePedro 12s infinite ease-out;
}

/* --- KEYFRAMES --- */

/* Rotas de Envio (do Hub 50%,8% para os Clientes) */
@keyframes sendToMaria {
    0% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    2% {
        opacity: 1;
    }

    18% {
        opacity: 1;
    }

    20% {
        top: 25%;
        left: 10%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }

    100% {
        top: 25%;
        left: 10%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes sendToJoao {
    0% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    25% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    27% {
        opacity: 1;
    }

    43% {
        opacity: 1;
    }

    45% {
        top: 25%;
        left: 90%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }

    100% {
        top: 25%;
        left: 90%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes sendToAna {
    0% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    50% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    52% {
        opacity: 1;
    }

    68% {
        opacity: 1;
    }

    70% {
        top: 75%;
        left: 10%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }

    100% {
        top: 75%;
        left: 10%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes sendToPedro {
    0% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    75% {
        top: 8%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0;
    }

    77% {
        opacity: 1;
    }

    93% {
        opacity: 1;
    }

    95% {
        top: 75%;
        left: 90%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }

    100% {
        top: 75%;
        left: 90%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Reações dos Clientes */
@keyframes reactMaria {
    0% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -10px) scale(0.5);
        opacity: 0;
    }

    22% {
        transform: translate(-50%, -20px) scale(1.2);
        opacity: 1;
    }

    24% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    34% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    38% {
        transform: translate(-50%, -24px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }
}

@keyframes reactJoao {
    0% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }

    45% {
        transform: translate(-50%, -10px) scale(0.5);
        opacity: 0;
    }

    47% {
        transform: translate(-50%, -20px) scale(1.2);
        opacity: 1;
    }

    49% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    59% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    63% {
        transform: translate(-50%, -24px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }
}

@keyframes reactAna {
    0% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }

    70% {
        transform: translate(-50%, -10px) scale(0.5);
        opacity: 0;
    }

    72% {
        transform: translate(-50%, -20px) scale(1.2);
        opacity: 1;
    }

    74% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    84% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    88% {
        transform: translate(-50%, -24px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0) scale(0);
        opacity: 0;
    }
}

@keyframes reactPedro {
    0% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    8% {
        transform: translate(-50%, -24px) scale(0.8);
        opacity: 0;
    }

    95% {
        transform: translate(-50%, -10px) scale(0.5);
        opacity: 0;
    }

    97% {
        transform: translate(-50%, -20px) scale(1.2);
        opacity: 1;
    }

    99% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -16px) scale(1);
        opacity: 1;
    }
}

/* Efeitos de Pulso nos Avatares */
@keyframes pulseMaria {
    0% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }

    20% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
        transform: scale(1.1);
    }

    30% {
        box-shadow: 0 0 0 15px rgba(236, 72, 153, 0);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

@keyframes pulseJoao {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }

    45% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
        transform: scale(1.1);
    }

    55% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes pulseAna {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
    }

    70% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
        transform: scale(1.1);
    }

    80% {
        box-shadow: 0 0 0 15px rgba(168, 85, 247, 0);
        transform: scale(1);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
    }
}

@keyframes pulsePedro {
    0% {
        box-shadow: 0 0 0 15px rgba(249, 115, 22, 0);
    }

    5% {
        box-shadow: 0 0 0 15px rgba(249, 115, 22, 0);
        transform: scale(1);
    }

    95% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
        transform: scale(1.1);
    }

    100% {
        box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.3);
    }
}

/* Customizações para a Animação de Digitação no Mockup do WhatsApp */
.bubble-body-container {
    position: relative;
    padding-bottom: 16px; /* Espaço para o horário e checks */
    min-height: 76px; /* Reserva espaço para evitar trepidação/mudança de tamanho na tela */
}

.bubble-meta {
    position: absolute;
    bottom: -6px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: rgba(233, 237, 239, 0.4);
}

.bubble-time {
    user-select: none;
}

.bubble-contact-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    margin-bottom: 8px !important;
}

.contact-status {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

.typing-cursor {
    animation: blinkCursor 0.8s infinite;
    color: #10b981;
    font-weight: 700;
    margin-left: 2px;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Responsividade: Ocultar em telas menores */
@media (max-width: 1024px) {
    .crm-animation-container {
        display: none;
    }
}

/* Otimizações de espaçamento vertical para telas menores para evitar corte (truncamento) do mockup */
@media (max-height: 850px) {
    .login-info-panel {
        padding: 40px;
    }
    .info-logo {
        margin-bottom: 20px;
    }
    .info-logo-img {
        max-height: 70px;
    }
    .login-info-panel h2 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    .login-info-panel .subtitle {
        margin-bottom: 24px;
        font-size: 0.95rem;
    }
    .features-list {
        gap: 16px;
        margin-bottom: 30px;
    }
    .feature-icon {
        width: 34px;
        height: 34px;
    }
    .feature-icon svg {
        width: 18px;
        height: 18px;
    }
    .info-mockup {
        padding: 12px;
    }
    .mockup-bubble {
        padding: 10px;
        font-size: 0.8rem;
    }
    .bubble-body-container {
        min-height: 64px;
    }
}