.measurements-page {
    padding: 20px;
    max-width: 100%;
}

.measurements-page h2 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.table-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.table-controls {
    margin-bottom: 15px;
}

.search-box {
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-box:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.table-wrapper {
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
}

.measurements-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.measurements-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.measurements-table thead th {
    background: #343a40;
    color: white;
    padding: 12px 8px;
    text-align: left;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    border: 1px solid #454d55;
}

.measurements-table thead th:hover {
    background: #23272b;
}

.measurements-table .filter-row th {
    background: #454d55;
    padding: 6px 4px;
    cursor: default;
}

.measurements-table .filter-row th:hover {
    background: #454d55;
}

.column-filter {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #6c757d;
    border-radius: 3px;
    font-size: 12px;
    background: white;
    color: #333;
}

.column-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
}

.column-filter::placeholder {
    color: #999;
    font-size: 11px;
}

.measurements-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.measurements-table tbody tr:hover {
    background-color: #f5f5f5;
}

.measurements-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.measurements-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.substance-hover {
    cursor: help;
    color: #007bff;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.substance-tooltip {
    position: absolute;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    pointer-events: none;
    max-width: 300px;
}

.substance-tooltip img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .measurements-page {
        padding: 10px;
    }

    .measurements-table {
        font-size: 12px;
    }

    .measurements-table td,
    .measurements-table th {
        padding: 6px 4px;
    }

    .search-box {
        max-width: 100%;
    }
}
