:root {
    /* Colors */
    --primary: #01674b;
    --primary-light: rgba(1, 103, 75, 0.12);
    --primary-dark: #014d38;
    
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    
    /* Status Colors */
    --blue: #3b82f6;
    --blue-light: #eff6ff;
    
    --purple: #8b5cf6;
    --purple-light: #f5f3ff;
    
    --green: #22c55e;
    --green-light: #f0fdf4;
    
    --yellow: #eab308;
    --yellow-light: #fefce8;
    
    --red: #ef4444;
    --red-light: #fef2f2;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    
    /* Radius */
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

/* =============================================
   TEMA ESCURO
   ============================================= */
body.dark-theme {
    --bg-main:    #0f1117;
    --bg-white:   #1a1d27;
    --text-main:  #e2e8f0;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #2d3148;
    --primary-light: #2d1f54;

    --blue-light:   #1e2a3a;
    --purple-light: #2a1f45;
    --green-light:  #0f2d1a;
    --yellow-light: #2d2410;
    --red-light:    #2d1010;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);

    color-scheme: dark;
}

/* Transição suave ao trocar tema */
body, body * {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Inputs no modo escuro */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background-color: #252836;
    color: var(--text-main);
    border-color: var(--border-color);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: var(--text-light);
}

/* Scrollbar dark */
body.dark-theme ::-webkit-scrollbar { width: 6px; }
body.dark-theme ::-webkit-scrollbar-track { background: #1a1d27; }
body.dark-theme ::-webkit-scrollbar-thumb { background: #3a3d52; border-radius: 3px; }
body.dark-theme ::-webkit-scrollbar-thumb:hover { background: #4a4d62; }

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 220px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    background-color: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text h1 {
    font-size: 16px;
    font-weight: 600;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-muted);
}

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

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

.sidebar-nav li.active a {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.sidebar-footer {
    margin-top: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--red);
    font-weight: 500;
    cursor: pointer;
    padding: 12px 16px;
    width: 100%;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.logout-btn:hover {
    background-color: var(--red-light);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.topbar {
    height: 72px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.page-title h2 {
    font-size: 20px;
    font-weight: 600;
}

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

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-main);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--primary);
    background-color: var(--bg-white);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    width: 200px;
    color: var(--text-main);
}

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

.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    position: relative;
    transition: all var(--transition-fast);
}

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

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.user-avatar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* User Dropdown Profile */
.user-profile-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 220px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.user-dropdown.show {
    display: flex;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 320px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notifications-dropdown.show {
    display: flex;
}

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

.notifications-header strong {
    font-size: 14px;
    font-weight: 600;
}

.clear-notifications {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

.clear-notifications:hover {
    text-decoration: underline;
}

.notifications-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

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

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    flex-shrink: 0;
}

.notification-icon.green {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.notification-icon.blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-content span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.3;
}

.notification-content small {
    font-size: 12px;
    color: var(--text-light);
}

.notification-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.dropdown-header strong {
    color: var(--text-main);
    font-size: 14px;
}

.dropdown-header span {
    color: var(--text-muted);
    font-size: 12px;
}

.dropdown-menu {
    list-style: none;
    padding: 8px 0;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: background-color var(--transition-fast);
}

.dropdown-menu li a i {
    width: 16px;
    height: 16px;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-main);
}

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

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


/* Dashboard Content */
.dashboard-content, .remarketing-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Metrics */
.metrics-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

/* Container e Botão Principal do Filtro */
.date-filter-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.date-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.date-filter-trigger:hover,
.date-filter-trigger.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 103, 75, 0.12);
}

.date-filter-trigger .cal-icon {
    width: 15px;
    height: 15px;
    color: var(--primary);
}

.date-filter-trigger .cal-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.date-filter-trigger.active .cal-chevron {
    transform: rotate(180deg);
}

.date-filter-badge {
    background-color: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: -0.2px;
    line-height: 1.1;
}

.date-filter-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.date-filter-clear-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: scale(1.05);
}

/* Popover do Calendário */
.calendar-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: calFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.calendar-popover.open {
    display: block;
}

@keyframes calFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.cal-popover-body {
    display: flex;
    min-width: 580px;
    max-width: 640px;
}

/* Coluna de Atalhos Rápidos */
.cal-shortcuts {
    width: 170px;
    border-right: 1px solid var(--border-color);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-main);
}

.cal-shortcuts-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    padding: 4px 8px 8px;
}

.cal-shortcut-btn {
    background: transparent;
    border: none;
    padding: 7px 10px;
    border-radius: 6px;
    text-align: left;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-shortcut-btn:hover {
    background: rgba(1, 103, 75, 0.08);
    color: var(--primary);
}

.cal-shortcut-btn.active {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.cal-shortcuts-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 4px;
}

/* Coluna Principal do Calendário */
.cal-main {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Barra de Orientação no Topo */
.cal-header-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #014d38;
    line-height: 1.3;
}

body.dark-theme .cal-header-tip {
    background: rgba(1, 103, 75, 0.15);
    border-color: rgba(1, 103, 75, 0.3);
    color: #c4b5fd;
}

/* Navegação do Mês */
.cal-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-nav-btn:hover {
    background: var(--bg-main);
    color: var(--primary);
    border-color: var(--primary);
}

.cal-nav-btn svg {
    width: 14px;
    height: 14px;
}

.cal-current-month {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.cal-today-shortcut {
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-today-shortcut:hover {
    background: rgba(1, 103, 75, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* Dias da Semana */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    padding-bottom: 4px;
}

/* Grade dos Dias */
.cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 3px;
    column-gap: 0;
}

.cal-day-cell {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
    user-select: none;
}

.cal-day-cell:hover:not(.is-disabled) {
    background: #ede9fe;
    color: var(--primary);
}

.cal-day-cell.other-month {
    color: var(--text-light);
    opacity: 0.35;
}

.cal-day-cell.is-today:not(.is-selected):not(.in-range) {
    font-weight: 700;
    color: var(--primary);
    box-shadow: inset 0 0 0 1.5px var(--primary);
}

/* Célula selecionada (Início ou Fim) */
.cal-day-cell.is-selected {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    z-index: 2;
}

/* Início do intervalo */
.cal-day-cell.range-start {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Fim do intervalo */
.cal-day-cell.range-end {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Dia único selecionado */
.cal-day-cell.range-start.range-end,
.cal-day-cell.single-day {
    border-radius: 8px !important;
}

/* Faixa contínua entre início e fim */
.cal-day-cell.in-range {
    background: #ede9fe !important;
    color: #014d38 !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
}

/* Pré-visualização ao passar o mouse */
.cal-day-cell.range-hover-in {
    background: #f3e8ff !important;
    color: var(--primary) !important;
    border-radius: 0 !important;
}
.cal-day-cell.range-hover-end {
    background: #a78bfa !important;
    color: #ffffff !important;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}
.cal-day-cell.range-hover-start {
    background: #a78bfa !important;
    color: #ffffff !important;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

/* Inputs Manuais */
.cal-inputs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.cal-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.cal-input-group label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.cal-date-input {
    width: 100%;
    padding: 5px 8px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-white);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s ease;
}

.cal-date-input:focus {
    border-color: var(--primary);
}

/* Footer com Ações */
.cal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.cal-summary-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.cal-btn-secondary {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.cal-btn-primary {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    background: var(--primary);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(1, 103, 75, 0.3);
}

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

/* Suporte a Tema Escuro */
body.dark-theme .calendar-popover {
    background: #1a1d27;
    border-color: #2d3148;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

body.dark-theme .cal-shortcuts {
    background: #13151f;
    border-color: #2d3148;
}

body.dark-theme .cal-mode-tabs {
    background: #13151f;
}

body.dark-theme .cal-mode-tab.active {
    background: #1a1d27;
}

body.dark-theme .cal-day-cell:hover:not(.is-disabled) {
    background: rgba(139, 92, 246, 0.2);
}

body.dark-theme .cal-day-cell.in-range {
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}

body.dark-theme .cal-date-input {
    background: #13151f;
    border-color: #2d3148;
    color: #e2e8f0;
}

@media (max-width: 640px) {
    .cal-popover-body {
        flex-direction: column;
        min-width: 310px;
        max-width: 95vw;
    }
    .cal-shortcuts {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    .cal-shortcuts-title {
        display: none;
    }
    .cal-shortcut-btn {
        white-space: nowrap;
    }
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.metric-card {
    background-color: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.metric-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon.purple { background-color: var(--primary-light); color: var(--primary); }
.metric-icon.blue { background-color: var(--blue-light); color: var(--blue); }
.metric-icon.green { background-color: var(--green-light); color: var(--green); }
.metric-icon.red { background-color: var(--red-light); color: var(--red); }

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.metric-footer .trend {
    font-size: 12px;
    color: var(--text-light);
}

/* Pipeline Section */
.pipeline-header {
    margin-bottom: 16px;
}

.pipeline-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.pipeline-controls {
    display: flex;
    justify-content: flex-start; /* Move os filtros para a esquerda */
    align-items: center;
    margin-bottom: 24px;
}

.source-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
}

.pipeline-filters {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.filter-btn:hover {
    background-color: var(--bg-main);
}

.date-range-picker {
    display: flex;
    align-items: center;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.date-range-picker span {
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-arrow {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.nav-arrow:hover {
    background-color: var(--bg-main);
}

/* Kanban Board */
.kanban-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.column-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.column-header .dot.blue { background-color: var(--blue); }
.column-header .dot.purple { background-color: var(--purple); }
.column-header .dot.green { background-color: var(--green); }
.column-header .dot.yellow { background-color: var(--yellow); }
.column-header .dot.red { background-color: var(--red); }

.column-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.column-header .count {
    background-color: var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

.column-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 200px; /* Para permitir dropar cards quando vazio */
}

/* Kanban Card */
.kanban-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    
    height: auto;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

/* Bordas superiores coloridas baseadas na coluna */
.kanban-column[data-status="novo"] .kanban-card { border-top: 3px solid var(--blue) !important; }
.kanban-column[data-status="conversando"] .kanban-card { border-top: 3px solid var(--purple) !important; }
.kanban-column[data-status="fechado"] .kanban-card { border-top: 3px solid var(--green) !important; }
.kanban-column[data-status="followup"] .kanban-card { border-top: 3px solid var(--yellow) !important; }
.kanban-column[data-status="desqualificado"] .kanban-card { border-top: 3px solid var(--red) !important; }

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

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.45 !important;
    transform: scale(0.98) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    border: none !important;
    border-top: none !important;
    outline: none !important;
}

.kanban-column .kanban-card.dragging,
.kanban-column[data-status] .kanban-card.dragging,
.column-body .kanban-card.dragging {
    border: none !important;
    border-top: none !important;
    outline: none !important;
}

.kanban-column.drag-over,
.kanban-column[data-status].drag-over {
    outline: none !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border-radius: var(--radius-lg);
    transition: background 0.15s ease;
}

/* Oculta qualquer placeholder ou borda tracejada residual no drag-and-drop */
.kanban-placeholder,
.kanban-drop-placeholder,
.drag-placeholder,
.drag-over-placeholder,
.drop-indicator,
.kanban-card-placeholder {
    display: none !important;
    border: none !important;
    outline: none !important;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

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

.card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.card-info strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.card-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.status-bot {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background-color: var(--green-light);
    color: var(--green);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 10px !important;
    font-weight: 600;
    margin: 0;
    margin-left: auto; /* Alinha a direita no footer */
}

.status-bot i {
    width: 10px;
    height: 10px;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.detail-item i, .detail-item svg {
    width: 14px;
    height: 14px;
    stroke-width: 2px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto; /* Empurra as tags para o final do card */
}

.tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.tag.blue { background-color: var(--blue-light); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.2); }
.tag.purple { background-color: var(--purple-light); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.2); }
.tag.green { background-color: var(--green-light); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.tag.yellow { background-color: var(--yellow-light); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.tag.red { background-color: var(--red-light); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }
.tag.yellow-bright { background-color: #f9fbe7; color: #6a8217; border: 1px solid rgba(205, 220, 57, 0.5); }
.dot.yellow-bright { background-color: #cddc39; box-shadow: none; }
.tag.green-bright { background-color: #f7fee7; color: #4d7c0f; border: 1px solid rgba(132, 204, 22, 0.3); }
.dot.green-bright { background-color: #84cc16; box-shadow: none; }

/* Dark Mode Variables */
body.dark-mode {
    --bg-main: #0f172a;
    --bg-white: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --border-color: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    
    --primary-light: rgba(1, 103, 75, 0.2);
    --blue-light: rgba(59, 130, 246, 0.2);
    --green-light: rgba(34, 197, 94, 0.2);
    --red-light: rgba(239, 68, 68, 0.2);
    --yellow-light: rgba(234, 179, 8, 0.2);
}

/* Custom Scrollbar for Kanban */
.kanban-board::-webkit-scrollbar {
    height: 8px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: var(--radius-full);
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* =========================================
   WHATSAPP TAB STYLES
   ========================================= */

.whatsapp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    background-color: var(--bg-main);
}

.wa-split-pane {
    display: flex;
    flex: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* WA Sidebar */
.wa-sidebar {
    width: 320px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.wa-sidebar-header {
    padding: 16px 20px;
}

.wa-sidebar-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
}

.wa-search {
    padding: 0 16px 16px 16px;
    position: relative;
}

.wa-search input {
    width: 100%;
    padding: 10px 16px 10px 36px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.wa-search input:focus {
    border-color: var(--primary);
}

.wa-search i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.wa-list {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-loading {
    color: var(--text-light);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
}

/* WA Main Area */
.wa-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
}

.wa-main-header {
    height: 60px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
}

.wa-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.wa-icon-large {
    width: 80px;
    height: 80px;
    background-color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.wa-icon-large i {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.wa-empty-state h2 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 12px;
}

.wa-empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    line-height: 1.5;
}

/* =========================================
   WHATSAPP CHAT SIMULATION STYLES
   ========================================= */

/* WhatsApp Conversation Filter Tabs */
.wa-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
}
.wa-filter-btn {
    flex: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.wa-filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
}
.wa-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.wa-filter-btn.active .filter-count-badge {
    background: #fff;
    color: var(--primary);
}
.filter-count-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.status-indicator.red {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}
.status-indicator.green {
    background: #10b981;
}

/* Chat Status Pills */
.chat-status-pill {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.chat-status-pill.pill-waiting {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.chat-status-pill.pill-answered {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.chat-status-pill.pill-blocked {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.dot-blink {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ef4444;
    display: inline-block;
    animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.contact-item.waiting-reply {
    background-color: rgba(239, 68, 68, 0.02);
}
.contact-item.waiting-reply .contact-last-msg {
    font-weight: 600;
    color: var(--text-main);
}

.dark-theme .chat-status-pill.pill-waiting {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}
.dark-theme .chat-status-pill.pill-answered {
    background-color: rgba(16, 185, 129, 0.15);
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.3);
}
.dark-theme .chat-status-pill.pill-blocked {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}
.dark-theme #btnResolveChat {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #86efac !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.contact-item:hover, .contact-item.active {
    background-color: var(--bg-main);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.contact-avatar img,
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.contact-info {
    flex: 1;
    overflow: hidden;
}

.contact-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.contact-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-time {
    font-size: 11px;
    color: var(--text-light);
}

.contact-last-msg {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.contact-badge {
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
}

.wa-main-header {
    justify-content: space-between;
}

.active-chat-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-chat-info span {
    font-weight: 600;
    color: var(--text-main);
}

.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #f0f2f5; /* Zap background color */
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: min(78%, 460px);
    margin-bottom: 6px;
    position: relative;
}

.message-wrapper.received {
    align-self: flex-start;
}

.message-wrapper.sent {
    align-self: flex-end;
}

.message-bubble {
    padding: 6px 9px 6px 9px;
    border-radius: 8px;
    font-size: 14.2px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
    color: #111b21;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    word-break: break-word;
    overflow-wrap: break-word;
}

.message-wrapper.received .message-bubble {
    background-color: #ffffff;
    border-top-left-radius: 0;
}

.message-wrapper.sent .message-bubble {
    background-color: #d9fdd3; /* WhatsApp Web official green */
    border-top-right-radius: 0;
    padding-right: 24px;
}

/* Dark Theme Bubbles */
.dark-theme .message-wrapper.received .message-bubble {
    background-color: #202c33;
    color: #e9edef;
}
.dark-theme .message-wrapper.sent .message-bubble {
    background-color: #005c4b;
    color: #e9edef;
}

.wa-message-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14.2px;
    line-height: 1.45;
}

.wa-message-text strong {
    font-weight: 700;
}

.wa-message-text em {
    font-style: italic;
}

.wa-message-text del {
    text-decoration: line-through;
    opacity: 0.85;
}

.wa-message-text a, .wa-link {
    color: #027eb5;
    text-decoration: underline;
    word-break: break-all;
}
.wa-message-text a:hover, .wa-link:hover {
    color: #015c8a;
}
.dark-theme .wa-message-text a, .dark-theme .wa-link {
    color: #53bdeb;
}

.wa-inline-code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 4px;
    border-radius: 4px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 12.5px;
}
.dark-theme .wa-inline-code {
    background: rgba(255, 255, 255, 0.1);
}

.wa-quote {
    border-left: 3px solid #00a884;
    padding-left: 8px;
    margin: 4px 0;
    color: #54656f;
    font-style: italic;
}
.dark-theme .wa-quote {
    color: #8696a0;
}

/* Google Maps / Link Preview Card */
.wa-preview-card {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.wa-preview-card:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.dark-theme .wa-preview-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.wa-preview-thumb {
    width: 100%;
    height: 165px;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
}
.wa-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.wa-preview-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wa-preview-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #111b21;
}
.dark-theme .wa-preview-title {
    color: #e9edef;
}
.wa-preview-desc {
    font-size: 12px;
    color: #667781;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark-theme .wa-preview-desc {
    color: #8696a0;
}
.wa-preview-domain {
    font-size: 11px;
    color: #8696a0;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Message Meta (Time & Blue Checks) */
.message-meta {
    float: right;
    margin-left: 8px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #667781;
    line-height: 15px;
    user-select: none;
    vertical-align: bottom;
}
.dark-theme .message-meta {
    color: rgba(233, 237, 239, 0.6);
}
.message-check {
    color: #53bdeb;
    display: inline-flex;
    align-items: center;
}
.message-check svg {
    width: 14px;
    height: 14px;
}

/* WhatsApp Media Messages (Image, Video, Audio, Document) */
.message-bubble.message-bubble-media {
    padding: 4px;
    max-width: 340px;
}
.wa-media-image {
    max-width: 100%;
    max-height: 380px;
    border-radius: 6px;
    margin-bottom: 2px;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}
.wa-media-image:hover {
    opacity: 0.95;
}
.wa-media-video-container {
    width: 100%;
    max-width: 320px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2px;
}
.wa-media-video {
    width: 100%;
    max-height: 300px;
    display: block;
    border-radius: 6px 6px 0 0;
    outline: none;
}
.wa-media-audio-container {
    padding: 6px 4px 2px 4px;
    width: 280px;
    max-width: 100%;
}
.wa-media-audio {
    width: 100%;
    height: 36px;
    display: block;
    outline: none;
}
.wa-media-actions {
    display: flex;
    justify-content: flex-end;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.dark-theme .wa-media-actions {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
.wa-media-download-link {
    font-size: 11px;
    font-weight: 500;
    color: #00a884;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.wa-media-download-link:hover {
    text-decoration: underline;
    color: #008f6f;
}
.dark-theme .wa-media-download-link {
    color: #25d366;
}
/* Document Card */
.wa-doc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    margin-bottom: 4px;
    min-width: 220px;
    max-width: 320px;
}
.dark-theme .wa-doc-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
.wa-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wa-doc-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wa-doc-title {
    font-size: 13px;
    font-weight: 600;
    color: #111b21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-theme .wa-doc-title {
    color: #e9edef;
}
.wa-doc-sub {
    font-size: 11px;
    color: #667781;
}
.dark-theme .wa-doc-sub {
    color: #8696a0;
}
.wa-doc-download-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #54656f;
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.wa-doc-download-btn:hover {
    background: #00a884;
    color: #fff;
}
.dark-theme .wa-doc-download-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e9edef;
}
.dark-theme .wa-doc-download-btn:hover {
    background: #00a884;
    color: #fff;
}

/* Media Captions & Lazy Loading Cards */
.wa-media-caption {
    padding: 5px 6px 2px 6px;
    font-size: 13.5px;
    line-height: 1.42;
    color: #111b21;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.dark-theme .wa-media-caption {
    color: #e9edef;
}
.wa-media-lazy-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 230px;
    min-height: 135px;
    padding: 18px 16px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(1, 103, 75, 0.1), rgba(0, 168, 132, 0.06));
    border: 1px dashed rgba(0, 168, 132, 0.35);
    color: #111b21;
    text-align: center;
}
.dark-theme .wa-media-lazy-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(255, 255, 255, 0.04));
    border-color: rgba(37, 211, 102, 0.3);
    color: #e9edef;
}
.wa-media-lazy-box.is-video {
    background: linear-gradient(145deg, #111b21, #1e2a30);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.wa-media-lazy-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    background: #00a884;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, background 0.15s ease;
}
.wa-media-lazy-btn:hover {
    background: #008f6f;
    transform: translateY(-1px);
}
.wa-media-lazy-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}
.wa-media-lazy-meta {
    font-size: 11.5px;
    opacity: 0.8;
}
.wa-media-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 12.5px;
    color: #667781;
}
.dark-theme .wa-media-fallback {
    background: rgba(255, 255, 255, 0.06);
    color: #8696a0;
}

/* Lightbox Modal para Visualização de Imagens em Tela Cheia */
.wa-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(11, 20, 26, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.18s ease-out;
}
.wa-lightbox-topbar {
    position: absolute;
    top: 14px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.wa-lightbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}
.wa-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.wa-lightbox-img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 42px rgba(0, 0, 0, 0.55);
}
.wa-lightbox-caption {
    margin-top: 12px;
    max-width: 80vw;
    text-align: center;
    color: #e9edef;
    font-size: 14px;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 14px;
    border-radius: 8px;
}

/* Quick Replies Bar (Respostas Rápidas acima da caixa de diálogo) */
.quick-replies-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.quick-replies-bar::-webkit-scrollbar {
    display: none;
}
.quick-reply-btn {
    border: 1px solid rgba(0, 168, 132, 0.4);
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 13px;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
}
.quick-reply-btn:hover {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
    transform: translateY(-1px);
}
.quick-reply-btn:active {
    transform: translateY(0);
}
.quick-reply-btn svg {
    width: 13px;
    height: 13px;
    opacity: 0.85;
}

/* Dark Theme Quick Replies */
.dark-theme .quick-replies-bar {
    background-color: #111b21;
    border-color: rgba(255, 255, 255, 0.08);
}
.dark-theme .quick-reply-btn {
    background: rgba(0, 168, 132, 0.12);
    border-color: rgba(0, 168, 132, 0.4);
    color: #25d366;
}
.dark-theme .quick-reply-btn:hover {
    background: rgba(0, 168, 132, 0.22);
    border-color: #00a884;
    color: #86efac;
}

/* Auto-expanding Chat Input Area */
.chat-input-area {
    min-height: 62px;
    height: auto;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: flex-end;
    padding: 10px 16px;
    gap: 10px;
}

.chat-input-area textarea {
    flex: 1;
    min-height: 42px;
    max-height: 140px;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    outline: none;
    font-size: 14.5px;
    font-family: inherit;
    resize: none;
    line-height: 1.4;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: thin;
    transition: border-color var(--transition-fast);
}

.chat-input-area textarea:focus {
    border-color: var(--primary);
    background-color: var(--bg-surface);
}

.chat-input-area .btn-send {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 !important;
    margin-bottom: 1px;
}

.btn-send i {
    margin-left: -2px; /* slight visual fix for send icon */
}

/* Agent Toggle Switch */
.agent-toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-main);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.agent-status-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--green);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--green);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* =========================================
   RELATÓRIOS TAB STYLES
   ========================================= */

.relatorios-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: var(--bg-main);
}

.reports-header {
    margin-bottom: 24px;
}

.reports-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.reports-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

/* ApexCharts custom styles to blend with theme */
.apexcharts-tooltip {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-main) !important;
}

.apexcharts-tooltip-title {
    background: var(--bg-main) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
}

.apexcharts-text tspan {
    font-family: 'Inter', sans-serif;
}

.apexcharts-legend-text {
    color: var(--text-muted) !important;
    font-family: 'Inter', sans-serif !important;
}

/* =========================================
   CONFIGURAÇÕES TAB STYLES
   ========================================= */

.config-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: var(--bg-main);
}

.config-header {
    margin-bottom: 24px;
}

.config-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.config-grid.profile-layout,
.config-grid.advanced-layout {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
}

.config-grid.profile-layout .config-column,
.config-grid.advanced-layout .config-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.config-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.config-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-main);
}

.config-card-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.config-card-header h4 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.config-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(1, 103, 75, 0.1);
}

.avatar-upload, .logo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    background-size: cover;
    background-position: center;
}

.logo-preview {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.btn-outline {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-outline:hover {
    background-color: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(1, 103, 75, 0.2);
}

.btn-primary:hover {
    background-color: #014d38; /* Tom mais escuro do roxo */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(1, 103, 75, 0.3);
}

.btn-primary i {
    width: 18px;
    height: 18px;
}

.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.preference-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pref-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pref-info strong {
    font-size: 14px;
    color: var(--text-main);
}

.pref-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.config-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================
   NOTIFICATIONS PANEL
   ============================================= */
.notif-panel {
    position: absolute;
    top: 55px;
    right: 0;
    width: 340px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.notif-header strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.notif-clear-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.notif-clear-btn:hover {
    color: var(--primary-dark);
}

.notif-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 360px;
    overflow-y: auto;
}

.notif-list::-webkit-scrollbar {
    width: 6px;
}
.notif-list::-webkit-scrollbar-track {
    background: transparent;
}
.notif-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.notif-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.notif-item:last-child {
    border-bottom: none;
}

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

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon i {
    width: 20px;
    height: 20px;
}

.notif-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.notif-content p {
    font-size: 14px;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

.notif-content span {
    font-size: 12px;
    color: var(--text-muted);
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Lead Rating Dot */
.lead-rating-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    margin-left: auto;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.lead-rating-dot:hover {
    opacity: 0.8;
}

.lead-rating-dot.rating-none {
    background-color: var(--border-color);
}

.lead-rating-dot.rating-green {
    background-color: var(--green);
}

.lead-rating-dot.rating-yellow {
    background-color: var(--yellow);
}

.lead-rating-dot.rating-red {
    background-color: var(--red);
}

/* ========================================================= */
/* LOGIN OVERLAY                                             */
/* ========================================================= */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-header {
    text-align: center;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.login-logo i {
    width: 32px;
    height: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--red);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    text-align: center;
}

.login-btn {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 15px;
}

/* ========================================================= */
/* BRANDING (UNIONLABS)                                      */
/* ========================================================= */
.company-brand-login {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.company-brand-login strong {
    color: var(--primary);
}

.company-brand-sidebar {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

.company-brand-sidebar strong {
    color: var(--primary);
}

.contact-top-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.unread-badge {
    background-color: var(--green); /* Cor chamativa para a notificação */
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 6px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

/* --- Message Actions (Editar / Apagar Mensagens) --- */
.message-wrapper {
    position: relative;
    margin-bottom: 4px;
}

.message-bubble {
    position: relative;
}

.msg-action-trigger {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.12);
    cursor: pointer;
    display: flex;
    opacity: 0.75;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    color: #54656f;
    z-index: 25;
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.message-wrapper:hover .msg-action-trigger,
.msg-action-trigger:hover,
.msg-action-trigger.active {
    opacity: 1;
    pointer-events: auto;
}

.msg-action-trigger:hover {
    background: #ffffff;
    color: #111b21;
    transform: scale(1.12);
}

.dark-theme .msg-action-trigger {
    background: rgba(32, 44, 51, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
    color: #aebac1;
}

.dark-theme .msg-action-trigger:hover {
    background: #2a3942;
    color: #e9edef;
}

/* Dropdown Menu de Ações da Mensagem */
.msg-dropdown-menu {
    position: absolute;
    right: 4px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    padding: 4px 0;
    min-width: 140px;
    z-index: 9999;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeInMsgMenu 0.12s ease-out;
}

.msg-dropdown-menu:not(.open-up) {
    top: 28px;
    bottom: auto;
}

.msg-dropdown-menu.open-up {
    top: auto !important;
    bottom: 28px !important;
    margin-bottom: 2px !important;
}

@keyframes fadeInMsgMenu {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dark-theme .msg-dropdown-menu {
    background: #233138;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.6);
}

.msg-dropdown-item {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b4a54;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.dark-theme .msg-dropdown-item {
    color: #d1d7db;
}

.msg-dropdown-item:hover {
    background: #f5f6f6;
}

.dark-theme .msg-dropdown-item:hover {
    background: #182229;
}

.msg-dropdown-item.danger {
    color: #ea4335;
}

.msg-dropdown-item.danger:hover {
    background: #fee2e2;
}

.dark-theme .msg-dropdown-item.danger:hover {
    background: rgba(234, 67, 53, 0.15);
}

.msg-dropdown-item svg {
    width: 14px;
    height: 14px;
}

/* Tag de Mensagem Editada */
.msg-edited-tag {
    font-size: 11px;
    color: var(--text-muted, #667781);
    font-style: italic;
    margin-right: 4px;
    user-select: none;
}

/* Editor Inline */
.msg-inline-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 220px;
}

.message-bubble:has(.msg-inline-editor) {
    min-width: 260px;
    max-width: 90% !important;
}

.msg-inline-editor textarea {
    width: 100%;
    min-height: 52px;
    max-height: 160px;
    padding: 6px 8px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #10b981;
    border-radius: 6px;
    background: #ffffff;
    color: #111b21;
    resize: vertical;
    outline: none;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.dark-theme .msg-inline-editor textarea {
    background: #111b21;
    color: #e9edef;
    border-color: #00a884;
    box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.25);
}

.msg-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.msg-inline-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.msg-inline-btn.btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.msg-inline-btn.btn-cancel:hover {
    background: #e5e7eb;
}

.dark-theme .msg-inline-btn.btn-cancel {
    background: #2a3942;
    color: #d1d7db;
}

.msg-inline-btn.btn-save {
    background: #10b981;
    color: #ffffff;
}

.msg-inline-btn.btn-save:hover {
    background: #059669;
}

.dark-theme .msg-inline-btn.btn-save {
    background: #00a884;
    color: #111b21;
}

/* CRM Toast Notification */
#crmToastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.crm-toast-msg {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: auto;
    color: #ffffff;
}

.crm-toast-msg.success { background: #059669; }
.crm-toast-msg.info { background: #2563eb; }
.crm-toast-msg.warning { background: #d97706; }
.crm-toast-msg.error { background: #dc2626; }

.crm-toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   WHATSAPP AUDIO PLAYER & VOICE NOTES
   ============================================= */
.wa-audio-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    min-width: 260px;
    max-width: 330px;
}

.wa-audio-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.message-wrapper.sent .wa-audio-avatar {
    background: #a7f3d0;
    color: #065f46;
}

.dark-theme .wa-audio-avatar {
    background: #334155;
    color: #94a3b8;
}

.dark-theme .message-wrapper.sent .wa-audio-avatar {
    background: #064e3b;
    color: #6ee7b7;
}

.wa-audio-avatar-mic {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

.wa-audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.message-wrapper.sent .wa-audio-play-btn {
    background: #059669;
}

.dark-theme .wa-audio-play-btn {
    background: #3b82f6;
}

.dark-theme .message-wrapper.sent .wa-audio-play-btn {
    background: #00a884;
}

.wa-audio-play-btn:hover {
    transform: scale(1.06);
}

.wa-audio-play-btn:active {
    transform: scale(0.96);
}

.wa-audio-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wa-audio-slider-container {
    position: relative;
    width: 100%;
    height: 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.wa-audio-slider-track {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(100, 116, 139, 0.25);
    position: relative;
    overflow: hidden;
}

.wa-audio-slider-fill {
    height: 100%;
    width: 0%;
    background: #2563eb;
    border-radius: 2px;
    transition: width 0.05s linear;
}

.message-wrapper.sent .wa-audio-slider-fill {
    background: #059669;
}

.dark-theme .wa-audio-slider-fill {
    background: #60a5fa;
}

.dark-theme .message-wrapper.sent .wa-audio-slider-fill {
    background: #00a884;
}

.wa-audio-slider-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    pointer-events: none;
    transition: left 0.05s linear;
}

.message-wrapper.sent .wa-audio-slider-thumb {
    background: #059669;
}

.dark-theme .wa-audio-slider-thumb {
    background: #60a5fa;
}

.dark-theme .message-wrapper.sent .wa-audio-slider-thumb {
    background: #00a884;
}

.wa-audio-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted, #64748b);
    line-height: 1;
    user-select: none;
}

.wa-audio-speed-btn {
    border: none;
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-main, #1e293b);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease;
    user-select: none;
}

.wa-audio-speed-btn:hover {
    background: rgba(100, 116, 139, 0.3);
}

.dark-theme .wa-audio-speed-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

/* Transcrição de Áudio (Ocultada a pedido: apenas o player de voz autêntica deve ser exibido) */
.wa-audio-transcription-box {
    display: none !important;
}

/* =============================================
   WHATSAPP MESSAGE REACTIONS (Hover Seguro & Visual Fiel)
   ============================================= */
.message-wrapper {
    position: relative;
}

/* Botão de reação no hover da mensagem */
.wa-reaction-trigger {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    /* Delay no mouseleave dá tempo ao usuário para mover o mouse sem sumir abruptamente */
    transition: opacity 0.22s ease 0.4s, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, color 0.15s ease;
    z-index: 20;
}

/* Ponte invisível de hover para o mouse não perder foco ao mover da bolha ao botão */
.wa-reaction-trigger::before {
    content: '';
    position: absolute;
    top: -12px;
    bottom: -12px;
    left: -16px;
    right: -16px;
    z-index: -1;
}

.message-wrapper.received .wa-reaction-trigger {
    right: -28px;
}

.message-wrapper.sent .wa-reaction-trigger {
    left: -28px;
}

/* Mostra imediatamente ao passar o mouse na bolha ou no próprio gatilho */
.message-wrapper:hover .wa-reaction-trigger,
.wa-reaction-trigger:hover,
.message-wrapper:has(.wa-reaction-picker.open) .wa-reaction-trigger,
.message-wrapper:has(.wa-reaction-picker.pinned) .wa-reaction-trigger {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}

.wa-reaction-trigger:hover {
    transform: translateY(-50%) scale(1.15);
    color: #1e293b;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dark-theme .wa-reaction-trigger {
    background: #252836;
    border-color: #3b3f54;
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.dark-theme .wa-reaction-trigger:hover {
    background: #2d3148;
    color: #f1f5f9;
    border-color: #4f566b;
}

/* Barra flutuante de reações estilo WhatsApp */
.wa-reaction-picker {
    position: absolute;
    top: -44px;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 24px;
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    user-select: none;
}

/* Ponte invisível que conecta o picker à bolha para nunca perder o hover */
.wa-reaction-picker::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 18px;
}

/* Fixado aberto quando clicado */
.wa-reaction-picker.open,
.wa-reaction-picker.pinned {
    display: flex !important;
    animation: waReactionPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.message-wrapper.received .wa-reaction-picker {
    left: 8px;
}

.message-wrapper.sent .wa-reaction-picker {
    right: 8px;
}

.dark-theme .wa-reaction-picker {
    background: #252836;
    border-color: #3b3f54;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

@keyframes waReactionPop {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wa-reaction-emoji-btn {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
}

.wa-reaction-emoji-btn:hover {
    transform: scale(1.35) translateY(-2px);
    background: rgba(0, 0, 0, 0.06);
}

.dark-theme .wa-reaction-emoji-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Pílula / Badge da reação na bolha da mensagem */
.wa-reaction-pill {
    position: absolute;
    bottom: -9px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    border-radius: 12px;
    background: var(--bg-white, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, background 0.15s ease;
    z-index: 5;
}

.message-wrapper.received .wa-reaction-pill {
    right: 8px;
}

.message-wrapper.sent .wa-reaction-pill {
    left: 8px;
}

.wa-reaction-pill:hover {
    transform: scale(1.15);
    background: #f1f5f9;
}

.dark-theme .wa-reaction-pill {
    background: #252836;
    border-color: #3b3f54;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.dark-theme .wa-reaction-pill:hover {
    background: #2d3148;
}

/* =============================================
   LEAD CONTEXT MENU (Classificar Atendimento)
   ============================================= */
#leadAttendanceContextMenu {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: opacity 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.status-option:hover,
.lead-ctx-opt:hover {
    background-color: var(--bg-main, #f1f5f9) !important;
}

.dark-theme #leadAttendanceContextMenu,
.dark-theme #kanbanContextMenu {
    background: #1a1d27 !important;
    border-color: #2d3148 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

.dark-theme .status-option:hover,
.dark-theme .lead-ctx-opt:hover {
    background-color: #242938 !important;
}

/* =============================================
   PLANILHA GOOGLE SHEETS
   ============================================= */
.planilha-content {
    animation: fadeIn 0.2s ease-in-out;
}

.planilha-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 16px;
}

.planilha-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.planilha-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f9d5818;
    color: #0f9d58;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #0f9d5830;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.planilha-badge svg {
    width: 14px;
    height: 14px;
}

.planilha-header-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.planilha-header-info p {
    font-size: 13px;
    margin: 0;
    color: var(--text-muted);
}

.planilha-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sheet-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-sheet-action:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-sheet-action svg {
    width: 15px;
    height: 15px;
}

.btn-sheet-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-sheet-primary:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.planilha-frame-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 195px);
    min-height: 580px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.planilha-frame-container.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
}

.planilha-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

.planilha-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    gap: 12px;
    z-index: 10;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.planilha-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinSheet 0.8s linear infinite;
}

@keyframes spinSheet {
    to { transform: rotate(360deg); }
}

.btn-exit-fullscreen {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 100;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}

.btn-exit-fullscreen:hover {
    background: #000000;
    transform: scale(1.02);
}

.btn-exit-fullscreen svg {
    width: 14px;
    height: 14px;
}
/* =========================================================
   ESTILOS: GRAVADOR DE ÁUDIO & NOTIFICAÇÕES DINÂMICAS
   ========================================================= */

/* Botão de Microfone no Chat */
.chat-input-area .btn-record {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 !important;
    margin-bottom: 1px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chat-input-area .btn-record:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: scale(1.06);
}

/* Quando gravando, oculta os campos comuns */
.chat-input-area.is-recording > :not(.audio-recording-bar) {
    display: none !important;
}

/* Barra de Gravação Ativa */
.audio-recording-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    background: var(--bg-surface, #ffffff);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 24px;
    padding: 4px 14px 4px 18px;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
    box-sizing: border-box;
    animation: fadeIn 0.2s ease-in-out;
}

.rec-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.rec-dot-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ef4444;
    animation: recPulse 1.2s infinite ease-in-out;
}

@keyframes recPulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rec-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.rec-timer {
    font-size: 14.5px;
    font-weight: 700;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* Animação de Onda Sonora */
.rec-soundwave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
    padding: 0 12px;
}

.rec-bar {
    width: 3px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 2px;
    animation: soundWave 0.8s ease-in-out infinite alternate;
}

.rec-bar:nth-child(1) { animation-delay: 0.1s; height: 8px; }
.rec-bar:nth-child(2) { animation-delay: 0.3s; height: 16px; }
.rec-bar:nth-child(3) { animation-delay: 0.5s; height: 10px; }
.rec-bar:nth-child(4) { animation-delay: 0.2s; height: 22px; }
.rec-bar:nth-child(5) { animation-delay: 0.4s; height: 14px; }
.rec-bar:nth-child(6) { animation-delay: 0.6s; height: 18px; }
.rec-bar:nth-child(7) { animation-delay: 0.15s; height: 12px; }
.rec-bar:nth-child(8) { animation-delay: 0.35s; height: 8px; }

@keyframes soundWave {
    0% { transform: scaleY(0.4); opacity: 0.5; }
    100% { transform: scaleY(1.3); opacity: 1; }
}

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

.rec-btn-cancel {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.rec-btn-cancel:hover {
    background-color: #fee2e2;
    color: #ef4444;
    transform: scale(1.08);
}

.rec-btn-confirm {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background-color: #25D366 !important;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

.rec-btn-confirm:hover {
    background-color: #1ebc57 !important;
    transform: scale(1.08);
}

/* Notificações Funcionais */
.notification-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

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

.notification-item.unread {
    background-color: rgba(37, 211, 102, 0.05);
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    flex-shrink: 0;
    margin-top: 6px;
    margin-left: 6px;
}

.notif-dismiss-btn {
    opacity: 0;
    pointer-events: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
    transition: all var(--transition-fast);
    margin-left: 4px;
}

.notification-item:hover .notif-dismiss-btn {
    opacity: 0.8;
    pointer-events: auto;
}

.notif-dismiss-btn:hover {
    opacity: 1;
    color: #ef4444;
    background-color: #fee2e2;
}

/* =========================================================
   ESTILOS PREMIUM: TELA DE LOGIN & SEGURANÇA
   ========================================================= */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, rgba(37, 211, 102, 0.08), transparent 70%), var(--bg-main, #f8fafc);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background-color: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.3s ease-out;
}

.login-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-password-wrapper input {
    width: 100%;
    padding-right: 44px !important;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s ease;
}

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

.btn-toggle-password svg, .btn-toggle-password i {
    width: 18px;
    height: 18px;
}

.login-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-top: -4px;
    margin-bottom: 2px;
}

.login-remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.login-remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.login-forgot-link {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration 0.15s ease;
}

.login-forgot-link:hover {
    text-decoration: underline;
}

.caps-lock-badge {
    display: none;
    font-size: 11.5px;
    font-weight: 600;
    color: #b45309;
    background-color: #fef3c7;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 6px;
    border: 1px solid #fde68a;
    width: fit-content;
}

.login-security-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light, #94a3b8);
    margin-top: -4px;
}

.login-security-tag svg, .login-security-tag i {
    width: 14px;
    height: 14px;
    color: #10b981;
}

html.user-is-logged-in #loginOverlay {
    display: none !important;
}

html.user-is-logged-in #appContainer {
    display: flex !important;
}
