/* Estilos generales */

body {
    margin: 0;
    /*padding: 1rem; /* Añade padding alrededor de todo el contenido */
    font-family: Arial, sans-serif;
    font-size: 13px; 
    height: 100%;
    background-color: #eee;
}

/* Estilo para espaciado y tamaño de elementos */
.btn, input {
    margin-bottom: 10px; /* Añade margen en la parte inferior */
    width: 100%; /* Asegura que ocupen todo el ancho disponible */
}

/* Diseño de Cuadrícula Flexible */
.container {
    display: flex;
    flex-wrap: wrap;
}

/* Diseño de container en version movil */
@media (max-width: 768px) {
    .container {
        padding-left: 0px;
        padding-right: 0px;
    }
    .p-4{
        padding: 1rem !important;
    }
    .container-fluid {
        padding-left: 5px;
        padding-right: 5px;
    }
}

.container-fluid {
    display: flex;
    flex-wrap: wrap;
}

.container-header{
    border-color: #363636;
    background-color: #efefef; /* Ejemplo de color de fondo */
    padding: 5px;
    padding-right: 35px;
    padding-left: 20px;
    height: 50px;
    box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    /* z-index: 97; */

}

.container-big{
    margin: 2rem;
}

.form-control{
    border-color: #363636;
    background-color: #eee;
}

.action-button {
    padding: 5px;
    font-size: 12px;
    margin: 2px;
}

.input-secondary {
    border-color: #ced4da;
    background-color: #fff;
}
.btn-primary {
    border-color: #363636;
    background-color: #9eb8c5;
}
.btn-primary:hover {
    background-color: #78a2b7;
    border-color: #363636;
}
.btn-primary:active {
    background-color: #78a2b7;
    border-color: #363636;
}
.btn-dif {
    border-color: #363636;
    background-color: #fff;
    color: #363636;
}

.icon-btn{
    border: 0px;
    background-color: #eee;
    border-radius: 5px;
    font-size: 20px;
    margin-right: 7px;
}

.icon-btn:hover{
    background-color: #ddd;
}

.btn-simple-gris{
    border-color: #363636;
    background-color: #eee;
    color: #363636;
}

.btn-simple-gris:hover{
    background-color: #ddd;
}


@media (max-width: 768px) {

    #iconosFiltros {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
    }
}

.iconos-filtros {
    font-size: small; /* Tamaño de letra pequeño */
    color: #6c757d; /* Color sutil del texto */
    text-decoration: none; /* Sin subrayado */
    cursor: pointer;
    padding: 10px;
    margin-top: -5px;
    border-radius: 5px;  
}

.iconos-filtros:hover {
    text-decoration: underline; /* Subrayar al pasar el mouse */
    color: #495057; /* Cambio de color al pasar el mouse */
    background-color: #eeea;
}

.icono-filtro {
    margin-right: 8px;
    font-size: 18px;
}

/* Sidebar principal activa */

.main-container {
    display: flex;
    flex-direction: row;
    background-color: #eee;
}

.sidebar-main {
    width: 60px; /* Más compacto */
    height: 100%;
    background-color: #efefef;
    padding: 5px;
    border-bottom-right-radius: 8px;
}

#mainContent {
    flex-grow: 1;
    padding: 15px;
    padding-top: 25px; 
    margin: 5px;
    background-color: #fff;

    /* Otros estilos para el contenido */
}
/* Estilo para pantallas más grandes */
@media screen and (min-width: 768px) {
    #mainContent {
        flex-grow: 1;
        padding: 15px;
        padding-top: 25px;
        border-radius: 10px;
        border: 1px solid #e7e7e7;
        box-shadow: 0 6px 5px 0 #ccc;
    
        /* Otros estilos para el contenido */
    }
}

/* Estilo para pantallas más pequeñas */
@media screen and (max-width: 768px) {
    #mainContent {
        flex-grow: 1;
        padding: 0px;
        padding-top: 15px;
        border-radius: 10px;
        margin: 0px;
        border: 1px solid #e7e7e7;
        box-shadow: 0 6px 5px 0 #ccc;
    
        /* Otros estilos para el contenido */
    }
}

/* Home embebida en el panel de otra pantalla (Conversaciones SAC): sin el marco de tarjeta */
body.tt-home-embed {
    background-color: #fff;
}

body.tt-home-embed #mainContent {
    margin: 0;
    padding-top: 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Embebida solo se ven los resultados: los campos de búsqueda, filtros y botones aparecen
   cuando la pantalla que la contiene añade la clase tt-home-controles al body.
   !important porque main.js muestra algunos de esos bloques con style.display */
body.tt-home-embed:not(.tt-home-controles) #mainContent > :not(#output) {
    display: none !important;
}


@media (max-width: 768px) {
    .sidebar-main {
        width: 100%; /* Barra lateral a pantalla completa en móviles */
        display: none;
    }
    .main-container {
        flex-direction: column;
    }
}

.icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 5px;
    font-size: 11px;
    border-bottom: 1px solid #e7e7e7;
}

.icon-container i {
    margin-bottom: 5px; /* Espacio entre el icono y el texto */
    font-size: 20px; /* Tamaño del icono */
}

.icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease-in-out;
    position: relative;
    margin-top: 1px;
}

.icon-link .bi::before{
    line-height: 1.5;
}

/* Oculta el texto por defecto */
.icon-link span {
    display: none;
    position: absolute;
    left: 55px; /* Ajusta la posición fuera del menú */
    background: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* Muestra el texto al pasar el mouse */
.icon-link:hover span {
    display: block;
    opacity: 1;
    z-index: 99;
}

/* Iconos */
.icon-link i {
    font-size: 20px;
}

/* Efecto de hover */
.icon-link:hover {
    background-color: #d3d3d3;
    color: #111;
}

/* Activo */
.icon-link.active {
    background-color: #c7c7c7;
    color: #000;
}

/* Responsive: En pantallas pequeñas mostrar el menú completo */
@media (max-width: 768px) {
    .sidebar-main {
        width: 100%; /* Se expande en móviles */
        display: none;
    }
}

.icon-link:hover .icon-container {
    background-color: #ccca;
    color: #111;
    text-decoration: none; /* Elimina el subrayado de los enlaces */
}

.icon-container.active {
    background-color: #ccca;
    color: #111;
}

/* =========================================================
   SIDEBAR FLYOUT - Menú desplegable estilo Google Ads
   ========================================================= */

.sidebar-flyout {
    display: flex;
    height: 100%;
    position: relative;
    z-index: 1000;
}

/* Barra de iconos principal (estrecha) */
.sidebar-icons {
    width: 56px;
    height: 100%;
    background: transparent;
    border-right: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 2px;
}

/* Cada icono en la barra */
.sidebar-icon-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #595959; /* Color secundario gris oscuro */
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-icon-item i {
    font-size: 20px;
}

.sidebar-icon-item:hover {
    background-color: #e7e7e7;
    color: #f24660; /* Color corporativo principal */
    text-decoration: none;
}

.sidebar-icon-item.active,
.sidebar-icon-item.submenu-active {
    background-color: #f24660; /* Color corporativo principal */
    color: white;
}

.sidebar-icon-item.active:hover,
.sidebar-icon-item.submenu-active:hover {
    background-color: #d63d54; /* Un poco más oscuro */
    color: white;
}

/* Indicador visual de que tiene submenú */
.sidebar-icon-item.has-submenu::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid currentColor;
    opacity: 0.5;
}

.sidebar-icon-item.submenu-active::after {
    opacity: 1;
}

/* Spacer para empujar logout al fondo */
.sidebar-spacer {
    flex-grow: 1;
}

/* Panel de submenús (se despliega al lado) */
.sidebar-submenu-panel {
    position: absolute;
    left: 60px;
    top: 0;
    width: 260px;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 8px 8px 24px rgba(0, 0, 0, 0.12), 4px 4px 8px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    overflow-y: auto;
    z-index: 999;
}

.sidebar-submenu-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Cada submenú individual */
.sidebar-submenu {
    display: none;
    padding: 16px 0;
}

.sidebar-submenu.active {
    display: block;
}

/* Cabecera del submenú */
.submenu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 16px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.submenu-header i {
    font-size: 22px;
    color: #f24660;
}

.submenu-header span {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

/* Items del submenú */
.submenu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #595959;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 13px;
}

.submenu-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #595959;
}

.submenu-item span {
    flex-grow: 1;
}

.submenu-item:hover {
    background-color: #f8f9fa;
    color: #f24660;
    text-decoration: none;
}

.submenu-item:hover i {
    color: #f24660;
}

.submenu-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submenu-item.disabled:hover {
    background-color: transparent;
}

/* Badge para items próximos */
.submenu-badge {
    font-size: 10px;
    padding: 2px 6px;
    background-color: #ffc107;
    color: #212529;
    border-radius: 4px;
    font-weight: 600;
}

/* =========================================================
   SIDEBAR FLYOUT - DARK MODE
   ========================================================= */

.dark-mode .sidebar-icons,
.dark-mode-pure .sidebar-icons {
    background: transparent;
    border-right: none;
}

.dark-mode .sidebar-icon-item,
.dark-mode-pure .sidebar-icon-item {
    color: #a0aec0;
}

.dark-mode .sidebar-icon-item:hover,
.dark-mode-pure .sidebar-icon-item:hover {
    background-color: #2d3748;
    color: #f24660;
}

.dark-mode .sidebar-icon-item.active,
.dark-mode .sidebar-icon-item.submenu-active,
.dark-mode-pure .sidebar-icon-item.active,
.dark-mode-pure .sidebar-icon-item.submenu-active {
    background-color: #f24660;
    color: white;
}

.dark-mode .sidebar-submenu-panel,
.dark-mode-pure .sidebar-submenu-panel {
    background: #1e1e2e;
    border-color: #2d3748;
    box-shadow: 8px 8px 32px rgba(0, 0, 0, 0.4);
}

.dark-mode .submenu-header,
.dark-mode-pure .submenu-header {
    border-bottom-color: #2d3748;
}

.dark-mode .submenu-header i,
.dark-mode-pure .submenu-header i {
    color: #f24660;
}

.dark-mode .submenu-header span,
.dark-mode-pure .submenu-header span {
    color: #e2e8f0;
}

.dark-mode .submenu-item,
.dark-mode-pure .submenu-item {
    color: #a0aec0;
}

.dark-mode .submenu-item i,
.dark-mode-pure .submenu-item i {
    color: #718096;
}

.dark-mode .submenu-item:hover,
.dark-mode-pure .submenu-item:hover {
    background-color: #2d3748;
    color: #f24660;
}

.dark-mode .submenu-item:hover i,
.dark-mode-pure .submenu-item:hover i {
    color: #f24660;
}

/* =========================================================
   SIDEBAR FLYOUT - RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .sidebar-flyout {
        display: none;
    }
}

/* Ocultar el sidebar antiguo cuando existe el nuevo */
.sidebar-flyout ~ .sidebar-main {
    display: none;
}

/* Slider */

#statusRange {
    height: 10px;
    margin-bottom: 45px;
}

#statusRange .noUi-connect {
    background: #78a2b7;
}

#statusRange .noUi-handle {
    height: 18px;
    width: 18px;
    top: -5px;
    bottom: -5px;
    right: -9px; /* half the width */
    border-radius: 9px;
}
#statusRange .noUi-tooltip {
    display: none;
}
#statusRange .noUi-active .noUi-tooltip {
    display: block;
}
/* Estilo para las etiquetas de valores */
.noUi-pips .noUi-value {
    font-size: 10px;
    margin-top: 10px;
}

.noUi-pips .noUi-marker {
    background: #78a2b7;
}

.noUi-pips-horizontal {
    height: 20px;
}

/* Ocultar etiquetas y pips en dispositivos móviles */
@media (max-width: 768px) {
    .noUi-pips .noUi-value,
    .noUi-pips .noUi-marker {
        display: none;
    }
    #statusRange {
        height: 10px;
        margin-bottom: 10px;
    }
}

.loader {
    width: 50px;
    height: 50px;
    background: url(/static/images/Isotipo-animado.gif);
    background-size: contain;
}


#spinner {
    position: fixed; /* Hace que el spinner y su fondo se posicionen en relación con la ventana del navegador */
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center; /* Centra horizontalmente el spinner */
    align-items: center; /* Centra verticalmente el spinner */
    z-index: 9999; /* Asegura que el spinner esté sobre otros elementos */
}
  
.icon-dropdown {
    margin-left: -10px;
    margin-right: 5px;
    font-size: 14px;
}

.icon-action-btn {
    padding: 8px;
    font-size: 20px;
    border-radius: 5px;
    border: 2px solid #eee;
    width: 40px;
    height: 40px;
}

.icon-action-btn:hover {
    border: 2px solid #363636;
}

.text-action-btn {
    margin-bottom: 6px;
    vertical-align: middle;
    font-size: 14px;
}

/* Estilos de página de archivos */

.container-files {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#dropZone {
    width: 100%;
    max-width: 500px; /* Ajusta este valor según lo que necesites */
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    cursor: pointer;
    border-radius: 5px;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inputFiles .selectFiles {
    margin: 10px 0;
    width: 100%;
    max-width: 500px; /* Coincide con el ancho máximo de dropZone */
}


/* Estilo básico para botones de comentarios */
.comment-button {
    padding: 3px 6px; /* Menos padding para hacerlo más pequeño */
    background-color: #f0f0f0; /* Color claro para un botón sutil */
    border: 0px #ddd; /* Borde suave */
    color: #333; /* Color del texto */
    cursor: pointer;
    border-radius: 5px; /* Esquinas redondeadas */
    font-size: 12px; /* Tamaño de fuente más pequeño */
    transition: background-color 0.3s, border-color 0.3s;
}

/* Estilo para botones con comentarios */
.comment-button.highlight {
    background-color: #d6988b99; /* Color más llamativo */
    /*border-color: #388E3C; /* Borde más visible */
    /*color: white; /* Texto en color blanco para mejor contraste */
}

/* Estilo para hover en ambos tipos de botones */
.comment-button:hover {
    background-color: #d6988b; /* Cambio de color al pasar el ratón por encima */
    /*color: white;*/
}

.snapshot-button {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 3px;
    padding: 2px 5px;
    background-color: #fff1e5;
    border: 0;
    color: #9a5b24;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.3s, color 0.3s;
}

.snapshot-button:hover {
    background-color: #f4d4b8;
    color: #784315;
    text-decoration: none;
}

.snapshot-button.instructions-button {
    background-color: #f0edfa;
    color: #66558f;
}

.snapshot-button.instructions-button:hover {
    background-color: #dcd5f0;
    color: #4d3d76;
}


/* Oscurecer el fondo */
.chat-overlay {
    display: none; /* Inicialmente no se muestra */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* Estilo del popup del chat */
.chat-popup {
    display: none; /* Inicialmente no se muestra */
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    z-index: 100;
    max-width: 80%;
    width: 300px; /* Ancho por defecto */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.chat-header {
    display: flex; /* Usa flexbox para alinear los elementos */
    justify-content: space-between; /* Separa los elementos a los extremos */
    align-items: center; /* Alinea los elementos verticalmente */
    background-color: #bcd4bc;
    color: white;
    padding: 10px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.chat-body {
    padding: 10px;
    max-height: 450px;
    overflow-y: auto;
}

.chat-footer {
    display: flex;
    padding: 10px;
}

.chat-footer textarea {
    flex-grow: 1;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.chat-footer button {
    background-color: #bcd4bc;
    color: #363636;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.comment {
    background-color: #e7e7e7;
    margin: 5px 0;
    border-radius: 5px;
    padding: 5px 10px;
    word-wrap: break-word;
}
.comment-date {
    font-size: 0.8em;
    color: #363636;
    text-align: right;
}

.comment-user {
    font-weight: bold;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-header .comment-info {
    margin: 0;
    /*font-weight: bold;*/
}

.thumbs-up-icon {
    color: #363636; /* Color oscuro para el contorno */
    cursor: pointer;
    transition: color 0.3s; /* Transición suave para el cambio de color */
}

.thumbs-up-icon:hover {
    color: #818181; /* Cambia a un color azul al pasar el cursor por encima */
}

.thumbs-up-icon:active {
    color: #818181; /* Cambia a un tono de azul más oscuro al hacer clic */
}

.icon-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los iconos horizontalmente*/
    justify-content: center; /* Centra los iconos verticalmente*/
}

@media screen and (max-width: 600px) {
    .chat-popup {
        width: 100%;
        max-width: 100%;
    }
}

/* Estilo para pantallas más grandes */
@media screen and (min-width: 768px) {
    .chat-popup {
        width: 600px; /* Ancho más grande en pantallas de ordenador */
    }
}

.popup {
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; 
    background-color: rgba(0, 0, 0, 0.3);
    display: flex; 
    align-items: center; 
    justify-content: center;
    z-index: 9999;
  }
  .popup-content {
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    max-width: 750px; 
    text-align: center;
  }
  .popup-buttons {
    margin-top: 10px;
  }
  .popup-leyenda {
    margin-top: 15px; 
    font-size: 0.9em;
    color: #666;
  }


/* Popup de búsqueda de producto */

.modalProducto {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.modalProducto-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos para popup de incidencias */
.dropzone {
    background-color: #f9f9f9;
    border: 2px dashed #ccc;
    border-radius: 8px;
    transition: background-color 0.3s, border-color 0.3s;
    min-width: 150px;
  }
  
  .dropzone.dragover {
    background-color: #e6f7ff;
    border-color: #007bff;
  }
  
  .preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin: 5px;
    position: relative;
  }
  
  .image-container {
    position: relative;
    display: inline-block;
  }
  
  .btn-remove-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f24660;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 15px;
    cursor: pointer;
  }

/* Estilos para pantalla de Finanzas */

/* Bordes redondeados */
table.dataTable, .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px;
  }
  
  /* Sombra suave al pasar el cursor */
  table.dataTable tbody tr:hover {
    background-color: #eaf4ff;
    transition: background-color;
  }
  
  /* Celdas editables visualmente distintas */
  td.editable {
    background-color: #ecf8ff;  /* color muy suave amarillo */
    cursor: pointer;
    border-left: 3px solid #0798ff;  /* línea sutil amarilla */
  }
  
  td.editable:hover {
    background-color: #cdf0ff;
  }  

  .btn-fijo {
    white-space: nowrap;           /* Mantiene el texto en una línea */
    width: 130px;                  /* Mismo ancho para todos los botones */
    margin-right: 5px;             /* Espacio entre botones */
    display: inline-flex;          /* Alinea icono y texto horizontalmente */
    align-items: center;           /* Centra verticalmente */
    justify-content: center;       /* Centra horizontalmente */
    gap: 5px;                      /* Espacio entre icono y texto */
  }

  tr.dtrg-group {
    background-color: #c02c2c;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 8px;
  }

  /* Para evitar confusiones visuales al desactivar orden */
.orden-desactivado {
    cursor: default !important;
  }
  
.btn-icon-only-incidencias {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    line-height: 1;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only-incidencias:hover {
    color: #dc3545; /* rojo Bootstrap más fuerte */
    cursor: pointer;
    transform: scale(1.1);
}

/* ===== Reexpediciones DHL: estilos de tabla ===== */
/* Encabezado fijo para la tabla de reexpediciones */
#tablaReexpediciones thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
}

/* Columnas con tamaño uniforme */
#tablaReexpediciones {
    table-layout: fixed;
}
#tablaReexpediciones th,
#tablaReexpediciones td {
    width: 11.11%; /* 9 columnas ~ 100/9 */
}

/* Fondos sutiles por sección (1-3 original, 4-6 sustituta, 7-9 reclamación) */
#tablaReexpediciones thead tr:first-child th:nth-child(1) {
    background-color: #ea9999; /* azul muy suave */
}
#tablaReexpediciones thead tr:first-child th:nth-child(2) {
    background-color: #a2c4c9; /* verde muy suave */
}
#tablaReexpediciones thead tr:first-child th:nth-child(3) {
    background-color: #d5a6bd; /* naranja muy suave */
}

/* Colorear también la segunda fila de encabezados (títulos de cada columna) */
#tablaReexpediciones thead tr:last-child th:nth-child(1),
#tablaReexpediciones thead tr:last-child th:nth-child(2),
#tablaReexpediciones thead tr:last-child th:nth-child(3) {
    background-color: #f4cccc !important;
}
#tablaReexpediciones thead tr:last-child th:nth-child(4),
#tablaReexpediciones thead tr:last-child th:nth-child(5),
#tablaReexpediciones thead tr:last-child th:nth-child(6) {
    background-color: #d0e0e3 !important;
}
#tablaReexpediciones thead tr:last-child th:nth-child(7),
#tablaReexpediciones thead tr:last-child th:nth-child(8),
#tablaReexpediciones thead tr:last-child th:nth-child(9) {
    background-color: #ead1dc !important;
}

/* Fondo sutil por columnas en el cuerpo para distinguir secciones */
#tablaReexpediciones tbody td:nth-child(-n+3) { /* 1-3 */
    background-color: #f4cccc99;
}
#tablaReexpediciones tbody td:nth-child(n+4):nth-child(-n+6) { /* 4-6 */
    background-color: #d0e0e399;
}
/* #tablaReexpediciones tbody td:nth-child(n+7):nth-child(-n+9)
    background-color: #ead1dc99;
} */

/* Asegurar estilo editable igual que en General */
#tablaReexpediciones td.editable,
#tablaReexpediciones td.editable-reexp {
    background-color: #ffffff;
    cursor: pointer;
    border-left: 3px solid #474747;
}
#tablaReexpediciones td.editable:hover,
#tablaReexpediciones td.editable-reexp:hover {
    background-color: #f1fbff;
}

/* Estilos para el dropdown de estado */
#tablaReexpediciones .estado-select {
    border: none;
    background: transparent;
    padding: 2px 4px;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
}

#tablaReexpediciones .estado-select:focus {
    outline: 2px solid #ead1dc;
    outline-offset: -2px;
    border-radius: 3px;
}

/* Colores para las opciones del dropdown */
#tablaReexpediciones .estado-select option[value="Anterior"] {
    color: #6c757d;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Reclamado"] {
    color: #6c757d;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Denegada"] {
    color: #dc3545;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Aceptada"] {
    color: #28a745;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Compensada"] {
    color: #17a2b8;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Cobro erróneo"] {
    color: #ffc107;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Con problemitas"] {
    color: #fd7e14;
    font-weight: bold;
}
#tablaReexpediciones .estado-select option[value="Descartar"] {
    color: #6c757d;
    font-weight: bold;
}

/* Fondos por estado en la celda (Estado) */
#tablaReexpediciones td.estado-dropdown.estado-bg-Anterior { background-color: #e9ecef !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-Reclamado { background-color: #fff3cd !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-Denegada { background-color: #f8d7da !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-Aceptada { background-color: #d4edda !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-Compensada { background-color: #d1ecf1 !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-CobroErroneo { background-color: #fff3cd !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-ConProblemitas { background-color: #ffe5d0 !important; }
#tablaReexpediciones td.estado-dropdown.estado-bg-Descartar { background-color: #e2e3e5 !important; }

/* ... existing code ... */

/* Encabezado fijo para la tabla de finanzas */
#tablaIncidencias thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    font-weight: 600;
    color: #495057;
}
  

/* Estilos para el Menú Hamburguesa */
.sidebar {
    height: 100%; /* Altura completa */
    width: 0; /* Ancho inicial del menú */
    position: fixed; /* Posición fija */
    z-index: 100; /* Asegura que esté sobre otros elementos */
    top: 0; /* Desde la parte superior */
    left: 0; /* Desde la parte izquierda */
    background-color: #e7e7e7; /* Color de fondo */
    overflow-x: hidden; /* Oculta el desbordamiento horizontal */
    transition: 0.2s; /* Efecto de transición suave */
    padding-top: 60px; /* Espacio en la parte superior */
    display: flex;
    flex-direction: column;
}

/* Contenedor para cerrar sesión y email del usuario */
.user-info {
    margin-top: auto; /* Empuja la sección al fondo */
}

/* Estilos para las opciones del menú */
.sidebar a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    /*transition: 0.3s;*/
}

.sidebar button {
    margin-bottom: 15px; /* Añade espacio debajo de cada botón */
}

.sidebar a:hover {
    color: #f1f1f1;
}

/* Estilo para el icono de Menú Hamburguesa */
#menuIcon {
    cursor: pointer;
    /* Ajustes adicionales para tamaño, posición, etc. */
}

.dropdown-menu {
    font-size: 12px; /* Tamaño de fuente más pequeño para el menú */
}

.dropdown-btn {
    cursor: pointer;
    /* Ajustes adicionales para tamaño, posición, etc. */
}

.dropdown-btn a:hover {
    background-color: #f1f1f1; 
}

.dropdown-menu a:hover {
    background-color: #f1f1f1; 
}
.dropdown-item-active {
    background-color: #9eb8c5; 
}
.dropdown-menu {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* Ajusta los valores según necesites */
}

/* Estilos para el menú y el fondo oscuro */
.options-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 100;
    border-radius: 10px 10px 0 0;
    padding: 20px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.option {
    display: block;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.option:last-child {
    border-bottom: none;
}

.option:hover {
    background-color: #f0f0f0;
}

.cancel {
    color: red;
}



#closeMenuBtn {
    position: absolute; /* Posicionamiento absoluto dentro del menú */
    top: 10px; /* Espacio desde la parte superior del menú */
    right: 10px; /* Espacio desde la parte derecha del menú */
    border: none; /* Opcional: elimina el borde del botón */
    background: transparent; /* Opcional: hace que el fondo sea transparente */
    cursor: pointer; /* Cambia el cursor para indicar que es clickeable */
}

/* Añade esta sección de estilo en tu archivo CSS */
.card-container {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.card {
  background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.card-header {
  background-color: #E5E5E5;
  color: #333333;
  padding: 10px 15px;
  font-size: 1.3em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 15px;
  font-size: 0.9em;
}

.card-footer {
  background-color: #FFFFFF;
  padding: 10px 15px;
  font-size: 0.8em;
  display: flex;
  justify-content: space-between;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
}

/* Estilos para los estados */
.Desaparecido { background: #aaaaaabb; }
.Pendiente { background: #ffae9f99; }
.Encargado { background: #ffc9a599; }
.Reasignado { background: #ffc9a599; }
.Cortado { background: #ffb06699; }
.Canteado { background: #ffb06699; }
.Mecanizado { background: #ffb06699; }
.CanteadoCNC { background: #ffb06699; }
.Recibido { background: #f4eab299; }
.Recibidotodo { background: #f0f4b2bb; }
.Defectuoso { background: #fcd3f6bb; }
.Taller { background: #f4eab299; }
.Sinstock { background: #fcd3f6bb; }
.Stock { background: #ebf4b299; }
.Prefabricado { background: #d9aeff66; }
.Faltastock { background: #fcd3f6bb; }
.Picking { background: #d9aeffbb; }
.Embaladoparcial { background: #d3edaa99; }
.Embalado { background: #aaedaf99; }
.Embaladotodo { background: #aaedafbb; }
.Preparado { background: #a4d4d499; }
.Enviado { background: #8cabda99; }
.Entregado { background: #a9a3e499; }
.Completado { background: #8789a899; }
.Despiezado { background: #fcd3f6bb; }
.Pausado { background: #aaaaaabb; }
.Devuelto { background: #f0f4b299; }
.Reenviado { background: #a4bcd499; }
.Reexpedido { background: #ff7a7a99; }
.Reexpedidoparcial { background: #ffa47a99; }
.Cancelado { background: #ff7a7a99; }
.Pendientedepago { background: #ff7a7a99; }
.ReteneryHablarconSarayantesdeenviar { background: #fcd3f6bb; }
/* ... y así sucesivamente para los demás estados ... */
      
/* Estilos para el contenedor de botones de acción */
.card-action-buttons {
    display: flex; /* Usa Flexbox para alinear los elementos */
    justify-content: space-around; /* Distribuye los botones uniformemente */
    /*padding: 10px; /* Espacio alrededor de los botones */
    background-color: #F9F9F9; /* Color de fondo para el contenedor de botones */
    border-top: 1px solid #E5E5E5; /* Línea divisoria para separar del footer */
}

/* Estilos para los botones de acción */
.card-action-buttons .btn, .card-action-buttons .action-button {
    flex-grow: 1; /* Permite que los botones crezcan para ocupar el espacio */
    /*margin: 0 5px; /* Espacio entre los botones */
    text-align: center; /* Alinea el texto dentro de los botones */
}

/* Ajustes para que el botón no sea demasiado ancho en caso de pocos botones */
.card-action-buttons .action-button {
  
    padding: 3px 6px; /* Menos padding para hacerlo más pequeño */
    background-color: #9eb8c5; /* Color claro para un botón sutil */
    border: 0px #ddd; /* Borde suave */
    color: #333; /* Color del texto */
    cursor: pointer;
    border-radius: 4px; /* Esquinas redondeadas */
    /*font-size: 12px; /* Tamaño de fuente más pequeño */
    transition: background-color 0.3s, border-color 0.3s;
    max-width: 100px; /* Establece un ancho máximo para los botones */
}

/* Estilo para resaltar el botón de comentarios si tiene comentarios */
.card-action-buttons .comment-button {
    background-color: #eee; /* Color de fondo para botones destacados */
}

.card-action-buttons .highlight {
    background-color: #d6988b; /* Color de fondo para botones destacados */
}

/* Estilos para editar pedido */

.editOrderSection:hover {
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  background-color: #eee;
}

.editOrderSection {
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s, box-shadow 0.3s;
}

#editOrderSearch {
    margin-bottom: 15px;
    margin-left: 10px;
    margin-top: 0px;
    border-bottom: 1px solid #ccc;
}

/*Estilos para settings */

.settings-container {
    padding: 20px;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
}

.nav-tabs .nav-link {
    border: 1px solid #ccc;
    background-color: #eee;
    color: #333;
}

.nav-tabs {
    background-color: #eee;
}

.nav-tabs :hover {
    background-color: #fff;
}

#mainContentTabs {
    flex-grow: 1;
    padding: 15px;
    padding-top: 25px; /* Ajusta el espaciado según necesites */
    margin: 5px;
    background-color: #fff;

    /* Otros estilos para el contenido */
}
/* Estilo para pantallas más grandes */
@media screen and (min-width: 768px) {
    #mainContentTabs {
        flex-grow: 1;
        padding: 0px;
        padding-top: 0px; /* Ajusta el espaciado según necesites */
        border-radius: 10px;
        box-shadow: 0 6px 5px 0 #ccc;
    
        /* Otros estilos para el contenido */
    }

    .settings-container {
        display: flex;
    }

    .settings-title{
        flex: 1;
    }
    
    .settings-control{
        flex: 2;
    }
}

#user-table-body .btn{
    margin-bottom: 0px;
}

#user-table-body td{
    padding: .25rem;
}

/* Estilos para pantalla de pedidos a proveedores */
.tabla-pedidos {
    width: 100%; /* Ajusta el ancho al 100% */
    border-collapse: collapse; /* Fusiona los bordes de las celdas */
    margin: auto; /* Centra la tabla */
    margin-bottom: 5px; /* Añade espacio en la parte inferior */
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px;
    font-weight: 400;
    

}

.barra-estados {
    display: flex;
    height: 20px;
    width: 150px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.barra-segmento {
    height: 100%;
}

.tabla-pedidos td{
    padding: 2px;
    vertical-align: middle; /* Alinea verticalmente el contenido */
    
    border-bottom: 1px solid #ddd; /* Borde de las celdas */
    border-radius: 10px; /* Esquinas redondeadas */
    
}

.tabla-pedidos th {
    background-color: #f9f9f9; /* Color de fondo para las cabeceras */
    padding: 2px; /* Espacio interno de las cabeceras */
    border-bottom: 1px /* Borde inferior de las cabeceras */
}


#moduloProveedores .nombre-proveedor {
    width: 70%; /* Mayor espacio para el texto */
    vertical-align: middle; /* Alinea verticalmente el texto */
    text-align: center;
    
}

#moduloProveedores .accion-proveedor {
    width: 30%; /* Menor espacio para el botón */
    text-align: center; /* Alinear el botón a la derecha */
}

.accion-proveedor .btn , .accion-reservados .btn{
    margin-bottom: 0px; /* Elimina el margen del botón */
}

.moduloProveedores{
    display: flex;
}

.card-header-proveedores{
    padding: 0px 15px;
    vertical-align: middle;
}

.card-header-proveedores p{
    margin: 10px;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    min-height: 38px;
    padding: 0.25rem 0.75rem;  
    font-size: 14px;
}

#exportarPedidoBtn{
    background-color: #a8b49b;
}

#exportarPedidoBtn:hover {
    background-color: #758c5f;
}

.pedido-reservado {
    background-color: #e1ffcc96 !important; /* Color de fondo para pedidos reservados */
}

.table-responsive {
    margin-top: 15px;
}

.tablePiezas thead {
    background-color: #343a40;
    color: #fff;
}

.tablePiezas th, .tablePiezas td {
    text-align: center;
    vertical-align: middle;
}

.tablePiezas tbody tr:hover {
    background-color: #ebfcfe;
}

.table-revisar-y-exportar td{
    padding: 0px;
    vertical-align: middle;
}

.btnEliminar{
    background-color: rgb(163, 50, 50);
    color: white;
    border: 1px;
    border-radius: 3px;
}

.numero-fila {
    color: #c8c8c8; /* Gris claro */
}

.tooltip-text-material {
    display: none;
    position: absolute;
    z-index: 10;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px;
    max-width: 300px;
    white-space: pre-wrap;
    font-size: 0.7em;
    top: 100%;
    left: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/*Boton de inicio de sesión*/
.btn-google {
    background-color: #ffffff;
    color: #757575;
    border: 1px solid #dcdcdc;
    padding: 8px 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-google:hover {
    background-color: #f7f7f7;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.google-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* Estilos para la pantalla de preparación de pedidos */

.pedido-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    margin: 10px;
    font-size: 1.2em;
    text-align: center;
    display: inline-block;
    width: calc(20%);
    cursor: pointer;
}

.halfContent {
    flex-grow: 1;
    padding: 10px;
    border-radius: 7px;
    border: 1px solid #e7e7e7;
    box-shadow: 0 0 10px 0 #ccc;
    overflow-y: auto;

    /* Otros estilos para el contenido */
}

.leftContent {
    text-align: center;
    justify-content: center;
}

.card-title-half-content {
    border-bottom: #ccc 1px solid;
    text-align: center;
    padding-bottom: 5px;
}

.halfContentRow{
    padding: 10px;
}

.card-peticiones {
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    margin-bottom: 10px;
}

.card-peticiones-datos {
    width: 90%;
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
}

.card-peticiones-acciones{
    width: 10%;
    display: flex;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    padding: 3px;
    border-left: #ccc 1px solid;
}

.card-peticiones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-peticiones-title {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    padding-right: 20px;
}

.card-peticiones-body {
    margin-top: 5px;
}

.card-peticiones-text {
    font-size: 1em;
    margin: 0;
    text-align: right;
}

.card-peticiones-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    border-top: #ccc 1px solid;
    padding-top: 2px;
}

.card-peticiones-footer small {
    margin-right: 5px;
}

.btn-peticiones {
    border-radius: 50px;
    background-color: #36363668;
    color: #fff;
    margin: 0;
}

.urgencia-baja {background-color: #b3fef0;
}
.urgencia-media {background-color: #b4ecfb;
}
.urgencia-alta {background-color: #bfc3f7;
}
.urgencia-maxima {background-color: #e494ff; 
    border: 2px solid #363636;
}

.chat-footer-peticiones {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
}

.chat-comment-peticiones {
    width: 100%;
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 5px;
}

.campo-peticiones{
    margin: 0;
}

.see-solved-request-btn {
    cursor: pointer;
    margin-bottom: -5px;
    padding-top: 4px;
    padding-left: 5px;
    font-size: 11px;
}

.see-solved-request-btn:hover {
    text-decoration: underline;
}

/* Estilos para la pestaña de noticias de sac */
.card-noticias {
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    margin-bottom: 10px;
}

.card-noticias-datos {
    width: 95%;
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
}

.card-noticias-acciones {
    width: 5%;
    display: flex;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    padding: 3px;
    border-left: #ccc 1px solid;
}

.card-noticias-header {
    align-items: center;
}

.card-noticias-title {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
    padding-right: 20px;
}

.card-noticias-body {
    margin-top: 5px;
}

.card-noticias-text {
    font-size: 1em;
    margin: 0;
}

.card-noticias-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    border-top: #ccc 1px solid;
    padding-top: 2px;
}

.card-noticias-footer small {
    margin-right: 5px;
}

.btn-noticias {
    border-radius: 50px;
    background-color: #36363668;
    color: #fff;
    margin: 0;
}

.urgencia-news-baja {border: 1px solid #1cc422;}
.urgencia-news-media {border: 1px solid #b7c916;}
.urgencia-news-alta {border: 2px solid #c7b816;}
.urgencia-news-maxima {background-color: #f6e6fb; 
    border: 3px solid #c81717;
}

/* Tarjeta de categoría */
.item-categoria-paneles {
    padding: 1px 15px;  /* 1px arriba/abajo, 15px laterales */
    display: flex;
    align-items: center;
    font-size: 12px; /* Reducimos un poco el tamaño de la fuente */
}

/* Círculo de color */
.categoria-color {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid #ccc; /* Bordes sutiles para mejor visibilidad */
    margin-right: 8px;
}

/* Nombre de la categoría */
.categoria-nombre {
    font-weight: 500;
    white-space: nowrap; /* Evita saltos de línea innecesarios */
}

/* Botón de eliminar con ancho fijo */
.w-fixed {
    min-width: 80px; /* Ajustado a un ancho razonable */
    text-align: center;
    padding: 2px 5px; /* Padding reducido */
    font-size: 12px; /* Tamaño de fuente más pequeño */
}



.chat-footer-noticias {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
}

.chat-comment-noticias {
    width: 100%;
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 5px;
}

.campo-noticias {
    margin: 0;
}

.see-solved-news-btn {
    cursor: pointer;
    margin-bottom: -5px;
    padding-top: 4px;
    padding-left: 5px;
    font-size: 11px;
}

.see-solved-news-btn:hover {
    text-decoration: underline;
}


/* Estilos para la pantalla de STOCK */

/* Estilos específicos para la pantalla de stock */
.stock-card {
    border-radius: 10px;
    background-color: #f8f9fa;
    padding: 15px;
    width: 100%;
}

.stock-select,
.stock-input {
    width: 100%;
    border-radius: 5px;
}

.stock-btn {
    font-weight: bold;
    border-radius: 5px;
    width: 100%;
}

/* Contenedor del registro de movimientos */
.stock-log-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background: #fff;
}

.stock-log .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 5px 10px;
}

/* Iconos de estado */
.badge-status {
    font-size: 10px;
    padding: 3px 5px;
}

/* Colores según estado */
.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-danger {
    background-color: #dc3545;
}


/* Estilos para el modal de SKU */
.stock-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.stock-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 350px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.stock-modal-content input[type="text"] {
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.stock-modal-content .stock-modal-btn {
    margin: 10px 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.stock-modal-btn-secondary {
    background: #6c757d;
    color: white;
}

.stock-modal-checkbox {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    align-items: flex-start;
}

.stock-modal-checkbox input {
    margin: 4px;
    margin-right: 8px;
    width: 10%;
    padding: 2px;

}

/* ==========================================
   SALIDAS PENDIENTES - Estilos
   ========================================== */

/* Barra de encabezado del pedido */
.pedido-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #fafbfc;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pedido-header-bar:hover {
    border-color: #c8d1db;
}

/* Estado activo - borde destacado con indicador visual */
.pedido-header-bar.pedido-header-activo {
    border-color: #28a745;
    border-width: 3px;
    padding: 6px 12px; /* Compensar el borde más grueso */
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    position: relative;
    animation: pulse-active-border 2s ease-in-out infinite;
}

.pedido-header-bar.pedido-header-activo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes pulse-active-border {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    }
    50% { 
        box-shadow: 0 2px 12px rgba(40, 167, 69, 0.4);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Spinner para botones de carga */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Estado bloqueado - más sutil */
.pedido-header-bar.pedido-header-bloqueado {
    opacity: 0.6;
    background: #f6f8fa;
}

/* Información del pedido (izquierda) */
.pedido-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pedido-numero {
    font-size: 1rem;
    font-weight: 600;
    color: #24292e;
}

/* Contador de piezas */
.pedido-header-contador {
    display: flex;
    align-items: baseline;
    gap: 2px;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    font-size: 0.8rem;
}

.pedido-header-contador .piezas-listas {
    font-weight: 700;
    color: #28a745;
}

.pedido-header-contador .piezas-separador {
    color: #959da5;
    margin: 0 1px;
}

.pedido-header-contador .piezas-total {
    font-weight: 600;
    color: #586069;
}

/* .piezas-label ya no se usa - eliminado */

/* Acciones del pedido (derecha) */
.pedido-header-acciones {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pedido-header-acciones .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-bottom: 0;
    min-width: auto;
}

.pedido-header-acciones .btn i {
    font-size: 0.9rem;
}

/* Footer de las tarjetas de salidas */
.salida-card-footer {
    padding: 0.5rem 0.75rem !important;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

/* Botón Listo dentro de las tarjetas */
.salida-btn-listo {
    margin-bottom: 0 !important;
    max-width: 90px;
    padding: 4px 8px !important;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.salida-btn-listo .contador-listo {
    font-size: 0.75rem;
}

/* Barra de acciones superior (Recargar, Instrucciones, Total) */
.salidas-acciones-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.salidas-acciones-links {
    display: flex;
    align-items: center;
}

.salidas-total {
    white-space: nowrap;
}

/* Responsive - solo ocultar texto en móvil pequeño */
@media (max-width: 576px) {
    .pedido-header-acciones .btn .btn-texto {
        display: none;
    }
    
    .pedido-header-acciones .btn {
        padding: 6px 8px;
    }
    
    /* En móvil, separar en 2 líneas */
    .salidas-acciones-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .salidas-total {
        width: 100%;
    }
}

/* Botón desactivado (gris) */
.btn-salida-disabled {
    background: transparent;
    border: 1px solid #d1d5da;
    color: #959da5;
    cursor: not-allowed;
}

.btn-salida-disabled:hover {
    background: transparent;
    border-color: #d1d5da;
    color: #959da5;
}

/* Botón parcial - hereda el color del estado */
.btn-salida-parcial {
    background: transparent;
    border-width: 2px;
    border-style: solid;
    font-weight: 500;
}

.btn-salida-parcial.Embalado {
    border-color: #6abf69;
    color: #4a9f49;
}

.btn-salida-parcial.Embalado:hover {
    background: rgba(106, 191, 105, 0.1);
}

.btn-salida-parcial.Preparado {
    border-color: #7ec4c4;
    color: #5aa4a4;
}

.btn-salida-parcial.Preparado:hover {
    background: rgba(126, 196, 196, 0.1);
}

.btn-salida-parcial.Stock {
    border-color: #c5d86d;
    color: #8a9c3a;
}

.btn-salida-parcial.Stock:hover {
    background: rgba(197, 216, 109, 0.1);
}

/* Botón completo - fondo del color del estado */
.btn-salida-completo {
    border: none;
    color: #212529;
    font-weight: 600;
}

.btn-salida-completo.Embalado {
    background: #aaedaf99;
}

.btn-salida-completo.Embalado:hover {
    background: #8de094;
}

.btn-salida-completo.Preparado {
    background: #a4d4d499;
}

.btn-salida-completo.Preparado:hover {
    background: #89c4c4;
}

.btn-salida-completo.Stock {
    background: #ebf4b299;
}

.btn-salida-completo.Stock:hover {
    background: #d8e89a;
}

/* Estilos adicionales para la barra de pedido */
.salida-btn-iniciar,
.salida-btn-embalado,
.salida-btn-preparado,
.salida-btn-listo {
    min-width: 40px;
    transition: all 0.2s ease;
}

.salida-btn-listo .contador-listo {
    margin-left: 4px;
    font-weight: 600;
}

/* Responsive: en móvil solo mostrar iconos */
@media (max-width: 576px) {
    .salida-btn-iniciar,
    .salida-btn-embalado,
    .salida-btn-preparado {
        padding: 0.25rem 0.5rem;
    }
}

/* Estilos para el modal de crear producto */
#btnCrearProductoStock{
    margin-right: 10px;
}

#modalCrearProductoStock .modal-body {
    width: 100%;
}

#modalCrearProductoStock .modal-body .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

#modalCrearProductoStock .modal-body .form-group {
    width: 100%;
}

#modalCrearProductoStock .modal-footer {
    width: 100%;
    display: flex;
    justify-content: stretch;
}

#modalCrearProductoStock .modal-footer .btn {
    flex: 1;
}

#modalCrearProductoStock .modal-footer .btn + .btn {
    margin-left: 10px;
}

/* Estilos para el toggle de tipo de imagen */
#modalCrearProductoStock .btn-group-toggle {
    border: 2px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
}

#modalCrearProductoStock .btn-group-toggle .btn {
    border: none;
    border-radius: 0;
    padding: 10px 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: transparent;
    color: #495057;
}

#modalCrearProductoStock .btn-group-toggle .btn:hover {
    background: #e9ecef;
    color: #007bff;
}

#modalCrearProductoStock .btn-group-toggle .btn.active {
    background: #007bff;
    color: white;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

#modalCrearProductoStock .btn-group-toggle .btn.active:hover {
    background: #0056b3;
    color: white;
}

#modalCrearProductoStock .btn-group-toggle .btn i {
    margin-right: 5px;
}

#modalCrearProductoStock .tipo-imagen-contenido {
    animation: fadeIn 0.2s ease-in;
}

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

/* ===== LANZADOR LIGERO DE TUTROASIST ===== */
.tutroasist-drawer-launcher {
    position: fixed;
    right: 82px;
    bottom: 20px;
    z-index: 10000;
    display: inline-flex;
    height: 50px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 17px;
    border: 0;
    border-radius: 25px;
    background: #303038;
    color: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(30, 30, 37, 0.28);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tutroasist-drawer-launcher:hover {
    background: #f24660;
    transform: translateY(-2px);
}

.tutroasist-drawer-launcher i {
    color: #f24660;
    font-size: 1rem;
}

.tutroasist-drawer-launcher:hover i {
    color: #fff;
}

.tutroasist-drawer-overlay {
    position: fixed;
    z-index: 11990;
    inset: 0;
    background: rgba(24, 24, 27, 0.32);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tutroasist-drawer-overlay.is-open {
    opacity: 1;
}

.tutroasist-drawer-overlay[hidden],
.tutroasist-drawer[hidden] {
    display: none;
}

.tutroasist-drawer {
    position: fixed;
    z-index: 12000;
    top: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    width: clamp(560px, 40vw, 860px);
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dedee2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(24, 24, 27, 0.28);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.22s ease;
}

.tutroasist-drawer.is-open {
    transform: translateX(0);
}

.tutroasist-drawer-header {
    display: flex;
    min-height: 50px;
    flex: 0 0 50px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid #e2e2e5;
    background: #fff;
}

.tutroasist-drawer-title,
.tutroasist-drawer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutroasist-drawer-title {
    color: #242428;
    font-size: 0.9rem;
    font-weight: 700;
}

.tutroasist-drawer-title i {
    color: #f24660;
}

.tutroasist-drawer-controls a,
.tutroasist-drawer-controls button {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #71717a;
    cursor: pointer;
    font-size: 0.72rem;
    text-decoration: none;
}

.tutroasist-drawer-controls a:hover,
.tutroasist-drawer-controls button:hover {
    background: #f5f5f6;
    color: #242428;
    text-decoration: none;
}

.tutroasist-drawer-frame-host {
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
    background: #f8f8f9;
}

.tutroasist-drawer-loading {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #71717a;
    font-size: 0.82rem;
}

.tutroasist-drawer-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
    opacity: 0;
}

.tutroasist-drawer-frame.is-loaded {
    opacity: 1;
}

body.tutroasist-drawer-open {
    overflow: hidden;
}

html.dark-mode .tutroasist-drawer,
html.dark-mode-pure .tutroasist-drawer,
html.dark-mode .tutroasist-drawer-header,
html.dark-mode-pure .tutroasist-drawer-header {
    border-color: #373741;
    background: #1e1e25;
}

html.dark-mode .tutroasist-drawer-title,
html.dark-mode-pure .tutroasist-drawer-title {
    color: #eeeef0;
}

html.dark-mode .tutroasist-drawer-controls a:hover,
html.dark-mode-pure .tutroasist-drawer-controls a:hover,
html.dark-mode .tutroasist-drawer-controls button:hover,
html.dark-mode-pure .tutroasist-drawer-controls button:hover {
    background: #30303a;
    color: #eeeef0;
}

html.dark-mode .tutroasist-drawer-frame-host,
html.dark-mode-pure .tutroasist-drawer-frame-host {
    background: #15151a;
}

@media (max-width: 768px) {
    .tutroasist-drawer-launcher,
    .tutroasist-drawer,
    .tutroasist-drawer-overlay {
        display: none !important;
    }
}

/* ===== SISTEMA DE NOTIFICACIONES PUSH ===== */
.notificaciones-push-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #f24660;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(255, 0, 111, 0.4);
    transition: all 0.3s ease;
}

.notificaciones-push-icon:hover {
    background-color: #f24660a9;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 0, 81, 0.6);
}

.notificaciones-push-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #363636;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.notificaciones-push-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 9999;
    pointer-events: none;
}

.notificacion-push {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    margin-bottom: 15px;
    pointer-events: all;
    animation: slideInRight 0.4s ease-out;
    transition: all 0.3s ease;
    overflow: visible; /* Permitir que el dropdown se muestre fuera si es necesario */
    position: relative;
}

.notificacion-push:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(450px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notificacion-push-critico {
    border-left: 4px solid #dc3545;
    animation: slideInRight 0.4s ease-out, pulse-push-critico 2s ease-in-out infinite;
}

.notificacion-push-alto {
    border-left: 4px solid #fd7e14;
}

.notificacion-push-medio {
    border-left: 4px solid #ffc107;
}

.notificacion-push-bajo {
    border-left: 4px solid #bcbcbc;
}

@keyframes pulse-push-critico {
    0% {
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 53, 69, 0.6), 0 4px 16px rgba(0,0,0,0.2);
    }
    100% {
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }
}

.notificacion-push-header {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notificacion-push-header-critico {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.notificacion-push-header-alto {
    background-color: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.notificacion-push-header-medio {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.notificacion-push-header-bajo {
    background-color: rgba(172, 172, 172, 0.1);
    color: #505050;
}

.notificacion-push-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.notificacion-push-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notificacion-push-close:hover {
    opacity: 1;
}

.notificacion-push-body {
    padding: 15px;
}

.notificacion-push-mensaje {
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.notificacion-push-meta {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notificacion-push-footer {
    padding: 10px 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    position: relative;
    overflow: visible; /* Permitir que el dropdown se muestre fuera */
}

.notificacion-push-footer .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Menú de opciones de notificaciones (3 puntos) */
.notif-menu-container {
    position: relative;
    display: inline-block;
}

.notif-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    min-width: 180px;
    margin-bottom: 0.25rem;
    z-index: 10001;
}

.notif-menu.active {
    display: block;
}

.notif-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #212529;
    transition: background-color 0.15s ease-in-out;
}

.notif-menu-item:hover {
    background-color: #f8f9fa;
}

.notif-menu-item:first-child {
    border-radius: 0.25rem 0.25rem 0 0;
}

.notif-menu-item:last-child {
    border-radius: 0 0 0.25rem 0.25rem;
}

.notif-menu-item i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Responsive para notificaciones push */
@media (max-width: 768px) {
    .notificaciones-push-container {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 70px;
    }
    
    .notificaciones-push-icon {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* =============================================
   MODO OSCURO - Inversión de colores
   ============================================= */

/* Modo oscuro CON hue-rotate (mantiene tonos de color) */
html.dark-mode {
    filter: invert(1) hue-rotate(180deg);
}

html.dark-mode img,
html.dark-mode video,
html.dark-mode picture,
html.dark-mode svg,
html.dark-mode iframe,
html.dark-mode canvas,
html.dark-mode .no-invert {
    filter: invert(1) hue-rotate(180deg);
}

/* Modo oscuro SIN hue-rotate (inversión pura de colores) */
html.dark-mode-pure {
    filter: invert(1);
}

html.dark-mode-pure img,
html.dark-mode-pure video,
html.dark-mode-pure picture,
html.dark-mode-pure svg,
html.dark-mode-pure iframe,
html.dark-mode-pure canvas,
html.dark-mode-pure .no-invert {
    filter: invert(1);
}

/* =============================================
   ESTILOS PARA INCIDENCIAS MASIVAS
   ============================================= */

.bg-success-light {
    background-color: rgba(40, 167, 69, 0.15) !important;
    transition: background-color 0.3s;
}

.bg-danger-light {
    background-color: rgba(220, 53, 69, 0.15) !important;
    transition: background-color 0.3s;
}

#listaPiezasPedido .form-check {
    transition: all 0.2s;
}

#listaPiezasPedido .form-check:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

#confirmacionSeguridadWrapper {
    border-left: 4px solid #dc3545;
}

#inputConfirmacionSeguridad {
    border: 2px solid #dc3545;
    font-weight: bold;
    text-align: center;
    flex-shrink: 0;
}

#confirmacionSeguridadWrapper .gap-2 {
    gap: 0.5rem !important;
}

/* =============================================
   PANEL GLOBAL DE NOTICIAS
   ============================================= */

body.noticias-global-abiertas {
    overflow: hidden;
}

.noticias-global-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: rgba(20, 24, 31, 0.68);
    animation: noticias-global-fondo-entrada 0.18s ease-out;
}

.noticias-global-panel {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: min(780px, calc(100vh - 48px));
    overflow: hidden;
    color: #212529;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    animation: noticias-global-panel-entrada 0.2s ease-out;
}

.noticias-global-cabecera {
    flex: 0 0 auto;
    padding: 22px 24px 17px;
    border-bottom: 1px solid #e9ecef;
}

.noticias-global-cabecera h2 {
    margin: 0 0 4px;
    color: #212529;
    font-size: 1.35rem;
    font-weight: 700;
}

.noticias-global-cabecera p {
    margin: 0;
    color: #6c757d;
    font-size: 0.92rem;
}

.noticias-global-listado {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.noticias-global-listado:focus-visible {
    outline: 2px solid #f24660;
    outline-offset: -4px;
}

.noticias-global-tarjeta {
    padding: 18px;
    margin-bottom: 14px;
    background-color: #f8f9fa;
    border: 1px solid #e3e6e9;
    border-left: 4px solid #f24660;
    border-radius: 8px;
}

.noticias-global-tarjeta:last-child {
    margin-bottom: 0;
}

.noticias-global-tarjeta-cabecera {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e5e8;
}

.noticias-global-tarjeta-cabecera h3 {
    margin: 0;
    color: #212529;
    font-size: 1.05rem;
    font-weight: 700;
}

.noticias-global-tarjeta-cabecera time {
    flex: 0 0 auto;
    color: #6c757d;
    font-size: 0.76rem;
    white-space: nowrap;
}

.noticias-global-contenido {
    color: #343a40;
    font-size: 0.96rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.noticias-global-contenido p,
.noticias-global-contenido div {
    margin: 0 0 0.65em;
}

.noticias-global-contenido p:last-child,
.noticias-global-contenido div:last-child {
    margin-bottom: 0;
}

.noticia-texto-pequeno {
    font-size: 0.82em;
}

.noticia-texto-normal {
    font-size: 1em;
}

.noticia-texto-grande {
    font-size: 1.28em;
    line-height: 1.35;
}

.noticia-color-neutro {
    color: #343a40;
}

.noticia-color-rojo {
    color: #c62828;
}

.noticia-color-azul {
    color: #1565c0;
}

.noticia-color-verde {
    color: #2e7d32;
}

.noticia-color-naranja {
    color: #b45309;
}

.noticias-global-pie {
    flex: 0 0 auto;
    padding: 15px 24px;
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
}

.noticias-global-mensaje {
    min-height: 0;
    margin: 0 0 8px;
    color: #495057;
    font-size: 0.85rem;
    text-align: right;
}

.noticias-global-mensaje:empty {
    display: none;
}

.noticias-global-mensaje-error {
    color: #b42318;
}

.noticias-global-acciones {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.noticias-global-boton {
    min-height: 42px;
    padding: 9px 18px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 7px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.noticias-global-boton:focus-visible {
    outline: 3px solid rgba(242, 70, 96, 0.3);
    outline-offset: 2px;
}

.noticias-global-boton:disabled {
    cursor: wait;
    opacity: 0.65;
}

.noticias-global-boton-principal {
    color: #ffffff;
    background-color: #f24660;
    border-color: #f24660;
}

.noticias-global-boton-principal:hover:not(:disabled) {
    background-color: #d93851;
    border-color: #d93851;
}

.noticias-global-boton-secundario {
    color: #343a40;
    background-color: #ffffff;
    border-color: #adb5bd;
}

.noticias-global-boton-secundario:hover:not(:disabled) {
    background-color: #f1f3f5;
}

@keyframes noticias-global-fondo-entrada {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes noticias-global-panel-entrada {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .noticias-global-overlay {
        align-items: stretch;
        padding: 0;
    }

    .noticias-global-panel {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .noticias-global-cabecera {
        padding: 18px 16px 14px;
    }

    .noticias-global-listado {
        padding: 14px 12px;
    }

    .noticias-global-tarjeta {
        padding: 15px;
    }

    .noticias-global-tarjeta-cabecera {
        display: block;
    }

    .noticias-global-tarjeta-cabecera time {
        display: block;
        margin-top: 5px;
    }

    .noticias-global-pie {
        padding: 12px;
    }

    .noticias-global-acciones {
        gap: 8px;
    }

    .noticias-global-boton {
        flex: 1 1 50%;
        min-height: 46px;
        padding-right: 10px;
        padding-left: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .noticias-global-overlay,
    .noticias-global-panel {
        animation: none;
    }
}

/* Gestión de noticias en Ajustes */
.noticias-admin {
    width: 100%;
    padding: 18px 4px;
}

.noticias-admin-editor,
.noticias-admin-historial {
    padding: 22px;
    margin-bottom: 22px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
}

.noticias-admin-encabezado {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.noticias-admin-encabezado h5 {
    margin: 0 0 4px;
    color: #212529;
    font-size: 1.1rem;
    font-weight: 700;
}

.noticias-admin-encabezado p {
    margin: 0;
    color: #6c757d;
    font-size: 0.88rem;
}

.noticias-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 7px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}

.noticias-admin-toolbar button {
    min-height: 32px;
    padding: 4px 9px;
    color: #343a40;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.noticias-admin-toolbar button:hover,
.noticias-admin-toolbar button:focus-visible {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.noticias-admin-toolbar button:focus-visible {
    outline: 2px solid rgba(242, 70, 96, 0.35);
    outline-offset: 1px;
}

.noticias-admin-toolbar-separador {
    width: 1px;
    min-height: 28px;
    margin: 2px 3px;
    background-color: #ced4da;
}

.noticias-admin-toolbar .noticias-admin-color {
    width: 28px;
    min-height: 28px;
    padding: 0;
    border: 4px solid #ffffff;
    border-radius: 50%;
    outline: 1px solid #adb5bd;
}

.noticias-admin-color-neutro {
    background-color: #343a40 !important;
}

.noticias-admin-color-rojo {
    background-color: #c62828 !important;
}

.noticias-admin-color-azul {
    background-color: #1565c0 !important;
}

.noticias-admin-color-verde {
    background-color: #2e7d32 !important;
}

.noticias-admin-color-naranja {
    background-color: #b45309 !important;
}

.noticias-admin-campo-editor {
    min-height: 180px;
    max-height: 420px;
    padding: 13px 14px;
    overflow-y: auto;
    color: #343a40;
    line-height: 1.55;
    overflow-wrap: anywhere;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0 0 6px 6px;
}

.noticias-admin-campo-editor:focus {
    border-color: #f24660;
    outline: 0;
    box-shadow: 0 0 0 0.18rem rgba(242, 70, 96, 0.18);
}

.noticias-admin-campo-editor:empty::before {
    color: #8a9299;
    pointer-events: none;
    content: attr(data-placeholder);
}

.noticias-admin-form-pie {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.noticias-admin-check {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    color: #343a40;
    cursor: pointer;
}

.noticias-admin-check input {
    width: 17px;
    height: 17px;
}

.noticias-admin-form-acciones,
.noticias-admin-item-acciones {
    display: flex;
    gap: 8px;
    align-items: center;
}

.noticias-admin-mensaje {
    min-height: 1.3em;
    margin: 10px 0 0;
    color: #2e7d32;
    font-size: 0.88rem;
    text-align: right;
}

.noticias-admin-error {
    color: #b42318 !important;
}

.noticias-admin-listado {
    display: grid;
    gap: 12px;
}

.noticias-admin-vacio {
    padding: 22px;
    margin: 0;
    color: #6c757d;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 7px;
}

.noticias-admin-item {
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.noticias-admin-item-inactivo {
    background-color: #f8f9fa;
    opacity: 0.78;
}

.noticias-admin-item-cabecera {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.noticias-admin-item-cabecera h6 {
    display: inline;
    margin: 0 8px 0 0;
    color: #212529;
    font-size: 1rem;
    font-weight: 700;
}

.noticias-admin-item-cabecera time {
    flex: 0 0 auto;
    color: #6c757d;
    font-size: 0.76rem;
}

.noticias-admin-estado {
    display: inline-block;
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: 1px;
    border-radius: 20px;
}

.noticias-admin-estado-activo {
    color: #216e39;
    background-color: #dafbe1;
}

.noticias-admin-estado-inactivo {
    color: #57606a;
    background-color: #eaeef2;
}

.noticias-admin-item-contenido {
    padding: 13px 0;
}

.noticias-admin-item-pie {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.noticias-admin-item-pie small {
    color: #6c757d;
    overflow-wrap: anywhere;
}

@media (max-width: 680px) {
    .noticias-admin {
        padding-top: 12px;
    }

    .noticias-admin-editor,
    .noticias-admin-historial {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .noticias-admin-encabezado,
    .noticias-admin-form-pie,
    .noticias-admin-item-pie {
        align-items: stretch;
        flex-direction: column;
    }

    .noticias-admin-toolbar-separador {
        display: none;
    }

    .noticias-admin-form-acciones,
    .noticias-admin-item-acciones {
        width: 100%;
    }

    .noticias-admin-form-acciones .btn,
    .noticias-admin-item-acciones .btn {
        flex: 1 1 auto;
    }

    .noticias-admin-item-cabecera {
        display: block;
    }

    .noticias-admin-item-cabecera time {
        display: block;
        margin-top: 6px;
    }

    .noticias-admin-mensaje {
        text-align: left;
    }
}

/* =============================================
   NOTICIAS V2 - INTERFAZ SAAS AISLADA
   ============================================= */

.noticias-global-overlay,
.noticias-global-overlay *,
#noticias .noticias-admin,
#noticias .noticias-admin * {
    box-sizing: border-box;
}

.noticias-global-overlay {
    padding: 28px;
    background-color: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.noticias-global-panel {
    width: min(680px, 100%);
    max-height: min(760px, calc(100dvh - 56px));
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.noticias-global-cabecera {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: center;
    padding: 14px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e8edf3;
}

.noticias-global-icono {
    display: grid;
    width: 30px;
    height: 30px;
    color: #d93851;
    font-size: 0.72rem;
    font-weight: 750;
    place-items: center;
    background-color: #fff0f3;
    border: 1px solid #ffd5dd;
    border-radius: 9px;
}

.noticias-global-titulos {
    min-width: 0;
}

.noticias-global-etiqueta {
    display: block;
    margin-bottom: 3px;
    color: #f24660;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.noticias-global-cabecera h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.noticias-global-cabecera p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
}

.noticias-global-cerrar-icono {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #64748b;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    border-radius: 9px;
    place-items: center;
}

.noticias-global-cerrar-icono:hover,
.noticias-global-cerrar-icono:focus-visible {
    color: #0f172a;
    background-color: #f1f5f9;
}

.noticias-global-cerrar-icono:focus-visible {
    outline: 2px solid rgba(242, 70, 96, 0.35);
    outline-offset: 2px;
}

.noticias-global-listado {
    padding: 14px;
    background-color: #f8fafc;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.noticias-global-listado::-webkit-scrollbar {
    width: 8px;
}

.noticias-global-listado::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border: 2px solid #ffffff;
    border-radius: 10px;
}

.noticias-global-tarjeta {
    padding: 0;
    margin: 0 0 9px;
    overflow: hidden;
    background-color: var(--noticia-fondo, #ffffff);
    border: 1px solid var(--noticia-acento-borde, #e2e8f0);
    border-radius: 12px;
    box-shadow:
        inset 4px 0 0 var(--noticia-acento, #94a3b8),
        0 1px 2px rgba(15, 23, 42, 0.035);
}

.noticias-global-tarjeta:last-child {
    margin-bottom: 0;
    border-bottom: 1px solid var(--noticia-acento-borde, #e2e8f0);
}

.noticias-global-tarjeta-cabecera {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px 9px;
    margin: 0;
    background-color: var(--noticia-acento-suave, #f1f5f9);
    border: 0;
    border-bottom: 1px solid var(--noticia-acento-borde, #cbd5e1);
    border-radius: 0;
}

.noticias-global-tarjeta-titulos {
    display: flex;
    min-width: 0;
    gap: 10px;
    align-items: baseline;
}

.noticias-global-orden {
    flex: 0 0 auto;
    color: var(--noticia-acento, #64748b);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.noticias-global-tarjeta-cabecera h3 {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 680;
    letter-spacing: -0.01em;
}

.noticias-global-tarjeta-cabecera time {
    padding-top: 2px;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 550;
}

.noticias-global-tarjeta-meta {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
    align-items: center;
    color: #94a3b8;
    font-size: 0.64rem;
    font-weight: 550;
    white-space: nowrap;
}

.noticias-global-tarjeta-meta time,
.noticias-global-tarjeta-meta span {
    display: inline-block;
    padding: 0;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}

.noticias-global-contenido {
    padding: 10px 13px 12px;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
}

.noticias-global-contenido-colapsado {
    position: relative;
    max-height: calc(9em + 22px);
    overflow: hidden;
}

.noticias-global-contenido-colapsado::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2.8em;
    pointer-events: none;
    content: "";
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        var(--noticia-fondo, #ffffff) 82%
    );
}

.noticias-global-leer-mas {
    padding: 0;
    margin: 0 13px 11px;
    color: var(--noticia-acento, #64748b);
    font-size: 0.72rem;
    font-weight: 680;
    cursor: pointer;
    background: transparent;
    border: 0;
}

.noticias-global-leer-mas:hover,
.noticias-global-leer-mas:focus-visible {
    color: var(--noticia-acento, #64748b);
    filter: brightness(0.78);
    text-decoration: underline;
}

.noticias-global-leer-mas:focus-visible {
    outline: 2px solid rgba(242, 70, 96, 0.25);
    outline-offset: 3px;
}

.noticias-global-leer-mas[hidden] {
    display: none;
}

.noticias-global-contenido .noticia-texto-pequeno,
.noticias-admin-campo-editor .noticia-texto-pequeno {
    font-size: 0.76em !important;
}

.noticias-global-contenido .noticia-texto-normal,
.noticias-admin-campo-editor .noticia-texto-normal {
    font-size: 1em !important;
}

.noticias-global-contenido .noticia-texto-grande,
.noticias-admin-campo-editor .noticia-texto-grande {
    font-size: 1.42em !important;
    line-height: 1.3;
}

.noticias-global-pie {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e8edf3;
}

.noticias-global-mensaje {
    max-width: 260px;
    min-height: 0;
    margin: 0;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.4;
    text-align: left;
}

.noticias-global-mensaje-error {
    color: #b42318;
}

.noticias-global-acciones {
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
}

.noticias-global-boton {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 0.84rem;
    font-weight: 650;
    border-radius: 10px;
}

.noticias-global-boton-principal {
    color: #ffffff;
    background-color: #f24660;
    border-color: #f24660;
}

.noticias-global-boton-principal:hover:not(:disabled) {
    background-color: #dc3851;
    border-color: #dc3851;
}

.noticias-global-boton-secundario {
    color: #475569;
    background-color: transparent;
    border-color: #cbd5e1;
}

.noticias-global-boton-secundario:hover:not(:disabled) {
    color: #0f172a;
    background-color: #ffffff;
    border-color: #94a3b8;
}

/* Página de administración */
#noticias {
    min-height: 70vh;
    background-color: #f6f8fb;
}

#noticias .noticias-admin {
    width: 100%;
    padding: 28px;
    color: #1e293b;
    font-family: inherit;
}

#noticias .noticias-admin-portada {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    padding: 4px 2px 24px;
}

#noticias .noticias-admin-kicker,
#noticias .noticias-admin-seccion-kicker {
    display: block;
    margin-bottom: 5px;
    color: #f24660;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

#noticias .noticias-admin-portada h4 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 740;
    letter-spacing: -0.03em;
}

#noticias .noticias-admin-portada p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

#noticias .noticias-admin-total {
    flex: 0 0 auto;
    padding: 7px 11px;
    color: #475569;
    font-size: 0.73rem;
    font-weight: 650;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
}

#noticias .noticias-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    gap: 20px;
    align-items: start;
}

#noticias .noticias-admin-superficie {
    padding: 22px;
    margin: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

#noticias .noticias-admin-historial {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 150px);
}

#noticias .noticias-admin-encabezado {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0 17px;
    margin: 0 0 18px;
    border-bottom: 1px solid #edf1f5;
}

#noticias .noticias-admin-encabezado h5 {
    margin: 0 0 3px;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 710;
    letter-spacing: -0.015em;
}

#noticias .noticias-admin-encabezado p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
}

#noticias .noticias-admin-field {
    width: 100%;
    margin-bottom: 18px;
}

#noticias #noticias-admin-form {
    display: block;
    width: 100%;
}

#noticias .noticias-admin-field > label {
    display: block;
    margin: 0 0 7px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 650;
}

#noticias #noticia-admin-titulo {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 13px;
    color: #0f172a;
    font: inherit;
    font-size: 0.9rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: 0;
}

#noticias #noticia-admin-titulo::placeholder {
    color: #94a3b8;
}

#noticias #noticia-admin-titulo:focus {
    border-color: #f24660;
    box-shadow: 0 0 0 3px rgba(242, 70, 96, 0.12);
}

#noticias .noticias-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    padding: 8px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-bottom-color: #e2e8f0;
    border-radius: 10px 10px 0 0;
}

#noticias .noticias-admin-toolbar-grupo {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
}

#noticias .noticias-admin-format-btn,
#noticias .noticias-admin-limpiar-btn {
    display: grid;
    min-width: 31px;
    height: 29px;
    padding: 0 8px;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 650;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    border-radius: 5px;
    place-items: center;
}

#noticias .noticias-admin-format-btn:hover,
#noticias .noticias-admin-format-btn:focus-visible,
#noticias .noticias-admin-limpiar-btn:hover,
#noticias .noticias-admin-limpiar-btn:focus-visible {
    color: #0f172a;
    background-color: #f1f5f9;
    outline: 0;
}

#noticias .noticias-admin-limpiar-btn {
    margin-left: auto;
    border: 1px solid #e2e8f0;
}

#noticias .noticias-admin-paleta {
    align-items: center;
    padding: 4px 6px;
}

#noticias .noticias-admin-color-custom {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    align-self: center;
    height: 18px;
    margin: 0 0 0 3px;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

#noticias .noticias-admin-color-custom input,
#noticias .noticias-admin-card-color input {
    width: 24px;
    height: 24px;
    padding: 1px;
    cursor: pointer;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

#noticias .noticias-admin-color-custom span {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 650;
    line-height: 18px;
}

#noticias .noticias-admin-color-custom input {
    display: block;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
}

#noticias .noticias-admin-toolbar .noticias-admin-color {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    cursor: pointer;
    border: 3px solid #ffffff;
    border-radius: 50%;
    outline: 1px solid #cbd5e1;
}

#noticias .noticias-admin-toolbar .noticias-admin-color:hover,
#noticias .noticias-admin-toolbar .noticias-admin-color:focus-visible {
    transform: scale(1.12);
    outline: 2px solid #94a3b8;
}

#noticias .noticias-admin-campo-editor {
    width: 100%;
    min-height: 230px;
    max-height: 440px;
    padding: 16px;
    color: #334155;
    font-size: 0.94rem;
    line-height: 1.65;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    outline: 0;
}

#noticias .noticias-admin-campo-editor:focus {
    border-color: #f24660;
    box-shadow: 0 0 0 3px rgba(242, 70, 96, 0.12);
}

#noticias .noticias-admin-campo-editor:empty::before {
    color: #94a3b8;
}

#noticias .noticias-admin-form-pie {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

#noticias .noticias-admin-opciones {
    display: flex;
    gap: 22px;
    align-items: center;
}

#noticias .noticias-admin-card-color {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

#noticias .noticias-admin-card-color input {
    width: 38px;
    height: 28px;
}

#noticias .noticias-admin-card-color strong,
#noticias .noticias-admin-card-color small {
    display: block;
}

#noticias .noticias-admin-card-color strong {
    color: #334155;
    font-size: 0.78rem;
}

#noticias .noticias-admin-card-color small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 0.68rem;
}

#noticias .noticias-admin-switch {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

#noticias .noticias-admin-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

#noticias .noticias-admin-switch-control {
    position: relative;
    width: 38px;
    height: 22px;
    background-color: #cbd5e1;
    border-radius: 999px;
    transition: background-color 0.18s ease;
}

#noticias .noticias-admin-switch-control::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    content: "";
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.18s ease;
}

#noticias .noticias-admin-switch input:checked + .noticias-admin-switch-control {
    background-color: #f24660;
}

#noticias .noticias-admin-switch input:checked + .noticias-admin-switch-control::after {
    transform: translateX(16px);
}

#noticias .noticias-admin-switch input:focus-visible + .noticias-admin-switch-control {
    outline: 3px solid rgba(242, 70, 96, 0.18);
    outline-offset: 2px;
}

#noticias .noticias-admin-switch strong,
#noticias .noticias-admin-switch small {
    display: block;
}

#noticias .noticias-admin-switch strong {
    color: #334155;
    font-size: 0.78rem;
}

#noticias .noticias-admin-switch small {
    margin-top: 1px;
    color: #94a3b8;
    font-size: 0.68rem;
}

#noticias .noticias-admin-form-acciones {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

#noticias .noticias-admin-btn {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 650;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 9px;
}

#noticias .noticias-admin-btn:disabled {
    cursor: wait;
    opacity: 0.62;
}

#noticias .noticias-admin-btn-primario {
    color: #ffffff;
    background-color: #f24660;
    border-color: #f24660;
}

#noticias .noticias-admin-btn-primario:hover:not(:disabled) {
    background-color: #dc3851;
    border-color: #dc3851;
}

#noticias .noticias-admin-btn-secundario {
    color: #475569;
    background-color: #ffffff;
    border-color: #cbd5e1;
}

#noticias .noticias-admin-mensaje {
    min-height: 18px;
    margin: 10px 0 0;
    color: #25814d;
    font-size: 0.76rem;
    text-align: right;
}

#noticias .noticias-admin-recargar {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #64748b;
    cursor: pointer;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    place-items: center;
}

#noticias .noticias-admin-recargar:hover:not(:disabled) {
    color: #0f172a;
    background-color: #f1f5f9;
}

#noticias .noticias-admin-recargando i {
    animation: noticias-admin-girar 0.8s linear infinite;
}

@keyframes noticias-admin-girar {
    to { transform: rotate(360deg); }
}

#noticias .noticias-admin-listado {
    display: grid;
    min-height: 0;
    gap: 8px;
    padding-right: 3px;
    overflow-y: auto;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

#noticias .noticias-admin-vacio {
    padding: 28px 18px;
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    text-align: center;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
}

#noticias .noticias-admin-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--noticia-admin-acento, #94a3b8);
    border-radius: 11px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

#noticias .noticias-admin-item:hover {
    background-color: #fbfcfe;
    border-color: #cbd5e1;
}

#noticias .noticias-admin-item-inactivo {
    background-color: #f8fafc;
    opacity: 0.72;
}

#noticias .noticias-admin-item-info {
    min-width: 0;
}

#noticias .noticias-admin-item-cabecera {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
}

#noticias .noticias-admin-item-cabecera h6 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #1e293b;
    font-size: 0.84rem;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#noticias .noticias-admin-item-color {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    background-color: var(--noticia-admin-acento, #94a3b8);
    border-radius: 50%;
}

#noticias .noticias-admin-estado {
    flex: 0 0 auto;
    padding: 2px 6px;
    font-size: 0.58rem;
    font-weight: 700;
    border-radius: 999px;
}

#noticias .noticias-admin-estado-activo {
    color: #167044;
    background-color: #dcfce7;
}

#noticias .noticias-admin-estado-inactivo {
    color: #64748b;
    background-color: #e2e8f0;
}

#noticias .noticias-admin-item-extracto {
    margin: 4px 0 5px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#noticias .noticias-admin-item-meta {
    display: flex;
    min-width: 0;
    gap: 5px;
    align-items: center;
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.68rem;
    white-space: nowrap;
}

#noticias .noticias-admin-item-meta small {
    overflow: hidden;
    font-size: inherit;
    text-overflow: ellipsis;
}

#noticias .noticias-admin-item-acciones {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
}

#noticias .noticias-admin-item-btn {
    display: inline-flex;
    min-height: 32px;
    gap: 5px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 650;
    cursor: pointer;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
}

#noticias .noticias-admin-item-btn:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

#noticias .noticias-admin-item-btn-orden {
    width: 32px;
    padding-right: 0;
    padding-left: 0;
}

#noticias .noticias-admin-item-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

#noticias .noticias-admin-item-btn-peligro:hover {
    color: #b42318;
    background-color: #fff1f2;
    border-color: #fecdd3;
}

#noticias .noticias-admin-item-btn-exito:hover {
    color: #167044;
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

@media (max-width: 1080px) {
    #noticias .noticias-admin-grid {
        grid-template-columns: 1fr;
    }

    #noticias .noticias-admin-historial {
        position: static;
        max-height: none;
    }

    #noticias .noticias-admin-listado {
        max-height: 520px;
    }
}

@media (max-width: 600px) {
    .noticias-global-overlay {
        align-items: flex-end;
        padding: 8px;
    }

    .noticias-global-panel {
        width: 100%;
        min-height: 0;
        max-height: calc(100dvh - 16px);
        border-radius: 18px;
    }

    .noticias-global-cabecera {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        gap: 10px;
        padding: 13px 15px;
    }

    .noticias-global-cabecera h2 {
        font-size: 1rem;
    }

    .noticias-global-cabecera p {
        font-size: 0.76rem;
    }

    .noticias-global-listado {
        padding: 10px;
    }

    .noticias-global-tarjeta {
        padding: 0;
    }

    .noticias-global-tarjeta-cabecera {
        display: flex;
        gap: 5px;
        align-items: stretch;
        flex-direction: column;
        padding: 10px 11px 8px;
    }

    .noticias-global-tarjeta-meta {
        padding-left: 29px;
    }

    .noticias-global-contenido {
        padding: 9px 11px 11px;
    }

    .noticias-global-pie {
        display: block;
        padding: 12px 14px 14px;
    }

    .noticias-global-mensaje {
        max-width: none;
        margin-bottom: 9px;
    }

    .noticias-global-acciones {
        display: grid;
        grid-template-columns: 0.7fr 1.3fr;
    }

    .noticias-global-boton {
        width: 100%;
        min-height: 44px;
        padding-right: 8px;
        padding-left: 8px;
        font-size: 0.78rem;
    }

    #noticias .noticias-admin {
        padding: 18px 12px 24px;
    }

    #noticias .noticias-admin-portada {
        display: block;
        padding: 2px 2px 18px;
    }

    #noticias .noticias-admin-portada h4 {
        font-size: 1.3rem;
    }

    #noticias .noticias-admin-total {
        display: inline-block;
        margin-top: 12px;
    }

    #noticias .noticias-admin-superficie {
        padding: 16px;
        border-radius: 14px;
    }

    #noticias .noticias-admin-toolbar {
        gap: 5px;
    }

    #noticias .noticias-admin-limpiar-btn {
        margin-left: 0;
    }

    #noticias .noticias-admin-campo-editor {
        min-height: 200px;
    }

    #noticias .noticias-admin-form-pie {
        align-items: stretch;
        flex-direction: column;
    }

    #noticias .noticias-admin-opciones {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    #noticias .noticias-admin-form-acciones {
        width: 100%;
    }

    #noticias .noticias-admin-btn {
        flex: 1 1 auto;
    }

    #noticias .noticias-admin-item {
        grid-template-columns: 1fr;
    }

    #noticias .noticias-admin-item-acciones {
        justify-content: flex-end;
    }
}
