/* frontend/src/components/SimpleTable.module.css */ /* Estilos para el contenedor principal y controles */ .header { margin-bottom: 0.75rem; } .header h2 { margin-top: 5px; margin-bottom: 1rem; font-size: 1.25rem; } .controlsContainer { display: flex; gap: 20px; margin-bottom: 0.5rem; align-items: center; } .searchInput, .sectorSelect { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--color-border); font-size: 14px; background-color: var(--color-surface); color: var(--color-text-primary); } .paginationControls { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; } .tableContainer { overflow: auto; /* Cambiado a 'auto' para ambos scrolls */ border: 1px solid var(--color-border); border-radius: 8px; position: relative; /* Necesario para posicionar el botón de scroll */ } .tableContainer::-webkit-scrollbar { height: 8px; width: 8px; background-color: var(--scrollbar-bg); } .tableContainer::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 4px; } .table { border-collapse: collapse; font-family: system-ui, -apple-system, sans-serif; font-size: 0.875rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); min-width: 100%; } .th { color: var(--color-text-primary); font-weight: 600; padding: 0.75rem 1rem; border-bottom: 2px solid var(--color-border); text-align: left; user-select: none; white-space: nowrap; background-color: var(--color-background); overflow: hidden; text-overflow: ellipsis; position: sticky; top: 0; z-index: 2; } .headerContent { cursor: pointer; } .resizer { position: absolute; right: 0; top: 0; height: 100%; width: 5px; background: var(--scrollbar-thumb); cursor: col-resize; user-select: none; touch-action: none; opacity: 0.25; transition: opacity 0.2s ease-in-out; z-index: 3; /* Asegura que el resizer esté sobre el contenido de la cabecera */ } .th:hover .resizer { opacity: 1; } .isResizing { background: var(--color-text-muted); opacity: 1; } .sortIndicator { margin-left: 0.5rem; font-size: 1.2em; display: inline-block; transform: translateY(-1px); color: var(--color-primary); min-width: 20px; } .tooltip { z-index: 9999; } .tr { transition: background-color 0.2s ease; } .tr:hover { background-color: var(--color-surface-hover); } .td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border-subtle); color: var(--color-text-secondary); background-color: var(--color-surface); word-break: break-word; overflow: hidden; text-overflow: ellipsis; } /* Estilos de botones dentro de la tabla */ .hostnameButton { background: none; border: none; color: var(--color-primary); cursor: pointer; text-decoration: underline; padding: 0; font-size: inherit; font-family: inherit; transition: color 0.2s ease; } .hostnameButton:hover { color: var(--color-primary-hover); } .tableButton { padding: 0.375rem 0.75rem; border-radius: 4px; border: 1px solid var(--color-border); background-color: transparent; color: var(--color-text-primary); cursor: pointer; transition: all 0.2s ease; } .tableButton:hover { background-color: var(--color-surface-hover); border-color: var(--color-text-muted); } .tableButtonMas { padding: 0.375rem 0.75rem; border-radius: 4px; border: 1px solid var(--color-primary); background-color: var(--color-primary); color: var(--color-navbar-text-hover); cursor: pointer; transition: all 0.2s ease; } .tableButtonMas:hover { background-color: var(--color-primary-hover); border-color: var(--color-primary-hover); } .deleteUserButton { background: none; border: none; cursor: pointer; color: var(--color-danger); font-size: 1rem; padding: 0 5px; transition: opacity 0.3s ease, color 0.3s ease, background-color 0.3s ease; line-height: 1; } .deleteUserButton:hover:not(:disabled) { color: var(--color-danger-hover); } .deleteUserButton:disabled { opacity: 0.5; cursor: not-allowed; } /* Estilo para el botón de scroll-to-top */ .scrollToTop { position: absolute; top: 6px; right: 20px; /* Suficiente espacio para no quedar debajo de la scrollbar */ z-index: 30; /* Un valor alto para asegurar que esté por encima de la tabla y su cabecera (z-index: 2) */ width: 36px; height: 36px; background-color: var(--color-surface); color: var(--color-text-primary); border: 1px solid var(--color-border); border-radius: 8%; /* Contenido y transiciones */ display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, background-color 0.2s, color 0.2s; /* Animación de entrada/salida */ animation: pop-in 0.3s ease-out forwards; } .scrollToTop:hover { background-color: var(--color-primary); color: white; transform: scale(1.1); } /* ===== INICIO DE CAMBIOS PARA MODALES Y ANIMACIONES ===== */ /* Keyframes para la animación de entrada */ @keyframes pop-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } } /* Estilos genéricos para modales */ .modalOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); z-index: 999; display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease-out; /* Aplicamos animación */ } .modal { background-color: var(--color-surface); border-radius: 12px; padding: 2rem; box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.12); z-index: 1000; min-width: 400px; max-width: 90%; border: 1px solid var(--color-border); font-family: 'Segoe UI', sans-serif; animation: scaleIn 0.2s ease-out; /* Aplicamos animación */ } .modal h3 { margin: 0 0 1.5rem; color: var(--color-text-primary); } .modal label { display: block; margin-bottom: 0.5rem; font-weight: 500; } .modalInput { padding: 10px; border-radius: 6px; border: 1px solid var(--color-border); background-color: var(--color-background); /* Ligeramente diferente para contraste */ color: var(--color-text-primary); width: 100%; box-sizing: border-box; margin-top: 4px; /* Separado del label */ margin-bottom: 4px; /* Espacio antes del siguiente elemento */ transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Transición para el foco */ } .modalInput:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 25%, transparent); } .modalActions { display: flex; gap: 10px; margin-top: 1.5rem; justify-content: flex-end; /* Alinea los botones a la derecha por defecto */ } /* Estilos de botones para modales */ .btn { padding: 8px 20px; border-radius: 6px; border: none; cursor: pointer; transition: all 0.2s ease; font-weight: 500; font-size: 14px; } .btnPrimary { background-color: var(--color-primary); color: white; } .btnPrimary:hover { background-color: var(--color-primary-hover); } .btnPrimary:disabled { background-color: var(--color-surface-hover); color: var(--color-text-muted); cursor: not-allowed; } .btnSecondary { background-color: var(--color-text-muted); color: white; } .btnSecondary:hover { background-color: var(--color-text-secondary); } /* ===== ESTILOS PARA EL MODAL DE DETALLES ===== */ .modalLarge { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: var(--color-background); /* Un fondo ligeramente gris para el modal */ z-index: 1003; overflow-y: auto; display: flex; flex-direction: column; padding: 2rem; box-sizing: border-box; animation: fadeIn 0.3s ease-out; /* Animación ligeramente más lenta para pantalla completa */ } .modalLargeContent { max-width: 1400px; /* Ancho máximo del contenido */ width: 100%; margin: 0 auto; /* Centrar el contenido */ } .modalLargeHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.05rem; padding-bottom: 0.05rem; } .modalLargeHeader h2 { font-weight: 400; font-size: 1.5rem; color: var(--color-text-primary); } .closeButton { background: black; color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; z-index: 1004; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: transform 0.2s, background-color 0.2s; position: fixed; right: 30px; top: 30px; } .closeButton:hover { transform: scale(1.1); background-color: #333; } .modalBodyColumns { display: flex; gap: 2rem; } .mainColumn { flex: 3; display: flex; flex-direction: column; gap: 1.5rem; } .sidebarColumn { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; } .section { background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .sectionTitle { font-size: 1.25rem; margin: 0 0 1rem 0; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border-subtle); color: var(--color-text-primary); font-weight: 600; display: flex; align-items: center; gap: 0.5rem; } .detailsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; } .componentsGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; } .actionsGrid { display: grid; grid-template-columns: 1fr; gap: 1rem; } .detailItem, .detailItemFull { display: flex; flex-direction: column; gap: 0.25rem; padding: 10px; border-radius: 4px; background-color: var(--color-background); border: 1px solid var(--color-border-subtle); } .detailLabel { color: var(--color-text-muted); font-size: 0.8rem; font-weight: 700; } .detailValue { color: var(--color-text-secondary); font-size: 0.9rem; line-height: 1.4; word-break: break-word; } .componentItem { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; } .powerButton, .deleteButton { background: none; border: 1px solid var(--color-border); border-radius: 4px; padding: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; width: 100%; justify-content: center; } .powerButton { color: var(--color-text-secondary); } .powerButton:hover { border-color: var(--color-primary); background-color: color-mix(in srgb, var(--color-primary) 15%, transparent); color: var(--color-primary-hover); } .powerIcon { width: 20px; height: 20px; } .deleteButton { color: var(--color-danger); transition: all 0.2s ease; } .deleteButton:hover { border-color: var(--color-danger); background-color: var(--color-danger-background); color: var(--color-danger-hover); } .deleteButton:disabled { color: #6c757d; background-color: #e9ecef; border-color: #dee2e6; } .historyContainer { max-height: 400px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: 4px; } .historyTable { width: 100%; border-collapse: collapse; } .historyTh { background-color: var(--color-background); padding: 12px; text-align: left; font-size: 0.875rem; position: sticky; top: 0; } .historyTd { padding: 12px; font-size: 0.8125rem; color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border-subtle); } .historyTr:last-child .historyTd { border-bottom: none; } .historySectionFullWidth { margin-top: 2rem; } .statusIndicator { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; } .statusDot { width: 12px; height: 12px; border-radius: 50%; } .statusOnline { background-color: #28a745; box-shadow: 0 0 8px #28a74580; } .statusOffline { background-color: #dc3545; box-shadow: 0 0 8px #dc354580; } .inputError { border-color: #dc3545; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); } .errorMessage { color: #dc3545; font-size: 0.8rem; margin-top: 4px; } .userList { min-width: 240px; } .userItem { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; padding: 6px; background-color: var(--color-background); border-radius: 4px; position: relative; } .userInfo { color: var(--color-text-secondary); } .userActions { display: flex; gap: 4px; align-items: center; } .sectorContainer { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 0.5rem; } .sectorName { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sectorNameAssigned { color: var(--color-text-secondary); font-style: normal; } .sectorNameUnassigned { color: var(--color-text-muted); font-style: italic; } .modalOverlay--nested { z-index: 1005; } .modalOverlay--nested .modal { z-index: 1006; } .closeButton:disabled { cursor: not-allowed; opacity: 0.5; background-color: #6c757d; } .columnToggleContainer { position: relative; } .columnToggleDropdown { position: absolute; top: 100%; right: 0; background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; padding: 0.5rem; z-index: 10; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); min-width: 200px; } .columnToggleItem { display: flex; align-items: center; padding: 0.5rem; cursor: pointer; border-radius: 4px; } .columnToggleItem:hover { background-color: var(--color-surface-hover); } .columnToggleItem input { margin-right: 0.5rem; } .columnToggleItem label { white-space: nowrap; } /* --- ESTILOS PARA GESTIÓN DE COMPONENTES --- */ /* Estilos para la columna numérica (Nº de Equipos) */ .thNumeric, .tdNumeric { text-align: Center; /* Es buena práctica alinear números a la derecha */ padding-right: 2rem; /* Un poco más de espacio para que no se pegue a las acciones */ width: 1%; white-space: nowrap; } /* Estilos para la columna de acciones */ .thActions, .tdActions { text-align: center; /* Centramos el título 'Acciones' y los botones */ width: 1%; white-space: nowrap; } /* --- MODAL DE UNIFICAR --- */ .highlightBox { display: block; margin-bottom: 1rem; padding: 8px; border-radius: 4px; background-color: var(--color-border-subtle); color: var(--color-text-secondary); border: 1px solid var(--color-border); /* Un borde sutil para definirlo */ }