:root {
    --primary-color: #040304;
    --accent-color: #22b3a4;
    --white: #ffffff;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--white);
    color: var(--primary-color);
    margin: 0;
    padding: 0;
}

.container-fluid {
    padding-left: 10px;
    padding-right: 10px;
    max-width: 100%;
}

.table-responsive {
    padding: 0;
    margin: 0;
}

#table-container {
    padding: 0;
    margin: 0;
}

h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.table thead.table-light {
    background-color: var(--primary-color) !important;
}

.table thead.table-light th {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    border-color: var(--primary-color) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(34, 179, 165, 0.4) !important;
    color: var(--primary-color);
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: var(--white) !important;
    color: var(--primary-color);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(34, 179, 164, 0.15) !important;
    color: var(--primary-color) !important;
}

.table > tbody > tr > td {
    color: var(--primary-color) !important;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem !important;
}

.table thead th {
    padding: 0.75rem 0.75rem !important;
}

.table {
    color: var(--primary-color) !important;
    margin-bottom: 0;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(34, 179, 164, 0.25);
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--accent-color);
}

.pagination .page-link:hover {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
}

a {
    color: var(--accent-color);
}

a:hover {
    color: var(--primary-color);
}

.editable-nota {
    transition: background-color 0.2s;
    max-width: 12em;
    min-width: 12em;
    width: 12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.editable-nota:focus {
    background-color: rgba(34, 179, 164, 0.1) !important;
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.editable-nota:hover:not(:focus) {
    background-color: white !important;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    position: absolute;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 12em;
    min-width: 12em;
    width: 12em;
}

.editable-host {
    transition: background-color 0.2s;
}

.editable-host:focus {
    background-color: rgba(34, 179, 164, 0.15) !important;
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.edit-host-btn {
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: 8px;
    cursor: pointer;
    color: var(--accent-color);
    font-size: 0.9em;
    border: none;
    background: none;
    padding: 2px 6px;
}

.edit-host-btn:hover {
    color: var(--primary-color);
}

tr:hover .edit-host-btn {
    opacity: 1;
}

.host-display {
    display: inline-block;
}

.host-edit-input {
    border: 2px solid var(--accent-color);
    padding: 4px 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1em;
    outline: none;
}

/* Estilos del tooltip de inventario */
.inventory-tooltip {
    position: absolute;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    font-size: 0.9em;
    line-height: 1.6;
}

.inventory-tooltip .tooltip-title {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.inventory-tooltip .tooltip-field {
    margin: 4px 0;
}

.inventory-tooltip .tooltip-label {
    font-weight: 600;
    color: var(--primary-color);
}

.inventory-tooltip .tooltip-value {
    color: #555;
    margin-left: 4px;
}

.inventory-loading {
    opacity: 0.5;
}

.inventory-cell {
    position: relative;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-cell:hover {
    background-color: rgba(34, 179, 164, 0.1) !important;
}

.inventory-link,
.inventory-data {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-link {
    color: var(--accent-color);
}

.inventory-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Estilos para encabezados ordenables */
.sortable-header {
    user-select: none;
    position: relative;
}

.sortable-header:hover {
    background-color: rgba(34, 179, 164, 0.2) !important;
}

.sort-icon {
    font-size: 0.8em;
    margin-left: 4px;
    color: var(--accent-color);
    font-weight: bold;
}

/* Fijar ancho de la columna de inventario en la tabla */
.table thead th:nth-child(8),
.table tbody td:nth-child(8) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

/* Asegurar que el contenido de la celda de inventario no cause cambios de tamaño */
.inventory-cell > * {
    display: inline-block;
    vertical-align: middle;
}

