.indices-table-container,
.shards-table-container,
.sample-table-container,
.dataTables_wrapper,
.table-responsive {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    display: block;
}

table {
    max-width: 100%;
}

.dataTables_wrapper {
    background: var(--card-background) !important;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    overflow: hidden !important;
    position: relative;
}

.dataTables_scrollBody {
    background: var(--card-background) !important;
    border: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    position: relative;
    z-index: 1;
}

.dataTables_scrollBody table {
    background: var(--card-background) !important;
    margin: 0 !important;
}

.dataTables_scrollHead,
.dataTables_scrollFoot {
    background: var(--card-background) !important;
    border: none !important;
}

.dataTables_scroll {
    background: var(--card-background) !important;
}

.indices-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    margin-top: 1rem !important;
    table-layout: fixed !important;
    background: var(--card-background) !important;
}

.indices-table thead th {
    background: var(--table-header-bg);
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem !important;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    text-align: center !important;
    vertical-align: middle !important;
}

.indices-table thead th:first-child {
    text-align: left !important;
}

.indices-table thead th:first-child,
.indices-table tbody td:first-child {
    min-width: 240px;
    max-width: 360px;
}

.indices-table tbody tr {
    background: var(--card-background) !important;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.indices-table tbody tr:hover {
    background: var(--table-row-hover) !important;
}

.indices-table tbody td {
    padding: 0.75rem 1rem !important;
    border: none !important;
    vertical-align: middle !important;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    text-align: center !important;
    background: inherit !important;
}

.indices-table tbody td:first-child {
    text-align: left !important;
}

.dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dataTables_filter input {
    background: var(--input-background);
    color: var(--input-text);
    border: 1px solid var(--input-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    width: 250px;
}

.dataTables_wrapper .dt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.dataTables_length {
    margin-bottom: 1.5rem;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dataTables_length select {
    background: var(--input-background);
    color: var(--input-text);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.dataTables_info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

.dataTables_paginate {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.2s ease;
    color: var(--text-primary) !important;
    background: var(--button-bg) !important;
    border: 1px solid var(--button-border) !important;
    font-weight: 500;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
}

.dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: var(--button-hover-bg) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.dataTables_paginate .paginate_button.disabled {
    background: var(--button-bg) !important;
    border-color: var(--button-border) !important;
    color: var(--text-secondary) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_length select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dataTables_paginate .paginate_button {
    color: var(--text-primary) !important;
    border: none !important;
}

.dataTables_paginate .paginate_button.current {
    color: white !important;
}

.dataTables_paginate .paginate_button.disabled {
    background: rgba(229, 231, 235, 0.2) !important;
    border-color: rgba(229, 231, 235, 0.4) !important;
    color: var(--text-secondary) !important;
}

.dataTables_length,
.dataTables_filter {
    margin: 0 !important;
    flex: 1;
}

.dataTables_filter {
    display: flex;
    justify-content: flex-end;
}

.dataTables_wrapper .dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.dataTables_wrapper .dt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.dataTables_paginate .paginate_button.previous,
.dataTables_paginate .paginate_button.next {
    padding: 6px 12px;
    border-radius: 6px;
}

.dataTables_paginate .paginate_button.disabled {
    color: var(--text-secondary) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

.tab-pane pre {
    border: 1px solid rgba(229, 231, 235, 0.6);
}

#sampleDataTable thead th {
    background: var(--table-header-bg);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

#sampleDataTable tbody td {
    background: var(--card-background);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

#sampleDataTable tbody tr:hover td {
    background: var(--table-row-hover);
}

.dataTables_scrollBody {
    background: var(--card-background);
}

.dataTables_scrollBody::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dataTables_scrollBody::-webkit-scrollbar-track {
    background: var(--card-background);
    border-radius: 4px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.dataTables_scrollBody::-webkit-scrollbar-corner {
    background: var(--card-background);
}

.dataTables_filter input {
    background: var(--input-background);
    color: var(--input-text);
    border: 1px solid var(--input-border);
}

.dataTables_info {
    color: var(--text-secondary);
}

.dataTables_wrapper {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    overflow: visible !important;
}

.dataTables_length select {
    background: var(--input-background);
    color: var(--input-text);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.2s ease;
    color: var(--text-primary) !important;
    background: var(--button-bg) !important;
    border: 1px solid var(--button-border) !important;
    font-weight: 500;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
}

.dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: var(--button-hover-bg) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.dataTables_paginate .paginate_button.disabled {
    background: var(--button-bg) !important;
    border-color: var(--button-border) !important;
    color: var(--text-secondary) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

#sampleDataTable {
    background: var(--card-background) !important;
    border-color: var(--border-panel) !important;
}

#sampleDataTable thead th {
    background: var(--table-header-bg) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-panel) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#sampleDataTable thead th .column-type {
    color: var(--text-muted) !important;
    font-size: 0.7rem;
    opacity: 0.8;
}

#sampleDataTable th,
#sampleDataTable td {
    background: var(--card-background) !important;
    color: var(--text-primary) !important;
    border-right: 1px solid var(--border-panel) !important;
}

#sampleDataTable tbody tr:hover td {
    background: var(--table-row-hover) !important;
}

.dataTables_scrollBody {
    background: var(--card-background) !important;
    border: 1px solid var(--border-panel) !important;
}

.sample-table-container {
    border: 1px solid var(--border-panel) !important;
    background: var(--card-background) !important;
    border-radius: 8px;
    overflow: hidden !important;
}

.dataTables_wrapper {
    background: var(--card-background) !important;
    border: none !important;
}

.dataTables_filter input {
    background: var(--input-background) !important;
    color: var(--input-text) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 6px !important;
}

.dataTables_info {
    color: var(--text-secondary) !important;
}

#sampleDataTable thead th {
    background: var(--table-header-bg) !important;
    border-bottom: 1px solid var(--border-panel) !important;
    border-right: 1px solid var(--border-panel) !important;
    padding: 12px 24px !important;
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

#sampleDataTable thead th span {
    display: block !important;
    color: var(--primary-color) !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    opacity: 0.8 !important;
    margin-top: 4px !important;
}

#sampleDataTable thead th div {
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

#sampleDataTable td {
    background: var(--card-background) !important;
    color: var(--text-primary) !important;
    border-right: 1px solid var(--border-panel) !important;
    padding: 12px 24px !important;
}

#sampleDataTable th:last-child,
#sampleDataTable td:last-child {
    border-right: none !important;
}

.dataTables_scrollBody {
    background: var(--card-background) !important;
    border: none !important;
}

#sampleDataTable tbody tr:hover td {
    background: var(--table-row-hover) !important;
}

.dataTables_filter label {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .column-header span {
    color: #ffffff !important;
}

[data-theme="dark"] .dataTables_wrapper thead th {
    color: #ffffff !important;
}

[data-theme="dark"] .field-type {
    background: #2d333b !important;
    color: #8b949e !important;
}
