/* Estilos globales   */

.input-error {
    border: 2px solid red !important;
    background-color: #ffe6e6;
}

.hidden {
    display: none;
}

.fx_f_crm_content {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: #e2e2e2;
    overflow: hidden;
}

.fx_f_crm_title {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
}

.fx_f_crm_titleNote {
    margin-bottom: 20px;
    font-size: 14px;
}

.fx_f_crm_etuHTitle {
    text-align: center;
    margin: 10px 0px;
    font-size: 1em;
    font-weight: bold;
}

.fx_f_columnSpacing {
    margin: 40px;
    border: none;
}

.backgroundPopup {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup {
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 170px);
    background-color: white;
    padding: 10px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    overflow: auto;
    z-index: 990;
}

.iconPointer {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    outline: none;
    box-shadow: none;
}

/* para tomar los colores y pasarlos a pdf */
@media print {
    * {
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
    }

    .no-print { 
        display: none !important; 
    } 

    /* Por defecto, se oculta la fila de descuento */
    .discount-row { 
        display: none !important; 
    }
    /* Si se ha activado la opción (se agrega la clase "printable"), se muestra */
    .discount-row.printable {
        display: block !important; 
    }
    /* El icono de toggle no se imprimirá en ningún caso */
    .toggle-discount { 
        display: none !important;
    }

}


/* Estilos globales   */

/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */
/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */
/* ¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~¬~ */

/* 
Estilo de menu principal donde estan los modulos
*/
.fx_f_crm_sidebar {
    position: absolute;
    width: 170px;
    height: 100%;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    transition: transform 0.3s ease;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 990;
    left: 0;
}

.fx_f_crm_sidebar_collapsed {
    width: 50px;
}

.fx_f_crm_toggle_btn {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* position: relative;
    top: 20px;
    right: -15px; */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.fx_f_crm_sidebar_collapsed .fx_f_crm_toggle_btn {
    transform: rotate(180deg);
}

.fx_f_crm_menu_item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    transition: all 0.3s ease;
    filter: grayscale(1);
}

.fx_f_crm_menu_item:hover {
    background-color: #f8f9fa;
}

.fx_f_crm_menu_item_active {
    background-color: rgba(177, 177, 177, 0.7);
    border-left: 3px solid var(--primary-color);
    filter: grayscale(0);
}

.fx_f_crm_icon_container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.fx_f_crm_menu_item img {
    width: 30px;
    height: 30px;
}

.fx_f_crm_menu_text {
    margin-left: 5px;
    font-size: 12px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.fx_f_crm_sidebar_collapsed .fx_f_crm_menu_text {
    opacity: 0;
    visibility: hidden;
}

.fx_f_crm_content_area {
    position: absolute;
    top: 0;
    left: 170px;
    right: 0;
    height: 100%;
    padding: 10px;
    transition: left 0.3s ease;
    overflow: auto;
    box-sizing: border-box;
}

.fx_f_crm_sidebar_collapsed ~ .fx_f_crm_content_area {
    left: 70px;
}

.fx_f_crm_content_section {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0px 10px;
    background-color: white;
    /* border-radius: 8px; */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: auto;
    box-sizing: border-box;
    display: none;
}

.fx_f_crm_content_section_active {
    display: block;
}

.fx_f_crm_content_header {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.fx_f_crm_sidebar_header {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fx_f_crm_sidebar_title {
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.fx_f_crm_sidebar_collapsed .fx_f_crm_sidebar_title {
    opacity: 0;
    visibility: hidden;
}

.fx_f_crm_arrowHiden {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    border: 1px solid #8a8a8a;
    z-index: 1100;
    cursor: pointer;
}

.fx_f_crm_arrowHiden span {
    color:var(--primary-color);
}






/* ------------------------ */
/* ------------------------ */
/* ------------------------ */
/* ------------------------ */
.fx_f_crm_additional_tabs {
    display: flex;
    position: sticky;
    top: 0;
    gap: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    background: white;
    z-index: 100;
    overflow: auto;
}

.fx_f_crm_tab {
    cursor: pointer;
    padding: 5px 10px;
    /* Otros estilos de pestaña */
    transition: background-color 0.3s ease;
}

.fx_f_crm_tab.active {
    background-color: #ddd;
    font-weight: bold;
    border-bottom: 2px solid;
}

/* ------------------------ */
/* ------------------------ */
/* ------------------------ */
/* ------------------------ */





/* Estilo de modulo de token */
.fx_f_crm_sticky {
    position: sticky;
    top: 60px;
    z-index: 50;
}

.fx_f_crm_saveCancel {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.fx_f_crm_search {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.fx_f_crm_formContainer {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border: 2px solid #e0e0e0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fx_f_crm_header {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #8d8d8d;
    flex-direction: column;
}

.fx_f_crm_section {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.fx_f_crm_section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.fx_f_crm_sectionHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #444;
    font-weight: bold;
    cursor: pointer;
}

.fx_f_crm_collapseBtn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.fx_f_crm_collapseBtn:hover {
    background: #f0f0f0;
}

.fx_f_crm_formGroup {
    margin-bottom: 15px;
    position: relative;
}

.fx_f_crm_label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fx_f_crm_required::after {
    content: " *";
    color: #ff4081;
}

.fx_f_crm_input, 
.fx_f_crm_select, 
.fx_f_crm_textarea,
.fx_f_crm_searchInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
}

.fx_f_crm_searchInput {
    margin-bottom: 10px;
}

.fx_f_crm_input:focus, 
.fx_f_crm_select:focus, 
.fx_f_crm_textarea:focus,
.fx_f_crm_searchInput:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.fx_f_crm_input:hover, 
.fx_f_crm_select:hover, 
.fx_f_crm_textarea:hover,
.fx_f_crm_searchInput:hover {
    border-color: #999;
}

.fx_f_crm_select {
    appearance: none;
    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%23666%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.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

.fx_f_crm_textarea {
    min-height: 120px;
    resize: vertical;
}

.fx_f_crm_subtitle {
    color: #666;
    font-size: 16px;
    margin: 20px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #8d8d8d;
}

.fx_f_crm_buttonGroup {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: nowrap;
}

.fx_f_crm_btn {
    display: flex;
    flex-direction: column;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.fx_f_crm_btnInfo,
.btnInvoiceSsearchButton {
    background-color: #444;
}

.fx_f_crm_btnTest {
    background-color: #b8860b;
}

.fx_f_crm_btnContract {
    background-color: #ff4081;
}

.fx_f_crm_btnInvoice {
    background-color: #39883c;
}

.fx_f_crm_btnSave,
.use-clientCMR,
.fx_f_crm_btnSaveRef, 
.fx_f_crm_btnFetchClient,
.add_invoice_item,
.fx_f_crm_btnSaveInvoice,
.save_invoice_button,
.fx_f_crm_btnSearchRef,
.use-invoice,
.clientSearchBtn,
.fx_f_crmStyBtnAddProduct,
.fx_f_crmBtnAddBrand,
.AddPopupProduct,
.AddPopupBrand,
.AddPopupAgente,
.fx_f_crmStyBtnAddAgente,
.productSearchBtn {
    background-color: #408cff;
}

.fx_f_crm_btnSaveNew {
    background-color: #285dac;
}

.fx_f_crm_btnCancel,
.cancel_invoice_design, 
.close-popup {
    background-color: #db8743;
}

.fx_f_crm_btnSearch,
.fx_f_crm_btnSearchInvoice {
    background-color: #707070;
}

.fx_f_crm_btnNewFicha {
    background-color: #50a5f5;
}

.fx_f_crm_btnViewInvoice,
.btnPrintInvoice {
    background-color: #298f43;
}

.fx_f_crm_btnNewInvoice {
    background-color: #e0c62f;
}

.fx_f_crm_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.fx_f_crm_btn:active {
    transform: translateY(0);
}

.fx_f_crm_error {
    color: #ff4081;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.fx_f_crm_sectionContent {
    display: none;
}

.fx_f_crm_agentInfo {
    font-size: 14px;
    line-height: 1.6;
}

.fx_f_crm_agentInfo div {
    margin-bottom: 4px;
    color: #666;
}

.fx_f_crm_agentInfo strong {
    color: #333;
}




/* Contenedor del listado de números de serie */
.serial-numbers-list {
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    background: #fff;
    margin-top: 5px;
    border-radius: 8px;
    position: relative;
    width: 100%;
    height: 100px;
    z-index: 1000;
  }
  
  /* Cada ítem del listado */
  .serial-number-item {
    padding: 5px 10px;
    cursor: pointer;
  }
  
  /* Efecto hover y selección */
  .serial-number-item:hover,
  .serial-number-item.selected {
    background-color: #b4b4b4;
  }

  .no-serials {
    padding: 5px 10px;
    cursor: pointer;
  }










/* diseño de popup de crear ficha */
.fx_f_crmBackgPopupRefDetail {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.fx_f_crmPopupRefDetail {
    width: 600px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.referido-guardado {
    color: #f97f0e !important; /* Cambia el color del icono para indicar que hay un referido */
    font-weight: bold;
}

.fx_f_crm_referidoDetails {
    margin-top: 15px; 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}










/* ---------------- */
/* ---------------- */
/* Shortcode de pestaña para cargar varios shortcode a la vez */
/* ---------------- */
/* ---------------- */

.fx_f_crm_tabs {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fx_f_crm_tabsContainer {
    display: flex;
    width: 100%;
    height: calc(100vh - 170px);
    flex-direction: row;
}

/* Pestañas en escritorio (verticales) */
.fx_f_crm_tabsNav {
    list-style: none;
    padding: 0;
    width: 150px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fx_f_crm_tabsNav li {
    padding: 15px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-right: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease;
}

.fx_f_crm_tabsNav li.active {
    background: #0073aa;
    color: #fff;
}

.fx_f_crm_tabsContent {
    padding: 15px;
    flex-grow: 1;
    border: 1px solid #ccc;
    overflow: auto;
    width: calc(100% - 150px);
}



/* ---------------- */
/* ---------------- */
/* Estilos de listadado de tabla */
/* ---------------- */
/* ---------------- */
/* Estilos de la tabla */
.table-responsive {
    overflow-y: auto;
    overflow-x: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
}
table th, table td {
    padding: 8px 12px;
    border: 1px solid #ccc;
    text-align: left;
}
thead th {
    position: sticky;
    top: 0;
    background-color: #f8f8f8;
    z-index: 2;
}
/* Botones de acciones */
.edit-button, .view-button {
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 5px;
}
.edit-button .material-symbols-outlined,
.view-button .material-symbols-outlined {
    font-size: 18px;
    vertical-align: middle;
}




/* ---------------- */
/* ---------------- */
/* Responsive: transformación en listado vertical */
/* ---------------- */
/* ---------------- */
.fx_f_crm_popupCackContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1200;
}

.fx_f_crm_popupContainer {
    border: 1px solid #ccc;
    width: 90%;
    max-width: 600px;
    min-height: 85%;
    max-height: 85%;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.fx_f_crm_closeBtn {
    position: relative;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}
.fx_f_crm_popupHeader h2 {
    margin: 0 0 20px;
    color: #2a6e78;
}
.fx_f_crm_formLayout {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.fx_f_crm_dataField {
    flex: 1 1 45%;
    margin-bottom: 10px;
}
.fx_f_crm_dataField label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #2a6e78;
}
.fx_f_crm_dataValue {
    padding: 5px 8px;
    border-bottom: 1px solid #2a6e78;
}
.fx_f_crm_actions {
    width: 100%;
    text-align: right;
    margin-top: 10px;
}







@media screen and (max-width: 768px) {

    .fx_f_crm_sidebar_title {
        display: none;
    }
      
        
    .fx_f_crm_formContainer {
        max-width: 100%;
    }


    
    .fx_f_crm_buttonGroup {
        flex-wrap: wrap;
    }

    .fx_f_crmPopupRefDetail{
        width: 95%;
    }

    .fx_f_crm_btn {
        font-size: 10px;
    }
    
    .fx_f_crm_btn.fx_f_crm_btnSave,
    .fx_f_crm_btn.fx_f_crm_btnSearch,
    .fx_f_crm_btn.fx_f_crm_btnNewFicha,
    .fx_f_crm_btn.fx_f_crm_btnSaveNew,
    .fx_f_crm_btn.fx_f_crm_btnCancel,
    .fx_f_crm_btn.fx_f_crm_btnSearchInvoice,
    .fx_f_crm_btn.fx_f_crm_btnSaveInvoice,
    .fx_f_crm_btn.use-clientCMR,
    .fx_f_crm_btn.fx_f_crm_btnNewInvoice,
    .fx_f_crm_btn.fx_f_crm_btnViewInvoice,
    .fx_f_crm_btn.fx_f_crm_btnFetchClient,
    .fx_f_crm_btn.add_invoice_item {
        font-size: 0;
        padding: 5px;
    }


    .fx_f_crm_btn.fx_f_crm_btnSave::before,
    .fx_f_crm_btn.fx_f_crm_btnSearch::before,
    .fx_f_crm_btn.fx_f_crm_btnNewFicha::before,
    .fx_f_crm_btn.fx_f_crm_btnSaveNew::before,
    .fx_f_crm_btn.fx_f_crm_btnCancel::before,
    .fx_f_crm_btn.fx_f_crm_btnSearchInvoice::before,
    .fx_f_crm_btn.fx_f_crm_btnSaveInvoice::before,
    .fx_f_crm_btn.use-clientCMR::before,
    .fx_f_crm_btn.fx_f_crm_btnNewInvoice::before,
    .fx_f_crm_btn.fx_f_crm_btnViewInvoice::before,
    .fx_f_crm_btn.fx_f_crm_btnFetchClient::before,
    .fx_f_crm_btn.add_invoice_item::before {
        font-family: "Material Symbols Outlined";
        font-size: 24px;
        font-weight: normal;
        display: inline-block;
    }

    .fx_f_crm_btn.fx_f_crm_btnSave::before {
        content: "save";
    }

    .fx_f_crm_btn.fx_f_crm_btnSearch::before {
        content: "search";
    }
    
    .fx_f_crm_btn.fx_f_crm_btnNewFicha::before {
        content: "add_notes";
    }

    .fx_f_crm_btn.fx_f_crm_btnSaveNew::before {
        content: "save_as";
    }

    .fx_f_crm_btn.use-clientCMR::before {
        content: "check";
    }

    .fx_f_crm_btn.fx_f_crm_btnCancel::before {
        content: "backspace";
    }

    /* -------- */
    /* -------- */

    .fx_f_crm_btn.fx_f_crm_btnSearchInvoice::before {
        content: "search";
    }

    .fx_f_crm_btn.fx_f_crm_btnSaveInvoice::before {
        content: "save";
    }

    .fx_f_crm_btn.fx_f_crm_btnNewInvoice::before {
        content: "post_add";
    }

    .fx_f_crm_btn.fx_f_crm_btnViewInvoice::before {
        content: "print";
    }

    .fx_f_crm_btn.fx_f_crm_btnFetchClient::before {
        content: "data_loss_prevention";
    }

    .fx_f_crm_btn.add_invoice_item::before {
        content: "add";
    }

    /* ---------------- */
    /* ---------------- */
    /* Estilos para moviles diferenciando sobre IOS y Android */
    /* ---------------- */
    /* ---------------- */

    /* Estilos para iPhone (iOS) */
    @supports (-webkit-touch-callout: none) {
        .fx_f_crm_content {
            height: calc(100vh - 175px);
            background-color: rgba(0, 122, 255, 0.1);
        }
    }

    /* Estilos para Android (Android) */
    @supports not (-webkit-touch-callout: none) {
        .fx_f_crm_content {
            height: calc(100vh - 70px);
            background-color: rgba(164, 198, 57, 0.1);
        }
    }

    /* ---------------- */
    /* ---------------- */
    /* Diseño responsivo: modo horizontal en tablet y móvil */
    /* ---------------- */
    /* ---------------- */

    .fx_f_crm_tabsContent {
        width: 100%;
        position: relative;
        top: 0px;
    }

    .fx_f_crm_tabsContainer {
        flex-direction: column;
    }

    .fx_f_crm_tabsNav {
        width: 100%;
        height: 50px;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        border-bottom: 2px solid #ccc;
    }

    .fx_f_crm_tabsNav li {
        flex: 1;
        min-width: 120px;
        text-align: center;
        border: 1px solid #ccc;
        border-bottom: none;
    }



    .fx_f_crm_popupContainer {
        width: 90%;
        min-height: 85%;
    }

    .fx_f_crm_tabsContainer {
        height: 100%;
        max-height: calc(100vh - 170px);
    }

}
