/* =================================================================== */
/* geminigraphics.css — FINAL CONSOLIDATED VERSION                     */
/* =================================================================== */

/* --- Root Variables & Design System --- */
:root {
  --pbi-yellow: #F2C811;
  --gemini-blue: #0A84FF;
  --gemini-purple: #5E5CE6;
  --text-primary: #1d1d1f;
  --text-secondary: #5a5a5f;
  --bg-color: #f5f5f7;
  --sidebar-w: 340px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

/* --- Global & Base Styles --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  margin: 0;
  padding: 0; /* Reset padding for full layout */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Animated Gradient Background --- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 10% 20%, hsla(210, 100%, 70%, 0.3), transparent 40%),
              radial-gradient(circle at 90% 80%, hsla(280, 100%, 75%, 0.3), transparent 40%);
  filter: blur(100px);
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(360deg); }
}

/* --- The Glass Effect (Shared Class) --- */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

/* --- Main Layout Grid (Long Dashboard) --- */
.long-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 20px;
  padding: 20px;
  min-height: 100vh;
}

/* --- Sticky Sidebar --- */
.sticky-sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.5);
}

.scroll-area { 
  overflow-y: auto; 
  flex-grow: 1; 
  padding: 10px; 
}

/* --- Dashboard Grid System --- */
.dash-grid { 
  display: grid; 
  grid-template-columns: repeat(12, 1fr); 
  gap: 20px; 
}

.w-4  {grid-column: span 4;}
.w-6  {grid-column: span 6;}
.w-8  {grid-column: span 8;}
.w-12 {grid-column: span 12;}
@media (max-width: 1200px) { .w-4, .w-6, .w-8 {grid-column: span 12;} .long-layout { grid-template-columns: 1fr; } .sticky-sidebar {position: relative; height: auto; top: 0;} }

/* --- Components --- */

/* Cards */
.card { 
  padding: 20px; 
  min-height: 300px; 
  display: flex; 
  flex-direction: column; 
}
.card-title { 
  font-weight: 700; 
  margin-bottom: 15px; 
  display: flex; 
  align-items: center; 
  gap: 10px; 
}
.pill { 
  background: black; 
  color: white; 
  padding: 2px 8px; 
  border-radius: 4px; 
  font-size: 0.7em; 
  font-weight: 700;
}

/* List Items (Sidebar) */
.list-item {
    padding: 10px; margin-bottom: 5px;
    border-radius: 8px; cursor: pointer;
    transition: background 0.2s;
}
.list-item:hover { background: rgba(0,0,0,0.05); }
.bar-bg { height: 4px; background: #eee; border-radius: 2px; margin-top: 5px; }
.bar-fill { height: 100%; background: var(--gemini-blue); border-radius: 2px; }

/* Buttons */
.btn {
  width: 100%;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-pbi {
  background: linear-gradient(135deg, var(--pbi-yellow), #ffd952);
  color: #333;
  box-shadow: 0 4px 15px rgba(242, 200, 17, 0.3);
}
.btn-pbi:hover { transform: translateY(-2px); }

/* Inputs & Selects */
input, select { 
  width: 100%; 
  padding: 10px; 
  margin-bottom: 8px; 
  border-radius: 8px; 
  border: 1px solid rgba(0,0,0,0.1); 
  background: rgba(255,255,255,0.8);
}

/* --- AI Insights Box --- */
.ai-box {
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border-left: 5px solid var(--gemini-purple);
    padding: 20px; margin-bottom: 20px; border-radius: 12px;
    line-height: 1.6;
}

/* --- Comparison Modal (Full Screen) --- */
.fs-modal {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(245, 245, 247, 0.98); /* Opaque background */
    z-index: 9999; 
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.fs-content {
    max-width: 1600px; 
    margin: 0 auto; 
    padding: 20px;
    display: grid; 
    grid-template-columns: 300px 1fr; 
    gap: 30px;
}

.comp-sidebar { 
    background: white; 
    padding: 20px; 
    border-radius: 16px; 
    height: fit-content; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.chk-item { 
    display: flex; 
    gap: 10px; 
    padding: 8px 0; 
    border-bottom: 1px solid #eee; 
    align-items: center;
}

/* Chart Canvas Fix */
canvas { width: 100% !important; height: 100% !important; min-height: 250px; }