:root {
    --efa-bg-app: #f0f2f5;
    --efa-bg-card: #ffffff;
    --efa-text-main: #343a40;
    --efa-text-muted: #6c757d;
    --efa-border: #e9ecef;
    --efa-accent: #2271b1;
    --efa-accent-hover: #135e96;
    --efa-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    --efa-input-bg: #ffffff;
    --efa-row-hover: #f8f9fa;
    --efa-chart-grid: #e9ecef;
    --efa-chart-text: #6c757d;
    --efa-modal-overlay: rgba(0, 0, 0, 0.5);
    --efa-header-bg: #ffffff;
    --efa-danger: #e03131;
    --efa-danger-hover: #c92a2a;
    --efa-success: #2f9e44;
    --efa-excel: #1D6F42;
}

body.efa-dark-mode {
    --efa-bg-app: #141b2d;
    --efa-bg-card: #1f2940;
    --efa-text-main: #e0e0e0;
    --efa-text-muted: #a0a0c0;
    --efa-border: #3a3a5e;
    --efa-accent: #e01d75;
    /* <--- AHORA ES FUXIA */
    --efa-accent-hover: #be1661;
    /* <--- HOVER FUXIA OSCURO */
    --efa-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    --efa-input-bg: #3a3a5e;
    --efa-row-hover: #26334d;
    --efa-chart-grid: #3a3a5e;
    --efa-chart-text: #a0a0c0;
    --efa-header-bg: #1f2940;
    --efa-danger: #ff6b6b;
    --efa-danger-hover: #fa5252;
    --efa-excel: #2e7d32;
}

body.toplevel_page_gw-elementor {
    background-color: var(--efa-bg-app);
    transition: background-color 0.3s;
}

.efa-wrapper {
    box-sizing: border-box;
    width: 100%;
    padding-right: 20px;
    margin-top: 20px;
    font-family: 'Roboto', sans-serif;
    color: var(--efa-text-main);
}

.efa-page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.efa-theme-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--efa-text-muted);
    transition: all 0.2s;
    box-shadow: var(--efa-shadow);
}

.efa-theme-switcher:hover {
    border-color: var(--efa-accent);
    color: var(--efa-accent);
}

.efa-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.efa-kpi-card {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    padding: 15px 20px;
    border-radius: 12px;
    border-top: 4px solid var(--efa-accent);
    box-shadow: var(--efa-shadow);
    display: flex;
    flex-direction: column;
}

.efa-kpi-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
}

.efa-kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.efa-kpi-card h4 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--efa-text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.efa-kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--efa-text-main);
    line-height: 1;
}

.efa-kpi-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--efa-border);
    font-size: 11px;
    color: var(--efa-text-muted);
}

.efa-kpi-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.efa-kpi-row strong {
    color: var(--efa-text-main);
}

.efa-history-wide {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    border-radius: 12px;
    border-top: 4px solid #ab47bc;
    box-shadow: var(--efa-shadow);
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 110px;
}

.efa-hw-title-box {
    flex: 0 0 100px;
}

.efa-hw-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--efa-text-muted);
    line-height: 1.4;
    margin: 0;
}

.efa-hw-scroll-container {
    flex: 1;
    display: flex;
    gap: 0px;
    overflow-x: auto;
    align-items: center;
    padding-bottom: 5px;
}

.efa-hw-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.efa-hw-scroll-container::-webkit-scrollbar-thumb {
    background: var(--efa-border);
    border-radius: 2px;
}

.efa-hw-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    border-right: 1px solid var(--efa-border);
    padding-right: 0px;
    justify-content: center;
}

.efa-hw-item:last-child {
    border-right: none;
}

.efa-hw-item-label {
    font-size: 10px;
    color: var(--efa-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.2;
}

.efa-hw-item-year {
    display: block;
    font-size: 9px;
    opacity: 0.7;
    font-weight: 400;
}

.efa-hw-item-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--efa-text-main);
}

.efa-hw-mini-chart {
    width: 320px;
    height: 90px;
    flex: 0 0 320px;
    position: relative;
}

.efa-year-grid {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.efa-year-grid::-webkit-scrollbar {
    height: 8px;
}

.efa-month-card {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 0 0 auto;
    box-shadow: var(--efa-shadow);
    transition: transform 0.2s;
}

.efa-month-card:hover {
    transform: translateY(-3px);
    border-color: var(--efa-accent);
}

.efa-mc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--efa-accent);
    margin-bottom: 5px;
    text-transform: capitalize;
}

.efa-mc-total {
    font-size: 26px;
    font-weight: 700;
    color: var(--efa-text-main);
    margin-bottom: 10px;
}

.efa-mc-breakdown {
    font-size: 11px;
    color: var(--efa-text-muted);
    border-top: 1px solid var(--efa-border);
    padding-top: 10px;
}

.efa-mc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.efa-card {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    padding: 25px;
    box-shadow: var(--efa-shadow);
    border-radius: 12px;
    min-width: 0;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.efa-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--efa-border);
    padding-bottom: 15px;
}

.efa-card-header-row h3 {
    margin: 0;
    font-size: 15px;
    text-transform: uppercase;
    color: var(--efa-text-muted);
    padding: 0;
    border: none;
    font-weight: 700;
}

.efa-simple-header h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--efa-border);
    padding-bottom: 15px;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--efa-text-muted);
    font-weight: 700;
}

.efa-filters {
    display: flex;
    gap: 5px;
    /* Reduced gap */
    align-items: center;
    flex-wrap: wrap;
}

.efa-filters select,
.efa-filters input {
    height: 30px;
    /* Reduced height */
    font-size: 12px;
    /* Reduced font size */
    border-color: var(--efa-border);
    border-radius: 6px;
    color: var(--efa-text-main);
    background-color: var(--efa-input-bg);
    padding: 0 20px 0 8px;
    /* Reduced padding */
    min-width: 110px;
    /* Reduced min-width */
}

.efa-btn {
    background: var(--efa-accent);
    color: #fff;
    border: none;
    padding: 0 15px;
    /* Reduced padding */
    height: 30px;
    /* Reduced height */
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    /* Reduced font size */
    transition: background .2s;
}

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

.efa-hidden {
    display: none !important;
}

.efa-origin-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.efa-toggle-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--efa-border);
    background: var(--efa-bg-app);
    color: var(--efa-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.efa-toggle-btn:hover {
    border-color: var(--efa-accent);
    color: var(--efa-text-main);
}

.efa-toggle-btn.active {
    background: var(--efa-bg-card);
    border-color: currentColor;
    color: var(--efa-text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.efa-toggle-btn .efa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--efa-text-muted);
}

.efa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
    width: 100%;
}

.efa-rep-chart-box {
    position: relative;
    padding: 20px;
}

.efa-rep-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.efa-rep-table thead {
    background: #f5f5f5;
}

.efa-rep-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.efa-rep-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.efa-rep-table tbody tr:hover {
    background: #f9f9f9;
}

.efa-rep-table tbody tr:last-child td {
    border-bottom: none;
}

.efa-chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.efa-chart-container.full-width {
    height: 350px;
}

.efa-kpi-widget-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.efa-kpi-big-number {
    font-size: 64px;
    font-weight: 800;
    color: var(--efa-accent);
    line-height: 1.1;
    letter-spacing: -1px;
}

.efa-kpi-label {
    font-size: 14px;
    color: var(--efa-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.efa-kpi-sub {
    font-size: 12px;
    color: var(--efa-text-muted);
    margin-top: 5px;
    opacity: 0.7;
}

.efa-table-wrapper {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    box-shadow: var(--efa-shadow);
    border-radius: 12px;
    overflow: visible !important;
    position: relative;
}

.efa-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(1px);
    border-radius: 12px;
}

.efa-dark-mode .efa-loading-overlay {
    background: rgba(31, 41, 64, 0.7);
}

.efa-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--efa-accent);
    border-radius: 50%;
    animation: efa-spin 1s linear infinite;
}

.efa-dark-mode .efa-spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--efa-accent);
}

@keyframes efa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Nuevo contenedor interno solo para la tabla (Scroll horizontal si hace falta) */
.efa-table-scroll {
    width: 100%;
    display: block;
    /* Fuerza comportamiento de bloque */
    overflow-x: auto;
    overflow-y: visible;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.efa-records-counter {
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.efa-records-counter span {
    font-weight: 700;
    color: #333;
}

table.efa-table {
    width: 100% !important;
    /* El !important evita que se encoja */
    min-width: 100%;
    /* Doble seguridad */
    border-collapse: collapse;
    table-layout: fixed;
}

table.efa-table th,
table.efa-table td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--efa-border);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.efa-table th {
    background: #c1c4cb;
    font-weight: 700;
    color: #374151;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.efa-dark-mode table.efa-table th {
    background: #2a2a3e !important;
    color: #888 !important;
}

.efa-dark-mode table.efa-table tbody tr {
    background-color: #1f2940 !important;
}

.efa-dark-mode table.efa-table td {
    color: #e4e7eb !important;
    border-bottom-color: #3a3a4e !important;
    background-color: transparent !important;
}

.efa-dark-mode table.efa-table tr:hover td {
    background-color: rgba(93, 93, 250, 0.1) !important;
}

.efa-dark-mode table.efa-table tbody tr:hover {
    background-color: rgba(93, 93, 250, 0.15) !important;
}


.efa-dark-mode .efa-table-wrapper {
    background: #1f2940 !important;
    border-color: #3a3a4e !important;
}

.efa-dark-mode .efa-records-counter {
    background: #252b3a !important;
    border-bottom-color: #3a3a4e !important;
    color: #9ca3af !important;
}

.efa-dark-mode .efa-records-counter span {
    color: #e4e7eb !important;
}

.efa-dark-mode .efa-cell-email {
    color: #9ca3af !important;
}



table.efa-table td {
    font-size: 12px;
    color: var(--efa-text-main);
}

table.efa-table tr:hover td {
    background-color: var(--efa-row-hover);
    cursor: pointer;
}

/* Column Resizer */
.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
}

.column-resizer:hover {
    background-color: var(--efa-accent);
    opacity: 0.3;
}

.column-resizer:active {
    background-color: var(--efa-accent);
    opacity: 0.5;
}

/* Highlighted rows with keywords */
table.efa-table tr.efa-highlight-row {
    box-shadow: inset 3px 0 0 #e01d75 !important;
}

table.efa-table tr.efa-highlight-row td {
    background-color: transparent;
}

.efa-dark-mode table.efa-table tr.efa-highlight-row td {
    background-color: transparent !important;
}

table.efa-table tr.efa-highlight-row:hover td {
    background-color: rgba(224, 29, 117, 0.05);
}

.efa-dark-mode table.efa-table tr.efa-highlight-row:hover td {
    background-color: rgba(224, 29, 117, 0.1) !important;
}


/* Highlighted text within detail panel */
.efa-highlight-keyword {
    background-color: #ffcee2;
    padding: 2px 4px;
    border-radius: 3px;
}

.efa-dark-mode .efa-highlight-keyword {
    background-color: rgba(255, 206, 226, 0.4);
}

.efa-dark-mode .efa-table-toolbar {
    background-color: #1f2940 !important;
    border-bottom-color: #3a3a4e !important;
}

.efa-dark-mode .efa-table-title {
    color: #e4e7eb !important;
}

.efa-dark-mode .efa-cols-dropdown {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

.efa-dark-mode .efa-btn-icon {
    border-color: #3a3a4e !important;
    color: #9ca3af !important;
}

.efa-dark-mode .efa-btn-icon:hover {
    background: rgba(93, 93, 250, 0.1) !important;
    border-color: var(--efa-accent) !important;
    color: var(--efa-accent) !important;
}



.efa-no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--efa-text-muted);
    background-color: var(--efa-bg-card);
    width: 100%;
    /* Asegura que la celda interna ocupe todo */
}

.efa-cell-email {
    color: var(--efa-text-muted);
    font-size: 12px;
}


/* Tooltip for table headers */
.efa-tooltip-header {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--efa-text-muted);
    display: inline-block;
}

.efa-tooltip {
    position: fixed;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    display: none;
}

.efa-cell-url {
    font-family: monospace;
    color: var(--efa-accent) !important;
    /* Forzamos el azul */
    font-size: 11px !important;
    /* Forzamos el tamaño */
    letter-spacing: -0.5px !important;
    /* Forzamos el interletraje */
    opacity: 1 !important;
    /* Quitamos transparencias para que se vea nítido */
    font-weight: 500 !important;
    /* Un poco más de peso para que se lea bien al ser pequeña */
}

.efa-cell-status {
    text-overflow: clip !important;
    overflow: visible !important;
}

.efa-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.efa-badge.spam {
    background: #ffebee;
    color: #c62828;
}

.efa-badge.safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.efa-dark-mode .efa-badge.spam {
    background: rgba(255, 82, 82, 0.15);
    color: #ff5252;
}

.efa-dark-mode .efa-badge.safe {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.efa-delete-btn {
    color: #000000;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.efa-dark-mode .efa-delete-btn {
    color: #ced4da;
}

.efa-delete-btn:hover {
    color: var(--efa-danger);
    transform: scale(1.2);
}

.efa-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 10px 15px;
    /* Reduced padding */
    border-bottom: 1px solid var(--efa-border);
    background-color: var(--efa-bg-card);
    flex-wrap: wrap;
    gap: 5px;
    /* Reduced gap */
}

.efa-table-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--efa-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.efa-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.efa-control-group label {
    font-size: 12px;
    color: var(--efa-text-muted);
    font-weight: 600;
}

.efa-select-sm {
    height: 30px !important;
    padding: 0 24px 0 8px !important;
    font-size: 12px !important;
    border-radius: 6px;
    border: 1px solid var(--efa-border);
    background: var(--efa-bg-app);
    color: var(--efa-text-main);
}

.efa-btn-danger {
    background: var(--efa-danger);
    color: #fff;
    border: none;
    padding: 0 15px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
}

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

.efa-btn-excel {
    background: var(--efa-excel);
    color: #fff;
    border: none;
    padding: 0 15px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

.efa-btn-excel:hover {
    filter: brightness(1.1);
}

/* Highlighted Unread Badge */
.efa-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffcee2;
    color: #d91863;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    animation: pulse 2s ease-in-out infinite;
}

.efa-dark-mode .efa-highlight-badge {
    background: rgba(255, 206, 226, 0.2);
    color: #ffb3d4;
    border: 1px solid rgba(255, 206, 226, 0.3);
}

.efa-highlight-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

@keyframes pulse {

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

    50% {
        transform: scale(1.05);
    }
}

.efa-columns-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 5px;
}

.efa-btn-icon {
    background: transparent;
    border: 1px solid var(--efa-border);
    color: var(--efa-text-muted);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.efa-btn-icon:hover {
    color: var(--efa-accent);
    border-color: var(--efa-accent);
    background: var(--efa-row-hover);
}

.efa-cols-dropdown {
    position: absolute;
    top: 35px;
    right: 0;
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    width: 200px;
    z-index: 1000;
    padding: 10px;
    display: none;
}

.efa-cols-dropdown.open {
    display: block;
}

.efa-col-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
    color: var(--efa-text-main);
}

.efa-col-option input {
    margin: 0;
}

.efa-dot-green {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--efa-success);
}

.efa-dot-red {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--efa-danger);
}

.efa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.efa-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.efa-slide-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 520px;
    height: 100%;
    background: #fff;
    border-left: none;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12), -2px 0 10px rgba(0, 0, 0, 0.08);
    z-index: 100000;
    transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Dark Mode - Panel Principal */
.efa-dark-mode .efa-slide-panel {
    background: #1f2940;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4), -2px 0 10px rgba(0, 0, 0, 0.2);
}

.efa-slide-panel.open {
    right: 0;
}

#efa-panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 120px 0;
    background: transparent;
}

.efa-dark-mode #efa-panel-content {
    background: #1f2940;
}

.efa-panel-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.efa-dark-mode .efa-panel-header {
    background: linear-gradient(135deg, #1f2940 0%, #1a2236 100%);
    border-bottom-color: #3a3a4e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Cabecera del segundo panel (CRM) con fondo gris */
#efa-crm-panel .efa-panel-header {
    background: #f3f4f6;
}

.efa-dark-mode #efa-crm-panel .efa-panel-header {
    background: #2a2a3f;
    border-bottom-color: #3a3a4e;
}

/* Cabecera del panel de respuesta (mismo estilo que CRM) */
#efa-reply-panel .efa-panel-header {
    background: #f3f4f6;
}

.efa-dark-mode #efa-reply-panel .efa-panel-header {
    background: #2a2a3f;
    border-bottom-color: #3a3a4e;
}

.efa-panel-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.efa-panel-origin {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--efa-bg-main);
    border: 1px solid var(--efa-border);
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.efa-dark-mode .efa-panel-origin {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

.efa-panel-actions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 10px;
    flex-wrap: nowrap;
    /* Prevent wrapping */
}

.efa-ph-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--efa-border);
    background: var(--efa-bg-main);
    color: var(--efa-text-main);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.efa-ph-btn:hover {
    background: var(--efa-row-hover);
}

.efa-ph-btn.manage {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    border-color: #e01d75;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.3);
}

.efa-ph-btn.manage:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%);
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.4);
    transform: translateY(-1px);
}

.efa-dark-mode .efa-ph-btn.manage {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.4);
}

.efa-dark-mode .efa-ph-btn.manage:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%);
    box-shadow: 0 4px 16px rgba(224, 29, 117, 0.5);
}

.efa-ph-btn.delete {
    color: #c62828;
    border-color: #ffcdd2;
    background: #ffebee;
}

.efa-ph-btn.delete:hover {
    background: #ffcdd2;
}

.efa-ph-btn.spam-active {
    color: #2e7d32;
    border-color: #c8e6c9;
    background: #e8f5e9;
}

.efa-ph-btn.spam-inactive {
    color: #c62828;
    border-color: #ffcdd2;
    background: #ffebee;
}

.efa-close-btn {
    cursor: pointer;
    color: var(--efa-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background 0.2s;
}

.efa-close-btn:hover {
    background: var(--efa-row-hover);
    color: var(--efa-text-main);
}



.efa-nav-btn {
    background: transparent;
    border: 1px solid var(--efa-border);
    color: var(--efa-text-muted);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.efa-nav-btn:hover {
    border-color: var(--efa-accent);
    color: var(--efa-accent);
    background: var(--efa-bg-app);
}

.efa-dark-mode .efa-nav-btn {
    border-color: #3a3a4e;
    color: #9ca3af;
}

.efa-dark-mode .efa-nav-btn:hover {
    border-color: #e01d75;
    color: #e01d75;
    background: rgba(224, 29, 117, 0.1);
}

.efa-nav-counter {
    font-size: 13px;
    font-weight: 600;
    color: var(--efa-text-main);
    min-width: 40px;
    /* Reduced from 70px */
    text-align: center;
}

.efa-dark-mode .efa-nav-counter {
    color: #e4e7eb;
}

.efa-close-btn {
    background: none;
    border: none;
    color: var(--efa-text-muted);
    font-size: 26px;
    cursor: pointer;
    margin-left: 15px;
}

.efa-dark-mode .efa-close-btn {
    color: #9ca3af;
}

.efa-dark-mode .efa-close-btn:hover {
    color: #e4e7eb;
    background: rgba(255, 255, 255, 0.1);
}

.efa-panel-content {
    padding: 0;
    padding-bottom: 80px;
    /* Space for fixed action buttons */
    overflow-y: auto;
    flex: 1;
    color: var(--efa-text-main);
    background-color: var(--efa-bg-card);
}

.efa-panel-section {
    padding: 0 24px 20px 24px;
    border-bottom: 0;
    background: #ffffff;
    margin: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.efa-dark-mode .efa-panel-section {
    background: #1f2940;
}

.efa-panel-section:last-child {
    border-bottom: none;
}

.efa-sec-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1f2937;
    letter-spacing: 0.8px;
    margin: 0 -24px 20px -24px;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f3f4f6;
    border-bottom: none;
}

.efa-dark-mode .efa-sec-title {
    background: #2a2a3e;
    color: #e4e7eb;
}

.efa-sec-title .dashicons {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.3);
}

.efa-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 15px;
    background: #ffffff;
    padding: 16px;
    border-radius: 6px;
}

.efa-data-grid.single-col {
    grid-template-columns: 1fr;
    gap: 0px;
    background: #ffffff;
    padding: 0;
    border-radius: 0;
}

.efa-dark-mode .efa-data-grid,
.efa-dark-mode .efa-data-grid.single-col {
    background: #1f2940;
    border: none;
}

.efa-field-group {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
}

.efa-field-group:last-child {
    border-bottom: none;
}

.efa-fg-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.efa-dark-mode .efa-fg-label {
    color: #9ca3af;
}

.efa-fg-value {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    word-break: break-word;
    line-height: 1.6;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    min-height: 20px;
}

.efa-fg-value a {
    color: #1f2937;
    text-decoration: none;
    pointer-events: none;
    cursor: default;
}

.efa-fg-value.highlight {
    color: #1f2937;
    font-weight: 600;
    background: transparent;
}

.efa-dark-mode .efa-fg-value {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #e4e7eb;
}

.efa-dark-mode .efa-fg-value a {
    color: #e4e7eb;
}

.efa-dark-mode .efa-fg-value.highlight {
    color: #e4e7eb;
    background: transparent;
}

/* Special styling for message field - full width vertical layout */
.efa-field-group:has(.message-text) {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
}

.efa-field-group:has(.message-text) .efa-fg-label {
    font-size: 10px;
    text-transform: uppercase;
}

.efa-fg-value.message-text {
    padding: 12px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    white-space: pre-wrap;
    box-shadow: none;
    line-height: 1.6;
    min-height: 80px;
    font-family: inherit;
    resize: vertical;
}

.efa-dark-mode .efa-fg-value.message-text {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #e4e7eb;
}

.efa-user-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
    background: #ffffff;
    padding: 0;
    border-radius: 0;
}

.efa-dark-mode .efa-user-path {
    background: #1f2940;
}

.efa-path-step {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.efa-path-step:hover {
    border-color: #e01d75;
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.15);
    transform: translateY(-1px);
}

.efa-dark-mode .efa-user-path {
    background: #1f2940;
    border: 1px solid #1f2940;
}

.efa-dark-mode .efa-path-step {
    background: linear-gradient(135deg, #2a2a3e 0%, #1f2940 100%);
    border-color: #3a3a4e;
    color: #e4e7eb;
}

.efa-dark-mode .efa-path-step:hover {
    border-color: #e01d75;
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.3);
}

.efa-path-arrow {
    color: var(--efa-text-muted);
    font-size: 14px;
    margin: 0 2px;
}

.efa-panel-internal-actions {
    padding: 25px 30px;
    display: flex;
    gap: 15px;
    background: var(--efa-bg-app);
    margin-top: auto;
    border-top: 1px solid var(--efa-border);
    padding-bottom: 90px;
}

.efa-panel-date-block {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    padding: 15px 24px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    margin-bottom: 0;
    margin-top: 0;
}

.efa-dark-mode .efa-panel-date-block {
    background: #151b2a;
    border-bottom: 1px solid #3a3a4e;
}

.efa-pdb-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.efa-pdb-left .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.efa-btn-panel {
    flex: 1;
    height: 42px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.efa-btn-panel-spam {
    background: #fff0f0;
    color: var(--efa-danger);
    border: 1px solid #ffc9c9;
}

.efa-btn-panel-spam:hover {
    background: #ffe3e3;
}

.efa-btn-panel-safe {
    background: #ebfbee;
    color: var(--efa-success);
    border: 1px solid #b2f2bb;
}

.efa-btn-panel-safe:hover {
    background: #d3f9d8;
}

.efa-btn-panel-delete {
    background: #ffffff;
    color: var(--efa-text-muted);
    border: 1px solid var(--efa-border);
}

.efa-btn-panel-delete:hover {
    background: #f8f9fa;
    color: var(--efa-danger);
    border-color: var(--efa-danger);
}

.efa-notes-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #2196f3;
    /* Azul */
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.efa-notes-badge-table {
    background: #000000;
    color: white;
    font-size: 9px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    flex-shrink: 0;
}

.efa-panel-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--efa-bg-card);
    border-top: 1px solid var(--efa-border);
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    z-index: 9999;
    /* Max Z-Index */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.efa-dark-mode .efa-panel-actions {
    background: #1f2940;
    border-top-color: #3a3a4e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.efa-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
    border: none;
}

.efa-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.efa-action-btn span.dashicons {
    font-size: 18px;
}

.btn-call {
    background: #10b981;
}

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

.btn-wa {
    background: #25d366;
}

.btn-wa:hover {
    background: #1ea952;
}

.btn-mail {
    background: #3b82f6;
}

.btn-mail:hover {
    background: #2563eb;
}

.btn-reply {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.3);
}

.btn-reply:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.4);
}

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

.btn-reply:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.btn-reply:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Dark Mode for Reply Button */
.efa-dark-mode .btn-reply {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
}

.efa-dark-mode .btn-reply:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%);
}

/* SweetAlert2 Custom Styles for Reply Modal */
.efa-reply-modal .swal2-title {
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.efa-dark-mode .efa-reply-modal .swal2-title {
    color: #e4e7eb;
}

.efa-reply-confirm-btn {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.3) !important;
    transition: all 0.3s ease !important;
}

.efa-reply-confirm-btn:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(224, 29, 117, 0.4) !important;
}

/* Spin animation for loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.efa-action-label {
    font-size: 14px;
    font-weight: 600;
}

.efa-action-btn.phone {
    background: #000;
}

.efa-action-btn.phone:hover {
    background: #1a1a1a;
}

.efa-action-btn.whatsapp {
    background: #25D366;
}

.efa-action-btn.whatsapp:hover {
    background: #1fb855;
}

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

    .efa-card-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- CORRECCIONES DARK MODE --- */
body.efa-dark-mode .gw-nav-tab-wrapper {
    background-color: var(--efa-bg-card) !important;
    border-bottom: 1px solid var(--efa-border) !important;
}

body.efa-dark-mode .gw-nav-tab-wrapper h2 {
    color: var(--efa-text-main) !important;
}

body.efa-dark-mode .gw-nav-tab {
    color: var(--efa-text-muted) !important;
}

body.efa-dark-mode .gw-nav-tab:hover {
    background-color: var(--efa-bg-app) !important;
    color: #fff !important;
}

body.efa-dark-mode .gw-nav-tab.nav-tab-active {
    background-color: var(--efa-accent) !important;
    color: #fff !important;
    border-color: var(--efa-accent) !important;
}

body.efa-dark-mode .efa-page-title-row h2,
body.efa-dark-mode h3 {
    color: var(--efa-text-main) !important;
}

body.efa-dark-mode .notice-warning,
body.efa-dark-mode .notice-warning p,
body.efa-dark-mode .notice-warning strong {
    color: #3c434a;
}

/* --- BOTON TEMAS --- */
.efa-theme-switcher {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #dcdcde;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #50575e;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    line-height: 1 !important;
}

.efa-theme-switcher .dashicons {
    font-family: "dashicons" !important;
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

body:not(.efa-dark-mode) .efa-theme-switcher {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-color: #cccccc !important;
}

body:not(.efa-dark-mode) .efa-theme-switcher .dashicons-moon {
    color: #000000 !important;
}

body:not(.efa-dark-mode) .efa-theme-switcher:hover {
    border-color: var(--efa-accent) !important;
    color: var(--efa-accent) !important;
}

body:not(.efa-dark-mode) .efa-theme-switcher:hover .dashicons-moon {
    color: var(--efa-accent) !important;
}

body.efa-dark-mode .efa-theme-switcher {
    background-color: #2a2a3e !important;
    color: #a0a0c0 !important;
    border-color: #5d5dfa !important;
}

body.efa-dark-mode .efa-theme-switcher .dashicons-lightbulb {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
}

body.efa-dark-mode .efa-theme-switcher:hover {
    background-color: #3a3a5e !important;
    color: #fff !important;
}

/* --- NUEVO ESTILO UNIFIED TOOLBAR --- */
.efa-table-toolbar.unified {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 20px;
}

.efa-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.efa-toolbar-group.right {
    justify-content: flex-end;
}

.efa-mini-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.efa-mini-group label {
    font-size: 12px;
    color: var(--efa-text-muted);
    font-weight: 600;
}

.efa-separator-v {
    width: 1px;
    height: 24px;
    background-color: var(--efa-border);
    margin: 0 5px;
}

.efa-btn-sm {
    height: 30px !important;
    padding: 0 15px !important;
    font-size: 12px !important;
}

/* --- ESTILOS PARA LOS TOGGLES / SWITCHES --- */
.efa-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    /* Reduced gap */
    margin-right: 10px;
    /* Reduced margin */
}

.efa-toggle-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--efa-text-muted);
}

/* El contenedor del switch */
.efa-switch {
    position: relative;
    display: inline-block;
    width: 30px;
    /* Reduced width */
    height: 16px;
    /* Reduced height */
}

/* Ocultamos el checkbox nativo */
.efa-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* El deslizador (fondo) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    /* Gris por defecto */
    transition: .4s;
    border-radius: 34px;
}

/* El círculo blanco */
.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    /* Reduced size */
    width: 12px;
    /* Reduced size */
    left: 2px;
    /* Adjusted position */
    bottom: 2px;
    /* Adjusted position */
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Estado ACTIVO (Azul) */
input:checked+.slider {
    background-color: var(--efa-accent);
}

/* Movimiento del círculo al activar */
input:checked+.slider:before {
    transform: translateX(14px);
    /* Adjusted transform */
}

/* Dark Mode ajuste */
body.efa-dark-mode .slider {
    background-color: #4a4a6a;
}

/* Botón Cargar Más */
.efa-load-more-container {
    text-align: center;
    padding: 20px 0;
    clear: both;
    width: 100%;
    display: block;
}

.efa-btn-load-more {
    background-color: #fff;
    border: 1px solid var(--efa-border);
    color: var(--efa-text-muted);
    padding: 8px 25px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 20px auto;
    text-align: center;
    width: fit-content;
}

.efa-btn-load-more:hover {
    border-color: var(--efa-accent);
    color: var(--efa-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.efa-btn-load-more.hidden {
    display: none;
}

/* --- MULTI-SELECTOR DE ORÍGENES --- */
.efa-multiselect-wrapper {
    position: relative;
    display: inline-block;
}

.efa-multiselect-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 160px;
    text-align: left;
    background: var(--efa-input-bg);
    /* Usa variable para dark mode */
    color: var(--efa-text-main);
    border: 1px solid var(--efa-border);
}

.efa-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    min-width: 200px;
    z-index: 1000;
    padding: 5px 0;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.efa-multiselect-dropdown.open {
    display: block;
}

.efa-ms-option {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--efa-text-main);
    cursor: pointer;
    transition: background 0.2s;
}

.efa-ms-option:hover {
    background: var(--efa-row-hover);
}

.efa-ms-option input {
    margin-right: 8px;
    vertical-align: middle;
}

.efa-ms-separator {
    height: 1px;
    background: var(--efa-border);
    margin: 5px 0;
}

/* Ajustes Dark Mode específicos si es necesario */
body.efa-dark-mode .efa-multiselect-dropdown {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* --- UNIFICACIÓN DE SELECTORES (DISEÑO PREMIUM) --- */

/* 1. Reseteamos los selectores nativos (.efa-select-sm) para controlarlos nosotros */
.efa-select-sm {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Flecha SVG personalizada (Gris neutro) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236c757d%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 8px auto;

    /* Estilos Base */
    height: 32px !important;
    /* Un poco más alto para mejor clic */
    padding: 0 30px 0 12px !important;
    /* Espacio a la derecha para la flecha */
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid var(--efa-border) !important;
    background-color: var(--efa-bg-card) !important;
    color: var(--efa-text-main) !important;
    line-height: 1.5 !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Hover y Focus para selectores */
.efa-select-sm:hover {
    border-color: var(--efa-text-muted) !important;
}

.efa-select-sm:focus {
    border-color: var(--efa-accent) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
    /* Sombra suave azul */
}

/* 2. Estilamos el Botón de Orígenes (.efa-multiselect-btn) para que sea IDÉNTICO */
.efa-multiselect-btn {
    /* Copiamos estilos base */
    height: 32px !important;
    padding: 0 30px 0 12px !important;
    /* Mismo padding que el select */
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid var(--efa-border) !important;
    background-color: var(--efa-bg-card) !important;
    color: var(--efa-text-main) !important;

    /* Flex para alinear texto */
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    /* Texto a la izquierda */
    position: relative;
    min-width: 150px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Posicionamos el icono Dashicon EXACTAMENTE donde está la flecha SVG del select */
.efa-multiselect-btn .dashicons {
    position: absolute !important;
    right: 10px !important;
    /* Misma posición visual */
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    font-size: 10px !important;
    /* Tamaño ajustado para parecerse al SVG */
    width: auto !important;
    height: auto !important;
    color: #6c757d !important;
    /* Mismo color gris que el SVG */
}

/* Hover y Focus para el botón */
.efa-multiselect-btn:hover {
    border-color: var(--efa-text-muted) !important;
}

.efa-multiselect-dropdown {
    top: 36px;
    /* Ajuste para la nueva altura */
    border-color: var(--efa-border);
}

/* Corrección para Dark Mode */
body.efa-dark-mode .efa-select-sm,
body.efa-dark-mode .efa-multiselect-btn {
    background-color: var(--efa-input-bg) !important;
    /* Fondo oscuro */
    color: var(--efa-text-main) !important;
    border-color: var(--efa-border) !important;
}

/* --- REPORT MODAL --- */
.efa-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.efa-report-overlay.open {
    display: flex;
}

.efa-report-modal {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    height: 95%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.efa-report-header {
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.efa-report-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.efa-report-actions {
    display: flex;
    gap: 10px;
}

.efa-report-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.efa-report-btn.print {
    background: #2271b1;
    color: #fff;
}

.efa-report-btn.print:hover {
    background: #135e96;
    transform: translateY(-1px);
}

.efa-report-btn.close {
    background: #f0f0f1;
    color: #3c434a;
}

.efa-report-btn.close:hover {
    background: #dcdcde;
}

.efa-report-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: #ffffff;
}

/* Report Layout */
.efa-rep-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header Visual */
.efa-rep-header-visual {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Force start alignment */
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eaeaea;
}

.efa-rep-logo {
    flex: 0 0 auto;
    /* Do not grow */
}

.efa-rep-logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

.efa-rep-logo h1 {
    margin: 0;
    font-size: 24px;
    color: #2271b1;
}

.efa-rep-title-block {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0 !important;
    /* Force reset margin */
    flex: 0 0 auto;
    /* Do not grow */
}

.efa-rep-title-block h2 {
    margin: 0 0 8px 0;
    font-size: 26px;
    color: #1d2327;
    letter-spacing: -0.5px;
    font-weight: 700;
}

.efa-rep-date {
    font-size: 14px;
    color: #50575e;
    margin-bottom: 4px;
    display: block;
}

.efa-rep-subtitle {
    font-size: 15px;
    color: #2271b1;
    display: block;
}

/* Meta Grid */
.efa-rep-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.efa-rep-meta-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.efa-rep-meta-item .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #646970;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.efa-rep-meta-item .value {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    text-align: center;
}

.efa-rep-meta-item .value.highlight {
    font-size: 24px;
    color: #2271b1;
}

/* Section Titles */
.efa-rep-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid #2271b1;
    padding-left: 15px;
}

/* Cards & Charts */
.efa-rep-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.efa-rep-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    page-break-inside: avoid;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    margin-bottom: 40px;
}

.efa-rep-card.full-width {
    margin-bottom: 40px;
}

.efa-rep-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    text-align: center;
    color: #444;
    font-weight: 600;
}

.efa-rep-chart-box {
    height: 280px;
    position: relative;
}

.efa-rep-chart-box.wide {
    height: 200px;
}

/* Dark Mode Support for Modal - El informe siempre tiene fondo blanco */
.efa-dark-mode .efa-report-modal {
    background: #ffffff !important;
    color: #000000 !important;
}

.efa-dark-mode .efa-report-header {
    background: #f8f9fa !important;
    border-bottom-color: #e0e0e0 !important;
}

.efa-dark-mode .efa-report-header h2 {
    color: #2c3e50 !important;
}

.efa-dark-mode .efa-report-content {
    background: #ffffff !important;
    color: #000000 !important;
}

.efa-dark-mode .efa-rep-card,
.efa-dark-mode .efa-rep-meta-item {
    background: #ffffff !important;
    border-color: #e0e0e0 !important;
    color: #000000 !important;
}

.efa-dark-mode .efa-rep-card h3 {
    color: #2c3e50 !important;
}

.efa-dark-mode .efa-rep-title-block h2 {
    color: #fff;
}

.efa-dark-mode .efa-rep-meta-item .value {
    color: #e0e0e0;
}

.efa-dark-mode .efa-rep-section-title {
    color: #fff;
}

/* PRINT STYLES */
@media print {
    @page {
        margin: 1cm;
        size: A4;
        @top-center {
            content: none;
        }
        @bottom-center {
            content: none;
        }
    }

    /* Ocultar todo excepto el informe */
    body * {
        visibility: hidden;
    }

    /* Mostrar solo el overlay y su contenido */
    .efa-report-overlay,
    .efa-report-overlay * {
        visibility: visible !important;
    }

    .efa-report-overlay {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100% !important;
        background: #ffffff !important;
        display: block !important;
        backdrop-filter: none !important;
        z-index: 999999 !important;
        overflow: visible !important;
    }

    .efa-report-modal {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        min-height: auto !important;
        box-shadow: none !important;
        border: none !important;
        overflow: visible !important;
        border-radius: 0 !important;
        background: #ffffff !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .efa-report-header {
        display: none !important;
    }

    .efa-report-content {
        padding: 20px !important;
        overflow: visible !important;
        background: #ffffff !important;
        height: auto !important;
        min-height: auto !important;
        color: #000000 !important;
    }

    .efa-rep-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-container * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-header-visual {
        visibility: visible !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
        display: block !important;
        position: relative !important;
        page-break-after: auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-before: auto !important;
    }

    /* Asegurar que el header solo aparezca una vez - ocultar cualquier repetición */
    .efa-rep-container .efa-rep-header-visual ~ .efa-rep-header-visual {
        display: none !important;
    }

    .efa-rep-header-visual * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-title-block h2,
    .efa-rep-date,
    .efa-rep-subtitle {
        color: #000000 !important;
    }

    .efa-rep-meta-grid {
        visibility: visible !important;
        page-break-inside: avoid !important;
    }

    .efa-rep-meta-item {
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-meta-item * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-meta-item .label {
        color: #666666 !important;
    }

    .efa-rep-meta-item .value {
        color: #000000 !important;
    }

    .efa-rep-section-title {
        visibility: visible !important;
        color: #000000 !important;
        border-left-color: #2271b1 !important;
    }

    .efa-rep-section-title * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-card {
        background: #ffffff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
        visibility: visible !important;
        color: #000000 !important;
        page-break-inside: avoid !important;
    }

    .efa-rep-card * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-rep-card h3 {
        color: #000000 !important;
    }

    .efa-spam-grid,
    .efa-spam-card,
    .efa-origin-card,
    .efa-form-card {
        visibility: visible !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .efa-spam-grid *,
    .efa-spam-card *,
    .efa-origin-card *,
    .efa-form-card * {
        visibility: visible !important;
        color: #000000 !important;
    }

    .efa-spam-value,
    .efa-origin-count,
    .efa-form-count {
        color: #000000 !important;
    }

    .efa-spam-label,
    .efa-origin-name,
    .efa-form-name {
        color: #000000 !important;
    }

    .efa-spam-desc,
    .efa-origin-percentage,
    .efa-form-percentage {
        color: #666666 !important;
    }

    canvas {
        visibility: visible !important;
    }

    /* Force light mode for print - override all dark mode styles */
    body.efa-dark-mode .efa-report-overlay,
    body.efa-dark-mode .efa-report-modal,
    body.efa-dark-mode .efa-report-content,
    body.efa-dark-mode .efa-rep-container,
    body.efa-dark-mode .efa-rep-card,
    body.efa-dark-mode .efa-rep-meta-item,
    body.efa-dark-mode .efa-spam-card,
    body.efa-dark-mode .efa-origin-card,
    body.efa-dark-mode .efa-form-card {
        background: #ffffff !important;
        color: #000000 !important;
        border-color: #ddd !important;
    }

    body.efa-dark-mode .efa-rep-card h3,
    body.efa-dark-mode .efa-rep-title-block h2,
    body.efa-dark-mode .efa-rep-section-title,
    body.efa-dark-mode .efa-rep-meta-item .value,
    body.efa-dark-mode .efa-spam-value,
    body.efa-dark-mode .efa-origin-count,
    body.efa-dark-mode .efa-form-count {
        color: #000000 !important;
    }
}

/* CRM STYLES - PROFESSIONAL*/
/* Panel CRM (Secondary) */
#efa-crm-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 520px;
    height: 100%;
    z-index: 99999;
    transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#efa-crm-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px);
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-left: none;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12), -2px 0 10px rgba(0, 0, 0, 0.08);
    transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.efa-dark-mode #efa-crm-content {
    background: linear-gradient(180deg, #1f2940 0%, #1a2236 100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}

#efa-crm-panel.open {
    right: 520px;
}

/* REPLY PANEL (Same structure as CRM Panel) */
#efa-reply-panel {
    position: fixed;
    top: 0;
    right: -520px;
    width: 520px;
    height: 100%;
    z-index: 99999;
    transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.efa-dark-mode #efa-reply-panel {
    background: #1f2940;
}

#efa-reply-panel.open {
    right: 520px;
}

#efa-reply-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 80px - 80px); /* Restar altura del header y de los botones */
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-left: none;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12), -2px 0 10px rgba(0, 0, 0, 0.08);
    padding: 24px 32px;
    padding-bottom: 100px; /* Espacio extra para que el contenido no quede oculto */
}

.efa-dark-mode #efa-reply-content {
    background: linear-gradient(180deg, #1f2940 0%, #1a2236 100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}

/* Reply Panel Actions - Fixed at bottom like main panel */
#efa-reply-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--efa-bg-card);
    border-top: 1px solid var(--efa-border);
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.efa-dark-mode #efa-reply-actions {
    background: #1f2940;
    border-top-color: #3a3a4e;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Reply Form Styles */
.efa-reply-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.efa-reply-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.efa-reply-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}

.efa-dark-mode .efa-reply-field label {
    color: #e4e7eb;
}

.efa-reply-field label .dashicons {
    font-size: 14px;
    color: #2271b1;
}

.efa-dark-mode .efa-reply-field label .dashicons {
    color: #e01d75;
}

.efa-reply-field input,
.efa-reply-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #ffffff;
    color: #1f2937;
}

.efa-dark-mode .efa-reply-field input,
.efa-dark-mode .efa-reply-field textarea {
    background: #2a3441;
    border-color: #3a3a4e;
    color: #e4e7eb;
}

.efa-reply-field input:focus,
.efa-reply-field textarea:focus {
    outline: none;
    border-color: #e01d75;
    box-shadow: 0 0 0 3px rgba(224, 29, 117, 0.1);
}

.efa-reply-field textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}

.efa-reply-original-message {
    background: #f3f4f6;
    border-left: 3px solid #2271b1;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 8px;
}

.efa-dark-mode .efa-reply-original-message {
    background: #2a3441;
    border-left-color: #e01d75;
}

.efa-reply-original-message-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.efa-dark-mode .efa-reply-original-message-label {
    color: #9ca3af;
}

.efa-reply-original-message-text {
    font-size: 13px;
    color: #374151;
    white-space: pre-wrap;
    line-height: 1.6;
}

.efa-dark-mode .efa-reply-original-message-text {
    color: #d1d5db;
}

/* Reply Message Container in Panel */
.efa-reply-message-container {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
    border-left: 4px solid #e01d75;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.1);
}

.efa-dark-mode .efa-reply-message-container {
    background: linear-gradient(135deg, rgba(224, 29, 117, 0.15) 0%, rgba(201, 26, 106, 0.1) 100%);
    border-left-color: #e01d75;
    box-shadow: 0 2px 8px rgba(224, 29, 117, 0.2);
}

.efa-reply-message-container .dashicons {
    color: #e01d75;
}

.efa-dark-mode .efa-reply-message-container .dashicons {
    color: #ff6ba8;
}

.efa-reply-message-container span[style*="color: #e01d75"] {
    color: #e01d75 !important;
}

.efa-dark-mode .efa-reply-message-container span[style*="color: #e01d75"] {
    color: #ff6ba8 !important;
}

.efa-reply-message-container div[style*="color: #1f2937"] {
    color: #1f2937;
}

.efa-dark-mode .efa-reply-message-container div[style*="color: #1f2937"] {
    color: #e4e7eb;
}

/* Reply Message Text - Pink Background (same style as lead message but with pink background) */
.efa-reply-message-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    background: #feedf7;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 4px;
}

.efa-dark-mode .efa-reply-message-text {
    background: #feedf7;
    border-color: #e5e7eb;
    color: #374151;
}

/* ACCORDION STYLES - Full Width, No Rounded Corners */
.efa-accordion-section {
    margin-bottom: 0;
    background: #ffffff;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.efa-dark-mode .efa-accordion-section {
    background: #1f2940;
    border-bottom-color: #3a3a4e;
}

.efa-accordion-section:first-child {
    border-top: 1px solid #e5e7eb;
}

.efa-dark-mode .efa-accordion-section:first-child {
    border-top-color: #3a3a4e;
}

.efa-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.efa-dark-mode .efa-accordion-header {
    background: #2a2a3f;
    border-bottom-color: #3a3a4e;
}

/* Active/Open State - Highlighted */
.efa-accordion-section.active {
    background: linear-gradient(135deg, #fef3f8 0%, #ffffff 100%);
}

.efa-dark-mode .efa-accordion-section.active {
    background: linear-gradient(135deg, rgba(224, 29, 117, 0.15) 0%, #1f2940 100%);
}

.efa-accordion-section.active .efa-accordion-header {
    background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
    border-bottom-color: #e5e7eb;
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-header {
    background: linear-gradient(135deg, rgba(224, 29, 117, 0.2) 0%, rgba(201, 26, 106, 0.1) 100%);
    border-bottom-color: #3a3a4e;
}

.efa-accordion-header:hover {
    background: #f3f4f6;
}

.efa-dark-mode .efa-accordion-header:hover {
    background: #2a3441;
}

.efa-accordion-section.active .efa-accordion-header:hover {
    background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-header:hover {
    background: linear-gradient(135deg, rgba(224, 29, 117, 0.25) 0%, rgba(201, 26, 106, 0.15) 100%);
}

.efa-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.efa-dark-mode .efa-accordion-title {
    color: #e4e7eb;
}

/* Badge para contador de respuestas */
.efa-replies-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(224, 29, 117, 0.3);
}

.efa-dark-mode .efa-replies-badge {
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    box-shadow: 0 2px 4px rgba(224, 29, 117, 0.5);
}

/* Contenedor de respuestas múltiples */
.efa-replies-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.efa-reply-item {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0;
}

.efa-dark-mode .efa-reply-item {
    background: #1f2940;
    border-color: #3a3a4e;
}

.efa-reply-item:not(.efa-reply-item-last) {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 16px;
    padding-bottom: 20px;
}

.efa-dark-mode .efa-reply-item:not(.efa-reply-item-last) {
    border-bottom-color: #3a3a4e;
}

.efa-reply-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.efa-dark-mode .efa-reply-item-header {
    border-bottom-color: #3a3a4e;
}

.efa-reply-item-number {
    font-size: 12px;
    font-weight: 700;
    color: #e01d75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.efa-dark-mode .efa-reply-item-number {
    color: #ffb3d4;
}

.efa-reply-item-date {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.efa-dark-mode .efa-reply-item-date {
    color: #9ca3af;
}

.efa-accordion-section.active .efa-accordion-title {
    color: #e01d75;
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-title {
    color: #ff6ba8;
}

.efa-accordion-title .dashicons {
    font-size: 18px;
    color: #2271b1;
}

.efa-dark-mode .efa-accordion-title .dashicons {
    color: #e01d75;
}

.efa-accordion-section.active .efa-accordion-title .dashicons {
    color: #e01d75;
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-title .dashicons {
    color: #ff6ba8;
}

.efa-accordion-icon {
    font-size: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.efa-dark-mode .efa-accordion-icon {
    color: #9ca3af;
}

.efa-accordion-section.active .efa-accordion-icon {
    transform: rotate(180deg);
    color: #e01d75;
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-icon {
    color: #ff6ba8;
}

.efa-accordion-content {
    display: none;
    padding: 16px 20px;
    background: #ffffff;
}

.efa-dark-mode .efa-accordion-content {
    background: #1f2940;
}

.efa-accordion-section.active .efa-accordion-content {
    display: block;
    background: #ffffff;
}

.efa-dark-mode .efa-accordion-section.active .efa-accordion-content {
    background: #1f2940;
}

/* Compact Lead Info Styles */
.efa-lead-info-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
}

.efa-dark-mode .efa-lead-info-compact {
    background: #1f2940;
}

.efa-lead-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.efa-dark-mode .efa-lead-item {
    border-bottom-color: #3a3a4e;
}

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

.efa-lead-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    flex-shrink: 0;
}

.efa-dark-mode .efa-lead-label {
    color: #9ca3af;
}

.efa-lead-value {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    flex: 1;
    word-break: break-word;
}

.efa-dark-mode .efa-lead-value {
    color: #e4e7eb;
}

.efa-lead-value a {
    color: #2271b1;
    text-decoration: none;
}

.efa-dark-mode .efa-lead-value a {
    color: #60a5fa;
}

.efa-lead-value.highlight {
    font-weight: 600;
    color: #1f2937;
    background: transparent;
}

.efa-dark-mode .efa-lead-value.highlight {
    color: #e4e7eb;
    background: transparent;
}

.efa-lead-item.efa-lead-message {
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
}

.efa-lead-message-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 4px;
}

.efa-dark-mode .efa-lead-message-text {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #d1d5db;
}

/* Reply Message Text - Pink Background */
.efa-reply-message-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    background: #feedf7;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 4px;
}

.efa-dark-mode .efa-reply-message-text {
    background: #feedf7;
    border-color: #e5e7eb;
    color: #374151;
}

.efa-reply-info {
    background: #eff6ff;
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.efa-dark-mode .efa-reply-info {
    background: rgba(30, 64, 175, 0.2);
    color: #93c5fd;
}

.efa-reply-info .dashicons {
    font-size: 14px;
    margin-top: 2px;
}

.efa-reply-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.efa-reply-btn.send {
    width: 100%;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.efa-reply-btn.send:hover {
    background: linear-gradient(135deg, #135e96 0%, #0a4b78 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
}

.efa-reply-btn.send:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.efa-reply-btn .dashicons {
    font-size: 16px;
}

.efa-reply-recipient {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.efa-dark-mode .efa-reply-recipient {
    background: #2a3441;
    border-color: #3a3a4e;
}

.efa-reply-recipient-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.efa-dark-mode .efa-reply-recipient-label {
    color: #9ca3af;
}

.efa-reply-recipient-email {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.efa-dark-mode .efa-reply-recipient-email {
    color: #e4e7eb;
}

.efa-reply-recipient-email .dashicons {
    font-size: 18px;
    color: #2271b1;
}

.efa-dark-mode .efa-reply-recipient-email .dashicons {
    color: #e01d75;
}

/* Spin animation for loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.efa-crm-status-wrapper {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    margin-top: 0;
    box-shadow: none;
}

.efa-dark-mode .efa-crm-status-wrapper {
    background: linear-gradient(135deg, #1f2940 0%, #1a2236 100%);
    border-bottom-color: #3a3a4e;
}

.efa-crm-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.efa-dark-mode .efa-crm-label {
    color: #e4e7eb;
}

.efa-crm-label::before {
    display: none;
}

.efa-crm-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.efa-crm-pill {
    background: #ffffff;
    border: 2px solid var(--pill-color);
    color: var(--pill-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: none;
}

.efa-dark-mode .efa-crm-pill {
    background: #2a2a3e;
    border-color: var(--pill-color);
    color: var(--pill-color);
}

.efa-dark-mode .efa-crm-pill.active {
    background: var(--pill-color);
    border-color: var(--pill-color);
    color: #ffffff;
}

.efa-crm-pill:hover {
    border-color: var(--pill-color);
    color: var(--pill-color);
    background: var(--pill-color)10;
}

.efa-crm-pill.active {
    background: var(--pill-color);
    border: 2px solid var(--pill-color);
    color: #ffffff;
    font-weight: 700;
    box-shadow: none;
}

.efa-crm-notes-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: #ffffff;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 32px;
}

.efa-dark-mode .efa-crm-notes-wrapper {
    background: #1f2940;
}

.efa-crm-notes-wrapper .efa-crm-label {
    padding: 0;
    margin: 0 0 16px 0;
    border-bottom: none;
    background: transparent !important;
    color: #1f2937 !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.efa-crm-notes-wrapper .efa-crm-label::before {
    display: none;
}

/* Asegurar que el título de notas en el panel CRM tenga fondo blanco, sobrescribiendo cualquier estilo de .efa-sec-title */
#efa-crm-content .efa-crm-notes-wrapper .efa-crm-label,
#efa-crm-panel .efa-crm-notes-wrapper .efa-crm-label {
    background: #ffffff !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.efa-dark-mode #efa-crm-content .efa-crm-notes-wrapper .efa-crm-label,
.efa-dark-mode #efa-crm-panel .efa-crm-notes-wrapper .efa-crm-label {
    background: #1f2940 !important;
    color: #e4e7eb !important;
}

.efa-crm-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.efa-no-notes {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--efa-text-muted);
    text-align: center;
    opacity: 0.6;
    font-size: 13px;
}

/* Chat Bubble Style */
.efa-crm-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

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

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

.efa-note-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.3);
    border: 2px solid #ffffff;
}

.efa-note-content {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 0;
    position: relative;
    flex: 1;
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.efa-dark-mode .efa-note-content {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #e4e7eb;
}

.efa-dark-mode .efa-note-author {
    color: #e4e7eb;
}

.efa-dark-mode .efa-note-date {
    color: #9ca3af;
}

.efa-dark-mode .efa-note-body {
    color: #e4e7eb;
}

.efa-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 15px;
}

.efa-note-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--efa-text-main);
}

.efa-note-date {
    font-size: 10px;
    color: var(--efa-text-muted);
    font-weight: 500;
}

.efa-note-body {
    font-size: 13px;
    color: var(--efa-text-main);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Input Area */
.efa-crm-input-area {
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.efa-dark-mode .efa-crm-input-area {
    border-top-color: #e5e7eb !important;
}

.efa-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.efa-dark-mode .efa-input-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: #e5e7eb !important;
}

.efa-dark-mode .efa-crm-notes-wrapper .efa-input-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-color: #e5e7eb !important;
}

.efa-input-wrapper:focus-within {
    border-color: #e01d75;
    box-shadow: 0 4px 16px rgba(224, 29, 117, 0.2), 0 0 0 4px rgba(224, 29, 117, 0.1);
    background: #ffffff;
}

.efa-dark-mode .efa-input-wrapper:focus-within {
    background: #ffffff !important;
    border-color: #e01d75 !important;
}

.efa-dark-mode .efa-crm-notes-wrapper .efa-input-wrapper:focus-within {
    background: #ffffff !important;
    border-color: #e01d75 !important;
}

#efa-note-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--efa-text-main);
    font-size: 13px;
    min-height: 24px;
    /* Starts small */
    max-height: 100px;
    resize: none;
    padding: 8px 0;
    line-height: 1.4;
}

.efa-dark-mode #efa-note-input {
    color: #1f2937;
}

#efa-note-input:focus {
    outline: none;
    box-shadow: none;
}

.efa-btn-send {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e01d75 0%, #c91a6a 100%);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(224, 29, 117, 0.3);
}

.efa-btn-send:hover {
    background: linear-gradient(135deg, #c91a6a 0%, #b0175a 100%);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(224, 29, 117, 0.4);
}

.efa-btn-send:active {
    transform: scale(0.95);
}

.efa-btn-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.efa-btn-send.sending .dashicons {
    animation: spin 1s linear infinite;
}

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

.efa-input-hint {
    font-size: 10px;
    color: var(--efa-text-muted);
    margin-top: 8px;
    text-align: right;
    padding-right: 10px;
}

.efa-dark-mode .efa-input-hint {
    color: #6b7280;
}

/* Table Badges */
.efa-crm-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Evita que el texto baje de línea */
    max-width: none;
    /* Asegura que no se limite el ancho */
}

/* Asegurar que la celda de la tabla no corte el contenido */
.efa-table td:last-child,
.efa-table td:nth-last-child(2) {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    /* Quita los puntos suspensivos */
}

.status-new {
    background: #e3f2fd;
    color: #1565c0;
}

.status-contacted {
    background: #fff3e0;
    color: #ef6c00;
}

.status-budget {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-won {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-lost {
    background: #ffebee;
    color: #c62828;
}

/* Dark Mode Adjustments */
.efa-dark-mode .status-new {
    background: rgba(33, 150, 243, 0.15);
    color: #64b5f6;
}

.efa-dark-mode .status-contacted {
    background: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
}

.efa-dark-mode .status-budget {
    background: rgba(156, 39, 176, 0.15);
    color: #ba68c8;
}

.efa-dark-mode .status-won {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
}

.efa-dark-mode .status-lost {
    background: rgba(229, 115, 115, 0.15);
    color: #e57373;
}

/* Read/Unread Icons */
.efa-icon-read {
    color: #46b450;
    /* Green */
    font-size: 18px;
}

.efa-icon-unread {
    color: #dc3232;
    /* Red */
    font-size: 18px;
    /* text-decoration: line-through; Not supported on icons usually, but color is enough */
}

/* --- SETTINGS TABS & CONTENT --- */
.efa-settings-tabs {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 25px !important;
    display: flex;
    gap: 10px;
}

.efa-settings-tabs .nav-tab {
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    border-radius: 6px;
    color: var(--efa-text-muted);
    font-weight: 500;
    padding: 8px 16px;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.efa-settings-tabs .nav-tab:hover {
    background: var(--efa-bg-app);
    color: var(--efa-text-main);
    transform: translateY(-1px);
}

.efa-settings-tabs .nav-tab-active,
.efa-settings-tabs .nav-tab-active:hover {
    background: var(--efa-accent);
    color: #fff;
    border-color: var(--efa-accent);
    box-shadow: 0 4px 6px rgba(34, 113, 177, 0.2);
}

/* Dark Mode for Tabs */
body.efa-dark-mode .efa-settings-tabs .nav-tab {
    background: var(--efa-bg-card);
    border-color: var(--efa-border);
    color: var(--efa-text-muted);
}

body.efa-dark-mode .efa-settings-tabs .nav-tab:hover {
    background: var(--efa-bg-app);
    color: #fff;
}

body.efa-dark-mode .efa-settings-tabs .nav-tab-active {
    background: var(--efa-accent);
    color: #fff;
    border-color: var(--efa-accent);
}

/* Content Area Spacing */
.gw-settings-container .gw-card {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--efa-border);
    border-radius: 8px;
}


/* --- CRM LABELS MANAGER --- */
#efa-crm-labels-manager {
    margin-top: 20px;
}

.efa-crm-label-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 15px;
    align-items: end;
    padding: 15px;
    background: var(--efa-bg-card);
    border: 1px solid var(--efa-border);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.efa-crm-label-row:hover {
    border-color: var(--efa-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.efa-crm-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.efa-crm-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--efa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.efa-crm-input-group .label-text {
    padding: 8px 12px;
    border: 1px solid var(--efa-border);
    border-radius: 6px;
    background: var(--efa-bg-app);
    color: var(--efa-text-main);
    width: 100%;
    transition: all 0.2s ease;
}

.efa-crm-input-group .label-text:focus {
    border-color: var(--efa-accent);
    box-shadow: 0 0 0 1px var(--efa-accent);
    outline: none;
}

.color-picker-wrapper {
    width: 50px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--efa-border);
    cursor: pointer;
}

.efa-crm-input-group .label-color {
    width: 150%;
    height: 150%;
    border: none;
    padding: 0;
    margin: -10px;
    cursor: pointer;
}

.efa-crm-preview-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.efa-crm-preview-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--efa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.efa-crm-badge-preview {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.efa-crm-actions {
    display: flex;
    align-items: center;
    height: 38px;
}

.efa-crm-actions .button-link {
    color: #dc2626;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.efa-crm-actions .button-link:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Dark Mode Adjustments */
body.efa-dark-mode .efa-crm-input-group .label-text {
    background: var(--efa-bg-app);
    border-color: var(--efa-border);
    color: var(--efa-text-main);
}

body.efa-dark-mode .efa-crm-actions .button-link:hover {
    background: rgba(220, 38, 38, 0.2);
}


/* --- CRM LABELS REFINEMENTS --- */
.efa-crm-label-row {
    grid-template-columns: auto 1fr auto auto;
    /* Color first, then Name expands */
}

.color-picker-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    /* Circular */
    overflow: hidden;
    border: 2px solid var(--efa-border);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.color-picker-wrapper:hover {
    transform: scale(1.1);
    border-color: var(--efa-accent);
}

.efa-crm-input-group .label-color {
    width: 200%;
    height: 200%;
    margin: -50%;
    cursor: pointer;
}

/* Spam Popup Styles */
.efa-spam-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-top: 10px;
}

.efa-spam-action-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.efa-spam-action-item:hover {
    border-color: #2271b1;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.efa-spam-action-item .efa-sa-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.efa-spam-action-item .efa-sa-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.efa-spam-action-item .efa-sa-content {
    flex: 1;
}

.efa-spam-action-item .efa-sa-content strong {
    display: block;
    font-size: 14px;
    color: #1d2327;
    margin-bottom: 4px;
}

.efa-spam-action-item .efa-sa-content p {
    margin: 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

.efa-spam-action-item.cancel {
    background: #f0f0f1;
    border-color: transparent;
    justify-content: center;
    padding: 12px;
}

.efa-spam-action-item.cancel:hover {
    background: #dcdcde;
    border-color: transparent;
}

.efa-dark-mode .efa-spam-action-item {
    background: #2a2a3e;
    border-color: #3a3a5e;
}

.efa-dark-mode .efa-spam-action-item:hover {
    background: #3a3a5e;
}

.efa-dark-mode .efa-spam-action-item .efa-sa-content strong {
    color: #fff;
}

.efa-dark-mode .efa-spam-action-item .efa-sa-content p {
    color: #a0a0a0;
}

.efa-dark-mode .efa-spam-action-item.cancel {
    background: #3a3a5e;
    color: #fff;
}

/* --- SIDEBAR LAYOUT --- */
.efa-main-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

.efa-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 10px 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.efa-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    color: #50575e;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.efa-nav-item:hover {
    background-color: #f0f0f1;
    color: #1d2327;
}

.efa-nav-item.active {
    background-color: #e5f5fa;
    color: #2271b1;
    border-left-color: #2271b1;
    font-weight: 600;
}

.efa-nav-item .dashicons {
    margin-right: 10px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

.efa-nav-label {
    flex: 1;
}

.efa-nav-badge {
    margin-left: auto;
    background: #dcdcde;
    color: #50575e;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.efa-nav-item.active .efa-nav-badge {
    background: #2271b1;
    color: #fff;
}

.efa-nav-divider {
    height: 1px;
    background: #dcdcde;
    margin: 10px 0;
}

.efa-nav-header {
    padding: 10px 20px 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #8c8f94;
    letter-spacing: 0.5px;
}

.efa-state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Adjust table wrapper to take remaining space */
.efa-table-wrapper {
    flex-grow: 1;
    width: calc(100% - 240px);
    /* 220px sidebar + 20px gap */
}

/* Hide old toggles wrapper if needed via CSS as backup */
.efa-view-selector {
    display: none !important;
}

/* Dark mode adjustments for sidebar */
.efa-dark-mode .efa-sidebar {
    background: #1d2327;
    border-color: #3c434a;
}

.efa-dark-mode .efa-nav-item {
    color: #a7aaad;
}

.efa-dark-mode .efa-nav-item:hover {
    background-color: #2c3338;
    color: #fff;
}

.efa-dark-mode .efa-nav-item.active {
    background-color: #2271b1;
    color: #fff;
    border-left-color: #72aee6;
}

/* --- UNREAD ROW STYLES (GMAIL STYLE) --- */
.efa-table tbody tr {
    background-color: #e8eaed;
    /* Leído: Gris más visible para destacar */
    transition: background-color 0.2s;
}

/* Indicador visual sutil para filas leídas usando box-shadow en la primera celda */
.efa-table tbody tr:not(.efa-unread) td:first-child {
    position: relative;
    padding-left: 18px;
}

.efa-table tbody tr:not(.efa-unread) td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #5f6368;
    opacity: 0.4;
}

.efa-table tbody tr.efa-unread {
    background-color: #ffffff;
    /* No leído: Blanco brillante */
    font-weight: 700;
}

.efa-table tbody tr.efa-unread td:first-child {
    padding-left: 15px;
    /* Padding normal para filas no leídas */
}

.efa-table tbody tr.efa-unread td {
    color: #1d2327;
    font-weight: 700;
}

/* Filas leídas: texto ligeramente más suave para mayor contraste */
.efa-table tbody tr:not(.efa-unread) td {
    color: #3c4043;
    opacity: 0.85;
}

/* Mantener colores de filas especiales pero añadir negrita si no están leídas */
/* .efa-highlight-row now uses left border instead of background (defined above) */


.efa-table tbody tr.efa-highlight-row.efa-unread td {
    font-weight: 700;
}

.efa-table tbody tr.efa-commercial-row {
    background-color: #d4edda !important;
    /* Verde más visible para filas comerciales leídas */
}

.efa-table tbody tr.efa-commercial-row:not(.efa-unread) td:first-child::before {
    background-color: #28a745;
    /* Indicador verde para filas comerciales leídas */
    opacity: 0.6;
}

.efa-table tbody tr.efa-commercial-row.efa-unread {
    background-color: #ffffff !important;
    /* Mantener blanco para no leídas */
}

.efa-table tbody tr.efa-commercial-row.efa-unread td {
    font-weight: 700;
}

/* Hover effects */
.efa-table tbody tr:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    z-index: 1;
    position: relative;
}

/* Hover para filas leídas - mantener el fondo gris pero más oscuro */
.efa-table tbody tr:not(.efa-unread):hover {
    background-color: #dadce0;
}

.efa-table tbody tr.efa-unread:hover {
    background-color: #f8f9fa;
}
/* ========================================
   DARK MODE STYLES FOR REPORTS PAGE
   ======================================== */

/* Reports Container */
body.efa-dark-mode .gw-reports-container {
    background: transparent;
}

/* Cards */
body.efa-dark-mode .gw-card {
    background: #1f2940 !important;
    border-color: #3a3a4e !important;
}

body.efa-dark-mode .gw-card-title {
    color: #e4e7eb !important;
    border-bottom-color: #3a3a4e !important;
}

/* Inputs and Selects */
body.efa-dark-mode .gw-select,
body.efa-dark-mode .gw-input {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-select:focus,
body.efa-dark-mode .gw-input:focus {
    border-color: var(--efa-accent) !important;
    background: #252b3a !important;
}

/* Labels */
body.efa-dark-mode .gw-label {
    color: #9ca3af !important;
}

/* Checkboxes labels */
body.efa-dark-mode .gw-checkbox-label {
    color: #e4e7eb !important;
}

/* Headers */
body.efa-dark-mode .gw-reports-header h2 {
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-reports-header .description {
    color: #9ca3af !important;
}

/* Block configurator items */
body.efa-dark-mode .gw-config-item {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
}

body.efa-dark-mode .gw-config-item:hover {
    background: #252b3a !important;
    border-color: var(--efa-accent) !important;
}

body.efa-dark-mode .gw-config-item label {
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-config-item .description {
    color: #9ca3af !important;
}

/* Active tab styling fix - white text on active tab */
body.efa-dark-mode .gw-nav-tab.nav-tab-active,
body.efa-dark-mode .gw-nav-tab.nav-tab-active:hover {
    color: #ffffff !important;
    background-color: #5d5dfa !important;
    border-bottom-color: #5d5dfa !important;
}

/* Additional Dark Mode Styles for Reports Page */
body.efa-dark-mode .gw-checkbox-item {
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-card-desc {
    color: #9ca3af !important;
}

body.efa-dark-mode .gw-selection-summary {
    color: #9ca3af !important;
}

body.efa-dark-mode .gw-date-preview {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-report-block-item {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
}

body.efa-dark-mode .gw-report-block-item:hover {
    background: #252b3a !important;
}

body.efa-dark-mode .gw-report-block-item h4,
body.efa-dark-mode .gw-report-block-item .description {
    color: #e4e7eb !important;
}

body.efa-dark-mode .gw-report-block-item p {
    color: #9ca3af !important;
}

body.efa-dark-mode .gw-save-bar {
    background: #2a2a3e !important;
    border-color: #3a3a4e !important;
}

/* Eliminado: este estilo estaba afectando a todos los toggles, incluyendo los de licencia */
/* Los estilos de toggles ahora se manejan específicamente en cada página */

/* Eliminado: este estilo estaba afectando a todos los sliders, incluyendo los de licencia */
/* Los estilos de sliders ahora se manejan específicamente en cada página */

body.efa-dark-mode input:checked + .gw-slider {
    background-color: var(--efa-accent) !important;
}

body.efa-dark-mode .gw-reports-header {
    position: relative;
}
