:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --background-color: #f9fafb;
  --text-color: #111827;
  --light-bg: #ffffff;
  --border-color: #e5e7eb;
  --transition-duration: 0.3s;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  background: var(--background-color);
  color: var(--text-color);
}

/* Container for centered content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Tabs Styles */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-color);
  background: var(--light-bg);
  margin-bottom: 1rem;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.tab {
  padding: 1rem;
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: background var(--transition-duration), color var(--transition-duration);
}

.tab:hover {
  background: var(--primary-dark);
  color: var(--light-bg);
}

.tab.active {
  background: var(--primary-color);
  color: var(--light-bg);
  font-weight: bold;
}

/* Content Sections */
.content {
  padding: 2rem;
  display: none;
}
.content.active {
  display: block;
}

/* Card Section */
.section {
  background: var(--light-bg);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: box-shadow var(--transition-duration);
}
.section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
}

.token-input, textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: border-color var(--transition-duration), box-shadow var(--transition-duration);
}

.token-input:focus, textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(37, 99, 235, 0.3);
  outline: none;
}

/* Checkbox Label Styling */
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 10px 0;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

/* Buttons */
.btn {
  background: var(--primary-color);
  color: var(--light-bg);
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-duration);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Chat Window and Message Styles */
.chat-output {
  border: 1px solid #ddd;
  padding: 1rem;
  background: var(--light-bg);
  height: 200px;
  overflow-y: auto;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

/* Visualization Container */
.visualization-container {
  border: 1px solid #ddd;
  padding: 1rem;
  background: var(--light-bg);
  min-height: 400px;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.message {
  max-width: 75%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-out;
}

.message.user {
  background: #e0f7fa;
  align-self: flex-end;
}

.message.assistant {
  background: #f1f8e9;
  align-self: flex-start;
}

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

/* Spinner for loading indicators */
.spinner {
  border: 4px solid #f3f3f3; 
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

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

/* Dashboard endpoint styling */
.endpoint {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.endpoint code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Notification styling */
.success-notification {
  background-color: #d4edda;
  color: #155724;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  animation: fadeIn 0.3s ease-out;
}

.error-notification {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  animation: fadeIn 0.3s ease-out;
}

.info-notification {
  background-color: #d1ecf1;
  color: #0c5460;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #bee5eb;
  border-radius: 6px;
  animation: fadeIn 0.3s ease-out;
}

.warning-notification {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #ffeeba;
  border-radius: 6px;
  animation: fadeIn 0.3s ease-out;
}

/* Notification transition for auto-hide */
.success-notification, .error-notification, .info-notification, .warning-notification {
  transition: all 0.5s ease-out;
}

/* Tables checkbox styling */
.tables-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.checkbox-container {
  margin-bottom: 8px;
}

/* Make sure all checkboxes align properly */
.checkbox-label input[type="checkbox"].table-checkbox {
  margin-right: 8px;
  vertical-align: middle;
}

/* Loading spinner for table fetching */
.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }
  .tab {
    text-align: left;
    padding: 0.8rem;
  }
}