:root {
  /* Primary colors - modern teal palette */
  --primary-color: #008080;        /* Classic teal */
  --primary-color-rgb: 0, 128, 128;
  --primary-hover: #006666;        /* Darker teal */
  --primary-hover-rgb: 0, 102, 102;
  --primary-light: #00a3a3;        /* Lighter teal */
  --primary-light-rgb: 0, 163, 163;

  /* Utility colors - teal variants */
  --secondary-color: #4db8b8;      /* Soft teal */
  --success-color: #2d8c7a;        /* Deep teal-green */
  --danger-color: #e57373;         /* Soft coral for contrast */
  --warning-color: #ffb74d;        /* Warm amber */
  --info-color: #4dd0e1;           /* Bright teal-blue */
  --accent-color: #26a69a;         /* Material teal accent */

  /* Neutral palette with cool undertones */
  --light-color: #f5faf9;          /* Very light teal tint */
  --dark-color: #1a3c3b;           /* Deep teal-black */
  --gray-100: #e0f2f1;             /* Pale teal */
  --gray-200: #b2dfdb;             /* Light teal-gray */
  --gray-300: #80cbc4;             /* Medium teal-gray */
  --gray-400: #4db6ac;             /* Teal-gray */

  /* Background & text */
  --bg-light: #ffffff;
  --bg-dark: #0d2b2a;              /* Dark teal base */
  --text-light: #e0f2f1;
  --text-dark: #1a3c3b;
  --text-muted: #4db8b8;
  --border-color: #b2dfdb;

  /* Shadows with teal undertones */
  --shadow-sm: 0 1px 3px rgba(0, 77, 77, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 77, 77, 0.12);
  --shadow-lg: 0 10px 15px rgba(0, 77, 77, 0.16);
  --shadow-teal: 0 4px 14px rgba(0, 128, 128, 0.2);

  /* Accent colors - teal spectrum */
  --accent-primary: #008080;
  --accent-secondary: #26a69a;
  --accent-tertiary: #4db8b8;
  --accent-light: #80cbc4;

  /* Gradient utilities */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-secondary));
  --gradient-teal: linear-gradient(135deg, #008080, #26a69a);
  --gradient-dark: linear-gradient(135deg, var(--dark-color), #1a3c3b);
  --gradient-light: linear-gradient(135deg, var(--gray-100), #ffffff);
  --gradient-ocean: linear-gradient(135deg, #008080, #4dd0e1);
  
  /* Additional teal accents */
  --highlight-color: #e0f2f1;
  --focus-ring: 0 0 0 3px rgba(0, 128, 128, 0.3);
  --glass-teal: rgba(128, 203, 196, 0.15);
}

/* ========== Base Styles ========== */
body {
  background: var(--light-color);
  padding-top: 70px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
}

/* ========== Navbar Styles ========== */
.orbitron-logo {
  font-family: 'Orbitron', Gadget, sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: white; /* Add this to ensure visibility against dark background */
  text-transform: uppercase; /* Optional: gives techy look */
}

.navbar-brand {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.navbar-brand img {
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar {
  background: var(--gradient-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-light) !important;
  letter-spacing: 0.5px;
}

.navbar .nav-link {
  color: #cccccc !important; /* Light gray for inactive links */
  font-weight: 500;
  text-decoration: none !important; /* Remove underline */
}

/* Hover effect (optional soft highlight) */
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #e0e7ff !important; /* Slightly lighter gray/blue */
  background-color: transparent !important;
}

/* Active link - white text */
.navbar .nav-link.active,
.navbar .nav-link.active:hover {
  color: #ffffff !important; /* White text for active link */
  background-color: transparent !important;
  font-weight: 600;
  position: relative;
}

/* ========== Typography & Headings ========== */
h1 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.custom-heading {
  font-size: clamp(1.2rem, 3vw, 1.8rem); /* responsive scaling */
  margin-top: 1.6rem;
}

/* ========== Buttons ========== */
.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
}
.btn-primary:hover {
  background: #46a7c2;
  border-color: #46a7c2;
}

/* ========== Cards & Sections ========== */
.card,
.building-info-card {
  margin-bottom: 25px;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-header {
  background: var(--primary-color);
  color: var(--text-light);
  font-weight: 600;
  border-radius: 10px 10px 0 0 !important;
}

.report-section {
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
  margin-bottom: 25px;
}
.report-section h4 {
  color: var(--dark-color);
}

/* ========== Compliance List Items ========== */
.compliance-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.compliance-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}
.compliance-check {
  color: var(--success-color);
}
.compliance-warning {
  color: #ffc107;
}
.compliance-error {
  color: var(--danger-color);
}

.action-item {
  padding: 10px;
  background: #fff8e1;
  border-radius: 5px;
  margin-bottom: 8px;
}

/* ========== Tool Navigation Cards ========== */
.tool-card {
  transition: 0.3s ease;
  cursor: pointer;
  height: 100%;
}
.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.tool-card .card-body {
  display: flex;
  flex-direction: column;
}
.tool-card .icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.tool-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ========== Card Border Variants ========== */
.card.border-secondary {
  border-color: #dee2e6 !important;
}
.card.border-secondary .card-header {
  border-bottom-color: #dee2e6;
}
.card.border-secondary .file-upload-label {
  border: 2px dashed #dee2e6;
}
.card.border-secondary .file-upload-label:hover {
  border-color: #adb5bd;
  background: rgba(108, 117, 125, 0.05);
}

.card.border-primary .file-upload-label {
  border: 2px dashed var(--primary-color);
}
.card.border-primary .file-upload-label:hover {
  border-color: #46a7c2;
  background: rgba(13, 110, 253, 0.05);
}

/* ========== Output & Pass/Fail Text ========== */
#output {
  white-space: pre-wrap;
  background: #fff;
  padding: 20px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  max-height: 500px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
}
.pass {
  color: var(--success-color);
  font-weight: bold;
}
.fail {
  color: var(--danger-color);
  font-weight: bold;
}

/* ========== Status & Indicators ========== */
#loadingStatus {
  min-height: 24px;
  font-size: 0.9rem;
}
.nbc-load-indicator {
  display: inline-block;
  margin-left: 8px;
}
.nbc-loaded {
  color: var(--success-color);
}
.nbc-not-loaded {
  color: var(--secondary-color);
}
.required-field::after {
  content: " *";
  color: var(--danger-color);
}

/* ========== File Upload Styles ========== */
.file-upload-container {
  position: relative;
  margin-bottom: 1rem;
}
.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border: 2px dashed #ced4da;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s;
}
.file-upload-label:hover {
  border-color: var(--primary-color);
  background: rgba(13, 110, 253, 0.05);
}
.file-upload-label i {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}
.file-upload-label h5 {
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.file-upload-input {
  display: none;
}
.file-name {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary-color);
}
.progress-container {
  display: none;
  margin-bottom: 1rem;
}

/* ========== Animations ========== */
.section-animate {
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing-animation {
  0%, 60%, 100% {
    opacity: 0.4;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

/* ========== Input Highlighting ========== */
#customOccupancyClassification {
  transition: 0.3s;
}
#customOccupancyClassification:not(.d-none) {
  background: #f8f9fa;
  border-left: 3px solid var(--primary-color);
  padding-left: 10px;
}
.fixture-highlight {
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
  margin-bottom: 15px;
  background: rgba(13, 110, 253, 0.05);
}

/* ========== Chatbot Styles ========== */
.chatbot-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: rgba(var(--primary-color-rgb), 0.7); /* Transparent gray */
  color: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: 0.3s ease;
}

.chatbot-btn:hover {
  transform: scale(1.1);
  background: rgba(var(--primary-hover-rgb), 0.8); /* Darker on hover */
}

.chatbot-btn svg {
  width: 28px;
  height: 28px;
}
.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 350px;
  max-width: 90%;
  height: 500px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: 0.3s ease;
}
.chatbot-container.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.chatbot-header {
  padding: 15px;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.header-subtext {
  margin: 0;
  font-size: 0.7rem;
  opacity: 0.8;
}
.chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
}
.chatbot-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f8f9fa;
}
.chatbot-message {
  margin-bottom: 15px;
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
}
.chatbot-question {
  background: var(--primary-color);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}
.chatbot-response {
  background: #fff;
  color: var(--dark-color);
  margin-right: auto;
  border-bottom-left-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.chatbot-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
}
#chatbotInput {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px 15px;
  resize: none;
  outline: none;
  font-size: 0.9rem;
  max-height: 100px;
  overflow-y: auto;
}
#chatbotSend {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-left: 10px;
  cursor: pointer;
}
.typing-indicator {
  display: inline-flex;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 0 2px;
  background: var(--secondary-color);
  opacity: 0.4;
  animation: typing-animation 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ========== Install Prompt ========== */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  display: none;
  max-width: 90%;
  text-align: center;
}
.install-prompt p {
  margin-bottom: 10px;
  font-weight: 500;
}
.install-prompt button {
  margin: 0 5px;
}

/* ========== Responsive Styles ========== */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }
  .navbar-brand {
    font-size: 1.2rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  .chatbot-container {
    width: 90%;
    height: 70vh;
    right: 5%;
    bottom: 20px;
  }
  .chatbot-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* Add these to your existing stylesTools.css */

/* Custom badge colors */
.bg-success-light {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success-color);
}

.bg-warning-light {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
}

.bg-danger-light {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
}

/* Form validation styles */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

/* Chatbot response colors */
.chatbot-question {
    background: var(--primary-color);
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chatbot-response {
    background: #fff;
    color: var(--dark-color);
    margin-right: auto;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Tooltip styles */
.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 1rem;
    background-color: var(--dark-color);
}

.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--dark-color);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .chatbot-container {
        width: 95%;
        height: 70vh;
        right: 2.5%;
    }
    
    .chatbot-message {
        max-width: 90%;
    }
}

/* Animation for compliance items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.compliance-item {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Custom scrollbar for chatbot */
.chatbot-messages::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}