:root {
  /* DealIQ Theme Colors (Dark Blue/White) */
  --clr-primary: #1E2532; /* Dark Navy Blue - Primary brand color */
  --clr-primary-hover: #2A334A; /* Slightly lighter navy for hover states */
  --clr-primary-text: #FFFFFF; /* Text on primary buttons - white */

  --clr-accent-1: #3461FF; /* Bright Blue - Primary accent */
  --clr-accent-2: #4B9EFF; /* Lighter Blue - Secondary accent */

  --clr-background: #F5F6F8; /* Very Light Grey - Main page background */
  --clr-surface: #FFFFFF;    /* White - Card/panel backgrounds */
  --clr-border-light: #E6E8EC;
  --clr-border-medium: #D1D5DB;

  --clr-sidebar-bg: var(--clr-primary); /* Dark Navy for Sidebar */
  --clr-sidebar-text: #FFFFFF; /* White text for Sidebar */
  --clr-sidebar-active-bg: #2A334A; /* Lighter Navy for active state */
  
  --clr-secondary-hover-bg: #F3F4F6; /* Light hover for secondary elements */

  /* Text colors */
  --clr-text-heading: var(--clr-primary); /* Dark Navy for headings */
  --clr-text-dark: #1F2937;    /* Very Dark Grey for primary body text */
  --clr-text-medium: #4B5563;  /* Medium Grey for secondary text */
  --clr-text-light: #6B7280;   /* Light Grey for less important text */
  --clr-text-lighter: #9CA3AF; /* Lighter Grey for hints */

  --clr-white: #FFFFFF;
  --clr-light-bg: #FFFFFF;
  --clr-row-hover-bg: #F9FAFB;

  /* Status/Semantic Colors */
  --clr-success: #10B981; /* Green */
  --clr-success-bg: rgba(16, 185, 129, 0.1);
  --clr-warning: #F59E0B; /* Amber */
  --clr-warning-bg: rgba(245, 158, 11, 0.15);
  --clr-danger: #EF4444;  /* Red */
  --clr-danger-bg: rgba(239, 68, 68, 0.1);
  --clr-danger-bg-hover: rgba(239, 68, 68, 0.15);
  --clr-info: var(--clr-accent-2);
  --clr-info-bg: rgba(75, 158, 255, 0.1);

  /* Priority / Tag Colors */
  --clr-priority-1-bg: rgba(52, 97, 255, 0.15);  /* Blue accent */
  --clr-priority-1-text: #2563EB;
  --clr-priority-2-bg: rgba(16, 185, 129, 0.1);  /* Green */
  --clr-priority-2-text: #059669;
  --clr-priority-3-bg: rgba(245, 158, 11, 0.15); /* Amber */
  --clr-priority-3-text: #D97706;
  --clr-priority-4-bg: rgba(99, 102, 241, 0.15);   /* Indigo */
  --clr-priority-4-text: #4F46E5;

  /* Chart colors */
  --chart-color-1: var(--clr-accent-1);
  --chart-color-2: #10B981;
  --chart-color-3: #F59E0B;
  --chart-color-4: #8B5CF6;
  --chart-color-5: #EC4899;
}

/* Override for the primary button gradient */
.primary {
  background-image: none; 
  background-color: var(--clr-accent-1); 
  border: none;
  box-shadow: 0 2px 4px rgba(52, 97, 255, 0.2);
}

.primary:hover {
  background-image: none; 
  background-color: #2851FF; 
  filter: none; 
  border: none;
  box-shadow: 0 4px 8px rgba(52, 97, 255, 0.25);
}

/* General body background for the light theme */
body {
    background-color: var(--clr-background);
    color: var(--clr-text-dark);
}

/* Update card/widget backgrounds for light theme */
.widget, .card, .content-box, .form-container, .table-container, 
.chat-history-panel, .current-chat-panel, .message-input-area,
.modal-content {
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-border-light); /* Add a light border */
}

/* Adjust input fields for light theme */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
    background-color: var(--clr-white); /* White background for inputs */
    border: 1px solid var(--clr-border-medium);
    color: var(--clr-text-dark);
}
input::placeholder, textarea::placeholder {
    color: var(--clr-text-lighter);
}

/* Buttons that aren't primary */
.btn-secondary {
    background-color: var(--clr-light-bg);
    color: var(--clr-text-dark);
    border: 1px solid var(--clr-border-medium);
}
.btn-secondary:hover {
    background-color: #e9ecef; /* Slightly darker hover for secondary buttons */
}

/* Override for the Grid Icon (Dashboard) in DealIQ theme */
.sidebar-btn .grid-icon path {
  stroke: var(--clr-sidebar-text); /* Sidebar text color for stroke */
  fill: none;
  stroke-width: 2px !important; /* Ensure consistent stroke width */
}

.sidebar-btn .grid-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-bg); /* Sidebar background color for fill */
  stroke: none;
  opacity: 1;
}

/* Ensure active state styles override */
.sidebar-btn.active .grid-icon path {
  stroke: var(--clr-sidebar-text); /* Keep same stroke on active */
}

.sidebar-btn.active .grid-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-active-bg); /* Use active background for fill */
}

/* Override for the Chat Bubble Icon in DealIQ theme */
.sidebar-btn .chat-bubble-icon path {
  stroke: var(--clr-sidebar-text);
  fill: none;
  stroke-width: 2px !important;
}

.sidebar-btn .chat-bubble-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-bg);
  stroke: none;
  opacity: 1;
}

/* Style for the ellipsis dots */
.sidebar-btn .chat-bubble-icon .ellipsis-dot {
    fill: var(--clr-sidebar-text); /* Use theme text color */
    stroke: none; /* No stroke for dots */
}

/* Ensure active state styles override */
.sidebar-btn.active .chat-bubble-icon path {
  stroke: var(--clr-sidebar-text);
}

.sidebar-btn.active .chat-bubble-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-active-bg);
}

/* Active state style for ellipsis dots */
.sidebar-btn.active .chat-bubble-icon .ellipsis-dot {
    fill: var(--clr-sidebar-text); /* Keep same color on active */
}

/* Override for the Pipeline Icon in DealIQ theme */
.sidebar-btn .pipeline-icon path {
  stroke: var(--clr-sidebar-text);
  fill: none;
  stroke-width: 2px !important;
}

.sidebar-btn .pipeline-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-bg);
  stroke: none;
  opacity: 1;
}

/* Ensure active state styles override */
.sidebar-btn.active .pipeline-icon path {
  stroke: var(--clr-sidebar-text);
}

.sidebar-btn.active .pipeline-icon path[opacity="0.1"] {
  fill: var(--clr-sidebar-active-bg);
}

/* Fix for main container overflow */
.main {
  overflow: auto;
}

/* Styles for M&A Deal Analysis Table */
.table-wrapper {
  /* Remove overflow and negative margins since table can expand naturally */
}

.reports-list-container {
  width: 100%; /* Reset to normal width */
  min-width: 1200px; /* Ensure minimum width for readability */
  border-collapse: collapse;
}

/* Remove fixed widths to allow flexibility */
.reports-list-container th:nth-child(1) { width: 18%; } /* Target Company */
.reports-list-container th:nth-child(2) { width: 25%; } /* Financials (LTM) - Increased */
.reports-list-container th:nth-child(3) { width: 12%; } /* AI Deal Score */
.reports-list-container th:nth-child(4) { width: 25%; } /* Key AI Insight */
.reports-list-container th:nth-child(5) { width: 10%; } /* Deal Stage */
.reports-list-container th:nth-child(6) { width: 10%; } /* Actions */

.deal-score {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
}
.deal-score.high { background-color: var(--clr-success-bg); color: var(--clr-success); }
.deal-score.medium { background-color: var(--clr-warning-bg); color: var(--clr-warning); }
.deal-score.low { background-color: var(--clr-danger-bg); color: var(--clr-danger); }

.deal-stage {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  background-color: #e9ecef;
  color: #495057;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Responsive Card Layout for Tables */
@media screen and (max-width: 992px) {
  .reports-list-container thead {
    display: none; /* Hide headers on mobile */
  }

  .reports-list-container tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--clr-border-medium);
    border-radius: 8px;
    padding: 1rem;
  }

  .reports-list-container td {
    display: block;
    text-align: right;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--clr-border-light);
  }

  .reports-list-container td:last-child {
    border-bottom: none;
  }

  .reports-list-container td::before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
    color: var(--clr-text-heading);
  }

  /* Specific adjustments for content inside cells */
  .financials-info, .report-actions, .deal-score {
    text-align: right;
  }

  .report-info {
    text-align: left;
    margin-bottom: 1rem;
  }

  .ai-insight {
    text-align: left;
    margin-top: 0.5rem;
    width: 100%;
    color: var(--clr-text-medium);
  }
}

/* Professional DealIQ Logo Styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 20px 0;
  margin-bottom: 8px;
}

.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  transition: transform 0.2s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  align-items: baseline;
  font-size: 40px;
  line-height: 1;
  font-family: 'Barlow', sans-serif;
}

.logo-text-deal {
  font-weight: 700;
  color: white;
  letter-spacing: -1px;
}

.logo-text-iq {
  font-weight: 500;
  color: #4285F4; /* Original light blue */
  letter-spacing: -0.5px;
}

.content-wrapper {
  flex-grow: 1;
  background-color: var(--background-color-light);
  max-width: none; /* Override the 1200px constraint from demo-styles.css */
}

/* Specific override to make Dashboard the default selected button */
.sidebar-btn:has(.dashboard-icon) {
  background-color: var(--firebrand-blue);
  color: white;
} 

/* New Deal Analysis Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99999; /* Much higher z-index */
  justify-content: center;
  align-items: center;
}

.modal-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 1080px; /* Increased from 900px (20% larger) */
  max-height: 95vh; /* Increased from 90vh (about 20% more usable height) */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 100000; /* Ensure container is also high */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--clr-border-light);
  background-color: var(--clr-surface);
}

.modal-header h2 {
  margin: 0;
  color: var(--clr-text-heading);
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--clr-text-medium);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: var(--clr-border-light);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--clr-border-light);
  background-color: var(--clr-background);
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  color: var(--clr-text-medium);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover {
  background-color: var(--clr-secondary-hover-bg);
  color: var(--clr-text-dark);
}

.tab-btn.active {
  color: var(--clr-accent-1);
  border-bottom-color: var(--clr-accent-1);
  background-color: white;
}

.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.tab-content {
  display: none;
}

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

.tab-content h3 {
  margin: 0 0 1.5rem 0;
  color: var(--clr-text-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  margin-bottom: 0.5rem;
  color: var(--clr-text-dark);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--clr-border-medium);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent-1);
  box-shadow: 0 0 0 3px rgba(52, 97, 255, 0.1);
}

/* Data Ingestion Styles */
.data-sources {
  display: grid;
  gap: 2rem;
}

.source-category {
  border: 1px solid var(--clr-border-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.source-category h4 {
  margin: 0 0 1rem 0;
  color: var(--clr-text-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.upload-area {
  border: 2px dashed var(--clr-border-medium);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.upload-area:hover {
  border-color: var(--clr-accent-1);
  background-color: rgba(52, 97, 255, 0.02);
}

.upload-area i {
  font-size: 2rem;
  color: var(--clr-text-medium);
  margin-bottom: 1rem;
}

.upload-area p {
  margin: 0 0 1rem 0;
  color: var(--clr-text-medium);
}

.source-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.source-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--clr-text-medium);
  font-size: 0.9rem;
  cursor: pointer;
}

/* Analysis Configuration Styles */
.analysis-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.analysis-section {
  border: 1px solid var(--clr-border-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.analysis-section h4 {
  margin: 0 0 1rem 0;
  color: var(--clr-text-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--clr-text-dark);
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--clr-accent-1);
}

/* Output Documents Styles */
.output-config {
  display: grid;
  gap: 2rem;
}

.output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.document-section {
  border: 1px solid var(--clr-border-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.document-section h4 {
  margin: 0 0 1rem 0;
  color: var(--clr-text-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.delivery-options {
  border: 1px solid var(--clr-border-light);
  border-radius: 8px;
  padding: 1.5rem;
  background-color: rgba(52, 97, 255, 0.02);
}

.automation-level {
  border: 1px solid var(--clr-accent-1);
  border-radius: 8px;
  padding: 1.5rem;
  background-color: rgba(52, 97, 255, 0.05);
  margin-top: 1rem;
}

.automation-level h4 {
  margin: 0 0 1.5rem 0;
  color: var(--clr-accent-1);
  font-size: 1.1rem;
  font-weight: 600;
}

.automation-slider {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-medium);
  margin-bottom: 0.5rem;
}

.automation-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #ff6b6b 0%, #ffd93d 50%, #6bcf7f 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.automation-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--clr-accent-1);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.automation-range::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--clr-accent-1);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: none;
}

.automation-descriptions {
  margin-top: 1rem;
}

.automation-descriptions .description {
  display: none;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  border-left: 4px solid var(--clr-border-medium);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--clr-text-dark);
}

.automation-descriptions .description.active {
  display: block;
}

.automation-descriptions .description.manual.active {
  border-left-color: #ff6b6b;
}

.automation-descriptions .description.supervised.active {
  border-left-color: #ffd93d;
}

.automation-descriptions .description.autonomous.active {
  border-left-color: #6bcf7f;
}



/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--clr-border-light);
  background-color: var(--clr-background);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .modal-tabs {
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 1 50%;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .analysis-config {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-footer {
    padding: 1rem 1.5rem;
  }

  .output-grid {
    grid-template-columns: 1fr;
  }
} 