
:root {
  --primary: #1A237E;
  --primary-hover: #151D6E;
  --secondary: #be1908;
  --secondary-hover: #C10F13;
  --success: #2c712d;
  --success-hover: #235B24;
  --text: #333;
  --bg: #fff;
  --gray-light: #f5f5f5;
  --gray-medium: #ccc;
  --gray-dark: #696969;
  --radius: 8px;
  --transition: 0.3s ease;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4 {
  color: var(--primary);
  font-weight: 600;
  margin-block-end: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Layout */
.main_container {
  display: flex;
  gap: 5rem;
  margin-top: 140px;
  padding: 2rem;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #fff;
  color: #333;
  min-height: 100vh;
}



/* Card */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}



/* Sidebar & Content */
.sidebar {
  flex: 1;
  min-width: 300px;
  max-width: 350px;
}
.references_sidebar {
  width: 100%;
  max-width: 450px;
}

/* Content results area */
.content_results {
  flex: 1;
  max-width: 1500px;
  margin-bottom: 40px;
}

/* Headings in content */
.content_results h2 {
  color: #1A237E; /* primary */
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.content_results p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #555;
}

/* Alerts */
.alert {
  background-color: #FFF3CD;
  color: #856404;
  border: 1px solid #FFEEBA;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.alert-green {
  background-color: #D4EDDA;
  color: #155724;
  border: 1px solid #C3E6CB;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

/* Query saver button */
.query_saver button {
  background-color: #1A237E;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.query_saver button:hover {
  background-color: #151D6E;
}

/* Analytics dropdown */
.analytics {
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 350px;
  font-size: 1rem;
}

/* Chart container and charts */
#chart-container {
  margin-bottom: 2rem;
}

.chart {
  margin-bottom: 2rem;
}

.chart h3 {
  color: #1A237E;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Content box filters */
.content_box {
  margin-bottom: 1rem;
}

#filters label {
  font-weight: 600;
  margin-right: 0.5rem;
}

#filters input[type="text"] {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 400px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main_container {
    flex-direction: column;
    padding: 1rem;
  }
  .content_results {
    max-width: 100%;
  }
  table.display {
    font-size: 0.85rem;
  }
}

/* Forms */
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}
input[type], select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  background-color: var(--bg);
  margin-bottom: 1rem;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.2);
}

input[type="submit"] {
  width: 100%;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  background-color: var(--primary);
  margin-bottom: 1rem;
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: var(--secondary);
  color: var(--bg);
}
.btn-secondary:hover {
  background: var(--secondary-hover);
}
.btn-success {
  background: var(--success);
  color: var(--bg);
}
.btn-success:hover {
  background: var(--success-hover);
}

/* Header & Footer */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  padding: 1rem 2rem 0rem 2rem;
  text-align: center;
}

header h1 {
    padding: 0.5rem;
}
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1700px;
  margin-inline: auto;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--gray-dark);
  font-weight: 500;
  padding-block: 0.5rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

footer {
  background: var(--primary);
  color: var(--bg);
  text-align: center;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  font-size: 0.875rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .main_container {
    flex-direction: column;
    padding: 1rem;
  }
  .sidebar, .content_results {
    width: 100%;
    max-width: none;
  }
  header nav {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7986cb;
    --primary-hover: #9fa8da;
    --text: #e0e0e0;
    --bg: #121212;
    --gray-light: #424242;
    --gray-medium: #616161;
    --gray-dark: #b0b0b0;
  }
  body {
    background-color: var(--bg);
    color: var(--text);
  }
  .card, input, select {
    background: #1e1e1e;
    color: var(--text);
  }
  input, select {
    border-color: var(--gray-light);
  }
}

.sidebar-dropdown {
  list-style-type: none;
  padding: 0;
  margin: 5px 0;
  position: relative;
  background-color: var(--bg);
  border: 1px solid var(--gray-medium);
  max-height: 350px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
  width: 100%;
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-medium) var(--gray-light);
}

.sidebar-dropdown input[type="checkbox"] {
  display: none; /* Hide default checkbox */
}

.sidebar-dropdown label {
  display: block;
  position: relative;
  padding: 0.2rem 0.75rem 0.2rem 2rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 4px;
  transition: var(--transition);
  text-align: left;
}

/* Custom checkbox */
.sidebar-dropdown input[type="checkbox"] + label::before {
  content: "☐";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-dark);
}

/* Checked state */
.sidebar-dropdown input[type="checkbox"]:checked + label::before {
  content: "☑";
  color: var(--primary);
}

/* Hover state */
.sidebar-dropdown label:hover {
  background-color: var(--gray-light);
}

/* Scrollbar */
.sidebar-dropdown::-webkit-scrollbar {
  width: 8px;
}
.sidebar-dropdown::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 4px;
}
.sidebar-dropdown::-webkit-scrollbar-thumb {
  background-color: var(--gray-medium);
  border-radius: 4px;
}
.sidebar-dropdown::-webkit-scrollbar-thumb:hover {
  background-color: var(--gray-dark);
}

/* Ensure labels and checkboxes stay on one line */
.doc_types_select label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

/* Fix checkbox appearance */
.doc_types_select input[type="checkbox"] {
  margin: 0;
  position: static;
  width: auto;
  height: auto;
  opacity: 1;
  vertical-align: middle;
}

/* Prevent unwanted arrow/toggle button from other components */
.doc_types_select label::after {
  content: none !important;
}

.doc_types_select + label::after {
  content: "▸";
  font-size: 0.75rem;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.doc_types_select:checked + label::after {
  transform: rotate(90deg);
}

.doc_types_select-children {
  display: none;
  margin-left: 1.5rem;
  border-left: 2px dashed var(--gray-medium);
  padding-left: 1rem;
}

.doc_types_select:checked ~ .source-database-children {
  display: block;
}

/* Optional visual feedback on nested expansion */
.source-database-children label {
  padding: 0.35rem 0;
  font-size: 0.95rem;
}

/* Toggle logic */
.nested {
  display: none;
}
.nested.show {
  display: block;
}
.toggle-button {
  cursor: pointer;
  margin-left: 5px;
}
ul {
    list-style-type: none; /* Remove bullet points */
    padding-left: 0; /* Remove default indentation */
    margin: 0; /* Remove margin to prevent overflow */
}


.tier1 {
    background-color: #f0f8ff; /* Light blue background for tier-1 */
    font-weight: bold; /* Bold text for better visibility */
    padding: 5px 10px; /* Reduced space around text */
    border-bottom: 1px solid #007bff; /* Bottom border */
    font-size: 14px; /* Adjust font size */
    line-height: 1.4; /* Improve readability */
}

.tier1 input[type="checkbox"] {
    margin-right: 10px; /* Space between checkbox and label */
    vertical-align: middle; /* Align checkbox vertically */
}

.tier2 {
    margin-left: 12px; /* Reduce indentation for narrower space */
    font-size: 13px; /* Slightly smaller font size for tier-2 and tier-3 */
}

.tier3 {
    margin-left: 20px; /* Reduce indentation for narrower space */
    font-size: 12px; /* Slightly smaller font size for tier-2 and tier-3 */
}
.result-card {
  background-color: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
  color: var(--text);
}

.result-card * {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.result-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.result-card p {
  margin: 0.5rem 0;
  font-size: 1rem;
  line-height: 1.5;
}

.result-card p strong {
  color: var(--primary);
  font-weight: 600;
  margin-right: 0.3rem;
}

.result-card p span {
  color: var(--text);
}

.result-card a {
  color: var(--primary);
  font-weight: 600;
  transition: color var(--transition), text-decoration var(--transition);
}

.result-card a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.result-card .title-translated {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--gray-dark);
  margin-left: 0.4rem;
  display: inline-block;
}

#results-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#noMoreDocsMessage {
  font-style: italic;
  color: var(--gray-dark);
  margin-top: 1rem;
  font-size: 1rem;
  text-align: center;
}
.form-group {
    padding: 0.5rem;
}

.spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 3px solid var(--gray-medium);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.6rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#loadMoreBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.container.hero-header {
  position: relative; /* container for absolute positioning */
}

.login-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
  user-select: none;
}

.login-button:hover,
.login-button:focus {
  background-color: var(--primary);
  color: var(--bg);
  outline: none;
}

.hero {
  background-color: var(--gray-light);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative; /* Add this explicitly if needed */
  z-index: 1;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-logo {
  max-height: 80px;
  width: auto;
  margin-bottom: 1rem;
  display: inline-block;
}

.hero .subtext {
  color: var(--gray-dark);
  margin-top: 1rem;
  font-size: 1.125rem;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.metrics {
  background-color: var(--bg);
  padding: 3rem 1rem;
}

.metrics-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  gap: 2rem;
}

.metric-card {
  background-color: var(--gray-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  flex: 1 1 240px;
  max-width: 300px;
  text-align: center;
  transition: box-shadow var(--transition);
}

.recent-publications {
  background-color: var(--gray-light);
  padding: 3rem 1rem 4rem;
  box-shadow: var(--shadow-md);
  margin-top: 3rem;
  border-radius: var(--radius);
}

.recent-publications h2 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.publication-list {
  list-style: none;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding-left: 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
}

.publication-list li {
  margin-bottom: 1rem;
}

.publication-list a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.publication-list a:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

.coming-soon {
  text-align: center;
  font-style: italic;
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.educational-snippet {
  background-color: var(--bg);
  padding: 3rem 1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.educational-snippet h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.educational-snippet p {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.6;
}

.cta-section {
  text-align: center;
  padding: 2rem 1rem;
}

.cta-button {
  background-color: var(--secondary);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: bold;
  transition: background-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  background-color: var(--secondary-hover);
}

.footer-link,
.disclaimer-link a {
  color: var(--bg);
  font-size: 0.875rem;
  text-decoration: underline;
}



.footer-link:hover,
.disclaimer-link a:hover {
  color: var(--secondary-hover);
}

.char-count {
  font-size: 0.85rem;
  color: var(--gray-dark);
  margin-top: 0.25rem;
}

.form-error {
  color: var(--secondary);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

#advanced-search {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 15px;
    z-index: 2;
    width: 90%; /* Responsive width */
    max-width: 600px; /* Maximum width */
    min-width: 280px; /* Minimum width */
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    grid-gap: 15px; /* Space between grid items */
    max-height: 80vh; /* Limit height to viewport height */
    overflow-y: auto; /* Scroll if necessary */
}


.center_box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 50vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    text-align: center;
}
.input-keywords {
  flex-grow: 10;
  min-width: 450px;
  padding: 10px 15px;
  font-size: 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  height: 42px;            /* Match button height */
  box-sizing: border-box;  /* Include padding in height */
  font-family: inherit;
}

.btn-primary,
.btn-secondary {
  height: 42px;            /* Match input height */
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0 18px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: var(--radius);
  border-width: 1.5px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition), border-color var(--transition);
  user-select: none;
}

.btn-primary {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--bg);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  outline: none;
}

.btn-secondary {
  border-color: var(--secondary);
  background-color: var(--secondary);
  color: var(--bg);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
  outline: none;
}
/* --- Checkbox styles --- */


.checkbox-group input[type="checkbox"] {
  display: none; /* Hide default checkbox */
}

.checkbox-group label {
  display: block;
  position: relative;
  padding: 0.2rem 0.75rem 0.2rem 2rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  border-radius: 4px;
  transition: var(--transition);
  text-align: left;
}

/* Custom checkbox */
.checkbox-group input[type="checkbox"] + label::before {
  content: "☐";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-dark);
}

/* Checked state */
.checkbox-group input[type="checkbox"]:checked + label::before {
  content: "☑";
  color: var(--primary);
}

/* Hover state */
.checkbox-group label:hover {
  background-color: var(--gray-light);
}
/* --- Tooltip icon styles --- */

/* Tooltip styling */
.tooltip-icon {
  margin-left: 6px;
  font-size: 14px;
  color: var(--bg);
  cursor: pointer;
  position: relative;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--bg);
  font-weight: bold;
}

.tooltip-icon:focus .tooltip-text,
.tooltip-icon:hover .tooltip-text {
  display: block;
  opacity: 1;
  visibility: visible;
}

.tooltip-text {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  white-space: normal;
  font-size: 12px;
  z-index: 10;
  width: 250px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  word-wrap: break-word;
  pointer-events: none; /* so only the icon handles hover */
}

/* Content styling */
.content {
  max-width: 1100px;
  margin-inline: auto;
  margin-bottom: 70px;
  margin-top: 140px;
}

.intro-text {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--gray-dark);
  line-height: 1.75;
}

b {
  color: var(--secondary);
}

/* Graph container spacing */
.graph-container {
  margin: 2rem 2rem 3rem;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  background-color: var(--bg);
  border-radius: var(--radius);
}

/* DataTables overrides */
table.dataTable {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 0.5rem !important;
  font-size: 0.95rem;
}

table.dataTable thead th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 12px 18px;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: left;
}

table.dataTable tbody tr {
  background-color: var(--gray-light);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  transition: background-color var(--transition);
}
table.dataTable tbody tr:hover {
  background-color: var(--primary-hover);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

table.dataTable tbody td {
  padding: 14px 18px;
}

/* Link styling inside table */
table.dataTable tbody td a {
  color: var(--secondary);
  font-weight: 600;
}
table.dataTable tbody td a:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

.dataTables_wrapper {
    margin-bottom: 60px;
    background-color: var(--bg);
}

/* Responsive */
@media (max-width: 900px) {
  body {
    padding: 1rem 1.5rem;
  }
  h1, h2, h3 {
    text-align: center;
  }
  .content {
    width: 100%;
  }
  table.dataTable {
    font-size: 0.85rem;
  }
}

.docdetail {
  background-color: var(--gray-light);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex: 1;
}

.doc-header {
  margin-bottom: 2rem;
}

.translated-title {
  font-size: 1.1rem;
  color: var(--gray-dark);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.doc-metadata h3,
.doc-body h3 {
  margin-bottom: 1rem;
}

.doc-table,
.ref-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg);
  border: 1px solid var(--gray-medium);
}

.doc-table td,
.ref-table td,
.ref-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-medium);
  text-align: left;
}

.doc-table td:first-child {
  font-weight: 500;
  color: var(--gray-dark);
  width: 40%;
}

.ref-table th {
  background-color: var(--gray-light);
  color: var(--primary);
}

.doc-content {
  background-color: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
  font-size: 0.95rem;
}

.references_sidebar {
  width: 35%;
  min-width: 280px;
}

.gfw-container {
  padding: 2rem;
  margin-top: 100px; /* Adjust for fixed header */
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

.gfw-results {
  max-width: 1200px;
  margin: 0 auto;
}

.gfw-results h1 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.intro-text,
.learn-more {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.learn-more a {
  font-weight: 500;
  color: var(--secondary);
}

.learn-more a:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

.explanation h3 {
  margin-top: 2rem;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.table_component {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.table_component table {
  width: 100%;
  border-collapse: collapse;
}

.table_component th,
.table_component td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-medium);
}

.table_component th {
  background-color: var(--primary);
  color: white;
  text-align: left;
}

.table_component td {
  background-color: var(--bg);
  color: var(--text);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.chart-card {
  background-color: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition), transform var(--transition);
}

.chart-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.chart-card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.chart-content {
  overflow-x: auto;
}

.chart-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.chart-form label {
  font-weight: 500;
  color: var(--text);
}

.chart-form select,
.chart-form button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  font-size: 1rem;
}

.chart-form button {
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition);
}

.chart-form button:hover {
  background-color: var(--primary-hover);
}

.query-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.query-card {
  border: 1px solid var(--gray-medium);
  border-radius: var(--radius);
  padding: 1.5rem;
  background-color: var(--gray-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.query-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.query-details p {
  margin-bottom: 0.5rem;
}

.query-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.query-actions button {
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

/* Button states (colors controlled dynamically by JS) */
.run-query {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}
.run-query:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.alert-toggle {
  /* Background set via JS (green or red) */
}

.delete-btn {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: white;
}
.delete-btn:hover {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
}


