html {
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 2em;
    padding-bottom: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Main content wrapper - grows to push footer down */
body > *:not(.app-footer):not(script) {
    flex-shrink: 0;
}

/* Spacer to push footer to bottom on short pages */
body::after {
    content: '';
    flex-grow: 1;
}
#filters { margin-bottom: 1em; }
#pagination button { margin: 0 2px; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
th, td {
    padding: 0.75em 1em;
    border: 1px solid #e0e0e0;
    font-size: 0.88em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* URL shortening in data cells */
td a[href] {
    max-width: 200px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

td a[href]:hover {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    max-width: none;
    position: relative;
    z-index: 10;
    background: white;
    border: 1px solid #ccc;
    padding: 0.5em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Font resizer controls */
.table-header-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5em 0;
    margin-bottom: 0.5em;
}

.font-resizer {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: #f8f9fa;
    padding: 0.5em 1em;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.font-resizer label {
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.font-resizer button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.font-resizer button:hover {
    background: #0056b3;
}

.font-resizer button:active {
    background: #004085;
}

.font-resizer button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.font-resizer input[type="number"] {
    width: 60px;
    height: 32px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    padding: 0.25em;
}

.font-resizer input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Column control */
.column-toggle-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 32px;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    margin-left: 0.5em;
}

.column-toggle-btn:hover {
    background: #0056b3;
}

.column-toggle-btn:active {
    background: #004085;
}

.column-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1em;
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5em;
}

/* Make font-resizer container relative for dropdown positioning */
.font-resizer {
    position: relative;
}

.column-dropdown h4 {
    margin: 0 0 0.5em 0;
    font-size: 1em;
    color: #495057;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5em;
}

.column-checkbox-group {
    margin-bottom: 0.5em;
}

.column-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.25em 0;
    cursor: pointer;
    font-size: 0.9em;
    color: #495057;
}

.column-checkbox-group label:hover {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0.25em 0.5em;
    margin: 0 -0.5em;
}

.column-checkbox-group input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.column-checkbox-group input[type="checkbox"]:checked + span {
    font-weight: 500;
    color: #007bff;
}
th {
    background: #f5f7fa;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
}
tbody tr:nth-child(even) {
    background: #f9fbfd;
}
tbody tr:nth-child(odd) {
    background: #fff;
}
tbody tr:hover {
    background: #e6f0fa;
    transition: background 0.2s;
}
td:last-child:not(.source-cell), th:last-child:not(.source-header) {
    text-align: right;
}
select {
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f7fa;
}
#pagination-controls, #pagination-controls-top {
    display: flex;
    align-items: center;
    gap: 1.5em;
    margin-top: 1em;
}

#pagination-controls-top {
    margin-bottom: 1em;
    margin-top: 0;
}



/* Database viewer style pagination controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #2196f3;
    color: white;
    border-color: #2196f3;
}

.pagination-page-input {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.pagination-page-input input {
    text-align: center;
}

.pagination-page-input button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-per-page select {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

/* Table controls in pagination */
.table-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.table-controls .table-header-controls {
    margin: 0;
    padding: 0;
}

.table-controls .font-resizer {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.sort-icon {
    cursor: pointer;
    margin-left: 0.3em;
    color: #888;
    font-size: 0.95em;
    user-select: none;
}
.sort-icon.active {
    color: #1976d2;
    font-weight: bold;
}
.sort-icon.asc::after {
    content: '▲';
    margin-left: 0.1em;
}
.sort-icon.desc::after {
    content: '▼';
    margin-left: 0.1em;
}
.sort-order-indicator {
    margin-left: 0.3em;
    color: #1976d2;
    font-weight: bold;
    font-size: 0.98em;
}
#tree-container ul {
    list-style: none;
    margin-left: 1.2em;
    padding-left: 0.5em;
    border-left: 1px solid #e0e0e0;
}
#tree-container li {
    margin: 0.2em 0;
    font-size: 0.96em;
}
.tree-toggle {
    font-weight: bold;
    margin-right: 0.2em;
    color: #1976d2;
}

.tree-label {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.tree-label:hover {
    background-color: #f0f0f0;
}

.entity-prefix {
    color: #9ca3af;
    font-weight: 500;
}

.entity-count {
    color: #6b7280;
    font-size: 0.9em;
    font-style: italic;
}

/* Dynamic tree loading styles */
.tree-root {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tree-children {
    margin-left: 20px;
}

.loading-indicator {
    color: #666;
    font-style: italic;
    padding: 5px 10px;
    margin: 2px 0;
}

.tree-node {
    margin: 2px 0;
}
.main-header {
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.7em 2rem;
    margin: -2rem -2rem 1.2em -2rem;
    width: calc(100% + 4rem);
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-right: 2em;
}

.glisse-logo {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    line-height: 1.2;
    margin: 0;
    color: #2c3e50;
    white-space: pre;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0;
}
.main-header nav {
    display: flex;
    gap: 1.2em;
    align-items: center;
}
.main-header a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.08em;
    transition: color 0.15s;
}
.main-header a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.database-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.database-selector label {
    color: #495057;
    font-weight: 500;
}

.database-selector select {
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.database-selector select:hover {
    border-color: #adb5bd;
}

.database-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.db-info-icon {
    margin-left: 8px;
    color: white;
    background-color: #007bff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    line-height: 1;
}

.db-info-icon:hover {
    background-color: #0056b3;
}

.db-info-modal {
    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: 10000;
}

.db-info-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.db-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.db-info-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.db-info-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.db-info-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.db-info-section {
    margin-bottom: 16px;
}

.db-info-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    display: block;
}

.db-info-value {
    color: #212529;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    word-break: break-all;
    margin-bottom: 8px;
}

.db-info-engine {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #e3f2fd;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

/* Database table styles */
.db-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
}

.db-table-container {
    overflow-x: auto;
    max-width: 100%;
}

.db-table th,
.db-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.db-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.db-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.db-table tbody tr:hover {
    background: #e9ecef;
}

.shortened {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fk-header .fk-icon {
    margin-left: 4px;
    color: #007bff;
    font-size: 12px;
    cursor: help;
}

.fk-cell {
    cursor: pointer;
    color: #007bff;
}

.fk-cell:hover {
    background-color: #f8f9fa;
    text-decoration: underline;
}

/* Ensure no icons are added to foreign key data cells */
.fk-cell::before,
.fk-cell::after {
    content: none !important;
}

/* Make foreign key cells clearly distinguishable */
.fk-cell {
    position: relative;
}

.fk-cell::before,
.fk-cell::after {
    content: none !important;
    display: none !important;
}

.url-icon {
    margin-left: 4px;
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.url-icon:hover {
    color: #0056b3;
    transform: scale(1.1);
}

/* Ensure all database table columns use the same font */
.db-table th,
.db-table td {
    font-family: inherit !important;
}

/* Ensure datetime columns use the same font as other columns */
.datetime-cell {
    font-family: inherit;
}
#tree-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5em;
}
#tree-container {
    flex: 1 1 60%;
    min-width: 320px;
}
#trip-details, #product-details {
    flex: 1 1 35%;
    min-width: 260px;
    background: #f9fbfd;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1.2em 1.5em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
#trip-details table, #product-details table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5em;
}
#trip-details th, #trip-details td, #product-details th, #product-details td {
    text-align: left;
    padding: 0.3em 0.6em;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.97em;
}
#trip-details th, #product-details th {
    background: #f5f7fa;
    font-weight: 600;
    width: 40%;
}
.selected-trip {
    background: #e3f2fd;
    border-radius: 4px;
    border: 1px solid #90caf9;
}
#filter-builder {
    margin-bottom: 1.2em;
    padding: 0.7em 1em;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
}
.filter-chain {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
}
.filter-item {
    display: flex;
    align-items: center;
    gap: 0.3em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3em 0.7em;
}
.filter-item select, .filter-item input {
    margin-left: 0.2em;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid #ccc;
}
.filter-item button {
    margin-left: 0.3em;
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 1.1em;
    cursor: pointer;
}
.filter-item button.move {
    color: #1976d2;
    font-size: 1em;
    margin-left: 0.1em;
}
#add-filter-select {
    min-width: 140px;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    border: 1px solid #ccc;
}
#sort-builder {
    margin-bottom: 1.2em;
    padding: 0.7em 1em;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.7em;
}
.sort-chain {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
}
.sort-item {
    display: flex;
    align-items: center;
    gap: 0.3em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3em 0.7em;
}
.sort-item select {
    margin-left: 0.2em;
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid #ccc;
}
.sort-item button {
    margin-left: 0.3em;
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 1.1em;
    cursor: pointer;
}
.sort-item button.move {
    color: #1976d2;
    font-size: 1em;
    margin-left: 0.1em;
}
#add-sort-select {
    min-width: 140px;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    border: 1px solid #ccc;
}
.sort-dir-toggle {
    margin-left: 0.2em;
    cursor: pointer;
    color: #1976d2;
    font-weight: bold;
    font-size: 1.05em;
    background: none;
    border: none;
}
#filter-sort-row {
    display: flex;
    flex-direction: row;
    gap: 2.5em;
    margin-bottom: 1.2em;
}
#filter-block, #sort-block, #column-block {
    flex: 1 1 33%;
    min-width: 220px;
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1em 1.2em 1.2em 1.2em;
    box-sizing: border-box;
}
#column-builder {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}
.column-item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.3em 0.7em;
}
.column-item label {
    flex: 1 1 auto;
    font-size: 1em;
}
.column-item button.move {
    color: #1976d2;
    font-size: 1em;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 0.1em;
}
.block-header {
    font-size: 1.08em;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 0.7em;
    letter-spacing: 0.01em;
}
.filter-chain, .sort-chain {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    align-items: flex-start;
}
.add-btn {
    margin-top: 0.7em;
    font-size: 1.2em;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.08);
    transition: background 0.15s;
}
.add-btn:hover {
    background: #0d47a1;
}
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.add-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.13);
    padding: 1.2em 1.5em;
    min-width: 220px;
    list-style: none;
    margin: 0;
}
.add-list li {
    padding: 0.5em 0.2em;
    cursor: pointer;
    font-size: 1.08em;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.13s;
}
.add-list li:last-child { border-bottom: none; }
.add-list li:hover {
    background: #e3f2fd;
    color: #1976d2;
}

/* New inline filter dropdown styling */
.filter-dropdown {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 150px;
}

.filter-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-dropdown-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.filter-dropdown-list li:last-child {
    border-bottom: none;
}

.filter-dropdown-list li:hover {
    background: #f8f9fa;
    color: #007bff;
}

/* Sort dropdown styling */
.sort-dropdown {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 150px;
}

.sort-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sort-dropdown-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.sort-dropdown-list li:last-child {
    border-bottom: none;
}

.sort-dropdown-list li:hover {
    background: #f8f9fa;
    color: #007bff;
}

/* New filter table styling */
.filter-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.filter-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    color: #495057;
}

.filter-table td {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.filter-table tr:last-child td {
    border-bottom: none;
}

.filter-table tr:hover {
    background: #f8f9fa;
}

.filter-field-select,
.filter-operation-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-field-select:focus,
.filter-operation-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-value-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-value-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-value-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-value-placeholder,
.filter-value-info {
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.filter-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.remove-filter-btn,
.move-filter-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.remove-filter-btn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.move-filter-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.add-filter-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.add-filter-btn:hover {
    background: #218838;
}

/* Sort table styles */
.sort-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.sort-table th {
    background: #f5f7fa;
    padding: 0.5em;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.sort-table td {
    padding: 0.5em;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.sort-table tr:last-child td {
    border-bottom: none;
}

.sort-table tr:hover {
    background: #f8f9fa;
}

.sort-field-select,
.sort-direction-select {
    width: 100%;
    padding: 0.3em;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: white;
    font-size: 0.9em;
}

.sort-field-select:focus,
.sort-direction-select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.sort-actions {
    display: flex;
    gap: 0.3em;
    align-items: center;
}

.remove-sort-btn,
.move-sort-btn {
    padding: 0.2em 0.4em;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #f5f7fa;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
}

.remove-sort-btn:hover {
    background: #ff4444;
    color: white;
    border-color: #ff4444;
}

.move-sort-btn:hover {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.add-sort-btn {
    padding: 0.5em 1em;
    border: 1px solid #1976d2;
    border-radius: 4px;
    background: white;
    color: #1976d2;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.add-sort-btn:hover {
    background: #1976d2;
    color: white;
}
.custom-multiselect {
    position: relative;
    min-width: 7em;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.2em 0.5em;
    font-size: 1em;
}
.custom-multiselect .selected-values {
    min-height: 1.5em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2em;
}
.custom-multiselect .dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 10;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 2px;
    padding: 0.3em 0.2em;
}
.custom-multiselect .dropdown label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.2em 0.5em;
    cursor: pointer;
    font-size: 0.98em;
}
.custom-multiselect .dropdown label:hover {
    background: #e3f2fd;
}
.custom-multiselect .dropdown input[type="checkbox"] {
    margin-right: 0.3em;
}
.custom-multiselect .dropdown {
    box-sizing: border-box;
}
/* Simple, clear styling for available cells */
.heatmap-cell-available {
    background: #4caf50 !important;
    color: white !important;
    text-align: center !important;
    font-weight: bold !important;
}

.heatmap-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.heatmap-controls label {
    font-weight: 600;
    color: #333;
}

.heatmap-controls select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

.heatmap-controls select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}



/* Simple heatmap table styling */
.heatmap-table {
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    width: auto;
}

.heatmap-table th,
.heatmap-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

/* Entity columns - flexible width with no wrapping */
.heatmap-table th.entity-column,
.heatmap-table td.entity-column {
    background: #f8f9fa;
    text-align: left;
    padding: 8px 12px;
    white-space: nowrap;
    width: auto;
}

/* Source columns - small fixed width for checkmarks only */
.heatmap-table th.source-header,
.heatmap-table td.source-cell {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    text-align: center;
}

/* Source header with vertical text */
.heatmap-table th.source-header {
    background: #e3f2fd;
    height: 100px;
    position: relative;
    width: 30px;
    min-width: 30px;
    max-width: 30px;
}

.vertical-text {
    transform: rotate(-90deg);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Simple hover effects */
.heatmap-table tbody tr:hover {
    background: #f5f5f5;
}

/* Light green background for rows with full source coverage */
.heatmap-table tbody tr.heatmap-row-full-coverage {
    background: lightgreen !important;
}

/* Maintain hover effect for full coverage rows */
.heatmap-table tbody tr.heatmap-row-full-coverage:hover {
    background: #90ee90 !important;
}

/* Group header styles with soft blue color scheme */
.group-header-row {
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    border-bottom: 3px solid #1e40af;
}

.group-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    font-weight: bold;
    text-align: left !important;
    padding: 8px 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
    line-height: 24px;
}

.group-header:last-child {
    border-right: none;
}

.group-header:nth-child(1) {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.group-header:nth-child(2) {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

.group-header:nth-child(3) {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.group-header:nth-child(4) {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.group-header:nth-child(5) {
    background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
}

.group-header:nth-child(6) {
    background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 100%);
}

.group-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 11px;
    cursor: pointer;
    padding: 3px 6px;
    margin-right: 6px;
    border-radius: 4px;
    color: white;
    transition: all 0.3s ease;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.group-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.group-toggle-btn:active {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0.95);
}

/* Ensure group headers stay visible */
.group-header-row {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Make the main column header row sticky as well */
.group-header-row + tr {
    position: sticky;
    top: 40px; /* Height of the group header row */
    z-index: 9;
}

/* Ensure sticky column headers maintain their background */
.group-header-row + tr th[style*="position: sticky"] {
    background: #f7fafc !important;
    border-right: 2px solid #d1d5db !important;
}

/* Ensure sticky group headers maintain their background */
.group-header[style*="position: sticky"] {
    background: inherit !important;
}

/* Add some spacing between group header and main header */
.group-header-row + tr th {
    border-top: 2px solid #4a5568;
    background: #f7fafc;
}
 
/* Sticky primary columns */
.sticky-primary {
    position: sticky !important;
    z-index: 5;
    background: white !important;
    border-right: 2px solid #e5e7eb;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Table container setup for full viewport width with internal horizontal scroll */
.table-container {
    width: calc(100vw - 4em);
    margin-left: calc(-50vw + 50% + 2em);
    overflow-x: auto;
    margin-bottom: 1em;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Ensure the table itself can expand beyond viewport width */
#trips-table {
    min-width: 100%;
    width: auto;
    margin: 0;
}

/* Custom scrollbar styling for the table container */
.table-container::-webkit-scrollbar {
    height: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Filter section styling */
.filter-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.filter-group label {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.filter-section select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-section button {
    padding: 8px 16px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background: #007bff;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.filter-section button:hover {
    background: #0056b3;
}

.filter-section button#clear-filter {
    background: #6c757d;
    border-color: #6c757d;
}

.filter-section button#clear-filter:hover {
    background: #545b62;
}

/* Matching summary styling */
.matching-summary {
    margin: 15px 0;
    padding: 10px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    color: #1976d2;
    font-weight: 500;
}

.matching-summary p {
    margin: 0;
}

/* Loading and error states */
.loading, .error, .no-data {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

.error {
    color: #d32f2f;
}

.no-data {
    color: #666;
    font-style: italic;
}

/* Match display styling */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.match-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 5px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    border-left: 3px solid #dee2e6;
}

.match-source {
    font-weight: bold;
    color: #495057;
    min-width: 80px;
}

.match-confidence {
    color: #007bff;
    font-weight: bold;
    min-width: 50px;
}

.match-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.match-algorithm {
    color: #6c757d;
    font-size: 11px;
    font-style: italic;
}

.no-matches {
    color: #6c757d;
    font-style: italic;
}

.match-matched-value {
    color: #333;
    font-style: italic;
    margin-left: 6px;
    margin-right: 6px;
    opacity: 0.85;
}

/* Add some spacing for sticky columns */
#trips-table tbody td.sticky-primary {
    background: #f9fafb !important;
}

#trips-table tbody tr:nth-child(even) td.sticky-primary {
    background: #f3f4f6 !important;
}

/* Ensure sticky columns have proper borders */
#trips-table tbody td.sticky-primary {
    border-right: 2px solid #d1d5db;
}

/* Primary column styling with alternating light blue shades */
.primary-column {
    background: #e3f2fd !important;
}

.primary-column-alt {
    background: #bbdefb !important;
}

/* Override existing sticky column styling for primary columns */
#trips-table tbody td.primary-column {
    background: #e3f2fd !important;
}

#trips-table tbody td.primary-column-alt {
    background: #bbdefb !important;
}

#trips-table tbody tr:nth-child(even) td.primary-column {
    background: #e3f2fd !important;
}

#trips-table tbody tr:nth-child(even) td.primary-column-alt {
    background: #bbdefb !important;
}

/* Semantic classes to replace inline styles */
.text-right {
    text-align: right !important;
}

.width-5em {
    width: 5em !important;
}

.width-3em {
    width: 3em !important;
}

.margin-left-07em {
    margin-left: 0.7em !important;
}

.margin-0-4px {
    margin: 0 4px !important;
}

.display-none {
    display: none !important;
}

.display-block {
    display: block !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.width-100 {
    width: 100% !important;
}

/* Sticky positioning classes */
.sticky-group-header {
    position: sticky !important;
    z-index: 15 !important;
}

.sticky-column-header {
    position: sticky !important;
    z-index: 12 !important;
    border-right: 2px solid #d1d5db !important;
}

.sticky-data-cell {
    position: sticky !important;
    z-index: 5 !important;
}

/* Primary column header colors */
.primary-header-light {
    background: #e3f2fd !important;
}

.primary-header-dark {
    background: #bbdefb !important;
}

/* Matching2 specific styles */
.matching2-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.matching2-table th,
.matching2-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.matching2-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.matching2-table tbody tr:hover {
    background: #f8f9fa;
}

.matching2-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.matching2-table tbody tr:active {
    background: #e9ecef;
}

.match-row {
    transition: background-color 0.2s ease;
}

/* Override general table row styles for status-specific backgrounds */
.matching2-table tbody tr.match-row.status-confirmed,
.matching2-table tbody tr:nth-child(even).match-row.status-confirmed,
.matching2-table tbody tr:nth-child(odd).match-row.status-confirmed {
    border-left: 4px solid #28a745 !important;
    background-color: #d4edda !important;
}

.match-row.status-pending {
    border-left: 4px solid #ffc107;
}

.matching2-table tbody tr.match-row.status-rejected,
.matching2-table tbody tr:nth-child(even).match-row.status-rejected,
.matching2-table tbody tr:nth-child(odd).match-row.status-rejected {
    border-left: 4px solid #dc3545 !important;
    background-color: #f8d7da !important;
}

.match-row.status-manual_review {
    border-left: 4px solid #17a2b8;
}

/* Temporary feedback styles for status updates */
.match-row.status-update-success {
    animation: statusUpdateSuccess 2s ease-in-out;
}

.match-row.status-update-reject {
    animation: statusUpdateReject 2s ease-in-out;
}

@keyframes statusUpdateSuccess {
    0%, 100% { background-color: #d4edda; }
    50% { background-color: #c3e6cb; }
}

@keyframes statusUpdateReject {
    0%, 100% { background-color: #f8d7da; }
    50% { background-color: #f5c6cb; }
}

.entity-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
}

.entity-type-badge.product {
    background: #007bff;
}

.entity-type-badge.variant {
    background: #6f42c1;
}

.entity-type-badge.trip {
    background: #fd7e14;
}

.entity-type-badge.country {
    background: #28a745;
}

.entity-type-badge.region {
    background: #20c997;
}

.entity-type-badge.destination {
    background: #17a2b8;
}

.source-entity,
.target-entity {
    max-width: 300px;
}

.entity-name {
    font-weight: bold;
    font-size: 14px;
    color: #212529;
    margin-bottom: 4px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2px;
    position: relative;
    line-height: 1.2;
}

/* Compact table styling */
.matching2-table td {
    padding: 8px 6px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.matching2-table .entity-comparison {
    max-width: 300px; /* Wider column for two entities */
}

.matching2-table .source-entity,
.matching2-table .target-entity {
    margin-bottom: 8px; /* Space between source and target */
}

.matching2-table .source-entity:last-child,
.matching2-table .target-entity:last-child {
    margin-bottom: 0; /* No margin for last element */
}

.matching2-table .entity-name {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 13px;
}

.entity-name {
    font-weight: bold;
    font-size: 14px;
    color: #212529;
    margin-bottom: 4px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2px;
    position: relative;
}

.entity-id {
    font-weight: bold;
    color: #495057;
    margin-bottom: 2px;
    font-size: 11px;
}

.entity-table {
    color: #6c757d;
    font-size: 11px;
    margin-bottom: 4px;
}

.entity-details {
    color: #333;
    font-size: 11px;
    line-height: 1.3;
}

.confidence-bar {
    position: relative;
    width: 100px;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
    transition: width 0.3s ease;
}

.confidence-fill.exact-match {
    background: #28a745;
}

.confidence-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 0 2px rgba(255,255,255,0.8);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.confirmed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.manual_review {
    background: #d1ecf1;
    color: #0c5460;
}

.summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.stat-item strong {
    color: #007bff;
}

/* Row expansion styling */
.match-details-expansion {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
}

.match-details-expansion td {
    padding: 20px;
    border-top: none;
    border-bottom: 1px solid #dee2e6;
}

.expansion-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 100%;
}

.match-row.expanded {
    background: #e3f2fd;
    border-left: 4px solid #007bff;
}

.match-row.expanded td {
    border-bottom: none;
}

.expand-indicator {
    display: inline-block;
    margin-right: 8px;
    color: #007bff;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.match-row.expanded .expand-indicator {
    transform: rotate(90deg);
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 5px;
}

.detail-item {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    color: #495057;
    margin-right: 5px;
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.action-btn {
    background: none;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.approve-btn {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.approve-btn:hover {
    background: #218838;
    border-color: #218838;
}

.reject-btn {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.reject-btn:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Ensure action buttons column has consistent width */
.matching2-table th:last-child,
.matching2-table td:last-child {
    width: 100px;
    text-align: center;
}

/* Source tag styling */
.source-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: #6c757d;
    color: white;
    font-size: 7.5px;
    font-weight: bold;
    padding: 1.5px 4.5px;
    border-radius: 7.5px;
    text-transform: uppercase;
    letter-spacing: 0.375px;
}

/* Different colors for different sources */
.source-tag.source-chalet {
    background: #007bff;
}

.source-tag.source-sunweb {
    background: #28a745;
}

.source-tag.source-summittravel {
    background: #fd7e14;
}

/* Database schema constraint indicators */
.pk-indicator {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}

.fk-indicator {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}

.unique-indicator {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}

.idx-indicator {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}

.constraint-indicator {
    background: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 4px;
}
 
/* ============================================================================
   Footer Styles
   ============================================================================ */

.app-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 2rem;
    margin: 2rem -2rem 0 -2rem;
    font-size: 0.85rem;
    color: #6c757d;
    width: calc(100% + 4rem);
    box-sizing: border-box;
    text-align: left;
    flex-shrink: 0;
    order: 9999;
}

.footer-line {
    line-height: 1.5;
}

.footer-line-1 .app-name {
    font-weight: 600;
    color: #495057;
}

.footer-line-1 .app-version {
    color: #495057;
}

.footer-line-1 .version-date {
    color: #6c757d;
}

.footer-line-2 {
    color: #6c757d;
    font-size: 0.8rem;
}

/* ============================================================================
   Database Viewer Page Styles (db.html)
   ============================================================================ */

.db-container {
    display: flex;
    height: calc(100vh - 60px);
    margin: 0;
    padding: 0;
}

.sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.table-list {
    padding: 20px;
    flex: 1;
}

.table-list h2 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.table-order-controls {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table-order-controls label {
    display: block;
    margin: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.table-order-controls input[type="radio"] {
    margin-right: 8px;
}

.table-item {
    padding: 10px 12px;
    margin: 3px 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #495057;
}

.table-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(2px);
}

.table-item.active {
    background: #2196f3;
    color: white;
    border-color: #1976d2;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.table-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.table-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.table-stats {
    font-size: 14px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
}

.table-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.table-tab {
    padding: 12px 24px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #495057;
}

.table-tab:first-child {
    border-top-left-radius: 6px;
}

.table-tab:last-child {
    border-top-right-radius: 6px;
}

.table-tab:hover {
    background: #e9ecef;
}

.table-tab.active {
    background: white;
    color: #2196f3;
    border-color: #2196f3;
    border-bottom: 2px solid white;
    margin-bottom: -1px;
}

.db-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.db-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.db-table th {
    background: #f8f9fa;
    padding: 12px 8px 8px 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
    vertical-align: top;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.db-table th:hover {
    background: #e9ecef;
    transition: background-color 0.2s ease;
}

.db-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.db-table tr:hover {
    background: #f8f9fa;
}

.db-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.db-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.db-table tbody tr:nth-child(odd) {
    background: white;
}

.db-table tbody tr:hover {
    background: #e3f2fd !important;
}

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

.db-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.db-table th,
.db-table td {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.fk-header {
    color: #28a745;
}

.fk-icon {
    font-size: 12px;
    margin-left: 4px;
}

.url-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 300px;
}

.url-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.db-page .url-icon {
    margin-left: 8px;
    cursor: pointer;
    color: #6c757d;
    font-size: 14px;
    padding: 2px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.db-page .url-icon:hover {
    background: #e9ecef;
    color: #2196f3;
}

.datetime-cell {
    white-space: nowrap;
    font-family: monospace;
}

/* Column header styling */
.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.column-name {
    flex: 1;
    min-width: 0;
}

/* Sort button styling */
.sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    color: #6c757d;
    font-size: 12px;
    transition: all 0.2s ease;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    z-index: 5;
}

.sort-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: scale(1.05);
}

.sort-btn.active {
    background: #2196f3;
    color: white;
}

.sort-btn.active:hover {
    background: #1976d2;
}

.sort-btn:focus {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

.db-page .sort-icon {
    font-weight: bold;
    line-height: 1;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: left;
}

.modal-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 80px);
}

.record-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: inherit;
    text-align: left;
}

.record-detail-table th {
    background: #f8f9fa;
    padding: 8px 12px;
    text-align: left !important;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    width: 180px;
    vertical-align: top;
}

.record-detail-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
    word-break: break-word;
    max-width: 400px;
    text-align: left !important;
}

.record-detail-table tr:hover {
    background: #f8f9fa;
}

.record-detail-table tr:last-child td,
.record-detail-table tr:last-child th {
    border-bottom: none;
}

.record-value.null {
    color: #6c757d;
    font-style: italic;
}

.record-value.url {
    color: #2196f3;
    text-decoration: underline;
    cursor: pointer;
}

.record-value.url:hover {
    color: #1976d2;
}

.record-value.fk {
    color: #28a745;
    cursor: pointer;
}

.record-value.fk:hover {
    color: #1e7e34;
}

.no-table-selected {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
}

.no-table-selected h3 {
    margin-bottom: 10px;
    color: #495057;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schema-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.schema-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.schema-table tr:hover {
    background: #f8f9fa;
}

.column-type {
    font-family: monospace;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.column-constraints {
    font-size: 12px;
    color: #6c757d;
}

.db-page .pk-indicator {
    background: #2196f3;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.db-page .fk-indicator {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.db-page .unique-indicator {
    background: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.db-page .idx-indicator {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.db-page .constraint-indicator {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.constraint-ref {
    background: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 4px;
}

.constraint-legend {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.constraint-legend h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
}

.constraint-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.constraint-legend-ref {
    background: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-right: 8px;
    min-width: 20px;
    text-align: center;
}

.constraint-legend-type {
    font-weight: bold;
    margin-right: 8px;
    min-width: 80px;
}

.constraint-legend-name {
    font-family: monospace;
    margin-right: 8px;
    color: #495057;
}

.constraint-legend-description {
    color: #6c757d;
    font-style: italic;
}

.filter-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 500;
    color: #495057;
    min-width: 80px;
}

.filter-input {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.filter-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.25);
}

.filter-btn {
    padding: 6px 12px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.filter-btn:hover {
    background: #1976d2;
}

.filter-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.header-filter {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-filter input {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 12px;
    min-width: 60px;
}

.header-filter input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.25);
}

.header-filter .clear-filter {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header-filter .clear-filter:hover {
    opacity: 1;
}

.header-filter .clear-filter:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================================================
   Report Page Styles (report.html)
   ============================================================================ */

.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    margin-bottom: 30px;
}

.report-header h1 {
    color: #495057;
    margin-bottom: 10px;
}

.source-selector {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
}

.source-selector h3 {
    margin-bottom: 15px;
    color: #495057;
}

.source-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.source-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.source-control label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.source-control select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.generate-btn {
    padding: 10px 20px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.generate-btn:hover {
    background: #1976d2;
}

.generate-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.report-content {
    display: none;
}

.report-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
}

.venn-diagrams {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.venn-diagram-container {
    flex: 1;
    min-width: 300px;
}

.venn-diagram {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.venn-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    margin: 10px;
}

.venn-overlap {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-weight: bold;
    font-size: 11px;
    text-align: center;
}

.totals-row {
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
}

.total-cell {
    background-color: #e9ecef;
    font-weight: bold;
}

.report-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.stats-overview {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.total-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.source-breakdown {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.stats-table-container {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.stats-table th {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

.stats-table tr:hover {
    background: #f8f9fa;
}

.stats-table .source-name {
    font-weight: 600;
    color: #495057;
}

.stats-table .count-cell {
    text-align: center;
    font-weight: 600;
    color: #2196f3;
}

.report-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-page .summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #2196f3;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
}

.comparison-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.comparison-table {
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-page .table-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.report-page .table-header h3 {
    margin: 0;
    color: #495057;
}

.report-page .table-content {
    padding: 0;
}

.coverage-table {
    width: 100%;
    border-collapse: collapse;
}

.coverage-table th,
.coverage-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.coverage-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.coverage-table tr:hover {
    background: #f8f9fa;
}

.coverage-count {
    font-weight: bold;
    color: #2196f3;
}

.coverage-percentage {
    color: #6c757d;
    font-size: 12px;
}

.missing-data {
    color: #dc3545;
}

.present-data {
    color: #28a745;
}

@media (max-width: 768px) {
    .comparison-tables {
        grid-template-columns: 1fr;
    }

    .source-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-overview {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-table-container {
        overflow-x: auto;
        font-size: 12px;
    }

    .stats-table th,
    .stats-table td {
        padding: 8px 6px;
    }
}

/* ============================================================================
   Price Grid Page Styles (price-grid.html)
   ============================================================================ */

.price-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.price-grid-header {
    margin-bottom: 30px;
}

.price-grid-header h1 {
    color: #495057;
    margin-bottom: 10px;
}

.price-grid-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
}

.price-grid-controls h3 {
    margin-bottom: 15px;
    color: #495057;
}

.controls-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.control-group select,
.control-group input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.price-grid-content {
    display: none;
}

.price-grid-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-grid-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
}

.pivot-table-container {
    overflow: auto;
    max-width: 100%;
    max-height: 600px;
    border: 1px solid #dee2e6;
    -webkit-overflow-scrolling: touch;
}

.pivot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    position: relative;
}

.pivot-table th,
.pivot-table td {
    border: 1px solid #dee2e6;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.pivot-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pivot-table .row-header {
    background-color: #e9ecef;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 5;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    min-width: 200px;
    padding-left: 8px;
}

.row-header .hierarchy-item {
    display: block;
    margin-bottom: 2px;
}

.row-header .hierarchy-item:last-child {
    margin-bottom: 0;
}

.row-header .hierarchy-level-0 {
    padding-left: 0px;
}

.row-header .hierarchy-level-1 {
    padding-left: 8px;
}

.row-header .hierarchy-level-2 {
    padding-left: 16px;
}

.row-header .hierarchy-level-3 {
    padding-left: 24px;
}

.row-header .hierarchy-level-4 {
    padding-left: 32px;
}

.row-header .tree-hook {
    color: #6c757d;
    font-family: monospace;
    margin-right: 4px;
}

.row-header .tree-hook::before {
    content: "└─ ";
}

.row-header .hierarchy-level-0 .tree-hook::before {
    content: "";
}

.row-header .hierarchy-level-1 .tree-hook::before,
.row-header .hierarchy-level-2 .tree-hook::before,
.row-header .hierarchy-level-3 .tree-hook::before,
.row-header .hierarchy-level-4 .tree-hook::before {
    content: "└─ ";
}

.pivot-table .corner-cell {
    background-color: #dee2e6;
    font-weight: bold;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 15;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.pivot-table th,
.pivot-table .row-header,
.pivot-table .corner-cell {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.price-cell {
    text-align: right;
    font-family: monospace;
    position: relative;
    padding-right: 35px !important;
}

.price-cell .price-content {
    display: block;
    text-align: right;
}

.price-cell .source-label {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    color: white;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-label.chalet {
    background-color: #1976d2;
}

.source-label.chatelreservation {
    background-color: #c62828;
}

.source-label.summittravel {
    background-color: #7b1fa2;
}

.source-label.sunweb {
    background-color: #388e3c;
}

.price-cell.no-data {
    background-color: #f5f5f5;
    color: #999;
    font-style: italic;
    padding-right: 8px !important;
}

.stats-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
}

/* ============================================================================
   Unmatched Page Styles (unmatched.html)
   ============================================================================ */

.unmatched-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #495057;
    margin-bottom: 10px;
}

.page-header p {
    color: #6c757d;
    font-size: 16px;
}

.filters-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.unmatched-page .filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.unmatched-page .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.unmatched-page .filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.unmatched-page .filter-group select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.unmatched-page .filter-btn {
    padding: 10px 24px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    height: 38px;
}

.unmatched-page .filter-btn:hover {
    background: #1976d2;
}

.unmatched-page .filter-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.stats-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.unmatched-page .stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.unmatched-page .stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 5px;
}

.unmatched-page .stat-label {
    font-size: 14px;
    color: #6c757d;
}

.stat-percentage {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.results-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.results-header h3 {
    margin: 0;
    color: #495057;
}

.results-count {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.results-table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.results-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table tr:hover {
    background: #f8f9fa;
}

.unmatched-page .entity-name {
    font-weight: 600;
    color: #2196f3;
}

.source-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.source-badge.chalet {
    background-color: #4caf50;
}

.source-badge.chatelreservation {
    background-color: #c62828;
}

.source-badge.summittravel {
    background-color: #ff9800;
}

.source-badge.sunweb {
    background-color: #2196f3;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 10px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.unmatched-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.unmatched-page .pagination button {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.unmatched-page .pagination button:hover:not(:disabled) {
    background: #f8f9fa;
}

.unmatched-page .pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unmatched-page .pagination .page-info {
    color: #6c757d;
    font-size: 14px;
}

@media (max-width: 768px) {
    .unmatched-page .filter-row {
        flex-direction: column;
    }

    .unmatched-page .filter-group {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
