:root {
  --base-bg: #121212;
  --text-main: #ffffff;
  --accent-1: #1E9C91;
  --accent-2: #6ED3CF;
  --accent-3: #8850FF;
  --accent-4: #5B5B5B;
  --accent-5: #1A1A1A;
  --accent-6: #A0A4A8;
  --text-light: #A0A4A8;
}

body {
  background: var(--base-bg);
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text-main);
  margin: 0;
  padding: 0;
}


.main-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 40px 48px;
  box-sizing: border-box;
  background: var(--accent-5);
  
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  margin-bottom: 40px;
}

h1, h2, h3 {
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 18px;
}

h1 { font-size: 2rem; color: var(--text-main); }
h2 { font-size: 1.2rem; color: var(--accent-1); padding-top: 18px; }
h3 { font-size: 1.1rem; color: var(--accent-2); }

a, .btn-link {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover, .btn-link:hover {
  color: var(--accent-1);
}

.chart-card, .metric-card, .card-summary, .scorecard {
  background: var(--accent-5);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  color: var(--text-main);
}

.ring-chart-container {
  display: flex;
  justify-content: center;   /* centers horizontally */
  align-items: center;       /* centers vertically if height is fixed */
  flex-direction: column;    /* stack title, chart, and label vertically */
  text-align: center;        /* center any text under the chart */
}
.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-1);
}

.button-orange {
  background-color: var(--accent-orange);
  color: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  transition: background 0.3s;
}
.button-orange:hover {
  background-color: #e66a11;
}

.topic-card {
  background-color: var(--accent-5);
  padding: 20px;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0 0 transparent;
}

.topic-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(110, 211, 207, 0.3);
}

.topic-header {
  font-weight: bold;
  font-size: 1.1rem;
}

.topic-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
  margin-bottom: 8px;
}

.topic-models {
  margin-top: 8px;
}

.badge {
  display: inline-block;
  background-color: var(--accent-1);
  color: white;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 10px;
  margin: 2px 4px 0 0;
}


.card-label {
  font-size: 1em;
  color: var(--accent-6);
  margin-bottom: 6px;
}

.card-value {
  font-size: 2.4em;
  font-weight: bold;
  color: var(--accent-2);
}

.card-delta {
  font-size: 1em;
  margin-top: 4px;
  color: var(--accent-3);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.kpi-card {
  background: var(--accent-5);
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card h3 {
  color: var(--accent-2);
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-metric {
  font-size: 2.4rem;
  font-weight: bold;
  margin-top: 8px;
}

.kpi-delta {
  font-size: 1rem;
  margin-top: 6px;
  color: #4caf50; /* green for up, red for down can be dynamic */
}

.kpi-subtext {
  font-size: 0.8rem;
  color: var(--accent-6);
  margin-top: auto;
}


.chart-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
}

.chart-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
}

#sentimentGauge {
  width: 220px !important;
  height: 120px !important;
}

.slide {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: nowrap;
}


.speech-bubble {
  border-radius: 10px;
  padding: 12px;
  font-size: 0.9em;
  min-height: 210px;
}


.model-avatar {
  height: 60px;
  margin-bottom: 8px;
}

.model-name {
  font-weight: bold;
}

.model-status {
  font-size: 0.85em;
  margin-top: 4px;
}

.sliderdots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 8px;
}

.dot {
  height: 10px;
  width: 10px;
  margin: 0 4px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.dot.active {
  background-color: #1E9C91; /* your accent-1 */
}
.slider-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slider-track .feedback-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.slider-slide {
  flex: 0 0 auto;
  width: 180px;  /* or 25% if 4 per row exactly */
  margin: 0 12px;
}


.feedback-card {
  width: 100%;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}


canvas {
  max-width: 100%;
  height: auto !important;
  display: block;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 100%;
}

.chart-card {
  background: var(--accent-5);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin: 32px 0;
  padding: 24px;
  max-width: 1020px;
  width: 100%;
  box-sizing: border-box;
}


.tabs-wrapper {
  margin: 32px 0;
  background: var(--accent-5);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  padding: 24px;
}

.tab-buttons {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--accent-4);
  margin-bottom: 18px;
}

.tab-button {
  padding: 10px 18px;
  background: var(--accent-4);
  color: var(--text-main);
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-weight: 600;
  border: none;
  outline: none;
}

.tab-button.active {
  background: var(--accent-3);
  color: #fff;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.llm-btn.active {
    background-color: #10b981;
    color: #000;
}

.llm-btn.selected {
    background-color: #14b8a6 !important;
    border-color: #14b8a6 !important;
    color: white !important;
}

.collapsible {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding-right: 20px;
}

.collapsible .arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--accent-4);
    border-radius: 50%;
    font-size: 0.8rem;
    color: var(--accent-6);
    transition: transform 0.2s ease;    
}

.collapsible-content {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding-left: 10px;
}

.collapsible-content.open {
    display: flex;
}


/* Scrollbar track */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/* Track background */
::-webkit-scrollbar-track {
  background: var(--accent-5);
}


.chart-card h3:hover {
  color: var(--accent-2);
}


.action-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--accent-5);
    color: var(--text-main);
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

.action-table th,
.action-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--accent-4);
    text-align: left;
}

.action-table thead {
    background-color: var(--accent-4);
}

.action-table tr:last-child td {
    border-bottom: none;
}

.priority-high {
    border-left: 4px solid #f44336;
}

.priority-medium {
    border-left: 4px solid #ff9800;
}

.priority-low {
    border-left: 4px solid #4caf50;
}


/* Scrollbar thumb */
::-webkit-scrollbar-thumb {
  background-color: var(--accent-4);
  border-radius: 6px;
}

/* On hover */
::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-3);
}

.meter-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4em;
  font-weight: bold;
  color: var(--text-main);
}


#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 14, 14, 0.9); /* dark semi-transparent */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  flex-direction: column;
}


.radar-loading-icon {
  width: 300px;
  height: 300px;
  margin-bottom: 24px;
  
}

#loading-overlay h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

#loading-overlay p {
  font-size: 16px;
  opacity: 0.85;
}

#loading-overlay #timer {
  margin-top: 10px;
  font-weight: bold;
  font-size: 14px;
  color: #6ED3CF;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--accent-5);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 32px;
}
.table th, .table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--accent-4);
  text-align: left;
  font-size: 1em;
}
.table th {
  color: var(--accent-6);
  font-weight: 600;
}
.table tr:last-child td {
  border-bottom: none;
}
.table tr:hover td {
  background: var(--accent-4);
}

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  background: var(--accent-1);
  color: var(--accent-5);
  font-weight: 600;
  font-size: 1em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover {
  background: var(--accent-2);
}

.toggle-btn {
  padding: 8px 14px;
  background: var(--accent-4);
  color: var(--text-main);
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.toggle-btn:hover {
  background: var(--accent-3);
  color: #fff;
}

.toggle-btn-sm {
  padding: 6px 10px;
  background: var(--accent-4);
  color: var(--text-main);
  border-radius: 6px;
  font-weight: 500;
  font-size: .75em;
  transition: background 0.2s, color 0.2s;
}
.toggle-btn-sm:hover {
  background: var(--accent-3);
  color: #fff;
}

.select-toggle {
  padding: 8px 14px;
  background: var(--accent-4);
  color: var(--text-main);
  border-radius: 6px;
  font-weight: 500;
  border: none;
  appearance: none;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23fff' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 32px;
}

.select-toggle:hover {
  background: var(--accent-3);
  color: #fff;
}



.card h3 {
  color: var(--accent-2);
}
.card ul li {
  margin-bottom: 10px;
}

.sidebar {
  width: 240px;
  background: var(--accent-5);
  border-right: 1px solid var(--accent-4);
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  align-self: flex-start;
}

.sidebar-header {
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background-color: transparent;
}

.sidebar-nav {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-section-title {
  font-size: 0.95rem;
  color: var(--accent-6);
  font-weight: bold;
  margin-bottom: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--accent-4);
}

/* Informational callout box */
.info-callout {
  background: var(--accent-5);
  border-left: 4px solid var(--accent-2);
  padding: 16px 24px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.info-callout ul {
  margin: 0;
  padding-left: 20px;
}

.sidebar-title {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--accent-1);
}

.sidebar-nav a {
  text-decoration: none;
  color: var(--accent-6);
  font-size: 1em;
  padding: 10px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--accent-4);
  color: var(--text-main);
}

#loading-overlay {
  display: none;
  background: var(--base-bg);
  color: var(--text-main);
}

#suggestionBox {
  background: var(--accent-5);
  border: 1px solid var(--accent-3);
  color: var(--text-main);
}

.metric-positive {
  color: #4caf50;
}
.metric-neutral {
  color: #9e9e9e;
}
.metric-negative {
  color: #f44336;
}

.dashboard-grid {
  display: flex;
  max-width: 1280px;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.main-col {
  flex: 1 1 70%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card-row {
  display: flex;
  gap: 24px;
}

.side-col {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ring-chart {
  background: var(--accent-5);
  color: var(--text-main);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.table-section {
  background: var(--accent-5);
  padding: 24px;
  border-radius: 12px;
}

.table-scroll {
  overflow-x: auto;
  max-height: 400px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.styled-table th,
.styled-table td {
  padding: 10px;
  border-bottom: 1px solid var(--accent-4);
}

.styled-table th {
  color: var(--accent-6);
  font-weight: bold;
}

.styled-table tbody tr:hover {
  background: var(--accent-4);
}

.tab-btn {
  padding: 10px 16px;
  background-color: var(--accent-5);
  color: var(--text-main);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
  border: 1px solid var(--accent-4);
}

.tab-btn:hover {
  background-color: var(--accent-4);
}

.tab-btn.active {
  background-color: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

.tab-group {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--accent-4);
}

.tab-link {
  padding: 10px 18px;
  color: var(--accent-6);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tab-link:hover {
  color: var(--accent-2);
}

.tab-link.active {
  color: var(--accent-2);
  border-color: var(--accent-2);
}


/* Flash Messages */
.flash-container {
  margin-bottom: 20px;
}

.alert {
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 10px;
  color: #fff;
}
.alert-success { background: #4caf50; }
.alert-info    { background: #2196f3; }
.alert-warning { background: #ff9800; }
.alert-danger  { background: #f44336; }


.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.form-control {
  padding: 8px;
  border: 1px solid var(--accent-4);
  border-radius: 6px;
  background: var(--accent-5);
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 4px var(--accent-2);
}

.report-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 24px;
  margin: 32px auto;
  max-width: 1280px;
}

.report-left,
.report-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Default: desktop mode */
.sidebar {
  display: block;
}
.mobile-header,
.mobile-menu-overlay {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 33% 33% 33%;
  gap: 24px;
  align-items: flex-start;
  margin-top: 28px;
  max-width: 1480px;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-top: 28px;
  max-width: 1480px;
}

.dashboard-grid-70-30 {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
  max-width: 1480px;
 }


.dashboard-grid-40-60 {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
  max-width: 1480px;
}

.dashboard-grid-60-40 {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
  max-width: 1480px;
}


/* Tablet (≤1000px): switch to 2 equal columns */
@media (max-width: 1000px) {
  .dashboard-grid-70-30 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (≤768px): stack into 1 column */
@media (max-width: 768px) {
  .dashboard-grid-70-30 {
    grid-template-columns: 1fr;
  }
}


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

.dashboard-grid-30-70 {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
  max-width: 1480px;
}

/* Tablet (≤1000px): switch to 2 equal columns */
@media (max-width: 1000px) {
  .dashboard-grid-30-70 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile (≤768px): stack into 1 column */
@media (max-width: 768px) {
  .dashboard-grid-30-70 {
    grid-template-columns: 1fr;
  }
}

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

/* On mobile, stack to 1 column */
@media (max-width: 768px) {
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Tablet & smaller (≤1000px) tweak container */
@media (max-width: 1000px) {
  .container { max-width: 98vw; padding: 24px; }
  .main-content { padding: 24px 0; }
}

@media (max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* On mobile, stack to 1 column */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Default hidden */
.mobile-header,
.mobile-header-report {
  display: none;
}

@media (max-width: 768px) {
  .sidebar { display: none !important; }

  /* Global menu: visible everywhere except guest report-single */
  body:not(.report-single-page) .mobile-header,
  body.report-single-page:not(.guest) .mobile-header {
    display: block;
  }

  /* Report menu: only for guests on report-single */
  body.report-single-page.guest .mobile-header-report {
    display: block;
  }

  .mobile-header,
  .mobile-header-report {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--accent-5);
    border-bottom: 1px solid var(--accent-4);
    padding: 12px 0;
  }

  .mobile-logo {
    height: 48px;
    margin-right: 12px;
  }


  .mobile-nav-fixed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 16px;
  }

  /* Bottom arrow */
  .nav-arrow-bottom {
    position: fixed;
    bottom: 20px;
    left: 10px;
    z-index: 3000;
    background: var(--accent-5);
    border: 1px solid var(--accent-4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
  }

  .mobile-nav-fixed a,
  .mobile-nav-fixed button {
    color: var(--text-main);
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
  }

  .hamburger {
    font-size: 2.5rem !important;
    padding: 4px;        /* Optional: more clickable space */
  }

  
}

  /* Overlay menu */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--base-bg);
    z-index: 2000;
    padding: 20px;
  }
  .mobile-menu-overlay.active {
    display: flex;
    flex-direction: column;
  }

  .close-menu {
    align-self: flex-end;
    font-size: 2rem;
    background: none;
    border: none;
    padding-right: 20px;
    color: var(--text-main);
    cursor: pointer;
  }

  .mobile-menu-links .sidebar-section { margin-top: 20px; }
  .mobile-menu-links a {
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
  }
}
