/* styles.css (continued) */

.search-bar input {
  width: 100%;
  padding: 10px 10px 10px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-small);
  background-color: var(--background-secondary);
  transition: all 0.2s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.top-bar-actions {
  display: flex;
  gap: 16px;
}

/* Content layout */
.content-wrapper {
  padding: 30px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

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

.section-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
}

/* No data messages */
.no-data-message {
  text-align: center;
  padding: 60px 0;
  background-color: white;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-light);
  margin-bottom: 30px;
}

.no-data-icon {
  font-size: 48px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.no-data-message h3 {
  margin-bottom: 10px;
}

.no-data-message p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Chat section styles */
.chat-container {
  background-color: white;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-light);
  height: calc(100vh - 240px);
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.message {
  max-width: 85%;
  margin-bottom: 20px;
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-message {
  margin-left: auto;
  background-color: var(--primary-color);
  color: white;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
}

.assistant-message {
  background-color: var(--background-secondary);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
}

.message-time {
  font-size: 12px;
  margin-top: 5px;
  opacity: 0.8;
}

.assistant-message .message-content h3 {
  margin-top: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.assistant-message .message-content ul, 
.assistant-message .message-content ol {
  margin: 12px 0 12px 24px;
}

.assistant-message .message-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.assistant-message .message-content th, 
.assistant-message .message-content td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.assistant-message .message-content th {
  background-color: var(--background-secondary);
}

.chart-container {
  margin: 16px 0;
  padding: 10px;
  background-color: white;
  border-radius: var(--radius-small);
  border: 1px solid var(--border-color);
}

.loading-message {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background-color: var(--background-secondary);
  border-radius: 18px;
}

.typing-indicator {
  display: flex;
  align-items: center;
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
  animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.chat-input-container {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.example-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.query-chip {
  background-color: var(--background-secondary);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.query-chip:hover {
  background-color: rgba(0, 113, 227, 0.1);
  color: var(--primary-color);
}

.chat-input {
  display: flex;
  align-items: center;
  background-color: var(--background-secondary);
  border-radius: 24px;
  padding: 6px 6px 6px 16px;
  transition: all 0.2s;
}

.chat-input:focus-within {
  background-color: white;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}

.chat-input input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  padding: 8px 0;
  font-size: 16px;
}

.chat-input button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-input button:hover {
  background-color: #0077ed;
  transform: scale(1.05);
}

/* Dataset section styles */
.dataset-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: white;
  border-radius: var(--radius-medium);
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-light);
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 113, 227, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 16px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.dataset-columns {
  background-color: white;
  border-radius: var(--radius-medium);
  padding: 24px;
  box-shadow: var(--shadow-light);
}

.dataset-columns h3 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.column-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.column-category {
  background-color: var(--background-secondary);
  border-radius: var(--radius-small);
  padding: 16px;
}

.category-name {
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.category-name i {
  margin-right: 8px;
  color: var(--primary-color);
}

.column-list {
  list-style: none;
}

.column-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

/* Insights section styles */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-card {
  background-color: white;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-light);
  padding: 20px;
  transition: all 0.2s;
}

.chart-card:hover {
  box-shadow: var(--shadow-hover);
}

.chart-card h3 {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.chart-placeholder {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-secondary);
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  font-size: 48px;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 100;
}

.modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: var(--radius-medium);
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal-btn:hover {
  color: var(--error-color);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* File upload styles */
.file-upload-container {
  margin-top: 20px;
}

.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-small);
  padding: 30px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(0, 113, 227, 0.05);
}

.file-upload-area i {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.file-upload-area p {
  margin-bottom: 10px;
}

.file-input-label {
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  margin: 10px 0;
}

.file-types {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
}

.file-name {
  margin-top: 12px;
  padding: 10px;
  background-color: var(--background-secondary);
  border-radius: var(--radius-small);
  text-align: center;
  display: none;
}

.file-name.active {
  display: block;
}

.upload-progress-container {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.upload-progress-label {
  margin-bottom: 10px;
  font-weight: 500;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--background-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  width: 0%;
  transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar {
    width: 200px;
  }
  
  .main-content {
    margin-left: 200px;
  }
  
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }
  
  .main-content {
    margin-left: 70px;
  }
  
  .logo span, .user-details, .nav-item span, .btn-logout span {
    display: none;
  }
  
  .logo {
    justify-content: center;
  }
  
  .logo i {
    margin-right: 0;
  }
  
  .user-info {
    justify-content: center;
  }
  
  .nav-item {
    justify-content: center;
  }
  
  .nav-item i {
    margin-right: 0;
  }
  
  .btn-logout {
    justify-content: center;
  }
  
  .btn-logout i {
    margin-right: 0;
  }
  
  .dataset-overview, .column-categories {
    grid-template-columns: 1fr;
  }
  
  .top-bar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .search-bar {
    width: 100%;
  }
  
  .top-bar-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 576px) {
  .sidebar {
    width: 0;
    transform: translateX(-100%);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .modal-content {
    width: 95%;
  }
}