/* ===== TITULO ===== */
.titulo-marketing {
    width: 100%;
    height: 30px;
    align-content: center;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 2px solid #FC6623;
    margin-bottom: 5px;
}

.titulo-marketing span {
    margin-left: 10px;
}
/* ===== FIN TITULO ===== */

#ADS-CONTENT {
    overflow-y: auto;
    height: calc(100%);
}

/* ===== RESUMEN GENERAL ===== */
#ADS-RESUMEN-GENERAL {
    width: 100%;
    height: 90px;
    margin-bottom: 20px;
}

.ads-titulo-filtros {
    display: flex;
    width: 100%;
    height: 40%;
    margin-bottom: 5px;
}

.ads-cards-resumen {
    display: flex;
    width: 100%;
    height: 60%;
}

.ads-titulo {
    width: 40%;
    align-content: center;
    padding-left: 10px;
    font-weight: 500;
}

.ads-botones-accion {
    display: flex;
    width: 60%;
    align-items: center;
}

/* ===== RANGO FECHAS ===== */
.ads-rango-fecha {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 10px;
}

.ads-fecha-inicio,
.ads-fecha-fin {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ads-fecha-inicio label,
.ads-fecha-fin label {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

.ads-fecha-inicio input,
.ads-fecha-fin input {
    font-size: 12px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0 6px;
    outline: none;
    cursor: pointer;
}

.ads-fecha-inicio input:focus,
.ads-fecha-fin input:focus {
    border-color: var(--color-azul-claro);
}
/* ===== FIN RANGO FECHAS ===== */

.ads-btn-crear {
    background-color: var(--color-azul-claro);
    align-content: center;
    width: 120px;
    height: 30px;
    text-align: center;
    border-radius: 5px;
    color: white;
    margin-right: 10px;
}

.ads-btn-crear:hover {
    opacity: 0.7;
    cursor: pointer;
}

.ads-btn-actualizar {
    background-color: green;
    align-content: center;
    width: 120px;
    height: 30px;
    text-align: center;
    border-radius: 5px;
    color: white;
}

.ads-btn-actualizar:hover {
    opacity: 0.7;
    cursor: pointer;
}

/* === ACTIVAS === */
.ads-activas {
    width: 200px;
    display: flex;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    margin-left: 1%;
}

.ads-activas:hover {
    background-color: #F0F0F0;
    cursor: pointer;
}

.ads-activas-icon {
    align-content: center;
    width: 30%;
    background-color: #FAF3A0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.ads-activas-icon img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.ads-titulo-total {
    display: block;
    width: 70%;
}

.ads-activas-titulo {
    width: 100%;
    height: 50%;
    align-content: center;
    text-align: center;
}

.ads-activas-titulo span {
    font-size: 16px;
}

.ads-activas-total {
    align-content: center;
    height: 50%;
    text-align: center;
    font-weight: 500;
}

.ads-activas-total span {
    text-align: center;
}
/* === FIN ACTIVAS === */

/* === DETECTADAS === */
.ads-detectadas {
    width: 200px;
    display: flex;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    margin-left: 2%;
}

.ads-detectadas:hover {
    background-color: #F0F0F0;
    cursor: pointer;
}

.ads-detectadas-icon {
    align-content: center;
    width: 30%;
    background-color: #A0FAAE;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.ads-detectadas-icon img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.ads-detectadas-titulo-total {
    display: block;
    width: 70%;
}

.ads-detectadas-titulo {
    width: 100%;
    height: 50%;
    align-content: center;
    text-align: center;
}

.ads-detectadas-titulo span {
    font-size: 16px;
}

.ads-detectadas-total {
    align-content: center;
    height: 50%;
    text-align: center;
    font-weight: 500;
}

.ads-detectadas-total span {
    text-align: center;
}
/* === FIN DETECTADAS === */

/* === CLIENTES CAPTADOS === */
.ads-cli-captados {
    width: 200px;
    display: flex;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    margin-left: 2%;
}

.ads-cli-captados:hover {
    background-color: #F0F0F0;
    cursor: pointer;
}

.ads-cli-captados-icon {
    align-content: center;
    width: 30%;
    background-color: #FAC6A0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.ads-cli-captados-icon img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.ads-cli-captados-titulo-total {
    display: block;
    width: 70%;
}

.ads-cli-captados-titulo {
    width: 100%;
    height: 50%;
    align-content: center;
    text-align: center;
}

.ads-cli-captados-titulo span {
    font-size: 16px;
}

.ads-cli-captados-total {
    align-content: center;
    height: 50%;
    text-align: center;
    font-weight: 500;
}

.ads-cli-captados-total span {
    text-align: center;
}
/* === FIN CLIENTES CAPTADOS === */

/* === LEADS UNICOS === */
.ads-lead-unico {
    width: 200px;
    display: flex;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    margin-left: 2%;
}

.ads-lead-unico:hover {
    background-color: #F0F0F0;
    cursor: pointer;
}

.ads-lead-unico-icon {
    align-content: center;
    width: 30%;
    background-color: #A0E9FA;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.ads-lead-unico-icon img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.ads-lead-unico-titulo-total {
    display: block;
    width: 70%;
}

.ads-lead-unico-titulo {
    width: 100%;
    height: 50%;
    align-content: center;
    text-align: center;
}

.ads-lead-unico-titulo span {
    font-size: 16px;
}

.ads-lead-unico-total {
    align-content: center;
    height: 50%;
    text-align: center;
    font-weight: 500;
}

.ads-lead-unico-total span {
    text-align: center;
}

.leads-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #555;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* === FIN LEADS UNICOS === */

/* ===== FIN RESUMEN GENERAL ===== */


/* ===== ADS PRIMERA LINEA ===== */
#ADS-PRIMERA-LINEA {
    width: 100%;
    height: 170px;
    margin-bottom: 15px;
    display: flex;
}

/* TOP 5 CAMPAÑAS POR CLIENTES */
.ads-por-clientes {
    width: 35%;
    height: 100%;
}

.ads-por-cliente-card {
    width: 95%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.ads-por-clientes-header {
    display: flex;
    width: 100%;
    height: 30px;
    align-content: center;
    padding-left: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    font-size: 15px;
}

.ads-por-clientes-header span {
    display: block;
    align-content: center;
}

.ads-top-5-por-clientes-vermas {
    margin-left: auto;
    margin-right: 10px;
    padding: 4px;
}

.ads-top-5-por-clientes-vermas:hover {
    background-color: var(--color-gris-terciario);
    cursor: pointer;
    border-radius: 5px;
}

.ads-por-clientes-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.ads-fila-por-cliente {
    display: flex;
    width: 100%;
    height: 28px;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
}

.ads-fila-por-cliente img {
    width: 20px;
    flex-shrink: 0;
}

.ads-fila-por-cliente span {
    margin-left: 5px;
}

/* Texto de campaña: ocupa el espacio disponible y trunca */
.ads-fila-por-cliente .ads-fila-nombre-campaña {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.ads-por-clientes-total {
    margin-left: auto;
    flex-shrink: 0;
}

.ads-total-por-clientes {
    font-weight: 500;
}

.ads-top5-spinner {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.ads-top5-spin {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: #6b7280;
    border-radius: 50%;
    animation: ads-spin 0.7s linear infinite;
}

.ads-fila-rank {
    margin-right: 5px;
}

@keyframes ads-spin {
    to { transform: rotate(360deg); }
}
/* FIN TOP 5 CAMPAÑAS POR CLIENTES */


/* TOP 5 CAMPAÑAS POR MENSAJES */
.ads-por-mensajes {
    width: 35%;
    height: 100%;
}

.ads-por-mensajes-card {
    width: 95%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.ads-por-mensajes-header {
    display: flex;
    width: 100%;
    height: 30px;
    align-content: center;
    padding-left: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    font-size: 15px;
}

.ads-por-mensajes-header span {
    display: block;
    align-content: center;
}

.ads-top-5-por-mensajes-vermas {
    margin-left: auto;
    margin-right: 10px;
    padding: 4px;
}

.ads-top-5-por-mensajes-vermas:hover {
    background-color: var(--color-gris-terciario);
    cursor: pointer;
    border-radius: 5px;
}

.ads-por-mensajes-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.ads-fila-por-mensajes {
    display: flex;
    width: 100%;
    height: 28px;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
}

.ads-fila-por-mensajes img {
    width: 20px;
    flex-shrink: 0;
}

.ads-fila-por-mensajes span {
    margin-left: 5px;
}

/* Texto de campaña: ocupa el espacio disponible y trunca */
.ads-fila-por-mensajes .ads-fila-nombre-campaña {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.ads-por-mensajes-total {
    margin-left: auto;
    flex-shrink: 0;
}

.ads-total-por-mensajes {
    font-weight: 500;
}
/* FIN TOP 5 CAMPAÑAS POR MENSAJES */


/* TOP 5 CAMPAÑAS GRAFICA */
.ads-resultados-grafica {
    width: 30%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.ads-grafica-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    padding: 0 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    font-size: 15px;
    flex-shrink: 0;
}

.ads-grafica-header span {
    flex: 1;
}

.ads-grafica-header select {
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 4px;
    color: #555;
    cursor: pointer;
    outline: none;
}

.ads-grafica-body {
    flex: 1;
    position: relative;
    min-height: 0;
    padding: 4px 6px;
    overflow: hidden;
}

.ads-grafica-body canvas {
    display: block;
}

#ads-grafica-rango {
    font-size: 12px;
    white-space: nowrap;
    flex: 0;
    flex-shrink: 0;
    margin-left: auto;
}
/* FIN TOP 5 CAMPAÑAS GRAFICA */

/* ===== FIN ADS PRIMERA LINEA ===== */


/* ===== ADS SEGUNDA LINEA ===== */
#ADS-SEGUNDA-LINEA {
    width: 100%;
    height: 170px;
    margin-bottom: 15px;
    display: flex;
}

/* === LISTADO CAMPAÑAS === */
.ads-listado {
    width: 65%;
}

.ads-listado-card {
    width: 97%;
    font-size: 14px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
}

.listado-ads-header {
    display: flex;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 1;
}

.listado-ads-header .ads-listado-campaña,
.listado-ads-header .ads-listado-canal,
.listado-ads-header .ads-listado-estado,
.listado-ads-header .ads-listado-clientes,
.listado-ads-header .ads-listado-comversaciones,
.listado-ads-header .ads-listado-leads-unicos,
.listado-ads-header .ads-listado-ultimo-mensaje,
.listado-ads-header .ads-listado-accion {
    flex: 1;
    text-align: center;
    padding: 4px;
}

.listado-ads-fila {
    display: flex;
    width: 100%;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.listado-ads-fila:hover {
    background-color: #f9f9f9;
    cursor: pointer;
}

.listado-ads-fila .ads-listado-campaña,
.listado-ads-fila .ads-listado-canal,
.listado-ads-fila .ads-listado-estado,
.listado-ads-fila .ads-listado-clientes,
.listado-ads-fila .ads-listado-comversaciones,
.listado-ads-fila .ads-listado-leads-unicos,
.listado-ads-fila .ads-listado-ultimo-mensaje,
.listado-ads-fila .ads-listado-accion {
    flex: 1;
    text-align: center;
    padding: 5px 4px;
    align-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.listado-ads-fila img {
    width: 18px;
    vertical-align: middle;
}

.ads-estado-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.ads-estado-activa {
    background-color: #d1fae5;
    color: #065f46;
}

.ads-estado-pausada {
    background-color: #fef3c7;
    color: #92400e;
}

.ads-accion-btn {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
}
/* === FIN LISTADO CAMPAÑAS === */

.ads-rendimiento-canal-grafica {
    width: 35%;
    height: 100%;
    border-radius: 5px;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
}

.ads-rendimiento-header {
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    font-size: 15px;
    flex-shrink: 0;
}

.ads-rendimiento-header span { flex: 1; }

.ads-rendimiento-header select {
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 4px;
    color: #555;
    cursor: pointer;
    outline: none;
}

.ads-rendimiento-body {
    flex: 1;
    position: relative;
    min-height: 0;
    padding: 4px 6px;
    overflow: hidden;
}
/* ===== FIN ADS SEGUNDA LINEA ===== */


/* ===== ADS PROCEDENCIA CLIENTE ===== */
#ADS-CLIENTE-PROCEDENCIA-AVANZADA {
    width: 100%;
    height: 175px;
    display: flex;
}

.clientes-procedencia-ads-card {
    width: 100%;
    font-size: 14px;
}

.clientes-procedencia-header {
    display: flex;
    width: 100%;
    height: 30px;
    align-items: center;
    box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.28);
}

.clientes-procedencia-header-cliente, .clientes-procedencia-header-canal, .clientes-procedencia-header-campaña,
.clientes-procedencia-header-Pclave, .clientes-procedencia-header-recurrente, .clientes-procedencia-header-fechaDe,
.clientes-procedencia-header-agente, .clientes-procedencia-header-estado, .clientes-procedencia-header-accion {
    text-align: center;
    width: 15%;
}

.clientes-procedencia-header-canal, .clientes-procedencia-header-recurrente, .clientes-procedencia-header-fechaDe,
.clientes-procedencia-header-estado, .clientes-procedencia-header-accion {
    width: 10%;
}

.clientes-procedencia-header-estado, .clientes-procedencia-header-accion {
    width: 5%;
}

.fila-procedencia-cliente {
    display: flex;
    height: 27px;
    align-items: center;
    margin-bottom: 2px;
    border-bottom: 1px solid #E3E3E3;
}

.col-procedencia-cliente, .col-procedencia-canal, .col-procedencia-campaña,
.col-procedencia-Pclave, .col-procedencia-recurrente, .col-procedencia-fechaDe,
.col-procedencia-agente, .col-procedencia-estado, .col-procedencia-accion {
    text-align: center;
    width: 15%;
}

.col-procedencia-canal, .col-procedencia-recurrente, .col-procedencia-fechaDe,
.col-procedencia-estado, .col-procedencia-accion {
    width: 10%;
}

.col-procedencia-estado, .col-procedencia-accion {
    width: 5%;
}
/* ===== FIN ADS PROCEDENCIA CLIENTE ===== */


/* ===== FIX SCROLL HORIZONTAL MARKETING ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

#ADS-CONTENT {
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

#ADS-PRIMERA-LINEA {
    width: 100%;
    max-width: 100%;
    height: 170px;
    margin-bottom: 15px;
    display: grid !important;
    grid-template-columns: minmax(0, 35fr) minmax(0, 35fr) minmax(0, 30fr);
    gap: 10px;
    overflow: hidden;
}

.ads-por-clientes,
.ads-por-mensajes,
.ads-resultados-grafica {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    overflow: hidden;
}

.ads-por-cliente-card,
.ads-por-mensajes-card {
    width: 95% !important;
    max-width: 95% !important;
    min-width: 0 !important;
    overflow: hidden;
}

.ads-por-clientes-header,
.ads-por-mensajes-header,
.ads-grafica-header {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.ads-fila-por-cliente .ads-fila-nombre-campaña,
.ads-fila-por-mensajes .ads-fila-nombre-campaña {
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ads-por-clientes-total,
.ads-por-mensajes-total {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
}

.ads-grafica-body canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    display: block;
}