/* --- GLOBAL RESET & BASE --- */
/*
html, body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Arial, sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  min-height: 100vh;
  letter-spacing: -0.01em;
  line-height: 1.47059;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: opacity ease-in 0.2s;
}
*/

/* --- STREAMING MESSAGE STYLES --- */
.message.streaming .message-content::after {
    content: '|';
    animation: blink 1s infinite;
    color: #059669;
    font-weight: bold;
}

/* Remove any top margin from the first element inside chat message bubbles */
.message-content > :first-child {
  margin-top: 0;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* --- EXPANDABLE ERROR MESSAGE STYLES --- */
.error-message-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-short {
    white-space: pre-line;
    color: #dc2626;
    font-weight: 500;
}

.expand-error-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-self: flex-start;
    max-width: fit-content;
}

.expand-error-btn:hover {
    background: #b91c1c;
}

.error-full {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #7f1d1d;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* --- COPY ICON STYLES --- */
.copy-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
}

.copy-icon::before,
.copy-icon::after {
  content: '';
  position: absolute;
  border: 1.5px solid #6b7280;
  background: transparent;
  width: 12px;
  height: 14px;
}

.copy-icon::before {
  top: 0;
  left: 0;
  border-radius: 1px;
}

.copy-icon::after {
  top: 2px;
  left: 2px;
  border-radius: 1px;
  background: white;
}

.copy-button:hover .copy-icon::before,
.copy-button:hover .copy-icon::after {
  border-color: #374151;
}

.copy-button.copied .copy-icon::before,
.copy-button.copied .copy-icon::after {
  border-color: #059669;
}
/*
*, *:before, *:after {
  box-sizing: inherit;
}
*/

/* --- LAYOUT --- */
/* 3-Column Layout Container */
.root, :root {
  --topbar-h: 50px;
}
.layout-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100vw;
  background: #f5f5f7;
  position: relative;
  overflow: hidden; /* prevent outer scrollbars */
}

.layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100vw;
  background: none;
  position: relative;
}

.main-content {
  flex: 1;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100vh;
  padding: 2.5rem;
  padding-right: 6rem;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  min-width: 0; /* Allow flex item to shrink below content size */
  max-width: none;
  position: relative;
  background: #f5f5f7;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Auth Top Bar that starts after the left chat panel */
.auth-top-bar {
  position: sticky;
  top: 0;
  right: 0;
  height: var(--topbar-h);
  background: #fcfcfc;
  border-bottom: 1px solid #e5e7eb;
  z-index: 60; /* Above sidebar (50) and below modals */
  display: flex;
  align-items: center;
}

.auth-top-bar-inner {
  margin-left: 0;
  padding: 0 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.auth-top-bar .sidebar-auth-buttons {
  display: flex !important;
  flex-direction: row;
  gap: 0.5rem;
}

/* Topbar user menu alignment */
.auth-top-bar #topbar-user-slot {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.auth-top-bar .sidebar-auth-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

/* Ensure main content clears the fixed top bar when present */
.right-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100vh;
}

.right-content {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  overflow: hidden; /* contain inner scrolls */
}

.right-panel .main-content {
  height: auto;
  flex: 1;
}

/* Sidebar height within right panel should also account for top bar */
.right-panel .sidebar {
  height: 100%;
}

@media (max-width: 900px) {
  .auth-top-bar { top: 0; }
  .auth-top-bar .sidebar-auth-buttons {
    gap: 0.4rem;
  }
  .auth-top-bar .sidebar-auth-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Hide the old sidebar auth section when a page has a top auth bar */
body.has-top-auth-bar .sidebar-auth-section { display: none !important; }

/* Hide scrollbar for main-content */
.main-content::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.main-content::-webkit-scrollbar-track {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

/* Adjust main content when sidebar is collapsed */
.sidebar.collapsed {
  width: 80px;
  min-width: 80px;
}

/* Left Panel Styles */
.left-panel {
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 8px 0 rgba(44,62,80,0.1);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-right: 1px solid #e3eaf2;
  flex-shrink: 0; /* Prevent panel from shrinking */
  position: relative; /* Required for absolute positioning of resizer */
  overflow: hidden; /* left panel itself shouldn't add scrollbars */
}

/* Chat Column Styles */
.chat-column {
  width: 400px;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 8px 0 rgba(44,62,80,0.1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-left: 1px solid #e3eaf2;
  flex-shrink: 0; /* Prevent panel from shrinking */
  position: relative;
}

.chat-column iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}





.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e3eaf2;
  min-height: 50px;
}

.panel-title {
  font-weight: 600;
  color: #1a2a33;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-controls {
  display: flex;
  gap: 8px;
}

.panel-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.panel-btn:hover {
  background: rgba(0, 122, 255, 0.08);
  color: #007aff;
}

.panel-btn:active {
  background: rgba(0, 122, 255, 0.12);
  transform: scale(0.95);
}

.panel-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

#ai-content {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #333;
}

.panel-resizer {
  position: absolute;
  right: -3px;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  transition: background 0.2s ease;
  z-index: 1000;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.panel-resizer:hover,
.panel-resizer.resizing {
  background: rgba(0, 122, 255, 0.3);
}













/* With flexbox layout, no manual adjustments needed */





/* --- SIDEBAR & MENU --- */
.sidebar {
  background: #fff;
  border-radius: 0;
  /* box-shadow: 2px 0 8px 0 rgba(44,62,80,0.1); */
  padding: 0;
  /* width: 5rem; */
  margin: 0;
  height: 100vh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden; /* avoid sidebar adding another scroll */
  justify-content: flex-start;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0; /* Prevent sidebar from shrinking */
}

/* Slide the right sidebar off-screen during overlay steps */
.sidebar.offscreen {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* Force-hide sidebar whenever site selection overlay is open */
body.site-overlay-open .sidebar {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* Collapsed sidebar state */
.sidebar.collapsed {
  /* width: 60px; */
  /* min-width: 60px; */
  /* max-width: 60px; */
  border-radius: 0;
}

/* Menu toggle button */
.menu-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: absolute;
  top: 5px;
  z-index: 2;
  opacity: 0.85;
}
.sidebar.collapsed .menu-toggle-btn {
  justify-self: anchor-center;
}

.menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 1;
}

.menu-toggle-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}



/* Toggle icon animation */
.toggle-icon {
  transition: all 0.3s ease;
  font-weight: bold;
}

.sidebar.collapsed .toggle-icon {
  transform: none;
}

/* Menu header */
.menu-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 26px 16px 26px 16px;
  margin-bottom: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: visible;
  margin: 0 0.25rem 0;
}

.menu-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}
.menu-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin: 0;
  padding-top: 8px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar.collapsed .menu-title {
  opacity: 0;
  visibility: hidden;
  display:none
}
.menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* padding: 20px 16px 26px 16px; */
  transition: all 0.3s ease;
  /* border-radius: 0; */
  /* background: white; */
  margin-top: 0;
  overflow-y: auto; /* scroll inside menu only if needed */
}

/* Menu logo */
.menu-logo {
  transition: all 0.3s ease;
  max-width: 50%;
  height: auto;
}

.menu-logo-collapsed {
  display: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.sidebar.collapsed .menu-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: none;
}
.sidebar.collapsed .menu-logo-collapsed {
  display: block;
}

.menu-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  line-height:1.25;
  color: #1a2a33;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-weight: 500;
  border: none;
  background: none;
  outline: none;
  position: relative;
  /* white-space: nowrap; */
  overflow: hidden;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

/* Hide icons in expanded state */
.sidebar:not(.collapsed) .menu-item::before {
  display: none !important;
}

/* Hide icons for separators in expanded state */
.menu-item[data-icon="-"]::before {
  display: none;
}

/* Collapsed menu items */
.sidebar.collapsed .menu-item {
  padding: 0.25rem 0;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  /* min-height: 30px; */
  position: relative;
  margin: 0;
  border-radius: 8px;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}

.sidebar.collapsed .menu-item > div {
  justify-content: center;
}

.sidebar.collapsed .menu-item span {
  display: none;
}

/* Show icons in collapsed state */
.sidebar.collapsed .menu-item::before {
  content: attr(data-icon) !important;
  font-size: 1.2rem !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: inherit !important;
  transition: all 0.2s ease !important;
  margin-right: 0 !important;
  opacity: 1 !important;
  display: block !important;
/*  filter: grayscale(100%); */
}

/* Hover effects for collapsed menu items */
.sidebar.collapsed .menu-item:hover::before {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1;
}

/* Hide separators in collapsed state */
.sidebar.collapsed .menu-item[data-icon="-"] {
  display: none;
}

/* Hide active indicator in collapsed state */
.sidebar.collapsed .menu-item.active::after {
  display: none;
}
.menu-item.active {
  color: #007aff;
  background: rgba(0, 122, 255, 0.08);
  font-weight: 600;
}

.menu-item.active::before {
  opacity: 1;
  color: #007aff;
}

.menu-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 2px 2px 0;
}
.menu-item:hover {
  background: rgba(0, 122, 255, 0.04);
  color: #007aff;
  transform: translateX(2px);
}

.menu-item:hover::before {
  opacity: 1;
  transform: scale(1.1);
}
.menu-item:active {
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  transform: translateX(1px);
}
.menu-item .icon {
  width: 1.5em;
  height: 1.5em;
  display: inline-block;
  margin-right: 0.5em;
  opacity: 0.85;
}
.menu-item .arrow {
  margin-left: auto;
  color: #b0b8c1;
  font-size: 1.2em;
}

/* Card fade-in animation */
@keyframes cardFadeIn {
  from {
    opacity: 0.6;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section fade-in animation */
@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CARDS --- */
.card {
  background: #fff;
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(44, 62, 80, 0.10);
  padding: 2rem;
  position: relative;
  opacity: 0.6;
  animation: cardFadeIn 1.5s ease-out forwards;
  width: 100%;
  /* max-width: 100%; */
  overflow: hidden;
}

/* Card variations */
.card.ambassadors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.card.margin-bottom {
  margin-bottom: 1rem;
}

.card.margin-top {
  margin-top: 2rem;
}

/* Dashboard specific card styles */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 2rem);
}

/* In right-panel layout, avoid forcing viewport-based min-height that ignores top bar */
.right-panel .dashboard-container {
  min-height: 0;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a2a33;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Dashboard card specific classes */
.carbon-emissions-card {
  grid-column: span 2;
}

.energy-use-card {
  grid-column: span 1;
}

.projects-card {
  grid-column: span 1;
}

.scope-card {
  grid-column: span 2;
}

.assumptions-card {
  grid-column: span 1;
}

.offsets-card {
  grid-column: span 1;
}

/* Dashboard card content styles */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a2a33;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  font-size: 1.5rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-grow: 1;
}

.card-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.card-btn:hover {
  background: #e5e7eb;
}

.card-btn.primary {
  background: #1769aa;
  color: white;
}

.card-btn.primary:hover {
  background: #0d4a7a;
}

.card-content {
  margin-bottom: 1rem;
  overflow: hidden;
  width: 100%;
}

.chart-container {
  position: relative;
  height: 200px;
  margin: 1rem 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.chart-container canvas {
  max-width: 100% !important;
  height: auto !important;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.metric-item {
  text-align: center;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1769aa;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.scope-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  /* border-left: 4px solid #1769aa; */
  border-left: 8px solid #cddeec;
}

.scope-name {
  font-weight: 400;
  color: #1a2a33;
}

.scope-value {
  font-weight: 600;
  color: #1769aa;
}

.assumptions-list {
  list-style: none;
  padding: 0;
}

.assumption-item {
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  /* border-left: 3px solid #10b981; */
  border-left: 8px solid #c2e3d8;
}

.assumption-label {
  font-weight: 500;
  color: #1a2a33;
  margin-bottom: 0.25rem;
}

.assumption-value {
  color: #6b7280;
  font-size: 0.875rem;
}

.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  cursor: se-resize;
  background: linear-gradient(-45deg, #d1d5db 30%, #d1d5db 30%, #d1d5db 40%, transparent 40%);
}

.resize-handle:hover {
  background: linear-gradient(-45deg, #d1d5db 0%, #9ca3af 0%, #9ca3af 40%, transparent 0%);
}

/* Dashboard responsive styles */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .carbon-emissions-card,
  .scope-card {
    grid-column: span 1;
  }
}

/* Dashboard card specific hover effects and styling */
.dashboard-container .card {
  cursor: move;
  transition: all 0.3s ease;
  overflow: hidden;
}

.dashboard-container .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.dashboard-container .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  /* background: linear-gradient(90deg, #1769aa, #0d4a7a); */
}
.card h1, .card h2 {
  margin-top: 0;
  color: #1769aa;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* --- HEADINGS --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  color: #1769aa;
  text-shadow: none;
  font-weight: 700;
}
h1 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
}
h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* --- BUTTONS --- */
/*
button, input[type="submit"] {
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  box-shadow: 0 1.5px 6px rgba(44,62,80,0.07);
  background: #f5f6fa;
  color: #1769aa;
  outline: none;
  letter-spacing: 0.01em;
  margin: 0.2rem 0.2rem 0.2rem 0;
}
button:active, input[type="submit"]:active {
  background: #e3eaf2;
  color: #1769aa;
}
button:focus, input[type="submit"]:focus {
  box-shadow: 0 0 0 2px #1769aa33;
}
button:hover, input[type="submit"]:hover {
  background: #e3eaf2;
  color: #1769aa;
}
.btn-primary, .button-primary, input[type="submit"].btn-primary {
  background: linear-gradient(90deg, #007aff 0%, #1769aa 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,122,255,0.10);
}
.btn-primary:hover, .button-primary:hover, input[type="submit"].btn-primary:hover {
  background: linear-gradient(90deg, #1769aa 0%, #007aff 100%);
  color: #fff;
}
.btn-secondary, .button-secondary {
  background: #f5f6fa;
  color: #1769aa;
  font-weight: 500;
  border: 1.5px solid #e3eaf2;
}
.btn-secondary:hover, .button-secondary:hover {
  background: #e3eaf2;
  color: #1769aa;
}
#analyze-btn:disabled, button:disabled, input[type="submit"]:disabled {
  background: #e0e0e0 !important;
  color: #aaa !important;
  opacity: 0.7;
  cursor: not-allowed !important;
  box-shadow: none !important;
  border: none !important;
}
*/

/* --- MINI CARDS & INPUTS --- */
.mini-card {
  background: #f7fafd;
  border: 1.5px solid #b3e0ff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3em;
  padding: 0.7em 1.2em;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
}
/*
input, select, textarea {
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  font-size: 1rem;
  border-radius: 7px;
  border: 1.5px solid #b3e0ff;
  padding: 0.7em 1em;
  background: #f7fafd;
  color: #1a2a33;
  margin-bottom: 0.5em;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: #43e97b;
  outline: none;
}
*/

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
  margin-bottom: 2rem;
  overflow: hidden;
}
th, td {
  padding: 1em 1.2em;
  text-align: left;
  font-size: 1rem;
}
th {
  background: #e3f6f5;
  color: #1769aa;
  font-weight: 600;
}
td {
  color: #1a2a33;
}

/* --- RESOURCE CARDS (USEFUL RESOURCES, AMBASSADORS) --- */
.resource-card {
  width: 320px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px 0 rgba(44,62,80,0.10);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
  border: 1.5px solid #b3e0ff;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}
.resource-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  display: block;
  background: #e3f6f5;
}

/* --- ROWS, LABELS, VALUES --- */
.row {
  display: grid;
  grid-template-columns: 2fr 4fr 1fr;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e3eaf2;
  gap: 1rem;
}
.label {
  color: #1769aa;
  font-size: 1rem;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 120px;
}
.value {
  text-align: right;
  font-weight: 500;
  color: #1a2a33;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 1;
}
.unit-col {
  color: #6b7280;
  font-size: 0.9em;
  padding-left: 0.5rem;
}
.confidence {
  font-size: 0.85rem;
  color: #b0b8c1;
  margin-left: 0.5rem;
}

/* Responsive adjustments for three-column layout */
@media (max-width: 768px) {
  .row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
}

.section {
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  opacity: 0;
  animation: sectionFadeIn 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* Ensure content doesn't get cut off */
.card {
  overflow-x: auto;
  word-wrap: break-word;
}

/* Company profile specific styles */
#profile {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

#profile h1 {
  margin-bottom: 1.5rem;
  color: #1a2a33;
}

#profile h2 {
  margin-bottom: 1rem;
  color: #1769aa;
  border-bottom: 2px solid #e3eaf2;
  padding-bottom: 0.5rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .layout {
    flex-direction: column;
    align-items: flex-start;
  }
  #menu-include {
    margin: 0;
    height: auto;
  }
  .sidebar {
    /* position: relative; */
    width: 100%;
    border-radius: 0;
    margin: 0;
    min-height: 0;
    max-height: none;
    height: auto;
  }
  .sidebar.collapsed {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  .main-content {
    margin: 0;
    width: 100%;
    max-width: 100vw;
    padding: 1rem;
  }

  
  /* Left panel mobile styles */
  .left-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 40;
  }
  

  

  
  .panel-header {
    padding: 10px 15px;
  }
  
  .panel-content {
    height: calc(100vh - 60px);
  }
  
  .card {
    padding: 1.2rem 0.7rem 1.2rem 0.7rem;
    opacity: 0.6;
    animation: cardFadeIn 1.5s ease-out forwards;
  }
}

/* Modern homepage font and background for ExpectAI style */
body.home {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
  color: #1a1a1a;
}

body.home::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  opacity: 0.7;
  z-index: -2;
  pointer-events: none;
}

body.home::after {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

.company-header {
  width: 100%;
  text-align: center;
  font-size: 2.1rem;
  font-weight: 700;
  color: #1769aa;
  letter-spacing: 0.01em;
  padding: 1.2rem 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(44,62,80,0.07);
  margin-bottom: 2rem;
  margin-top: 0.5rem;
}

.improve-section h2 {
  color: #1769aa;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.improve-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.improve-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.1rem 1.5rem;
  align-items: center;
  margin-bottom: 1.2rem;
}
.improve-grid label {
  font-size: 1.08rem;
  color: #1769aa;
  font-weight: 500;
  margin-bottom: 0;
  text-align: right;
}
.improve-grid input,
.improve-grid select {
  width: 100%;
  padding: 0.7em 1em;
  border-radius: 7px;
  border: 1.5px solid #b3e0ff;
  background: #f7fafd;
  color: #1a2a33;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
}
.improve-grid input:focus,
.improve-grid select:focus {
  border-color: #43e97b;
  outline: none;
  box-shadow: 0 0 0 2px #43e97b33;
}

@media (max-width: 700px) {
  .improve-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem 0;
  }
  .improve-grid label {
    text-align: left;
    margin-bottom: 0.2rem;
  }
}

.ai-progress-bar-outer {
  width: 100%;
  background: #e3f6f5;
  border-radius: 8px;
  height: 24px;
  position: relative;
  margin-bottom: 0.7rem;
  box-shadow: 0 2px 8px rgba(44,62,80,0.04);
  overflow: hidden;
}
.ai-progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
  border-radius: 8px 0 0 8px;
  transition: width 0.7s cubic-bezier(.4,2,.3,1);
}
.ai-progress-bar-label {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #1769aa;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
.url-row label {
  min-width: 60px;
  font-size: 1.08rem;
  color: #1769aa;
  font-weight: 500;
  margin-bottom: 0;
}
.url-row input[type="text"] {
  flex: 1;
  min-width: 0;
}
@media (max-width: 600px) {
  .url-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
  }
  .url-row label {
    margin-bottom: 0.2rem;
  }
}

.juno-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.2rem;
}
.juno-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1769aa;
  margin: 0 0 0.2rem 0;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.juno-subtitle {
  font-size: 1.15rem;
  color: #4fc3f7;
  font-weight: 500;
  margin: 0 0 0.2rem 2px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* Carbon footprint page styles */
.carbon-content {
  text-align: center;
}

.ai-flex {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.ai-scope-summary {
  flex: 1;
  min-width: 0;
}

.graphs {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  min-height: 600px;
}

.graphs canvas {
  max-width: 100%;
  height: auto;
}

.ai-carbon-output {
  margin-bottom: 1rem;
  display: none;
}

.ai-carbon-btn {
  background-color: #007aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
}

/* Improve section styles */
.improve-section h2 {
  margin-top: 0;
}

.improve-ai-output {
  margin-top: 1rem;
}

/* Combo Box Styles */
.combo-box-container {
  position: relative;
  width: 100%;
}

.combo-box-container input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  transition: all 0.2s ease;
}

.combo-box-container input[type="text"]:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  background: #fafbff;
}

.combo-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #007aff;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: none;
  height: auto;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  margin-top: -1px;
}

.combo-option {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e8e8e8;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  color: #333;
}

.combo-dropdown {
  cursor: default;
}

.combo-option:hover {
  background-color: #f0f8ff;
  border-left: 3px solid #007aff;
  padding-left: 13px;
}

.combo-option.selected {
  background-color: #007aff;
  color: #fff;
  border-left: 3px solid #0056b3;
}

.combo-option:last-child {
  border-bottom: none;
  border-radius: 0 0 6px 6px;
}

.combo-option:first-child {
  border-radius: 0 0 0 6px;
}

/* Value Comparison Styles */
.value-comparison {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.current-value {
  font-weight: 500;
  color: #333;
}

/* Inline AI Value Styles */
.ai-value {
  display: inline;
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.ai-value strong {
  color: #333;
  font-weight: 700;
}

.accept-ai-btn {
  background: #007aff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.accept-ai-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

.accept-ai-btn:active {
  transform: scale(0.95);
}

/* Accept All Button */
.accept-all-ai-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  white-space: nowrap;
  flex-shrink: 0;
}

.accept-all-ai-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.accept-all-ai-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Reject All Button */
.reject-all-ai-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.reject-all-ai-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.reject-all-ai-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* AI Pipe Styles */
.ai-progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px solid #e3eaf2;
}

.ai-progress-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e3eaf2;
  border-top: 2px solid #007aff;
  border-radius: 50%;
  animation: ai-spin 1s linear infinite;
  margin-right: 0.75rem;
}

.ai-progress-message {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.ai-error-message {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  margin: 1rem 0;
  color: #721c24;
}

.ai-error-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.ai-error-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.ai-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ai-toast.ai-toast-show {
  transform: translateX(0);
}

.ai-toast-info {
  background: #007aff;
}

.ai-toast-success {
  background: #28a745;
}

.ai-toast-warning {
  background: #ffc107;
  color: #212529;
}

.ai-toast-error {
  background: #dc3545;
}

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



/* Adjust layout for footer */
.layout {
  min-height: calc(100vh - 30px);
}

/* Sidebar Auth Section Styles */
.sidebar-auth-section {
  /* background: #fff; */
  /* border-top: 1px solid #e3eaf2; */
  padding: 0.5rem;
}

/* Auth section when sidebar is collapsed */
.sidebar.collapsed .sidebar-auth-section {
  padding: 10px 5px;
  text-align: center;
}

.sidebar.collapsed .sidebar-user-menu {
  justify-content: center;
}

.sidebar.collapsed .sidebar-user-avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.sidebar.collapsed .sidebar-user-dropdown {
  left: 0;
  right: 0;
  transform: none;
  margin: 0 5px 0.5rem 5px;
  min-width: auto;
}

.sidebar.collapsed .sidebar-auth-buttons {
  flex-direction: column;
  gap: 8px;
}

.sidebar.collapsed .sidebar-auth-btn {
  width: 100%;
  padding: 8px 4px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-auth-dropdown {
  left: 0;
  right: 0;
  transform: none;
  margin: 0 5px 0.5rem 5px;
  min-width: auto;
}

.sidebar.collapsed .sidebar-auth-item {
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar User Menu Styles */
.sidebar-user-menu {
  position: relative;
  display: flex;
  justify-content: center;
}

.sidebar-user-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: white;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  transition: transform 0.2s ease;
}

.sidebar-user-menu-btn:hover .sidebar-user-avatar {
  transform: scale(1.05);
}

.sidebar-user-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  left: auto;
  transform: none;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 200px;
  max-width: calc(100vw - 20px);
  display: none;
  z-index: 2000;
  margin-bottom: 0.5rem;
}

.sidebar-user-dropdown.show {
  display: block;
}

/* In top auth bar, dropdown should open downward */
#topbar-user-menu .sidebar-user-dropdown,
#topbar-user-dropdown {
  top: 100%;
  bottom: auto;
  margin-top: 0.5rem;
  margin-bottom: 0;
  z-index: 3000;
}

.sidebar-user-info {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.25rem;
}

.sidebar-user-email {
  font-size: 0.8rem;
  color: #666;
}

.sidebar-user-actions {
  padding: 0.5rem 0;
}

/* Compact variant used for quick links to tighten spacing */
.sidebar-user-actions--compact {
  padding: 0.25rem 0;
}

.sidebar-dropdown-item {
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.sidebar-dropdown-item:hover {
  background: #f5f5f5;
}

.sidebar-dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 0.5rem 0;
}

/* Sidebar Auth Buttons Styles */
.sidebar-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-auth-btn {
  /* padding: 0.5rem 1rem; */
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.sidebar-auth-btn.login {
  background: #000;
  color: white;
}

.sidebar-auth-btn.login:hover {
  background: #333;
}

.sidebar-auth-btn.signup {
  background: white;
  color: #000;
  border: 1px solid #000;
}

.sidebar-auth-btn.signup:hover {
  background: #f5f5f5;
}

/* Adjust sidebar for auth section */
.sidebar {
  /* position: relative; */
  padding-bottom: 40px;
}
/* For Webkit browsers */
.sidebar::-webkit-scrollbar {
  width: 6px;
  background: #fff;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #d0d8e2;
  border-radius: 4px;
}

.user-profile {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin-right: 12px;
  object-fit: cover;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 2px;
}

.user-email {
  font-size: 12px;
  color: #6c757d;
}

/* User profile when sidebar is collapsed */
.sidebar.collapsed .user-profile {
  padding: 8px 4px;
  flex-direction: column;
  text-align: center;
}

.sidebar.collapsed .user-avatar {
  width: 36px;
  height: 36px;
  margin-right: 0;
  margin-bottom: 4px;
}

.sidebar.collapsed .user-details {
  width: 100%;
}

.sidebar.collapsed .user-name {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.sidebar.collapsed .user-email {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Authentication Modal */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.auth-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}

.auth-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background: #f8f9fa;
  color: #333;
}

.auth-modal-body {
  padding: 24px;
}

.auth-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #0a66c2;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

.auth-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.auth-btn-primary {
  background: #0a66c2;
  color: white;
}

.auth-btn-primary:hover {
  background: #084482;
}

.auth-btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #d1d5db;
}

.auth-btn-secondary:hover {
  background: #e9ecef;
}

.auth-error {
  background: #fff5f5;
  color: #dc3545;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid #feb2b2;
}

.auth-loading {
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #0a66c2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

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

.auth-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.auth-modal-footer p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.auth-modal-footer a {
  color: #0a66c2;
  text-decoration: none;
  font-weight: 500;
}

.auth-modal-footer a:hover {
  text-decoration: underline;
}

/* Login Options */
.login-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.login-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.login-option-btn:hover {
  background: #f8f9fa;
  border-color: #0a66c2;
}

.login-option-btn.google {
  border-color: #4285f4;
  color: #4285f4;
}

.login-option-btn.google:hover {
  background: #4285f4;
  color: white;
}

/* Sidebar Authentication Styles */
.sidebar-auth-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  margin: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar-auth-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sidebar-auth-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.sidebar-auth-item:hover {
  background: #f8f9fa;
}

.sidebar-auth-item:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.sidebar-auth-item:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.sidebar-auth-item.signout {
  color: #dc3545;
  border-top: 1px solid #e9ecef;
}

.sidebar-auth-item.signout:hover {
  background: #fff5f5;
}

.sidebar-auth-item.google {
  border-color: #4285f4;
  color: #4285f4;
}

.sidebar-auth-item.google:hover {
  background: #4285f4;
  color: white;
}

/* Contact Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* backdrop-filter: blur(10px); */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .modal {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    /* backdrop-filter: blur(20px); */
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    height: 600px;
    position: relative;
    transform: scale(0.8) translateY(0px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    pointer-events: all;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-content {
    height: 100%;
    display: flex;
    padding: 24px;
    gap: 24px;
}

/* Left side - Benefits */
.benefits-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-logo {
    width: 80px;
    height: auto;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.3));
}

.modal-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
    line-height: 1.2;
}

.modal-subtitle {
    color: #94a3b8;
    margin-bottom: 16px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.benefit-item {
    transition: all 0.5s ease;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(34, 197, 94, 0.4);
}

.benefit-title {
    font-size: 14px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.benefit-icon {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon svg {
    width: 10px;
    height: 10px;
    fill: white;
}

.benefit-description {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
}

/* Right side - Contact */
.contact-section {
    flex: 0 0 300px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.contact-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(34, 197, 94, 0.5);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
    margin-bottom: 16px;
}

.contact-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.contact-title {
    font-size: 14px;
    color: #22c55e;
    margin-bottom: 16px;
    font-weight: 600;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #cbd5e1;
}

.contact-item-icon {
    width: 16px;
    height: 16px;
    fill: #22c55e;
    flex-shrink: 0;
}

.call-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    box-shadow: 
        0 6px 16px rgba(34, 197, 94, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}

.call-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.call-button:hover::before {
    left: 100%;
}

.call-button:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 20px rgba(34, 197, 94, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.call-button svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .modal-overlay .modal {
        width: 95%;
        height: 90vh;
        max-height: 600px;
    }

    .modal-content {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .contact-section {
        flex: none;
        padding: 20px;
    }

    .benefits-list {
        gap: 8px;
    }

    .benefit-item {
        padding: 12px;
    }

    .contact-photo {
        width: 80px;
        height: 80px;
    }

    .contact-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 16px;
    }

    .modal-title {
        font-size: 20px;
    }

    .benefit-title {
        font-size: 13px;
    }

    .benefit-description {
        font-size: 11px;
    }
}

/* Account Info Styles */
.sidebar-account-info {
  padding: 0;
  margin: 0;
}

.sidebar-account-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.sidebar-account-status {
  padding: 4px 10px;
  background: #f9f9f9;
  border-radius: 6px;
  margin: 4px 0;
}

.sidebar-account-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.sidebar-account-name {
  font-size: 0.875rem;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
}

.sidebar-account-type {
  display: flex;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.badge-sm {
  padding: 2px 6px;
  font-size: 0.7rem;
}

.badge-info {
  background-color: #3b82f6;
  color: white;
}

.badge-success {
  background-color: #10b981;
  color: white;
}

.badge-warning {
  background-color: #f59e0b;
  color: white;
}

/* --- FOOTPRINT (ACCOUNT) CARD STYLES --- */
.site-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    overflow: visible;
    position: relative;
    transition: all 0.2s ease-in-out;
}
.site-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.site-thumb {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
}
.site-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.site-body {
    padding: 12px;
}
.site-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.25;
}
.site-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}
.site-actions .btn {
    appearance: none;
    border: 1px solid #e5e7eb;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}
.site-actions .btn:hover {
    background: #f9fafb;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
}
.icon-btn:hover {
    background: #f9fafb;
}
.menu-button {
    position: relative;
}
.site-card .dropdown-menu {
    position: absolute;
    right: 0;
    top: 36px;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 6px;
    display: none;
    z-index: 50;
}
.site-card .dropdown-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #111827;
    background: transparent;
    display: block;
    width: 100%;
    text-align: left;
}
.site-card .dropdown-item:hover {
    background: #f3f4f6;
}

/* Pattern thumbnail with name */
.thumb-pattern {
  background:
    conic-gradient(from 45deg at 20% 20%, #0ea5e9 0 25%, transparent 0 50%, #8b5cf6 0 75%, transparent 0),
    linear-gradient(135deg,#0ea5e9,#22d3ee);
  color: #fff;
}
.thumb-text {
    padding: 0 12px;
    color: #fff;
    text-align: center;
    font: 600 16px/1.25 system-ui;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- FOOTPRINT DROPDOWN OVERRIDES --- */
.footprint-dropdown-container {
    width: max-content;
    max-width: 790px; /* Accommodates up to 3 cards (240px each) with gaps and padding */
}

.footprint-dropdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.footprint-dropdown-grid .site-card {
    flex: 0 0 240px;
}