* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

/* Search Container */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 12px;
}

.tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.tab.active {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.unified-search {
    position: relative;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.search-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    padding: 0 20px;
    color: #666;
    font-size: 20px;
}

.main-search-input {
    flex: 1;
    padding: 18px 0;
    border: none;
    outline: none;
    font-size: 18px;
    background: transparent;
}

.main-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 18px 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.search-btn:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 15px 15px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.suggestion-category {
    padding: 12px 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background: #f8f9ff;
    border-left: 4px solid #007bff;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.suggestion-text {
    flex: 1;
}

.suggestion-text .main {
    font-weight: 500;
    color: #333;
}

.suggestion-text .sub {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 20px;
}

.search-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

.search-tag .remove {
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 50%;
    background: rgba(25, 118, 210, 0.2);
}

.search-tag .remove:hover {
    background: rgba(25, 118, 210, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.search-examples {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.search-examples h4 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}
.search-upload_file {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Upload File Section */
.upload_file h4 {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}
.load-controls h4, .download-controls h4 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;

}
.upload_file  {
    margin-bottom: 20px; /* Add space below the first block */

}
.upload-container{
    display: flex;
    align-items: flex-start;
    gap: 30px; /* space between the two divs */
}

.upload_file, .load-controls, .download-controls {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 10px;
}
.load-controls {
    flex-direction: column;
    gap: 10px;
}

.download-controls {
    flex-direction: column;
    gap: 10px;
}


.file-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-family: sans-serif;
}
.upload_file input {
    color: #007bff;
    display: none;
}
.example-queries {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fileInfo {
    margin-top: 10px;
    font-family: sans-serif;
    color: #333;
}
.removeBtn {
    margin-left: 10px;
    padding: 4px 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.removeBtn:hover {
    background-color: #d32f2f;
}
.example-query {
    background: white;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.example-query:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* Results section */
.results-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow-x: scroll;
}

.results-summary {
    text-align: center;
    margin-bottom: 25px;
}

.results-count {
    font-size: 2rem;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 10px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-table thead {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
}

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

.results-table th {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    font-size: 14px;
}

.results-table tbody tr:hover {
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.results-table tbody tr {
    transition: all 0.2s ease;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}


.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
        border-radius: 0 0 12px 12px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .example-queries {
        justify-content: center;
    }

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

    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }
}


/* Charts section analysis */
.charts-wrapper {
  margin-top: 40px;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.chart-placeholder {
  text-align: center;
  font-size: 1.2rem;
  padding: 30px;
  color: #777;
  border: 2px dashed #bbb;
  border-radius: 10px;
  background-color: #fdfdfd;
  margin-bottom: 30px;
}


.chart-container > div {
  flex: 1 1 30%;
  min-width: 300px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

canvas {
  max-width: 100%;
  height: auto;
}


/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  align-items: center;
}

.filter-controls select,
.filter-controls input {
  padding: 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.filter-controls button {
  padding: 8px 16px;
  font-size: 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

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

.reset-btn {
  background-color: #6c757d;
}

.reset-btn:hover {
  background-color: #5a6268;
}