/* ============================================================
   GLOBAL + LAYOUT
============================================================ */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #1a1440 0, #080818 55%, #04040c 100%);
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  color: #fff;
  margin: 0;
  overflow-x: hidden;
}

.text-muted,
.text-muted small {
  color: rgba(233,237,255,0.72) !important;
}

/* Keep navbar above loader */
.gg-nav {
  background: rgba(5,5,20,0.85);
  backdrop-filter: blur(14px);
  z-index: 1100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gg-logo {
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(120deg, #F72585, #7209B7, #4361EE, #4CC9F0, #F72585);
  background-size: 300% 300%;
  animation: gg-logo-scroll 6s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes gg-logo-scroll {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 200% 50%; }
}

/* Page hero */
.gg-page-hero {
  background: radial-gradient(circle at top left,#3F37C9 0,#560BAD 35%,#020617 100%);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.gg-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(86, 11, 173, 0.16);
  border: 1px solid rgba(86, 11, 173, 0.35);
  font-size: 0.8rem;
  color: rgba(233,237,255,0.8);
}

.gg-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4cc9f0;
  box-shadow: 0 0 0 6px rgba(76, 201, 240, 0.25);
}

.gg-updated {
  font-size: 0.8rem;
  color: rgba(233,237,255,0.7);
}

.gg-mix-card {
  background: rgba(6, 7, 22, 0.98);
  border-radius: 26px;
  padding: 2rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65);
}

.mix-meta {
  font-size: 0.78rem;
  color: rgba(233,237,255,0.7);
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.value-pulse {
  animation: valuePulse 0.8s ease-out;
}

@keyframes valuePulse {
  0%   { transform: translateY(2px); opacity: 0.6; }
  40%  { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   LOADING OVERLAY
============================================================ */

.gg-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,8,24,0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 700; /* BELOW navbar/footer */
  opacity: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.gg-loader-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.gg-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gg-loader-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.1);
  border-top-color: #F72585;
  animation: spin 1.1s linear infinite;
}

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

.gg-loader-text {
  font-size: 0.95rem;
  opacity: 0.7;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { opacity: .5; }
  50%     { opacity: .9; }
}

/* Content stays hidden until JS shows it */
.gg-content-hidden {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}

.gg-content-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   GENERAL COMPONENTS
============================================================ */

.chart-wrapper {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  padding: 48px;
}

canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0px 0px 40px rgba(86, 11, 173, 0.8));
}

/* Hover raise */
.hover-raise {
  transition: transform .2s ease, box-shadow .2s ease;
}

.hover-raise:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

/* Fade-in components */
.fade-in-soft {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInSoft .6s ease forwards;
}

@keyframes fadeInSoft {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ============================================================
   MIX DASHBOARD – CARD + MAP + TABLE
============================================================ */

.gg-card {
  background: radial-gradient(circle at top left, rgba(86, 11, 173, 0.18), transparent 60%),
              radial-gradient(circle at bottom right, rgba(72, 12, 168, 0.22), transparent 55%),
              rgba(8, 8, 24, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 14px 16px 16px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(8, 8, 24, 0.9);
}

.gg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.gg-chip {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(8, 8, 24, 0.9);
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  padding: 5px 11px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}

.gg-chip:hover {
  background: rgba(67, 56, 202, 0.85);
  border-color: #F72585;
  color: #fff;
  transform: translateY(-2px);
}

/* ================================
   REGION LIST
================================ */

.region-table-wrap {
  margin-top: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: radial-gradient(circle at top, #141433 0, #080818 55%, #04040C 100%);
  padding: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.region-table-head {
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
}

.region-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.region-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  cursor: pointer;
}

.region-row:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.2);
  background: linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
}

.region-row.region-selected {
  border-color: #F72585;
  box-shadow:
    0 0 0 1px rgba(247,37,133,0.5),
    0 10px 24px rgba(0,0,0,0.45);
}

.region-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.region-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.region-intensity {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.region-status {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-transform: capitalize;
}

/* ================================
   SOLAR PAGE TWEAKS
================================ */

.solar-page {
  background: radial-gradient(circle at top, #0e1030 0, #05051a 55%, #03030c 100%);
}

.solar-page.solar-day {
  background: radial-gradient(circle at top, #16274d 0, #0b1230 55%, #060616 100%);
}

.solar-page .gg-card {
  background: radial-gradient(circle at top left, rgba(73, 115, 255, 0.15), transparent 60%),
              radial-gradient(circle at bottom right, rgba(244, 127, 255, 0.16), transparent 60%),
              rgba(6, 6, 18, 0.96);
  border: 1px solid rgba(255,255,255,0.14);
}

.solar-page.solar-day .gg-card {
  background: radial-gradient(circle at top left, rgba(76, 201, 240, 0.18), transparent 60%),
              radial-gradient(circle at bottom right, rgba(249, 168, 37, 0.15), transparent 60%),
              rgba(8, 12, 30, 0.94);
}

.solar-page .gg-section-title {
  color: #e9edff;
}

.solar-page .gg-scope-sub {
  color: rgba(233, 237, 255, 0.7);
}

.solar-page .list-group-item {
  background: rgba(255,255,255,0.03) !important;
  color: #e9edff;
}

.solar-page .form-control,
.solar-page .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}

.solar-page .form-control:focus,
.solar-page .form-select:focus {
  border-color: #4CC9F0;
  box-shadow: 0 0 0 0.15rem rgba(76,201,240,0.25);
}

.solar-page .gg-table th,
.solar-page .gg-table td {
  color: #eef2ff;
  font-size: 0.9rem;
}

.solar-page .gg-table tbody tr:hover {
  background: rgba(255,255,255,0.06);
}

.solar-page ::placeholder {
  color: rgba(255,255,255,0.82);
}

.text-muted-light,
.solar-subtext {
  color: rgba(233,237,255,0.78) !important;
}

.solar-page .footer-bar {
  background: #060614;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #dfe4ff;
}

.solar-page .text-muted,
.solar-page .text-muted small {
  color: rgba(233,237,255,0.78) !important;
}

/* About page */
.gg-timeline { position: relative; padding-left: 1.5rem; border-left: 1px solid rgba(255,255,255,0.25); }
.gg-timeline-item { position: relative; margin-bottom: 1.25rem; }
.gg-timeline-dot { position: absolute; left: -0.45rem; top: 0.35rem; width: 0.75rem; height: 0.75rem; border-radius: 999px; background: #4CC9F0; border: 2px solid #0b0c1a; }
.gg-timeline-year { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.linkedin-card { background: #111827; border: 1px solid rgba(255,255,255,0.12); }
.linkedin-card .headline { font-size: .95rem; }
.linkedin-card .subline { font-size: .82rem; opacity: .85; }
.about-subtext { color: rgba(233,237,255,0.85) !important; }

/* Legend */

.gg-legend {
  margin-top: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
}

.gg-legend-swatch {
  width: 16px;
  height: 6px;
  display: inline-block;
  border-radius: 3px;
}

.gg-ci-verylow { background: #3FE0A8; }
.gg-ci-low { background: #00B8D9; }
.gg-ci-medium { background: #FFB347; }
.gg-ci-high { background: #FF7B54; }
.gg-ci-veryhigh { background: #FF4B4B; }

.gg-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 4px;
  gap: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.gg-toggle-btn {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: none;
  padding: 8px 14px;
  font-weight: 700;
  border-radius: 999px;
  transition: all .15s ease;
}

.gg-toggle-btn.active {
  background: linear-gradient(120deg, #F72585, #7209B7);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* Chart wrapper */
.gg-chart-wrap {
  padding: 10px 0 8px;
  min-height: 260px;
}

.gg-chart-wrap canvas {
  width: 100% !important;
  min-height: 280px;
}
/* ============================================================
   TABLE + TRENDS
============================================================ */

.gg-table-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  overflow: hidden;
  overflow-x: auto;
}

.gg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.table-lead {
  border-bottom: 1px solid rgba(31,41,55,0.7);
  background: rgba(255,255,255,0.02);
}

.gg-table th,
.gg-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.gg-table tbody tr.mix-row:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  cursor: pointer;
  transform: translateY(-1px);
}

.gg-table tbody tr.mix-row {
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  position: relative;
  transition: background .15s ease, transform .12s ease, border-color .12s ease;
}

.gg-table tbody tr.mix-row::after {
  content: "▸";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  transition: transform .2s ease;
}

.gg-table tbody tr.mix-row.active::after {
  transform: translateY(-50%) rotate(90deg);
  color: #F72585;
}

/* Sparkline row */
.fuel-detail td {
  background: rgba(8,8,24,0.98);
}

.fuel-sparkline-wrap {
  height: 76px;
}

.fuel-detail-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: center;
}

.fuel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.fuel-meta-stat {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.fuel-meta-stat .label {
  display: block;
  font-size: 0.78rem;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.fuel-meta-stat .value {
  font-weight: 700;
  font-size: 0.95rem;
}

.fuel-meta-stat.pos .value { color: #3FE0A8; }
.fuel-meta-stat.neg .value { color: #FF7B54; }

.fuel-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.fuel-value {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 576px) {
  .fuel-detail-inner {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER
============================================================ */

.footer-bar {
  margin-top: auto;
  text-align: center;
  background: #050515;
  border-top: 1px solid rgba(255,255,255,0.15);
  opacity: 0.85;
  font-size: 14px;
  padding: 1.2rem 0;
  z-index: 1100;
}

/* ============================
   LOADING OVERLAY FIX
============================ */

.gg-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 12, 0.92);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gg-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Content fade states */
.gg-content-hidden {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.gg-content-visible {
  opacity: 1;
  filter: blur(0);
}

.imports-locked-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(8,8,24,0.92), rgba(6,6,16,0.96));
  padding: 20px;
}

/* ============================================================
   RESPONSIVE TWEAKS
============================================================ */

@media (max-width: 992px) {
  .chart-wrapper {
    padding: 32px 20px 28px;
  }
  .gg-card {
    padding: 12px;
  }
  .gg-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .chart-wrapper {
    padding: 22px 12px 26px;
    max-width: none;
  }
  .gg-chart-wrap {
    min-height: 230px;
  }
  .gg-chart-wrap canvas { min-height: 220px; }
  .gg-table {
    min-width: 520px;
  }
  .gg-table th,
  .gg-table td {
    padding: 9px 10px;
  }
}

@media (max-width: 576px) {
  h1.display-4,
  h1.display-5,
  .hero-title {
    font-size: 2.25rem;
    line-height: 1.15;
  }
  .gg-logo {
    font-size: 28px;
  }
}

/* ============================================================
   HOMEPAGE / MIX SHARED
============================================================ */

.mix-bar-shell {
  background: linear-gradient(135deg, #10132a, #070816);
  border-radius: 24px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.mix-bar {
  display: flex;
  width: 100%;
  height: 72px;              /* ← FIXED: taller bar */
  min-height: 72px;          /* ensures it never collapses */
  border-radius: 14px;
  overflow: hidden;
  background: #06071a;
}

.mix-segment {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fdfdff;
  white-space: nowrap;
  transition: flex-basis 0.9s cubic-bezier(0.16,1,0.3,1);
  padding: 6px 4px;
}

.mix-label {
  padding: 0.15rem 0.5rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mix-label-value {
  font-size: 0.83rem;
  opacity: 0.9;
}

@media (max-width: 991.98px) {
  .mix-bar {
    height: 60px;         /* previously 52px */
    min-height: 60px;
  }
  .mix-segment {
    font-size: 0.68rem;
  }
}

/* ============================================================
   TABLE MINI-BAR (fuel-by-fuel rows)
============================================================ */

.mix-table .mix-bar {               /* scoped so hero bar keeps its height */
  position: relative;
  width: 100%;
  height: 12px;          /* increased from 10px */
  min-height: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.mix-table .mix-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width .55s cubic-bezier(0.16,1,0.3,1);
}

.mix-table td:first-child {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mix-table td:nth-child(2),
.mix-table td:nth-child(3) {
  font-feature-settings: "tnum";
}

.mix-table td:last-child {
  width: 140px;          /* increased so it doesn’t squash */
  padding-top: 12px;
  padding-bottom: 12px;
}

@media (max-width: 576px) {
  .mix-table td:last-child {
    width: 100px;
  }
  .mix-table .mix-bar {
    height: 10px;
    min-height: 10px;
  }
}
