@media (max-width: 1200px) {
    .connection-panel {
        gap: 8px;
        padding: 16px;
    }
    
    .status-panel, .metrics-panel, .indices-panel, 
    .sample-data-panel, .quick-filter-panel, .search-panel {
        padding: 1rem;
    }
    
    .panel-header {
        padding: 1rem;
    }
    
    body .search-panel .search-content,
    .status-panel-content,
    .indices-table,
    .shards-table-container,
    .search-content,
    .sample-table-container,
    .quick-filter-content {
        padding: 1rem;
    }
}

@media (max-width: 992px) {
    .connection-panel {
        flex-wrap: wrap;
    }
    
    .input-group {
        flex: 1 1 100%;
    }
    
    .button-group {
        flex: 1 1 100%;
        justify-content: space-between;
    }
    
    .auth-group {
        flex: 1 1 100%;
    }
    
    .nav-links li {
        margin-right: 1rem;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    body .search-panel .search-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    body .search-panel {
        height: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cluster-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.75rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .nav-container {
        padding: 0 0.5rem;
    }
    
    .panel-header h2 {
        font-size: 1.1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .auth-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .indices-panel,
    .shards-data-panel,
    .sample-data-panel,
    .status-panel,
    .metrics-panel,
    .quick-filter-panel,
    .search-panel,
    .connection-panel {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .indices-table-container,
    .shards-table-container,
    .sample-table-container,
    .dataTables_wrapper {
        overflow-x: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .indices-table,
    .shards-table {
        width: 100%;
        min-width: auto;
        table-layout: auto;
    }
    
    .shard-cell {
        min-width: 60px;
        padding: 8px;
    }
    
    th, td {
        max-width: 100%;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .connection-panel {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .button-group {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .button-group button {
        flex: 1 1 calc(50% - 0.25rem);
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .cluster-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .input-group {
        flex-direction: column;
        width: 100%;
    }
    
    .input-group input:first-child {
        max-width: 100%;
        width: 100%;
    }
    
    .input-group i {
        left: 10px;
    }
    
    #esUrl {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .panel-header button {
        width: 100%;
    }

    .indices-table-container,
    .shards-table-container,
    .sample-table-container,
    .dataTables_wrapper {
        padding: 0;
        border-radius: 8px;
    }
    
    .shard-cell {
        min-width: 50px;
        padding: 6px;
        font-size: 12px;
    }
    
    .node-column {
        width: 100px;
    }
    
    .indices-table thead th,
    .shards-table thead th {
        padding: 8px;
        font-size: 12px;
    }
    
    .indices-table tbody td,
    .shards-table tbody td {
        padding: 8px;
        font-size: 12px;
    }
    
    .shard-badge {
        padding: 2px 4px;
        font-size: 10px;
        margin: 1px;
    }
}

@media (max-width: 480px) {
    .connection-panel {
        padding: 0.75rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .status-panel, .metrics-panel, .indices-panel, 
    .sample-data-panel, .quick-filter-panel, .search-panel {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .panel-header {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    body .search-panel .search-content,
    .status-panel-content,
    .indices-table,
    .shards-table-container,
    .search-content,
    .sample-table-container,
    .quick-filter-content {
        padding: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .auth-group, .button-group, .input-group {
        gap: 0.5rem;
    }
} 